1// Copyright 2020 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 adexchangebuyer provides access to the Ad Exchange Buyer API. 8// 9// For product documentation, see: https://developers.google.com/ad-exchange/buyer-rest 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/adexchangebuyer/v1.4" 16// ... 17// ctx := context.Background() 18// adexchangebuyerService, err := adexchangebuyer.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// adexchangebuyerService, err := adexchangebuyer.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// adexchangebuyerService, err := adexchangebuyer.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package adexchangebuyer // import "google.golang.org/api/adexchangebuyer/v1.4" 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 = "adexchangebuyer:v1.4" 75const apiName = "adexchangebuyer" 76const apiVersion = "v1.4" 77const basePath = "https://www.googleapis.com/adexchangebuyer/v1.4/" 78 79// OAuth2 scopes used by this API. 80const ( 81 // Manage your Ad Exchange buyer account configuration 82 AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchange.buyer" 83) 84 85// NewService creates a new Service. 86func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 87 scopesOption := option.WithScopes( 88 "https://www.googleapis.com/auth/adexchange.buyer", 89 ) 90 // NOTE: prepend, so we don't override user-specified scopes. 91 opts = append([]option.ClientOption{scopesOption}, opts...) 92 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 93 client, endpoint, err := htransport.NewClient(ctx, opts...) 94 if err != nil { 95 return nil, err 96 } 97 s, err := New(client) 98 if err != nil { 99 return nil, err 100 } 101 if endpoint != "" { 102 s.BasePath = endpoint 103 } 104 return s, nil 105} 106 107// New creates a new Service. It uses the provided http.Client for requests. 108// 109// Deprecated: please use NewService instead. 110// To provide a custom HTTP client, use option.WithHTTPClient. 111// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 112func New(client *http.Client) (*Service, error) { 113 if client == nil { 114 return nil, errors.New("client is nil") 115 } 116 s := &Service{client: client, BasePath: basePath} 117 s.Accounts = NewAccountsService(s) 118 s.BillingInfo = NewBillingInfoService(s) 119 s.Budget = NewBudgetService(s) 120 s.Creatives = NewCreativesService(s) 121 s.Marketplacedeals = NewMarketplacedealsService(s) 122 s.Marketplacenotes = NewMarketplacenotesService(s) 123 s.Marketplaceprivateauction = NewMarketplaceprivateauctionService(s) 124 s.PerformanceReport = NewPerformanceReportService(s) 125 s.PretargetingConfig = NewPretargetingConfigService(s) 126 s.Products = NewProductsService(s) 127 s.Proposals = NewProposalsService(s) 128 s.Pubprofiles = NewPubprofilesService(s) 129 return s, nil 130} 131 132type Service struct { 133 client *http.Client 134 BasePath string // API endpoint base URL 135 UserAgent string // optional additional User-Agent fragment 136 137 Accounts *AccountsService 138 139 BillingInfo *BillingInfoService 140 141 Budget *BudgetService 142 143 Creatives *CreativesService 144 145 Marketplacedeals *MarketplacedealsService 146 147 Marketplacenotes *MarketplacenotesService 148 149 Marketplaceprivateauction *MarketplaceprivateauctionService 150 151 PerformanceReport *PerformanceReportService 152 153 PretargetingConfig *PretargetingConfigService 154 155 Products *ProductsService 156 157 Proposals *ProposalsService 158 159 Pubprofiles *PubprofilesService 160} 161 162func (s *Service) userAgent() string { 163 if s.UserAgent == "" { 164 return googleapi.UserAgent 165 } 166 return googleapi.UserAgent + " " + s.UserAgent 167} 168 169func NewAccountsService(s *Service) *AccountsService { 170 rs := &AccountsService{s: s} 171 return rs 172} 173 174type AccountsService struct { 175 s *Service 176} 177 178func NewBillingInfoService(s *Service) *BillingInfoService { 179 rs := &BillingInfoService{s: s} 180 return rs 181} 182 183type BillingInfoService struct { 184 s *Service 185} 186 187func NewBudgetService(s *Service) *BudgetService { 188 rs := &BudgetService{s: s} 189 return rs 190} 191 192type BudgetService struct { 193 s *Service 194} 195 196func NewCreativesService(s *Service) *CreativesService { 197 rs := &CreativesService{s: s} 198 return rs 199} 200 201type CreativesService struct { 202 s *Service 203} 204 205func NewMarketplacedealsService(s *Service) *MarketplacedealsService { 206 rs := &MarketplacedealsService{s: s} 207 return rs 208} 209 210type MarketplacedealsService struct { 211 s *Service 212} 213 214func NewMarketplacenotesService(s *Service) *MarketplacenotesService { 215 rs := &MarketplacenotesService{s: s} 216 return rs 217} 218 219type MarketplacenotesService struct { 220 s *Service 221} 222 223func NewMarketplaceprivateauctionService(s *Service) *MarketplaceprivateauctionService { 224 rs := &MarketplaceprivateauctionService{s: s} 225 return rs 226} 227 228type MarketplaceprivateauctionService struct { 229 s *Service 230} 231 232func NewPerformanceReportService(s *Service) *PerformanceReportService { 233 rs := &PerformanceReportService{s: s} 234 return rs 235} 236 237type PerformanceReportService struct { 238 s *Service 239} 240 241func NewPretargetingConfigService(s *Service) *PretargetingConfigService { 242 rs := &PretargetingConfigService{s: s} 243 return rs 244} 245 246type PretargetingConfigService struct { 247 s *Service 248} 249 250func NewProductsService(s *Service) *ProductsService { 251 rs := &ProductsService{s: s} 252 return rs 253} 254 255type ProductsService struct { 256 s *Service 257} 258 259func NewProposalsService(s *Service) *ProposalsService { 260 rs := &ProposalsService{s: s} 261 return rs 262} 263 264type ProposalsService struct { 265 s *Service 266} 267 268func NewPubprofilesService(s *Service) *PubprofilesService { 269 rs := &PubprofilesService{s: s} 270 return rs 271} 272 273type PubprofilesService struct { 274 s *Service 275} 276 277// Account: Configuration data for an Ad Exchange buyer account. 278type Account struct { 279 // ApplyPretargetingToNonGuaranteedDeals: When this is false, bid 280 // requests that include a deal ID for a private auction or preferred 281 // deal are always sent to your bidder. When true, all active 282 // pretargeting configs will be applied to private auctions and 283 // preferred deals. Programmatic Guaranteed deals (when enabled) are 284 // always sent to your bidder. 285 ApplyPretargetingToNonGuaranteedDeals bool `json:"applyPretargetingToNonGuaranteedDeals,omitempty"` 286 287 // BidderLocation: Your bidder locations that have distinct URLs. 288 BidderLocation []*AccountBidderLocation `json:"bidderLocation,omitempty"` 289 290 // CookieMatchingNid: The nid parameter value used in cookie match 291 // requests. Please contact your technical account manager if you need 292 // to change this. 293 CookieMatchingNid string `json:"cookieMatchingNid,omitempty"` 294 295 // CookieMatchingUrl: The base URL used in cookie match requests. 296 CookieMatchingUrl string `json:"cookieMatchingUrl,omitempty"` 297 298 // Id: Account id. 299 Id int64 `json:"id,omitempty"` 300 301 // Kind: Resource type. 302 Kind string `json:"kind,omitempty"` 303 304 // MaximumActiveCreatives: The maximum number of active creatives that 305 // an account can have, where a creative is active if it was inserted or 306 // bid with in the last 30 days. Please contact your technical account 307 // manager if you need to change this. 308 MaximumActiveCreatives int64 `json:"maximumActiveCreatives,omitempty"` 309 310 // MaximumTotalQps: The sum of all bidderLocation.maximumQps values 311 // cannot exceed this. Please contact your technical account manager if 312 // you need to change this. 313 MaximumTotalQps int64 `json:"maximumTotalQps,omitempty"` 314 315 // NumberActiveCreatives: The number of creatives that this account 316 // inserted or bid with in the last 30 days. 317 NumberActiveCreatives int64 `json:"numberActiveCreatives,omitempty"` 318 319 // ServerResponse contains the HTTP response code and headers from the 320 // server. 321 googleapi.ServerResponse `json:"-"` 322 323 // ForceSendFields is a list of field names (e.g. 324 // "ApplyPretargetingToNonGuaranteedDeals") to unconditionally include 325 // in API requests. By default, fields with empty values are omitted 326 // from API requests. However, any non-pointer, non-interface field 327 // appearing in ForceSendFields will be sent to the server regardless of 328 // whether the field is empty or not. This may be used to include empty 329 // fields in Patch requests. 330 ForceSendFields []string `json:"-"` 331 332 // NullFields is a list of field names (e.g. 333 // "ApplyPretargetingToNonGuaranteedDeals") to include in API requests 334 // with the JSON null value. By default, fields with empty values are 335 // omitted from API requests. However, any field with an empty value 336 // appearing in NullFields will be sent to the server as null. It is an 337 // error if a field in this list has a non-empty value. This may be used 338 // to include null fields in Patch requests. 339 NullFields []string `json:"-"` 340} 341 342func (s *Account) MarshalJSON() ([]byte, error) { 343 type NoMethod Account 344 raw := NoMethod(*s) 345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 346} 347 348type AccountBidderLocation struct { 349 // BidProtocol: The protocol that the bidder endpoint is using. OpenRTB 350 // protocols with prefix PROTOCOL_OPENRTB_PROTOBUF use proto buffer, 351 // otherwise use JSON. Allowed values: 352 // - PROTOCOL_ADX 353 // - PROTOCOL_OPENRTB_2_2 354 // - PROTOCOL_OPENRTB_2_3 355 // - PROTOCOL_OPENRTB_2_4 356 // - PROTOCOL_OPENRTB_2_5 357 // - PROTOCOL_OPENRTB_PROTOBUF_2_3 358 // - PROTOCOL_OPENRTB_PROTOBUF_2_4 359 // - PROTOCOL_OPENRTB_PROTOBUF_2_5 360 BidProtocol string `json:"bidProtocol,omitempty"` 361 362 // MaximumQps: The maximum queries per second the Ad Exchange will send. 363 MaximumQps int64 `json:"maximumQps,omitempty"` 364 365 // Region: The geographical region the Ad Exchange should send requests 366 // from. Only used by some quota systems, but always setting the value 367 // is recommended. Allowed values: 368 // - ASIA 369 // - EUROPE 370 // - US_EAST 371 // - US_WEST 372 Region string `json:"region,omitempty"` 373 374 // Url: The URL to which the Ad Exchange will send bid requests. 375 Url string `json:"url,omitempty"` 376 377 // ForceSendFields is a list of field names (e.g. "BidProtocol") to 378 // unconditionally include in API requests. By default, fields with 379 // empty values are omitted from API requests. However, any non-pointer, 380 // non-interface field appearing in ForceSendFields will be sent to the 381 // server regardless of whether the field is empty or not. This may be 382 // used to include empty fields in Patch requests. 383 ForceSendFields []string `json:"-"` 384 385 // NullFields is a list of field names (e.g. "BidProtocol") to include 386 // in API requests with the JSON null value. By default, fields with 387 // empty values are omitted from API requests. However, any field with 388 // an empty value appearing in NullFields will be sent to the server as 389 // null. It is an error if a field in this list has a non-empty value. 390 // This may be used to include null fields in Patch requests. 391 NullFields []string `json:"-"` 392} 393 394func (s *AccountBidderLocation) MarshalJSON() ([]byte, error) { 395 type NoMethod AccountBidderLocation 396 raw := NoMethod(*s) 397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 398} 399 400// AccountsList: An account feed lists Ad Exchange buyer accounts that 401// the user has access to. Each entry in the feed corresponds to a 402// single buyer account. 403type AccountsList struct { 404 // Items: A list of accounts. 405 Items []*Account `json:"items,omitempty"` 406 407 // Kind: Resource type. 408 Kind string `json:"kind,omitempty"` 409 410 // ServerResponse contains the HTTP response code and headers from the 411 // server. 412 googleapi.ServerResponse `json:"-"` 413 414 // ForceSendFields is a list of field names (e.g. "Items") to 415 // unconditionally include in API requests. By default, fields with 416 // empty values are omitted from API requests. However, any non-pointer, 417 // non-interface field appearing in ForceSendFields will be sent to the 418 // server regardless of whether the field is empty or not. This may be 419 // used to include empty fields in Patch requests. 420 ForceSendFields []string `json:"-"` 421 422 // NullFields is a list of field names (e.g. "Items") to include in API 423 // requests with the JSON null value. By default, fields with empty 424 // values are omitted from API requests. However, any field with an 425 // empty value appearing in NullFields will be sent to the server as 426 // null. It is an error if a field in this list has a non-empty value. 427 // This may be used to include null fields in Patch requests. 428 NullFields []string `json:"-"` 429} 430 431func (s *AccountsList) MarshalJSON() ([]byte, error) { 432 type NoMethod AccountsList 433 raw := NoMethod(*s) 434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 435} 436 437type AddOrderDealsRequest struct { 438 // Deals: The list of deals to add 439 Deals []*MarketplaceDeal `json:"deals,omitempty"` 440 441 // ProposalRevisionNumber: The last known proposal revision number. 442 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 443 444 // UpdateAction: Indicates an optional action to take on the proposal 445 UpdateAction string `json:"updateAction,omitempty"` 446 447 // ForceSendFields is a list of field names (e.g. "Deals") to 448 // unconditionally include in API requests. By default, fields with 449 // empty values are omitted from API requests. However, any non-pointer, 450 // non-interface field appearing in ForceSendFields will be sent to the 451 // server regardless of whether the field is empty or not. This may be 452 // used to include empty fields in Patch requests. 453 ForceSendFields []string `json:"-"` 454 455 // NullFields is a list of field names (e.g. "Deals") to include in API 456 // requests with the JSON null value. By default, fields with empty 457 // values are omitted from API requests. However, any field with an 458 // empty value appearing in NullFields will be sent to the server as 459 // null. It is an error if a field in this list has a non-empty value. 460 // This may be used to include null fields in Patch requests. 461 NullFields []string `json:"-"` 462} 463 464func (s *AddOrderDealsRequest) MarshalJSON() ([]byte, error) { 465 type NoMethod AddOrderDealsRequest 466 raw := NoMethod(*s) 467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 468} 469 470type AddOrderDealsResponse struct { 471 // Deals: List of deals added (in the same proposal as passed in the 472 // request) 473 Deals []*MarketplaceDeal `json:"deals,omitempty"` 474 475 // ProposalRevisionNumber: The updated revision number for the proposal. 476 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 477 478 // ServerResponse contains the HTTP response code and headers from the 479 // server. 480 googleapi.ServerResponse `json:"-"` 481 482 // ForceSendFields is a list of field names (e.g. "Deals") to 483 // unconditionally include in API requests. By default, fields with 484 // empty values are omitted from API requests. However, any non-pointer, 485 // non-interface field appearing in ForceSendFields will be sent to the 486 // server regardless of whether the field is empty or not. This may be 487 // used to include empty fields in Patch requests. 488 ForceSendFields []string `json:"-"` 489 490 // NullFields is a list of field names (e.g. "Deals") to include in API 491 // requests with the JSON null value. By default, fields with empty 492 // values are omitted from API requests. However, any field with an 493 // empty value appearing in NullFields will be sent to the server as 494 // null. It is an error if a field in this list has a non-empty value. 495 // This may be used to include null fields in Patch requests. 496 NullFields []string `json:"-"` 497} 498 499func (s *AddOrderDealsResponse) MarshalJSON() ([]byte, error) { 500 type NoMethod AddOrderDealsResponse 501 raw := NoMethod(*s) 502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 503} 504 505type AddOrderNotesRequest struct { 506 // Notes: The list of notes to add. 507 Notes []*MarketplaceNote `json:"notes,omitempty"` 508 509 // ForceSendFields is a list of field names (e.g. "Notes") to 510 // unconditionally include in API requests. By default, fields with 511 // empty values are omitted from API requests. However, any non-pointer, 512 // non-interface field appearing in ForceSendFields will be sent to the 513 // server regardless of whether the field is empty or not. This may be 514 // used to include empty fields in Patch requests. 515 ForceSendFields []string `json:"-"` 516 517 // NullFields is a list of field names (e.g. "Notes") to include in API 518 // requests with the JSON null value. By default, fields with empty 519 // values are omitted from API requests. However, any field with an 520 // empty value appearing in NullFields will be sent to the server as 521 // null. It is an error if a field in this list has a non-empty value. 522 // This may be used to include null fields in Patch requests. 523 NullFields []string `json:"-"` 524} 525 526func (s *AddOrderNotesRequest) MarshalJSON() ([]byte, error) { 527 type NoMethod AddOrderNotesRequest 528 raw := NoMethod(*s) 529 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 530} 531 532type AddOrderNotesResponse struct { 533 Notes []*MarketplaceNote `json:"notes,omitempty"` 534 535 // ServerResponse contains the HTTP response code and headers from the 536 // server. 537 googleapi.ServerResponse `json:"-"` 538 539 // ForceSendFields is a list of field names (e.g. "Notes") to 540 // unconditionally include in API requests. By default, fields with 541 // empty values are omitted from API requests. However, any non-pointer, 542 // non-interface field appearing in ForceSendFields will be sent to the 543 // server regardless of whether the field is empty or not. This may be 544 // used to include empty fields in Patch requests. 545 ForceSendFields []string `json:"-"` 546 547 // NullFields is a list of field names (e.g. "Notes") to include in API 548 // requests with the JSON null value. By default, fields with empty 549 // values are omitted from API requests. However, any field with an 550 // empty value appearing in NullFields will be sent to the server as 551 // null. It is an error if a field in this list has a non-empty value. 552 // This may be used to include null fields in Patch requests. 553 NullFields []string `json:"-"` 554} 555 556func (s *AddOrderNotesResponse) MarshalJSON() ([]byte, error) { 557 type NoMethod AddOrderNotesResponse 558 raw := NoMethod(*s) 559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 560} 561 562// BillingInfo: The configuration data for an Ad Exchange billing info. 563type BillingInfo struct { 564 // AccountId: Account id. 565 AccountId int64 `json:"accountId,omitempty"` 566 567 // AccountName: Account name. 568 AccountName string `json:"accountName,omitempty"` 569 570 // BillingId: A list of adgroup IDs associated with this particular 571 // account. These IDs may show up as part of a realtime bidding 572 // BidRequest, which indicates a bid request for this account. 573 BillingId []string `json:"billingId,omitempty"` 574 575 // Kind: Resource type. 576 Kind string `json:"kind,omitempty"` 577 578 // ServerResponse contains the HTTP response code and headers from the 579 // server. 580 googleapi.ServerResponse `json:"-"` 581 582 // ForceSendFields is a list of field names (e.g. "AccountId") to 583 // unconditionally include in API requests. By default, fields with 584 // empty values are omitted from API requests. However, any non-pointer, 585 // non-interface field appearing in ForceSendFields will be sent to the 586 // server regardless of whether the field is empty or not. This may be 587 // used to include empty fields in Patch requests. 588 ForceSendFields []string `json:"-"` 589 590 // NullFields is a list of field names (e.g. "AccountId") to include in 591 // API requests with the JSON null value. By default, fields with empty 592 // values are omitted from API requests. However, any field with an 593 // empty value appearing in NullFields will be sent to the server as 594 // null. It is an error if a field in this list has a non-empty value. 595 // This may be used to include null fields in Patch requests. 596 NullFields []string `json:"-"` 597} 598 599func (s *BillingInfo) MarshalJSON() ([]byte, error) { 600 type NoMethod BillingInfo 601 raw := NoMethod(*s) 602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 603} 604 605// BillingInfoList: A billing info feed lists Billing Info the Ad 606// Exchange buyer account has access to. Each entry in the feed 607// corresponds to a single billing info. 608type BillingInfoList struct { 609 // Items: A list of billing info relevant for your account. 610 Items []*BillingInfo `json:"items,omitempty"` 611 612 // Kind: Resource type. 613 Kind string `json:"kind,omitempty"` 614 615 // ServerResponse contains the HTTP response code and headers from the 616 // server. 617 googleapi.ServerResponse `json:"-"` 618 619 // ForceSendFields is a list of field names (e.g. "Items") to 620 // unconditionally include in API requests. By default, fields with 621 // empty values are omitted from API requests. However, any non-pointer, 622 // non-interface field appearing in ForceSendFields will be sent to the 623 // server regardless of whether the field is empty or not. This may be 624 // used to include empty fields in Patch requests. 625 ForceSendFields []string `json:"-"` 626 627 // NullFields is a list of field names (e.g. "Items") to include in API 628 // requests with the JSON null value. By default, fields with empty 629 // values are omitted from API requests. However, any field with an 630 // empty value appearing in NullFields will be sent to the server as 631 // null. It is an error if a field in this list has a non-empty value. 632 // This may be used to include null fields in Patch requests. 633 NullFields []string `json:"-"` 634} 635 636func (s *BillingInfoList) MarshalJSON() ([]byte, error) { 637 type NoMethod BillingInfoList 638 raw := NoMethod(*s) 639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 640} 641 642// Budget: The configuration data for Ad Exchange RTB - Budget API. 643type Budget struct { 644 // AccountId: The id of the account. This is required for get and update 645 // requests. 646 AccountId int64 `json:"accountId,omitempty,string"` 647 648 // BillingId: The billing id to determine which adgroup to provide 649 // budget information for. This is required for get and update requests. 650 BillingId int64 `json:"billingId,omitempty,string"` 651 652 // BudgetAmount: The daily budget amount in unit amount of the account 653 // currency to apply for the billingId provided. This is required for 654 // update requests. 655 BudgetAmount int64 `json:"budgetAmount,omitempty,string"` 656 657 // CurrencyCode: The currency code for the buyer. This cannot be altered 658 // here. 659 CurrencyCode string `json:"currencyCode,omitempty"` 660 661 // Id: The unique id that describes this item. 662 Id string `json:"id,omitempty"` 663 664 // Kind: The kind of the resource, i.e. "adexchangebuyer#budget". 665 Kind string `json:"kind,omitempty"` 666 667 // ServerResponse contains the HTTP response code and headers from the 668 // server. 669 googleapi.ServerResponse `json:"-"` 670 671 // ForceSendFields is a list of field names (e.g. "AccountId") to 672 // unconditionally include in API requests. By default, fields with 673 // empty values are omitted from API requests. However, any non-pointer, 674 // non-interface field appearing in ForceSendFields will be sent to the 675 // server regardless of whether the field is empty or not. This may be 676 // used to include empty fields in Patch requests. 677 ForceSendFields []string `json:"-"` 678 679 // NullFields is a list of field names (e.g. "AccountId") to include in 680 // API requests with the JSON null value. By default, fields with empty 681 // values are omitted from API requests. However, any field with an 682 // empty value appearing in NullFields will be sent to the server as 683 // null. It is an error if a field in this list has a non-empty value. 684 // This may be used to include null fields in Patch requests. 685 NullFields []string `json:"-"` 686} 687 688func (s *Budget) MarshalJSON() ([]byte, error) { 689 type NoMethod Budget 690 raw := NoMethod(*s) 691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 692} 693 694type Buyer struct { 695 // AccountId: Adx account id of the buyer. 696 AccountId string `json:"accountId,omitempty"` 697 698 // ForceSendFields is a list of field names (e.g. "AccountId") to 699 // unconditionally include in API requests. By default, fields with 700 // empty values are omitted from API requests. However, any non-pointer, 701 // non-interface field appearing in ForceSendFields will be sent to the 702 // server regardless of whether the field is empty or not. This may be 703 // used to include empty fields in Patch requests. 704 ForceSendFields []string `json:"-"` 705 706 // NullFields is a list of field names (e.g. "AccountId") to include in 707 // API requests with the JSON null value. By default, fields with empty 708 // values are omitted from API requests. However, any field with an 709 // empty value appearing in NullFields will be sent to the server as 710 // null. It is an error if a field in this list has a non-empty value. 711 // This may be used to include null fields in Patch requests. 712 NullFields []string `json:"-"` 713} 714 715func (s *Buyer) MarshalJSON() ([]byte, error) { 716 type NoMethod Buyer 717 raw := NoMethod(*s) 718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 719} 720 721type ContactInformation struct { 722 // Email: Email address of the contact. 723 Email string `json:"email,omitempty"` 724 725 // Name: The name of the contact. 726 Name string `json:"name,omitempty"` 727 728 // ForceSendFields is a list of field names (e.g. "Email") to 729 // unconditionally include in API requests. By default, fields with 730 // empty values are omitted from API requests. However, any non-pointer, 731 // non-interface field appearing in ForceSendFields will be sent to the 732 // server regardless of whether the field is empty or not. This may be 733 // used to include empty fields in Patch requests. 734 ForceSendFields []string `json:"-"` 735 736 // NullFields is a list of field names (e.g. "Email") to include in API 737 // requests with the JSON null value. By default, fields with empty 738 // values are omitted from API requests. However, any field with an 739 // empty value appearing in NullFields will be sent to the server as 740 // null. It is an error if a field in this list has a non-empty value. 741 // This may be used to include null fields in Patch requests. 742 NullFields []string `json:"-"` 743} 744 745func (s *ContactInformation) MarshalJSON() ([]byte, error) { 746 type NoMethod ContactInformation 747 raw := NoMethod(*s) 748 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 749} 750 751type CreateOrdersRequest struct { 752 // Proposals: The list of proposals to create. 753 Proposals []*Proposal `json:"proposals,omitempty"` 754 755 // WebPropertyCode: Web property id of the seller creating these orders 756 WebPropertyCode string `json:"webPropertyCode,omitempty"` 757 758 // ForceSendFields is a list of field names (e.g. "Proposals") to 759 // unconditionally include in API requests. By default, fields with 760 // empty values are omitted from API requests. However, any non-pointer, 761 // non-interface field appearing in ForceSendFields will be sent to the 762 // server regardless of whether the field is empty or not. This may be 763 // used to include empty fields in Patch requests. 764 ForceSendFields []string `json:"-"` 765 766 // NullFields is a list of field names (e.g. "Proposals") to include in 767 // API requests with the JSON null value. By default, fields with empty 768 // values are omitted from API requests. However, any field with an 769 // empty value appearing in NullFields will be sent to the server as 770 // null. It is an error if a field in this list has a non-empty value. 771 // This may be used to include null fields in Patch requests. 772 NullFields []string `json:"-"` 773} 774 775func (s *CreateOrdersRequest) MarshalJSON() ([]byte, error) { 776 type NoMethod CreateOrdersRequest 777 raw := NoMethod(*s) 778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 779} 780 781type CreateOrdersResponse struct { 782 // Proposals: The list of proposals successfully created. 783 Proposals []*Proposal `json:"proposals,omitempty"` 784 785 // ServerResponse contains the HTTP response code and headers from the 786 // server. 787 googleapi.ServerResponse `json:"-"` 788 789 // ForceSendFields is a list of field names (e.g. "Proposals") to 790 // unconditionally include in API requests. By default, fields with 791 // empty values are omitted from API requests. However, any non-pointer, 792 // non-interface field appearing in ForceSendFields will be sent to the 793 // server regardless of whether the field is empty or not. This may be 794 // used to include empty fields in Patch requests. 795 ForceSendFields []string `json:"-"` 796 797 // NullFields is a list of field names (e.g. "Proposals") to include in 798 // API requests with the JSON null value. By default, fields with empty 799 // values are omitted from API requests. However, any field with an 800 // empty value appearing in NullFields will be sent to the server as 801 // null. It is an error if a field in this list has a non-empty value. 802 // This may be used to include null fields in Patch requests. 803 NullFields []string `json:"-"` 804} 805 806func (s *CreateOrdersResponse) MarshalJSON() ([]byte, error) { 807 type NoMethod CreateOrdersResponse 808 raw := NoMethod(*s) 809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 810} 811 812// Creative: A creative and its classification data. 813type Creative struct { 814 // HTMLSnippet: The HTML snippet that displays the ad when inserted in 815 // the web page. If set, videoURL, videoVastXML, and nativeAd should not 816 // be set. 817 HTMLSnippet string `json:"HTMLSnippet,omitempty"` 818 819 // AccountId: Account id. 820 AccountId int64 `json:"accountId,omitempty"` 821 822 // AdChoicesDestinationUrl: The link to the Ad Preferences page. This is 823 // only supported for native ads. 824 AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"` 825 826 AdTechnologyProviders *CreativeAdTechnologyProviders `json:"adTechnologyProviders,omitempty"` 827 828 // AdvertiserId: Detected advertiser id, if any. Read-only. This field 829 // should not be set in requests. 830 AdvertiserId googleapi.Int64s `json:"advertiserId,omitempty"` 831 832 // AdvertiserName: The name of the company being advertised in the 833 // creative. The value provided must exist in the advertisers.txt file. 834 AdvertiserName string `json:"advertiserName,omitempty"` 835 836 // AgencyId: The agency id for this creative. 837 AgencyId int64 `json:"agencyId,omitempty,string"` 838 839 // ApiUploadTimestamp: The last upload timestamp of this creative if it 840 // was uploaded via API. Read-only. The value of this field is 841 // generated, and will be ignored for uploads. (formatted RFC 3339 842 // timestamp). 843 ApiUploadTimestamp string `json:"apiUploadTimestamp,omitempty"` 844 845 // Attribute: List of buyer selectable attributes for the ads that may 846 // be shown from this snippet. Each attribute is represented by an 847 // integer as defined in buyer-declarable-creative-attributes.txt. 848 Attribute []int64 `json:"attribute,omitempty"` 849 850 // BuyerCreativeId: A buyer-specific id identifying the creative in this 851 // ad. 852 BuyerCreativeId string `json:"buyerCreativeId,omitempty"` 853 854 // ClickThroughUrl: The set of destination urls for the snippet. 855 ClickThroughUrl []string `json:"clickThroughUrl,omitempty"` 856 857 // Corrections: Shows any corrections that were applied to this 858 // creative. Read-only. This field should not be set in requests. 859 Corrections []*CreativeCorrections `json:"corrections,omitempty"` 860 861 // CreativeStatusIdentityType: Creative status identity type that the 862 // creative item applies to. Ad Exchange real-time bidding is migrating 863 // to the sizeless creative verification. Originally, Ad Exchange 864 // assigned creative verification status to a unique combination of a 865 // buyer creative ID and creative dimensions. Post-migration, a single 866 // verification status will be assigned at the buyer creative ID level. 867 // This field allows to distinguish whether a given creative status 868 // applies to a unique combination of a buyer creative ID and creative 869 // dimensions, or to a buyer creative ID as a whole. 870 CreativeStatusIdentityType string `json:"creativeStatusIdentityType,omitempty"` 871 872 // DealsStatus: Top-level deals status. Read-only. This field should not 873 // be set in requests. If disapproved, an entry for 874 // auctionType=DIRECT_DEALS (or ALL) in servingRestrictions will also 875 // exist. Note that this may be nuanced with other contextual 876 // restrictions, in which case it may be preferable to read from 877 // servingRestrictions directly. 878 DealsStatus string `json:"dealsStatus,omitempty"` 879 880 // DetectedDomains: Detected domains for this creative. Read-only. This 881 // field should not be set in requests. 882 DetectedDomains []string `json:"detectedDomains,omitempty"` 883 884 // FilteringReasons: The filtering reasons for the creative. Read-only. 885 // This field should not be set in requests. 886 FilteringReasons *CreativeFilteringReasons `json:"filteringReasons,omitempty"` 887 888 // Height: Ad height. 889 Height int64 `json:"height,omitempty"` 890 891 // ImpressionTrackingUrl: The set of urls to be called to record an 892 // impression. 893 ImpressionTrackingUrl []string `json:"impressionTrackingUrl,omitempty"` 894 895 // Kind: Resource type. 896 Kind string `json:"kind,omitempty"` 897 898 // Languages: Detected languages for this creative. Read-only. This 899 // field should not be set in requests. 900 Languages []string `json:"languages,omitempty"` 901 902 // NativeAd: If nativeAd is set, HTMLSnippet, videoVastXML, and the 903 // videoURL outside of nativeAd should not be set. (The videoURL inside 904 // nativeAd can be set.) 905 NativeAd *CreativeNativeAd `json:"nativeAd,omitempty"` 906 907 // OpenAuctionStatus: Top-level open auction status. Read-only. This 908 // field should not be set in requests. If disapproved, an entry for 909 // auctionType=OPEN_AUCTION (or ALL) in servingRestrictions will also 910 // exist. Note that this may be nuanced with other contextual 911 // restrictions, in which case it may be preferable to read from 912 // ServingRestrictions directly. 913 OpenAuctionStatus string `json:"openAuctionStatus,omitempty"` 914 915 // ProductCategories: Detected product categories, if any. Each category 916 // is represented by an integer as defined in 917 // ad-product-categories.txt. Read-only. This field should not be set in 918 // requests. 919 ProductCategories []int64 `json:"productCategories,omitempty"` 920 921 // RestrictedCategories: All restricted categories for the ads that may 922 // be shown from this snippet. Each category is represented by an 923 // integer as defined in the ad-restricted-categories.txt. 924 RestrictedCategories []int64 `json:"restrictedCategories,omitempty"` 925 926 // SensitiveCategories: Detected sensitive categories, if any. Each 927 // category is represented by an integer as defined in 928 // ad-sensitive-categories.txt. Read-only. This field should not be set 929 // in requests. 930 SensitiveCategories []int64 `json:"sensitiveCategories,omitempty"` 931 932 // ServingRestrictions: The granular status of this ad in specific 933 // contexts. A context here relates to where something ultimately serves 934 // (for example, a physical location, a platform, an HTTPS vs HTTP 935 // request, or the type of auction). Read-only. This field should not be 936 // set in requests. See the examples in the Creatives guide for more 937 // details. 938 ServingRestrictions []*CreativeServingRestrictions `json:"servingRestrictions,omitempty"` 939 940 // VendorType: List of vendor types for the ads that may be shown from 941 // this snippet. Each vendor type is represented by an integer as 942 // defined in vendors.txt. 943 VendorType []int64 `json:"vendorType,omitempty"` 944 945 // Version: The version for this creative. Read-only. This field should 946 // not be set in requests. 947 Version int64 `json:"version,omitempty"` 948 949 // VideoURL: The URL to fetch a video ad. If set, HTMLSnippet, 950 // videoVastXML, and nativeAd should not be set. Note, this is different 951 // from resource.native_ad.video_url above. 952 VideoURL string `json:"videoURL,omitempty"` 953 954 // VideoVastXML: The contents of a VAST document for a video ad. This 955 // document should conform to the VAST 2.0 or 3.0 standard. If set, 956 // HTMLSnippet, videoURL, and nativeAd and should not be set. 957 VideoVastXML string `json:"videoVastXML,omitempty"` 958 959 // Width: Ad width. 960 Width int64 `json:"width,omitempty"` 961 962 // ServerResponse contains the HTTP response code and headers from the 963 // server. 964 googleapi.ServerResponse `json:"-"` 965 966 // ForceSendFields is a list of field names (e.g. "HTMLSnippet") to 967 // unconditionally include in API requests. By default, fields with 968 // empty values are omitted from API requests. However, any non-pointer, 969 // non-interface field appearing in ForceSendFields will be sent to the 970 // server regardless of whether the field is empty or not. This may be 971 // used to include empty fields in Patch requests. 972 ForceSendFields []string `json:"-"` 973 974 // NullFields is a list of field names (e.g. "HTMLSnippet") to include 975 // in API requests with the JSON null value. By default, fields with 976 // empty values are omitted from API requests. However, any field with 977 // an empty value appearing in NullFields will be sent to the server as 978 // null. It is an error if a field in this list has a non-empty value. 979 // This may be used to include null fields in Patch requests. 980 NullFields []string `json:"-"` 981} 982 983func (s *Creative) MarshalJSON() ([]byte, error) { 984 type NoMethod Creative 985 raw := NoMethod(*s) 986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 987} 988 989type CreativeAdTechnologyProviders struct { 990 // DetectedProviderIds: The detected ad technology provider IDs for this 991 // creative. See 992 // https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for 993 // mapping of provider ID to provided name, a privacy policy URL, and a 994 // list of domains which can be attributed to the provider. If this 995 // creative contains provider IDs that are outside of those listed in 996 // the 997 // `BidRequest.adslot.consented_providers_settings.consented_providers` 998 // field on the Authorized Buyers Real-Time Bidding protocol or the 999 // `BidRequest.user.ext.consented_providers_settings.consented_providers` 1000 // field on the OpenRTB protocol, a bid submitted for a European 1001 // Economic Area (EEA) user with this creative is not compliant with the 1002 // GDPR policies as mentioned in the "Third-party Ad Technology Vendors" 1003 // section of Authorized Buyers Program Guidelines. 1004 DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"` 1005 1006 // HasUnidentifiedProvider: Whether the creative contains an 1007 // unidentified ad technology provider. If true, a bid submitted for a 1008 // European Economic Area (EEA) user with this creative is not compliant 1009 // with the GDPR policies as mentioned in the "Third-party Ad Technology 1010 // Vendors" section of Authorized Buyers Program Guidelines. 1011 HasUnidentifiedProvider bool `json:"hasUnidentifiedProvider,omitempty"` 1012 1013 // ForceSendFields is a list of field names (e.g. "DetectedProviderIds") 1014 // to unconditionally include in API requests. By default, fields with 1015 // empty values are omitted from API requests. However, any non-pointer, 1016 // non-interface field appearing in ForceSendFields will be sent to the 1017 // server regardless of whether the field is empty or not. This may be 1018 // used to include empty fields in Patch requests. 1019 ForceSendFields []string `json:"-"` 1020 1021 // NullFields is a list of field names (e.g. "DetectedProviderIds") to 1022 // include in API requests with the JSON null value. By default, fields 1023 // with empty values are omitted from API requests. However, any field 1024 // with an empty value appearing in NullFields will be sent to the 1025 // server as null. It is an error if a field in this list has a 1026 // non-empty value. This may be used to include null fields in Patch 1027 // requests. 1028 NullFields []string `json:"-"` 1029} 1030 1031func (s *CreativeAdTechnologyProviders) MarshalJSON() ([]byte, error) { 1032 type NoMethod CreativeAdTechnologyProviders 1033 raw := NoMethod(*s) 1034 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1035} 1036 1037type CreativeCorrections struct { 1038 // Contexts: All known serving contexts containing serving status 1039 // information. 1040 Contexts []*CreativeCorrectionsContexts `json:"contexts,omitempty"` 1041 1042 // Details: Additional details about the correction. 1043 Details []string `json:"details,omitempty"` 1044 1045 // Reason: The type of correction that was applied to the creative. 1046 Reason string `json:"reason,omitempty"` 1047 1048 // ForceSendFields is a list of field names (e.g. "Contexts") to 1049 // unconditionally include in API requests. By default, fields with 1050 // empty values are omitted from API requests. However, any non-pointer, 1051 // non-interface field appearing in ForceSendFields will be sent to the 1052 // server regardless of whether the field is empty or not. This may be 1053 // used to include empty fields in Patch requests. 1054 ForceSendFields []string `json:"-"` 1055 1056 // NullFields is a list of field names (e.g. "Contexts") to include in 1057 // API requests with the JSON null value. By default, fields with empty 1058 // values are omitted from API requests. However, any field with an 1059 // empty value appearing in NullFields will be sent to the server as 1060 // null. It is an error if a field in this list has a non-empty value. 1061 // This may be used to include null fields in Patch requests. 1062 NullFields []string `json:"-"` 1063} 1064 1065func (s *CreativeCorrections) MarshalJSON() ([]byte, error) { 1066 type NoMethod CreativeCorrections 1067 raw := NoMethod(*s) 1068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1069} 1070 1071type CreativeCorrectionsContexts struct { 1072 // AuctionType: Only set when contextType=AUCTION_TYPE. Represents the 1073 // auction types this correction applies to. 1074 AuctionType []string `json:"auctionType,omitempty"` 1075 1076 // ContextType: The type of context (e.g., location, platform, auction 1077 // type, SSL-ness). 1078 ContextType string `json:"contextType,omitempty"` 1079 1080 // GeoCriteriaId: Only set when contextType=LOCATION. Represents the geo 1081 // criterias this correction applies to. 1082 GeoCriteriaId []int64 `json:"geoCriteriaId,omitempty"` 1083 1084 // Platform: Only set when contextType=PLATFORM. Represents the 1085 // platforms this correction applies to. 1086 Platform []string `json:"platform,omitempty"` 1087 1088 // ForceSendFields is a list of field names (e.g. "AuctionType") to 1089 // unconditionally include in API requests. By default, fields with 1090 // empty values are omitted from API requests. However, any non-pointer, 1091 // non-interface field appearing in ForceSendFields will be sent to the 1092 // server regardless of whether the field is empty or not. This may be 1093 // used to include empty fields in Patch requests. 1094 ForceSendFields []string `json:"-"` 1095 1096 // NullFields is a list of field names (e.g. "AuctionType") to include 1097 // in API requests with the JSON null value. By default, fields with 1098 // empty values are omitted from API requests. However, any field with 1099 // an empty value appearing in NullFields will be sent to the server as 1100 // null. It is an error if a field in this list has a non-empty value. 1101 // This may be used to include null fields in Patch requests. 1102 NullFields []string `json:"-"` 1103} 1104 1105func (s *CreativeCorrectionsContexts) MarshalJSON() ([]byte, error) { 1106 type NoMethod CreativeCorrectionsContexts 1107 raw := NoMethod(*s) 1108 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1109} 1110 1111// CreativeFilteringReasons: The filtering reasons for the creative. 1112// Read-only. This field should not be set in requests. 1113type CreativeFilteringReasons struct { 1114 // Date: The date in ISO 8601 format for the data. The data is collected 1115 // from 00:00:00 to 23:59:59 in PST. 1116 Date string `json:"date,omitempty"` 1117 1118 // Reasons: The filtering reasons. 1119 Reasons []*CreativeFilteringReasonsReasons `json:"reasons,omitempty"` 1120 1121 // ForceSendFields is a list of field names (e.g. "Date") to 1122 // unconditionally include in API requests. By default, fields with 1123 // empty values are omitted from API requests. However, any non-pointer, 1124 // non-interface field appearing in ForceSendFields will be sent to the 1125 // server regardless of whether the field is empty or not. This may be 1126 // used to include empty fields in Patch requests. 1127 ForceSendFields []string `json:"-"` 1128 1129 // NullFields is a list of field names (e.g. "Date") to include in API 1130 // requests with the JSON null value. By default, fields with empty 1131 // values are omitted from API requests. However, any field with an 1132 // empty value appearing in NullFields will be sent to the server as 1133 // null. It is an error if a field in this list has a non-empty value. 1134 // This may be used to include null fields in Patch requests. 1135 NullFields []string `json:"-"` 1136} 1137 1138func (s *CreativeFilteringReasons) MarshalJSON() ([]byte, error) { 1139 type NoMethod CreativeFilteringReasons 1140 raw := NoMethod(*s) 1141 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1142} 1143 1144type CreativeFilteringReasonsReasons struct { 1145 // FilteringCount: The number of times the creative was filtered for the 1146 // status. The count is aggregated across all publishers on the 1147 // exchange. 1148 FilteringCount int64 `json:"filteringCount,omitempty,string"` 1149 1150 // FilteringStatus: The filtering status code as defined in 1151 // creative-status-codes.txt. 1152 FilteringStatus int64 `json:"filteringStatus,omitempty"` 1153 1154 // ForceSendFields is a list of field names (e.g. "FilteringCount") to 1155 // unconditionally include in API requests. By default, fields with 1156 // empty values are omitted from API requests. However, any non-pointer, 1157 // non-interface field appearing in ForceSendFields will be sent to the 1158 // server regardless of whether the field is empty or not. This may be 1159 // used to include empty fields in Patch requests. 1160 ForceSendFields []string `json:"-"` 1161 1162 // NullFields is a list of field names (e.g. "FilteringCount") to 1163 // include in API requests with the JSON null value. By default, fields 1164 // with empty values are omitted from API requests. However, any field 1165 // with an empty value appearing in NullFields will be sent to the 1166 // server as null. It is an error if a field in this list has a 1167 // non-empty value. This may be used to include null fields in Patch 1168 // requests. 1169 NullFields []string `json:"-"` 1170} 1171 1172func (s *CreativeFilteringReasonsReasons) MarshalJSON() ([]byte, error) { 1173 type NoMethod CreativeFilteringReasonsReasons 1174 raw := NoMethod(*s) 1175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1176} 1177 1178// CreativeNativeAd: If nativeAd is set, HTMLSnippet, videoVastXML, and 1179// the videoURL outside of nativeAd should not be set. (The videoURL 1180// inside nativeAd can be set.) 1181type CreativeNativeAd struct { 1182 Advertiser string `json:"advertiser,omitempty"` 1183 1184 // AppIcon: The app icon, for app download ads. 1185 AppIcon *CreativeNativeAdAppIcon `json:"appIcon,omitempty"` 1186 1187 // Body: A long description of the ad. 1188 Body string `json:"body,omitempty"` 1189 1190 // CallToAction: A label for the button that the user is supposed to 1191 // click. 1192 CallToAction string `json:"callToAction,omitempty"` 1193 1194 // ClickLinkUrl: The URL that the browser/SDK will load when the user 1195 // clicks the ad. 1196 ClickLinkUrl string `json:"clickLinkUrl,omitempty"` 1197 1198 // ClickTrackingUrl: The URL to use for click tracking. 1199 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"` 1200 1201 // Headline: A short title for the ad. 1202 Headline string `json:"headline,omitempty"` 1203 1204 // Image: A large image. 1205 Image *CreativeNativeAdImage `json:"image,omitempty"` 1206 1207 // ImpressionTrackingUrl: The URLs are called when the impression is 1208 // rendered. 1209 ImpressionTrackingUrl []string `json:"impressionTrackingUrl,omitempty"` 1210 1211 // Logo: A smaller image, for the advertiser logo. 1212 Logo *CreativeNativeAdLogo `json:"logo,omitempty"` 1213 1214 // Price: The price of the promoted app including the currency info. 1215 Price string `json:"price,omitempty"` 1216 1217 // StarRating: The app rating in the app store. Must be in the range 1218 // [0-5]. 1219 StarRating float64 `json:"starRating,omitempty"` 1220 1221 // VideoURL: The URL of the XML VAST for a native ad. Note this is a 1222 // separate field from resource.video_url. 1223 VideoURL string `json:"videoURL,omitempty"` 1224 1225 // ForceSendFields is a list of field names (e.g. "Advertiser") to 1226 // unconditionally include in API requests. By default, fields with 1227 // empty values are omitted from API requests. However, any non-pointer, 1228 // non-interface field appearing in ForceSendFields will be sent to the 1229 // server regardless of whether the field is empty or not. This may be 1230 // used to include empty fields in Patch requests. 1231 ForceSendFields []string `json:"-"` 1232 1233 // NullFields is a list of field names (e.g. "Advertiser") to include in 1234 // API requests with the JSON null value. By default, fields with empty 1235 // values are omitted from API requests. However, any field with an 1236 // empty value appearing in NullFields will be sent to the server as 1237 // null. It is an error if a field in this list has a non-empty value. 1238 // This may be used to include null fields in Patch requests. 1239 NullFields []string `json:"-"` 1240} 1241 1242func (s *CreativeNativeAd) MarshalJSON() ([]byte, error) { 1243 type NoMethod CreativeNativeAd 1244 raw := NoMethod(*s) 1245 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1246} 1247 1248func (s *CreativeNativeAd) UnmarshalJSON(data []byte) error { 1249 type NoMethod CreativeNativeAd 1250 var s1 struct { 1251 StarRating gensupport.JSONFloat64 `json:"starRating"` 1252 *NoMethod 1253 } 1254 s1.NoMethod = (*NoMethod)(s) 1255 if err := json.Unmarshal(data, &s1); err != nil { 1256 return err 1257 } 1258 s.StarRating = float64(s1.StarRating) 1259 return nil 1260} 1261 1262// CreativeNativeAdAppIcon: The app icon, for app download ads. 1263type CreativeNativeAdAppIcon struct { 1264 Height int64 `json:"height,omitempty"` 1265 1266 Url string `json:"url,omitempty"` 1267 1268 Width int64 `json:"width,omitempty"` 1269 1270 // ForceSendFields is a list of field names (e.g. "Height") to 1271 // unconditionally include in API requests. By default, fields with 1272 // empty values are omitted from API requests. However, any non-pointer, 1273 // non-interface field appearing in ForceSendFields will be sent to the 1274 // server regardless of whether the field is empty or not. This may be 1275 // used to include empty fields in Patch requests. 1276 ForceSendFields []string `json:"-"` 1277 1278 // NullFields is a list of field names (e.g. "Height") to include in API 1279 // requests with the JSON null value. By default, fields with empty 1280 // values are omitted from API requests. However, any field with an 1281 // empty value appearing in NullFields will be sent to the server as 1282 // null. It is an error if a field in this list has a non-empty value. 1283 // This may be used to include null fields in Patch requests. 1284 NullFields []string `json:"-"` 1285} 1286 1287func (s *CreativeNativeAdAppIcon) MarshalJSON() ([]byte, error) { 1288 type NoMethod CreativeNativeAdAppIcon 1289 raw := NoMethod(*s) 1290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1291} 1292 1293// CreativeNativeAdImage: A large image. 1294type CreativeNativeAdImage struct { 1295 Height int64 `json:"height,omitempty"` 1296 1297 Url string `json:"url,omitempty"` 1298 1299 Width int64 `json:"width,omitempty"` 1300 1301 // ForceSendFields is a list of field names (e.g. "Height") to 1302 // unconditionally include in API requests. By default, fields with 1303 // empty values are omitted from API requests. However, any non-pointer, 1304 // non-interface field appearing in ForceSendFields will be sent to the 1305 // server regardless of whether the field is empty or not. This may be 1306 // used to include empty fields in Patch requests. 1307 ForceSendFields []string `json:"-"` 1308 1309 // NullFields is a list of field names (e.g. "Height") to include in API 1310 // requests with the JSON null value. By default, fields with empty 1311 // values are omitted from API requests. However, any field with an 1312 // empty value appearing in NullFields will be sent to the server as 1313 // null. It is an error if a field in this list has a non-empty value. 1314 // This may be used to include null fields in Patch requests. 1315 NullFields []string `json:"-"` 1316} 1317 1318func (s *CreativeNativeAdImage) MarshalJSON() ([]byte, error) { 1319 type NoMethod CreativeNativeAdImage 1320 raw := NoMethod(*s) 1321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1322} 1323 1324// CreativeNativeAdLogo: A smaller image, for the advertiser logo. 1325type CreativeNativeAdLogo struct { 1326 Height int64 `json:"height,omitempty"` 1327 1328 Url string `json:"url,omitempty"` 1329 1330 Width int64 `json:"width,omitempty"` 1331 1332 // ForceSendFields is a list of field names (e.g. "Height") to 1333 // unconditionally include in API requests. By default, fields with 1334 // empty values are omitted from API requests. However, any non-pointer, 1335 // non-interface field appearing in ForceSendFields will be sent to the 1336 // server regardless of whether the field is empty or not. This may be 1337 // used to include empty fields in Patch requests. 1338 ForceSendFields []string `json:"-"` 1339 1340 // NullFields is a list of field names (e.g. "Height") to include in API 1341 // requests with the JSON null value. By default, fields with empty 1342 // values are omitted from API requests. However, any field with an 1343 // empty value appearing in NullFields will be sent to the server as 1344 // null. It is an error if a field in this list has a non-empty value. 1345 // This may be used to include null fields in Patch requests. 1346 NullFields []string `json:"-"` 1347} 1348 1349func (s *CreativeNativeAdLogo) MarshalJSON() ([]byte, error) { 1350 type NoMethod CreativeNativeAdLogo 1351 raw := NoMethod(*s) 1352 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1353} 1354 1355type CreativeServingRestrictions struct { 1356 // Contexts: All known contexts/restrictions. 1357 Contexts []*CreativeServingRestrictionsContexts `json:"contexts,omitempty"` 1358 1359 // DisapprovalReasons: The reasons for disapproval within this 1360 // restriction, if any. Note that not all disapproval reasons may be 1361 // categorized, so it is possible for the creative to have a status of 1362 // DISAPPROVED or CONDITIONALLY_APPROVED with an empty list for 1363 // disapproval_reasons. In this case, please reach out to your TAM to 1364 // help debug the issue. 1365 DisapprovalReasons []*CreativeServingRestrictionsDisapprovalReasons `json:"disapprovalReasons,omitempty"` 1366 1367 // Reason: Why the creative is ineligible to serve in this context 1368 // (e.g., it has been explicitly disapproved or is pending review). 1369 Reason string `json:"reason,omitempty"` 1370 1371 // ForceSendFields is a list of field names (e.g. "Contexts") to 1372 // unconditionally include in API requests. By default, fields with 1373 // empty values are omitted from API requests. However, any non-pointer, 1374 // non-interface field appearing in ForceSendFields will be sent to the 1375 // server regardless of whether the field is empty or not. This may be 1376 // used to include empty fields in Patch requests. 1377 ForceSendFields []string `json:"-"` 1378 1379 // NullFields is a list of field names (e.g. "Contexts") to include in 1380 // API requests with the JSON null value. By default, fields with empty 1381 // values are omitted from API requests. However, any field with an 1382 // empty value appearing in NullFields will be sent to the server as 1383 // null. It is an error if a field in this list has a non-empty value. 1384 // This may be used to include null fields in Patch requests. 1385 NullFields []string `json:"-"` 1386} 1387 1388func (s *CreativeServingRestrictions) MarshalJSON() ([]byte, error) { 1389 type NoMethod CreativeServingRestrictions 1390 raw := NoMethod(*s) 1391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1392} 1393 1394type CreativeServingRestrictionsContexts struct { 1395 // AuctionType: Only set when contextType=AUCTION_TYPE. Represents the 1396 // auction types this restriction applies to. 1397 AuctionType []string `json:"auctionType,omitempty"` 1398 1399 // ContextType: The type of context (e.g., location, platform, auction 1400 // type, SSL-ness). 1401 ContextType string `json:"contextType,omitempty"` 1402 1403 // GeoCriteriaId: Only set when contextType=LOCATION. Represents the geo 1404 // criterias this restriction applies to. Impressions are considered to 1405 // match a context if either the user location or publisher location 1406 // matches a given geoCriteriaId. 1407 GeoCriteriaId []int64 `json:"geoCriteriaId,omitempty"` 1408 1409 // Platform: Only set when contextType=PLATFORM. Represents the 1410 // platforms this restriction applies to. 1411 Platform []string `json:"platform,omitempty"` 1412 1413 // ForceSendFields is a list of field names (e.g. "AuctionType") to 1414 // unconditionally include in API requests. By default, fields with 1415 // empty values are omitted from API requests. However, any non-pointer, 1416 // non-interface field appearing in ForceSendFields will be sent to the 1417 // server regardless of whether the field is empty or not. This may be 1418 // used to include empty fields in Patch requests. 1419 ForceSendFields []string `json:"-"` 1420 1421 // NullFields is a list of field names (e.g. "AuctionType") to include 1422 // in API requests with the JSON null value. By default, fields with 1423 // empty values are omitted from API requests. However, any field with 1424 // an empty value appearing in NullFields will be sent to the server as 1425 // null. It is an error if a field in this list has a non-empty value. 1426 // This may be used to include null fields in Patch requests. 1427 NullFields []string `json:"-"` 1428} 1429 1430func (s *CreativeServingRestrictionsContexts) MarshalJSON() ([]byte, error) { 1431 type NoMethod CreativeServingRestrictionsContexts 1432 raw := NoMethod(*s) 1433 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1434} 1435 1436type CreativeServingRestrictionsDisapprovalReasons struct { 1437 // Details: Additional details about the reason for disapproval. 1438 Details []string `json:"details,omitempty"` 1439 1440 // Reason: The categorized reason for disapproval. 1441 Reason string `json:"reason,omitempty"` 1442 1443 // ForceSendFields is a list of field names (e.g. "Details") to 1444 // unconditionally include in API requests. By default, fields with 1445 // empty values are omitted from API requests. However, any non-pointer, 1446 // non-interface field appearing in ForceSendFields will be sent to the 1447 // server regardless of whether the field is empty or not. This may be 1448 // used to include empty fields in Patch requests. 1449 ForceSendFields []string `json:"-"` 1450 1451 // NullFields is a list of field names (e.g. "Details") to include in 1452 // API requests with the JSON null value. By default, fields with empty 1453 // values are omitted from API requests. However, any field with an 1454 // empty value appearing in NullFields will be sent to the server as 1455 // null. It is an error if a field in this list has a non-empty value. 1456 // This may be used to include null fields in Patch requests. 1457 NullFields []string `json:"-"` 1458} 1459 1460func (s *CreativeServingRestrictionsDisapprovalReasons) MarshalJSON() ([]byte, error) { 1461 type NoMethod CreativeServingRestrictionsDisapprovalReasons 1462 raw := NoMethod(*s) 1463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1464} 1465 1466// CreativeDealIds: The external deal ids associated with a creative. 1467type CreativeDealIds struct { 1468 // DealStatuses: A list of external deal ids and ARC approval status. 1469 DealStatuses []*CreativeDealIdsDealStatuses `json:"dealStatuses,omitempty"` 1470 1471 // Kind: Resource type. 1472 Kind string `json:"kind,omitempty"` 1473 1474 // ServerResponse contains the HTTP response code and headers from the 1475 // server. 1476 googleapi.ServerResponse `json:"-"` 1477 1478 // ForceSendFields is a list of field names (e.g. "DealStatuses") to 1479 // unconditionally include in API requests. By default, fields with 1480 // empty values are omitted from API requests. However, any non-pointer, 1481 // non-interface field appearing in ForceSendFields will be sent to the 1482 // server regardless of whether the field is empty or not. This may be 1483 // used to include empty fields in Patch requests. 1484 ForceSendFields []string `json:"-"` 1485 1486 // NullFields is a list of field names (e.g. "DealStatuses") to include 1487 // in API requests with the JSON null value. By default, fields with 1488 // empty values are omitted from API requests. However, any field with 1489 // an empty value appearing in NullFields will be sent to the server as 1490 // null. It is an error if a field in this list has a non-empty value. 1491 // This may be used to include null fields in Patch requests. 1492 NullFields []string `json:"-"` 1493} 1494 1495func (s *CreativeDealIds) MarshalJSON() ([]byte, error) { 1496 type NoMethod CreativeDealIds 1497 raw := NoMethod(*s) 1498 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1499} 1500 1501type CreativeDealIdsDealStatuses struct { 1502 // ArcStatus: ARC approval status. 1503 ArcStatus string `json:"arcStatus,omitempty"` 1504 1505 // DealId: External deal ID. 1506 DealId int64 `json:"dealId,omitempty,string"` 1507 1508 // WebPropertyId: Publisher ID. 1509 WebPropertyId int64 `json:"webPropertyId,omitempty"` 1510 1511 // ForceSendFields is a list of field names (e.g. "ArcStatus") to 1512 // unconditionally include in API requests. By default, fields with 1513 // empty values are omitted from API requests. However, any non-pointer, 1514 // non-interface field appearing in ForceSendFields will be sent to the 1515 // server regardless of whether the field is empty or not. This may be 1516 // used to include empty fields in Patch requests. 1517 ForceSendFields []string `json:"-"` 1518 1519 // NullFields is a list of field names (e.g. "ArcStatus") to include in 1520 // API requests with the JSON null value. By default, fields with empty 1521 // values are omitted from API requests. However, any field with an 1522 // empty value appearing in NullFields will be sent to the server as 1523 // null. It is an error if a field in this list has a non-empty value. 1524 // This may be used to include null fields in Patch requests. 1525 NullFields []string `json:"-"` 1526} 1527 1528func (s *CreativeDealIdsDealStatuses) MarshalJSON() ([]byte, error) { 1529 type NoMethod CreativeDealIdsDealStatuses 1530 raw := NoMethod(*s) 1531 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1532} 1533 1534// CreativesList: The creatives feed lists the active creatives for the 1535// Ad Exchange buyer accounts that the user has access to. Each entry in 1536// the feed corresponds to a single creative. 1537type CreativesList struct { 1538 // Items: A list of creatives. 1539 Items []*Creative `json:"items,omitempty"` 1540 1541 // Kind: Resource type. 1542 Kind string `json:"kind,omitempty"` 1543 1544 // NextPageToken: Continuation token used to page through creatives. To 1545 // retrieve the next page of results, set the next request's "pageToken" 1546 // value to this. 1547 NextPageToken string `json:"nextPageToken,omitempty"` 1548 1549 // ServerResponse contains the HTTP response code and headers from the 1550 // server. 1551 googleapi.ServerResponse `json:"-"` 1552 1553 // ForceSendFields is a list of field names (e.g. "Items") to 1554 // unconditionally include in API requests. By default, fields with 1555 // empty values are omitted from API requests. However, any non-pointer, 1556 // non-interface field appearing in ForceSendFields will be sent to the 1557 // server regardless of whether the field is empty or not. This may be 1558 // used to include empty fields in Patch requests. 1559 ForceSendFields []string `json:"-"` 1560 1561 // NullFields is a list of field names (e.g. "Items") to include in API 1562 // requests with the JSON null value. By default, fields with empty 1563 // values are omitted from API requests. However, any field with an 1564 // empty value appearing in NullFields will be sent to the server as 1565 // null. It is an error if a field in this list has a non-empty value. 1566 // This may be used to include null fields in Patch requests. 1567 NullFields []string `json:"-"` 1568} 1569 1570func (s *CreativesList) MarshalJSON() ([]byte, error) { 1571 type NoMethod CreativesList 1572 raw := NoMethod(*s) 1573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1574} 1575 1576type DealServingMetadata struct { 1577 // AlcoholAdsAllowed: True if alcohol ads are allowed for this deal 1578 // (read-only). This field is only populated when querying for finalized 1579 // orders using the method GetFinalizedOrderDeals 1580 AlcoholAdsAllowed bool `json:"alcoholAdsAllowed,omitempty"` 1581 1582 // DealPauseStatus: Tracks which parties (if any) have paused a deal. 1583 // (readonly, except via PauseResumeOrderDeals action) 1584 DealPauseStatus *DealServingMetadataDealPauseStatus `json:"dealPauseStatus,omitempty"` 1585 1586 // ForceSendFields is a list of field names (e.g. "AlcoholAdsAllowed") 1587 // to unconditionally include in API requests. By default, fields with 1588 // empty values are omitted from API requests. However, any non-pointer, 1589 // non-interface field appearing in ForceSendFields will be sent to the 1590 // server regardless of whether the field is empty or not. This may be 1591 // used to include empty fields in Patch requests. 1592 ForceSendFields []string `json:"-"` 1593 1594 // NullFields is a list of field names (e.g. "AlcoholAdsAllowed") to 1595 // include in API requests with the JSON null value. By default, fields 1596 // with empty values are omitted from API requests. However, any field 1597 // with an empty value appearing in NullFields will be sent to the 1598 // server as null. It is an error if a field in this list has a 1599 // non-empty value. This may be used to include null fields in Patch 1600 // requests. 1601 NullFields []string `json:"-"` 1602} 1603 1604func (s *DealServingMetadata) MarshalJSON() ([]byte, error) { 1605 type NoMethod DealServingMetadata 1606 raw := NoMethod(*s) 1607 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1608} 1609 1610// DealServingMetadataDealPauseStatus: Tracks which parties (if any) 1611// have paused a deal. The deal is considered paused if has_buyer_paused 1612// || has_seller_paused. Each of the has_buyer_paused or the 1613// has_seller_paused bits can be set independently. 1614type DealServingMetadataDealPauseStatus struct { 1615 BuyerPauseReason string `json:"buyerPauseReason,omitempty"` 1616 1617 // FirstPausedBy: If the deal is paused, records which party paused the 1618 // deal first. 1619 FirstPausedBy string `json:"firstPausedBy,omitempty"` 1620 1621 HasBuyerPaused bool `json:"hasBuyerPaused,omitempty"` 1622 1623 HasSellerPaused bool `json:"hasSellerPaused,omitempty"` 1624 1625 SellerPauseReason string `json:"sellerPauseReason,omitempty"` 1626 1627 // ForceSendFields is a list of field names (e.g. "BuyerPauseReason") to 1628 // unconditionally include in API requests. By default, fields with 1629 // empty values are omitted from API requests. However, any non-pointer, 1630 // non-interface field appearing in ForceSendFields will be sent to the 1631 // server regardless of whether the field is empty or not. This may be 1632 // used to include empty fields in Patch requests. 1633 ForceSendFields []string `json:"-"` 1634 1635 // NullFields is a list of field names (e.g. "BuyerPauseReason") to 1636 // include in API requests with the JSON null value. By default, fields 1637 // with empty values are omitted from API requests. However, any field 1638 // with an empty value appearing in NullFields will be sent to the 1639 // server as null. It is an error if a field in this list has a 1640 // non-empty value. This may be used to include null fields in Patch 1641 // requests. 1642 NullFields []string `json:"-"` 1643} 1644 1645func (s *DealServingMetadataDealPauseStatus) MarshalJSON() ([]byte, error) { 1646 type NoMethod DealServingMetadataDealPauseStatus 1647 raw := NoMethod(*s) 1648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1649} 1650 1651type DealTerms struct { 1652 // BrandingType: Visibility of the URL in bid requests. 1653 BrandingType string `json:"brandingType,omitempty"` 1654 1655 // CrossListedExternalDealIdType: Indicates that this ExternalDealId 1656 // exists under at least two different AdxInventoryDeals. Currently, the 1657 // only case that the same ExternalDealId will exist is programmatic 1658 // cross sell case. 1659 CrossListedExternalDealIdType string `json:"crossListedExternalDealIdType,omitempty"` 1660 1661 // Description: Description for the proposed terms of the deal. 1662 Description string `json:"description,omitempty"` 1663 1664 // EstimatedGrossSpend: Non-binding estimate of the estimated gross 1665 // spend for this deal Can be set by buyer or seller. 1666 EstimatedGrossSpend *Price `json:"estimatedGrossSpend,omitempty"` 1667 1668 // EstimatedImpressionsPerDay: Non-binding estimate of the impressions 1669 // served per day Can be set by buyer or seller. 1670 EstimatedImpressionsPerDay int64 `json:"estimatedImpressionsPerDay,omitempty,string"` 1671 1672 // GuaranteedFixedPriceTerms: The terms for guaranteed fixed price 1673 // deals. 1674 GuaranteedFixedPriceTerms *DealTermsGuaranteedFixedPriceTerms `json:"guaranteedFixedPriceTerms,omitempty"` 1675 1676 // NonGuaranteedAuctionTerms: The terms for non-guaranteed auction 1677 // deals. 1678 NonGuaranteedAuctionTerms *DealTermsNonGuaranteedAuctionTerms `json:"nonGuaranteedAuctionTerms,omitempty"` 1679 1680 // NonGuaranteedFixedPriceTerms: The terms for non-guaranteed fixed 1681 // price deals. 1682 NonGuaranteedFixedPriceTerms *DealTermsNonGuaranteedFixedPriceTerms `json:"nonGuaranteedFixedPriceTerms,omitempty"` 1683 1684 // RubiconNonGuaranteedTerms: The terms for rubicon non-guaranteed 1685 // deals. 1686 RubiconNonGuaranteedTerms *DealTermsRubiconNonGuaranteedTerms `json:"rubiconNonGuaranteedTerms,omitempty"` 1687 1688 // SellerTimeZone: For deals with Cost Per Day billing, defines the 1689 // timezone used to mark the boundaries of a day (buyer-readonly) 1690 SellerTimeZone string `json:"sellerTimeZone,omitempty"` 1691 1692 // ForceSendFields is a list of field names (e.g. "BrandingType") to 1693 // unconditionally include in API requests. By default, fields with 1694 // empty values are omitted from API requests. However, any non-pointer, 1695 // non-interface field appearing in ForceSendFields will be sent to the 1696 // server regardless of whether the field is empty or not. This may be 1697 // used to include empty fields in Patch requests. 1698 ForceSendFields []string `json:"-"` 1699 1700 // NullFields is a list of field names (e.g. "BrandingType") to include 1701 // in API requests with the JSON null value. By default, fields with 1702 // empty values are omitted from API requests. However, any field with 1703 // an empty value appearing in NullFields will be sent to the server as 1704 // null. It is an error if a field in this list has a non-empty value. 1705 // This may be used to include null fields in Patch requests. 1706 NullFields []string `json:"-"` 1707} 1708 1709func (s *DealTerms) MarshalJSON() ([]byte, error) { 1710 type NoMethod DealTerms 1711 raw := NoMethod(*s) 1712 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1713} 1714 1715type DealTermsGuaranteedFixedPriceTerms struct { 1716 // BillingInfo: External billing info for this Deal. This field is 1717 // relevant when external billing info such as price has a different 1718 // currency code than DFP/AdX. 1719 BillingInfo *DealTermsGuaranteedFixedPriceTermsBillingInfo `json:"billingInfo,omitempty"` 1720 1721 // FixedPrices: Fixed price for the specified buyer. 1722 FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"` 1723 1724 // GuaranteedImpressions: Guaranteed impressions as a percentage. This 1725 // is the percentage of guaranteed looks that the buyer is guaranteeing 1726 // to buy. 1727 GuaranteedImpressions int64 `json:"guaranteedImpressions,omitempty,string"` 1728 1729 // GuaranteedLooks: Count of guaranteed looks. Required for deal, 1730 // optional for product. For CPD deals, buyer changes to 1731 // guaranteed_looks will be ignored. 1732 GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"` 1733 1734 // MinimumDailyLooks: Count of minimum daily looks for a CPD deal. For 1735 // CPD deals, buyer should negotiate on this field instead of 1736 // guaranteed_looks. 1737 MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"` 1738 1739 // ForceSendFields is a list of field names (e.g. "BillingInfo") to 1740 // unconditionally include in API requests. By default, fields with 1741 // empty values are omitted from API requests. However, any non-pointer, 1742 // non-interface field appearing in ForceSendFields will be sent to the 1743 // server regardless of whether the field is empty or not. This may be 1744 // used to include empty fields in Patch requests. 1745 ForceSendFields []string `json:"-"` 1746 1747 // NullFields is a list of field names (e.g. "BillingInfo") to include 1748 // in API requests with the JSON null value. By default, fields with 1749 // empty values are omitted from API requests. However, any field with 1750 // an empty value appearing in NullFields will be sent to the server as 1751 // null. It is an error if a field in this list has a non-empty value. 1752 // This may be used to include null fields in Patch requests. 1753 NullFields []string `json:"-"` 1754} 1755 1756func (s *DealTermsGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) { 1757 type NoMethod DealTermsGuaranteedFixedPriceTerms 1758 raw := NoMethod(*s) 1759 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1760} 1761 1762type DealTermsGuaranteedFixedPriceTermsBillingInfo struct { 1763 // CurrencyConversionTimeMs: The timestamp (in ms since epoch) when the 1764 // original reservation price for the deal was first converted to DFP 1765 // currency. This is used to convert the contracted price into buyer's 1766 // currency without discrepancy. 1767 CurrencyConversionTimeMs int64 `json:"currencyConversionTimeMs,omitempty,string"` 1768 1769 // DfpLineItemId: The DFP line item id associated with this deal. For 1770 // features like CPD, buyers can retrieve the DFP line item for billing 1771 // reconciliation. 1772 DfpLineItemId int64 `json:"dfpLineItemId,omitempty,string"` 1773 1774 // OriginalContractedQuantity: The original contracted quantity (# 1775 // impressions) for this deal. To ensure delivery, sometimes the 1776 // publisher will book the deal with a impression buffer, such that 1777 // guaranteed_looks is greater than the contracted quantity. However 1778 // clients are billed using the original contracted quantity. 1779 OriginalContractedQuantity int64 `json:"originalContractedQuantity,omitempty,string"` 1780 1781 // Price: The original reservation price for the deal, if the currency 1782 // code is different from the one used in negotiation. 1783 Price *Price `json:"price,omitempty"` 1784 1785 // ForceSendFields is a list of field names (e.g. 1786 // "CurrencyConversionTimeMs") to unconditionally include in API 1787 // requests. By default, fields with empty values are omitted from API 1788 // requests. However, any non-pointer, non-interface field appearing in 1789 // ForceSendFields will be sent to the server regardless of whether the 1790 // field is empty or not. This may be used to include empty fields in 1791 // Patch requests. 1792 ForceSendFields []string `json:"-"` 1793 1794 // NullFields is a list of field names (e.g. "CurrencyConversionTimeMs") 1795 // to include in API requests with the JSON null value. By default, 1796 // fields with empty values are omitted from API requests. However, any 1797 // field with an empty value appearing in NullFields will be sent to the 1798 // server as null. It is an error if a field in this list has a 1799 // non-empty value. This may be used to include null fields in Patch 1800 // requests. 1801 NullFields []string `json:"-"` 1802} 1803 1804func (s *DealTermsGuaranteedFixedPriceTermsBillingInfo) MarshalJSON() ([]byte, error) { 1805 type NoMethod DealTermsGuaranteedFixedPriceTermsBillingInfo 1806 raw := NoMethod(*s) 1807 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1808} 1809 1810type DealTermsNonGuaranteedAuctionTerms struct { 1811 // AutoOptimizePrivateAuction: True if open auction buyers are allowed 1812 // to compete with invited buyers in this private auction 1813 // (buyer-readonly). 1814 AutoOptimizePrivateAuction bool `json:"autoOptimizePrivateAuction,omitempty"` 1815 1816 // ReservePricePerBuyers: Reserve price for the specified buyer. 1817 ReservePricePerBuyers []*PricePerBuyer `json:"reservePricePerBuyers,omitempty"` 1818 1819 // ForceSendFields is a list of field names (e.g. 1820 // "AutoOptimizePrivateAuction") to unconditionally include in API 1821 // requests. By default, fields with empty values are omitted from API 1822 // requests. However, any non-pointer, non-interface field appearing in 1823 // ForceSendFields will be sent to the server regardless of whether the 1824 // field is empty or not. This may be used to include empty fields in 1825 // Patch requests. 1826 ForceSendFields []string `json:"-"` 1827 1828 // NullFields is a list of field names (e.g. 1829 // "AutoOptimizePrivateAuction") to include in API requests with the 1830 // JSON null value. By default, fields with empty values are omitted 1831 // from API requests. However, any field with an empty value appearing 1832 // in NullFields will be sent to the server as null. It is an error if a 1833 // field in this list has a non-empty value. This may be used to include 1834 // null fields in Patch requests. 1835 NullFields []string `json:"-"` 1836} 1837 1838func (s *DealTermsNonGuaranteedAuctionTerms) MarshalJSON() ([]byte, error) { 1839 type NoMethod DealTermsNonGuaranteedAuctionTerms 1840 raw := NoMethod(*s) 1841 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1842} 1843 1844type DealTermsNonGuaranteedFixedPriceTerms struct { 1845 // FixedPrices: Fixed price for the specified buyer. 1846 FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"` 1847 1848 // ForceSendFields is a list of field names (e.g. "FixedPrices") to 1849 // unconditionally include in API requests. By default, fields with 1850 // empty values are omitted from API requests. However, any non-pointer, 1851 // non-interface field appearing in ForceSendFields will be sent to the 1852 // server regardless of whether the field is empty or not. This may be 1853 // used to include empty fields in Patch requests. 1854 ForceSendFields []string `json:"-"` 1855 1856 // NullFields is a list of field names (e.g. "FixedPrices") to include 1857 // in API requests with the JSON null value. By default, fields with 1858 // empty values are omitted from API requests. However, any field with 1859 // an empty value appearing in NullFields will be sent to the server as 1860 // null. It is an error if a field in this list has a non-empty value. 1861 // This may be used to include null fields in Patch requests. 1862 NullFields []string `json:"-"` 1863} 1864 1865func (s *DealTermsNonGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) { 1866 type NoMethod DealTermsNonGuaranteedFixedPriceTerms 1867 raw := NoMethod(*s) 1868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1869} 1870 1871type DealTermsRubiconNonGuaranteedTerms struct { 1872 // PriorityPrice: Optional price for Rubicon priority access in the 1873 // auction. 1874 PriorityPrice *Price `json:"priorityPrice,omitempty"` 1875 1876 // StandardPrice: Optional price for Rubicon standard access in the 1877 // auction. 1878 StandardPrice *Price `json:"standardPrice,omitempty"` 1879 1880 // ForceSendFields is a list of field names (e.g. "PriorityPrice") to 1881 // unconditionally include in API requests. By default, fields with 1882 // empty values are omitted from API requests. However, any non-pointer, 1883 // non-interface field appearing in ForceSendFields will be sent to the 1884 // server regardless of whether the field is empty or not. This may be 1885 // used to include empty fields in Patch requests. 1886 ForceSendFields []string `json:"-"` 1887 1888 // NullFields is a list of field names (e.g. "PriorityPrice") to include 1889 // in API requests with the JSON null value. By default, fields with 1890 // empty values are omitted from API requests. However, any field with 1891 // an empty value appearing in NullFields will be sent to the server as 1892 // null. It is an error if a field in this list has a non-empty value. 1893 // This may be used to include null fields in Patch requests. 1894 NullFields []string `json:"-"` 1895} 1896 1897func (s *DealTermsRubiconNonGuaranteedTerms) MarshalJSON() ([]byte, error) { 1898 type NoMethod DealTermsRubiconNonGuaranteedTerms 1899 raw := NoMethod(*s) 1900 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1901} 1902 1903type DeleteOrderDealsRequest struct { 1904 // DealIds: List of deals to delete for a given proposal 1905 DealIds []string `json:"dealIds,omitempty"` 1906 1907 // ProposalRevisionNumber: The last known proposal revision number. 1908 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 1909 1910 // UpdateAction: Indicates an optional action to take on the proposal 1911 UpdateAction string `json:"updateAction,omitempty"` 1912 1913 // ForceSendFields is a list of field names (e.g. "DealIds") to 1914 // unconditionally include in API requests. By default, fields with 1915 // empty values are omitted from API requests. However, any non-pointer, 1916 // non-interface field appearing in ForceSendFields will be sent to the 1917 // server regardless of whether the field is empty or not. This may be 1918 // used to include empty fields in Patch requests. 1919 ForceSendFields []string `json:"-"` 1920 1921 // NullFields is a list of field names (e.g. "DealIds") to include in 1922 // API requests with the JSON null value. By default, fields with empty 1923 // values are omitted from API requests. However, any field with an 1924 // empty value appearing in NullFields will be sent to the server as 1925 // null. It is an error if a field in this list has a non-empty value. 1926 // This may be used to include null fields in Patch requests. 1927 NullFields []string `json:"-"` 1928} 1929 1930func (s *DeleteOrderDealsRequest) MarshalJSON() ([]byte, error) { 1931 type NoMethod DeleteOrderDealsRequest 1932 raw := NoMethod(*s) 1933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1934} 1935 1936type DeleteOrderDealsResponse struct { 1937 // Deals: List of deals deleted (in the same proposal as passed in the 1938 // request) 1939 Deals []*MarketplaceDeal `json:"deals,omitempty"` 1940 1941 // ProposalRevisionNumber: The updated revision number for the proposal. 1942 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 1943 1944 // ServerResponse contains the HTTP response code and headers from the 1945 // server. 1946 googleapi.ServerResponse `json:"-"` 1947 1948 // ForceSendFields is a list of field names (e.g. "Deals") to 1949 // unconditionally include in API requests. By default, fields with 1950 // empty values are omitted from API requests. However, any non-pointer, 1951 // non-interface field appearing in ForceSendFields will be sent to the 1952 // server regardless of whether the field is empty or not. This may be 1953 // used to include empty fields in Patch requests. 1954 ForceSendFields []string `json:"-"` 1955 1956 // NullFields is a list of field names (e.g. "Deals") to include in API 1957 // requests with the JSON null value. By default, fields with empty 1958 // values are omitted from API requests. However, any field with an 1959 // empty value appearing in NullFields will be sent to the server as 1960 // null. It is an error if a field in this list has a non-empty value. 1961 // This may be used to include null fields in Patch requests. 1962 NullFields []string `json:"-"` 1963} 1964 1965func (s *DeleteOrderDealsResponse) MarshalJSON() ([]byte, error) { 1966 type NoMethod DeleteOrderDealsResponse 1967 raw := NoMethod(*s) 1968 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1969} 1970 1971type DeliveryControl struct { 1972 CreativeBlockingLevel string `json:"creativeBlockingLevel,omitempty"` 1973 1974 DeliveryRateType string `json:"deliveryRateType,omitempty"` 1975 1976 FrequencyCaps []*DeliveryControlFrequencyCap `json:"frequencyCaps,omitempty"` 1977 1978 // ForceSendFields is a list of field names (e.g. 1979 // "CreativeBlockingLevel") to unconditionally include in API requests. 1980 // By default, fields with empty values are omitted from API requests. 1981 // However, any non-pointer, non-interface field appearing in 1982 // ForceSendFields will be sent to the server regardless of whether the 1983 // field is empty or not. This may be used to include empty fields in 1984 // Patch requests. 1985 ForceSendFields []string `json:"-"` 1986 1987 // NullFields is a list of field names (e.g. "CreativeBlockingLevel") to 1988 // include in API requests with the JSON null value. By default, fields 1989 // with empty values are omitted from API requests. However, any field 1990 // with an empty value appearing in NullFields will be sent to the 1991 // server as null. It is an error if a field in this list has a 1992 // non-empty value. This may be used to include null fields in Patch 1993 // requests. 1994 NullFields []string `json:"-"` 1995} 1996 1997func (s *DeliveryControl) MarshalJSON() ([]byte, error) { 1998 type NoMethod DeliveryControl 1999 raw := NoMethod(*s) 2000 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2001} 2002 2003type DeliveryControlFrequencyCap struct { 2004 MaxImpressions int64 `json:"maxImpressions,omitempty"` 2005 2006 NumTimeUnits int64 `json:"numTimeUnits,omitempty"` 2007 2008 TimeUnitType string `json:"timeUnitType,omitempty"` 2009 2010 // ForceSendFields is a list of field names (e.g. "MaxImpressions") to 2011 // unconditionally include in API requests. By default, fields with 2012 // empty values are omitted from API requests. However, any non-pointer, 2013 // non-interface field appearing in ForceSendFields will be sent to the 2014 // server regardless of whether the field is empty or not. This may be 2015 // used to include empty fields in Patch requests. 2016 ForceSendFields []string `json:"-"` 2017 2018 // NullFields is a list of field names (e.g. "MaxImpressions") to 2019 // include in API requests with the JSON null value. By default, fields 2020 // with empty values are omitted from API requests. However, any field 2021 // with an empty value appearing in NullFields will be sent to the 2022 // server as null. It is an error if a field in this list has a 2023 // non-empty value. This may be used to include null fields in Patch 2024 // requests. 2025 NullFields []string `json:"-"` 2026} 2027 2028func (s *DeliveryControlFrequencyCap) MarshalJSON() ([]byte, error) { 2029 type NoMethod DeliveryControlFrequencyCap 2030 raw := NoMethod(*s) 2031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2032} 2033 2034// Dimension: This message carries publisher provided breakdown. E.g. 2035// {dimension_type: 'COUNTRY', [{dimension_value: {id: 1, name: 'US'}}, 2036// {dimension_value: {id: 2, name: 'UK'}}]} 2037type Dimension struct { 2038 DimensionType string `json:"dimensionType,omitempty"` 2039 2040 DimensionValues []*DimensionDimensionValue `json:"dimensionValues,omitempty"` 2041 2042 // ForceSendFields is a list of field names (e.g. "DimensionType") to 2043 // unconditionally include in API requests. By default, fields with 2044 // empty values are omitted from API requests. However, any non-pointer, 2045 // non-interface field appearing in ForceSendFields will be sent to the 2046 // server regardless of whether the field is empty or not. This may be 2047 // used to include empty fields in Patch requests. 2048 ForceSendFields []string `json:"-"` 2049 2050 // NullFields is a list of field names (e.g. "DimensionType") to include 2051 // in API requests with the JSON null value. By default, fields with 2052 // empty values are omitted from API requests. However, any field with 2053 // an empty value appearing in NullFields will be sent to the server as 2054 // null. It is an error if a field in this list has a non-empty value. 2055 // This may be used to include null fields in Patch requests. 2056 NullFields []string `json:"-"` 2057} 2058 2059func (s *Dimension) MarshalJSON() ([]byte, error) { 2060 type NoMethod Dimension 2061 raw := NoMethod(*s) 2062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2063} 2064 2065// DimensionDimensionValue: Value of the dimension. 2066type DimensionDimensionValue struct { 2067 // Id: Id of the dimension. 2068 Id int64 `json:"id,omitempty"` 2069 2070 // Name: Name of the dimension mainly for debugging purposes, except for 2071 // the case of CREATIVE_SIZE. For CREATIVE_SIZE, strings are used 2072 // instead of ids. 2073 Name string `json:"name,omitempty"` 2074 2075 // Percentage: Percent of total impressions for a dimension type. e.g. 2076 // {dimension_type: 'GENDER', [{dimension_value: {id: 1, name: 'MALE', 2077 // percentage: 60}}]} Gender MALE is 60% of all impressions which have 2078 // gender. 2079 Percentage int64 `json:"percentage,omitempty"` 2080 2081 // ForceSendFields is a list of field names (e.g. "Id") to 2082 // unconditionally include in API requests. By default, fields with 2083 // empty values are omitted from API requests. However, any non-pointer, 2084 // non-interface field appearing in ForceSendFields will be sent to the 2085 // server regardless of whether the field is empty or not. This may be 2086 // used to include empty fields in Patch requests. 2087 ForceSendFields []string `json:"-"` 2088 2089 // NullFields is a list of field names (e.g. "Id") to include in API 2090 // requests with the JSON null value. By default, fields with empty 2091 // values are omitted from API requests. However, any field with an 2092 // empty value appearing in NullFields will be sent to the server as 2093 // null. It is an error if a field in this list has a non-empty value. 2094 // This may be used to include null fields in Patch requests. 2095 NullFields []string `json:"-"` 2096} 2097 2098func (s *DimensionDimensionValue) MarshalJSON() ([]byte, error) { 2099 type NoMethod DimensionDimensionValue 2100 raw := NoMethod(*s) 2101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2102} 2103 2104type EditAllOrderDealsRequest struct { 2105 // Deals: List of deals to edit. Service may perform 3 different 2106 // operations based on comparison of deals in this list vs deals already 2107 // persisted in database: 1. Add new deal to proposal If a deal in this 2108 // list does not exist in the proposal, the service will create a new 2109 // deal and add it to the proposal. Validation will follow 2110 // AddOrderDealsRequest. 2. Update existing deal in the proposal If a 2111 // deal in this list already exist in the proposal, the service will 2112 // update that existing deal to this new deal in the request. Validation 2113 // will follow UpdateOrderDealsRequest. 3. Delete deals from the 2114 // proposal (just need the id) If a existing deal in the proposal is not 2115 // present in this list, the service will delete that deal from the 2116 // proposal. Validation will follow DeleteOrderDealsRequest. 2117 Deals []*MarketplaceDeal `json:"deals,omitempty"` 2118 2119 // Proposal: If specified, also updates the proposal in the batch 2120 // transaction. This is useful when the proposal and the deals need to 2121 // be updated in one transaction. 2122 Proposal *Proposal `json:"proposal,omitempty"` 2123 2124 // ProposalRevisionNumber: The last known revision number for the 2125 // proposal. 2126 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 2127 2128 // UpdateAction: Indicates an optional action to take on the proposal 2129 UpdateAction string `json:"updateAction,omitempty"` 2130 2131 // ForceSendFields is a list of field names (e.g. "Deals") to 2132 // unconditionally include in API requests. By default, fields with 2133 // empty values are omitted from API requests. However, any non-pointer, 2134 // non-interface field appearing in ForceSendFields will be sent to the 2135 // server regardless of whether the field is empty or not. This may be 2136 // used to include empty fields in Patch requests. 2137 ForceSendFields []string `json:"-"` 2138 2139 // NullFields is a list of field names (e.g. "Deals") to include in API 2140 // requests with the JSON null value. By default, fields with empty 2141 // values are omitted from API requests. However, any field with an 2142 // empty value appearing in NullFields will be sent to the server as 2143 // null. It is an error if a field in this list has a non-empty value. 2144 // This may be used to include null fields in Patch requests. 2145 NullFields []string `json:"-"` 2146} 2147 2148func (s *EditAllOrderDealsRequest) MarshalJSON() ([]byte, error) { 2149 type NoMethod EditAllOrderDealsRequest 2150 raw := NoMethod(*s) 2151 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2152} 2153 2154type EditAllOrderDealsResponse struct { 2155 // Deals: List of all deals in the proposal after edit. 2156 Deals []*MarketplaceDeal `json:"deals,omitempty"` 2157 2158 // OrderRevisionNumber: The latest revision number after the update has 2159 // been applied. 2160 OrderRevisionNumber int64 `json:"orderRevisionNumber,omitempty,string"` 2161 2162 // ServerResponse contains the HTTP response code and headers from the 2163 // server. 2164 googleapi.ServerResponse `json:"-"` 2165 2166 // ForceSendFields is a list of field names (e.g. "Deals") to 2167 // unconditionally include in API requests. By default, fields with 2168 // empty values are omitted from API requests. However, any non-pointer, 2169 // non-interface field appearing in ForceSendFields will be sent to the 2170 // server regardless of whether the field is empty or not. This may be 2171 // used to include empty fields in Patch requests. 2172 ForceSendFields []string `json:"-"` 2173 2174 // NullFields is a list of field names (e.g. "Deals") to include in API 2175 // requests with the JSON null value. By default, fields with empty 2176 // values are omitted from API requests. However, any field with an 2177 // empty value appearing in NullFields will be sent to the server as 2178 // null. It is an error if a field in this list has a non-empty value. 2179 // This may be used to include null fields in Patch requests. 2180 NullFields []string `json:"-"` 2181} 2182 2183func (s *EditAllOrderDealsResponse) MarshalJSON() ([]byte, error) { 2184 type NoMethod EditAllOrderDealsResponse 2185 raw := NoMethod(*s) 2186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2187} 2188 2189type GetOffersResponse struct { 2190 // Products: The returned list of products. 2191 Products []*Product `json:"products,omitempty"` 2192 2193 // ServerResponse contains the HTTP response code and headers from the 2194 // server. 2195 googleapi.ServerResponse `json:"-"` 2196 2197 // ForceSendFields is a list of field names (e.g. "Products") to 2198 // unconditionally include in API requests. By default, fields with 2199 // empty values are omitted from API requests. However, any non-pointer, 2200 // non-interface field appearing in ForceSendFields will be sent to the 2201 // server regardless of whether the field is empty or not. This may be 2202 // used to include empty fields in Patch requests. 2203 ForceSendFields []string `json:"-"` 2204 2205 // NullFields is a list of field names (e.g. "Products") to include in 2206 // API requests with the JSON null value. By default, fields with empty 2207 // values are omitted from API requests. However, any field with an 2208 // empty value appearing in NullFields will be sent to the server as 2209 // null. It is an error if a field in this list has a non-empty value. 2210 // This may be used to include null fields in Patch requests. 2211 NullFields []string `json:"-"` 2212} 2213 2214func (s *GetOffersResponse) MarshalJSON() ([]byte, error) { 2215 type NoMethod GetOffersResponse 2216 raw := NoMethod(*s) 2217 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2218} 2219 2220type GetOrderDealsResponse struct { 2221 // Deals: List of deals for the proposal 2222 Deals []*MarketplaceDeal `json:"deals,omitempty"` 2223 2224 // ServerResponse contains the HTTP response code and headers from the 2225 // server. 2226 googleapi.ServerResponse `json:"-"` 2227 2228 // ForceSendFields is a list of field names (e.g. "Deals") to 2229 // unconditionally include in API requests. By default, fields with 2230 // empty values are omitted from API requests. However, any non-pointer, 2231 // non-interface field appearing in ForceSendFields will be sent to the 2232 // server regardless of whether the field is empty or not. This may be 2233 // used to include empty fields in Patch requests. 2234 ForceSendFields []string `json:"-"` 2235 2236 // NullFields is a list of field names (e.g. "Deals") to include in API 2237 // requests with the JSON null value. By default, fields with empty 2238 // values are omitted from API requests. However, any field with an 2239 // empty value appearing in NullFields will be sent to the server as 2240 // null. It is an error if a field in this list has a non-empty value. 2241 // This may be used to include null fields in Patch requests. 2242 NullFields []string `json:"-"` 2243} 2244 2245func (s *GetOrderDealsResponse) MarshalJSON() ([]byte, error) { 2246 type NoMethod GetOrderDealsResponse 2247 raw := NoMethod(*s) 2248 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2249} 2250 2251type GetOrderNotesResponse struct { 2252 // Notes: The list of matching notes. The notes for a proposal are 2253 // ordered from oldest to newest. If the notes span multiple proposals, 2254 // they will be grouped by proposal, with the notes for the most 2255 // recently modified proposal appearing first. 2256 Notes []*MarketplaceNote `json:"notes,omitempty"` 2257 2258 // ServerResponse contains the HTTP response code and headers from the 2259 // server. 2260 googleapi.ServerResponse `json:"-"` 2261 2262 // ForceSendFields is a list of field names (e.g. "Notes") to 2263 // unconditionally include in API requests. By default, fields with 2264 // empty values are omitted from API requests. However, any non-pointer, 2265 // non-interface field appearing in ForceSendFields will be sent to the 2266 // server regardless of whether the field is empty or not. This may be 2267 // used to include empty fields in Patch requests. 2268 ForceSendFields []string `json:"-"` 2269 2270 // NullFields is a list of field names (e.g. "Notes") to include in API 2271 // requests with the JSON null value. By default, fields with empty 2272 // values are omitted from API requests. However, any field with an 2273 // empty value appearing in NullFields will be sent to the server as 2274 // null. It is an error if a field in this list has a non-empty value. 2275 // This may be used to include null fields in Patch requests. 2276 NullFields []string `json:"-"` 2277} 2278 2279func (s *GetOrderNotesResponse) MarshalJSON() ([]byte, error) { 2280 type NoMethod GetOrderNotesResponse 2281 raw := NoMethod(*s) 2282 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2283} 2284 2285type GetOrdersResponse struct { 2286 // Proposals: The list of matching proposals. 2287 Proposals []*Proposal `json:"proposals,omitempty"` 2288 2289 // ServerResponse contains the HTTP response code and headers from the 2290 // server. 2291 googleapi.ServerResponse `json:"-"` 2292 2293 // ForceSendFields is a list of field names (e.g. "Proposals") to 2294 // unconditionally include in API requests. By default, fields with 2295 // empty values are omitted from API requests. However, any non-pointer, 2296 // non-interface field appearing in ForceSendFields will be sent to the 2297 // server regardless of whether the field is empty or not. This may be 2298 // used to include empty fields in Patch requests. 2299 ForceSendFields []string `json:"-"` 2300 2301 // NullFields is a list of field names (e.g. "Proposals") to include in 2302 // API requests with the JSON null value. By default, fields with empty 2303 // values are omitted from API requests. However, any field with an 2304 // empty value appearing in NullFields will be sent to the server as 2305 // null. It is an error if a field in this list has a non-empty value. 2306 // This may be used to include null fields in Patch requests. 2307 NullFields []string `json:"-"` 2308} 2309 2310func (s *GetOrdersResponse) MarshalJSON() ([]byte, error) { 2311 type NoMethod GetOrdersResponse 2312 raw := NoMethod(*s) 2313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2314} 2315 2316type GetPublisherProfilesByAccountIdResponse struct { 2317 // Profiles: Profiles for the requested publisher 2318 Profiles []*PublisherProfileApiProto `json:"profiles,omitempty"` 2319 2320 // ServerResponse contains the HTTP response code and headers from the 2321 // server. 2322 googleapi.ServerResponse `json:"-"` 2323 2324 // ForceSendFields is a list of field names (e.g. "Profiles") to 2325 // unconditionally include in API requests. By default, fields with 2326 // empty values are omitted from API requests. However, any non-pointer, 2327 // non-interface field appearing in ForceSendFields will be sent to the 2328 // server regardless of whether the field is empty or not. This may be 2329 // used to include empty fields in Patch requests. 2330 ForceSendFields []string `json:"-"` 2331 2332 // NullFields is a list of field names (e.g. "Profiles") to include in 2333 // API requests with the JSON null value. By default, fields with empty 2334 // values are omitted from API requests. However, any field with an 2335 // empty value appearing in NullFields will be sent to the server as 2336 // null. It is an error if a field in this list has a non-empty value. 2337 // This may be used to include null fields in Patch requests. 2338 NullFields []string `json:"-"` 2339} 2340 2341func (s *GetPublisherProfilesByAccountIdResponse) MarshalJSON() ([]byte, error) { 2342 type NoMethod GetPublisherProfilesByAccountIdResponse 2343 raw := NoMethod(*s) 2344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2345} 2346 2347// MarketplaceDeal: A proposal can contain multiple deals. A deal 2348// contains the terms and targeting information that is used for 2349// serving. 2350type MarketplaceDeal struct { 2351 // BuyerPrivateData: Buyer private data (hidden from seller). 2352 BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` 2353 2354 // CreationTimeMs: The time (ms since epoch) of the deal creation. 2355 // (readonly) 2356 CreationTimeMs int64 `json:"creationTimeMs,omitempty,string"` 2357 2358 // CreativePreApprovalPolicy: Specifies the creative pre-approval policy 2359 // (buyer-readonly) 2360 CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"` 2361 2362 // CreativeSafeFrameCompatibility: Specifies whether the creative is 2363 // safeFrame compatible (buyer-readonly) 2364 CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"` 2365 2366 // DealId: A unique deal-id for the deal (readonly). 2367 DealId string `json:"dealId,omitempty"` 2368 2369 // DealServingMetadata: Metadata about the serving status of this deal 2370 // (readonly, writes via custom actions) 2371 DealServingMetadata *DealServingMetadata `json:"dealServingMetadata,omitempty"` 2372 2373 // DeliveryControl: The set of fields around delivery control that are 2374 // interesting for a buyer to see but are non-negotiable. These are set 2375 // by the publisher. This message is assigned an id of 100 since some 2376 // day we would want to model this as a protobuf extension. 2377 DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"` 2378 2379 // ExternalDealId: The external deal id assigned to this deal once the 2380 // deal is finalized. This is the deal-id that shows up in 2381 // serving/reporting etc. (readonly) 2382 ExternalDealId string `json:"externalDealId,omitempty"` 2383 2384 // FlightEndTimeMs: Proposed flight end time of the deal (ms since 2385 // epoch) This will generally be stored in a granularity of a second. 2386 // (updatable) 2387 FlightEndTimeMs int64 `json:"flightEndTimeMs,omitempty,string"` 2388 2389 // FlightStartTimeMs: Proposed flight start time of the deal (ms since 2390 // epoch) This will generally be stored in a granularity of a second. 2391 // (updatable) 2392 FlightStartTimeMs int64 `json:"flightStartTimeMs,omitempty,string"` 2393 2394 // InventoryDescription: Description for the deal terms. 2395 // (buyer-readonly) 2396 InventoryDescription string `json:"inventoryDescription,omitempty"` 2397 2398 // IsRfpTemplate: Indicates whether the current deal is a RFP template. 2399 // RFP template is created by buyer and not based on seller created 2400 // products. 2401 IsRfpTemplate bool `json:"isRfpTemplate,omitempty"` 2402 2403 // IsSetupComplete: True, if the buyside inventory setup is complete for 2404 // this deal. (readonly, except via OrderSetupCompleted action) 2405 IsSetupComplete bool `json:"isSetupComplete,omitempty"` 2406 2407 // Kind: Identifies what kind of resource this is. Value: the fixed 2408 // string "adexchangebuyer#marketplaceDeal". 2409 Kind string `json:"kind,omitempty"` 2410 2411 // LastUpdateTimeMs: The time (ms since epoch) when the deal was last 2412 // updated. (readonly) 2413 LastUpdateTimeMs int64 `json:"lastUpdateTimeMs,omitempty,string"` 2414 2415 // Name: The name of the deal. (updatable) 2416 Name string `json:"name,omitempty"` 2417 2418 // ProductId: The product-id from which this deal was created. 2419 // (readonly, except on create) 2420 ProductId string `json:"productId,omitempty"` 2421 2422 // ProductRevisionNumber: The revision number of the product that the 2423 // deal was created from (readonly, except on create) 2424 ProductRevisionNumber int64 `json:"productRevisionNumber,omitempty,string"` 2425 2426 // ProgrammaticCreativeSource: Specifies the creative source for 2427 // programmatic deals, PUBLISHER means creative is provided by seller 2428 // and ADVERTISR means creative is provided by buyer. (buyer-readonly) 2429 ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"` 2430 2431 ProposalId string `json:"proposalId,omitempty"` 2432 2433 // SellerContacts: Optional Seller contact information for the deal 2434 // (buyer-readonly) 2435 SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"` 2436 2437 // SharedTargetings: The shared targeting visible to buyers and sellers. 2438 // Each shared targeting entity is AND'd together. (updatable) 2439 SharedTargetings []*SharedTargeting `json:"sharedTargetings,omitempty"` 2440 2441 // SyndicationProduct: The syndication product associated with the deal. 2442 // (readonly, except on create) 2443 SyndicationProduct string `json:"syndicationProduct,omitempty"` 2444 2445 // Terms: The negotiable terms of the deal. (updatable) 2446 Terms *DealTerms `json:"terms,omitempty"` 2447 2448 WebPropertyCode string `json:"webPropertyCode,omitempty"` 2449 2450 // ForceSendFields is a list of field names (e.g. "BuyerPrivateData") to 2451 // unconditionally include in API requests. By default, fields with 2452 // empty values are omitted from API requests. However, any non-pointer, 2453 // non-interface field appearing in ForceSendFields will be sent to the 2454 // server regardless of whether the field is empty or not. This may be 2455 // used to include empty fields in Patch requests. 2456 ForceSendFields []string `json:"-"` 2457 2458 // NullFields is a list of field names (e.g. "BuyerPrivateData") to 2459 // include in API requests with the JSON null value. By default, fields 2460 // with empty values are omitted from API requests. However, any field 2461 // with an empty value appearing in NullFields will be sent to the 2462 // server as null. It is an error if a field in this list has a 2463 // non-empty value. This may be used to include null fields in Patch 2464 // requests. 2465 NullFields []string `json:"-"` 2466} 2467 2468func (s *MarketplaceDeal) MarshalJSON() ([]byte, error) { 2469 type NoMethod MarketplaceDeal 2470 raw := NoMethod(*s) 2471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2472} 2473 2474type MarketplaceDealParty struct { 2475 // Buyer: The buyer/seller associated with the deal. One of buyer/seller 2476 // is specified for a deal-party. 2477 Buyer *Buyer `json:"buyer,omitempty"` 2478 2479 // Seller: The buyer/seller associated with the deal. One of 2480 // buyer/seller is specified for a deal party. 2481 Seller *Seller `json:"seller,omitempty"` 2482 2483 // ForceSendFields is a list of field names (e.g. "Buyer") to 2484 // unconditionally include in API requests. By default, fields with 2485 // empty values are omitted from API requests. However, any non-pointer, 2486 // non-interface field appearing in ForceSendFields will be sent to the 2487 // server regardless of whether the field is empty or not. This may be 2488 // used to include empty fields in Patch requests. 2489 ForceSendFields []string `json:"-"` 2490 2491 // NullFields is a list of field names (e.g. "Buyer") to include in API 2492 // requests with the JSON null value. By default, fields with empty 2493 // values are omitted from API requests. However, any field with an 2494 // empty value appearing in NullFields will be sent to the server as 2495 // null. It is an error if a field in this list has a non-empty value. 2496 // This may be used to include null fields in Patch requests. 2497 NullFields []string `json:"-"` 2498} 2499 2500func (s *MarketplaceDealParty) MarshalJSON() ([]byte, error) { 2501 type NoMethod MarketplaceDealParty 2502 raw := NoMethod(*s) 2503 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2504} 2505 2506type MarketplaceLabel struct { 2507 // AccountId: The accountId of the party that created the label. 2508 AccountId string `json:"accountId,omitempty"` 2509 2510 // CreateTimeMs: The creation time (in ms since epoch) for the label. 2511 CreateTimeMs int64 `json:"createTimeMs,omitempty,string"` 2512 2513 // DeprecatedMarketplaceDealParty: Information about the party that 2514 // created the label. 2515 DeprecatedMarketplaceDealParty *MarketplaceDealParty `json:"deprecatedMarketplaceDealParty,omitempty"` 2516 2517 // Label: The label to use. 2518 Label string `json:"label,omitempty"` 2519 2520 // ForceSendFields is a list of field names (e.g. "AccountId") to 2521 // unconditionally include in API requests. By default, fields with 2522 // empty values are omitted from API requests. However, any non-pointer, 2523 // non-interface field appearing in ForceSendFields will be sent to the 2524 // server regardless of whether the field is empty or not. This may be 2525 // used to include empty fields in Patch requests. 2526 ForceSendFields []string `json:"-"` 2527 2528 // NullFields is a list of field names (e.g. "AccountId") to include in 2529 // API requests with the JSON null value. By default, fields with empty 2530 // values are omitted from API requests. However, any field with an 2531 // empty value appearing in NullFields will be sent to the server as 2532 // null. It is an error if a field in this list has a non-empty value. 2533 // This may be used to include null fields in Patch requests. 2534 NullFields []string `json:"-"` 2535} 2536 2537func (s *MarketplaceLabel) MarshalJSON() ([]byte, error) { 2538 type NoMethod MarketplaceLabel 2539 raw := NoMethod(*s) 2540 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2541} 2542 2543// MarketplaceNote: A proposal is associated with a bunch of notes which 2544// may optionally be associated with a deal and/or revision number. 2545type MarketplaceNote struct { 2546 // CreatorRole: The role of the person (buyer/seller) creating the note. 2547 // (readonly) 2548 CreatorRole string `json:"creatorRole,omitempty"` 2549 2550 // DealId: Notes can optionally be associated with a deal. (readonly, 2551 // except on create) 2552 DealId string `json:"dealId,omitempty"` 2553 2554 // Kind: Identifies what kind of resource this is. Value: the fixed 2555 // string "adexchangebuyer#marketplaceNote". 2556 Kind string `json:"kind,omitempty"` 2557 2558 // Note: The actual note to attach. (readonly, except on create) 2559 Note string `json:"note,omitempty"` 2560 2561 // NoteId: The unique id for the note. (readonly) 2562 NoteId string `json:"noteId,omitempty"` 2563 2564 // ProposalId: The proposalId that a note is attached to. (readonly) 2565 ProposalId string `json:"proposalId,omitempty"` 2566 2567 // ProposalRevisionNumber: If the note is associated with a proposal 2568 // revision number, then store that here. (readonly, except on create) 2569 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 2570 2571 // TimestampMs: The timestamp (ms since epoch) that this note was 2572 // created. (readonly) 2573 TimestampMs int64 `json:"timestampMs,omitempty,string"` 2574 2575 // ForceSendFields is a list of field names (e.g. "CreatorRole") to 2576 // unconditionally include in API requests. By default, fields with 2577 // empty values are omitted from API requests. However, any non-pointer, 2578 // non-interface field appearing in ForceSendFields will be sent to the 2579 // server regardless of whether the field is empty or not. This may be 2580 // used to include empty fields in Patch requests. 2581 ForceSendFields []string `json:"-"` 2582 2583 // NullFields is a list of field names (e.g. "CreatorRole") to include 2584 // in API requests with the JSON null value. By default, fields with 2585 // empty values are omitted from API requests. However, any field with 2586 // an empty value appearing in NullFields will be sent to the server as 2587 // null. It is an error if a field in this list has a non-empty value. 2588 // This may be used to include null fields in Patch requests. 2589 NullFields []string `json:"-"` 2590} 2591 2592func (s *MarketplaceNote) MarshalJSON() ([]byte, error) { 2593 type NoMethod MarketplaceNote 2594 raw := NoMethod(*s) 2595 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2596} 2597 2598// PerformanceReport: The configuration data for an Ad Exchange 2599// performance report list. 2600type PerformanceReport struct { 2601 // BidRate: The number of bid responses with an ad. 2602 BidRate float64 `json:"bidRate,omitempty"` 2603 2604 // BidRequestRate: The number of bid requests sent to your bidder. 2605 BidRequestRate float64 `json:"bidRequestRate,omitempty"` 2606 2607 // CalloutStatusRate: Rate of various prefiltering statuses per match. 2608 // Please refer to the callout-status-codes.txt file for different 2609 // statuses. 2610 CalloutStatusRate []interface{} `json:"calloutStatusRate,omitempty"` 2611 2612 // CookieMatcherStatusRate: Average QPS for cookie matcher operations. 2613 CookieMatcherStatusRate []interface{} `json:"cookieMatcherStatusRate,omitempty"` 2614 2615 // CreativeStatusRate: Rate of ads with a given status. Please refer to 2616 // the creative-status-codes.txt file for different statuses. 2617 CreativeStatusRate []interface{} `json:"creativeStatusRate,omitempty"` 2618 2619 // FilteredBidRate: The number of bid responses that were filtered due 2620 // to a policy violation or other errors. 2621 FilteredBidRate float64 `json:"filteredBidRate,omitempty"` 2622 2623 // HostedMatchStatusRate: Average QPS for hosted match operations. 2624 HostedMatchStatusRate []interface{} `json:"hostedMatchStatusRate,omitempty"` 2625 2626 // InventoryMatchRate: The number of potential queries based on your 2627 // pretargeting settings. 2628 InventoryMatchRate float64 `json:"inventoryMatchRate,omitempty"` 2629 2630 // Kind: Resource type. 2631 Kind string `json:"kind,omitempty"` 2632 2633 // Latency50thPercentile: The 50th percentile round trip latency(ms) as 2634 // perceived from Google servers for the duration period covered by the 2635 // report. 2636 Latency50thPercentile float64 `json:"latency50thPercentile,omitempty"` 2637 2638 // Latency85thPercentile: The 85th percentile round trip latency(ms) as 2639 // perceived from Google servers for the duration period covered by the 2640 // report. 2641 Latency85thPercentile float64 `json:"latency85thPercentile,omitempty"` 2642 2643 // Latency95thPercentile: The 95th percentile round trip latency(ms) as 2644 // perceived from Google servers for the duration period covered by the 2645 // report. 2646 Latency95thPercentile float64 `json:"latency95thPercentile,omitempty"` 2647 2648 // NoQuotaInRegion: Rate of various quota account statuses per quota 2649 // check. 2650 NoQuotaInRegion float64 `json:"noQuotaInRegion,omitempty"` 2651 2652 // OutOfQuota: Rate of various quota account statuses per quota check. 2653 OutOfQuota float64 `json:"outOfQuota,omitempty"` 2654 2655 // PixelMatchRequests: Average QPS for pixel match requests from 2656 // clients. 2657 PixelMatchRequests float64 `json:"pixelMatchRequests,omitempty"` 2658 2659 // PixelMatchResponses: Average QPS for pixel match responses from 2660 // clients. 2661 PixelMatchResponses float64 `json:"pixelMatchResponses,omitempty"` 2662 2663 // QuotaConfiguredLimit: The configured quota limits for this account. 2664 QuotaConfiguredLimit float64 `json:"quotaConfiguredLimit,omitempty"` 2665 2666 // QuotaThrottledLimit: The throttled quota limits for this account. 2667 QuotaThrottledLimit float64 `json:"quotaThrottledLimit,omitempty"` 2668 2669 // Region: The trading location of this data. 2670 Region string `json:"region,omitempty"` 2671 2672 // SuccessfulRequestRate: The number of properly formed bid responses 2673 // received by our servers within the deadline. 2674 SuccessfulRequestRate float64 `json:"successfulRequestRate,omitempty"` 2675 2676 // Timestamp: The unix timestamp of the starting time of this 2677 // performance data. 2678 Timestamp int64 `json:"timestamp,omitempty,string"` 2679 2680 // UnsuccessfulRequestRate: The number of bid responses that were 2681 // unsuccessful due to timeouts, incorrect formatting, etc. 2682 UnsuccessfulRequestRate float64 `json:"unsuccessfulRequestRate,omitempty"` 2683 2684 // ForceSendFields is a list of field names (e.g. "BidRate") to 2685 // unconditionally include in API requests. By default, fields with 2686 // empty values are omitted from API requests. However, any non-pointer, 2687 // non-interface field appearing in ForceSendFields will be sent to the 2688 // server regardless of whether the field is empty or not. This may be 2689 // used to include empty fields in Patch requests. 2690 ForceSendFields []string `json:"-"` 2691 2692 // NullFields is a list of field names (e.g. "BidRate") to include in 2693 // API requests with the JSON null value. By default, fields with empty 2694 // values are omitted from API requests. However, any field with an 2695 // empty value appearing in NullFields will be sent to the server as 2696 // null. It is an error if a field in this list has a non-empty value. 2697 // This may be used to include null fields in Patch requests. 2698 NullFields []string `json:"-"` 2699} 2700 2701func (s *PerformanceReport) MarshalJSON() ([]byte, error) { 2702 type NoMethod PerformanceReport 2703 raw := NoMethod(*s) 2704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2705} 2706 2707func (s *PerformanceReport) UnmarshalJSON(data []byte) error { 2708 type NoMethod PerformanceReport 2709 var s1 struct { 2710 BidRate gensupport.JSONFloat64 `json:"bidRate"` 2711 BidRequestRate gensupport.JSONFloat64 `json:"bidRequestRate"` 2712 FilteredBidRate gensupport.JSONFloat64 `json:"filteredBidRate"` 2713 InventoryMatchRate gensupport.JSONFloat64 `json:"inventoryMatchRate"` 2714 Latency50thPercentile gensupport.JSONFloat64 `json:"latency50thPercentile"` 2715 Latency85thPercentile gensupport.JSONFloat64 `json:"latency85thPercentile"` 2716 Latency95thPercentile gensupport.JSONFloat64 `json:"latency95thPercentile"` 2717 NoQuotaInRegion gensupport.JSONFloat64 `json:"noQuotaInRegion"` 2718 OutOfQuota gensupport.JSONFloat64 `json:"outOfQuota"` 2719 PixelMatchRequests gensupport.JSONFloat64 `json:"pixelMatchRequests"` 2720 PixelMatchResponses gensupport.JSONFloat64 `json:"pixelMatchResponses"` 2721 QuotaConfiguredLimit gensupport.JSONFloat64 `json:"quotaConfiguredLimit"` 2722 QuotaThrottledLimit gensupport.JSONFloat64 `json:"quotaThrottledLimit"` 2723 SuccessfulRequestRate gensupport.JSONFloat64 `json:"successfulRequestRate"` 2724 UnsuccessfulRequestRate gensupport.JSONFloat64 `json:"unsuccessfulRequestRate"` 2725 *NoMethod 2726 } 2727 s1.NoMethod = (*NoMethod)(s) 2728 if err := json.Unmarshal(data, &s1); err != nil { 2729 return err 2730 } 2731 s.BidRate = float64(s1.BidRate) 2732 s.BidRequestRate = float64(s1.BidRequestRate) 2733 s.FilteredBidRate = float64(s1.FilteredBidRate) 2734 s.InventoryMatchRate = float64(s1.InventoryMatchRate) 2735 s.Latency50thPercentile = float64(s1.Latency50thPercentile) 2736 s.Latency85thPercentile = float64(s1.Latency85thPercentile) 2737 s.Latency95thPercentile = float64(s1.Latency95thPercentile) 2738 s.NoQuotaInRegion = float64(s1.NoQuotaInRegion) 2739 s.OutOfQuota = float64(s1.OutOfQuota) 2740 s.PixelMatchRequests = float64(s1.PixelMatchRequests) 2741 s.PixelMatchResponses = float64(s1.PixelMatchResponses) 2742 s.QuotaConfiguredLimit = float64(s1.QuotaConfiguredLimit) 2743 s.QuotaThrottledLimit = float64(s1.QuotaThrottledLimit) 2744 s.SuccessfulRequestRate = float64(s1.SuccessfulRequestRate) 2745 s.UnsuccessfulRequestRate = float64(s1.UnsuccessfulRequestRate) 2746 return nil 2747} 2748 2749// PerformanceReportList: The configuration data for an Ad Exchange 2750// performance report list. 2751type PerformanceReportList struct { 2752 // Kind: Resource type. 2753 Kind string `json:"kind,omitempty"` 2754 2755 // PerformanceReport: A list of performance reports relevant for the 2756 // account. 2757 PerformanceReport []*PerformanceReport `json:"performanceReport,omitempty"` 2758 2759 // ServerResponse contains the HTTP response code and headers from the 2760 // server. 2761 googleapi.ServerResponse `json:"-"` 2762 2763 // ForceSendFields is a list of field names (e.g. "Kind") to 2764 // unconditionally include in API requests. By default, fields with 2765 // empty values are omitted from API requests. However, any non-pointer, 2766 // non-interface field appearing in ForceSendFields will be sent to the 2767 // server regardless of whether the field is empty or not. This may be 2768 // used to include empty fields in Patch requests. 2769 ForceSendFields []string `json:"-"` 2770 2771 // NullFields is a list of field names (e.g. "Kind") to include in API 2772 // requests with the JSON null value. By default, fields with empty 2773 // values are omitted from API requests. However, any field with an 2774 // empty value appearing in NullFields will be sent to the server as 2775 // null. It is an error if a field in this list has a non-empty value. 2776 // This may be used to include null fields in Patch requests. 2777 NullFields []string `json:"-"` 2778} 2779 2780func (s *PerformanceReportList) MarshalJSON() ([]byte, error) { 2781 type NoMethod PerformanceReportList 2782 raw := NoMethod(*s) 2783 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2784} 2785 2786type PretargetingConfig struct { 2787 // BillingId: The id for billing purposes, provided for reference. Leave 2788 // this field blank for insert requests; the id will be generated 2789 // automatically. 2790 BillingId int64 `json:"billingId,omitempty,string"` 2791 2792 // ConfigId: The config id; generated automatically. Leave this field 2793 // blank for insert requests. 2794 ConfigId int64 `json:"configId,omitempty,string"` 2795 2796 // ConfigName: The name of the config. Must be unique. Required for all 2797 // requests. 2798 ConfigName string `json:"configName,omitempty"` 2799 2800 // CreativeType: List must contain exactly one of 2801 // PRETARGETING_CREATIVE_TYPE_HTML or PRETARGETING_CREATIVE_TYPE_VIDEO. 2802 CreativeType []string `json:"creativeType,omitempty"` 2803 2804 // Dimensions: Requests which allow one of these (width, height) pairs 2805 // will match. All pairs must be supported ad dimensions. 2806 Dimensions []*PretargetingConfigDimensions `json:"dimensions,omitempty"` 2807 2808 // ExcludedContentLabels: Requests with any of these content labels will 2809 // not match. Values are from content-labels.txt in the downloadable 2810 // files section. 2811 ExcludedContentLabels googleapi.Int64s `json:"excludedContentLabels,omitempty"` 2812 2813 // ExcludedGeoCriteriaIds: Requests containing any of these geo criteria 2814 // ids will not match. 2815 ExcludedGeoCriteriaIds googleapi.Int64s `json:"excludedGeoCriteriaIds,omitempty"` 2816 2817 // ExcludedPlacements: Requests containing any of these placements will 2818 // not match. 2819 ExcludedPlacements []*PretargetingConfigExcludedPlacements `json:"excludedPlacements,omitempty"` 2820 2821 // ExcludedUserLists: Requests containing any of these users list ids 2822 // will not match. 2823 ExcludedUserLists googleapi.Int64s `json:"excludedUserLists,omitempty"` 2824 2825 // ExcludedVerticals: Requests containing any of these vertical ids will 2826 // not match. Values are from the publisher-verticals.txt file in the 2827 // downloadable files section. 2828 ExcludedVerticals googleapi.Int64s `json:"excludedVerticals,omitempty"` 2829 2830 // GeoCriteriaIds: Requests containing any of these geo criteria ids 2831 // will match. 2832 GeoCriteriaIds googleapi.Int64s `json:"geoCriteriaIds,omitempty"` 2833 2834 // IsActive: Whether this config is active. Required for all requests. 2835 IsActive bool `json:"isActive,omitempty"` 2836 2837 // Kind: The kind of the resource, i.e. 2838 // "adexchangebuyer#pretargetingConfig". 2839 Kind string `json:"kind,omitempty"` 2840 2841 // Languages: Request containing any of these language codes will match. 2842 Languages []string `json:"languages,omitempty"` 2843 2844 // MaximumQps: The maximum QPS allocated to this pretargeting 2845 // configuration, used for pretargeting-level QPS limits. By default, 2846 // this is not set, which indicates that there is no QPS limit at the 2847 // configuration level (a global or account-level limit may still be 2848 // imposed). 2849 MaximumQps int64 `json:"maximumQps,omitempty,string"` 2850 2851 // MinimumViewabilityDecile: Requests where the predicted viewability is 2852 // below the specified decile will not match. E.g. if the buyer sets 2853 // this value to 5, requests from slots where the predicted viewability 2854 // is below 50% will not match. If the predicted viewability is unknown 2855 // this field will be ignored. 2856 MinimumViewabilityDecile int64 `json:"minimumViewabilityDecile,omitempty"` 2857 2858 // MobileCarriers: Requests containing any of these mobile carrier ids 2859 // will match. Values are from mobile-carriers.csv in the downloadable 2860 // files section. 2861 MobileCarriers googleapi.Int64s `json:"mobileCarriers,omitempty"` 2862 2863 // MobileDevices: Requests containing any of these mobile device ids 2864 // will match. Values are from mobile-devices.csv in the downloadable 2865 // files section. 2866 MobileDevices googleapi.Int64s `json:"mobileDevices,omitempty"` 2867 2868 // MobileOperatingSystemVersions: Requests containing any of these 2869 // mobile operating system version ids will match. Values are from 2870 // mobile-os.csv in the downloadable files section. 2871 MobileOperatingSystemVersions googleapi.Int64s `json:"mobileOperatingSystemVersions,omitempty"` 2872 2873 // Placements: Requests containing any of these placements will match. 2874 Placements []*PretargetingConfigPlacements `json:"placements,omitempty"` 2875 2876 // Platforms: Requests matching any of these platforms will match. 2877 // Possible values are PRETARGETING_PLATFORM_MOBILE, 2878 // PRETARGETING_PLATFORM_DESKTOP, and PRETARGETING_PLATFORM_TABLET. 2879 Platforms []string `json:"platforms,omitempty"` 2880 2881 // SupportedCreativeAttributes: Creative attributes should be declared 2882 // here if all creatives corresponding to this pretargeting 2883 // configuration have that creative attribute. Values are from 2884 // pretargetable-creative-attributes.txt in the downloadable files 2885 // section. 2886 SupportedCreativeAttributes googleapi.Int64s `json:"supportedCreativeAttributes,omitempty"` 2887 2888 // UserIdentifierDataRequired: Requests containing the specified type of 2889 // user data will match. Possible values are HOSTED_MATCH_DATA, which 2890 // means the request is cookie-targetable and has a match in the buyer's 2891 // hosted match table, and COOKIE_OR_IDFA, which means the request has 2892 // either a targetable cookie or an iOS IDFA. 2893 UserIdentifierDataRequired []string `json:"userIdentifierDataRequired,omitempty"` 2894 2895 // UserLists: Requests containing any of these user list ids will match. 2896 UserLists googleapi.Int64s `json:"userLists,omitempty"` 2897 2898 // VendorTypes: Requests that allow any of these vendor ids will match. 2899 // Values are from vendors.txt in the downloadable files section. 2900 VendorTypes googleapi.Int64s `json:"vendorTypes,omitempty"` 2901 2902 // Verticals: Requests containing any of these vertical ids will match. 2903 Verticals googleapi.Int64s `json:"verticals,omitempty"` 2904 2905 // VideoPlayerSizes: Video requests satisfying any of these player size 2906 // constraints will match. 2907 VideoPlayerSizes []*PretargetingConfigVideoPlayerSizes `json:"videoPlayerSizes,omitempty"` 2908 2909 // ServerResponse contains the HTTP response code and headers from the 2910 // server. 2911 googleapi.ServerResponse `json:"-"` 2912 2913 // ForceSendFields is a list of field names (e.g. "BillingId") to 2914 // unconditionally include in API requests. By default, fields with 2915 // empty values are omitted from API requests. However, any non-pointer, 2916 // non-interface field appearing in ForceSendFields will be sent to the 2917 // server regardless of whether the field is empty or not. This may be 2918 // used to include empty fields in Patch requests. 2919 ForceSendFields []string `json:"-"` 2920 2921 // NullFields is a list of field names (e.g. "BillingId") to include in 2922 // API requests with the JSON null value. By default, fields with empty 2923 // values are omitted from API requests. However, any field with an 2924 // empty value appearing in NullFields will be sent to the server as 2925 // null. It is an error if a field in this list has a non-empty value. 2926 // This may be used to include null fields in Patch requests. 2927 NullFields []string `json:"-"` 2928} 2929 2930func (s *PretargetingConfig) MarshalJSON() ([]byte, error) { 2931 type NoMethod PretargetingConfig 2932 raw := NoMethod(*s) 2933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2934} 2935 2936type PretargetingConfigDimensions struct { 2937 // Height: Height in pixels. 2938 Height int64 `json:"height,omitempty,string"` 2939 2940 // Width: Width in pixels. 2941 Width int64 `json:"width,omitempty,string"` 2942 2943 // ForceSendFields is a list of field names (e.g. "Height") to 2944 // unconditionally include in API requests. By default, fields with 2945 // empty values are omitted from API requests. However, any non-pointer, 2946 // non-interface field appearing in ForceSendFields will be sent to the 2947 // server regardless of whether the field is empty or not. This may be 2948 // used to include empty fields in Patch requests. 2949 ForceSendFields []string `json:"-"` 2950 2951 // NullFields is a list of field names (e.g. "Height") to include in API 2952 // requests with the JSON null value. By default, fields with empty 2953 // values are omitted from API requests. However, any field with an 2954 // empty value appearing in NullFields will be sent to the server as 2955 // null. It is an error if a field in this list has a non-empty value. 2956 // This may be used to include null fields in Patch requests. 2957 NullFields []string `json:"-"` 2958} 2959 2960func (s *PretargetingConfigDimensions) MarshalJSON() ([]byte, error) { 2961 type NoMethod PretargetingConfigDimensions 2962 raw := NoMethod(*s) 2963 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2964} 2965 2966type PretargetingConfigExcludedPlacements struct { 2967 // Token: The value of the placement. Interpretation depends on the 2968 // placement type, e.g. URL for a site placement, channel name for a 2969 // channel placement, app id for a mobile app placement. 2970 Token string `json:"token,omitempty"` 2971 2972 // Type: The type of the placement. 2973 Type string `json:"type,omitempty"` 2974 2975 // ForceSendFields is a list of field names (e.g. "Token") to 2976 // unconditionally include in API requests. By default, fields with 2977 // empty values are omitted from API requests. However, any non-pointer, 2978 // non-interface field appearing in ForceSendFields will be sent to the 2979 // server regardless of whether the field is empty or not. This may be 2980 // used to include empty fields in Patch requests. 2981 ForceSendFields []string `json:"-"` 2982 2983 // NullFields is a list of field names (e.g. "Token") to include in API 2984 // requests with the JSON null value. By default, fields with empty 2985 // values are omitted from API requests. However, any field with an 2986 // empty value appearing in NullFields will be sent to the server as 2987 // null. It is an error if a field in this list has a non-empty value. 2988 // This may be used to include null fields in Patch requests. 2989 NullFields []string `json:"-"` 2990} 2991 2992func (s *PretargetingConfigExcludedPlacements) MarshalJSON() ([]byte, error) { 2993 type NoMethod PretargetingConfigExcludedPlacements 2994 raw := NoMethod(*s) 2995 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2996} 2997 2998type PretargetingConfigPlacements struct { 2999 // Token: The value of the placement. Interpretation depends on the 3000 // placement type, e.g. URL for a site placement, channel name for a 3001 // channel placement, app id for a mobile app placement. 3002 Token string `json:"token,omitempty"` 3003 3004 // Type: The type of the placement. 3005 Type string `json:"type,omitempty"` 3006 3007 // ForceSendFields is a list of field names (e.g. "Token") to 3008 // unconditionally include in API requests. By default, fields with 3009 // empty values are omitted from API requests. However, any non-pointer, 3010 // non-interface field appearing in ForceSendFields will be sent to the 3011 // server regardless of whether the field is empty or not. This may be 3012 // used to include empty fields in Patch requests. 3013 ForceSendFields []string `json:"-"` 3014 3015 // NullFields is a list of field names (e.g. "Token") to include in API 3016 // requests with the JSON null value. By default, fields with empty 3017 // values are omitted from API requests. However, any field with an 3018 // empty value appearing in NullFields will be sent to the server as 3019 // null. It is an error if a field in this list has a non-empty value. 3020 // This may be used to include null fields in Patch requests. 3021 NullFields []string `json:"-"` 3022} 3023 3024func (s *PretargetingConfigPlacements) MarshalJSON() ([]byte, error) { 3025 type NoMethod PretargetingConfigPlacements 3026 raw := NoMethod(*s) 3027 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3028} 3029 3030type PretargetingConfigVideoPlayerSizes struct { 3031 // AspectRatio: The type of aspect ratio. Leave this field blank to 3032 // match all aspect ratios. 3033 AspectRatio string `json:"aspectRatio,omitempty"` 3034 3035 // MinHeight: The minimum player height in pixels. Leave this field 3036 // blank to match any player height. 3037 MinHeight int64 `json:"minHeight,omitempty,string"` 3038 3039 // MinWidth: The minimum player width in pixels. Leave this field blank 3040 // to match any player width. 3041 MinWidth int64 `json:"minWidth,omitempty,string"` 3042 3043 // ForceSendFields is a list of field names (e.g. "AspectRatio") to 3044 // unconditionally include in API requests. By default, fields with 3045 // empty values are omitted from API requests. However, any non-pointer, 3046 // non-interface field appearing in ForceSendFields will be sent to the 3047 // server regardless of whether the field is empty or not. This may be 3048 // used to include empty fields in Patch requests. 3049 ForceSendFields []string `json:"-"` 3050 3051 // NullFields is a list of field names (e.g. "AspectRatio") to include 3052 // in API requests with the JSON null value. By default, fields with 3053 // empty values are omitted from API requests. However, any field with 3054 // an empty value appearing in NullFields will be sent to the server as 3055 // null. It is an error if a field in this list has a non-empty value. 3056 // This may be used to include null fields in Patch requests. 3057 NullFields []string `json:"-"` 3058} 3059 3060func (s *PretargetingConfigVideoPlayerSizes) MarshalJSON() ([]byte, error) { 3061 type NoMethod PretargetingConfigVideoPlayerSizes 3062 raw := NoMethod(*s) 3063 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3064} 3065 3066type PretargetingConfigList struct { 3067 // Items: A list of pretargeting configs 3068 Items []*PretargetingConfig `json:"items,omitempty"` 3069 3070 // Kind: Resource type. 3071 Kind string `json:"kind,omitempty"` 3072 3073 // ServerResponse contains the HTTP response code and headers from the 3074 // server. 3075 googleapi.ServerResponse `json:"-"` 3076 3077 // ForceSendFields is a list of field names (e.g. "Items") to 3078 // unconditionally include in API requests. By default, fields with 3079 // empty values are omitted from API requests. However, any non-pointer, 3080 // non-interface field appearing in ForceSendFields will be sent to the 3081 // server regardless of whether the field is empty or not. This may be 3082 // used to include empty fields in Patch requests. 3083 ForceSendFields []string `json:"-"` 3084 3085 // NullFields is a list of field names (e.g. "Items") to include in API 3086 // requests with the JSON null value. By default, fields with empty 3087 // values are omitted from API requests. However, any field with an 3088 // empty value appearing in NullFields will be sent to the server as 3089 // null. It is an error if a field in this list has a non-empty value. 3090 // This may be used to include null fields in Patch requests. 3091 NullFields []string `json:"-"` 3092} 3093 3094func (s *PretargetingConfigList) MarshalJSON() ([]byte, error) { 3095 type NoMethod PretargetingConfigList 3096 raw := NoMethod(*s) 3097 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3098} 3099 3100type Price struct { 3101 // AmountMicros: The price value in micros. 3102 AmountMicros float64 `json:"amountMicros,omitempty"` 3103 3104 // CurrencyCode: The currency code for the price. 3105 CurrencyCode string `json:"currencyCode,omitempty"` 3106 3107 // ExpectedCpmMicros: In case of CPD deals, the expected CPM in micros. 3108 ExpectedCpmMicros float64 `json:"expectedCpmMicros,omitempty"` 3109 3110 // PricingType: The pricing type for the deal/product. 3111 PricingType string `json:"pricingType,omitempty"` 3112 3113 // ForceSendFields is a list of field names (e.g. "AmountMicros") to 3114 // unconditionally include in API requests. By default, fields with 3115 // empty values are omitted from API requests. However, any non-pointer, 3116 // non-interface field appearing in ForceSendFields will be sent to the 3117 // server regardless of whether the field is empty or not. This may be 3118 // used to include empty fields in Patch requests. 3119 ForceSendFields []string `json:"-"` 3120 3121 // NullFields is a list of field names (e.g. "AmountMicros") to include 3122 // in API requests with the JSON null value. By default, fields with 3123 // empty values are omitted from API requests. However, any field with 3124 // an empty value appearing in NullFields will be sent to the server as 3125 // null. It is an error if a field in this list has a non-empty value. 3126 // This may be used to include null fields in Patch requests. 3127 NullFields []string `json:"-"` 3128} 3129 3130func (s *Price) MarshalJSON() ([]byte, error) { 3131 type NoMethod Price 3132 raw := NoMethod(*s) 3133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3134} 3135 3136func (s *Price) UnmarshalJSON(data []byte) error { 3137 type NoMethod Price 3138 var s1 struct { 3139 AmountMicros gensupport.JSONFloat64 `json:"amountMicros"` 3140 ExpectedCpmMicros gensupport.JSONFloat64 `json:"expectedCpmMicros"` 3141 *NoMethod 3142 } 3143 s1.NoMethod = (*NoMethod)(s) 3144 if err := json.Unmarshal(data, &s1); err != nil { 3145 return err 3146 } 3147 s.AmountMicros = float64(s1.AmountMicros) 3148 s.ExpectedCpmMicros = float64(s1.ExpectedCpmMicros) 3149 return nil 3150} 3151 3152// PricePerBuyer: Used to specify pricing rules for buyers. Each 3153// PricePerBuyer in a product can become [0,1] deals. To check if there 3154// is a PricePerBuyer for a particular buyer we look for the most 3155// specific matching rule - we first look for a rule matching the buyer 3156// and otherwise look for a matching rule where no buyer is set. 3157type PricePerBuyer struct { 3158 // AuctionTier: Optional access type for this buyer. 3159 AuctionTier string `json:"auctionTier,omitempty"` 3160 3161 // BilledBuyer: Reference to the buyer that will get billed. 3162 BilledBuyer *Buyer `json:"billedBuyer,omitempty"` 3163 3164 // Buyer: The buyer who will pay this price. If unset, all buyers can 3165 // pay this price (if the advertisers match, and there's no more 3166 // specific rule matching the buyer). 3167 Buyer *Buyer `json:"buyer,omitempty"` 3168 3169 // Price: The specified price 3170 Price *Price `json:"price,omitempty"` 3171 3172 // ForceSendFields is a list of field names (e.g. "AuctionTier") to 3173 // unconditionally include in API requests. By default, fields with 3174 // empty values are omitted from API requests. However, any non-pointer, 3175 // non-interface field appearing in ForceSendFields will be sent to the 3176 // server regardless of whether the field is empty or not. This may be 3177 // used to include empty fields in Patch requests. 3178 ForceSendFields []string `json:"-"` 3179 3180 // NullFields is a list of field names (e.g. "AuctionTier") to include 3181 // in API requests with the JSON null value. By default, fields with 3182 // empty values are omitted from API requests. However, any field with 3183 // an empty value appearing in NullFields will be sent to the server as 3184 // null. It is an error if a field in this list has a non-empty value. 3185 // This may be used to include null fields in Patch requests. 3186 NullFields []string `json:"-"` 3187} 3188 3189func (s *PricePerBuyer) MarshalJSON() ([]byte, error) { 3190 type NoMethod PricePerBuyer 3191 raw := NoMethod(*s) 3192 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3193} 3194 3195type PrivateData struct { 3196 ReferenceId string `json:"referenceId,omitempty"` 3197 3198 ReferencePayload string `json:"referencePayload,omitempty"` 3199 3200 // ForceSendFields is a list of field names (e.g. "ReferenceId") to 3201 // unconditionally include in API requests. By default, fields with 3202 // empty values are omitted from API requests. However, any non-pointer, 3203 // non-interface field appearing in ForceSendFields will be sent to the 3204 // server regardless of whether the field is empty or not. This may be 3205 // used to include empty fields in Patch requests. 3206 ForceSendFields []string `json:"-"` 3207 3208 // NullFields is a list of field names (e.g. "ReferenceId") to include 3209 // in API requests with the JSON null value. By default, fields with 3210 // empty values are omitted from API requests. However, any field with 3211 // an empty value appearing in NullFields will be sent to the server as 3212 // null. It is an error if a field in this list has a non-empty value. 3213 // This may be used to include null fields in Patch requests. 3214 NullFields []string `json:"-"` 3215} 3216 3217func (s *PrivateData) MarshalJSON() ([]byte, error) { 3218 type NoMethod PrivateData 3219 raw := NoMethod(*s) 3220 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3221} 3222 3223// Product: A product is segment of inventory that a seller wishes to 3224// sell. It is associated with certain terms and targeting information 3225// which helps buyer know more about the inventory. Each field in a 3226// product can have one of the following setting: 3227// 3228// (readonly) - It is an error to try and set this field. 3229// (buyer-readonly) - Only the seller can set this field. 3230// (seller-readonly) - Only the buyer can set this field. (updatable) - 3231// The field is updatable at all times by either buyer or the seller. 3232type Product struct { 3233 // BilledBuyer: The billed buyer corresponding to the buyer that created 3234 // the offer. (readonly, except on create) 3235 BilledBuyer *Buyer `json:"billedBuyer,omitempty"` 3236 3237 // Buyer: The buyer that created the offer if this is a buyer initiated 3238 // offer (readonly, except on create) 3239 Buyer *Buyer `json:"buyer,omitempty"` 3240 3241 // CreationTimeMs: Creation time in ms. since epoch (readonly) 3242 CreationTimeMs int64 `json:"creationTimeMs,omitempty,string"` 3243 3244 // CreatorContacts: Optional contact information for the creator of this 3245 // product. (buyer-readonly) 3246 CreatorContacts []*ContactInformation `json:"creatorContacts,omitempty"` 3247 3248 // CreatorRole: The role that created the offer. Set to BUYER for buyer 3249 // initiated offers. 3250 CreatorRole string `json:"creatorRole,omitempty"` 3251 3252 // DeliveryControl: The set of fields around delivery control that are 3253 // interesting for a buyer to see but are non-negotiable. These are set 3254 // by the publisher. This message is assigned an id of 100 since some 3255 // day we would want to model this as a protobuf extension. 3256 DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"` 3257 3258 // FlightEndTimeMs: The proposed end time for the deal (ms since epoch) 3259 // (buyer-readonly) 3260 FlightEndTimeMs int64 `json:"flightEndTimeMs,omitempty,string"` 3261 3262 // FlightStartTimeMs: Inventory availability dates. (times are in ms 3263 // since epoch) The granularity is generally in the order of seconds. 3264 // (buyer-readonly) 3265 FlightStartTimeMs int64 `json:"flightStartTimeMs,omitempty,string"` 3266 3267 // HasCreatorSignedOff: If the creator has already signed off on the 3268 // product, then the buyer can finalize the deal by accepting the 3269 // product as is. When copying to a proposal, if any of the terms are 3270 // changed, then auto_finalize is automatically set to false. 3271 HasCreatorSignedOff bool `json:"hasCreatorSignedOff,omitempty"` 3272 3273 // InventorySource: What exchange will provide this inventory (readonly, 3274 // except on create). 3275 InventorySource string `json:"inventorySource,omitempty"` 3276 3277 // Kind: Identifies what kind of resource this is. Value: the fixed 3278 // string "adexchangebuyer#product". 3279 Kind string `json:"kind,omitempty"` 3280 3281 // Labels: Optional List of labels for the product (optional, 3282 // buyer-readonly). 3283 Labels []*MarketplaceLabel `json:"labels,omitempty"` 3284 3285 // LastUpdateTimeMs: Time of last update in ms. since epoch (readonly) 3286 LastUpdateTimeMs int64 `json:"lastUpdateTimeMs,omitempty,string"` 3287 3288 // LegacyOfferId: Optional legacy offer id if this offer is a preferred 3289 // deal offer. 3290 LegacyOfferId string `json:"legacyOfferId,omitempty"` 3291 3292 // MarketplacePublisherProfileId: Marketplace publisher profile Id. This 3293 // Id differs from the regular publisher_profile_id in that 1. This is a 3294 // new id, the old Id will be deprecated in 2017. 2. This id uniquely 3295 // identifies a publisher profile by itself. 3296 MarketplacePublisherProfileId string `json:"marketplacePublisherProfileId,omitempty"` 3297 3298 // Name: The name for this product as set by the seller. 3299 // (buyer-readonly) 3300 Name string `json:"name,omitempty"` 3301 3302 // PrivateAuctionId: Optional private auction id if this offer is a 3303 // private auction offer. 3304 PrivateAuctionId string `json:"privateAuctionId,omitempty"` 3305 3306 // ProductId: The unique id for the product (readonly) 3307 ProductId string `json:"productId,omitempty"` 3308 3309 // PublisherProfileId: Id of the publisher profile for a given seller. A 3310 // (seller.account_id, publisher_profile_id) pair uniquely identifies a 3311 // publisher profile. Buyers can call the PublisherProfiles::List 3312 // endpoint to get a list of publisher profiles for a given seller. 3313 PublisherProfileId string `json:"publisherProfileId,omitempty"` 3314 3315 // PublisherProvidedForecast: Publisher self-provided forecast 3316 // information. 3317 PublisherProvidedForecast *PublisherProvidedForecast `json:"publisherProvidedForecast,omitempty"` 3318 3319 // RevisionNumber: The revision number of the product. (readonly) 3320 RevisionNumber int64 `json:"revisionNumber,omitempty,string"` 3321 3322 // Seller: Information about the seller that created this product 3323 // (readonly, except on create) 3324 Seller *Seller `json:"seller,omitempty"` 3325 3326 // SharedTargetings: Targeting that is shared between the buyer and the 3327 // seller. Each targeting criteria has a specified key and for each key 3328 // there is a list of inclusion value or exclusion values. 3329 // (buyer-readonly) 3330 SharedTargetings []*SharedTargeting `json:"sharedTargetings,omitempty"` 3331 3332 // State: The state of the product. (buyer-readonly) 3333 State string `json:"state,omitempty"` 3334 3335 // SyndicationProduct: The syndication product associated with the deal. 3336 // (readonly, except on create) 3337 SyndicationProduct string `json:"syndicationProduct,omitempty"` 3338 3339 // Terms: The negotiable terms of the deal (buyer-readonly) 3340 Terms *DealTerms `json:"terms,omitempty"` 3341 3342 // WebPropertyCode: The web property code for the seller. This field is 3343 // meant to be copied over as is when creating deals. 3344 WebPropertyCode string `json:"webPropertyCode,omitempty"` 3345 3346 // ServerResponse contains the HTTP response code and headers from the 3347 // server. 3348 googleapi.ServerResponse `json:"-"` 3349 3350 // ForceSendFields is a list of field names (e.g. "BilledBuyer") to 3351 // unconditionally include in API requests. By default, fields with 3352 // empty values are omitted from API requests. However, any non-pointer, 3353 // non-interface field appearing in ForceSendFields will be sent to the 3354 // server regardless of whether the field is empty or not. This may be 3355 // used to include empty fields in Patch requests. 3356 ForceSendFields []string `json:"-"` 3357 3358 // NullFields is a list of field names (e.g. "BilledBuyer") to include 3359 // in API requests with the JSON null value. By default, fields with 3360 // empty values are omitted from API requests. However, any field with 3361 // an empty value appearing in NullFields will be sent to the server as 3362 // null. It is an error if a field in this list has a non-empty value. 3363 // This may be used to include null fields in Patch requests. 3364 NullFields []string `json:"-"` 3365} 3366 3367func (s *Product) MarshalJSON() ([]byte, error) { 3368 type NoMethod Product 3369 raw := NoMethod(*s) 3370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3371} 3372 3373// Proposal: Represents a proposal in the marketplace. A proposal is the 3374// unit of negotiation between a seller and a buyer and contains deals 3375// which are served. Each field in a proposal can have one of the 3376// following setting: 3377// 3378// (readonly) - It is an error to try and set this field. 3379// (buyer-readonly) - Only the seller can set this field. 3380// (seller-readonly) - Only the buyer can set this field. (updatable) - 3381// The field is updatable at all times by either buyer or the seller. 3382type Proposal struct { 3383 // BilledBuyer: Reference to the buyer that will get billed for this 3384 // proposal. (readonly) 3385 BilledBuyer *Buyer `json:"billedBuyer,omitempty"` 3386 3387 // Buyer: Reference to the buyer on the proposal. (readonly, except on 3388 // create) 3389 Buyer *Buyer `json:"buyer,omitempty"` 3390 3391 // BuyerContacts: Optional contact information of the buyer. 3392 // (seller-readonly) 3393 BuyerContacts []*ContactInformation `json:"buyerContacts,omitempty"` 3394 3395 // BuyerPrivateData: Private data for buyer. (hidden from seller). 3396 BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` 3397 3398 // DbmAdvertiserIds: IDs of DBM advertisers permission to this proposal. 3399 DbmAdvertiserIds []string `json:"dbmAdvertiserIds,omitempty"` 3400 3401 // HasBuyerSignedOff: When an proposal is in an accepted state, 3402 // indicates whether the buyer has signed off. Once both sides have 3403 // signed off on a deal, the proposal can be finalized by the seller. 3404 // (seller-readonly) 3405 HasBuyerSignedOff bool `json:"hasBuyerSignedOff,omitempty"` 3406 3407 // HasSellerSignedOff: When an proposal is in an accepted state, 3408 // indicates whether the buyer has signed off Once both sides have 3409 // signed off on a deal, the proposal can be finalized by the seller. 3410 // (buyer-readonly) 3411 HasSellerSignedOff bool `json:"hasSellerSignedOff,omitempty"` 3412 3413 // InventorySource: What exchange will provide this inventory (readonly, 3414 // except on create). 3415 InventorySource string `json:"inventorySource,omitempty"` 3416 3417 // IsRenegotiating: True if the proposal is being renegotiated 3418 // (readonly). 3419 IsRenegotiating bool `json:"isRenegotiating,omitempty"` 3420 3421 // IsSetupComplete: True, if the buyside inventory setup is complete for 3422 // this proposal. (readonly, except via OrderSetupCompleted action) 3423 // Deprecated in favor of deal level setup complete flag. 3424 IsSetupComplete bool `json:"isSetupComplete,omitempty"` 3425 3426 // Kind: Identifies what kind of resource this is. Value: the fixed 3427 // string "adexchangebuyer#proposal". 3428 Kind string `json:"kind,omitempty"` 3429 3430 // Labels: List of labels associated with the proposal. (readonly) 3431 Labels []*MarketplaceLabel `json:"labels,omitempty"` 3432 3433 // LastUpdaterOrCommentorRole: The role of the last user that either 3434 // updated the proposal or left a comment. (readonly) 3435 LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"` 3436 3437 // Name: The name for the proposal (updatable) 3438 Name string `json:"name,omitempty"` 3439 3440 // NegotiationId: Optional negotiation id if this proposal is a 3441 // preferred deal proposal. 3442 NegotiationId string `json:"negotiationId,omitempty"` 3443 3444 // OriginatorRole: Indicates whether the buyer/seller created the 3445 // proposal.(readonly) 3446 OriginatorRole string `json:"originatorRole,omitempty"` 3447 3448 // PrivateAuctionId: Optional private auction id if this proposal is a 3449 // private auction proposal. 3450 PrivateAuctionId string `json:"privateAuctionId,omitempty"` 3451 3452 // ProposalId: The unique id of the proposal. (readonly). 3453 ProposalId string `json:"proposalId,omitempty"` 3454 3455 // ProposalState: The current state of the proposal. (readonly) 3456 ProposalState string `json:"proposalState,omitempty"` 3457 3458 // RevisionNumber: The revision number for the proposal (readonly). 3459 RevisionNumber int64 `json:"revisionNumber,omitempty,string"` 3460 3461 // RevisionTimeMs: The time (ms since epoch) when the proposal was last 3462 // revised (readonly). 3463 RevisionTimeMs int64 `json:"revisionTimeMs,omitempty,string"` 3464 3465 // Seller: Reference to the seller on the proposal. (readonly, except on 3466 // create) 3467 Seller *Seller `json:"seller,omitempty"` 3468 3469 // SellerContacts: Optional contact information of the seller 3470 // (buyer-readonly). 3471 SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"` 3472 3473 // ServerResponse contains the HTTP response code and headers from the 3474 // server. 3475 googleapi.ServerResponse `json:"-"` 3476 3477 // ForceSendFields is a list of field names (e.g. "BilledBuyer") to 3478 // unconditionally include in API requests. By default, fields with 3479 // empty values are omitted from API requests. However, any non-pointer, 3480 // non-interface field appearing in ForceSendFields will be sent to the 3481 // server regardless of whether the field is empty or not. This may be 3482 // used to include empty fields in Patch requests. 3483 ForceSendFields []string `json:"-"` 3484 3485 // NullFields is a list of field names (e.g. "BilledBuyer") to include 3486 // in API requests with the JSON null value. By default, fields with 3487 // empty values are omitted from API requests. However, any field with 3488 // an empty value appearing in NullFields will be sent to the server as 3489 // null. It is an error if a field in this list has a non-empty value. 3490 // This may be used to include null fields in Patch requests. 3491 NullFields []string `json:"-"` 3492} 3493 3494func (s *Proposal) MarshalJSON() ([]byte, error) { 3495 type NoMethod Proposal 3496 raw := NoMethod(*s) 3497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3498} 3499 3500type PublisherProfileApiProto struct { 3501 // Audience: Publisher provided info on its audience. 3502 Audience string `json:"audience,omitempty"` 3503 3504 // BuyerPitchStatement: A pitch statement for the buyer 3505 BuyerPitchStatement string `json:"buyerPitchStatement,omitempty"` 3506 3507 // DirectContact: Direct contact for the publisher profile. 3508 DirectContact string `json:"directContact,omitempty"` 3509 3510 // Exchange: Exchange where this publisher profile is from. E.g. AdX, 3511 // Rubicon etc... 3512 Exchange string `json:"exchange,omitempty"` 3513 3514 // GooglePlusLink: Link to publisher's Google+ page. 3515 GooglePlusLink string `json:"googlePlusLink,omitempty"` 3516 3517 // IsParent: True, if this is the parent profile, which represents all 3518 // domains owned by the publisher. 3519 IsParent bool `json:"isParent,omitempty"` 3520 3521 // IsPublished: True, if this profile is published. Deprecated for 3522 // state. 3523 IsPublished bool `json:"isPublished,omitempty"` 3524 3525 // Kind: Identifies what kind of resource this is. Value: the fixed 3526 // string "adexchangebuyer#publisherProfileApiProto". 3527 Kind string `json:"kind,omitempty"` 3528 3529 // LogoUrl: The url to the logo for the publisher. 3530 LogoUrl string `json:"logoUrl,omitempty"` 3531 3532 // MediaKitLink: The url for additional marketing and sales materials. 3533 MediaKitLink string `json:"mediaKitLink,omitempty"` 3534 3535 Name string `json:"name,omitempty"` 3536 3537 // Overview: Publisher provided overview. 3538 Overview string `json:"overview,omitempty"` 3539 3540 // ProfileId: The pair of (seller.account_id, profile_id) uniquely 3541 // identifies a publisher profile for a given publisher. 3542 ProfileId int64 `json:"profileId,omitempty"` 3543 3544 // ProgrammaticContact: Programmatic contact for the publisher profile. 3545 ProgrammaticContact string `json:"programmaticContact,omitempty"` 3546 3547 // PublisherDomains: The list of domains represented in this publisher 3548 // profile. Empty if this is a parent profile. 3549 PublisherDomains []string `json:"publisherDomains,omitempty"` 3550 3551 // PublisherProfileId: Unique Id for publisher profile. 3552 PublisherProfileId string `json:"publisherProfileId,omitempty"` 3553 3554 // PublisherProvidedForecast: Publisher provided forecasting 3555 // information. 3556 PublisherProvidedForecast *PublisherProvidedForecast `json:"publisherProvidedForecast,omitempty"` 3557 3558 // RateCardInfoLink: Link to publisher rate card 3559 RateCardInfoLink string `json:"rateCardInfoLink,omitempty"` 3560 3561 // SamplePageLink: Link for a sample content page. 3562 SamplePageLink string `json:"samplePageLink,omitempty"` 3563 3564 // Seller: Seller of the publisher profile. 3565 Seller *Seller `json:"seller,omitempty"` 3566 3567 // State: State of the publisher profile. 3568 State string `json:"state,omitempty"` 3569 3570 // TopHeadlines: Publisher provided key metrics and rankings. 3571 TopHeadlines []string `json:"topHeadlines,omitempty"` 3572 3573 // ForceSendFields is a list of field names (e.g. "Audience") to 3574 // unconditionally include in API requests. By default, fields with 3575 // empty values are omitted from API requests. However, any non-pointer, 3576 // non-interface field appearing in ForceSendFields will be sent to the 3577 // server regardless of whether the field is empty or not. This may be 3578 // used to include empty fields in Patch requests. 3579 ForceSendFields []string `json:"-"` 3580 3581 // NullFields is a list of field names (e.g. "Audience") to include in 3582 // API requests with the JSON null value. By default, fields with empty 3583 // values are omitted from API requests. However, any field with an 3584 // empty value appearing in NullFields will be sent to the server as 3585 // null. It is an error if a field in this list has a non-empty value. 3586 // This may be used to include null fields in Patch requests. 3587 NullFields []string `json:"-"` 3588} 3589 3590func (s *PublisherProfileApiProto) MarshalJSON() ([]byte, error) { 3591 type NoMethod PublisherProfileApiProto 3592 raw := NoMethod(*s) 3593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3594} 3595 3596// PublisherProvidedForecast: This message carries publisher provided 3597// forecasting information. 3598type PublisherProvidedForecast struct { 3599 // Dimensions: Publisher provided dimensions. E.g. geo, sizes etc... 3600 Dimensions []*Dimension `json:"dimensions,omitempty"` 3601 3602 // WeeklyImpressions: Publisher provided weekly impressions. 3603 WeeklyImpressions int64 `json:"weeklyImpressions,omitempty,string"` 3604 3605 // WeeklyUniques: Publisher provided weekly uniques. 3606 WeeklyUniques int64 `json:"weeklyUniques,omitempty,string"` 3607 3608 // ForceSendFields is a list of field names (e.g. "Dimensions") to 3609 // unconditionally include in API requests. By default, fields with 3610 // empty values are omitted from API requests. However, any non-pointer, 3611 // non-interface field appearing in ForceSendFields will be sent to the 3612 // server regardless of whether the field is empty or not. This may be 3613 // used to include empty fields in Patch requests. 3614 ForceSendFields []string `json:"-"` 3615 3616 // NullFields is a list of field names (e.g. "Dimensions") to include in 3617 // API requests with the JSON null value. By default, fields with empty 3618 // values are omitted from API requests. However, any field with an 3619 // empty value appearing in NullFields will be sent to the server as 3620 // null. It is an error if a field in this list has a non-empty value. 3621 // This may be used to include null fields in Patch requests. 3622 NullFields []string `json:"-"` 3623} 3624 3625func (s *PublisherProvidedForecast) MarshalJSON() ([]byte, error) { 3626 type NoMethod PublisherProvidedForecast 3627 raw := NoMethod(*s) 3628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3629} 3630 3631type Seller struct { 3632 // AccountId: The unique id for the seller. The seller fills in this 3633 // field. The seller account id is then available to buyer in the 3634 // product. 3635 AccountId string `json:"accountId,omitempty"` 3636 3637 // SubAccountId: Optional sub-account id for the seller. 3638 SubAccountId string `json:"subAccountId,omitempty"` 3639 3640 // ForceSendFields is a list of field names (e.g. "AccountId") to 3641 // unconditionally include in API requests. By default, fields with 3642 // empty values are omitted from API requests. However, any non-pointer, 3643 // non-interface field appearing in ForceSendFields will be sent to the 3644 // server regardless of whether the field is empty or not. This may be 3645 // used to include empty fields in Patch requests. 3646 ForceSendFields []string `json:"-"` 3647 3648 // NullFields is a list of field names (e.g. "AccountId") to include in 3649 // API requests with the JSON null value. By default, fields with empty 3650 // values are omitted from API requests. However, any field with an 3651 // empty value appearing in NullFields will be sent to the server as 3652 // null. It is an error if a field in this list has a non-empty value. 3653 // This may be used to include null fields in Patch requests. 3654 NullFields []string `json:"-"` 3655} 3656 3657func (s *Seller) MarshalJSON() ([]byte, error) { 3658 type NoMethod Seller 3659 raw := NoMethod(*s) 3660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3661} 3662 3663type SharedTargeting struct { 3664 // Exclusions: The list of values to exclude from targeting. Each value 3665 // is AND'd together. 3666 Exclusions []*TargetingValue `json:"exclusions,omitempty"` 3667 3668 // Inclusions: The list of value to include as part of the targeting. 3669 // Each value is OR'd together. 3670 Inclusions []*TargetingValue `json:"inclusions,omitempty"` 3671 3672 // Key: The key representing the shared targeting criterion. 3673 Key string `json:"key,omitempty"` 3674 3675 // ForceSendFields is a list of field names (e.g. "Exclusions") to 3676 // unconditionally include in API requests. By default, fields with 3677 // empty values are omitted from API requests. However, any non-pointer, 3678 // non-interface field appearing in ForceSendFields will be sent to the 3679 // server regardless of whether the field is empty or not. This may be 3680 // used to include empty fields in Patch requests. 3681 ForceSendFields []string `json:"-"` 3682 3683 // NullFields is a list of field names (e.g. "Exclusions") to include in 3684 // API requests with the JSON null value. By default, fields with empty 3685 // values are omitted from API requests. However, any field with an 3686 // empty value appearing in NullFields will be sent to the server as 3687 // null. It is an error if a field in this list has a non-empty value. 3688 // This may be used to include null fields in Patch requests. 3689 NullFields []string `json:"-"` 3690} 3691 3692func (s *SharedTargeting) MarshalJSON() ([]byte, error) { 3693 type NoMethod SharedTargeting 3694 raw := NoMethod(*s) 3695 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3696} 3697 3698type TargetingValue struct { 3699 // CreativeSizeValue: The creative size value to exclude/include. 3700 CreativeSizeValue *TargetingValueCreativeSize `json:"creativeSizeValue,omitempty"` 3701 3702 // DayPartTargetingValue: The daypart targeting to include / exclude. 3703 // Filled in when the key is GOOG_DAYPART_TARGETING. 3704 DayPartTargetingValue *TargetingValueDayPartTargeting `json:"dayPartTargetingValue,omitempty"` 3705 3706 DemogAgeCriteriaValue *TargetingValueDemogAgeCriteria `json:"demogAgeCriteriaValue,omitempty"` 3707 3708 DemogGenderCriteriaValue *TargetingValueDemogGenderCriteria `json:"demogGenderCriteriaValue,omitempty"` 3709 3710 // LongValue: The long value to exclude/include. 3711 LongValue int64 `json:"longValue,omitempty,string"` 3712 3713 // StringValue: The string value to exclude/include. 3714 StringValue string `json:"stringValue,omitempty"` 3715 3716 // ForceSendFields is a list of field names (e.g. "CreativeSizeValue") 3717 // to unconditionally include in API requests. By default, fields with 3718 // empty values are omitted from API requests. However, any non-pointer, 3719 // non-interface field appearing in ForceSendFields will be sent to the 3720 // server regardless of whether the field is empty or not. This may be 3721 // used to include empty fields in Patch requests. 3722 ForceSendFields []string `json:"-"` 3723 3724 // NullFields is a list of field names (e.g. "CreativeSizeValue") to 3725 // include in API requests with the JSON null value. By default, fields 3726 // with empty values are omitted from API requests. However, any field 3727 // with an empty value appearing in NullFields will be sent to the 3728 // server as null. It is an error if a field in this list has a 3729 // non-empty value. This may be used to include null fields in Patch 3730 // requests. 3731 NullFields []string `json:"-"` 3732} 3733 3734func (s *TargetingValue) MarshalJSON() ([]byte, error) { 3735 type NoMethod TargetingValue 3736 raw := NoMethod(*s) 3737 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3738} 3739 3740// TargetingValueCreativeSize: Next Id: 7 3741type TargetingValueCreativeSize struct { 3742 // AllowedFormats: The formats allowed by the publisher. 3743 AllowedFormats []string `json:"allowedFormats,omitempty"` 3744 3745 // CompanionSizes: For video size type, the list of companion sizes. 3746 CompanionSizes []*TargetingValueSize `json:"companionSizes,omitempty"` 3747 3748 // CreativeSizeType: The Creative size type. 3749 CreativeSizeType string `json:"creativeSizeType,omitempty"` 3750 3751 // NativeTemplate: The native template for native ad. 3752 NativeTemplate string `json:"nativeTemplate,omitempty"` 3753 3754 // Size: For regular or video creative size type, specifies the size of 3755 // the creative. 3756 Size *TargetingValueSize `json:"size,omitempty"` 3757 3758 // SkippableAdType: The skippable ad type for video size. 3759 SkippableAdType string `json:"skippableAdType,omitempty"` 3760 3761 // ForceSendFields is a list of field names (e.g. "AllowedFormats") to 3762 // unconditionally include in API requests. By default, fields with 3763 // empty values are omitted from API requests. However, any non-pointer, 3764 // non-interface field appearing in ForceSendFields will be sent to the 3765 // server regardless of whether the field is empty or not. This may be 3766 // used to include empty fields in Patch requests. 3767 ForceSendFields []string `json:"-"` 3768 3769 // NullFields is a list of field names (e.g. "AllowedFormats") to 3770 // include in API requests with the JSON null value. By default, fields 3771 // with empty values are omitted from API requests. However, any field 3772 // with an empty value appearing in NullFields will be sent to the 3773 // server as null. It is an error if a field in this list has a 3774 // non-empty value. This may be used to include null fields in Patch 3775 // requests. 3776 NullFields []string `json:"-"` 3777} 3778 3779func (s *TargetingValueCreativeSize) MarshalJSON() ([]byte, error) { 3780 type NoMethod TargetingValueCreativeSize 3781 raw := NoMethod(*s) 3782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3783} 3784 3785type TargetingValueDayPartTargeting struct { 3786 DayParts []*TargetingValueDayPartTargetingDayPart `json:"dayParts,omitempty"` 3787 3788 TimeZoneType string `json:"timeZoneType,omitempty"` 3789 3790 // ForceSendFields is a list of field names (e.g. "DayParts") to 3791 // unconditionally include in API requests. By default, fields with 3792 // empty values are omitted from API requests. However, any non-pointer, 3793 // non-interface field appearing in ForceSendFields will be sent to the 3794 // server regardless of whether the field is empty or not. This may be 3795 // used to include empty fields in Patch requests. 3796 ForceSendFields []string `json:"-"` 3797 3798 // NullFields is a list of field names (e.g. "DayParts") to include in 3799 // API requests with the JSON null value. By default, fields with empty 3800 // values are omitted from API requests. However, any field with an 3801 // empty value appearing in NullFields will be sent to the server as 3802 // null. It is an error if a field in this list has a non-empty value. 3803 // This may be used to include null fields in Patch requests. 3804 NullFields []string `json:"-"` 3805} 3806 3807func (s *TargetingValueDayPartTargeting) MarshalJSON() ([]byte, error) { 3808 type NoMethod TargetingValueDayPartTargeting 3809 raw := NoMethod(*s) 3810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3811} 3812 3813type TargetingValueDayPartTargetingDayPart struct { 3814 DayOfWeek string `json:"dayOfWeek,omitempty"` 3815 3816 EndHour int64 `json:"endHour,omitempty"` 3817 3818 EndMinute int64 `json:"endMinute,omitempty"` 3819 3820 StartHour int64 `json:"startHour,omitempty"` 3821 3822 StartMinute int64 `json:"startMinute,omitempty"` 3823 3824 // ForceSendFields is a list of field names (e.g. "DayOfWeek") to 3825 // unconditionally include in API requests. By default, fields with 3826 // empty values are omitted from API requests. However, any non-pointer, 3827 // non-interface field appearing in ForceSendFields will be sent to the 3828 // server regardless of whether the field is empty or not. This may be 3829 // used to include empty fields in Patch requests. 3830 ForceSendFields []string `json:"-"` 3831 3832 // NullFields is a list of field names (e.g. "DayOfWeek") to include in 3833 // API requests with the JSON null value. By default, fields with empty 3834 // values are omitted from API requests. However, any field with an 3835 // empty value appearing in NullFields will be sent to the server as 3836 // null. It is an error if a field in this list has a non-empty value. 3837 // This may be used to include null fields in Patch requests. 3838 NullFields []string `json:"-"` 3839} 3840 3841func (s *TargetingValueDayPartTargetingDayPart) MarshalJSON() ([]byte, error) { 3842 type NoMethod TargetingValueDayPartTargetingDayPart 3843 raw := NoMethod(*s) 3844 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3845} 3846 3847type TargetingValueDemogAgeCriteria struct { 3848 DemogAgeCriteriaIds []string `json:"demogAgeCriteriaIds,omitempty"` 3849 3850 // ForceSendFields is a list of field names (e.g. "DemogAgeCriteriaIds") 3851 // to unconditionally include in API requests. By default, fields with 3852 // empty values are omitted from API requests. However, any non-pointer, 3853 // non-interface field appearing in ForceSendFields will be sent to the 3854 // server regardless of whether the field is empty or not. This may be 3855 // used to include empty fields in Patch requests. 3856 ForceSendFields []string `json:"-"` 3857 3858 // NullFields is a list of field names (e.g. "DemogAgeCriteriaIds") to 3859 // include in API requests with the JSON null value. By default, fields 3860 // with empty values are omitted from API requests. However, any field 3861 // with an empty value appearing in NullFields will be sent to the 3862 // server as null. It is an error if a field in this list has a 3863 // non-empty value. This may be used to include null fields in Patch 3864 // requests. 3865 NullFields []string `json:"-"` 3866} 3867 3868func (s *TargetingValueDemogAgeCriteria) MarshalJSON() ([]byte, error) { 3869 type NoMethod TargetingValueDemogAgeCriteria 3870 raw := NoMethod(*s) 3871 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3872} 3873 3874type TargetingValueDemogGenderCriteria struct { 3875 DemogGenderCriteriaIds []string `json:"demogGenderCriteriaIds,omitempty"` 3876 3877 // ForceSendFields is a list of field names (e.g. 3878 // "DemogGenderCriteriaIds") to unconditionally include in API requests. 3879 // By default, fields with empty values are omitted from API requests. 3880 // However, any non-pointer, non-interface field appearing in 3881 // ForceSendFields will be sent to the server regardless of whether the 3882 // field is empty or not. This may be used to include empty fields in 3883 // Patch requests. 3884 ForceSendFields []string `json:"-"` 3885 3886 // NullFields is a list of field names (e.g. "DemogGenderCriteriaIds") 3887 // to include in API requests with the JSON null value. By default, 3888 // fields with empty values are omitted from API requests. However, any 3889 // field with an empty value appearing in NullFields will be sent to the 3890 // server as null. It is an error if a field in this list has a 3891 // non-empty value. This may be used to include null fields in Patch 3892 // requests. 3893 NullFields []string `json:"-"` 3894} 3895 3896func (s *TargetingValueDemogGenderCriteria) MarshalJSON() ([]byte, error) { 3897 type NoMethod TargetingValueDemogGenderCriteria 3898 raw := NoMethod(*s) 3899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3900} 3901 3902type TargetingValueSize struct { 3903 // Height: The height of the creative. 3904 Height int64 `json:"height,omitempty"` 3905 3906 // Width: The width of the creative. 3907 Width int64 `json:"width,omitempty"` 3908 3909 // ForceSendFields is a list of field names (e.g. "Height") to 3910 // unconditionally include in API requests. By default, fields with 3911 // empty values are omitted from API requests. However, any non-pointer, 3912 // non-interface field appearing in ForceSendFields will be sent to the 3913 // server regardless of whether the field is empty or not. This may be 3914 // used to include empty fields in Patch requests. 3915 ForceSendFields []string `json:"-"` 3916 3917 // NullFields is a list of field names (e.g. "Height") to include in API 3918 // requests with the JSON null value. By default, fields with empty 3919 // values are omitted from API requests. However, any field with an 3920 // empty value appearing in NullFields will be sent to the server as 3921 // null. It is an error if a field in this list has a non-empty value. 3922 // This may be used to include null fields in Patch requests. 3923 NullFields []string `json:"-"` 3924} 3925 3926func (s *TargetingValueSize) MarshalJSON() ([]byte, error) { 3927 type NoMethod TargetingValueSize 3928 raw := NoMethod(*s) 3929 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3930} 3931 3932type UpdatePrivateAuctionProposalRequest struct { 3933 // ExternalDealId: The externalDealId of the deal to be updated. 3934 ExternalDealId string `json:"externalDealId,omitempty"` 3935 3936 // Note: Optional note to be added. 3937 Note *MarketplaceNote `json:"note,omitempty"` 3938 3939 // ProposalRevisionNumber: The current revision number of the proposal 3940 // to be updated. 3941 ProposalRevisionNumber int64 `json:"proposalRevisionNumber,omitempty,string"` 3942 3943 // UpdateAction: The proposed action on the private auction proposal. 3944 UpdateAction string `json:"updateAction,omitempty"` 3945 3946 // ForceSendFields is a list of field names (e.g. "ExternalDealId") to 3947 // unconditionally include in API requests. By default, fields with 3948 // empty values are omitted from API requests. However, any non-pointer, 3949 // non-interface field appearing in ForceSendFields will be sent to the 3950 // server regardless of whether the field is empty or not. This may be 3951 // used to include empty fields in Patch requests. 3952 ForceSendFields []string `json:"-"` 3953 3954 // NullFields is a list of field names (e.g. "ExternalDealId") to 3955 // include in API requests with the JSON null value. By default, fields 3956 // with empty values are omitted from API requests. However, any field 3957 // with an empty value appearing in NullFields will be sent to the 3958 // server as null. It is an error if a field in this list has a 3959 // non-empty value. This may be used to include null fields in Patch 3960 // requests. 3961 NullFields []string `json:"-"` 3962} 3963 3964func (s *UpdatePrivateAuctionProposalRequest) MarshalJSON() ([]byte, error) { 3965 type NoMethod UpdatePrivateAuctionProposalRequest 3966 raw := NoMethod(*s) 3967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3968} 3969 3970// method id "adexchangebuyer.accounts.get": 3971 3972type AccountsGetCall struct { 3973 s *Service 3974 id int64 3975 urlParams_ gensupport.URLParams 3976 ifNoneMatch_ string 3977 ctx_ context.Context 3978 header_ http.Header 3979} 3980 3981// Get: Gets one account by ID. 3982func (r *AccountsService) Get(id int64) *AccountsGetCall { 3983 c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3984 c.id = id 3985 return c 3986} 3987 3988// Fields allows partial responses to be retrieved. See 3989// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3990// for more information. 3991func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall { 3992 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3993 return c 3994} 3995 3996// IfNoneMatch sets the optional parameter which makes the operation 3997// fail if the object's ETag matches the given value. This is useful for 3998// getting updates only after the object has changed since the last 3999// request. Use googleapi.IsNotModified to check whether the response 4000// error from Do is the result of In-None-Match. 4001func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall { 4002 c.ifNoneMatch_ = entityTag 4003 return c 4004} 4005 4006// Context sets the context to be used in this call's Do method. Any 4007// pending HTTP request will be aborted if the provided context is 4008// canceled. 4009func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall { 4010 c.ctx_ = ctx 4011 return c 4012} 4013 4014// Header returns an http.Header that can be modified by the caller to 4015// add HTTP headers to the request. 4016func (c *AccountsGetCall) Header() http.Header { 4017 if c.header_ == nil { 4018 c.header_ = make(http.Header) 4019 } 4020 return c.header_ 4021} 4022 4023func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) { 4024 reqHeaders := make(http.Header) 4025 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4026 for k, v := range c.header_ { 4027 reqHeaders[k] = v 4028 } 4029 reqHeaders.Set("User-Agent", c.s.userAgent()) 4030 if c.ifNoneMatch_ != "" { 4031 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4032 } 4033 var body io.Reader = nil 4034 c.urlParams_.Set("alt", alt) 4035 c.urlParams_.Set("prettyPrint", "false") 4036 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}") 4037 urls += "?" + c.urlParams_.Encode() 4038 req, err := http.NewRequest("GET", urls, body) 4039 if err != nil { 4040 return nil, err 4041 } 4042 req.Header = reqHeaders 4043 googleapi.Expand(req.URL, map[string]string{ 4044 "id": strconv.FormatInt(c.id, 10), 4045 }) 4046 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4047} 4048 4049// Do executes the "adexchangebuyer.accounts.get" call. 4050// Exactly one of *Account or error will be non-nil. Any non-2xx status 4051// code is an error. Response headers are in either 4052// *Account.ServerResponse.Header or (if a response was returned at all) 4053// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4054// check whether the returned error was because http.StatusNotModified 4055// was returned. 4056func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) { 4057 gensupport.SetOptions(c.urlParams_, opts...) 4058 res, err := c.doRequest("json") 4059 if res != nil && res.StatusCode == http.StatusNotModified { 4060 if res.Body != nil { 4061 res.Body.Close() 4062 } 4063 return nil, &googleapi.Error{ 4064 Code: res.StatusCode, 4065 Header: res.Header, 4066 } 4067 } 4068 if err != nil { 4069 return nil, err 4070 } 4071 defer googleapi.CloseBody(res) 4072 if err := googleapi.CheckResponse(res); err != nil { 4073 return nil, err 4074 } 4075 ret := &Account{ 4076 ServerResponse: googleapi.ServerResponse{ 4077 Header: res.Header, 4078 HTTPStatusCode: res.StatusCode, 4079 }, 4080 } 4081 target := &ret 4082 if err := gensupport.DecodeResponse(target, res); err != nil { 4083 return nil, err 4084 } 4085 return ret, nil 4086 // { 4087 // "description": "Gets one account by ID.", 4088 // "httpMethod": "GET", 4089 // "id": "adexchangebuyer.accounts.get", 4090 // "parameterOrder": [ 4091 // "id" 4092 // ], 4093 // "parameters": { 4094 // "id": { 4095 // "description": "The account id", 4096 // "format": "int32", 4097 // "location": "path", 4098 // "required": true, 4099 // "type": "integer" 4100 // } 4101 // }, 4102 // "path": "accounts/{id}", 4103 // "response": { 4104 // "$ref": "Account" 4105 // }, 4106 // "scopes": [ 4107 // "https://www.googleapis.com/auth/adexchange.buyer" 4108 // ] 4109 // } 4110 4111} 4112 4113// method id "adexchangebuyer.accounts.list": 4114 4115type AccountsListCall struct { 4116 s *Service 4117 urlParams_ gensupport.URLParams 4118 ifNoneMatch_ string 4119 ctx_ context.Context 4120 header_ http.Header 4121} 4122 4123// List: Retrieves the authenticated user's list of accounts. 4124func (r *AccountsService) List() *AccountsListCall { 4125 c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4126 return c 4127} 4128 4129// Fields allows partial responses to be retrieved. See 4130// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4131// for more information. 4132func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall { 4133 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4134 return c 4135} 4136 4137// IfNoneMatch sets the optional parameter which makes the operation 4138// fail if the object's ETag matches the given value. This is useful for 4139// getting updates only after the object has changed since the last 4140// request. Use googleapi.IsNotModified to check whether the response 4141// error from Do is the result of In-None-Match. 4142func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall { 4143 c.ifNoneMatch_ = entityTag 4144 return c 4145} 4146 4147// Context sets the context to be used in this call's Do method. Any 4148// pending HTTP request will be aborted if the provided context is 4149// canceled. 4150func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall { 4151 c.ctx_ = ctx 4152 return c 4153} 4154 4155// Header returns an http.Header that can be modified by the caller to 4156// add HTTP headers to the request. 4157func (c *AccountsListCall) Header() http.Header { 4158 if c.header_ == nil { 4159 c.header_ = make(http.Header) 4160 } 4161 return c.header_ 4162} 4163 4164func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) { 4165 reqHeaders := make(http.Header) 4166 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4167 for k, v := range c.header_ { 4168 reqHeaders[k] = v 4169 } 4170 reqHeaders.Set("User-Agent", c.s.userAgent()) 4171 if c.ifNoneMatch_ != "" { 4172 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4173 } 4174 var body io.Reader = nil 4175 c.urlParams_.Set("alt", alt) 4176 c.urlParams_.Set("prettyPrint", "false") 4177 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts") 4178 urls += "?" + c.urlParams_.Encode() 4179 req, err := http.NewRequest("GET", urls, body) 4180 if err != nil { 4181 return nil, err 4182 } 4183 req.Header = reqHeaders 4184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4185} 4186 4187// Do executes the "adexchangebuyer.accounts.list" call. 4188// Exactly one of *AccountsList or error will be non-nil. Any non-2xx 4189// status code is an error. Response headers are in either 4190// *AccountsList.ServerResponse.Header or (if a response was returned at 4191// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4192// to check whether the returned error was because 4193// http.StatusNotModified was returned. 4194func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsList, error) { 4195 gensupport.SetOptions(c.urlParams_, opts...) 4196 res, err := c.doRequest("json") 4197 if res != nil && res.StatusCode == http.StatusNotModified { 4198 if res.Body != nil { 4199 res.Body.Close() 4200 } 4201 return nil, &googleapi.Error{ 4202 Code: res.StatusCode, 4203 Header: res.Header, 4204 } 4205 } 4206 if err != nil { 4207 return nil, err 4208 } 4209 defer googleapi.CloseBody(res) 4210 if err := googleapi.CheckResponse(res); err != nil { 4211 return nil, err 4212 } 4213 ret := &AccountsList{ 4214 ServerResponse: googleapi.ServerResponse{ 4215 Header: res.Header, 4216 HTTPStatusCode: res.StatusCode, 4217 }, 4218 } 4219 target := &ret 4220 if err := gensupport.DecodeResponse(target, res); err != nil { 4221 return nil, err 4222 } 4223 return ret, nil 4224 // { 4225 // "description": "Retrieves the authenticated user's list of accounts.", 4226 // "httpMethod": "GET", 4227 // "id": "adexchangebuyer.accounts.list", 4228 // "path": "accounts", 4229 // "response": { 4230 // "$ref": "AccountsList" 4231 // }, 4232 // "scopes": [ 4233 // "https://www.googleapis.com/auth/adexchange.buyer" 4234 // ] 4235 // } 4236 4237} 4238 4239// method id "adexchangebuyer.accounts.patch": 4240 4241type AccountsPatchCall struct { 4242 s *Service 4243 id int64 4244 account *Account 4245 urlParams_ gensupport.URLParams 4246 ctx_ context.Context 4247 header_ http.Header 4248} 4249 4250// Patch: Updates an existing account. This method supports patch 4251// semantics. 4252func (r *AccountsService) Patch(id int64, account *Account) *AccountsPatchCall { 4253 c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4254 c.id = id 4255 c.account = account 4256 return c 4257} 4258 4259// ConfirmUnsafeAccountChange sets the optional parameter 4260// "confirmUnsafeAccountChange": Confirmation for erasing bidder and 4261// cookie matching urls. 4262func (c *AccountsPatchCall) ConfirmUnsafeAccountChange(confirmUnsafeAccountChange bool) *AccountsPatchCall { 4263 c.urlParams_.Set("confirmUnsafeAccountChange", fmt.Sprint(confirmUnsafeAccountChange)) 4264 return c 4265} 4266 4267// Fields allows partial responses to be retrieved. See 4268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4269// for more information. 4270func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall { 4271 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4272 return c 4273} 4274 4275// Context sets the context to be used in this call's Do method. Any 4276// pending HTTP request will be aborted if the provided context is 4277// canceled. 4278func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall { 4279 c.ctx_ = ctx 4280 return c 4281} 4282 4283// Header returns an http.Header that can be modified by the caller to 4284// add HTTP headers to the request. 4285func (c *AccountsPatchCall) Header() http.Header { 4286 if c.header_ == nil { 4287 c.header_ = make(http.Header) 4288 } 4289 return c.header_ 4290} 4291 4292func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) { 4293 reqHeaders := make(http.Header) 4294 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4295 for k, v := range c.header_ { 4296 reqHeaders[k] = v 4297 } 4298 reqHeaders.Set("User-Agent", c.s.userAgent()) 4299 var body io.Reader = nil 4300 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 4301 if err != nil { 4302 return nil, err 4303 } 4304 reqHeaders.Set("Content-Type", "application/json") 4305 c.urlParams_.Set("alt", alt) 4306 c.urlParams_.Set("prettyPrint", "false") 4307 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}") 4308 urls += "?" + c.urlParams_.Encode() 4309 req, err := http.NewRequest("PATCH", urls, body) 4310 if err != nil { 4311 return nil, err 4312 } 4313 req.Header = reqHeaders 4314 googleapi.Expand(req.URL, map[string]string{ 4315 "id": strconv.FormatInt(c.id, 10), 4316 }) 4317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4318} 4319 4320// Do executes the "adexchangebuyer.accounts.patch" call. 4321// Exactly one of *Account or error will be non-nil. Any non-2xx status 4322// code is an error. Response headers are in either 4323// *Account.ServerResponse.Header or (if a response was returned at all) 4324// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4325// check whether the returned error was because http.StatusNotModified 4326// was returned. 4327func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) { 4328 gensupport.SetOptions(c.urlParams_, opts...) 4329 res, err := c.doRequest("json") 4330 if res != nil && res.StatusCode == http.StatusNotModified { 4331 if res.Body != nil { 4332 res.Body.Close() 4333 } 4334 return nil, &googleapi.Error{ 4335 Code: res.StatusCode, 4336 Header: res.Header, 4337 } 4338 } 4339 if err != nil { 4340 return nil, err 4341 } 4342 defer googleapi.CloseBody(res) 4343 if err := googleapi.CheckResponse(res); err != nil { 4344 return nil, err 4345 } 4346 ret := &Account{ 4347 ServerResponse: googleapi.ServerResponse{ 4348 Header: res.Header, 4349 HTTPStatusCode: res.StatusCode, 4350 }, 4351 } 4352 target := &ret 4353 if err := gensupport.DecodeResponse(target, res); err != nil { 4354 return nil, err 4355 } 4356 return ret, nil 4357 // { 4358 // "description": "Updates an existing account. This method supports patch semantics.", 4359 // "httpMethod": "PATCH", 4360 // "id": "adexchangebuyer.accounts.patch", 4361 // "parameterOrder": [ 4362 // "id" 4363 // ], 4364 // "parameters": { 4365 // "confirmUnsafeAccountChange": { 4366 // "description": "Confirmation for erasing bidder and cookie matching urls.", 4367 // "location": "query", 4368 // "type": "boolean" 4369 // }, 4370 // "id": { 4371 // "description": "The account id", 4372 // "format": "int32", 4373 // "location": "path", 4374 // "required": true, 4375 // "type": "integer" 4376 // } 4377 // }, 4378 // "path": "accounts/{id}", 4379 // "request": { 4380 // "$ref": "Account" 4381 // }, 4382 // "response": { 4383 // "$ref": "Account" 4384 // }, 4385 // "scopes": [ 4386 // "https://www.googleapis.com/auth/adexchange.buyer" 4387 // ] 4388 // } 4389 4390} 4391 4392// method id "adexchangebuyer.accounts.update": 4393 4394type AccountsUpdateCall struct { 4395 s *Service 4396 id int64 4397 account *Account 4398 urlParams_ gensupport.URLParams 4399 ctx_ context.Context 4400 header_ http.Header 4401} 4402 4403// Update: Updates an existing account. 4404func (r *AccountsService) Update(id int64, account *Account) *AccountsUpdateCall { 4405 c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4406 c.id = id 4407 c.account = account 4408 return c 4409} 4410 4411// ConfirmUnsafeAccountChange sets the optional parameter 4412// "confirmUnsafeAccountChange": Confirmation for erasing bidder and 4413// cookie matching urls. 4414func (c *AccountsUpdateCall) ConfirmUnsafeAccountChange(confirmUnsafeAccountChange bool) *AccountsUpdateCall { 4415 c.urlParams_.Set("confirmUnsafeAccountChange", fmt.Sprint(confirmUnsafeAccountChange)) 4416 return c 4417} 4418 4419// Fields allows partial responses to be retrieved. See 4420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4421// for more information. 4422func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall { 4423 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4424 return c 4425} 4426 4427// Context sets the context to be used in this call's Do method. Any 4428// pending HTTP request will be aborted if the provided context is 4429// canceled. 4430func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall { 4431 c.ctx_ = ctx 4432 return c 4433} 4434 4435// Header returns an http.Header that can be modified by the caller to 4436// add HTTP headers to the request. 4437func (c *AccountsUpdateCall) Header() http.Header { 4438 if c.header_ == nil { 4439 c.header_ = make(http.Header) 4440 } 4441 return c.header_ 4442} 4443 4444func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) { 4445 reqHeaders := make(http.Header) 4446 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4447 for k, v := range c.header_ { 4448 reqHeaders[k] = v 4449 } 4450 reqHeaders.Set("User-Agent", c.s.userAgent()) 4451 var body io.Reader = nil 4452 body, err := googleapi.WithoutDataWrapper.JSONReader(c.account) 4453 if err != nil { 4454 return nil, err 4455 } 4456 reqHeaders.Set("Content-Type", "application/json") 4457 c.urlParams_.Set("alt", alt) 4458 c.urlParams_.Set("prettyPrint", "false") 4459 urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/{id}") 4460 urls += "?" + c.urlParams_.Encode() 4461 req, err := http.NewRequest("PUT", urls, body) 4462 if err != nil { 4463 return nil, err 4464 } 4465 req.Header = reqHeaders 4466 googleapi.Expand(req.URL, map[string]string{ 4467 "id": strconv.FormatInt(c.id, 10), 4468 }) 4469 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4470} 4471 4472// Do executes the "adexchangebuyer.accounts.update" call. 4473// Exactly one of *Account or error will be non-nil. Any non-2xx status 4474// code is an error. Response headers are in either 4475// *Account.ServerResponse.Header or (if a response was returned at all) 4476// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4477// check whether the returned error was because http.StatusNotModified 4478// was returned. 4479func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) { 4480 gensupport.SetOptions(c.urlParams_, opts...) 4481 res, err := c.doRequest("json") 4482 if res != nil && res.StatusCode == http.StatusNotModified { 4483 if res.Body != nil { 4484 res.Body.Close() 4485 } 4486 return nil, &googleapi.Error{ 4487 Code: res.StatusCode, 4488 Header: res.Header, 4489 } 4490 } 4491 if err != nil { 4492 return nil, err 4493 } 4494 defer googleapi.CloseBody(res) 4495 if err := googleapi.CheckResponse(res); err != nil { 4496 return nil, err 4497 } 4498 ret := &Account{ 4499 ServerResponse: googleapi.ServerResponse{ 4500 Header: res.Header, 4501 HTTPStatusCode: res.StatusCode, 4502 }, 4503 } 4504 target := &ret 4505 if err := gensupport.DecodeResponse(target, res); err != nil { 4506 return nil, err 4507 } 4508 return ret, nil 4509 // { 4510 // "description": "Updates an existing account.", 4511 // "httpMethod": "PUT", 4512 // "id": "adexchangebuyer.accounts.update", 4513 // "parameterOrder": [ 4514 // "id" 4515 // ], 4516 // "parameters": { 4517 // "confirmUnsafeAccountChange": { 4518 // "description": "Confirmation for erasing bidder and cookie matching urls.", 4519 // "location": "query", 4520 // "type": "boolean" 4521 // }, 4522 // "id": { 4523 // "description": "The account id", 4524 // "format": "int32", 4525 // "location": "path", 4526 // "required": true, 4527 // "type": "integer" 4528 // } 4529 // }, 4530 // "path": "accounts/{id}", 4531 // "request": { 4532 // "$ref": "Account" 4533 // }, 4534 // "response": { 4535 // "$ref": "Account" 4536 // }, 4537 // "scopes": [ 4538 // "https://www.googleapis.com/auth/adexchange.buyer" 4539 // ] 4540 // } 4541 4542} 4543 4544// method id "adexchangebuyer.billingInfo.get": 4545 4546type BillingInfoGetCall struct { 4547 s *Service 4548 accountId int64 4549 urlParams_ gensupport.URLParams 4550 ifNoneMatch_ string 4551 ctx_ context.Context 4552 header_ http.Header 4553} 4554 4555// Get: Returns the billing information for one account specified by 4556// account ID. 4557func (r *BillingInfoService) Get(accountId int64) *BillingInfoGetCall { 4558 c := &BillingInfoGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4559 c.accountId = accountId 4560 return c 4561} 4562 4563// Fields allows partial responses to be retrieved. See 4564// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4565// for more information. 4566func (c *BillingInfoGetCall) Fields(s ...googleapi.Field) *BillingInfoGetCall { 4567 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4568 return c 4569} 4570 4571// IfNoneMatch sets the optional parameter which makes the operation 4572// fail if the object's ETag matches the given value. This is useful for 4573// getting updates only after the object has changed since the last 4574// request. Use googleapi.IsNotModified to check whether the response 4575// error from Do is the result of In-None-Match. 4576func (c *BillingInfoGetCall) IfNoneMatch(entityTag string) *BillingInfoGetCall { 4577 c.ifNoneMatch_ = entityTag 4578 return c 4579} 4580 4581// Context sets the context to be used in this call's Do method. Any 4582// pending HTTP request will be aborted if the provided context is 4583// canceled. 4584func (c *BillingInfoGetCall) Context(ctx context.Context) *BillingInfoGetCall { 4585 c.ctx_ = ctx 4586 return c 4587} 4588 4589// Header returns an http.Header that can be modified by the caller to 4590// add HTTP headers to the request. 4591func (c *BillingInfoGetCall) Header() http.Header { 4592 if c.header_ == nil { 4593 c.header_ = make(http.Header) 4594 } 4595 return c.header_ 4596} 4597 4598func (c *BillingInfoGetCall) doRequest(alt string) (*http.Response, error) { 4599 reqHeaders := make(http.Header) 4600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4601 for k, v := range c.header_ { 4602 reqHeaders[k] = v 4603 } 4604 reqHeaders.Set("User-Agent", c.s.userAgent()) 4605 if c.ifNoneMatch_ != "" { 4606 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4607 } 4608 var body io.Reader = nil 4609 c.urlParams_.Set("alt", alt) 4610 c.urlParams_.Set("prettyPrint", "false") 4611 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}") 4612 urls += "?" + c.urlParams_.Encode() 4613 req, err := http.NewRequest("GET", urls, body) 4614 if err != nil { 4615 return nil, err 4616 } 4617 req.Header = reqHeaders 4618 googleapi.Expand(req.URL, map[string]string{ 4619 "accountId": strconv.FormatInt(c.accountId, 10), 4620 }) 4621 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4622} 4623 4624// Do executes the "adexchangebuyer.billingInfo.get" call. 4625// Exactly one of *BillingInfo or error will be non-nil. Any non-2xx 4626// status code is an error. Response headers are in either 4627// *BillingInfo.ServerResponse.Header or (if a response was returned at 4628// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4629// to check whether the returned error was because 4630// http.StatusNotModified was returned. 4631func (c *BillingInfoGetCall) Do(opts ...googleapi.CallOption) (*BillingInfo, error) { 4632 gensupport.SetOptions(c.urlParams_, opts...) 4633 res, err := c.doRequest("json") 4634 if res != nil && res.StatusCode == http.StatusNotModified { 4635 if res.Body != nil { 4636 res.Body.Close() 4637 } 4638 return nil, &googleapi.Error{ 4639 Code: res.StatusCode, 4640 Header: res.Header, 4641 } 4642 } 4643 if err != nil { 4644 return nil, err 4645 } 4646 defer googleapi.CloseBody(res) 4647 if err := googleapi.CheckResponse(res); err != nil { 4648 return nil, err 4649 } 4650 ret := &BillingInfo{ 4651 ServerResponse: googleapi.ServerResponse{ 4652 Header: res.Header, 4653 HTTPStatusCode: res.StatusCode, 4654 }, 4655 } 4656 target := &ret 4657 if err := gensupport.DecodeResponse(target, res); err != nil { 4658 return nil, err 4659 } 4660 return ret, nil 4661 // { 4662 // "description": "Returns the billing information for one account specified by account ID.", 4663 // "httpMethod": "GET", 4664 // "id": "adexchangebuyer.billingInfo.get", 4665 // "parameterOrder": [ 4666 // "accountId" 4667 // ], 4668 // "parameters": { 4669 // "accountId": { 4670 // "description": "The account id.", 4671 // "format": "int32", 4672 // "location": "path", 4673 // "required": true, 4674 // "type": "integer" 4675 // } 4676 // }, 4677 // "path": "billinginfo/{accountId}", 4678 // "response": { 4679 // "$ref": "BillingInfo" 4680 // }, 4681 // "scopes": [ 4682 // "https://www.googleapis.com/auth/adexchange.buyer" 4683 // ] 4684 // } 4685 4686} 4687 4688// method id "adexchangebuyer.billingInfo.list": 4689 4690type BillingInfoListCall struct { 4691 s *Service 4692 urlParams_ gensupport.URLParams 4693 ifNoneMatch_ string 4694 ctx_ context.Context 4695 header_ http.Header 4696} 4697 4698// List: Retrieves a list of billing information for all accounts of the 4699// authenticated user. 4700func (r *BillingInfoService) List() *BillingInfoListCall { 4701 c := &BillingInfoListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4702 return c 4703} 4704 4705// Fields allows partial responses to be retrieved. See 4706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4707// for more information. 4708func (c *BillingInfoListCall) Fields(s ...googleapi.Field) *BillingInfoListCall { 4709 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4710 return c 4711} 4712 4713// IfNoneMatch sets the optional parameter which makes the operation 4714// fail if the object's ETag matches the given value. This is useful for 4715// getting updates only after the object has changed since the last 4716// request. Use googleapi.IsNotModified to check whether the response 4717// error from Do is the result of In-None-Match. 4718func (c *BillingInfoListCall) IfNoneMatch(entityTag string) *BillingInfoListCall { 4719 c.ifNoneMatch_ = entityTag 4720 return c 4721} 4722 4723// Context sets the context to be used in this call's Do method. Any 4724// pending HTTP request will be aborted if the provided context is 4725// canceled. 4726func (c *BillingInfoListCall) Context(ctx context.Context) *BillingInfoListCall { 4727 c.ctx_ = ctx 4728 return c 4729} 4730 4731// Header returns an http.Header that can be modified by the caller to 4732// add HTTP headers to the request. 4733func (c *BillingInfoListCall) Header() http.Header { 4734 if c.header_ == nil { 4735 c.header_ = make(http.Header) 4736 } 4737 return c.header_ 4738} 4739 4740func (c *BillingInfoListCall) doRequest(alt string) (*http.Response, error) { 4741 reqHeaders := make(http.Header) 4742 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4743 for k, v := range c.header_ { 4744 reqHeaders[k] = v 4745 } 4746 reqHeaders.Set("User-Agent", c.s.userAgent()) 4747 if c.ifNoneMatch_ != "" { 4748 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4749 } 4750 var body io.Reader = nil 4751 c.urlParams_.Set("alt", alt) 4752 c.urlParams_.Set("prettyPrint", "false") 4753 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo") 4754 urls += "?" + c.urlParams_.Encode() 4755 req, err := http.NewRequest("GET", urls, body) 4756 if err != nil { 4757 return nil, err 4758 } 4759 req.Header = reqHeaders 4760 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4761} 4762 4763// Do executes the "adexchangebuyer.billingInfo.list" call. 4764// Exactly one of *BillingInfoList or error will be non-nil. Any non-2xx 4765// status code is an error. Response headers are in either 4766// *BillingInfoList.ServerResponse.Header or (if a response was returned 4767// at all) in error.(*googleapi.Error).Header. Use 4768// googleapi.IsNotModified to check whether the returned error was 4769// because http.StatusNotModified was returned. 4770func (c *BillingInfoListCall) Do(opts ...googleapi.CallOption) (*BillingInfoList, error) { 4771 gensupport.SetOptions(c.urlParams_, opts...) 4772 res, err := c.doRequest("json") 4773 if res != nil && res.StatusCode == http.StatusNotModified { 4774 if res.Body != nil { 4775 res.Body.Close() 4776 } 4777 return nil, &googleapi.Error{ 4778 Code: res.StatusCode, 4779 Header: res.Header, 4780 } 4781 } 4782 if err != nil { 4783 return nil, err 4784 } 4785 defer googleapi.CloseBody(res) 4786 if err := googleapi.CheckResponse(res); err != nil { 4787 return nil, err 4788 } 4789 ret := &BillingInfoList{ 4790 ServerResponse: googleapi.ServerResponse{ 4791 Header: res.Header, 4792 HTTPStatusCode: res.StatusCode, 4793 }, 4794 } 4795 target := &ret 4796 if err := gensupport.DecodeResponse(target, res); err != nil { 4797 return nil, err 4798 } 4799 return ret, nil 4800 // { 4801 // "description": "Retrieves a list of billing information for all accounts of the authenticated user.", 4802 // "httpMethod": "GET", 4803 // "id": "adexchangebuyer.billingInfo.list", 4804 // "path": "billinginfo", 4805 // "response": { 4806 // "$ref": "BillingInfoList" 4807 // }, 4808 // "scopes": [ 4809 // "https://www.googleapis.com/auth/adexchange.buyer" 4810 // ] 4811 // } 4812 4813} 4814 4815// method id "adexchangebuyer.budget.get": 4816 4817type BudgetGetCall struct { 4818 s *Service 4819 accountId int64 4820 billingId int64 4821 urlParams_ gensupport.URLParams 4822 ifNoneMatch_ string 4823 ctx_ context.Context 4824 header_ http.Header 4825} 4826 4827// Get: Returns the budget information for the adgroup specified by the 4828// accountId and billingId. 4829func (r *BudgetService) Get(accountId int64, billingId int64) *BudgetGetCall { 4830 c := &BudgetGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4831 c.accountId = accountId 4832 c.billingId = billingId 4833 return c 4834} 4835 4836// Fields allows partial responses to be retrieved. See 4837// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4838// for more information. 4839func (c *BudgetGetCall) Fields(s ...googleapi.Field) *BudgetGetCall { 4840 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4841 return c 4842} 4843 4844// IfNoneMatch sets the optional parameter which makes the operation 4845// fail if the object's ETag matches the given value. This is useful for 4846// getting updates only after the object has changed since the last 4847// request. Use googleapi.IsNotModified to check whether the response 4848// error from Do is the result of In-None-Match. 4849func (c *BudgetGetCall) IfNoneMatch(entityTag string) *BudgetGetCall { 4850 c.ifNoneMatch_ = entityTag 4851 return c 4852} 4853 4854// Context sets the context to be used in this call's Do method. Any 4855// pending HTTP request will be aborted if the provided context is 4856// canceled. 4857func (c *BudgetGetCall) Context(ctx context.Context) *BudgetGetCall { 4858 c.ctx_ = ctx 4859 return c 4860} 4861 4862// Header returns an http.Header that can be modified by the caller to 4863// add HTTP headers to the request. 4864func (c *BudgetGetCall) Header() http.Header { 4865 if c.header_ == nil { 4866 c.header_ = make(http.Header) 4867 } 4868 return c.header_ 4869} 4870 4871func (c *BudgetGetCall) doRequest(alt string) (*http.Response, error) { 4872 reqHeaders := make(http.Header) 4873 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 4874 for k, v := range c.header_ { 4875 reqHeaders[k] = v 4876 } 4877 reqHeaders.Set("User-Agent", c.s.userAgent()) 4878 if c.ifNoneMatch_ != "" { 4879 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4880 } 4881 var body io.Reader = nil 4882 c.urlParams_.Set("alt", alt) 4883 c.urlParams_.Set("prettyPrint", "false") 4884 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}/{billingId}") 4885 urls += "?" + c.urlParams_.Encode() 4886 req, err := http.NewRequest("GET", urls, body) 4887 if err != nil { 4888 return nil, err 4889 } 4890 req.Header = reqHeaders 4891 googleapi.Expand(req.URL, map[string]string{ 4892 "accountId": strconv.FormatInt(c.accountId, 10), 4893 "billingId": strconv.FormatInt(c.billingId, 10), 4894 }) 4895 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4896} 4897 4898// Do executes the "adexchangebuyer.budget.get" call. 4899// Exactly one of *Budget or error will be non-nil. Any non-2xx status 4900// code is an error. Response headers are in either 4901// *Budget.ServerResponse.Header or (if a response was returned at all) 4902// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4903// check whether the returned error was because http.StatusNotModified 4904// was returned. 4905func (c *BudgetGetCall) Do(opts ...googleapi.CallOption) (*Budget, error) { 4906 gensupport.SetOptions(c.urlParams_, opts...) 4907 res, err := c.doRequest("json") 4908 if res != nil && res.StatusCode == http.StatusNotModified { 4909 if res.Body != nil { 4910 res.Body.Close() 4911 } 4912 return nil, &googleapi.Error{ 4913 Code: res.StatusCode, 4914 Header: res.Header, 4915 } 4916 } 4917 if err != nil { 4918 return nil, err 4919 } 4920 defer googleapi.CloseBody(res) 4921 if err := googleapi.CheckResponse(res); err != nil { 4922 return nil, err 4923 } 4924 ret := &Budget{ 4925 ServerResponse: googleapi.ServerResponse{ 4926 Header: res.Header, 4927 HTTPStatusCode: res.StatusCode, 4928 }, 4929 } 4930 target := &ret 4931 if err := gensupport.DecodeResponse(target, res); err != nil { 4932 return nil, err 4933 } 4934 return ret, nil 4935 // { 4936 // "description": "Returns the budget information for the adgroup specified by the accountId and billingId.", 4937 // "httpMethod": "GET", 4938 // "id": "adexchangebuyer.budget.get", 4939 // "parameterOrder": [ 4940 // "accountId", 4941 // "billingId" 4942 // ], 4943 // "parameters": { 4944 // "accountId": { 4945 // "description": "The account id to get the budget information for.", 4946 // "format": "int64", 4947 // "location": "path", 4948 // "required": true, 4949 // "type": "string" 4950 // }, 4951 // "billingId": { 4952 // "description": "The billing id to get the budget information for.", 4953 // "format": "int64", 4954 // "location": "path", 4955 // "required": true, 4956 // "type": "string" 4957 // } 4958 // }, 4959 // "path": "billinginfo/{accountId}/{billingId}", 4960 // "response": { 4961 // "$ref": "Budget" 4962 // }, 4963 // "scopes": [ 4964 // "https://www.googleapis.com/auth/adexchange.buyer" 4965 // ] 4966 // } 4967 4968} 4969 4970// method id "adexchangebuyer.budget.patch": 4971 4972type BudgetPatchCall struct { 4973 s *Service 4974 accountId int64 4975 billingId int64 4976 budget *Budget 4977 urlParams_ gensupport.URLParams 4978 ctx_ context.Context 4979 header_ http.Header 4980} 4981 4982// Patch: Updates the budget amount for the budget of the adgroup 4983// specified by the accountId and billingId, with the budget amount in 4984// the request. This method supports patch semantics. 4985func (r *BudgetService) Patch(accountId int64, billingId int64, budget *Budget) *BudgetPatchCall { 4986 c := &BudgetPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4987 c.accountId = accountId 4988 c.billingId = billingId 4989 c.budget = budget 4990 return c 4991} 4992 4993// Fields allows partial responses to be retrieved. See 4994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4995// for more information. 4996func (c *BudgetPatchCall) Fields(s ...googleapi.Field) *BudgetPatchCall { 4997 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4998 return c 4999} 5000 5001// Context sets the context to be used in this call's Do method. Any 5002// pending HTTP request will be aborted if the provided context is 5003// canceled. 5004func (c *BudgetPatchCall) Context(ctx context.Context) *BudgetPatchCall { 5005 c.ctx_ = ctx 5006 return c 5007} 5008 5009// Header returns an http.Header that can be modified by the caller to 5010// add HTTP headers to the request. 5011func (c *BudgetPatchCall) Header() http.Header { 5012 if c.header_ == nil { 5013 c.header_ = make(http.Header) 5014 } 5015 return c.header_ 5016} 5017 5018func (c *BudgetPatchCall) doRequest(alt string) (*http.Response, error) { 5019 reqHeaders := make(http.Header) 5020 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5021 for k, v := range c.header_ { 5022 reqHeaders[k] = v 5023 } 5024 reqHeaders.Set("User-Agent", c.s.userAgent()) 5025 var body io.Reader = nil 5026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget) 5027 if err != nil { 5028 return nil, err 5029 } 5030 reqHeaders.Set("Content-Type", "application/json") 5031 c.urlParams_.Set("alt", alt) 5032 c.urlParams_.Set("prettyPrint", "false") 5033 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}/{billingId}") 5034 urls += "?" + c.urlParams_.Encode() 5035 req, err := http.NewRequest("PATCH", urls, body) 5036 if err != nil { 5037 return nil, err 5038 } 5039 req.Header = reqHeaders 5040 googleapi.Expand(req.URL, map[string]string{ 5041 "accountId": strconv.FormatInt(c.accountId, 10), 5042 "billingId": strconv.FormatInt(c.billingId, 10), 5043 }) 5044 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5045} 5046 5047// Do executes the "adexchangebuyer.budget.patch" call. 5048// Exactly one of *Budget or error will be non-nil. Any non-2xx status 5049// code is an error. Response headers are in either 5050// *Budget.ServerResponse.Header or (if a response was returned at all) 5051// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5052// check whether the returned error was because http.StatusNotModified 5053// was returned. 5054func (c *BudgetPatchCall) Do(opts ...googleapi.CallOption) (*Budget, error) { 5055 gensupport.SetOptions(c.urlParams_, opts...) 5056 res, err := c.doRequest("json") 5057 if res != nil && res.StatusCode == http.StatusNotModified { 5058 if res.Body != nil { 5059 res.Body.Close() 5060 } 5061 return nil, &googleapi.Error{ 5062 Code: res.StatusCode, 5063 Header: res.Header, 5064 } 5065 } 5066 if err != nil { 5067 return nil, err 5068 } 5069 defer googleapi.CloseBody(res) 5070 if err := googleapi.CheckResponse(res); err != nil { 5071 return nil, err 5072 } 5073 ret := &Budget{ 5074 ServerResponse: googleapi.ServerResponse{ 5075 Header: res.Header, 5076 HTTPStatusCode: res.StatusCode, 5077 }, 5078 } 5079 target := &ret 5080 if err := gensupport.DecodeResponse(target, res); err != nil { 5081 return nil, err 5082 } 5083 return ret, nil 5084 // { 5085 // "description": "Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request. This method supports patch semantics.", 5086 // "httpMethod": "PATCH", 5087 // "id": "adexchangebuyer.budget.patch", 5088 // "parameterOrder": [ 5089 // "accountId", 5090 // "billingId" 5091 // ], 5092 // "parameters": { 5093 // "accountId": { 5094 // "description": "The account id associated with the budget being updated.", 5095 // "format": "int64", 5096 // "location": "path", 5097 // "required": true, 5098 // "type": "string" 5099 // }, 5100 // "billingId": { 5101 // "description": "The billing id associated with the budget being updated.", 5102 // "format": "int64", 5103 // "location": "path", 5104 // "required": true, 5105 // "type": "string" 5106 // } 5107 // }, 5108 // "path": "billinginfo/{accountId}/{billingId}", 5109 // "request": { 5110 // "$ref": "Budget" 5111 // }, 5112 // "response": { 5113 // "$ref": "Budget" 5114 // }, 5115 // "scopes": [ 5116 // "https://www.googleapis.com/auth/adexchange.buyer" 5117 // ] 5118 // } 5119 5120} 5121 5122// method id "adexchangebuyer.budget.update": 5123 5124type BudgetUpdateCall struct { 5125 s *Service 5126 accountId int64 5127 billingId int64 5128 budget *Budget 5129 urlParams_ gensupport.URLParams 5130 ctx_ context.Context 5131 header_ http.Header 5132} 5133 5134// Update: Updates the budget amount for the budget of the adgroup 5135// specified by the accountId and billingId, with the budget amount in 5136// the request. 5137func (r *BudgetService) Update(accountId int64, billingId int64, budget *Budget) *BudgetUpdateCall { 5138 c := &BudgetUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5139 c.accountId = accountId 5140 c.billingId = billingId 5141 c.budget = budget 5142 return c 5143} 5144 5145// Fields allows partial responses to be retrieved. See 5146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5147// for more information. 5148func (c *BudgetUpdateCall) Fields(s ...googleapi.Field) *BudgetUpdateCall { 5149 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5150 return c 5151} 5152 5153// Context sets the context to be used in this call's Do method. Any 5154// pending HTTP request will be aborted if the provided context is 5155// canceled. 5156func (c *BudgetUpdateCall) Context(ctx context.Context) *BudgetUpdateCall { 5157 c.ctx_ = ctx 5158 return c 5159} 5160 5161// Header returns an http.Header that can be modified by the caller to 5162// add HTTP headers to the request. 5163func (c *BudgetUpdateCall) Header() http.Header { 5164 if c.header_ == nil { 5165 c.header_ = make(http.Header) 5166 } 5167 return c.header_ 5168} 5169 5170func (c *BudgetUpdateCall) doRequest(alt string) (*http.Response, error) { 5171 reqHeaders := make(http.Header) 5172 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5173 for k, v := range c.header_ { 5174 reqHeaders[k] = v 5175 } 5176 reqHeaders.Set("User-Agent", c.s.userAgent()) 5177 var body io.Reader = nil 5178 body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget) 5179 if err != nil { 5180 return nil, err 5181 } 5182 reqHeaders.Set("Content-Type", "application/json") 5183 c.urlParams_.Set("alt", alt) 5184 c.urlParams_.Set("prettyPrint", "false") 5185 urls := googleapi.ResolveRelative(c.s.BasePath, "billinginfo/{accountId}/{billingId}") 5186 urls += "?" + c.urlParams_.Encode() 5187 req, err := http.NewRequest("PUT", urls, body) 5188 if err != nil { 5189 return nil, err 5190 } 5191 req.Header = reqHeaders 5192 googleapi.Expand(req.URL, map[string]string{ 5193 "accountId": strconv.FormatInt(c.accountId, 10), 5194 "billingId": strconv.FormatInt(c.billingId, 10), 5195 }) 5196 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5197} 5198 5199// Do executes the "adexchangebuyer.budget.update" call. 5200// Exactly one of *Budget or error will be non-nil. Any non-2xx status 5201// code is an error. Response headers are in either 5202// *Budget.ServerResponse.Header or (if a response was returned at all) 5203// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5204// check whether the returned error was because http.StatusNotModified 5205// was returned. 5206func (c *BudgetUpdateCall) Do(opts ...googleapi.CallOption) (*Budget, error) { 5207 gensupport.SetOptions(c.urlParams_, opts...) 5208 res, err := c.doRequest("json") 5209 if res != nil && res.StatusCode == http.StatusNotModified { 5210 if res.Body != nil { 5211 res.Body.Close() 5212 } 5213 return nil, &googleapi.Error{ 5214 Code: res.StatusCode, 5215 Header: res.Header, 5216 } 5217 } 5218 if err != nil { 5219 return nil, err 5220 } 5221 defer googleapi.CloseBody(res) 5222 if err := googleapi.CheckResponse(res); err != nil { 5223 return nil, err 5224 } 5225 ret := &Budget{ 5226 ServerResponse: googleapi.ServerResponse{ 5227 Header: res.Header, 5228 HTTPStatusCode: res.StatusCode, 5229 }, 5230 } 5231 target := &ret 5232 if err := gensupport.DecodeResponse(target, res); err != nil { 5233 return nil, err 5234 } 5235 return ret, nil 5236 // { 5237 // "description": "Updates the budget amount for the budget of the adgroup specified by the accountId and billingId, with the budget amount in the request.", 5238 // "httpMethod": "PUT", 5239 // "id": "adexchangebuyer.budget.update", 5240 // "parameterOrder": [ 5241 // "accountId", 5242 // "billingId" 5243 // ], 5244 // "parameters": { 5245 // "accountId": { 5246 // "description": "The account id associated with the budget being updated.", 5247 // "format": "int64", 5248 // "location": "path", 5249 // "required": true, 5250 // "type": "string" 5251 // }, 5252 // "billingId": { 5253 // "description": "The billing id associated with the budget being updated.", 5254 // "format": "int64", 5255 // "location": "path", 5256 // "required": true, 5257 // "type": "string" 5258 // } 5259 // }, 5260 // "path": "billinginfo/{accountId}/{billingId}", 5261 // "request": { 5262 // "$ref": "Budget" 5263 // }, 5264 // "response": { 5265 // "$ref": "Budget" 5266 // }, 5267 // "scopes": [ 5268 // "https://www.googleapis.com/auth/adexchange.buyer" 5269 // ] 5270 // } 5271 5272} 5273 5274// method id "adexchangebuyer.creatives.addDeal": 5275 5276type CreativesAddDealCall struct { 5277 s *Service 5278 accountId int64 5279 buyerCreativeId string 5280 dealId int64 5281 urlParams_ gensupport.URLParams 5282 ctx_ context.Context 5283 header_ http.Header 5284} 5285 5286// AddDeal: Add a deal id association for the creative. 5287func (r *CreativesService) AddDeal(accountId int64, buyerCreativeId string, dealId int64) *CreativesAddDealCall { 5288 c := &CreativesAddDealCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5289 c.accountId = accountId 5290 c.buyerCreativeId = buyerCreativeId 5291 c.dealId = dealId 5292 return c 5293} 5294 5295// Fields allows partial responses to be retrieved. See 5296// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5297// for more information. 5298func (c *CreativesAddDealCall) Fields(s ...googleapi.Field) *CreativesAddDealCall { 5299 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5300 return c 5301} 5302 5303// Context sets the context to be used in this call's Do method. Any 5304// pending HTTP request will be aborted if the provided context is 5305// canceled. 5306func (c *CreativesAddDealCall) Context(ctx context.Context) *CreativesAddDealCall { 5307 c.ctx_ = ctx 5308 return c 5309} 5310 5311// Header returns an http.Header that can be modified by the caller to 5312// add HTTP headers to the request. 5313func (c *CreativesAddDealCall) Header() http.Header { 5314 if c.header_ == nil { 5315 c.header_ = make(http.Header) 5316 } 5317 return c.header_ 5318} 5319 5320func (c *CreativesAddDealCall) doRequest(alt string) (*http.Response, error) { 5321 reqHeaders := make(http.Header) 5322 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5323 for k, v := range c.header_ { 5324 reqHeaders[k] = v 5325 } 5326 reqHeaders.Set("User-Agent", c.s.userAgent()) 5327 var body io.Reader = nil 5328 c.urlParams_.Set("alt", alt) 5329 c.urlParams_.Set("prettyPrint", "false") 5330 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}/addDeal/{dealId}") 5331 urls += "?" + c.urlParams_.Encode() 5332 req, err := http.NewRequest("POST", urls, body) 5333 if err != nil { 5334 return nil, err 5335 } 5336 req.Header = reqHeaders 5337 googleapi.Expand(req.URL, map[string]string{ 5338 "accountId": strconv.FormatInt(c.accountId, 10), 5339 "buyerCreativeId": c.buyerCreativeId, 5340 "dealId": strconv.FormatInt(c.dealId, 10), 5341 }) 5342 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5343} 5344 5345// Do executes the "adexchangebuyer.creatives.addDeal" call. 5346func (c *CreativesAddDealCall) Do(opts ...googleapi.CallOption) error { 5347 gensupport.SetOptions(c.urlParams_, opts...) 5348 res, err := c.doRequest("json") 5349 if err != nil { 5350 return err 5351 } 5352 defer googleapi.CloseBody(res) 5353 if err := googleapi.CheckResponse(res); err != nil { 5354 return err 5355 } 5356 return nil 5357 // { 5358 // "description": "Add a deal id association for the creative.", 5359 // "httpMethod": "POST", 5360 // "id": "adexchangebuyer.creatives.addDeal", 5361 // "parameterOrder": [ 5362 // "accountId", 5363 // "buyerCreativeId", 5364 // "dealId" 5365 // ], 5366 // "parameters": { 5367 // "accountId": { 5368 // "description": "The id for the account that will serve this creative.", 5369 // "format": "int32", 5370 // "location": "path", 5371 // "required": true, 5372 // "type": "integer" 5373 // }, 5374 // "buyerCreativeId": { 5375 // "description": "The buyer-specific id for this creative.", 5376 // "location": "path", 5377 // "required": true, 5378 // "type": "string" 5379 // }, 5380 // "dealId": { 5381 // "description": "The id of the deal id to associate with this creative.", 5382 // "format": "int64", 5383 // "location": "path", 5384 // "required": true, 5385 // "type": "string" 5386 // } 5387 // }, 5388 // "path": "creatives/{accountId}/{buyerCreativeId}/addDeal/{dealId}", 5389 // "scopes": [ 5390 // "https://www.googleapis.com/auth/adexchange.buyer" 5391 // ] 5392 // } 5393 5394} 5395 5396// method id "adexchangebuyer.creatives.get": 5397 5398type CreativesGetCall struct { 5399 s *Service 5400 accountId int64 5401 buyerCreativeId string 5402 urlParams_ gensupport.URLParams 5403 ifNoneMatch_ string 5404 ctx_ context.Context 5405 header_ http.Header 5406} 5407 5408// Get: Gets the status for a single creative. A creative will be 5409// available 30-40 minutes after submission. 5410func (r *CreativesService) Get(accountId int64, buyerCreativeId string) *CreativesGetCall { 5411 c := &CreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5412 c.accountId = accountId 5413 c.buyerCreativeId = buyerCreativeId 5414 return c 5415} 5416 5417// Fields allows partial responses to be retrieved. See 5418// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5419// for more information. 5420func (c *CreativesGetCall) Fields(s ...googleapi.Field) *CreativesGetCall { 5421 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5422 return c 5423} 5424 5425// IfNoneMatch sets the optional parameter which makes the operation 5426// fail if the object's ETag matches the given value. This is useful for 5427// getting updates only after the object has changed since the last 5428// request. Use googleapi.IsNotModified to check whether the response 5429// error from Do is the result of In-None-Match. 5430func (c *CreativesGetCall) IfNoneMatch(entityTag string) *CreativesGetCall { 5431 c.ifNoneMatch_ = entityTag 5432 return c 5433} 5434 5435// Context sets the context to be used in this call's Do method. Any 5436// pending HTTP request will be aborted if the provided context is 5437// canceled. 5438func (c *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall { 5439 c.ctx_ = ctx 5440 return c 5441} 5442 5443// Header returns an http.Header that can be modified by the caller to 5444// add HTTP headers to the request. 5445func (c *CreativesGetCall) Header() http.Header { 5446 if c.header_ == nil { 5447 c.header_ = make(http.Header) 5448 } 5449 return c.header_ 5450} 5451 5452func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) { 5453 reqHeaders := make(http.Header) 5454 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5455 for k, v := range c.header_ { 5456 reqHeaders[k] = v 5457 } 5458 reqHeaders.Set("User-Agent", c.s.userAgent()) 5459 if c.ifNoneMatch_ != "" { 5460 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5461 } 5462 var body io.Reader = nil 5463 c.urlParams_.Set("alt", alt) 5464 c.urlParams_.Set("prettyPrint", "false") 5465 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}") 5466 urls += "?" + c.urlParams_.Encode() 5467 req, err := http.NewRequest("GET", urls, body) 5468 if err != nil { 5469 return nil, err 5470 } 5471 req.Header = reqHeaders 5472 googleapi.Expand(req.URL, map[string]string{ 5473 "accountId": strconv.FormatInt(c.accountId, 10), 5474 "buyerCreativeId": c.buyerCreativeId, 5475 }) 5476 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5477} 5478 5479// Do executes the "adexchangebuyer.creatives.get" call. 5480// Exactly one of *Creative or error will be non-nil. Any non-2xx status 5481// code is an error. Response headers are in either 5482// *Creative.ServerResponse.Header or (if a response was returned at 5483// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5484// to check whether the returned error was because 5485// http.StatusNotModified was returned. 5486func (c *CreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 5487 gensupport.SetOptions(c.urlParams_, opts...) 5488 res, err := c.doRequest("json") 5489 if res != nil && res.StatusCode == http.StatusNotModified { 5490 if res.Body != nil { 5491 res.Body.Close() 5492 } 5493 return nil, &googleapi.Error{ 5494 Code: res.StatusCode, 5495 Header: res.Header, 5496 } 5497 } 5498 if err != nil { 5499 return nil, err 5500 } 5501 defer googleapi.CloseBody(res) 5502 if err := googleapi.CheckResponse(res); err != nil { 5503 return nil, err 5504 } 5505 ret := &Creative{ 5506 ServerResponse: googleapi.ServerResponse{ 5507 Header: res.Header, 5508 HTTPStatusCode: res.StatusCode, 5509 }, 5510 } 5511 target := &ret 5512 if err := gensupport.DecodeResponse(target, res); err != nil { 5513 return nil, err 5514 } 5515 return ret, nil 5516 // { 5517 // "description": "Gets the status for a single creative. A creative will be available 30-40 minutes after submission.", 5518 // "httpMethod": "GET", 5519 // "id": "adexchangebuyer.creatives.get", 5520 // "parameterOrder": [ 5521 // "accountId", 5522 // "buyerCreativeId" 5523 // ], 5524 // "parameters": { 5525 // "accountId": { 5526 // "description": "The id for the account that will serve this creative.", 5527 // "format": "int32", 5528 // "location": "path", 5529 // "required": true, 5530 // "type": "integer" 5531 // }, 5532 // "buyerCreativeId": { 5533 // "description": "The buyer-specific id for this creative.", 5534 // "location": "path", 5535 // "required": true, 5536 // "type": "string" 5537 // } 5538 // }, 5539 // "path": "creatives/{accountId}/{buyerCreativeId}", 5540 // "response": { 5541 // "$ref": "Creative" 5542 // }, 5543 // "scopes": [ 5544 // "https://www.googleapis.com/auth/adexchange.buyer" 5545 // ] 5546 // } 5547 5548} 5549 5550// method id "adexchangebuyer.creatives.insert": 5551 5552type CreativesInsertCall struct { 5553 s *Service 5554 creative *Creative 5555 urlParams_ gensupport.URLParams 5556 ctx_ context.Context 5557 header_ http.Header 5558} 5559 5560// Insert: Submit a new creative. 5561func (r *CreativesService) Insert(creative *Creative) *CreativesInsertCall { 5562 c := &CreativesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5563 c.creative = creative 5564 return c 5565} 5566 5567// Fields allows partial responses to be retrieved. See 5568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5569// for more information. 5570func (c *CreativesInsertCall) Fields(s ...googleapi.Field) *CreativesInsertCall { 5571 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5572 return c 5573} 5574 5575// Context sets the context to be used in this call's Do method. Any 5576// pending HTTP request will be aborted if the provided context is 5577// canceled. 5578func (c *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall { 5579 c.ctx_ = ctx 5580 return c 5581} 5582 5583// Header returns an http.Header that can be modified by the caller to 5584// add HTTP headers to the request. 5585func (c *CreativesInsertCall) Header() http.Header { 5586 if c.header_ == nil { 5587 c.header_ = make(http.Header) 5588 } 5589 return c.header_ 5590} 5591 5592func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) { 5593 reqHeaders := make(http.Header) 5594 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5595 for k, v := range c.header_ { 5596 reqHeaders[k] = v 5597 } 5598 reqHeaders.Set("User-Agent", c.s.userAgent()) 5599 var body io.Reader = nil 5600 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 5601 if err != nil { 5602 return nil, err 5603 } 5604 reqHeaders.Set("Content-Type", "application/json") 5605 c.urlParams_.Set("alt", alt) 5606 c.urlParams_.Set("prettyPrint", "false") 5607 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives") 5608 urls += "?" + c.urlParams_.Encode() 5609 req, err := http.NewRequest("POST", urls, body) 5610 if err != nil { 5611 return nil, err 5612 } 5613 req.Header = reqHeaders 5614 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5615} 5616 5617// Do executes the "adexchangebuyer.creatives.insert" call. 5618// Exactly one of *Creative or error will be non-nil. Any non-2xx status 5619// code is an error. Response headers are in either 5620// *Creative.ServerResponse.Header or (if a response was returned at 5621// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5622// to check whether the returned error was because 5623// http.StatusNotModified was returned. 5624func (c *CreativesInsertCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 5625 gensupport.SetOptions(c.urlParams_, opts...) 5626 res, err := c.doRequest("json") 5627 if res != nil && res.StatusCode == http.StatusNotModified { 5628 if res.Body != nil { 5629 res.Body.Close() 5630 } 5631 return nil, &googleapi.Error{ 5632 Code: res.StatusCode, 5633 Header: res.Header, 5634 } 5635 } 5636 if err != nil { 5637 return nil, err 5638 } 5639 defer googleapi.CloseBody(res) 5640 if err := googleapi.CheckResponse(res); err != nil { 5641 return nil, err 5642 } 5643 ret := &Creative{ 5644 ServerResponse: googleapi.ServerResponse{ 5645 Header: res.Header, 5646 HTTPStatusCode: res.StatusCode, 5647 }, 5648 } 5649 target := &ret 5650 if err := gensupport.DecodeResponse(target, res); err != nil { 5651 return nil, err 5652 } 5653 return ret, nil 5654 // { 5655 // "description": "Submit a new creative.", 5656 // "httpMethod": "POST", 5657 // "id": "adexchangebuyer.creatives.insert", 5658 // "path": "creatives", 5659 // "request": { 5660 // "$ref": "Creative" 5661 // }, 5662 // "response": { 5663 // "$ref": "Creative" 5664 // }, 5665 // "scopes": [ 5666 // "https://www.googleapis.com/auth/adexchange.buyer" 5667 // ] 5668 // } 5669 5670} 5671 5672// method id "adexchangebuyer.creatives.list": 5673 5674type CreativesListCall struct { 5675 s *Service 5676 urlParams_ gensupport.URLParams 5677 ifNoneMatch_ string 5678 ctx_ context.Context 5679 header_ http.Header 5680} 5681 5682// List: Retrieves a list of the authenticated user's active creatives. 5683// A creative will be available 30-40 minutes after submission. 5684func (r *CreativesService) List() *CreativesListCall { 5685 c := &CreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5686 return c 5687} 5688 5689// AccountId sets the optional parameter "accountId": When specified, 5690// only creatives for the given account ids are returned. 5691func (c *CreativesListCall) AccountId(accountId ...int64) *CreativesListCall { 5692 var accountId_ []string 5693 for _, v := range accountId { 5694 accountId_ = append(accountId_, fmt.Sprint(v)) 5695 } 5696 c.urlParams_.SetMulti("accountId", accountId_) 5697 return c 5698} 5699 5700// BuyerCreativeId sets the optional parameter "buyerCreativeId": When 5701// specified, only creatives for the given buyer creative ids are 5702// returned. 5703func (c *CreativesListCall) BuyerCreativeId(buyerCreativeId ...string) *CreativesListCall { 5704 c.urlParams_.SetMulti("buyerCreativeId", append([]string{}, buyerCreativeId...)) 5705 return c 5706} 5707 5708// DealsStatusFilter sets the optional parameter "dealsStatusFilter": 5709// When specified, only creatives having the given deals status are 5710// returned. 5711// 5712// Possible values: 5713// "approved" - Creatives which have been approved for serving on 5714// deals. 5715// "conditionally_approved" - Creatives which have been conditionally 5716// approved for serving on deals. 5717// "disapproved" - Creatives which have been disapproved for serving 5718// on deals. 5719// "not_checked" - Creatives whose deals status is not yet checked. 5720func (c *CreativesListCall) DealsStatusFilter(dealsStatusFilter string) *CreativesListCall { 5721 c.urlParams_.Set("dealsStatusFilter", dealsStatusFilter) 5722 return c 5723} 5724 5725// MaxResults sets the optional parameter "maxResults": Maximum number 5726// of entries returned on one result page. If not set, the default is 5727// 100. 5728func (c *CreativesListCall) MaxResults(maxResults int64) *CreativesListCall { 5729 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 5730 return c 5731} 5732 5733// OpenAuctionStatusFilter sets the optional parameter 5734// "openAuctionStatusFilter": When specified, only creatives having the 5735// given open auction status are returned. 5736// 5737// Possible values: 5738// "approved" - Creatives which have been approved for serving on the 5739// open auction. 5740// "conditionally_approved" - Creatives which have been conditionally 5741// approved for serving on the open auction. 5742// "disapproved" - Creatives which have been disapproved for serving 5743// on the open auction. 5744// "not_checked" - Creatives whose open auction status is not yet 5745// checked. 5746func (c *CreativesListCall) OpenAuctionStatusFilter(openAuctionStatusFilter string) *CreativesListCall { 5747 c.urlParams_.Set("openAuctionStatusFilter", openAuctionStatusFilter) 5748 return c 5749} 5750 5751// PageToken sets the optional parameter "pageToken": A continuation 5752// token, used to page through ad clients. To retrieve the next page, 5753// set this parameter to the value of "nextPageToken" from the previous 5754// response. 5755func (c *CreativesListCall) PageToken(pageToken string) *CreativesListCall { 5756 c.urlParams_.Set("pageToken", pageToken) 5757 return c 5758} 5759 5760// Fields allows partial responses to be retrieved. See 5761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5762// for more information. 5763func (c *CreativesListCall) Fields(s ...googleapi.Field) *CreativesListCall { 5764 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5765 return c 5766} 5767 5768// IfNoneMatch sets the optional parameter which makes the operation 5769// fail if the object's ETag matches the given value. This is useful for 5770// getting updates only after the object has changed since the last 5771// request. Use googleapi.IsNotModified to check whether the response 5772// error from Do is the result of In-None-Match. 5773func (c *CreativesListCall) IfNoneMatch(entityTag string) *CreativesListCall { 5774 c.ifNoneMatch_ = entityTag 5775 return c 5776} 5777 5778// Context sets the context to be used in this call's Do method. Any 5779// pending HTTP request will be aborted if the provided context is 5780// canceled. 5781func (c *CreativesListCall) Context(ctx context.Context) *CreativesListCall { 5782 c.ctx_ = ctx 5783 return c 5784} 5785 5786// Header returns an http.Header that can be modified by the caller to 5787// add HTTP headers to the request. 5788func (c *CreativesListCall) Header() http.Header { 5789 if c.header_ == nil { 5790 c.header_ = make(http.Header) 5791 } 5792 return c.header_ 5793} 5794 5795func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) { 5796 reqHeaders := make(http.Header) 5797 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 5798 for k, v := range c.header_ { 5799 reqHeaders[k] = v 5800 } 5801 reqHeaders.Set("User-Agent", c.s.userAgent()) 5802 if c.ifNoneMatch_ != "" { 5803 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5804 } 5805 var body io.Reader = nil 5806 c.urlParams_.Set("alt", alt) 5807 c.urlParams_.Set("prettyPrint", "false") 5808 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives") 5809 urls += "?" + c.urlParams_.Encode() 5810 req, err := http.NewRequest("GET", urls, body) 5811 if err != nil { 5812 return nil, err 5813 } 5814 req.Header = reqHeaders 5815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5816} 5817 5818// Do executes the "adexchangebuyer.creatives.list" call. 5819// Exactly one of *CreativesList or error will be non-nil. Any non-2xx 5820// status code is an error. Response headers are in either 5821// *CreativesList.ServerResponse.Header or (if a response was returned 5822// at all) in error.(*googleapi.Error).Header. Use 5823// googleapi.IsNotModified to check whether the returned error was 5824// because http.StatusNotModified was returned. 5825func (c *CreativesListCall) Do(opts ...googleapi.CallOption) (*CreativesList, error) { 5826 gensupport.SetOptions(c.urlParams_, opts...) 5827 res, err := c.doRequest("json") 5828 if res != nil && res.StatusCode == http.StatusNotModified { 5829 if res.Body != nil { 5830 res.Body.Close() 5831 } 5832 return nil, &googleapi.Error{ 5833 Code: res.StatusCode, 5834 Header: res.Header, 5835 } 5836 } 5837 if err != nil { 5838 return nil, err 5839 } 5840 defer googleapi.CloseBody(res) 5841 if err := googleapi.CheckResponse(res); err != nil { 5842 return nil, err 5843 } 5844 ret := &CreativesList{ 5845 ServerResponse: googleapi.ServerResponse{ 5846 Header: res.Header, 5847 HTTPStatusCode: res.StatusCode, 5848 }, 5849 } 5850 target := &ret 5851 if err := gensupport.DecodeResponse(target, res); err != nil { 5852 return nil, err 5853 } 5854 return ret, nil 5855 // { 5856 // "description": "Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.", 5857 // "httpMethod": "GET", 5858 // "id": "adexchangebuyer.creatives.list", 5859 // "parameters": { 5860 // "accountId": { 5861 // "description": "When specified, only creatives for the given account ids are returned.", 5862 // "format": "int32", 5863 // "location": "query", 5864 // "repeated": true, 5865 // "type": "integer" 5866 // }, 5867 // "buyerCreativeId": { 5868 // "description": "When specified, only creatives for the given buyer creative ids are returned.", 5869 // "location": "query", 5870 // "repeated": true, 5871 // "type": "string" 5872 // }, 5873 // "dealsStatusFilter": { 5874 // "description": "When specified, only creatives having the given deals status are returned.", 5875 // "enum": [ 5876 // "approved", 5877 // "conditionally_approved", 5878 // "disapproved", 5879 // "not_checked" 5880 // ], 5881 // "enumDescriptions": [ 5882 // "Creatives which have been approved for serving on deals.", 5883 // "Creatives which have been conditionally approved for serving on deals.", 5884 // "Creatives which have been disapproved for serving on deals.", 5885 // "Creatives whose deals status is not yet checked." 5886 // ], 5887 // "location": "query", 5888 // "type": "string" 5889 // }, 5890 // "maxResults": { 5891 // "description": "Maximum number of entries returned on one result page. If not set, the default is 100. Optional.", 5892 // "format": "uint32", 5893 // "location": "query", 5894 // "maximum": "1000", 5895 // "minimum": "1", 5896 // "type": "integer" 5897 // }, 5898 // "openAuctionStatusFilter": { 5899 // "description": "When specified, only creatives having the given open auction status are returned.", 5900 // "enum": [ 5901 // "approved", 5902 // "conditionally_approved", 5903 // "disapproved", 5904 // "not_checked" 5905 // ], 5906 // "enumDescriptions": [ 5907 // "Creatives which have been approved for serving on the open auction.", 5908 // "Creatives which have been conditionally approved for serving on the open auction.", 5909 // "Creatives which have been disapproved for serving on the open auction.", 5910 // "Creatives whose open auction status is not yet checked." 5911 // ], 5912 // "location": "query", 5913 // "type": "string" 5914 // }, 5915 // "pageToken": { 5916 // "description": "A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response. Optional.", 5917 // "location": "query", 5918 // "type": "string" 5919 // } 5920 // }, 5921 // "path": "creatives", 5922 // "response": { 5923 // "$ref": "CreativesList" 5924 // }, 5925 // "scopes": [ 5926 // "https://www.googleapis.com/auth/adexchange.buyer" 5927 // ] 5928 // } 5929 5930} 5931 5932// Pages invokes f for each page of results. 5933// A non-nil error returned from f will halt the iteration. 5934// The provided context supersedes any context provided to the Context method. 5935func (c *CreativesListCall) Pages(ctx context.Context, f func(*CreativesList) error) error { 5936 c.ctx_ = ctx 5937 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5938 for { 5939 x, err := c.Do() 5940 if err != nil { 5941 return err 5942 } 5943 if err := f(x); err != nil { 5944 return err 5945 } 5946 if x.NextPageToken == "" { 5947 return nil 5948 } 5949 c.PageToken(x.NextPageToken) 5950 } 5951} 5952 5953// method id "adexchangebuyer.creatives.listDeals": 5954 5955type CreativesListDealsCall struct { 5956 s *Service 5957 accountId int64 5958 buyerCreativeId string 5959 urlParams_ gensupport.URLParams 5960 ifNoneMatch_ string 5961 ctx_ context.Context 5962 header_ http.Header 5963} 5964 5965// ListDeals: Lists the external deal ids associated with the creative. 5966func (r *CreativesService) ListDeals(accountId int64, buyerCreativeId string) *CreativesListDealsCall { 5967 c := &CreativesListDealsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5968 c.accountId = accountId 5969 c.buyerCreativeId = buyerCreativeId 5970 return c 5971} 5972 5973// Fields allows partial responses to be retrieved. See 5974// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5975// for more information. 5976func (c *CreativesListDealsCall) Fields(s ...googleapi.Field) *CreativesListDealsCall { 5977 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5978 return c 5979} 5980 5981// IfNoneMatch sets the optional parameter which makes the operation 5982// fail if the object's ETag matches the given value. This is useful for 5983// getting updates only after the object has changed since the last 5984// request. Use googleapi.IsNotModified to check whether the response 5985// error from Do is the result of In-None-Match. 5986func (c *CreativesListDealsCall) IfNoneMatch(entityTag string) *CreativesListDealsCall { 5987 c.ifNoneMatch_ = entityTag 5988 return c 5989} 5990 5991// Context sets the context to be used in this call's Do method. Any 5992// pending HTTP request will be aborted if the provided context is 5993// canceled. 5994func (c *CreativesListDealsCall) Context(ctx context.Context) *CreativesListDealsCall { 5995 c.ctx_ = ctx 5996 return c 5997} 5998 5999// Header returns an http.Header that can be modified by the caller to 6000// add HTTP headers to the request. 6001func (c *CreativesListDealsCall) Header() http.Header { 6002 if c.header_ == nil { 6003 c.header_ = make(http.Header) 6004 } 6005 return c.header_ 6006} 6007 6008func (c *CreativesListDealsCall) doRequest(alt string) (*http.Response, error) { 6009 reqHeaders := make(http.Header) 6010 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6011 for k, v := range c.header_ { 6012 reqHeaders[k] = v 6013 } 6014 reqHeaders.Set("User-Agent", c.s.userAgent()) 6015 if c.ifNoneMatch_ != "" { 6016 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6017 } 6018 var body io.Reader = nil 6019 c.urlParams_.Set("alt", alt) 6020 c.urlParams_.Set("prettyPrint", "false") 6021 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}/listDeals") 6022 urls += "?" + c.urlParams_.Encode() 6023 req, err := http.NewRequest("GET", urls, body) 6024 if err != nil { 6025 return nil, err 6026 } 6027 req.Header = reqHeaders 6028 googleapi.Expand(req.URL, map[string]string{ 6029 "accountId": strconv.FormatInt(c.accountId, 10), 6030 "buyerCreativeId": c.buyerCreativeId, 6031 }) 6032 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6033} 6034 6035// Do executes the "adexchangebuyer.creatives.listDeals" call. 6036// Exactly one of *CreativeDealIds or error will be non-nil. Any non-2xx 6037// status code is an error. Response headers are in either 6038// *CreativeDealIds.ServerResponse.Header or (if a response was returned 6039// at all) in error.(*googleapi.Error).Header. Use 6040// googleapi.IsNotModified to check whether the returned error was 6041// because http.StatusNotModified was returned. 6042func (c *CreativesListDealsCall) Do(opts ...googleapi.CallOption) (*CreativeDealIds, error) { 6043 gensupport.SetOptions(c.urlParams_, opts...) 6044 res, err := c.doRequest("json") 6045 if res != nil && res.StatusCode == http.StatusNotModified { 6046 if res.Body != nil { 6047 res.Body.Close() 6048 } 6049 return nil, &googleapi.Error{ 6050 Code: res.StatusCode, 6051 Header: res.Header, 6052 } 6053 } 6054 if err != nil { 6055 return nil, err 6056 } 6057 defer googleapi.CloseBody(res) 6058 if err := googleapi.CheckResponse(res); err != nil { 6059 return nil, err 6060 } 6061 ret := &CreativeDealIds{ 6062 ServerResponse: googleapi.ServerResponse{ 6063 Header: res.Header, 6064 HTTPStatusCode: res.StatusCode, 6065 }, 6066 } 6067 target := &ret 6068 if err := gensupport.DecodeResponse(target, res); err != nil { 6069 return nil, err 6070 } 6071 return ret, nil 6072 // { 6073 // "description": "Lists the external deal ids associated with the creative.", 6074 // "httpMethod": "GET", 6075 // "id": "adexchangebuyer.creatives.listDeals", 6076 // "parameterOrder": [ 6077 // "accountId", 6078 // "buyerCreativeId" 6079 // ], 6080 // "parameters": { 6081 // "accountId": { 6082 // "description": "The id for the account that will serve this creative.", 6083 // "format": "int32", 6084 // "location": "path", 6085 // "required": true, 6086 // "type": "integer" 6087 // }, 6088 // "buyerCreativeId": { 6089 // "description": "The buyer-specific id for this creative.", 6090 // "location": "path", 6091 // "required": true, 6092 // "type": "string" 6093 // } 6094 // }, 6095 // "path": "creatives/{accountId}/{buyerCreativeId}/listDeals", 6096 // "response": { 6097 // "$ref": "CreativeDealIds" 6098 // }, 6099 // "scopes": [ 6100 // "https://www.googleapis.com/auth/adexchange.buyer" 6101 // ] 6102 // } 6103 6104} 6105 6106// method id "adexchangebuyer.creatives.removeDeal": 6107 6108type CreativesRemoveDealCall struct { 6109 s *Service 6110 accountId int64 6111 buyerCreativeId string 6112 dealId int64 6113 urlParams_ gensupport.URLParams 6114 ctx_ context.Context 6115 header_ http.Header 6116} 6117 6118// RemoveDeal: Remove a deal id associated with the creative. 6119func (r *CreativesService) RemoveDeal(accountId int64, buyerCreativeId string, dealId int64) *CreativesRemoveDealCall { 6120 c := &CreativesRemoveDealCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6121 c.accountId = accountId 6122 c.buyerCreativeId = buyerCreativeId 6123 c.dealId = dealId 6124 return c 6125} 6126 6127// Fields allows partial responses to be retrieved. See 6128// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6129// for more information. 6130func (c *CreativesRemoveDealCall) Fields(s ...googleapi.Field) *CreativesRemoveDealCall { 6131 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6132 return c 6133} 6134 6135// Context sets the context to be used in this call's Do method. Any 6136// pending HTTP request will be aborted if the provided context is 6137// canceled. 6138func (c *CreativesRemoveDealCall) Context(ctx context.Context) *CreativesRemoveDealCall { 6139 c.ctx_ = ctx 6140 return c 6141} 6142 6143// Header returns an http.Header that can be modified by the caller to 6144// add HTTP headers to the request. 6145func (c *CreativesRemoveDealCall) Header() http.Header { 6146 if c.header_ == nil { 6147 c.header_ = make(http.Header) 6148 } 6149 return c.header_ 6150} 6151 6152func (c *CreativesRemoveDealCall) doRequest(alt string) (*http.Response, error) { 6153 reqHeaders := make(http.Header) 6154 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6155 for k, v := range c.header_ { 6156 reqHeaders[k] = v 6157 } 6158 reqHeaders.Set("User-Agent", c.s.userAgent()) 6159 var body io.Reader = nil 6160 c.urlParams_.Set("alt", alt) 6161 c.urlParams_.Set("prettyPrint", "false") 6162 urls := googleapi.ResolveRelative(c.s.BasePath, "creatives/{accountId}/{buyerCreativeId}/removeDeal/{dealId}") 6163 urls += "?" + c.urlParams_.Encode() 6164 req, err := http.NewRequest("POST", urls, body) 6165 if err != nil { 6166 return nil, err 6167 } 6168 req.Header = reqHeaders 6169 googleapi.Expand(req.URL, map[string]string{ 6170 "accountId": strconv.FormatInt(c.accountId, 10), 6171 "buyerCreativeId": c.buyerCreativeId, 6172 "dealId": strconv.FormatInt(c.dealId, 10), 6173 }) 6174 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6175} 6176 6177// Do executes the "adexchangebuyer.creatives.removeDeal" call. 6178func (c *CreativesRemoveDealCall) Do(opts ...googleapi.CallOption) error { 6179 gensupport.SetOptions(c.urlParams_, opts...) 6180 res, err := c.doRequest("json") 6181 if err != nil { 6182 return err 6183 } 6184 defer googleapi.CloseBody(res) 6185 if err := googleapi.CheckResponse(res); err != nil { 6186 return err 6187 } 6188 return nil 6189 // { 6190 // "description": "Remove a deal id associated with the creative.", 6191 // "httpMethod": "POST", 6192 // "id": "adexchangebuyer.creatives.removeDeal", 6193 // "parameterOrder": [ 6194 // "accountId", 6195 // "buyerCreativeId", 6196 // "dealId" 6197 // ], 6198 // "parameters": { 6199 // "accountId": { 6200 // "description": "The id for the account that will serve this creative.", 6201 // "format": "int32", 6202 // "location": "path", 6203 // "required": true, 6204 // "type": "integer" 6205 // }, 6206 // "buyerCreativeId": { 6207 // "description": "The buyer-specific id for this creative.", 6208 // "location": "path", 6209 // "required": true, 6210 // "type": "string" 6211 // }, 6212 // "dealId": { 6213 // "description": "The id of the deal id to disassociate with this creative.", 6214 // "format": "int64", 6215 // "location": "path", 6216 // "required": true, 6217 // "type": "string" 6218 // } 6219 // }, 6220 // "path": "creatives/{accountId}/{buyerCreativeId}/removeDeal/{dealId}", 6221 // "scopes": [ 6222 // "https://www.googleapis.com/auth/adexchange.buyer" 6223 // ] 6224 // } 6225 6226} 6227 6228// method id "adexchangebuyer.marketplacedeals.delete": 6229 6230type MarketplacedealsDeleteCall struct { 6231 s *Service 6232 proposalId string 6233 deleteorderdealsrequest *DeleteOrderDealsRequest 6234 urlParams_ gensupport.URLParams 6235 ctx_ context.Context 6236 header_ http.Header 6237} 6238 6239// Delete: Delete the specified deals from the proposal 6240func (r *MarketplacedealsService) Delete(proposalId string, deleteorderdealsrequest *DeleteOrderDealsRequest) *MarketplacedealsDeleteCall { 6241 c := &MarketplacedealsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6242 c.proposalId = proposalId 6243 c.deleteorderdealsrequest = deleteorderdealsrequest 6244 return c 6245} 6246 6247// Fields allows partial responses to be retrieved. See 6248// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6249// for more information. 6250func (c *MarketplacedealsDeleteCall) Fields(s ...googleapi.Field) *MarketplacedealsDeleteCall { 6251 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6252 return c 6253} 6254 6255// Context sets the context to be used in this call's Do method. Any 6256// pending HTTP request will be aborted if the provided context is 6257// canceled. 6258func (c *MarketplacedealsDeleteCall) Context(ctx context.Context) *MarketplacedealsDeleteCall { 6259 c.ctx_ = ctx 6260 return c 6261} 6262 6263// Header returns an http.Header that can be modified by the caller to 6264// add HTTP headers to the request. 6265func (c *MarketplacedealsDeleteCall) Header() http.Header { 6266 if c.header_ == nil { 6267 c.header_ = make(http.Header) 6268 } 6269 return c.header_ 6270} 6271 6272func (c *MarketplacedealsDeleteCall) doRequest(alt string) (*http.Response, error) { 6273 reqHeaders := make(http.Header) 6274 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6275 for k, v := range c.header_ { 6276 reqHeaders[k] = v 6277 } 6278 reqHeaders.Set("User-Agent", c.s.userAgent()) 6279 var body io.Reader = nil 6280 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deleteorderdealsrequest) 6281 if err != nil { 6282 return nil, err 6283 } 6284 reqHeaders.Set("Content-Type", "application/json") 6285 c.urlParams_.Set("alt", alt) 6286 c.urlParams_.Set("prettyPrint", "false") 6287 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals/delete") 6288 urls += "?" + c.urlParams_.Encode() 6289 req, err := http.NewRequest("POST", urls, body) 6290 if err != nil { 6291 return nil, err 6292 } 6293 req.Header = reqHeaders 6294 googleapi.Expand(req.URL, map[string]string{ 6295 "proposalId": c.proposalId, 6296 }) 6297 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6298} 6299 6300// Do executes the "adexchangebuyer.marketplacedeals.delete" call. 6301// Exactly one of *DeleteOrderDealsResponse or error will be non-nil. 6302// Any non-2xx status code is an error. Response headers are in either 6303// *DeleteOrderDealsResponse.ServerResponse.Header or (if a response was 6304// returned at all) in error.(*googleapi.Error).Header. Use 6305// googleapi.IsNotModified to check whether the returned error was 6306// because http.StatusNotModified was returned. 6307func (c *MarketplacedealsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteOrderDealsResponse, error) { 6308 gensupport.SetOptions(c.urlParams_, opts...) 6309 res, err := c.doRequest("json") 6310 if res != nil && res.StatusCode == http.StatusNotModified { 6311 if res.Body != nil { 6312 res.Body.Close() 6313 } 6314 return nil, &googleapi.Error{ 6315 Code: res.StatusCode, 6316 Header: res.Header, 6317 } 6318 } 6319 if err != nil { 6320 return nil, err 6321 } 6322 defer googleapi.CloseBody(res) 6323 if err := googleapi.CheckResponse(res); err != nil { 6324 return nil, err 6325 } 6326 ret := &DeleteOrderDealsResponse{ 6327 ServerResponse: googleapi.ServerResponse{ 6328 Header: res.Header, 6329 HTTPStatusCode: res.StatusCode, 6330 }, 6331 } 6332 target := &ret 6333 if err := gensupport.DecodeResponse(target, res); err != nil { 6334 return nil, err 6335 } 6336 return ret, nil 6337 // { 6338 // "description": "Delete the specified deals from the proposal", 6339 // "httpMethod": "POST", 6340 // "id": "adexchangebuyer.marketplacedeals.delete", 6341 // "parameterOrder": [ 6342 // "proposalId" 6343 // ], 6344 // "parameters": { 6345 // "proposalId": { 6346 // "description": "The proposalId to delete deals from.", 6347 // "location": "path", 6348 // "required": true, 6349 // "type": "string" 6350 // } 6351 // }, 6352 // "path": "proposals/{proposalId}/deals/delete", 6353 // "request": { 6354 // "$ref": "DeleteOrderDealsRequest" 6355 // }, 6356 // "response": { 6357 // "$ref": "DeleteOrderDealsResponse" 6358 // }, 6359 // "scopes": [ 6360 // "https://www.googleapis.com/auth/adexchange.buyer" 6361 // ] 6362 // } 6363 6364} 6365 6366// method id "adexchangebuyer.marketplacedeals.insert": 6367 6368type MarketplacedealsInsertCall struct { 6369 s *Service 6370 proposalId string 6371 addorderdealsrequest *AddOrderDealsRequest 6372 urlParams_ gensupport.URLParams 6373 ctx_ context.Context 6374 header_ http.Header 6375} 6376 6377// Insert: Add new deals for the specified proposal 6378func (r *MarketplacedealsService) Insert(proposalId string, addorderdealsrequest *AddOrderDealsRequest) *MarketplacedealsInsertCall { 6379 c := &MarketplacedealsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6380 c.proposalId = proposalId 6381 c.addorderdealsrequest = addorderdealsrequest 6382 return c 6383} 6384 6385// Fields allows partial responses to be retrieved. See 6386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6387// for more information. 6388func (c *MarketplacedealsInsertCall) Fields(s ...googleapi.Field) *MarketplacedealsInsertCall { 6389 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6390 return c 6391} 6392 6393// Context sets the context to be used in this call's Do method. Any 6394// pending HTTP request will be aborted if the provided context is 6395// canceled. 6396func (c *MarketplacedealsInsertCall) Context(ctx context.Context) *MarketplacedealsInsertCall { 6397 c.ctx_ = ctx 6398 return c 6399} 6400 6401// Header returns an http.Header that can be modified by the caller to 6402// add HTTP headers to the request. 6403func (c *MarketplacedealsInsertCall) Header() http.Header { 6404 if c.header_ == nil { 6405 c.header_ = make(http.Header) 6406 } 6407 return c.header_ 6408} 6409 6410func (c *MarketplacedealsInsertCall) doRequest(alt string) (*http.Response, error) { 6411 reqHeaders := make(http.Header) 6412 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6413 for k, v := range c.header_ { 6414 reqHeaders[k] = v 6415 } 6416 reqHeaders.Set("User-Agent", c.s.userAgent()) 6417 var body io.Reader = nil 6418 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addorderdealsrequest) 6419 if err != nil { 6420 return nil, err 6421 } 6422 reqHeaders.Set("Content-Type", "application/json") 6423 c.urlParams_.Set("alt", alt) 6424 c.urlParams_.Set("prettyPrint", "false") 6425 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals/insert") 6426 urls += "?" + c.urlParams_.Encode() 6427 req, err := http.NewRequest("POST", urls, body) 6428 if err != nil { 6429 return nil, err 6430 } 6431 req.Header = reqHeaders 6432 googleapi.Expand(req.URL, map[string]string{ 6433 "proposalId": c.proposalId, 6434 }) 6435 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6436} 6437 6438// Do executes the "adexchangebuyer.marketplacedeals.insert" call. 6439// Exactly one of *AddOrderDealsResponse or error will be non-nil. Any 6440// non-2xx status code is an error. Response headers are in either 6441// *AddOrderDealsResponse.ServerResponse.Header or (if a response was 6442// returned at all) in error.(*googleapi.Error).Header. Use 6443// googleapi.IsNotModified to check whether the returned error was 6444// because http.StatusNotModified was returned. 6445func (c *MarketplacedealsInsertCall) Do(opts ...googleapi.CallOption) (*AddOrderDealsResponse, error) { 6446 gensupport.SetOptions(c.urlParams_, opts...) 6447 res, err := c.doRequest("json") 6448 if res != nil && res.StatusCode == http.StatusNotModified { 6449 if res.Body != nil { 6450 res.Body.Close() 6451 } 6452 return nil, &googleapi.Error{ 6453 Code: res.StatusCode, 6454 Header: res.Header, 6455 } 6456 } 6457 if err != nil { 6458 return nil, err 6459 } 6460 defer googleapi.CloseBody(res) 6461 if err := googleapi.CheckResponse(res); err != nil { 6462 return nil, err 6463 } 6464 ret := &AddOrderDealsResponse{ 6465 ServerResponse: googleapi.ServerResponse{ 6466 Header: res.Header, 6467 HTTPStatusCode: res.StatusCode, 6468 }, 6469 } 6470 target := &ret 6471 if err := gensupport.DecodeResponse(target, res); err != nil { 6472 return nil, err 6473 } 6474 return ret, nil 6475 // { 6476 // "description": "Add new deals for the specified proposal", 6477 // "httpMethod": "POST", 6478 // "id": "adexchangebuyer.marketplacedeals.insert", 6479 // "parameterOrder": [ 6480 // "proposalId" 6481 // ], 6482 // "parameters": { 6483 // "proposalId": { 6484 // "description": "proposalId for which deals need to be added.", 6485 // "location": "path", 6486 // "required": true, 6487 // "type": "string" 6488 // } 6489 // }, 6490 // "path": "proposals/{proposalId}/deals/insert", 6491 // "request": { 6492 // "$ref": "AddOrderDealsRequest" 6493 // }, 6494 // "response": { 6495 // "$ref": "AddOrderDealsResponse" 6496 // }, 6497 // "scopes": [ 6498 // "https://www.googleapis.com/auth/adexchange.buyer" 6499 // ] 6500 // } 6501 6502} 6503 6504// method id "adexchangebuyer.marketplacedeals.list": 6505 6506type MarketplacedealsListCall struct { 6507 s *Service 6508 proposalId string 6509 urlParams_ gensupport.URLParams 6510 ifNoneMatch_ string 6511 ctx_ context.Context 6512 header_ http.Header 6513} 6514 6515// List: List all the deals for a given proposal 6516func (r *MarketplacedealsService) List(proposalId string) *MarketplacedealsListCall { 6517 c := &MarketplacedealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6518 c.proposalId = proposalId 6519 return c 6520} 6521 6522// PqlQuery sets the optional parameter "pqlQuery": Query string to 6523// retrieve specific deals. 6524func (c *MarketplacedealsListCall) PqlQuery(pqlQuery string) *MarketplacedealsListCall { 6525 c.urlParams_.Set("pqlQuery", pqlQuery) 6526 return c 6527} 6528 6529// Fields allows partial responses to be retrieved. See 6530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6531// for more information. 6532func (c *MarketplacedealsListCall) Fields(s ...googleapi.Field) *MarketplacedealsListCall { 6533 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6534 return c 6535} 6536 6537// IfNoneMatch sets the optional parameter which makes the operation 6538// fail if the object's ETag matches the given value. This is useful for 6539// getting updates only after the object has changed since the last 6540// request. Use googleapi.IsNotModified to check whether the response 6541// error from Do is the result of In-None-Match. 6542func (c *MarketplacedealsListCall) IfNoneMatch(entityTag string) *MarketplacedealsListCall { 6543 c.ifNoneMatch_ = entityTag 6544 return c 6545} 6546 6547// Context sets the context to be used in this call's Do method. Any 6548// pending HTTP request will be aborted if the provided context is 6549// canceled. 6550func (c *MarketplacedealsListCall) Context(ctx context.Context) *MarketplacedealsListCall { 6551 c.ctx_ = ctx 6552 return c 6553} 6554 6555// Header returns an http.Header that can be modified by the caller to 6556// add HTTP headers to the request. 6557func (c *MarketplacedealsListCall) Header() http.Header { 6558 if c.header_ == nil { 6559 c.header_ = make(http.Header) 6560 } 6561 return c.header_ 6562} 6563 6564func (c *MarketplacedealsListCall) doRequest(alt string) (*http.Response, error) { 6565 reqHeaders := make(http.Header) 6566 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6567 for k, v := range c.header_ { 6568 reqHeaders[k] = v 6569 } 6570 reqHeaders.Set("User-Agent", c.s.userAgent()) 6571 if c.ifNoneMatch_ != "" { 6572 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6573 } 6574 var body io.Reader = nil 6575 c.urlParams_.Set("alt", alt) 6576 c.urlParams_.Set("prettyPrint", "false") 6577 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals") 6578 urls += "?" + c.urlParams_.Encode() 6579 req, err := http.NewRequest("GET", urls, body) 6580 if err != nil { 6581 return nil, err 6582 } 6583 req.Header = reqHeaders 6584 googleapi.Expand(req.URL, map[string]string{ 6585 "proposalId": c.proposalId, 6586 }) 6587 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6588} 6589 6590// Do executes the "adexchangebuyer.marketplacedeals.list" call. 6591// Exactly one of *GetOrderDealsResponse or error will be non-nil. Any 6592// non-2xx status code is an error. Response headers are in either 6593// *GetOrderDealsResponse.ServerResponse.Header or (if a response was 6594// returned at all) in error.(*googleapi.Error).Header. Use 6595// googleapi.IsNotModified to check whether the returned error was 6596// because http.StatusNotModified was returned. 6597func (c *MarketplacedealsListCall) Do(opts ...googleapi.CallOption) (*GetOrderDealsResponse, error) { 6598 gensupport.SetOptions(c.urlParams_, opts...) 6599 res, err := c.doRequest("json") 6600 if res != nil && res.StatusCode == http.StatusNotModified { 6601 if res.Body != nil { 6602 res.Body.Close() 6603 } 6604 return nil, &googleapi.Error{ 6605 Code: res.StatusCode, 6606 Header: res.Header, 6607 } 6608 } 6609 if err != nil { 6610 return nil, err 6611 } 6612 defer googleapi.CloseBody(res) 6613 if err := googleapi.CheckResponse(res); err != nil { 6614 return nil, err 6615 } 6616 ret := &GetOrderDealsResponse{ 6617 ServerResponse: googleapi.ServerResponse{ 6618 Header: res.Header, 6619 HTTPStatusCode: res.StatusCode, 6620 }, 6621 } 6622 target := &ret 6623 if err := gensupport.DecodeResponse(target, res); err != nil { 6624 return nil, err 6625 } 6626 return ret, nil 6627 // { 6628 // "description": "List all the deals for a given proposal", 6629 // "httpMethod": "GET", 6630 // "id": "adexchangebuyer.marketplacedeals.list", 6631 // "parameterOrder": [ 6632 // "proposalId" 6633 // ], 6634 // "parameters": { 6635 // "pqlQuery": { 6636 // "description": "Query string to retrieve specific deals.", 6637 // "location": "query", 6638 // "type": "string" 6639 // }, 6640 // "proposalId": { 6641 // "description": "The proposalId to get deals for. To search across all proposals specify order_id = '-' as part of the URL.", 6642 // "location": "path", 6643 // "required": true, 6644 // "type": "string" 6645 // } 6646 // }, 6647 // "path": "proposals/{proposalId}/deals", 6648 // "response": { 6649 // "$ref": "GetOrderDealsResponse" 6650 // }, 6651 // "scopes": [ 6652 // "https://www.googleapis.com/auth/adexchange.buyer" 6653 // ] 6654 // } 6655 6656} 6657 6658// method id "adexchangebuyer.marketplacedeals.update": 6659 6660type MarketplacedealsUpdateCall struct { 6661 s *Service 6662 proposalId string 6663 editallorderdealsrequest *EditAllOrderDealsRequest 6664 urlParams_ gensupport.URLParams 6665 ctx_ context.Context 6666 header_ http.Header 6667} 6668 6669// Update: Replaces all the deals in the proposal with the passed in 6670// deals 6671func (r *MarketplacedealsService) Update(proposalId string, editallorderdealsrequest *EditAllOrderDealsRequest) *MarketplacedealsUpdateCall { 6672 c := &MarketplacedealsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6673 c.proposalId = proposalId 6674 c.editallorderdealsrequest = editallorderdealsrequest 6675 return c 6676} 6677 6678// Fields allows partial responses to be retrieved. See 6679// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6680// for more information. 6681func (c *MarketplacedealsUpdateCall) Fields(s ...googleapi.Field) *MarketplacedealsUpdateCall { 6682 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6683 return c 6684} 6685 6686// Context sets the context to be used in this call's Do method. Any 6687// pending HTTP request will be aborted if the provided context is 6688// canceled. 6689func (c *MarketplacedealsUpdateCall) Context(ctx context.Context) *MarketplacedealsUpdateCall { 6690 c.ctx_ = ctx 6691 return c 6692} 6693 6694// Header returns an http.Header that can be modified by the caller to 6695// add HTTP headers to the request. 6696func (c *MarketplacedealsUpdateCall) Header() http.Header { 6697 if c.header_ == nil { 6698 c.header_ = make(http.Header) 6699 } 6700 return c.header_ 6701} 6702 6703func (c *MarketplacedealsUpdateCall) doRequest(alt string) (*http.Response, error) { 6704 reqHeaders := make(http.Header) 6705 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6706 for k, v := range c.header_ { 6707 reqHeaders[k] = v 6708 } 6709 reqHeaders.Set("User-Agent", c.s.userAgent()) 6710 var body io.Reader = nil 6711 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editallorderdealsrequest) 6712 if err != nil { 6713 return nil, err 6714 } 6715 reqHeaders.Set("Content-Type", "application/json") 6716 c.urlParams_.Set("alt", alt) 6717 c.urlParams_.Set("prettyPrint", "false") 6718 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/deals/update") 6719 urls += "?" + c.urlParams_.Encode() 6720 req, err := http.NewRequest("POST", urls, body) 6721 if err != nil { 6722 return nil, err 6723 } 6724 req.Header = reqHeaders 6725 googleapi.Expand(req.URL, map[string]string{ 6726 "proposalId": c.proposalId, 6727 }) 6728 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6729} 6730 6731// Do executes the "adexchangebuyer.marketplacedeals.update" call. 6732// Exactly one of *EditAllOrderDealsResponse or error will be non-nil. 6733// Any non-2xx status code is an error. Response headers are in either 6734// *EditAllOrderDealsResponse.ServerResponse.Header or (if a response 6735// was returned at all) in error.(*googleapi.Error).Header. Use 6736// googleapi.IsNotModified to check whether the returned error was 6737// because http.StatusNotModified was returned. 6738func (c *MarketplacedealsUpdateCall) Do(opts ...googleapi.CallOption) (*EditAllOrderDealsResponse, error) { 6739 gensupport.SetOptions(c.urlParams_, opts...) 6740 res, err := c.doRequest("json") 6741 if res != nil && res.StatusCode == http.StatusNotModified { 6742 if res.Body != nil { 6743 res.Body.Close() 6744 } 6745 return nil, &googleapi.Error{ 6746 Code: res.StatusCode, 6747 Header: res.Header, 6748 } 6749 } 6750 if err != nil { 6751 return nil, err 6752 } 6753 defer googleapi.CloseBody(res) 6754 if err := googleapi.CheckResponse(res); err != nil { 6755 return nil, err 6756 } 6757 ret := &EditAllOrderDealsResponse{ 6758 ServerResponse: googleapi.ServerResponse{ 6759 Header: res.Header, 6760 HTTPStatusCode: res.StatusCode, 6761 }, 6762 } 6763 target := &ret 6764 if err := gensupport.DecodeResponse(target, res); err != nil { 6765 return nil, err 6766 } 6767 return ret, nil 6768 // { 6769 // "description": "Replaces all the deals in the proposal with the passed in deals", 6770 // "httpMethod": "POST", 6771 // "id": "adexchangebuyer.marketplacedeals.update", 6772 // "parameterOrder": [ 6773 // "proposalId" 6774 // ], 6775 // "parameters": { 6776 // "proposalId": { 6777 // "description": "The proposalId to edit deals on.", 6778 // "location": "path", 6779 // "required": true, 6780 // "type": "string" 6781 // } 6782 // }, 6783 // "path": "proposals/{proposalId}/deals/update", 6784 // "request": { 6785 // "$ref": "EditAllOrderDealsRequest" 6786 // }, 6787 // "response": { 6788 // "$ref": "EditAllOrderDealsResponse" 6789 // }, 6790 // "scopes": [ 6791 // "https://www.googleapis.com/auth/adexchange.buyer" 6792 // ] 6793 // } 6794 6795} 6796 6797// method id "adexchangebuyer.marketplacenotes.insert": 6798 6799type MarketplacenotesInsertCall struct { 6800 s *Service 6801 proposalId string 6802 addordernotesrequest *AddOrderNotesRequest 6803 urlParams_ gensupport.URLParams 6804 ctx_ context.Context 6805 header_ http.Header 6806} 6807 6808// Insert: Add notes to the proposal 6809func (r *MarketplacenotesService) Insert(proposalId string, addordernotesrequest *AddOrderNotesRequest) *MarketplacenotesInsertCall { 6810 c := &MarketplacenotesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6811 c.proposalId = proposalId 6812 c.addordernotesrequest = addordernotesrequest 6813 return c 6814} 6815 6816// Fields allows partial responses to be retrieved. See 6817// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6818// for more information. 6819func (c *MarketplacenotesInsertCall) Fields(s ...googleapi.Field) *MarketplacenotesInsertCall { 6820 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6821 return c 6822} 6823 6824// Context sets the context to be used in this call's Do method. Any 6825// pending HTTP request will be aborted if the provided context is 6826// canceled. 6827func (c *MarketplacenotesInsertCall) Context(ctx context.Context) *MarketplacenotesInsertCall { 6828 c.ctx_ = ctx 6829 return c 6830} 6831 6832// Header returns an http.Header that can be modified by the caller to 6833// add HTTP headers to the request. 6834func (c *MarketplacenotesInsertCall) Header() http.Header { 6835 if c.header_ == nil { 6836 c.header_ = make(http.Header) 6837 } 6838 return c.header_ 6839} 6840 6841func (c *MarketplacenotesInsertCall) doRequest(alt string) (*http.Response, error) { 6842 reqHeaders := make(http.Header) 6843 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 6844 for k, v := range c.header_ { 6845 reqHeaders[k] = v 6846 } 6847 reqHeaders.Set("User-Agent", c.s.userAgent()) 6848 var body io.Reader = nil 6849 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addordernotesrequest) 6850 if err != nil { 6851 return nil, err 6852 } 6853 reqHeaders.Set("Content-Type", "application/json") 6854 c.urlParams_.Set("alt", alt) 6855 c.urlParams_.Set("prettyPrint", "false") 6856 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/notes/insert") 6857 urls += "?" + c.urlParams_.Encode() 6858 req, err := http.NewRequest("POST", urls, body) 6859 if err != nil { 6860 return nil, err 6861 } 6862 req.Header = reqHeaders 6863 googleapi.Expand(req.URL, map[string]string{ 6864 "proposalId": c.proposalId, 6865 }) 6866 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6867} 6868 6869// Do executes the "adexchangebuyer.marketplacenotes.insert" call. 6870// Exactly one of *AddOrderNotesResponse or error will be non-nil. Any 6871// non-2xx status code is an error. Response headers are in either 6872// *AddOrderNotesResponse.ServerResponse.Header or (if a response was 6873// returned at all) in error.(*googleapi.Error).Header. Use 6874// googleapi.IsNotModified to check whether the returned error was 6875// because http.StatusNotModified was returned. 6876func (c *MarketplacenotesInsertCall) Do(opts ...googleapi.CallOption) (*AddOrderNotesResponse, error) { 6877 gensupport.SetOptions(c.urlParams_, opts...) 6878 res, err := c.doRequest("json") 6879 if res != nil && res.StatusCode == http.StatusNotModified { 6880 if res.Body != nil { 6881 res.Body.Close() 6882 } 6883 return nil, &googleapi.Error{ 6884 Code: res.StatusCode, 6885 Header: res.Header, 6886 } 6887 } 6888 if err != nil { 6889 return nil, err 6890 } 6891 defer googleapi.CloseBody(res) 6892 if err := googleapi.CheckResponse(res); err != nil { 6893 return nil, err 6894 } 6895 ret := &AddOrderNotesResponse{ 6896 ServerResponse: googleapi.ServerResponse{ 6897 Header: res.Header, 6898 HTTPStatusCode: res.StatusCode, 6899 }, 6900 } 6901 target := &ret 6902 if err := gensupport.DecodeResponse(target, res); err != nil { 6903 return nil, err 6904 } 6905 return ret, nil 6906 // { 6907 // "description": "Add notes to the proposal", 6908 // "httpMethod": "POST", 6909 // "id": "adexchangebuyer.marketplacenotes.insert", 6910 // "parameterOrder": [ 6911 // "proposalId" 6912 // ], 6913 // "parameters": { 6914 // "proposalId": { 6915 // "description": "The proposalId to add notes for.", 6916 // "location": "path", 6917 // "required": true, 6918 // "type": "string" 6919 // } 6920 // }, 6921 // "path": "proposals/{proposalId}/notes/insert", 6922 // "request": { 6923 // "$ref": "AddOrderNotesRequest" 6924 // }, 6925 // "response": { 6926 // "$ref": "AddOrderNotesResponse" 6927 // }, 6928 // "scopes": [ 6929 // "https://www.googleapis.com/auth/adexchange.buyer" 6930 // ] 6931 // } 6932 6933} 6934 6935// method id "adexchangebuyer.marketplacenotes.list": 6936 6937type MarketplacenotesListCall struct { 6938 s *Service 6939 proposalId string 6940 urlParams_ gensupport.URLParams 6941 ifNoneMatch_ string 6942 ctx_ context.Context 6943 header_ http.Header 6944} 6945 6946// List: Get all the notes associated with a proposal 6947func (r *MarketplacenotesService) List(proposalId string) *MarketplacenotesListCall { 6948 c := &MarketplacenotesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6949 c.proposalId = proposalId 6950 return c 6951} 6952 6953// PqlQuery sets the optional parameter "pqlQuery": Query string to 6954// retrieve specific notes. To search the text contents of notes, please 6955// use syntax like "WHERE note.note = "foo" or "WHERE note.note LIKE 6956// "%bar%" 6957func (c *MarketplacenotesListCall) PqlQuery(pqlQuery string) *MarketplacenotesListCall { 6958 c.urlParams_.Set("pqlQuery", pqlQuery) 6959 return c 6960} 6961 6962// Fields allows partial responses to be retrieved. See 6963// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6964// for more information. 6965func (c *MarketplacenotesListCall) Fields(s ...googleapi.Field) *MarketplacenotesListCall { 6966 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6967 return c 6968} 6969 6970// IfNoneMatch sets the optional parameter which makes the operation 6971// fail if the object's ETag matches the given value. This is useful for 6972// getting updates only after the object has changed since the last 6973// request. Use googleapi.IsNotModified to check whether the response 6974// error from Do is the result of In-None-Match. 6975func (c *MarketplacenotesListCall) IfNoneMatch(entityTag string) *MarketplacenotesListCall { 6976 c.ifNoneMatch_ = entityTag 6977 return c 6978} 6979 6980// Context sets the context to be used in this call's Do method. Any 6981// pending HTTP request will be aborted if the provided context is 6982// canceled. 6983func (c *MarketplacenotesListCall) Context(ctx context.Context) *MarketplacenotesListCall { 6984 c.ctx_ = ctx 6985 return c 6986} 6987 6988// Header returns an http.Header that can be modified by the caller to 6989// add HTTP headers to the request. 6990func (c *MarketplacenotesListCall) Header() http.Header { 6991 if c.header_ == nil { 6992 c.header_ = make(http.Header) 6993 } 6994 return c.header_ 6995} 6996 6997func (c *MarketplacenotesListCall) doRequest(alt string) (*http.Response, error) { 6998 reqHeaders := make(http.Header) 6999 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7000 for k, v := range c.header_ { 7001 reqHeaders[k] = v 7002 } 7003 reqHeaders.Set("User-Agent", c.s.userAgent()) 7004 if c.ifNoneMatch_ != "" { 7005 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7006 } 7007 var body io.Reader = nil 7008 c.urlParams_.Set("alt", alt) 7009 c.urlParams_.Set("prettyPrint", "false") 7010 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/notes") 7011 urls += "?" + c.urlParams_.Encode() 7012 req, err := http.NewRequest("GET", urls, body) 7013 if err != nil { 7014 return nil, err 7015 } 7016 req.Header = reqHeaders 7017 googleapi.Expand(req.URL, map[string]string{ 7018 "proposalId": c.proposalId, 7019 }) 7020 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7021} 7022 7023// Do executes the "adexchangebuyer.marketplacenotes.list" call. 7024// Exactly one of *GetOrderNotesResponse or error will be non-nil. Any 7025// non-2xx status code is an error. Response headers are in either 7026// *GetOrderNotesResponse.ServerResponse.Header or (if a response was 7027// returned at all) in error.(*googleapi.Error).Header. Use 7028// googleapi.IsNotModified to check whether the returned error was 7029// because http.StatusNotModified was returned. 7030func (c *MarketplacenotesListCall) Do(opts ...googleapi.CallOption) (*GetOrderNotesResponse, error) { 7031 gensupport.SetOptions(c.urlParams_, opts...) 7032 res, err := c.doRequest("json") 7033 if res != nil && res.StatusCode == http.StatusNotModified { 7034 if res.Body != nil { 7035 res.Body.Close() 7036 } 7037 return nil, &googleapi.Error{ 7038 Code: res.StatusCode, 7039 Header: res.Header, 7040 } 7041 } 7042 if err != nil { 7043 return nil, err 7044 } 7045 defer googleapi.CloseBody(res) 7046 if err := googleapi.CheckResponse(res); err != nil { 7047 return nil, err 7048 } 7049 ret := &GetOrderNotesResponse{ 7050 ServerResponse: googleapi.ServerResponse{ 7051 Header: res.Header, 7052 HTTPStatusCode: res.StatusCode, 7053 }, 7054 } 7055 target := &ret 7056 if err := gensupport.DecodeResponse(target, res); err != nil { 7057 return nil, err 7058 } 7059 return ret, nil 7060 // { 7061 // "description": "Get all the notes associated with a proposal", 7062 // "httpMethod": "GET", 7063 // "id": "adexchangebuyer.marketplacenotes.list", 7064 // "parameterOrder": [ 7065 // "proposalId" 7066 // ], 7067 // "parameters": { 7068 // "pqlQuery": { 7069 // "description": "Query string to retrieve specific notes. To search the text contents of notes, please use syntax like \"WHERE note.note = \"foo\" or \"WHERE note.note LIKE \"%bar%\"", 7070 // "location": "query", 7071 // "type": "string" 7072 // }, 7073 // "proposalId": { 7074 // "description": "The proposalId to get notes for. To search across all proposals specify order_id = '-' as part of the URL.", 7075 // "location": "path", 7076 // "required": true, 7077 // "type": "string" 7078 // } 7079 // }, 7080 // "path": "proposals/{proposalId}/notes", 7081 // "response": { 7082 // "$ref": "GetOrderNotesResponse" 7083 // }, 7084 // "scopes": [ 7085 // "https://www.googleapis.com/auth/adexchange.buyer" 7086 // ] 7087 // } 7088 7089} 7090 7091// method id "adexchangebuyer.marketplaceprivateauction.updateproposal": 7092 7093type MarketplaceprivateauctionUpdateproposalCall struct { 7094 s *Service 7095 privateAuctionId string 7096 updateprivateauctionproposalrequest *UpdatePrivateAuctionProposalRequest 7097 urlParams_ gensupport.URLParams 7098 ctx_ context.Context 7099 header_ http.Header 7100} 7101 7102// Updateproposal: Update a given private auction proposal 7103func (r *MarketplaceprivateauctionService) Updateproposal(privateAuctionId string, updateprivateauctionproposalrequest *UpdatePrivateAuctionProposalRequest) *MarketplaceprivateauctionUpdateproposalCall { 7104 c := &MarketplaceprivateauctionUpdateproposalCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7105 c.privateAuctionId = privateAuctionId 7106 c.updateprivateauctionproposalrequest = updateprivateauctionproposalrequest 7107 return c 7108} 7109 7110// Fields allows partial responses to be retrieved. See 7111// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7112// for more information. 7113func (c *MarketplaceprivateauctionUpdateproposalCall) Fields(s ...googleapi.Field) *MarketplaceprivateauctionUpdateproposalCall { 7114 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7115 return c 7116} 7117 7118// Context sets the context to be used in this call's Do method. Any 7119// pending HTTP request will be aborted if the provided context is 7120// canceled. 7121func (c *MarketplaceprivateauctionUpdateproposalCall) Context(ctx context.Context) *MarketplaceprivateauctionUpdateproposalCall { 7122 c.ctx_ = ctx 7123 return c 7124} 7125 7126// Header returns an http.Header that can be modified by the caller to 7127// add HTTP headers to the request. 7128func (c *MarketplaceprivateauctionUpdateproposalCall) Header() http.Header { 7129 if c.header_ == nil { 7130 c.header_ = make(http.Header) 7131 } 7132 return c.header_ 7133} 7134 7135func (c *MarketplaceprivateauctionUpdateproposalCall) doRequest(alt string) (*http.Response, error) { 7136 reqHeaders := make(http.Header) 7137 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7138 for k, v := range c.header_ { 7139 reqHeaders[k] = v 7140 } 7141 reqHeaders.Set("User-Agent", c.s.userAgent()) 7142 var body io.Reader = nil 7143 body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateprivateauctionproposalrequest) 7144 if err != nil { 7145 return nil, err 7146 } 7147 reqHeaders.Set("Content-Type", "application/json") 7148 c.urlParams_.Set("alt", alt) 7149 c.urlParams_.Set("prettyPrint", "false") 7150 urls := googleapi.ResolveRelative(c.s.BasePath, "privateauction/{privateAuctionId}/updateproposal") 7151 urls += "?" + c.urlParams_.Encode() 7152 req, err := http.NewRequest("POST", urls, body) 7153 if err != nil { 7154 return nil, err 7155 } 7156 req.Header = reqHeaders 7157 googleapi.Expand(req.URL, map[string]string{ 7158 "privateAuctionId": c.privateAuctionId, 7159 }) 7160 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7161} 7162 7163// Do executes the "adexchangebuyer.marketplaceprivateauction.updateproposal" call. 7164func (c *MarketplaceprivateauctionUpdateproposalCall) Do(opts ...googleapi.CallOption) error { 7165 gensupport.SetOptions(c.urlParams_, opts...) 7166 res, err := c.doRequest("json") 7167 if err != nil { 7168 return err 7169 } 7170 defer googleapi.CloseBody(res) 7171 if err := googleapi.CheckResponse(res); err != nil { 7172 return err 7173 } 7174 return nil 7175 // { 7176 // "description": "Update a given private auction proposal", 7177 // "httpMethod": "POST", 7178 // "id": "adexchangebuyer.marketplaceprivateauction.updateproposal", 7179 // "parameterOrder": [ 7180 // "privateAuctionId" 7181 // ], 7182 // "parameters": { 7183 // "privateAuctionId": { 7184 // "description": "The private auction id to be updated.", 7185 // "location": "path", 7186 // "required": true, 7187 // "type": "string" 7188 // } 7189 // }, 7190 // "path": "privateauction/{privateAuctionId}/updateproposal", 7191 // "request": { 7192 // "$ref": "UpdatePrivateAuctionProposalRequest" 7193 // }, 7194 // "scopes": [ 7195 // "https://www.googleapis.com/auth/adexchange.buyer" 7196 // ] 7197 // } 7198 7199} 7200 7201// method id "adexchangebuyer.performanceReport.list": 7202 7203type PerformanceReportListCall struct { 7204 s *Service 7205 urlParams_ gensupport.URLParams 7206 ifNoneMatch_ string 7207 ctx_ context.Context 7208 header_ http.Header 7209} 7210 7211// List: Retrieves the authenticated user's list of performance metrics. 7212func (r *PerformanceReportService) List(accountId int64, endDateTime string, startDateTime string) *PerformanceReportListCall { 7213 c := &PerformanceReportListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7214 c.urlParams_.Set("accountId", fmt.Sprint(accountId)) 7215 c.urlParams_.Set("endDateTime", endDateTime) 7216 c.urlParams_.Set("startDateTime", startDateTime) 7217 return c 7218} 7219 7220// MaxResults sets the optional parameter "maxResults": Maximum number 7221// of entries returned on one result page. If not set, the default is 7222// 100. 7223func (c *PerformanceReportListCall) MaxResults(maxResults int64) *PerformanceReportListCall { 7224 c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) 7225 return c 7226} 7227 7228// PageToken sets the optional parameter "pageToken": A continuation 7229// token, used to page through performance reports. To retrieve the next 7230// page, set this parameter to the value of "nextPageToken" from the 7231// previous response. 7232func (c *PerformanceReportListCall) PageToken(pageToken string) *PerformanceReportListCall { 7233 c.urlParams_.Set("pageToken", pageToken) 7234 return c 7235} 7236 7237// Fields allows partial responses to be retrieved. See 7238// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7239// for more information. 7240func (c *PerformanceReportListCall) Fields(s ...googleapi.Field) *PerformanceReportListCall { 7241 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7242 return c 7243} 7244 7245// IfNoneMatch sets the optional parameter which makes the operation 7246// fail if the object's ETag matches the given value. This is useful for 7247// getting updates only after the object has changed since the last 7248// request. Use googleapi.IsNotModified to check whether the response 7249// error from Do is the result of In-None-Match. 7250func (c *PerformanceReportListCall) IfNoneMatch(entityTag string) *PerformanceReportListCall { 7251 c.ifNoneMatch_ = entityTag 7252 return c 7253} 7254 7255// Context sets the context to be used in this call's Do method. Any 7256// pending HTTP request will be aborted if the provided context is 7257// canceled. 7258func (c *PerformanceReportListCall) Context(ctx context.Context) *PerformanceReportListCall { 7259 c.ctx_ = ctx 7260 return c 7261} 7262 7263// Header returns an http.Header that can be modified by the caller to 7264// add HTTP headers to the request. 7265func (c *PerformanceReportListCall) Header() http.Header { 7266 if c.header_ == nil { 7267 c.header_ = make(http.Header) 7268 } 7269 return c.header_ 7270} 7271 7272func (c *PerformanceReportListCall) doRequest(alt string) (*http.Response, error) { 7273 reqHeaders := make(http.Header) 7274 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7275 for k, v := range c.header_ { 7276 reqHeaders[k] = v 7277 } 7278 reqHeaders.Set("User-Agent", c.s.userAgent()) 7279 if c.ifNoneMatch_ != "" { 7280 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7281 } 7282 var body io.Reader = nil 7283 c.urlParams_.Set("alt", alt) 7284 c.urlParams_.Set("prettyPrint", "false") 7285 urls := googleapi.ResolveRelative(c.s.BasePath, "performancereport") 7286 urls += "?" + c.urlParams_.Encode() 7287 req, err := http.NewRequest("GET", urls, body) 7288 if err != nil { 7289 return nil, err 7290 } 7291 req.Header = reqHeaders 7292 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7293} 7294 7295// Do executes the "adexchangebuyer.performanceReport.list" call. 7296// Exactly one of *PerformanceReportList or error will be non-nil. Any 7297// non-2xx status code is an error. Response headers are in either 7298// *PerformanceReportList.ServerResponse.Header or (if a response was 7299// returned at all) in error.(*googleapi.Error).Header. Use 7300// googleapi.IsNotModified to check whether the returned error was 7301// because http.StatusNotModified was returned. 7302func (c *PerformanceReportListCall) Do(opts ...googleapi.CallOption) (*PerformanceReportList, error) { 7303 gensupport.SetOptions(c.urlParams_, opts...) 7304 res, err := c.doRequest("json") 7305 if res != nil && res.StatusCode == http.StatusNotModified { 7306 if res.Body != nil { 7307 res.Body.Close() 7308 } 7309 return nil, &googleapi.Error{ 7310 Code: res.StatusCode, 7311 Header: res.Header, 7312 } 7313 } 7314 if err != nil { 7315 return nil, err 7316 } 7317 defer googleapi.CloseBody(res) 7318 if err := googleapi.CheckResponse(res); err != nil { 7319 return nil, err 7320 } 7321 ret := &PerformanceReportList{ 7322 ServerResponse: googleapi.ServerResponse{ 7323 Header: res.Header, 7324 HTTPStatusCode: res.StatusCode, 7325 }, 7326 } 7327 target := &ret 7328 if err := gensupport.DecodeResponse(target, res); err != nil { 7329 return nil, err 7330 } 7331 return ret, nil 7332 // { 7333 // "description": "Retrieves the authenticated user's list of performance metrics.", 7334 // "httpMethod": "GET", 7335 // "id": "adexchangebuyer.performanceReport.list", 7336 // "parameterOrder": [ 7337 // "accountId", 7338 // "endDateTime", 7339 // "startDateTime" 7340 // ], 7341 // "parameters": { 7342 // "accountId": { 7343 // "description": "The account id to get the reports.", 7344 // "format": "int64", 7345 // "location": "query", 7346 // "required": true, 7347 // "type": "string" 7348 // }, 7349 // "endDateTime": { 7350 // "description": "The end time of the report in ISO 8601 timestamp format using UTC.", 7351 // "location": "query", 7352 // "required": true, 7353 // "type": "string" 7354 // }, 7355 // "maxResults": { 7356 // "description": "Maximum number of entries returned on one result page. If not set, the default is 100. Optional.", 7357 // "format": "uint32", 7358 // "location": "query", 7359 // "maximum": "1000", 7360 // "minimum": "1", 7361 // "type": "integer" 7362 // }, 7363 // "pageToken": { 7364 // "description": "A continuation token, used to page through performance reports. To retrieve the next page, set this parameter to the value of \"nextPageToken\" from the previous response. Optional.", 7365 // "location": "query", 7366 // "type": "string" 7367 // }, 7368 // "startDateTime": { 7369 // "description": "The start time of the report in ISO 8601 timestamp format using UTC.", 7370 // "location": "query", 7371 // "required": true, 7372 // "type": "string" 7373 // } 7374 // }, 7375 // "path": "performancereport", 7376 // "response": { 7377 // "$ref": "PerformanceReportList" 7378 // }, 7379 // "scopes": [ 7380 // "https://www.googleapis.com/auth/adexchange.buyer" 7381 // ] 7382 // } 7383 7384} 7385 7386// method id "adexchangebuyer.pretargetingConfig.delete": 7387 7388type PretargetingConfigDeleteCall struct { 7389 s *Service 7390 accountId int64 7391 configId int64 7392 urlParams_ gensupport.URLParams 7393 ctx_ context.Context 7394 header_ http.Header 7395} 7396 7397// Delete: Deletes an existing pretargeting config. 7398func (r *PretargetingConfigService) Delete(accountId int64, configId int64) *PretargetingConfigDeleteCall { 7399 c := &PretargetingConfigDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7400 c.accountId = accountId 7401 c.configId = configId 7402 return c 7403} 7404 7405// Fields allows partial responses to be retrieved. See 7406// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7407// for more information. 7408func (c *PretargetingConfigDeleteCall) Fields(s ...googleapi.Field) *PretargetingConfigDeleteCall { 7409 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7410 return c 7411} 7412 7413// Context sets the context to be used in this call's Do method. Any 7414// pending HTTP request will be aborted if the provided context is 7415// canceled. 7416func (c *PretargetingConfigDeleteCall) Context(ctx context.Context) *PretargetingConfigDeleteCall { 7417 c.ctx_ = ctx 7418 return c 7419} 7420 7421// Header returns an http.Header that can be modified by the caller to 7422// add HTTP headers to the request. 7423func (c *PretargetingConfigDeleteCall) Header() http.Header { 7424 if c.header_ == nil { 7425 c.header_ = make(http.Header) 7426 } 7427 return c.header_ 7428} 7429 7430func (c *PretargetingConfigDeleteCall) doRequest(alt string) (*http.Response, error) { 7431 reqHeaders := make(http.Header) 7432 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7433 for k, v := range c.header_ { 7434 reqHeaders[k] = v 7435 } 7436 reqHeaders.Set("User-Agent", c.s.userAgent()) 7437 var body io.Reader = nil 7438 c.urlParams_.Set("alt", alt) 7439 c.urlParams_.Set("prettyPrint", "false") 7440 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}") 7441 urls += "?" + c.urlParams_.Encode() 7442 req, err := http.NewRequest("DELETE", urls, body) 7443 if err != nil { 7444 return nil, err 7445 } 7446 req.Header = reqHeaders 7447 googleapi.Expand(req.URL, map[string]string{ 7448 "accountId": strconv.FormatInt(c.accountId, 10), 7449 "configId": strconv.FormatInt(c.configId, 10), 7450 }) 7451 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7452} 7453 7454// Do executes the "adexchangebuyer.pretargetingConfig.delete" call. 7455func (c *PretargetingConfigDeleteCall) Do(opts ...googleapi.CallOption) error { 7456 gensupport.SetOptions(c.urlParams_, opts...) 7457 res, err := c.doRequest("json") 7458 if err != nil { 7459 return err 7460 } 7461 defer googleapi.CloseBody(res) 7462 if err := googleapi.CheckResponse(res); err != nil { 7463 return err 7464 } 7465 return nil 7466 // { 7467 // "description": "Deletes an existing pretargeting config.", 7468 // "httpMethod": "DELETE", 7469 // "id": "adexchangebuyer.pretargetingConfig.delete", 7470 // "parameterOrder": [ 7471 // "accountId", 7472 // "configId" 7473 // ], 7474 // "parameters": { 7475 // "accountId": { 7476 // "description": "The account id to delete the pretargeting config for.", 7477 // "format": "int64", 7478 // "location": "path", 7479 // "required": true, 7480 // "type": "string" 7481 // }, 7482 // "configId": { 7483 // "description": "The specific id of the configuration to delete.", 7484 // "format": "int64", 7485 // "location": "path", 7486 // "required": true, 7487 // "type": "string" 7488 // } 7489 // }, 7490 // "path": "pretargetingconfigs/{accountId}/{configId}", 7491 // "scopes": [ 7492 // "https://www.googleapis.com/auth/adexchange.buyer" 7493 // ] 7494 // } 7495 7496} 7497 7498// method id "adexchangebuyer.pretargetingConfig.get": 7499 7500type PretargetingConfigGetCall struct { 7501 s *Service 7502 accountId int64 7503 configId int64 7504 urlParams_ gensupport.URLParams 7505 ifNoneMatch_ string 7506 ctx_ context.Context 7507 header_ http.Header 7508} 7509 7510// Get: Gets a specific pretargeting configuration 7511func (r *PretargetingConfigService) Get(accountId int64, configId int64) *PretargetingConfigGetCall { 7512 c := &PretargetingConfigGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7513 c.accountId = accountId 7514 c.configId = configId 7515 return c 7516} 7517 7518// Fields allows partial responses to be retrieved. See 7519// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7520// for more information. 7521func (c *PretargetingConfigGetCall) Fields(s ...googleapi.Field) *PretargetingConfigGetCall { 7522 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7523 return c 7524} 7525 7526// IfNoneMatch sets the optional parameter which makes the operation 7527// fail if the object's ETag matches the given value. This is useful for 7528// getting updates only after the object has changed since the last 7529// request. Use googleapi.IsNotModified to check whether the response 7530// error from Do is the result of In-None-Match. 7531func (c *PretargetingConfigGetCall) IfNoneMatch(entityTag string) *PretargetingConfigGetCall { 7532 c.ifNoneMatch_ = entityTag 7533 return c 7534} 7535 7536// Context sets the context to be used in this call's Do method. Any 7537// pending HTTP request will be aborted if the provided context is 7538// canceled. 7539func (c *PretargetingConfigGetCall) Context(ctx context.Context) *PretargetingConfigGetCall { 7540 c.ctx_ = ctx 7541 return c 7542} 7543 7544// Header returns an http.Header that can be modified by the caller to 7545// add HTTP headers to the request. 7546func (c *PretargetingConfigGetCall) Header() http.Header { 7547 if c.header_ == nil { 7548 c.header_ = make(http.Header) 7549 } 7550 return c.header_ 7551} 7552 7553func (c *PretargetingConfigGetCall) doRequest(alt string) (*http.Response, error) { 7554 reqHeaders := make(http.Header) 7555 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7556 for k, v := range c.header_ { 7557 reqHeaders[k] = v 7558 } 7559 reqHeaders.Set("User-Agent", c.s.userAgent()) 7560 if c.ifNoneMatch_ != "" { 7561 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7562 } 7563 var body io.Reader = nil 7564 c.urlParams_.Set("alt", alt) 7565 c.urlParams_.Set("prettyPrint", "false") 7566 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}") 7567 urls += "?" + c.urlParams_.Encode() 7568 req, err := http.NewRequest("GET", urls, body) 7569 if err != nil { 7570 return nil, err 7571 } 7572 req.Header = reqHeaders 7573 googleapi.Expand(req.URL, map[string]string{ 7574 "accountId": strconv.FormatInt(c.accountId, 10), 7575 "configId": strconv.FormatInt(c.configId, 10), 7576 }) 7577 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7578} 7579 7580// Do executes the "adexchangebuyer.pretargetingConfig.get" call. 7581// Exactly one of *PretargetingConfig or error will be non-nil. Any 7582// non-2xx status code is an error. Response headers are in either 7583// *PretargetingConfig.ServerResponse.Header or (if a response was 7584// returned at all) in error.(*googleapi.Error).Header. Use 7585// googleapi.IsNotModified to check whether the returned error was 7586// because http.StatusNotModified was returned. 7587func (c *PretargetingConfigGetCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) { 7588 gensupport.SetOptions(c.urlParams_, opts...) 7589 res, err := c.doRequest("json") 7590 if res != nil && res.StatusCode == http.StatusNotModified { 7591 if res.Body != nil { 7592 res.Body.Close() 7593 } 7594 return nil, &googleapi.Error{ 7595 Code: res.StatusCode, 7596 Header: res.Header, 7597 } 7598 } 7599 if err != nil { 7600 return nil, err 7601 } 7602 defer googleapi.CloseBody(res) 7603 if err := googleapi.CheckResponse(res); err != nil { 7604 return nil, err 7605 } 7606 ret := &PretargetingConfig{ 7607 ServerResponse: googleapi.ServerResponse{ 7608 Header: res.Header, 7609 HTTPStatusCode: res.StatusCode, 7610 }, 7611 } 7612 target := &ret 7613 if err := gensupport.DecodeResponse(target, res); err != nil { 7614 return nil, err 7615 } 7616 return ret, nil 7617 // { 7618 // "description": "Gets a specific pretargeting configuration", 7619 // "httpMethod": "GET", 7620 // "id": "adexchangebuyer.pretargetingConfig.get", 7621 // "parameterOrder": [ 7622 // "accountId", 7623 // "configId" 7624 // ], 7625 // "parameters": { 7626 // "accountId": { 7627 // "description": "The account id to get the pretargeting config for.", 7628 // "format": "int64", 7629 // "location": "path", 7630 // "required": true, 7631 // "type": "string" 7632 // }, 7633 // "configId": { 7634 // "description": "The specific id of the configuration to retrieve.", 7635 // "format": "int64", 7636 // "location": "path", 7637 // "required": true, 7638 // "type": "string" 7639 // } 7640 // }, 7641 // "path": "pretargetingconfigs/{accountId}/{configId}", 7642 // "response": { 7643 // "$ref": "PretargetingConfig" 7644 // }, 7645 // "scopes": [ 7646 // "https://www.googleapis.com/auth/adexchange.buyer" 7647 // ] 7648 // } 7649 7650} 7651 7652// method id "adexchangebuyer.pretargetingConfig.insert": 7653 7654type PretargetingConfigInsertCall struct { 7655 s *Service 7656 accountId int64 7657 pretargetingconfig *PretargetingConfig 7658 urlParams_ gensupport.URLParams 7659 ctx_ context.Context 7660 header_ http.Header 7661} 7662 7663// Insert: Inserts a new pretargeting configuration. 7664func (r *PretargetingConfigService) Insert(accountId int64, pretargetingconfig *PretargetingConfig) *PretargetingConfigInsertCall { 7665 c := &PretargetingConfigInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7666 c.accountId = accountId 7667 c.pretargetingconfig = pretargetingconfig 7668 return c 7669} 7670 7671// Fields allows partial responses to be retrieved. See 7672// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7673// for more information. 7674func (c *PretargetingConfigInsertCall) Fields(s ...googleapi.Field) *PretargetingConfigInsertCall { 7675 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7676 return c 7677} 7678 7679// Context sets the context to be used in this call's Do method. Any 7680// pending HTTP request will be aborted if the provided context is 7681// canceled. 7682func (c *PretargetingConfigInsertCall) Context(ctx context.Context) *PretargetingConfigInsertCall { 7683 c.ctx_ = ctx 7684 return c 7685} 7686 7687// Header returns an http.Header that can be modified by the caller to 7688// add HTTP headers to the request. 7689func (c *PretargetingConfigInsertCall) Header() http.Header { 7690 if c.header_ == nil { 7691 c.header_ = make(http.Header) 7692 } 7693 return c.header_ 7694} 7695 7696func (c *PretargetingConfigInsertCall) doRequest(alt string) (*http.Response, error) { 7697 reqHeaders := make(http.Header) 7698 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7699 for k, v := range c.header_ { 7700 reqHeaders[k] = v 7701 } 7702 reqHeaders.Set("User-Agent", c.s.userAgent()) 7703 var body io.Reader = nil 7704 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig) 7705 if err != nil { 7706 return nil, err 7707 } 7708 reqHeaders.Set("Content-Type", "application/json") 7709 c.urlParams_.Set("alt", alt) 7710 c.urlParams_.Set("prettyPrint", "false") 7711 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}") 7712 urls += "?" + c.urlParams_.Encode() 7713 req, err := http.NewRequest("POST", urls, body) 7714 if err != nil { 7715 return nil, err 7716 } 7717 req.Header = reqHeaders 7718 googleapi.Expand(req.URL, map[string]string{ 7719 "accountId": strconv.FormatInt(c.accountId, 10), 7720 }) 7721 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7722} 7723 7724// Do executes the "adexchangebuyer.pretargetingConfig.insert" call. 7725// Exactly one of *PretargetingConfig or error will be non-nil. Any 7726// non-2xx status code is an error. Response headers are in either 7727// *PretargetingConfig.ServerResponse.Header or (if a response was 7728// returned at all) in error.(*googleapi.Error).Header. Use 7729// googleapi.IsNotModified to check whether the returned error was 7730// because http.StatusNotModified was returned. 7731func (c *PretargetingConfigInsertCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) { 7732 gensupport.SetOptions(c.urlParams_, opts...) 7733 res, err := c.doRequest("json") 7734 if res != nil && res.StatusCode == http.StatusNotModified { 7735 if res.Body != nil { 7736 res.Body.Close() 7737 } 7738 return nil, &googleapi.Error{ 7739 Code: res.StatusCode, 7740 Header: res.Header, 7741 } 7742 } 7743 if err != nil { 7744 return nil, err 7745 } 7746 defer googleapi.CloseBody(res) 7747 if err := googleapi.CheckResponse(res); err != nil { 7748 return nil, err 7749 } 7750 ret := &PretargetingConfig{ 7751 ServerResponse: googleapi.ServerResponse{ 7752 Header: res.Header, 7753 HTTPStatusCode: res.StatusCode, 7754 }, 7755 } 7756 target := &ret 7757 if err := gensupport.DecodeResponse(target, res); err != nil { 7758 return nil, err 7759 } 7760 return ret, nil 7761 // { 7762 // "description": "Inserts a new pretargeting configuration.", 7763 // "httpMethod": "POST", 7764 // "id": "adexchangebuyer.pretargetingConfig.insert", 7765 // "parameterOrder": [ 7766 // "accountId" 7767 // ], 7768 // "parameters": { 7769 // "accountId": { 7770 // "description": "The account id to insert the pretargeting config for.", 7771 // "format": "int64", 7772 // "location": "path", 7773 // "required": true, 7774 // "type": "string" 7775 // } 7776 // }, 7777 // "path": "pretargetingconfigs/{accountId}", 7778 // "request": { 7779 // "$ref": "PretargetingConfig" 7780 // }, 7781 // "response": { 7782 // "$ref": "PretargetingConfig" 7783 // }, 7784 // "scopes": [ 7785 // "https://www.googleapis.com/auth/adexchange.buyer" 7786 // ] 7787 // } 7788 7789} 7790 7791// method id "adexchangebuyer.pretargetingConfig.list": 7792 7793type PretargetingConfigListCall struct { 7794 s *Service 7795 accountId int64 7796 urlParams_ gensupport.URLParams 7797 ifNoneMatch_ string 7798 ctx_ context.Context 7799 header_ http.Header 7800} 7801 7802// List: Retrieves a list of the authenticated user's pretargeting 7803// configurations. 7804func (r *PretargetingConfigService) List(accountId int64) *PretargetingConfigListCall { 7805 c := &PretargetingConfigListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7806 c.accountId = accountId 7807 return c 7808} 7809 7810// Fields allows partial responses to be retrieved. See 7811// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7812// for more information. 7813func (c *PretargetingConfigListCall) Fields(s ...googleapi.Field) *PretargetingConfigListCall { 7814 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7815 return c 7816} 7817 7818// IfNoneMatch sets the optional parameter which makes the operation 7819// fail if the object's ETag matches the given value. This is useful for 7820// getting updates only after the object has changed since the last 7821// request. Use googleapi.IsNotModified to check whether the response 7822// error from Do is the result of In-None-Match. 7823func (c *PretargetingConfigListCall) IfNoneMatch(entityTag string) *PretargetingConfigListCall { 7824 c.ifNoneMatch_ = entityTag 7825 return c 7826} 7827 7828// Context sets the context to be used in this call's Do method. Any 7829// pending HTTP request will be aborted if the provided context is 7830// canceled. 7831func (c *PretargetingConfigListCall) Context(ctx context.Context) *PretargetingConfigListCall { 7832 c.ctx_ = ctx 7833 return c 7834} 7835 7836// Header returns an http.Header that can be modified by the caller to 7837// add HTTP headers to the request. 7838func (c *PretargetingConfigListCall) Header() http.Header { 7839 if c.header_ == nil { 7840 c.header_ = make(http.Header) 7841 } 7842 return c.header_ 7843} 7844 7845func (c *PretargetingConfigListCall) doRequest(alt string) (*http.Response, error) { 7846 reqHeaders := make(http.Header) 7847 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7848 for k, v := range c.header_ { 7849 reqHeaders[k] = v 7850 } 7851 reqHeaders.Set("User-Agent", c.s.userAgent()) 7852 if c.ifNoneMatch_ != "" { 7853 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7854 } 7855 var body io.Reader = nil 7856 c.urlParams_.Set("alt", alt) 7857 c.urlParams_.Set("prettyPrint", "false") 7858 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}") 7859 urls += "?" + c.urlParams_.Encode() 7860 req, err := http.NewRequest("GET", urls, body) 7861 if err != nil { 7862 return nil, err 7863 } 7864 req.Header = reqHeaders 7865 googleapi.Expand(req.URL, map[string]string{ 7866 "accountId": strconv.FormatInt(c.accountId, 10), 7867 }) 7868 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7869} 7870 7871// Do executes the "adexchangebuyer.pretargetingConfig.list" call. 7872// Exactly one of *PretargetingConfigList or error will be non-nil. Any 7873// non-2xx status code is an error. Response headers are in either 7874// *PretargetingConfigList.ServerResponse.Header or (if a response was 7875// returned at all) in error.(*googleapi.Error).Header. Use 7876// googleapi.IsNotModified to check whether the returned error was 7877// because http.StatusNotModified was returned. 7878func (c *PretargetingConfigListCall) Do(opts ...googleapi.CallOption) (*PretargetingConfigList, error) { 7879 gensupport.SetOptions(c.urlParams_, opts...) 7880 res, err := c.doRequest("json") 7881 if res != nil && res.StatusCode == http.StatusNotModified { 7882 if res.Body != nil { 7883 res.Body.Close() 7884 } 7885 return nil, &googleapi.Error{ 7886 Code: res.StatusCode, 7887 Header: res.Header, 7888 } 7889 } 7890 if err != nil { 7891 return nil, err 7892 } 7893 defer googleapi.CloseBody(res) 7894 if err := googleapi.CheckResponse(res); err != nil { 7895 return nil, err 7896 } 7897 ret := &PretargetingConfigList{ 7898 ServerResponse: googleapi.ServerResponse{ 7899 Header: res.Header, 7900 HTTPStatusCode: res.StatusCode, 7901 }, 7902 } 7903 target := &ret 7904 if err := gensupport.DecodeResponse(target, res); err != nil { 7905 return nil, err 7906 } 7907 return ret, nil 7908 // { 7909 // "description": "Retrieves a list of the authenticated user's pretargeting configurations.", 7910 // "httpMethod": "GET", 7911 // "id": "adexchangebuyer.pretargetingConfig.list", 7912 // "parameterOrder": [ 7913 // "accountId" 7914 // ], 7915 // "parameters": { 7916 // "accountId": { 7917 // "description": "The account id to get the pretargeting configs for.", 7918 // "format": "int64", 7919 // "location": "path", 7920 // "required": true, 7921 // "type": "string" 7922 // } 7923 // }, 7924 // "path": "pretargetingconfigs/{accountId}", 7925 // "response": { 7926 // "$ref": "PretargetingConfigList" 7927 // }, 7928 // "scopes": [ 7929 // "https://www.googleapis.com/auth/adexchange.buyer" 7930 // ] 7931 // } 7932 7933} 7934 7935// method id "adexchangebuyer.pretargetingConfig.patch": 7936 7937type PretargetingConfigPatchCall struct { 7938 s *Service 7939 accountId int64 7940 configId int64 7941 pretargetingconfig *PretargetingConfig 7942 urlParams_ gensupport.URLParams 7943 ctx_ context.Context 7944 header_ http.Header 7945} 7946 7947// Patch: Updates an existing pretargeting config. This method supports 7948// patch semantics. 7949func (r *PretargetingConfigService) Patch(accountId int64, configId int64, pretargetingconfig *PretargetingConfig) *PretargetingConfigPatchCall { 7950 c := &PretargetingConfigPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7951 c.accountId = accountId 7952 c.configId = configId 7953 c.pretargetingconfig = pretargetingconfig 7954 return c 7955} 7956 7957// Fields allows partial responses to be retrieved. See 7958// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7959// for more information. 7960func (c *PretargetingConfigPatchCall) Fields(s ...googleapi.Field) *PretargetingConfigPatchCall { 7961 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7962 return c 7963} 7964 7965// Context sets the context to be used in this call's Do method. Any 7966// pending HTTP request will be aborted if the provided context is 7967// canceled. 7968func (c *PretargetingConfigPatchCall) Context(ctx context.Context) *PretargetingConfigPatchCall { 7969 c.ctx_ = ctx 7970 return c 7971} 7972 7973// Header returns an http.Header that can be modified by the caller to 7974// add HTTP headers to the request. 7975func (c *PretargetingConfigPatchCall) Header() http.Header { 7976 if c.header_ == nil { 7977 c.header_ = make(http.Header) 7978 } 7979 return c.header_ 7980} 7981 7982func (c *PretargetingConfigPatchCall) doRequest(alt string) (*http.Response, error) { 7983 reqHeaders := make(http.Header) 7984 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 7985 for k, v := range c.header_ { 7986 reqHeaders[k] = v 7987 } 7988 reqHeaders.Set("User-Agent", c.s.userAgent()) 7989 var body io.Reader = nil 7990 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig) 7991 if err != nil { 7992 return nil, err 7993 } 7994 reqHeaders.Set("Content-Type", "application/json") 7995 c.urlParams_.Set("alt", alt) 7996 c.urlParams_.Set("prettyPrint", "false") 7997 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}") 7998 urls += "?" + c.urlParams_.Encode() 7999 req, err := http.NewRequest("PATCH", urls, body) 8000 if err != nil { 8001 return nil, err 8002 } 8003 req.Header = reqHeaders 8004 googleapi.Expand(req.URL, map[string]string{ 8005 "accountId": strconv.FormatInt(c.accountId, 10), 8006 "configId": strconv.FormatInt(c.configId, 10), 8007 }) 8008 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8009} 8010 8011// Do executes the "adexchangebuyer.pretargetingConfig.patch" call. 8012// Exactly one of *PretargetingConfig or error will be non-nil. Any 8013// non-2xx status code is an error. Response headers are in either 8014// *PretargetingConfig.ServerResponse.Header or (if a response was 8015// returned at all) in error.(*googleapi.Error).Header. Use 8016// googleapi.IsNotModified to check whether the returned error was 8017// because http.StatusNotModified was returned. 8018func (c *PretargetingConfigPatchCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) { 8019 gensupport.SetOptions(c.urlParams_, opts...) 8020 res, err := c.doRequest("json") 8021 if res != nil && res.StatusCode == http.StatusNotModified { 8022 if res.Body != nil { 8023 res.Body.Close() 8024 } 8025 return nil, &googleapi.Error{ 8026 Code: res.StatusCode, 8027 Header: res.Header, 8028 } 8029 } 8030 if err != nil { 8031 return nil, err 8032 } 8033 defer googleapi.CloseBody(res) 8034 if err := googleapi.CheckResponse(res); err != nil { 8035 return nil, err 8036 } 8037 ret := &PretargetingConfig{ 8038 ServerResponse: googleapi.ServerResponse{ 8039 Header: res.Header, 8040 HTTPStatusCode: res.StatusCode, 8041 }, 8042 } 8043 target := &ret 8044 if err := gensupport.DecodeResponse(target, res); err != nil { 8045 return nil, err 8046 } 8047 return ret, nil 8048 // { 8049 // "description": "Updates an existing pretargeting config. This method supports patch semantics.", 8050 // "httpMethod": "PATCH", 8051 // "id": "adexchangebuyer.pretargetingConfig.patch", 8052 // "parameterOrder": [ 8053 // "accountId", 8054 // "configId" 8055 // ], 8056 // "parameters": { 8057 // "accountId": { 8058 // "description": "The account id to update the pretargeting config for.", 8059 // "format": "int64", 8060 // "location": "path", 8061 // "required": true, 8062 // "type": "string" 8063 // }, 8064 // "configId": { 8065 // "description": "The specific id of the configuration to update.", 8066 // "format": "int64", 8067 // "location": "path", 8068 // "required": true, 8069 // "type": "string" 8070 // } 8071 // }, 8072 // "path": "pretargetingconfigs/{accountId}/{configId}", 8073 // "request": { 8074 // "$ref": "PretargetingConfig" 8075 // }, 8076 // "response": { 8077 // "$ref": "PretargetingConfig" 8078 // }, 8079 // "scopes": [ 8080 // "https://www.googleapis.com/auth/adexchange.buyer" 8081 // ] 8082 // } 8083 8084} 8085 8086// method id "adexchangebuyer.pretargetingConfig.update": 8087 8088type PretargetingConfigUpdateCall struct { 8089 s *Service 8090 accountId int64 8091 configId int64 8092 pretargetingconfig *PretargetingConfig 8093 urlParams_ gensupport.URLParams 8094 ctx_ context.Context 8095 header_ http.Header 8096} 8097 8098// Update: Updates an existing pretargeting config. 8099func (r *PretargetingConfigService) Update(accountId int64, configId int64, pretargetingconfig *PretargetingConfig) *PretargetingConfigUpdateCall { 8100 c := &PretargetingConfigUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8101 c.accountId = accountId 8102 c.configId = configId 8103 c.pretargetingconfig = pretargetingconfig 8104 return c 8105} 8106 8107// Fields allows partial responses to be retrieved. See 8108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8109// for more information. 8110func (c *PretargetingConfigUpdateCall) Fields(s ...googleapi.Field) *PretargetingConfigUpdateCall { 8111 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8112 return c 8113} 8114 8115// Context sets the context to be used in this call's Do method. Any 8116// pending HTTP request will be aborted if the provided context is 8117// canceled. 8118func (c *PretargetingConfigUpdateCall) Context(ctx context.Context) *PretargetingConfigUpdateCall { 8119 c.ctx_ = ctx 8120 return c 8121} 8122 8123// Header returns an http.Header that can be modified by the caller to 8124// add HTTP headers to the request. 8125func (c *PretargetingConfigUpdateCall) Header() http.Header { 8126 if c.header_ == nil { 8127 c.header_ = make(http.Header) 8128 } 8129 return c.header_ 8130} 8131 8132func (c *PretargetingConfigUpdateCall) doRequest(alt string) (*http.Response, error) { 8133 reqHeaders := make(http.Header) 8134 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8135 for k, v := range c.header_ { 8136 reqHeaders[k] = v 8137 } 8138 reqHeaders.Set("User-Agent", c.s.userAgent()) 8139 var body io.Reader = nil 8140 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig) 8141 if err != nil { 8142 return nil, err 8143 } 8144 reqHeaders.Set("Content-Type", "application/json") 8145 c.urlParams_.Set("alt", alt) 8146 c.urlParams_.Set("prettyPrint", "false") 8147 urls := googleapi.ResolveRelative(c.s.BasePath, "pretargetingconfigs/{accountId}/{configId}") 8148 urls += "?" + c.urlParams_.Encode() 8149 req, err := http.NewRequest("PUT", urls, body) 8150 if err != nil { 8151 return nil, err 8152 } 8153 req.Header = reqHeaders 8154 googleapi.Expand(req.URL, map[string]string{ 8155 "accountId": strconv.FormatInt(c.accountId, 10), 8156 "configId": strconv.FormatInt(c.configId, 10), 8157 }) 8158 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8159} 8160 8161// Do executes the "adexchangebuyer.pretargetingConfig.update" call. 8162// Exactly one of *PretargetingConfig or error will be non-nil. Any 8163// non-2xx status code is an error. Response headers are in either 8164// *PretargetingConfig.ServerResponse.Header or (if a response was 8165// returned at all) in error.(*googleapi.Error).Header. Use 8166// googleapi.IsNotModified to check whether the returned error was 8167// because http.StatusNotModified was returned. 8168func (c *PretargetingConfigUpdateCall) Do(opts ...googleapi.CallOption) (*PretargetingConfig, error) { 8169 gensupport.SetOptions(c.urlParams_, opts...) 8170 res, err := c.doRequest("json") 8171 if res != nil && res.StatusCode == http.StatusNotModified { 8172 if res.Body != nil { 8173 res.Body.Close() 8174 } 8175 return nil, &googleapi.Error{ 8176 Code: res.StatusCode, 8177 Header: res.Header, 8178 } 8179 } 8180 if err != nil { 8181 return nil, err 8182 } 8183 defer googleapi.CloseBody(res) 8184 if err := googleapi.CheckResponse(res); err != nil { 8185 return nil, err 8186 } 8187 ret := &PretargetingConfig{ 8188 ServerResponse: googleapi.ServerResponse{ 8189 Header: res.Header, 8190 HTTPStatusCode: res.StatusCode, 8191 }, 8192 } 8193 target := &ret 8194 if err := gensupport.DecodeResponse(target, res); err != nil { 8195 return nil, err 8196 } 8197 return ret, nil 8198 // { 8199 // "description": "Updates an existing pretargeting config.", 8200 // "httpMethod": "PUT", 8201 // "id": "adexchangebuyer.pretargetingConfig.update", 8202 // "parameterOrder": [ 8203 // "accountId", 8204 // "configId" 8205 // ], 8206 // "parameters": { 8207 // "accountId": { 8208 // "description": "The account id to update the pretargeting config for.", 8209 // "format": "int64", 8210 // "location": "path", 8211 // "required": true, 8212 // "type": "string" 8213 // }, 8214 // "configId": { 8215 // "description": "The specific id of the configuration to update.", 8216 // "format": "int64", 8217 // "location": "path", 8218 // "required": true, 8219 // "type": "string" 8220 // } 8221 // }, 8222 // "path": "pretargetingconfigs/{accountId}/{configId}", 8223 // "request": { 8224 // "$ref": "PretargetingConfig" 8225 // }, 8226 // "response": { 8227 // "$ref": "PretargetingConfig" 8228 // }, 8229 // "scopes": [ 8230 // "https://www.googleapis.com/auth/adexchange.buyer" 8231 // ] 8232 // } 8233 8234} 8235 8236// method id "adexchangebuyer.products.get": 8237 8238type ProductsGetCall struct { 8239 s *Service 8240 productId string 8241 urlParams_ gensupport.URLParams 8242 ifNoneMatch_ string 8243 ctx_ context.Context 8244 header_ http.Header 8245} 8246 8247// Get: Gets the requested product by id. 8248func (r *ProductsService) Get(productId string) *ProductsGetCall { 8249 c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8250 c.productId = productId 8251 return c 8252} 8253 8254// Fields allows partial responses to be retrieved. See 8255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8256// for more information. 8257func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall { 8258 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8259 return c 8260} 8261 8262// IfNoneMatch sets the optional parameter which makes the operation 8263// fail if the object's ETag matches the given value. This is useful for 8264// getting updates only after the object has changed since the last 8265// request. Use googleapi.IsNotModified to check whether the response 8266// error from Do is the result of In-None-Match. 8267func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall { 8268 c.ifNoneMatch_ = entityTag 8269 return c 8270} 8271 8272// Context sets the context to be used in this call's Do method. Any 8273// pending HTTP request will be aborted if the provided context is 8274// canceled. 8275func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall { 8276 c.ctx_ = ctx 8277 return c 8278} 8279 8280// Header returns an http.Header that can be modified by the caller to 8281// add HTTP headers to the request. 8282func (c *ProductsGetCall) Header() http.Header { 8283 if c.header_ == nil { 8284 c.header_ = make(http.Header) 8285 } 8286 return c.header_ 8287} 8288 8289func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) { 8290 reqHeaders := make(http.Header) 8291 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8292 for k, v := range c.header_ { 8293 reqHeaders[k] = v 8294 } 8295 reqHeaders.Set("User-Agent", c.s.userAgent()) 8296 if c.ifNoneMatch_ != "" { 8297 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8298 } 8299 var body io.Reader = nil 8300 c.urlParams_.Set("alt", alt) 8301 c.urlParams_.Set("prettyPrint", "false") 8302 urls := googleapi.ResolveRelative(c.s.BasePath, "products/{productId}") 8303 urls += "?" + c.urlParams_.Encode() 8304 req, err := http.NewRequest("GET", urls, body) 8305 if err != nil { 8306 return nil, err 8307 } 8308 req.Header = reqHeaders 8309 googleapi.Expand(req.URL, map[string]string{ 8310 "productId": c.productId, 8311 }) 8312 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8313} 8314 8315// Do executes the "adexchangebuyer.products.get" call. 8316// Exactly one of *Product or error will be non-nil. Any non-2xx status 8317// code is an error. Response headers are in either 8318// *Product.ServerResponse.Header or (if a response was returned at all) 8319// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8320// check whether the returned error was because http.StatusNotModified 8321// was returned. 8322func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { 8323 gensupport.SetOptions(c.urlParams_, opts...) 8324 res, err := c.doRequest("json") 8325 if res != nil && res.StatusCode == http.StatusNotModified { 8326 if res.Body != nil { 8327 res.Body.Close() 8328 } 8329 return nil, &googleapi.Error{ 8330 Code: res.StatusCode, 8331 Header: res.Header, 8332 } 8333 } 8334 if err != nil { 8335 return nil, err 8336 } 8337 defer googleapi.CloseBody(res) 8338 if err := googleapi.CheckResponse(res); err != nil { 8339 return nil, err 8340 } 8341 ret := &Product{ 8342 ServerResponse: googleapi.ServerResponse{ 8343 Header: res.Header, 8344 HTTPStatusCode: res.StatusCode, 8345 }, 8346 } 8347 target := &ret 8348 if err := gensupport.DecodeResponse(target, res); err != nil { 8349 return nil, err 8350 } 8351 return ret, nil 8352 // { 8353 // "description": "Gets the requested product by id.", 8354 // "httpMethod": "GET", 8355 // "id": "adexchangebuyer.products.get", 8356 // "parameterOrder": [ 8357 // "productId" 8358 // ], 8359 // "parameters": { 8360 // "productId": { 8361 // "description": "The id for the product to get the head revision for.", 8362 // "location": "path", 8363 // "required": true, 8364 // "type": "string" 8365 // } 8366 // }, 8367 // "path": "products/{productId}", 8368 // "response": { 8369 // "$ref": "Product" 8370 // }, 8371 // "scopes": [ 8372 // "https://www.googleapis.com/auth/adexchange.buyer" 8373 // ] 8374 // } 8375 8376} 8377 8378// method id "adexchangebuyer.products.search": 8379 8380type ProductsSearchCall struct { 8381 s *Service 8382 urlParams_ gensupport.URLParams 8383 ifNoneMatch_ string 8384 ctx_ context.Context 8385 header_ http.Header 8386} 8387 8388// Search: Gets the requested product. 8389func (r *ProductsService) Search() *ProductsSearchCall { 8390 c := &ProductsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8391 return c 8392} 8393 8394// PqlQuery sets the optional parameter "pqlQuery": The pql query used 8395// to query for products. 8396func (c *ProductsSearchCall) PqlQuery(pqlQuery string) *ProductsSearchCall { 8397 c.urlParams_.Set("pqlQuery", pqlQuery) 8398 return c 8399} 8400 8401// Fields allows partial responses to be retrieved. See 8402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8403// for more information. 8404func (c *ProductsSearchCall) Fields(s ...googleapi.Field) *ProductsSearchCall { 8405 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8406 return c 8407} 8408 8409// IfNoneMatch sets the optional parameter which makes the operation 8410// fail if the object's ETag matches the given value. This is useful for 8411// getting updates only after the object has changed since the last 8412// request. Use googleapi.IsNotModified to check whether the response 8413// error from Do is the result of In-None-Match. 8414func (c *ProductsSearchCall) IfNoneMatch(entityTag string) *ProductsSearchCall { 8415 c.ifNoneMatch_ = entityTag 8416 return c 8417} 8418 8419// Context sets the context to be used in this call's Do method. Any 8420// pending HTTP request will be aborted if the provided context is 8421// canceled. 8422func (c *ProductsSearchCall) Context(ctx context.Context) *ProductsSearchCall { 8423 c.ctx_ = ctx 8424 return c 8425} 8426 8427// Header returns an http.Header that can be modified by the caller to 8428// add HTTP headers to the request. 8429func (c *ProductsSearchCall) Header() http.Header { 8430 if c.header_ == nil { 8431 c.header_ = make(http.Header) 8432 } 8433 return c.header_ 8434} 8435 8436func (c *ProductsSearchCall) doRequest(alt string) (*http.Response, error) { 8437 reqHeaders := make(http.Header) 8438 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8439 for k, v := range c.header_ { 8440 reqHeaders[k] = v 8441 } 8442 reqHeaders.Set("User-Agent", c.s.userAgent()) 8443 if c.ifNoneMatch_ != "" { 8444 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8445 } 8446 var body io.Reader = nil 8447 c.urlParams_.Set("alt", alt) 8448 c.urlParams_.Set("prettyPrint", "false") 8449 urls := googleapi.ResolveRelative(c.s.BasePath, "products/search") 8450 urls += "?" + c.urlParams_.Encode() 8451 req, err := http.NewRequest("GET", urls, body) 8452 if err != nil { 8453 return nil, err 8454 } 8455 req.Header = reqHeaders 8456 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8457} 8458 8459// Do executes the "adexchangebuyer.products.search" call. 8460// Exactly one of *GetOffersResponse or error will be non-nil. Any 8461// non-2xx status code is an error. Response headers are in either 8462// *GetOffersResponse.ServerResponse.Header or (if a response was 8463// returned at all) in error.(*googleapi.Error).Header. Use 8464// googleapi.IsNotModified to check whether the returned error was 8465// because http.StatusNotModified was returned. 8466func (c *ProductsSearchCall) Do(opts ...googleapi.CallOption) (*GetOffersResponse, error) { 8467 gensupport.SetOptions(c.urlParams_, opts...) 8468 res, err := c.doRequest("json") 8469 if res != nil && res.StatusCode == http.StatusNotModified { 8470 if res.Body != nil { 8471 res.Body.Close() 8472 } 8473 return nil, &googleapi.Error{ 8474 Code: res.StatusCode, 8475 Header: res.Header, 8476 } 8477 } 8478 if err != nil { 8479 return nil, err 8480 } 8481 defer googleapi.CloseBody(res) 8482 if err := googleapi.CheckResponse(res); err != nil { 8483 return nil, err 8484 } 8485 ret := &GetOffersResponse{ 8486 ServerResponse: googleapi.ServerResponse{ 8487 Header: res.Header, 8488 HTTPStatusCode: res.StatusCode, 8489 }, 8490 } 8491 target := &ret 8492 if err := gensupport.DecodeResponse(target, res); err != nil { 8493 return nil, err 8494 } 8495 return ret, nil 8496 // { 8497 // "description": "Gets the requested product.", 8498 // "httpMethod": "GET", 8499 // "id": "adexchangebuyer.products.search", 8500 // "parameters": { 8501 // "pqlQuery": { 8502 // "description": "The pql query used to query for products.", 8503 // "location": "query", 8504 // "type": "string" 8505 // } 8506 // }, 8507 // "path": "products/search", 8508 // "response": { 8509 // "$ref": "GetOffersResponse" 8510 // }, 8511 // "scopes": [ 8512 // "https://www.googleapis.com/auth/adexchange.buyer" 8513 // ] 8514 // } 8515 8516} 8517 8518// method id "adexchangebuyer.proposals.get": 8519 8520type ProposalsGetCall struct { 8521 s *Service 8522 proposalId string 8523 urlParams_ gensupport.URLParams 8524 ifNoneMatch_ string 8525 ctx_ context.Context 8526 header_ http.Header 8527} 8528 8529// Get: Get a proposal given its id 8530func (r *ProposalsService) Get(proposalId string) *ProposalsGetCall { 8531 c := &ProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8532 c.proposalId = proposalId 8533 return c 8534} 8535 8536// Fields allows partial responses to be retrieved. See 8537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8538// for more information. 8539func (c *ProposalsGetCall) Fields(s ...googleapi.Field) *ProposalsGetCall { 8540 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8541 return c 8542} 8543 8544// IfNoneMatch sets the optional parameter which makes the operation 8545// fail if the object's ETag matches the given value. This is useful for 8546// getting updates only after the object has changed since the last 8547// request. Use googleapi.IsNotModified to check whether the response 8548// error from Do is the result of In-None-Match. 8549func (c *ProposalsGetCall) IfNoneMatch(entityTag string) *ProposalsGetCall { 8550 c.ifNoneMatch_ = entityTag 8551 return c 8552} 8553 8554// Context sets the context to be used in this call's Do method. Any 8555// pending HTTP request will be aborted if the provided context is 8556// canceled. 8557func (c *ProposalsGetCall) Context(ctx context.Context) *ProposalsGetCall { 8558 c.ctx_ = ctx 8559 return c 8560} 8561 8562// Header returns an http.Header that can be modified by the caller to 8563// add HTTP headers to the request. 8564func (c *ProposalsGetCall) Header() http.Header { 8565 if c.header_ == nil { 8566 c.header_ = make(http.Header) 8567 } 8568 return c.header_ 8569} 8570 8571func (c *ProposalsGetCall) doRequest(alt string) (*http.Response, error) { 8572 reqHeaders := make(http.Header) 8573 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8574 for k, v := range c.header_ { 8575 reqHeaders[k] = v 8576 } 8577 reqHeaders.Set("User-Agent", c.s.userAgent()) 8578 if c.ifNoneMatch_ != "" { 8579 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 8580 } 8581 var body io.Reader = nil 8582 c.urlParams_.Set("alt", alt) 8583 c.urlParams_.Set("prettyPrint", "false") 8584 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}") 8585 urls += "?" + c.urlParams_.Encode() 8586 req, err := http.NewRequest("GET", urls, body) 8587 if err != nil { 8588 return nil, err 8589 } 8590 req.Header = reqHeaders 8591 googleapi.Expand(req.URL, map[string]string{ 8592 "proposalId": c.proposalId, 8593 }) 8594 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8595} 8596 8597// Do executes the "adexchangebuyer.proposals.get" call. 8598// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 8599// code is an error. Response headers are in either 8600// *Proposal.ServerResponse.Header or (if a response was returned at 8601// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8602// to check whether the returned error was because 8603// http.StatusNotModified was returned. 8604func (c *ProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 8605 gensupport.SetOptions(c.urlParams_, opts...) 8606 res, err := c.doRequest("json") 8607 if res != nil && res.StatusCode == http.StatusNotModified { 8608 if res.Body != nil { 8609 res.Body.Close() 8610 } 8611 return nil, &googleapi.Error{ 8612 Code: res.StatusCode, 8613 Header: res.Header, 8614 } 8615 } 8616 if err != nil { 8617 return nil, err 8618 } 8619 defer googleapi.CloseBody(res) 8620 if err := googleapi.CheckResponse(res); err != nil { 8621 return nil, err 8622 } 8623 ret := &Proposal{ 8624 ServerResponse: googleapi.ServerResponse{ 8625 Header: res.Header, 8626 HTTPStatusCode: res.StatusCode, 8627 }, 8628 } 8629 target := &ret 8630 if err := gensupport.DecodeResponse(target, res); err != nil { 8631 return nil, err 8632 } 8633 return ret, nil 8634 // { 8635 // "description": "Get a proposal given its id", 8636 // "httpMethod": "GET", 8637 // "id": "adexchangebuyer.proposals.get", 8638 // "parameterOrder": [ 8639 // "proposalId" 8640 // ], 8641 // "parameters": { 8642 // "proposalId": { 8643 // "description": "Id of the proposal to retrieve.", 8644 // "location": "path", 8645 // "required": true, 8646 // "type": "string" 8647 // } 8648 // }, 8649 // "path": "proposals/{proposalId}", 8650 // "response": { 8651 // "$ref": "Proposal" 8652 // }, 8653 // "scopes": [ 8654 // "https://www.googleapis.com/auth/adexchange.buyer" 8655 // ] 8656 // } 8657 8658} 8659 8660// method id "adexchangebuyer.proposals.insert": 8661 8662type ProposalsInsertCall struct { 8663 s *Service 8664 createordersrequest *CreateOrdersRequest 8665 urlParams_ gensupport.URLParams 8666 ctx_ context.Context 8667 header_ http.Header 8668} 8669 8670// Insert: Create the given list of proposals 8671func (r *ProposalsService) Insert(createordersrequest *CreateOrdersRequest) *ProposalsInsertCall { 8672 c := &ProposalsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8673 c.createordersrequest = createordersrequest 8674 return c 8675} 8676 8677// Fields allows partial responses to be retrieved. See 8678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8679// for more information. 8680func (c *ProposalsInsertCall) Fields(s ...googleapi.Field) *ProposalsInsertCall { 8681 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8682 return c 8683} 8684 8685// Context sets the context to be used in this call's Do method. Any 8686// pending HTTP request will be aborted if the provided context is 8687// canceled. 8688func (c *ProposalsInsertCall) Context(ctx context.Context) *ProposalsInsertCall { 8689 c.ctx_ = ctx 8690 return c 8691} 8692 8693// Header returns an http.Header that can be modified by the caller to 8694// add HTTP headers to the request. 8695func (c *ProposalsInsertCall) Header() http.Header { 8696 if c.header_ == nil { 8697 c.header_ = make(http.Header) 8698 } 8699 return c.header_ 8700} 8701 8702func (c *ProposalsInsertCall) doRequest(alt string) (*http.Response, error) { 8703 reqHeaders := make(http.Header) 8704 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8705 for k, v := range c.header_ { 8706 reqHeaders[k] = v 8707 } 8708 reqHeaders.Set("User-Agent", c.s.userAgent()) 8709 var body io.Reader = nil 8710 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createordersrequest) 8711 if err != nil { 8712 return nil, err 8713 } 8714 reqHeaders.Set("Content-Type", "application/json") 8715 c.urlParams_.Set("alt", alt) 8716 c.urlParams_.Set("prettyPrint", "false") 8717 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/insert") 8718 urls += "?" + c.urlParams_.Encode() 8719 req, err := http.NewRequest("POST", urls, body) 8720 if err != nil { 8721 return nil, err 8722 } 8723 req.Header = reqHeaders 8724 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8725} 8726 8727// Do executes the "adexchangebuyer.proposals.insert" call. 8728// Exactly one of *CreateOrdersResponse or error will be non-nil. Any 8729// non-2xx status code is an error. Response headers are in either 8730// *CreateOrdersResponse.ServerResponse.Header or (if a response was 8731// returned at all) in error.(*googleapi.Error).Header. Use 8732// googleapi.IsNotModified to check whether the returned error was 8733// because http.StatusNotModified was returned. 8734func (c *ProposalsInsertCall) Do(opts ...googleapi.CallOption) (*CreateOrdersResponse, error) { 8735 gensupport.SetOptions(c.urlParams_, opts...) 8736 res, err := c.doRequest("json") 8737 if res != nil && res.StatusCode == http.StatusNotModified { 8738 if res.Body != nil { 8739 res.Body.Close() 8740 } 8741 return nil, &googleapi.Error{ 8742 Code: res.StatusCode, 8743 Header: res.Header, 8744 } 8745 } 8746 if err != nil { 8747 return nil, err 8748 } 8749 defer googleapi.CloseBody(res) 8750 if err := googleapi.CheckResponse(res); err != nil { 8751 return nil, err 8752 } 8753 ret := &CreateOrdersResponse{ 8754 ServerResponse: googleapi.ServerResponse{ 8755 Header: res.Header, 8756 HTTPStatusCode: res.StatusCode, 8757 }, 8758 } 8759 target := &ret 8760 if err := gensupport.DecodeResponse(target, res); err != nil { 8761 return nil, err 8762 } 8763 return ret, nil 8764 // { 8765 // "description": "Create the given list of proposals", 8766 // "httpMethod": "POST", 8767 // "id": "adexchangebuyer.proposals.insert", 8768 // "path": "proposals/insert", 8769 // "request": { 8770 // "$ref": "CreateOrdersRequest" 8771 // }, 8772 // "response": { 8773 // "$ref": "CreateOrdersResponse" 8774 // }, 8775 // "scopes": [ 8776 // "https://www.googleapis.com/auth/adexchange.buyer" 8777 // ] 8778 // } 8779 8780} 8781 8782// method id "adexchangebuyer.proposals.patch": 8783 8784type ProposalsPatchCall struct { 8785 s *Service 8786 proposalId string 8787 revisionNumber int64 8788 updateAction string 8789 proposal *Proposal 8790 urlParams_ gensupport.URLParams 8791 ctx_ context.Context 8792 header_ http.Header 8793} 8794 8795// Patch: Update the given proposal. This method supports patch 8796// semantics. 8797func (r *ProposalsService) Patch(proposalId string, revisionNumber int64, updateAction string, proposal *Proposal) *ProposalsPatchCall { 8798 c := &ProposalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8799 c.proposalId = proposalId 8800 c.revisionNumber = revisionNumber 8801 c.updateAction = updateAction 8802 c.proposal = proposal 8803 return c 8804} 8805 8806// Fields allows partial responses to be retrieved. See 8807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8808// for more information. 8809func (c *ProposalsPatchCall) Fields(s ...googleapi.Field) *ProposalsPatchCall { 8810 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8811 return c 8812} 8813 8814// Context sets the context to be used in this call's Do method. Any 8815// pending HTTP request will be aborted if the provided context is 8816// canceled. 8817func (c *ProposalsPatchCall) Context(ctx context.Context) *ProposalsPatchCall { 8818 c.ctx_ = ctx 8819 return c 8820} 8821 8822// Header returns an http.Header that can be modified by the caller to 8823// add HTTP headers to the request. 8824func (c *ProposalsPatchCall) Header() http.Header { 8825 if c.header_ == nil { 8826 c.header_ = make(http.Header) 8827 } 8828 return c.header_ 8829} 8830 8831func (c *ProposalsPatchCall) doRequest(alt string) (*http.Response, error) { 8832 reqHeaders := make(http.Header) 8833 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 8834 for k, v := range c.header_ { 8835 reqHeaders[k] = v 8836 } 8837 reqHeaders.Set("User-Agent", c.s.userAgent()) 8838 var body io.Reader = nil 8839 body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal) 8840 if err != nil { 8841 return nil, err 8842 } 8843 reqHeaders.Set("Content-Type", "application/json") 8844 c.urlParams_.Set("alt", alt) 8845 c.urlParams_.Set("prettyPrint", "false") 8846 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/{revisionNumber}/{updateAction}") 8847 urls += "?" + c.urlParams_.Encode() 8848 req, err := http.NewRequest("PATCH", urls, body) 8849 if err != nil { 8850 return nil, err 8851 } 8852 req.Header = reqHeaders 8853 googleapi.Expand(req.URL, map[string]string{ 8854 "proposalId": c.proposalId, 8855 "revisionNumber": strconv.FormatInt(c.revisionNumber, 10), 8856 "updateAction": c.updateAction, 8857 }) 8858 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8859} 8860 8861// Do executes the "adexchangebuyer.proposals.patch" call. 8862// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 8863// code is an error. Response headers are in either 8864// *Proposal.ServerResponse.Header or (if a response was returned at 8865// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 8866// to check whether the returned error was because 8867// http.StatusNotModified was returned. 8868func (c *ProposalsPatchCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 8869 gensupport.SetOptions(c.urlParams_, opts...) 8870 res, err := c.doRequest("json") 8871 if res != nil && res.StatusCode == http.StatusNotModified { 8872 if res.Body != nil { 8873 res.Body.Close() 8874 } 8875 return nil, &googleapi.Error{ 8876 Code: res.StatusCode, 8877 Header: res.Header, 8878 } 8879 } 8880 if err != nil { 8881 return nil, err 8882 } 8883 defer googleapi.CloseBody(res) 8884 if err := googleapi.CheckResponse(res); err != nil { 8885 return nil, err 8886 } 8887 ret := &Proposal{ 8888 ServerResponse: googleapi.ServerResponse{ 8889 Header: res.Header, 8890 HTTPStatusCode: res.StatusCode, 8891 }, 8892 } 8893 target := &ret 8894 if err := gensupport.DecodeResponse(target, res); err != nil { 8895 return nil, err 8896 } 8897 return ret, nil 8898 // { 8899 // "description": "Update the given proposal. This method supports patch semantics.", 8900 // "httpMethod": "PATCH", 8901 // "id": "adexchangebuyer.proposals.patch", 8902 // "parameterOrder": [ 8903 // "proposalId", 8904 // "revisionNumber", 8905 // "updateAction" 8906 // ], 8907 // "parameters": { 8908 // "proposalId": { 8909 // "description": "The proposal id to update.", 8910 // "location": "path", 8911 // "required": true, 8912 // "type": "string" 8913 // }, 8914 // "revisionNumber": { 8915 // "description": "The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision.", 8916 // "format": "int64", 8917 // "location": "path", 8918 // "required": true, 8919 // "type": "string" 8920 // }, 8921 // "updateAction": { 8922 // "description": "The proposed action to take on the proposal. This field is required and it must be set when updating a proposal.", 8923 // "enum": [ 8924 // "accept", 8925 // "cancel", 8926 // "propose", 8927 // "proposeAndAccept", 8928 // "unknownAction", 8929 // "updateNonTerms" 8930 // ], 8931 // "enumDescriptions": [ 8932 // "", 8933 // "", 8934 // "", 8935 // "", 8936 // "", 8937 // "" 8938 // ], 8939 // "location": "path", 8940 // "required": true, 8941 // "type": "string" 8942 // } 8943 // }, 8944 // "path": "proposals/{proposalId}/{revisionNumber}/{updateAction}", 8945 // "request": { 8946 // "$ref": "Proposal" 8947 // }, 8948 // "response": { 8949 // "$ref": "Proposal" 8950 // }, 8951 // "scopes": [ 8952 // "https://www.googleapis.com/auth/adexchange.buyer" 8953 // ] 8954 // } 8955 8956} 8957 8958// method id "adexchangebuyer.proposals.search": 8959 8960type ProposalsSearchCall struct { 8961 s *Service 8962 urlParams_ gensupport.URLParams 8963 ifNoneMatch_ string 8964 ctx_ context.Context 8965 header_ http.Header 8966} 8967 8968// Search: Search for proposals using pql query 8969func (r *ProposalsService) Search() *ProposalsSearchCall { 8970 c := &ProposalsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8971 return c 8972} 8973 8974// PqlQuery sets the optional parameter "pqlQuery": Query string to 8975// retrieve specific proposals. 8976func (c *ProposalsSearchCall) PqlQuery(pqlQuery string) *ProposalsSearchCall { 8977 c.urlParams_.Set("pqlQuery", pqlQuery) 8978 return c 8979} 8980 8981// Fields allows partial responses to be retrieved. See 8982// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 8983// for more information. 8984func (c *ProposalsSearchCall) Fields(s ...googleapi.Field) *ProposalsSearchCall { 8985 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8986 return c 8987} 8988 8989// IfNoneMatch sets the optional parameter which makes the operation 8990// fail if the object's ETag matches the given value. This is useful for 8991// getting updates only after the object has changed since the last 8992// request. Use googleapi.IsNotModified to check whether the response 8993// error from Do is the result of In-None-Match. 8994func (c *ProposalsSearchCall) IfNoneMatch(entityTag string) *ProposalsSearchCall { 8995 c.ifNoneMatch_ = entityTag 8996 return c 8997} 8998 8999// Context sets the context to be used in this call's Do method. Any 9000// pending HTTP request will be aborted if the provided context is 9001// canceled. 9002func (c *ProposalsSearchCall) Context(ctx context.Context) *ProposalsSearchCall { 9003 c.ctx_ = ctx 9004 return c 9005} 9006 9007// Header returns an http.Header that can be modified by the caller to 9008// add HTTP headers to the request. 9009func (c *ProposalsSearchCall) Header() http.Header { 9010 if c.header_ == nil { 9011 c.header_ = make(http.Header) 9012 } 9013 return c.header_ 9014} 9015 9016func (c *ProposalsSearchCall) doRequest(alt string) (*http.Response, error) { 9017 reqHeaders := make(http.Header) 9018 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9019 for k, v := range c.header_ { 9020 reqHeaders[k] = v 9021 } 9022 reqHeaders.Set("User-Agent", c.s.userAgent()) 9023 if c.ifNoneMatch_ != "" { 9024 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9025 } 9026 var body io.Reader = nil 9027 c.urlParams_.Set("alt", alt) 9028 c.urlParams_.Set("prettyPrint", "false") 9029 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/search") 9030 urls += "?" + c.urlParams_.Encode() 9031 req, err := http.NewRequest("GET", urls, body) 9032 if err != nil { 9033 return nil, err 9034 } 9035 req.Header = reqHeaders 9036 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9037} 9038 9039// Do executes the "adexchangebuyer.proposals.search" call. 9040// Exactly one of *GetOrdersResponse or error will be non-nil. Any 9041// non-2xx status code is an error. Response headers are in either 9042// *GetOrdersResponse.ServerResponse.Header or (if a response was 9043// returned at all) in error.(*googleapi.Error).Header. Use 9044// googleapi.IsNotModified to check whether the returned error was 9045// because http.StatusNotModified was returned. 9046func (c *ProposalsSearchCall) Do(opts ...googleapi.CallOption) (*GetOrdersResponse, error) { 9047 gensupport.SetOptions(c.urlParams_, opts...) 9048 res, err := c.doRequest("json") 9049 if res != nil && res.StatusCode == http.StatusNotModified { 9050 if res.Body != nil { 9051 res.Body.Close() 9052 } 9053 return nil, &googleapi.Error{ 9054 Code: res.StatusCode, 9055 Header: res.Header, 9056 } 9057 } 9058 if err != nil { 9059 return nil, err 9060 } 9061 defer googleapi.CloseBody(res) 9062 if err := googleapi.CheckResponse(res); err != nil { 9063 return nil, err 9064 } 9065 ret := &GetOrdersResponse{ 9066 ServerResponse: googleapi.ServerResponse{ 9067 Header: res.Header, 9068 HTTPStatusCode: res.StatusCode, 9069 }, 9070 } 9071 target := &ret 9072 if err := gensupport.DecodeResponse(target, res); err != nil { 9073 return nil, err 9074 } 9075 return ret, nil 9076 // { 9077 // "description": "Search for proposals using pql query", 9078 // "httpMethod": "GET", 9079 // "id": "adexchangebuyer.proposals.search", 9080 // "parameters": { 9081 // "pqlQuery": { 9082 // "description": "Query string to retrieve specific proposals.", 9083 // "location": "query", 9084 // "type": "string" 9085 // } 9086 // }, 9087 // "path": "proposals/search", 9088 // "response": { 9089 // "$ref": "GetOrdersResponse" 9090 // }, 9091 // "scopes": [ 9092 // "https://www.googleapis.com/auth/adexchange.buyer" 9093 // ] 9094 // } 9095 9096} 9097 9098// method id "adexchangebuyer.proposals.setupcomplete": 9099 9100type ProposalsSetupcompleteCall struct { 9101 s *Service 9102 proposalId string 9103 urlParams_ gensupport.URLParams 9104 ctx_ context.Context 9105 header_ http.Header 9106} 9107 9108// Setupcomplete: Update the given proposal to indicate that setup has 9109// been completed. 9110func (r *ProposalsService) Setupcomplete(proposalId string) *ProposalsSetupcompleteCall { 9111 c := &ProposalsSetupcompleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9112 c.proposalId = proposalId 9113 return c 9114} 9115 9116// Fields allows partial responses to be retrieved. See 9117// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9118// for more information. 9119func (c *ProposalsSetupcompleteCall) Fields(s ...googleapi.Field) *ProposalsSetupcompleteCall { 9120 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9121 return c 9122} 9123 9124// Context sets the context to be used in this call's Do method. Any 9125// pending HTTP request will be aborted if the provided context is 9126// canceled. 9127func (c *ProposalsSetupcompleteCall) Context(ctx context.Context) *ProposalsSetupcompleteCall { 9128 c.ctx_ = ctx 9129 return c 9130} 9131 9132// Header returns an http.Header that can be modified by the caller to 9133// add HTTP headers to the request. 9134func (c *ProposalsSetupcompleteCall) Header() http.Header { 9135 if c.header_ == nil { 9136 c.header_ = make(http.Header) 9137 } 9138 return c.header_ 9139} 9140 9141func (c *ProposalsSetupcompleteCall) doRequest(alt string) (*http.Response, error) { 9142 reqHeaders := make(http.Header) 9143 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9144 for k, v := range c.header_ { 9145 reqHeaders[k] = v 9146 } 9147 reqHeaders.Set("User-Agent", c.s.userAgent()) 9148 var body io.Reader = nil 9149 c.urlParams_.Set("alt", alt) 9150 c.urlParams_.Set("prettyPrint", "false") 9151 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/setupcomplete") 9152 urls += "?" + c.urlParams_.Encode() 9153 req, err := http.NewRequest("POST", urls, body) 9154 if err != nil { 9155 return nil, err 9156 } 9157 req.Header = reqHeaders 9158 googleapi.Expand(req.URL, map[string]string{ 9159 "proposalId": c.proposalId, 9160 }) 9161 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9162} 9163 9164// Do executes the "adexchangebuyer.proposals.setupcomplete" call. 9165func (c *ProposalsSetupcompleteCall) Do(opts ...googleapi.CallOption) error { 9166 gensupport.SetOptions(c.urlParams_, opts...) 9167 res, err := c.doRequest("json") 9168 if err != nil { 9169 return err 9170 } 9171 defer googleapi.CloseBody(res) 9172 if err := googleapi.CheckResponse(res); err != nil { 9173 return err 9174 } 9175 return nil 9176 // { 9177 // "description": "Update the given proposal to indicate that setup has been completed.", 9178 // "httpMethod": "POST", 9179 // "id": "adexchangebuyer.proposals.setupcomplete", 9180 // "parameterOrder": [ 9181 // "proposalId" 9182 // ], 9183 // "parameters": { 9184 // "proposalId": { 9185 // "description": "The proposal id for which the setup is complete", 9186 // "location": "path", 9187 // "required": true, 9188 // "type": "string" 9189 // } 9190 // }, 9191 // "path": "proposals/{proposalId}/setupcomplete", 9192 // "scopes": [ 9193 // "https://www.googleapis.com/auth/adexchange.buyer" 9194 // ] 9195 // } 9196 9197} 9198 9199// method id "adexchangebuyer.proposals.update": 9200 9201type ProposalsUpdateCall struct { 9202 s *Service 9203 proposalId string 9204 revisionNumber int64 9205 updateAction string 9206 proposal *Proposal 9207 urlParams_ gensupport.URLParams 9208 ctx_ context.Context 9209 header_ http.Header 9210} 9211 9212// Update: Update the given proposal 9213func (r *ProposalsService) Update(proposalId string, revisionNumber int64, updateAction string, proposal *Proposal) *ProposalsUpdateCall { 9214 c := &ProposalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9215 c.proposalId = proposalId 9216 c.revisionNumber = revisionNumber 9217 c.updateAction = updateAction 9218 c.proposal = proposal 9219 return c 9220} 9221 9222// Fields allows partial responses to be retrieved. See 9223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9224// for more information. 9225func (c *ProposalsUpdateCall) Fields(s ...googleapi.Field) *ProposalsUpdateCall { 9226 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9227 return c 9228} 9229 9230// Context sets the context to be used in this call's Do method. Any 9231// pending HTTP request will be aborted if the provided context is 9232// canceled. 9233func (c *ProposalsUpdateCall) Context(ctx context.Context) *ProposalsUpdateCall { 9234 c.ctx_ = ctx 9235 return c 9236} 9237 9238// Header returns an http.Header that can be modified by the caller to 9239// add HTTP headers to the request. 9240func (c *ProposalsUpdateCall) Header() http.Header { 9241 if c.header_ == nil { 9242 c.header_ = make(http.Header) 9243 } 9244 return c.header_ 9245} 9246 9247func (c *ProposalsUpdateCall) doRequest(alt string) (*http.Response, error) { 9248 reqHeaders := make(http.Header) 9249 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9250 for k, v := range c.header_ { 9251 reqHeaders[k] = v 9252 } 9253 reqHeaders.Set("User-Agent", c.s.userAgent()) 9254 var body io.Reader = nil 9255 body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal) 9256 if err != nil { 9257 return nil, err 9258 } 9259 reqHeaders.Set("Content-Type", "application/json") 9260 c.urlParams_.Set("alt", alt) 9261 c.urlParams_.Set("prettyPrint", "false") 9262 urls := googleapi.ResolveRelative(c.s.BasePath, "proposals/{proposalId}/{revisionNumber}/{updateAction}") 9263 urls += "?" + c.urlParams_.Encode() 9264 req, err := http.NewRequest("PUT", urls, body) 9265 if err != nil { 9266 return nil, err 9267 } 9268 req.Header = reqHeaders 9269 googleapi.Expand(req.URL, map[string]string{ 9270 "proposalId": c.proposalId, 9271 "revisionNumber": strconv.FormatInt(c.revisionNumber, 10), 9272 "updateAction": c.updateAction, 9273 }) 9274 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9275} 9276 9277// Do executes the "adexchangebuyer.proposals.update" call. 9278// Exactly one of *Proposal or error will be non-nil. Any non-2xx status 9279// code is an error. Response headers are in either 9280// *Proposal.ServerResponse.Header or (if a response was returned at 9281// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9282// to check whether the returned error was because 9283// http.StatusNotModified was returned. 9284func (c *ProposalsUpdateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { 9285 gensupport.SetOptions(c.urlParams_, opts...) 9286 res, err := c.doRequest("json") 9287 if res != nil && res.StatusCode == http.StatusNotModified { 9288 if res.Body != nil { 9289 res.Body.Close() 9290 } 9291 return nil, &googleapi.Error{ 9292 Code: res.StatusCode, 9293 Header: res.Header, 9294 } 9295 } 9296 if err != nil { 9297 return nil, err 9298 } 9299 defer googleapi.CloseBody(res) 9300 if err := googleapi.CheckResponse(res); err != nil { 9301 return nil, err 9302 } 9303 ret := &Proposal{ 9304 ServerResponse: googleapi.ServerResponse{ 9305 Header: res.Header, 9306 HTTPStatusCode: res.StatusCode, 9307 }, 9308 } 9309 target := &ret 9310 if err := gensupport.DecodeResponse(target, res); err != nil { 9311 return nil, err 9312 } 9313 return ret, nil 9314 // { 9315 // "description": "Update the given proposal", 9316 // "httpMethod": "PUT", 9317 // "id": "adexchangebuyer.proposals.update", 9318 // "parameterOrder": [ 9319 // "proposalId", 9320 // "revisionNumber", 9321 // "updateAction" 9322 // ], 9323 // "parameters": { 9324 // "proposalId": { 9325 // "description": "The proposal id to update.", 9326 // "location": "path", 9327 // "required": true, 9328 // "type": "string" 9329 // }, 9330 // "revisionNumber": { 9331 // "description": "The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision.", 9332 // "format": "int64", 9333 // "location": "path", 9334 // "required": true, 9335 // "type": "string" 9336 // }, 9337 // "updateAction": { 9338 // "description": "The proposed action to take on the proposal. This field is required and it must be set when updating a proposal.", 9339 // "enum": [ 9340 // "accept", 9341 // "cancel", 9342 // "propose", 9343 // "proposeAndAccept", 9344 // "unknownAction", 9345 // "updateNonTerms" 9346 // ], 9347 // "enumDescriptions": [ 9348 // "", 9349 // "", 9350 // "", 9351 // "", 9352 // "", 9353 // "" 9354 // ], 9355 // "location": "path", 9356 // "required": true, 9357 // "type": "string" 9358 // } 9359 // }, 9360 // "path": "proposals/{proposalId}/{revisionNumber}/{updateAction}", 9361 // "request": { 9362 // "$ref": "Proposal" 9363 // }, 9364 // "response": { 9365 // "$ref": "Proposal" 9366 // }, 9367 // "scopes": [ 9368 // "https://www.googleapis.com/auth/adexchange.buyer" 9369 // ] 9370 // } 9371 9372} 9373 9374// method id "adexchangebuyer.pubprofiles.list": 9375 9376type PubprofilesListCall struct { 9377 s *Service 9378 accountId int64 9379 urlParams_ gensupport.URLParams 9380 ifNoneMatch_ string 9381 ctx_ context.Context 9382 header_ http.Header 9383} 9384 9385// List: Gets the requested publisher profile(s) by publisher accountId. 9386func (r *PubprofilesService) List(accountId int64) *PubprofilesListCall { 9387 c := &PubprofilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9388 c.accountId = accountId 9389 return c 9390} 9391 9392// Fields allows partial responses to be retrieved. See 9393// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9394// for more information. 9395func (c *PubprofilesListCall) Fields(s ...googleapi.Field) *PubprofilesListCall { 9396 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9397 return c 9398} 9399 9400// IfNoneMatch sets the optional parameter which makes the operation 9401// fail if the object's ETag matches the given value. This is useful for 9402// getting updates only after the object has changed since the last 9403// request. Use googleapi.IsNotModified to check whether the response 9404// error from Do is the result of In-None-Match. 9405func (c *PubprofilesListCall) IfNoneMatch(entityTag string) *PubprofilesListCall { 9406 c.ifNoneMatch_ = entityTag 9407 return c 9408} 9409 9410// Context sets the context to be used in this call's Do method. Any 9411// pending HTTP request will be aborted if the provided context is 9412// canceled. 9413func (c *PubprofilesListCall) Context(ctx context.Context) *PubprofilesListCall { 9414 c.ctx_ = ctx 9415 return c 9416} 9417 9418// Header returns an http.Header that can be modified by the caller to 9419// add HTTP headers to the request. 9420func (c *PubprofilesListCall) Header() http.Header { 9421 if c.header_ == nil { 9422 c.header_ = make(http.Header) 9423 } 9424 return c.header_ 9425} 9426 9427func (c *PubprofilesListCall) doRequest(alt string) (*http.Response, error) { 9428 reqHeaders := make(http.Header) 9429 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200302") 9430 for k, v := range c.header_ { 9431 reqHeaders[k] = v 9432 } 9433 reqHeaders.Set("User-Agent", c.s.userAgent()) 9434 if c.ifNoneMatch_ != "" { 9435 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9436 } 9437 var body io.Reader = nil 9438 c.urlParams_.Set("alt", alt) 9439 c.urlParams_.Set("prettyPrint", "false") 9440 urls := googleapi.ResolveRelative(c.s.BasePath, "publisher/{accountId}/profiles") 9441 urls += "?" + c.urlParams_.Encode() 9442 req, err := http.NewRequest("GET", urls, body) 9443 if err != nil { 9444 return nil, err 9445 } 9446 req.Header = reqHeaders 9447 googleapi.Expand(req.URL, map[string]string{ 9448 "accountId": strconv.FormatInt(c.accountId, 10), 9449 }) 9450 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9451} 9452 9453// Do executes the "adexchangebuyer.pubprofiles.list" call. 9454// Exactly one of *GetPublisherProfilesByAccountIdResponse or error will 9455// be non-nil. Any non-2xx status code is an error. Response headers are 9456// in either 9457// *GetPublisherProfilesByAccountIdResponse.ServerResponse.Header or (if 9458// a response was returned at all) in error.(*googleapi.Error).Header. 9459// Use googleapi.IsNotModified to check whether the returned error was 9460// because http.StatusNotModified was returned. 9461func (c *PubprofilesListCall) Do(opts ...googleapi.CallOption) (*GetPublisherProfilesByAccountIdResponse, error) { 9462 gensupport.SetOptions(c.urlParams_, opts...) 9463 res, err := c.doRequest("json") 9464 if res != nil && res.StatusCode == http.StatusNotModified { 9465 if res.Body != nil { 9466 res.Body.Close() 9467 } 9468 return nil, &googleapi.Error{ 9469 Code: res.StatusCode, 9470 Header: res.Header, 9471 } 9472 } 9473 if err != nil { 9474 return nil, err 9475 } 9476 defer googleapi.CloseBody(res) 9477 if err := googleapi.CheckResponse(res); err != nil { 9478 return nil, err 9479 } 9480 ret := &GetPublisherProfilesByAccountIdResponse{ 9481 ServerResponse: googleapi.ServerResponse{ 9482 Header: res.Header, 9483 HTTPStatusCode: res.StatusCode, 9484 }, 9485 } 9486 target := &ret 9487 if err := gensupport.DecodeResponse(target, res); err != nil { 9488 return nil, err 9489 } 9490 return ret, nil 9491 // { 9492 // "description": "Gets the requested publisher profile(s) by publisher accountId.", 9493 // "httpMethod": "GET", 9494 // "id": "adexchangebuyer.pubprofiles.list", 9495 // "parameterOrder": [ 9496 // "accountId" 9497 // ], 9498 // "parameters": { 9499 // "accountId": { 9500 // "description": "The accountId of the publisher to get profiles for.", 9501 // "format": "int32", 9502 // "location": "path", 9503 // "required": true, 9504 // "type": "integer" 9505 // } 9506 // }, 9507 // "path": "publisher/{accountId}/profiles", 9508 // "response": { 9509 // "$ref": "GetPublisherProfilesByAccountIdResponse" 9510 // }, 9511 // "scopes": [ 9512 // "https://www.googleapis.com/auth/adexchange.buyer" 9513 // ] 9514 // } 9515 9516} 9517