1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package displayvideo provides access to the Display & Video 360 API. 8 // 9 // For product documentation, see: https://developers.google.com/display-video/ 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/displayvideo/v1" 27 // ... 28 // ctx := context.Background() 29 // displayvideoService, err := displayvideo.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // By default, all available scopes (see "Constants") are used to authenticate. 38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]: 39 // 40 // displayvideoService, err := displayvideo.NewService(ctx, option.WithScopes(displayvideo.DoubleclickbidmanagerScope)) 41 // 42 // To use an API key for authentication (note: some APIs do not support API 43 // keys), use [google.golang.org/api/option.WithAPIKey]: 44 // 45 // displayvideoService, err := displayvideo.NewService(ctx, option.WithAPIKey("AIza...")) 46 // 47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 48 // flow, use [google.golang.org/api/option.WithTokenSource]: 49 // 50 // config := &oauth2.Config{...} 51 // // ... 52 // token, err := config.Exchange(ctx, ...) 53 // displayvideoService, err := displayvideo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 54 // 55 // See [google.golang.org/api/option.ClientOption] for details on options. 56 package displayvideo // import "google.golang.org/api/displayvideo/v1" 57 58 import ( 59 "bytes" 60 "context" 61 "encoding/json" 62 "errors" 63 "fmt" 64 "io" 65 "net/http" 66 "net/url" 67 "strconv" 68 "strings" 69 70 googleapi "google.golang.org/api/googleapi" 71 internal "google.golang.org/api/internal" 72 gensupport "google.golang.org/api/internal/gensupport" 73 option "google.golang.org/api/option" 74 internaloption "google.golang.org/api/option/internaloption" 75 htransport "google.golang.org/api/transport/http" 76 ) 77 78 // Always reference these packages, just in case the auto-generated code 79 // below doesn't. 80 var _ = bytes.NewBuffer 81 var _ = strconv.Itoa 82 var _ = fmt.Sprintf 83 var _ = json.NewDecoder 84 var _ = io.Copy 85 var _ = url.Parse 86 var _ = gensupport.MarshalJSON 87 var _ = googleapi.Version 88 var _ = errors.New 89 var _ = strings.Replace 90 var _ = context.Canceled 91 var _ = internaloption.WithDefaultEndpoint 92 var _ = internal.Version 93 94 const apiId = "displayvideo:v1" 95 const apiName = "displayvideo" 96 const apiVersion = "v1" 97 const basePath = "https://displayvideo.googleapis.com/" 98 const basePathTemplate = "https://displayvideo.UNIVERSE_DOMAIN/" 99 const mtlsBasePath = "https://displayvideo.mtls.googleapis.com/" 100 const defaultUniverseDomain = "googleapis.com" 101 102 // OAuth2 scopes used by this API. 103 const ( 104 // Create, see, edit, and permanently delete your Display & Video 360 105 // entities and reports 106 DisplayVideoScope = "https://www.googleapis.com/auth/display-video" 107 108 // Create, see, and edit Display & Video 360 Campaign entities and see 109 // billing invoices 110 DisplayVideoMediaplanningScope = "https://www.googleapis.com/auth/display-video-mediaplanning" 111 112 // Private Service: 113 // https://www.googleapis.com/auth/display-video-user-management 114 DisplayVideoUserManagementScope = "https://www.googleapis.com/auth/display-video-user-management" 115 116 // View and manage your reports in DoubleClick Bid Manager 117 DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager" 118 ) 119 120 // NewService creates a new Service. 121 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 122 scopesOption := internaloption.WithDefaultScopes( 123 "https://www.googleapis.com/auth/display-video", 124 "https://www.googleapis.com/auth/display-video-mediaplanning", 125 "https://www.googleapis.com/auth/display-video-user-management", 126 "https://www.googleapis.com/auth/doubleclickbidmanager", 127 ) 128 // NOTE: prepend, so we don't override user-specified scopes. 129 opts = append([]option.ClientOption{scopesOption}, opts...) 130 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 131 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 132 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 133 opts = append(opts, internaloption.WithDefaultUniverseDomain(defaultUniverseDomain)) 134 client, endpoint, err := htransport.NewClient(ctx, opts...) 135 if err != nil { 136 return nil, err 137 } 138 s, err := New(client) 139 if err != nil { 140 return nil, err 141 } 142 if endpoint != "" { 143 s.BasePath = endpoint 144 } 145 return s, nil 146 } 147 148 // New creates a new Service. It uses the provided http.Client for requests. 149 // 150 // Deprecated: please use NewService instead. 151 // To provide a custom HTTP client, use option.WithHTTPClient. 152 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 153 func New(client *http.Client) (*Service, error) { 154 if client == nil { 155 return nil, errors.New("client is nil") 156 } 157 s := &Service{client: client, BasePath: basePath} 158 s.Advertisers = NewAdvertisersService(s) 159 s.CombinedAudiences = NewCombinedAudiencesService(s) 160 s.CustomBiddingAlgorithms = NewCustomBiddingAlgorithmsService(s) 161 s.CustomLists = NewCustomListsService(s) 162 s.FirstAndThirdPartyAudiences = NewFirstAndThirdPartyAudiencesService(s) 163 s.FloodlightGroups = NewFloodlightGroupsService(s) 164 s.GoogleAudiences = NewGoogleAudiencesService(s) 165 s.GuaranteedOrders = NewGuaranteedOrdersService(s) 166 s.InventorySourceGroups = NewInventorySourceGroupsService(s) 167 s.InventorySources = NewInventorySourcesService(s) 168 s.Media = NewMediaService(s) 169 s.Partners = NewPartnersService(s) 170 s.Sdfdownloadtasks = NewSdfdownloadtasksService(s) 171 s.TargetingTypes = NewTargetingTypesService(s) 172 s.Users = NewUsersService(s) 173 return s, nil 174 } 175 176 type Service struct { 177 client *http.Client 178 BasePath string // API endpoint base URL 179 UserAgent string // optional additional User-Agent fragment 180 181 Advertisers *AdvertisersService 182 183 CombinedAudiences *CombinedAudiencesService 184 185 CustomBiddingAlgorithms *CustomBiddingAlgorithmsService 186 187 CustomLists *CustomListsService 188 189 FirstAndThirdPartyAudiences *FirstAndThirdPartyAudiencesService 190 191 FloodlightGroups *FloodlightGroupsService 192 193 GoogleAudiences *GoogleAudiencesService 194 195 GuaranteedOrders *GuaranteedOrdersService 196 197 InventorySourceGroups *InventorySourceGroupsService 198 199 InventorySources *InventorySourcesService 200 201 Media *MediaService 202 203 Partners *PartnersService 204 205 Sdfdownloadtasks *SdfdownloadtasksService 206 207 TargetingTypes *TargetingTypesService 208 209 Users *UsersService 210 } 211 212 func (s *Service) userAgent() string { 213 if s.UserAgent == "" { 214 return googleapi.UserAgent 215 } 216 return googleapi.UserAgent + " " + s.UserAgent 217 } 218 219 func NewAdvertisersService(s *Service) *AdvertisersService { 220 rs := &AdvertisersService{s: s} 221 rs.Assets = NewAdvertisersAssetsService(s) 222 rs.Campaigns = NewAdvertisersCampaignsService(s) 223 rs.Channels = NewAdvertisersChannelsService(s) 224 rs.Creatives = NewAdvertisersCreativesService(s) 225 rs.InsertionOrders = NewAdvertisersInsertionOrdersService(s) 226 rs.Invoices = NewAdvertisersInvoicesService(s) 227 rs.LineItems = NewAdvertisersLineItemsService(s) 228 rs.LocationLists = NewAdvertisersLocationListsService(s) 229 rs.ManualTriggers = NewAdvertisersManualTriggersService(s) 230 rs.NegativeKeywordLists = NewAdvertisersNegativeKeywordListsService(s) 231 rs.TargetingTypes = NewAdvertisersTargetingTypesService(s) 232 return rs 233 } 234 235 type AdvertisersService struct { 236 s *Service 237 238 Assets *AdvertisersAssetsService 239 240 Campaigns *AdvertisersCampaignsService 241 242 Channels *AdvertisersChannelsService 243 244 Creatives *AdvertisersCreativesService 245 246 InsertionOrders *AdvertisersInsertionOrdersService 247 248 Invoices *AdvertisersInvoicesService 249 250 LineItems *AdvertisersLineItemsService 251 252 LocationLists *AdvertisersLocationListsService 253 254 ManualTriggers *AdvertisersManualTriggersService 255 256 NegativeKeywordLists *AdvertisersNegativeKeywordListsService 257 258 TargetingTypes *AdvertisersTargetingTypesService 259 } 260 261 func NewAdvertisersAssetsService(s *Service) *AdvertisersAssetsService { 262 rs := &AdvertisersAssetsService{s: s} 263 return rs 264 } 265 266 type AdvertisersAssetsService struct { 267 s *Service 268 } 269 270 func NewAdvertisersCampaignsService(s *Service) *AdvertisersCampaignsService { 271 rs := &AdvertisersCampaignsService{s: s} 272 rs.TargetingTypes = NewAdvertisersCampaignsTargetingTypesService(s) 273 return rs 274 } 275 276 type AdvertisersCampaignsService struct { 277 s *Service 278 279 TargetingTypes *AdvertisersCampaignsTargetingTypesService 280 } 281 282 func NewAdvertisersCampaignsTargetingTypesService(s *Service) *AdvertisersCampaignsTargetingTypesService { 283 rs := &AdvertisersCampaignsTargetingTypesService{s: s} 284 rs.AssignedTargetingOptions = NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s) 285 return rs 286 } 287 288 type AdvertisersCampaignsTargetingTypesService struct { 289 s *Service 290 291 AssignedTargetingOptions *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService 292 } 293 294 func NewAdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService { 295 rs := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService{s: s} 296 return rs 297 } 298 299 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService struct { 300 s *Service 301 } 302 303 func NewAdvertisersChannelsService(s *Service) *AdvertisersChannelsService { 304 rs := &AdvertisersChannelsService{s: s} 305 rs.Sites = NewAdvertisersChannelsSitesService(s) 306 return rs 307 } 308 309 type AdvertisersChannelsService struct { 310 s *Service 311 312 Sites *AdvertisersChannelsSitesService 313 } 314 315 func NewAdvertisersChannelsSitesService(s *Service) *AdvertisersChannelsSitesService { 316 rs := &AdvertisersChannelsSitesService{s: s} 317 return rs 318 } 319 320 type AdvertisersChannelsSitesService struct { 321 s *Service 322 } 323 324 func NewAdvertisersCreativesService(s *Service) *AdvertisersCreativesService { 325 rs := &AdvertisersCreativesService{s: s} 326 return rs 327 } 328 329 type AdvertisersCreativesService struct { 330 s *Service 331 } 332 333 func NewAdvertisersInsertionOrdersService(s *Service) *AdvertisersInsertionOrdersService { 334 rs := &AdvertisersInsertionOrdersService{s: s} 335 rs.TargetingTypes = NewAdvertisersInsertionOrdersTargetingTypesService(s) 336 return rs 337 } 338 339 type AdvertisersInsertionOrdersService struct { 340 s *Service 341 342 TargetingTypes *AdvertisersInsertionOrdersTargetingTypesService 343 } 344 345 func NewAdvertisersInsertionOrdersTargetingTypesService(s *Service) *AdvertisersInsertionOrdersTargetingTypesService { 346 rs := &AdvertisersInsertionOrdersTargetingTypesService{s: s} 347 rs.AssignedTargetingOptions = NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s) 348 return rs 349 } 350 351 type AdvertisersInsertionOrdersTargetingTypesService struct { 352 s *Service 353 354 AssignedTargetingOptions *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService 355 } 356 357 func NewAdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService { 358 rs := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService{s: s} 359 return rs 360 } 361 362 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService struct { 363 s *Service 364 } 365 366 func NewAdvertisersInvoicesService(s *Service) *AdvertisersInvoicesService { 367 rs := &AdvertisersInvoicesService{s: s} 368 return rs 369 } 370 371 type AdvertisersInvoicesService struct { 372 s *Service 373 } 374 375 func NewAdvertisersLineItemsService(s *Service) *AdvertisersLineItemsService { 376 rs := &AdvertisersLineItemsService{s: s} 377 rs.TargetingTypes = NewAdvertisersLineItemsTargetingTypesService(s) 378 return rs 379 } 380 381 type AdvertisersLineItemsService struct { 382 s *Service 383 384 TargetingTypes *AdvertisersLineItemsTargetingTypesService 385 } 386 387 func NewAdvertisersLineItemsTargetingTypesService(s *Service) *AdvertisersLineItemsTargetingTypesService { 388 rs := &AdvertisersLineItemsTargetingTypesService{s: s} 389 rs.AssignedTargetingOptions = NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s) 390 return rs 391 } 392 393 type AdvertisersLineItemsTargetingTypesService struct { 394 s *Service 395 396 AssignedTargetingOptions *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService 397 } 398 399 func NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService { 400 rs := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService{s: s} 401 return rs 402 } 403 404 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService struct { 405 s *Service 406 } 407 408 func NewAdvertisersLocationListsService(s *Service) *AdvertisersLocationListsService { 409 rs := &AdvertisersLocationListsService{s: s} 410 rs.AssignedLocations = NewAdvertisersLocationListsAssignedLocationsService(s) 411 return rs 412 } 413 414 type AdvertisersLocationListsService struct { 415 s *Service 416 417 AssignedLocations *AdvertisersLocationListsAssignedLocationsService 418 } 419 420 func NewAdvertisersLocationListsAssignedLocationsService(s *Service) *AdvertisersLocationListsAssignedLocationsService { 421 rs := &AdvertisersLocationListsAssignedLocationsService{s: s} 422 return rs 423 } 424 425 type AdvertisersLocationListsAssignedLocationsService struct { 426 s *Service 427 } 428 429 func NewAdvertisersManualTriggersService(s *Service) *AdvertisersManualTriggersService { 430 rs := &AdvertisersManualTriggersService{s: s} 431 return rs 432 } 433 434 type AdvertisersManualTriggersService struct { 435 s *Service 436 } 437 438 func NewAdvertisersNegativeKeywordListsService(s *Service) *AdvertisersNegativeKeywordListsService { 439 rs := &AdvertisersNegativeKeywordListsService{s: s} 440 rs.NegativeKeywords = NewAdvertisersNegativeKeywordListsNegativeKeywordsService(s) 441 return rs 442 } 443 444 type AdvertisersNegativeKeywordListsService struct { 445 s *Service 446 447 NegativeKeywords *AdvertisersNegativeKeywordListsNegativeKeywordsService 448 } 449 450 func NewAdvertisersNegativeKeywordListsNegativeKeywordsService(s *Service) *AdvertisersNegativeKeywordListsNegativeKeywordsService { 451 rs := &AdvertisersNegativeKeywordListsNegativeKeywordsService{s: s} 452 return rs 453 } 454 455 type AdvertisersNegativeKeywordListsNegativeKeywordsService struct { 456 s *Service 457 } 458 459 func NewAdvertisersTargetingTypesService(s *Service) *AdvertisersTargetingTypesService { 460 rs := &AdvertisersTargetingTypesService{s: s} 461 rs.AssignedTargetingOptions = NewAdvertisersTargetingTypesAssignedTargetingOptionsService(s) 462 return rs 463 } 464 465 type AdvertisersTargetingTypesService struct { 466 s *Service 467 468 AssignedTargetingOptions *AdvertisersTargetingTypesAssignedTargetingOptionsService 469 } 470 471 func NewAdvertisersTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersTargetingTypesAssignedTargetingOptionsService { 472 rs := &AdvertisersTargetingTypesAssignedTargetingOptionsService{s: s} 473 return rs 474 } 475 476 type AdvertisersTargetingTypesAssignedTargetingOptionsService struct { 477 s *Service 478 } 479 480 func NewCombinedAudiencesService(s *Service) *CombinedAudiencesService { 481 rs := &CombinedAudiencesService{s: s} 482 return rs 483 } 484 485 type CombinedAudiencesService struct { 486 s *Service 487 } 488 489 func NewCustomBiddingAlgorithmsService(s *Service) *CustomBiddingAlgorithmsService { 490 rs := &CustomBiddingAlgorithmsService{s: s} 491 rs.Scripts = NewCustomBiddingAlgorithmsScriptsService(s) 492 return rs 493 } 494 495 type CustomBiddingAlgorithmsService struct { 496 s *Service 497 498 Scripts *CustomBiddingAlgorithmsScriptsService 499 } 500 501 func NewCustomBiddingAlgorithmsScriptsService(s *Service) *CustomBiddingAlgorithmsScriptsService { 502 rs := &CustomBiddingAlgorithmsScriptsService{s: s} 503 return rs 504 } 505 506 type CustomBiddingAlgorithmsScriptsService struct { 507 s *Service 508 } 509 510 func NewCustomListsService(s *Service) *CustomListsService { 511 rs := &CustomListsService{s: s} 512 return rs 513 } 514 515 type CustomListsService struct { 516 s *Service 517 } 518 519 func NewFirstAndThirdPartyAudiencesService(s *Service) *FirstAndThirdPartyAudiencesService { 520 rs := &FirstAndThirdPartyAudiencesService{s: s} 521 return rs 522 } 523 524 type FirstAndThirdPartyAudiencesService struct { 525 s *Service 526 } 527 528 func NewFloodlightGroupsService(s *Service) *FloodlightGroupsService { 529 rs := &FloodlightGroupsService{s: s} 530 return rs 531 } 532 533 type FloodlightGroupsService struct { 534 s *Service 535 } 536 537 func NewGoogleAudiencesService(s *Service) *GoogleAudiencesService { 538 rs := &GoogleAudiencesService{s: s} 539 return rs 540 } 541 542 type GoogleAudiencesService struct { 543 s *Service 544 } 545 546 func NewGuaranteedOrdersService(s *Service) *GuaranteedOrdersService { 547 rs := &GuaranteedOrdersService{s: s} 548 return rs 549 } 550 551 type GuaranteedOrdersService struct { 552 s *Service 553 } 554 555 func NewInventorySourceGroupsService(s *Service) *InventorySourceGroupsService { 556 rs := &InventorySourceGroupsService{s: s} 557 rs.AssignedInventorySources = NewInventorySourceGroupsAssignedInventorySourcesService(s) 558 return rs 559 } 560 561 type InventorySourceGroupsService struct { 562 s *Service 563 564 AssignedInventorySources *InventorySourceGroupsAssignedInventorySourcesService 565 } 566 567 func NewInventorySourceGroupsAssignedInventorySourcesService(s *Service) *InventorySourceGroupsAssignedInventorySourcesService { 568 rs := &InventorySourceGroupsAssignedInventorySourcesService{s: s} 569 return rs 570 } 571 572 type InventorySourceGroupsAssignedInventorySourcesService struct { 573 s *Service 574 } 575 576 func NewInventorySourcesService(s *Service) *InventorySourcesService { 577 rs := &InventorySourcesService{s: s} 578 return rs 579 } 580 581 type InventorySourcesService struct { 582 s *Service 583 } 584 585 func NewMediaService(s *Service) *MediaService { 586 rs := &MediaService{s: s} 587 return rs 588 } 589 590 type MediaService struct { 591 s *Service 592 } 593 594 func NewPartnersService(s *Service) *PartnersService { 595 rs := &PartnersService{s: s} 596 rs.Channels = NewPartnersChannelsService(s) 597 rs.TargetingTypes = NewPartnersTargetingTypesService(s) 598 return rs 599 } 600 601 type PartnersService struct { 602 s *Service 603 604 Channels *PartnersChannelsService 605 606 TargetingTypes *PartnersTargetingTypesService 607 } 608 609 func NewPartnersChannelsService(s *Service) *PartnersChannelsService { 610 rs := &PartnersChannelsService{s: s} 611 rs.Sites = NewPartnersChannelsSitesService(s) 612 return rs 613 } 614 615 type PartnersChannelsService struct { 616 s *Service 617 618 Sites *PartnersChannelsSitesService 619 } 620 621 func NewPartnersChannelsSitesService(s *Service) *PartnersChannelsSitesService { 622 rs := &PartnersChannelsSitesService{s: s} 623 return rs 624 } 625 626 type PartnersChannelsSitesService struct { 627 s *Service 628 } 629 630 func NewPartnersTargetingTypesService(s *Service) *PartnersTargetingTypesService { 631 rs := &PartnersTargetingTypesService{s: s} 632 rs.AssignedTargetingOptions = NewPartnersTargetingTypesAssignedTargetingOptionsService(s) 633 return rs 634 } 635 636 type PartnersTargetingTypesService struct { 637 s *Service 638 639 AssignedTargetingOptions *PartnersTargetingTypesAssignedTargetingOptionsService 640 } 641 642 func NewPartnersTargetingTypesAssignedTargetingOptionsService(s *Service) *PartnersTargetingTypesAssignedTargetingOptionsService { 643 rs := &PartnersTargetingTypesAssignedTargetingOptionsService{s: s} 644 return rs 645 } 646 647 type PartnersTargetingTypesAssignedTargetingOptionsService struct { 648 s *Service 649 } 650 651 func NewSdfdownloadtasksService(s *Service) *SdfdownloadtasksService { 652 rs := &SdfdownloadtasksService{s: s} 653 rs.Operations = NewSdfdownloadtasksOperationsService(s) 654 return rs 655 } 656 657 type SdfdownloadtasksService struct { 658 s *Service 659 660 Operations *SdfdownloadtasksOperationsService 661 } 662 663 func NewSdfdownloadtasksOperationsService(s *Service) *SdfdownloadtasksOperationsService { 664 rs := &SdfdownloadtasksOperationsService{s: s} 665 return rs 666 } 667 668 type SdfdownloadtasksOperationsService struct { 669 s *Service 670 } 671 672 func NewTargetingTypesService(s *Service) *TargetingTypesService { 673 rs := &TargetingTypesService{s: s} 674 rs.TargetingOptions = NewTargetingTypesTargetingOptionsService(s) 675 return rs 676 } 677 678 type TargetingTypesService struct { 679 s *Service 680 681 TargetingOptions *TargetingTypesTargetingOptionsService 682 } 683 684 func NewTargetingTypesTargetingOptionsService(s *Service) *TargetingTypesTargetingOptionsService { 685 rs := &TargetingTypesTargetingOptionsService{s: s} 686 return rs 687 } 688 689 type TargetingTypesTargetingOptionsService struct { 690 s *Service 691 } 692 693 func NewUsersService(s *Service) *UsersService { 694 rs := &UsersService{s: s} 695 return rs 696 } 697 698 type UsersService struct { 699 s *Service 700 } 701 702 // ActivateManualTriggerRequest: Request message for 703 // ManualTriggerService.ActivateManualTrigger. 704 type ActivateManualTriggerRequest struct { 705 } 706 707 // ActiveViewVideoViewabilityMetricConfig: Configuration for custom 708 // Active View video viewability metrics. 709 type ActiveViewVideoViewabilityMetricConfig struct { 710 // DisplayName: Required. The display name of the custom metric. 711 DisplayName string `json:"displayName,omitempty"` 712 713 // MinimumDuration: The minimum visible video duration required (in 714 // seconds) in order for an impression to be recorded. You must specify 715 // minimum_duration, minimum_quartile or both. If both are specified, an 716 // impression meets the metric criteria if either requirement is met 717 // (whichever happens first). 718 // 719 // Possible values: 720 // "VIDEO_DURATION_UNSPECIFIED" - Value is not specified or is unknown 721 // in this version. 722 // "VIDEO_DURATION_SECONDS_NONE" - No duration value. 723 // "VIDEO_DURATION_SECONDS_0" - 0 seconds. 724 // "VIDEO_DURATION_SECONDS_1" - 1 second. 725 // "VIDEO_DURATION_SECONDS_2" - 2 seconds. 726 // "VIDEO_DURATION_SECONDS_3" - 3 seconds. 727 // "VIDEO_DURATION_SECONDS_4" - 4 seconds. 728 // "VIDEO_DURATION_SECONDS_5" - 5 seconds. 729 // "VIDEO_DURATION_SECONDS_6" - 6 seconds. 730 // "VIDEO_DURATION_SECONDS_7" - 7 seconds. 731 // "VIDEO_DURATION_SECONDS_8" - 8 seconds. 732 // "VIDEO_DURATION_SECONDS_9" - 9 seconds. 733 // "VIDEO_DURATION_SECONDS_10" - 10 seconds. 734 // "VIDEO_DURATION_SECONDS_11" - 11 seconds. 735 // "VIDEO_DURATION_SECONDS_12" - 12 seconds. 736 // "VIDEO_DURATION_SECONDS_13" - 13 seconds. 737 // "VIDEO_DURATION_SECONDS_14" - 14 seconds. 738 // "VIDEO_DURATION_SECONDS_15" - 15 seconds. 739 // "VIDEO_DURATION_SECONDS_30" - 30 seconds. 740 // "VIDEO_DURATION_SECONDS_45" - 45 seconds. 741 // "VIDEO_DURATION_SECONDS_60" - 60 seconds. 742 MinimumDuration string `json:"minimumDuration,omitempty"` 743 744 // MinimumQuartile: The minimum visible video duration required, based 745 // on the video quartiles, in order for an impression to be recorded. 746 // You must specify minimum_duration, minimum_quartile or both. If both 747 // are specified, an impression meets the metric criteria if either 748 // requirement is met (whichever happens first). 749 // 750 // Possible values: 751 // "VIDEO_DURATION_QUARTILE_UNSPECIFIED" - Value is not specified or 752 // is unknown in this version. 753 // "VIDEO_DURATION_QUARTILE_NONE" - No quartile value. 754 // "VIDEO_DURATION_QUARTILE_FIRST" - First quartile. 755 // "VIDEO_DURATION_QUARTILE_SECOND" - Second quartile (midpoint). 756 // "VIDEO_DURATION_QUARTILE_THIRD" - Third quartile. 757 // "VIDEO_DURATION_QUARTILE_FOURTH" - Fourth quartile (completion). 758 MinimumQuartile string `json:"minimumQuartile,omitempty"` 759 760 // MinimumViewability: Required. The minimum percentage of the video 761 // ad's pixels visible on the screen in order for an impression to be 762 // recorded. 763 // 764 // Possible values: 765 // "VIEWABILITY_PERCENT_UNSPECIFIED" - Value is not specified or is 766 // unknown in this version. 767 // "VIEWABILITY_PERCENT_0" - 0% viewable. 768 // "VIEWABILITY_PERCENT_25" - 25% viewable. 769 // "VIEWABILITY_PERCENT_50" - 50% viewable. 770 // "VIEWABILITY_PERCENT_75" - 75% viewable. 771 // "VIEWABILITY_PERCENT_100" - 100% viewable. 772 MinimumViewability string `json:"minimumViewability,omitempty"` 773 774 // MinimumVolume: Required. The minimum percentage of the video ad's 775 // volume required in order for an impression to be recorded. 776 // 777 // Possible values: 778 // "VIDEO_VOLUME_PERCENT_UNSPECIFIED" - Value is not specified or is 779 // unknown in this version. 780 // "VIDEO_VOLUME_PERCENT_0" - 0% volume. 781 // "VIDEO_VOLUME_PERCENT_10" - 10% volume. 782 MinimumVolume string `json:"minimumVolume,omitempty"` 783 784 // ForceSendFields is a list of field names (e.g. "DisplayName") to 785 // unconditionally include in API requests. By default, fields with 786 // empty or default values are omitted from API requests. However, any 787 // non-pointer, non-interface field appearing in ForceSendFields will be 788 // sent to the server regardless of whether the field is empty or not. 789 // This may be used to include empty fields in Patch requests. 790 ForceSendFields []string `json:"-"` 791 792 // NullFields is a list of field names (e.g. "DisplayName") to include 793 // in API requests with the JSON null value. By default, fields with 794 // empty values are omitted from API requests. However, any field with 795 // an empty value appearing in NullFields will be sent to the server as 796 // null. It is an error if a field in this list has a non-empty value. 797 // This may be used to include null fields in Patch requests. 798 NullFields []string `json:"-"` 799 } 800 801 func (s *ActiveViewVideoViewabilityMetricConfig) MarshalJSON() ([]byte, error) { 802 type NoMethod ActiveViewVideoViewabilityMetricConfig 803 raw := NoMethod(*s) 804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 805 } 806 807 // Adloox: Details of Adloox settings. 808 type Adloox struct { 809 // ExcludedAdlooxCategories: Adloox's brand safety settings. 810 // 811 // Possible values: 812 // "ADLOOX_UNSPECIFIED" - This enum is only a placeholder and it 813 // doesn't specify any Adloox option. 814 // "ADULT_CONTENT_HARD" - Adult content (hard). 815 // "ADULT_CONTENT_SOFT" - Adult content (soft). 816 // "ILLEGAL_CONTENT" - Illegal content. 817 // "BORDERLINE_CONTENT" - Borderline content. 818 // "DISCRIMINATORY_CONTENT" - Discriminatory content. 819 // "VIOLENT_CONTENT_WEAPONS" - Violent content & weapons. 820 // "LOW_VIEWABILITY_DOMAINS" - Low viewability domains. 821 // "FRAUD" - Fraud. 822 ExcludedAdlooxCategories []string `json:"excludedAdlooxCategories,omitempty"` 823 824 // ForceSendFields is a list of field names (e.g. 825 // "ExcludedAdlooxCategories") to unconditionally include in API 826 // requests. By default, fields with empty or default values are omitted 827 // from API requests. However, any non-pointer, non-interface field 828 // appearing in ForceSendFields will be sent to the server regardless of 829 // whether the field is empty or not. This may be used to include empty 830 // fields in Patch requests. 831 ForceSendFields []string `json:"-"` 832 833 // NullFields is a list of field names (e.g. "ExcludedAdlooxCategories") 834 // to include in API requests with the JSON null value. By default, 835 // fields with empty values are omitted from API requests. However, any 836 // field with an empty value appearing in NullFields will be sent to the 837 // server as null. It is an error if a field in this list has a 838 // non-empty value. This may be used to include null fields in Patch 839 // requests. 840 NullFields []string `json:"-"` 841 } 842 843 func (s *Adloox) MarshalJSON() ([]byte, error) { 844 type NoMethod Adloox 845 raw := NoMethod(*s) 846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 847 } 848 849 // Advertiser: A single advertiser in Display & Video 360 (DV360). 850 type Advertiser struct { 851 // AdServerConfig: Required. Immutable. Ad server related settings of 852 // the advertiser. 853 AdServerConfig *AdvertiserAdServerConfig `json:"adServerConfig,omitempty"` 854 855 // AdvertiserId: Output only. The unique ID of the advertiser. Assigned 856 // by the system. 857 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 858 859 // CreativeConfig: Required. Creative related settings of the 860 // advertiser. 861 CreativeConfig *AdvertiserCreativeConfig `json:"creativeConfig,omitempty"` 862 863 // DataAccessConfig: Settings that control how advertiser data may be 864 // accessed. 865 DataAccessConfig *AdvertiserDataAccessConfig `json:"dataAccessConfig,omitempty"` 866 867 // DisplayName: Required. The display name of the advertiser. Must be 868 // UTF-8 encoded with a maximum size of 240 bytes. 869 DisplayName string `json:"displayName,omitempty"` 870 871 // EntityStatus: Required. Controls whether or not insertion orders and 872 // line items of the advertiser can spend their budgets and bid on 873 // inventory. * Accepted values are `ENTITY_STATUS_ACTIVE`, 874 // `ENTITY_STATUS_PAUSED` and `ENTITY_STATUS_SCHEDULED_FOR_DELETION`. * 875 // If set to `ENTITY_STATUS_SCHEDULED_FOR_DELETION`, the advertiser will 876 // be deleted 30 days from when it was first scheduled for deletion. 877 // 878 // Possible values: 879 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 880 // specified or is unknown in this version. 881 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 882 // budget. 883 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 884 // budget spending are disabled. An entity can be deleted after 885 // archived. Deleted entities cannot be retrieved. 886 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 887 // budget spending are disabled. 888 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 889 // the entity. 890 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 891 // for deletion. 892 EntityStatus string `json:"entityStatus,omitempty"` 893 894 // GeneralConfig: Required. General settings of the advertiser. 895 GeneralConfig *AdvertiserGeneralConfig `json:"generalConfig,omitempty"` 896 897 // IntegrationDetails: Integration details of the advertiser. Only 898 // integrationCode is currently applicable to advertiser. Other fields 899 // of IntegrationDetails are not supported and will be ignored if 900 // provided. 901 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"` 902 903 // Name: Output only. The resource name of the advertiser. 904 Name string `json:"name,omitempty"` 905 906 // PartnerId: Required. Immutable. The unique ID of the partner that the 907 // advertiser belongs to. 908 PartnerId int64 `json:"partnerId,omitempty,string"` 909 910 // PrismaEnabled: Whether integration with Mediaocean (Prisma) is 911 // enabled. By enabling this, you agree to the following: On behalf of 912 // my company, I authorize Mediaocean (Prisma) to send budget segment 913 // plans to Google, and I authorize Google to send corresponding 914 // reporting and invoices from DV360 to Mediaocean for the purposes of 915 // budget planning, billing, and reconciliation for this advertiser. 916 PrismaEnabled bool `json:"prismaEnabled,omitempty"` 917 918 // ServingConfig: Targeting settings related to ad serving of the 919 // advertiser. 920 ServingConfig *AdvertiserTargetingConfig `json:"servingConfig,omitempty"` 921 922 // UpdateTime: Output only. The timestamp when the advertiser was last 923 // updated. Assigned by the system. 924 UpdateTime string `json:"updateTime,omitempty"` 925 926 // ServerResponse contains the HTTP response code and headers from the 927 // server. 928 googleapi.ServerResponse `json:"-"` 929 930 // ForceSendFields is a list of field names (e.g. "AdServerConfig") to 931 // unconditionally include in API requests. By default, fields with 932 // empty or default values are omitted from API requests. However, any 933 // non-pointer, non-interface field appearing in ForceSendFields will be 934 // sent to the server regardless of whether the field is empty or not. 935 // This may be used to include empty fields in Patch requests. 936 ForceSendFields []string `json:"-"` 937 938 // NullFields is a list of field names (e.g. "AdServerConfig") to 939 // include in API requests with the JSON null value. By default, fields 940 // with empty values are omitted from API requests. However, any field 941 // with an empty value appearing in NullFields will be sent to the 942 // server as null. It is an error if a field in this list has a 943 // non-empty value. This may be used to include null fields in Patch 944 // requests. 945 NullFields []string `json:"-"` 946 } 947 948 func (s *Advertiser) MarshalJSON() ([]byte, error) { 949 type NoMethod Advertiser 950 raw := NoMethod(*s) 951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 952 } 953 954 // AdvertiserAdServerConfig: Ad server related settings of an 955 // advertiser. 956 type AdvertiserAdServerConfig struct { 957 // CmHybridConfig: The configuration for advertisers that use both 958 // Campaign Manager 360 (CM360) and third-party ad servers. 959 CmHybridConfig *CmHybridConfig `json:"cmHybridConfig,omitempty"` 960 961 // ThirdPartyOnlyConfig: The configuration for advertisers that use 962 // third-party ad servers only. 963 ThirdPartyOnlyConfig *ThirdPartyOnlyConfig `json:"thirdPartyOnlyConfig,omitempty"` 964 965 // ForceSendFields is a list of field names (e.g. "CmHybridConfig") to 966 // unconditionally include in API requests. By default, fields with 967 // empty or default values are omitted from API requests. However, any 968 // non-pointer, non-interface field appearing in ForceSendFields will be 969 // sent to the server regardless of whether the field is empty or not. 970 // This may be used to include empty fields in Patch requests. 971 ForceSendFields []string `json:"-"` 972 973 // NullFields is a list of field names (e.g. "CmHybridConfig") to 974 // include in API requests with the JSON null value. By default, fields 975 // with empty values are omitted from API requests. However, any field 976 // with an empty value appearing in NullFields will be sent to the 977 // server as null. It is an error if a field in this list has a 978 // non-empty value. This may be used to include null fields in Patch 979 // requests. 980 NullFields []string `json:"-"` 981 } 982 983 func (s *AdvertiserAdServerConfig) MarshalJSON() ([]byte, error) { 984 type NoMethod AdvertiserAdServerConfig 985 raw := NoMethod(*s) 986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 987 } 988 989 // AdvertiserCreativeConfig: Creatives related settings of an 990 // advertiser. 991 type AdvertiserCreativeConfig struct { 992 // DynamicCreativeEnabled: Whether or not the advertiser is enabled for 993 // dynamic creatives. 994 DynamicCreativeEnabled bool `json:"dynamicCreativeEnabled,omitempty"` 995 996 // IasClientId: An ID for configuring campaign monitoring provided by 997 // Integral Ad Service (IAS). The DV360 system will append an IAS 998 // "Campaign Monitor" tag containing this ID to the creative tag. 999 IasClientId int64 `json:"iasClientId,omitempty,string"` 1000 1001 // ObaComplianceDisabled: Whether or not to use DV360's Online 1002 // Behavioral Advertising (OBA) compliance. Starting on February 9, 1003 // 2024, this field will be affected by an update to the Display & Video 1004 // 360 API Terms of Service. See our announcement 1005 // (//ads-developers.googleblog.com/2024/01/update-to-display-video-360-a 1006 // pi-terms.html) for more detail. Warning: Changing OBA settings may 1007 // cause the audit status of your creatives to be reset by some ad 1008 // exchanges, making them ineligible to serve until they are 1009 // re-approved. 1010 ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"` 1011 1012 // VideoCreativeDataSharingAuthorized: By setting this field to `true`, 1013 // you, on behalf of your company, authorize Google to use video 1014 // creatives associated with this Display & Video 360 advertiser to 1015 // provide reporting and features related to the advertiser's television 1016 // campaigns. Applicable only when the advertiser has a CM360 hybrid ad 1017 // server configuration. 1018 VideoCreativeDataSharingAuthorized bool `json:"videoCreativeDataSharingAuthorized,omitempty"` 1019 1020 // ForceSendFields is a list of field names (e.g. 1021 // "DynamicCreativeEnabled") to unconditionally include in API requests. 1022 // By default, fields with empty or default values are omitted from API 1023 // requests. However, any non-pointer, non-interface field appearing in 1024 // ForceSendFields will be sent to the server regardless of whether the 1025 // field is empty or not. This may be used to include empty fields in 1026 // Patch requests. 1027 ForceSendFields []string `json:"-"` 1028 1029 // NullFields is a list of field names (e.g. "DynamicCreativeEnabled") 1030 // to include in API requests with the JSON null value. By default, 1031 // fields with empty values are omitted from API requests. However, any 1032 // field with an empty value appearing in NullFields will be sent to the 1033 // server as null. It is an error if a field in this list has a 1034 // non-empty value. This may be used to include null fields in Patch 1035 // requests. 1036 NullFields []string `json:"-"` 1037 } 1038 1039 func (s *AdvertiserCreativeConfig) MarshalJSON() ([]byte, error) { 1040 type NoMethod AdvertiserCreativeConfig 1041 raw := NoMethod(*s) 1042 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1043 } 1044 1045 // AdvertiserDataAccessConfig: Settings that control how advertiser 1046 // related data may be accessed. 1047 type AdvertiserDataAccessConfig struct { 1048 // SdfConfig: Structured Data Files (SDF) settings for the advertiser. 1049 // If not specified, the SDF settings of the parent partner are used. 1050 SdfConfig *AdvertiserSdfConfig `json:"sdfConfig,omitempty"` 1051 1052 // ForceSendFields is a list of field names (e.g. "SdfConfig") to 1053 // unconditionally include in API requests. By default, fields with 1054 // empty or default values are omitted from API requests. However, any 1055 // non-pointer, non-interface field appearing in ForceSendFields will be 1056 // sent to the server regardless of whether the field is empty or not. 1057 // This may be used to include empty fields in Patch requests. 1058 ForceSendFields []string `json:"-"` 1059 1060 // NullFields is a list of field names (e.g. "SdfConfig") to include in 1061 // API requests with the JSON null value. By default, fields with empty 1062 // values are omitted from API requests. However, any field with an 1063 // empty value appearing in NullFields will be sent to the server as 1064 // null. It is an error if a field in this list has a non-empty value. 1065 // This may be used to include null fields in Patch requests. 1066 NullFields []string `json:"-"` 1067 } 1068 1069 func (s *AdvertiserDataAccessConfig) MarshalJSON() ([]byte, error) { 1070 type NoMethod AdvertiserDataAccessConfig 1071 raw := NoMethod(*s) 1072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1073 } 1074 1075 // AdvertiserGeneralConfig: General settings of an advertiser. 1076 type AdvertiserGeneralConfig struct { 1077 // CurrencyCode: Required. Immutable. Advertiser's currency in ISO 4217 1078 // format. Accepted codes and the currencies they represent are: 1079 // Currency Code : Currency Name * `ARS` : Argentine Peso * `AUD` : 1080 // Australian Dollar * `BRL` : Brazilian Real * `CAD` : Canadian Dollar 1081 // * `CHF` : Swiss Franc * `CLP` : Chilean Peso * `CNY` : Chinese Yuan * 1082 // `COP` : Colombian Peso * `CZK` : Czech Koruna * `DKK` : Danish Krone 1083 // * `EGP` : Egyption Pound * `EUR` : Euro * `GBP` : British Pound * 1084 // `HKD` : Hong Kong Dollar * `HUF` : Hungarian Forint * `IDR` : 1085 // Indonesian Rupiah * `ILS` : Israeli Shekel * `INR` : Indian Rupee * 1086 // `JPY` : Japanese Yen * `KRW` : South Korean Won * `MXN` : Mexican 1087 // Pesos * `MYR` : Malaysian Ringgit * `NGN` : Nigerian Naira * `NOK` : 1088 // Norwegian Krone * `NZD` : New Zealand Dollar * `PEN` : Peruvian Nuevo 1089 // Sol * `PLN` : Polish Zloty * `RON` : New Romanian Leu * `RUB` : 1090 // Russian Ruble * `SEK` : Swedish Krona * `TRY` : Turkish Lira * `TWD` 1091 // : New Taiwan Dollar * `USD` : US Dollar * `ZAR` : South African Rand 1092 CurrencyCode string `json:"currencyCode,omitempty"` 1093 1094 // DomainUrl: Required. The domain URL of the advertiser's primary 1095 // website. The system will send this information to publishers that 1096 // require website URL to associate a campaign with an advertiser. 1097 // Provide a URL with no path or query string, beginning with `http:` or 1098 // `https:`. For example, http://www.example.com 1099 DomainUrl string `json:"domainUrl,omitempty"` 1100 1101 // TimeZone: Output only. The standard TZ database name of the 1102 // advertiser's time zone. For example, `America/New_York`. See more at: 1103 // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones For 1104 // CM360 hybrid advertisers, the time zone is the same as that of the 1105 // associated CM360 account; for third-party only advertisers, the time 1106 // zone is the same as that of the parent partner. 1107 TimeZone string `json:"timeZone,omitempty"` 1108 1109 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 1110 // unconditionally include in API requests. By default, fields with 1111 // empty or default values are omitted from API requests. However, any 1112 // non-pointer, non-interface field appearing in ForceSendFields will be 1113 // sent to the server regardless of whether the field is empty or not. 1114 // This may be used to include empty fields in Patch requests. 1115 ForceSendFields []string `json:"-"` 1116 1117 // NullFields is a list of field names (e.g. "CurrencyCode") to include 1118 // in API requests with the JSON null value. By default, fields with 1119 // empty values are omitted from API requests. However, any field with 1120 // an empty value appearing in NullFields will be sent to the server as 1121 // null. It is an error if a field in this list has a non-empty value. 1122 // This may be used to include null fields in Patch requests. 1123 NullFields []string `json:"-"` 1124 } 1125 1126 func (s *AdvertiserGeneralConfig) MarshalJSON() ([]byte, error) { 1127 type NoMethod AdvertiserGeneralConfig 1128 raw := NoMethod(*s) 1129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1130 } 1131 1132 // AdvertiserSdfConfig: Structured Data Files (SDF) settings of an 1133 // advertiser. 1134 type AdvertiserSdfConfig struct { 1135 // OverridePartnerSdfConfig: Whether or not this advertiser overrides 1136 // the SDF configuration of its parent partner. By default, an 1137 // advertiser inherits the SDF configuration from the parent partner. To 1138 // override the partner configuration, set this field to `true` and 1139 // provide the new configuration in sdfConfig. 1140 OverridePartnerSdfConfig bool `json:"overridePartnerSdfConfig,omitempty"` 1141 1142 // SdfConfig: The SDF configuration for the advertiser. * Required when 1143 // overridePartnerSdfConfig is `true`. * Output only when 1144 // overridePartnerSdfConfig is `false`. 1145 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"` 1146 1147 // ForceSendFields is a list of field names (e.g. 1148 // "OverridePartnerSdfConfig") to unconditionally include in API 1149 // requests. By default, fields with empty or default values are omitted 1150 // from API requests. However, any non-pointer, non-interface field 1151 // appearing in ForceSendFields will be sent to the server regardless of 1152 // whether the field is empty or not. This may be used to include empty 1153 // fields in Patch requests. 1154 ForceSendFields []string `json:"-"` 1155 1156 // NullFields is a list of field names (e.g. "OverridePartnerSdfConfig") 1157 // to include in API requests with the JSON null value. By default, 1158 // fields with empty values are omitted from API requests. However, any 1159 // field with an empty value appearing in NullFields will be sent to the 1160 // server as null. It is an error if a field in this list has a 1161 // non-empty value. This may be used to include null fields in Patch 1162 // requests. 1163 NullFields []string `json:"-"` 1164 } 1165 1166 func (s *AdvertiserSdfConfig) MarshalJSON() ([]byte, error) { 1167 type NoMethod AdvertiserSdfConfig 1168 raw := NoMethod(*s) 1169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1170 } 1171 1172 // AdvertiserTargetingConfig: Targeting settings related to ad serving 1173 // of an advertiser. 1174 type AdvertiserTargetingConfig struct { 1175 // ExemptTvFromViewabilityTargeting: Whether or not connected TV devices 1176 // are exempt from viewability targeting for all video line items under 1177 // the advertiser. 1178 ExemptTvFromViewabilityTargeting bool `json:"exemptTvFromViewabilityTargeting,omitempty"` 1179 1180 // ForceSendFields is a list of field names (e.g. 1181 // "ExemptTvFromViewabilityTargeting") to unconditionally include in API 1182 // requests. By default, fields with empty or default values are omitted 1183 // from API requests. However, any non-pointer, non-interface field 1184 // appearing in ForceSendFields will be sent to the server regardless of 1185 // whether the field is empty or not. This may be used to include empty 1186 // fields in Patch requests. 1187 ForceSendFields []string `json:"-"` 1188 1189 // NullFields is a list of field names (e.g. 1190 // "ExemptTvFromViewabilityTargeting") to include in API requests with 1191 // the JSON null value. By default, fields with empty values are omitted 1192 // from API requests. However, any field with an empty value appearing 1193 // in NullFields will be sent to the server as null. It is an error if a 1194 // field in this list has a non-empty value. This may be used to include 1195 // null fields in Patch requests. 1196 NullFields []string `json:"-"` 1197 } 1198 1199 func (s *AdvertiserTargetingConfig) MarshalJSON() ([]byte, error) { 1200 type NoMethod AdvertiserTargetingConfig 1201 raw := NoMethod(*s) 1202 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1203 } 1204 1205 // AgeRangeAssignedTargetingOptionDetails: Represents a targetable age 1206 // range. This will be populated in the details field of an 1207 // AssignedTargetingOption when targeting_type is 1208 // `TARGETING_TYPE_AGE_RANGE`. 1209 type AgeRangeAssignedTargetingOptionDetails struct { 1210 // AgeRange: Required. The age range of an audience. We only support 1211 // targeting a continuous age range of an audience. Thus, the age range 1212 // represented in this field can be 1) targeted solely, or, 2) part of a 1213 // larger continuous age range. The reach of a continuous age range 1214 // targeting can be expanded by also targeting an audience of an unknown 1215 // age. 1216 // 1217 // Possible values: 1218 // "AGE_RANGE_UNSPECIFIED" - Default value when age range is not 1219 // specified in this version. This enum is a placeholder for default 1220 // value and does not represent a real age range option. 1221 // "AGE_RANGE_18_24" - The age range of the audience is 18 to 24. 1222 // "AGE_RANGE_25_34" - The age range of the audience is 25 to 34. 1223 // "AGE_RANGE_35_44" - The age range of the audience is 35 to 44. 1224 // "AGE_RANGE_45_54" - The age range of the audience is 45 to 54. 1225 // "AGE_RANGE_55_64" - The age range of the audience is 55 to 64. 1226 // "AGE_RANGE_65_PLUS" - The age range of the audience is 65 and up. 1227 // "AGE_RANGE_UNKNOWN" - The age range of the audience is unknown. 1228 AgeRange string `json:"ageRange,omitempty"` 1229 1230 // TargetingOptionId: Required. The targeting_option_id of a 1231 // TargetingOption of type `TARGETING_TYPE_AGE_RANGE`. 1232 TargetingOptionId string `json:"targetingOptionId,omitempty"` 1233 1234 // ForceSendFields is a list of field names (e.g. "AgeRange") to 1235 // unconditionally include in API requests. By default, fields with 1236 // empty or default values are omitted from API requests. However, any 1237 // non-pointer, non-interface field appearing in ForceSendFields will be 1238 // sent to the server regardless of whether the field is empty or not. 1239 // This may be used to include empty fields in Patch requests. 1240 ForceSendFields []string `json:"-"` 1241 1242 // NullFields is a list of field names (e.g. "AgeRange") to include in 1243 // API requests with the JSON null value. By default, fields with empty 1244 // values are omitted from API requests. However, any field with an 1245 // empty value appearing in NullFields will be sent to the server as 1246 // null. It is an error if a field in this list has a non-empty value. 1247 // This may be used to include null fields in Patch requests. 1248 NullFields []string `json:"-"` 1249 } 1250 1251 func (s *AgeRangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1252 type NoMethod AgeRangeAssignedTargetingOptionDetails 1253 raw := NoMethod(*s) 1254 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1255 } 1256 1257 // AgeRangeTargetingOptionDetails: Represents a targetable age range. 1258 // This will be populated in the age_range_details field when 1259 // targeting_type is `TARGETING_TYPE_AGE_RANGE`. 1260 type AgeRangeTargetingOptionDetails struct { 1261 // AgeRange: Output only. The age range of an audience. 1262 // 1263 // Possible values: 1264 // "AGE_RANGE_UNSPECIFIED" - Default value when age range is not 1265 // specified in this version. This enum is a placeholder for default 1266 // value and does not represent a real age range option. 1267 // "AGE_RANGE_18_24" - The age range of the audience is 18 to 24. 1268 // "AGE_RANGE_25_34" - The age range of the audience is 25 to 34. 1269 // "AGE_RANGE_35_44" - The age range of the audience is 35 to 44. 1270 // "AGE_RANGE_45_54" - The age range of the audience is 45 to 54. 1271 // "AGE_RANGE_55_64" - The age range of the audience is 55 to 64. 1272 // "AGE_RANGE_65_PLUS" - The age range of the audience is 65 and up. 1273 // "AGE_RANGE_UNKNOWN" - The age range of the audience is unknown. 1274 AgeRange string `json:"ageRange,omitempty"` 1275 1276 // ForceSendFields is a list of field names (e.g. "AgeRange") to 1277 // unconditionally include in API requests. By default, fields with 1278 // empty or default values are omitted from API requests. However, any 1279 // non-pointer, non-interface field appearing in ForceSendFields will be 1280 // sent to the server regardless of whether the field is empty or not. 1281 // This may be used to include empty fields in Patch requests. 1282 ForceSendFields []string `json:"-"` 1283 1284 // NullFields is a list of field names (e.g. "AgeRange") to include in 1285 // API requests with the JSON null value. By default, fields with empty 1286 // values are omitted from API requests. However, any field with an 1287 // empty value appearing in NullFields will be sent to the server as 1288 // null. It is an error if a field in this list has a non-empty value. 1289 // This may be used to include null fields in Patch requests. 1290 NullFields []string `json:"-"` 1291 } 1292 1293 func (s *AgeRangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1294 type NoMethod AgeRangeTargetingOptionDetails 1295 raw := NoMethod(*s) 1296 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1297 } 1298 1299 // AppAssignedTargetingOptionDetails: Details for assigned app targeting 1300 // option. This will be populated in the details field of an 1301 // AssignedTargetingOption when targeting_type is `TARGETING_TYPE_APP`. 1302 type AppAssignedTargetingOptionDetails struct { 1303 // AppId: Required. The ID of the app. Android's Play store app uses 1304 // bundle ID, for example `com.google.android.gm`. Apple's App store app 1305 // ID uses 9 digit string, for example `422689480`. 1306 AppId string `json:"appId,omitempty"` 1307 1308 // AppPlatform: Indicates the platform of the targeted app. If this 1309 // field is not specified, the app platform will be assumed to be mobile 1310 // (i.e., Android or iOS), and we will derive the appropriate mobile 1311 // platform from the app ID. 1312 // 1313 // Possible values: 1314 // "APP_PLATFORM_UNSPECIFIED" - Default value when app platform is not 1315 // specified in this version. This enum is a placeholder for default 1316 // value and does not represent a real platform option. 1317 // "APP_PLATFORM_IOS" - The app platform is iOS. 1318 // "APP_PLATFORM_ANDROID" - The app platform is Android. 1319 // "APP_PLATFORM_ROKU" - The app platform is Roku. 1320 // "APP_PLATFORM_AMAZON_FIRETV" - The app platform is Amazon FireTV. 1321 // "APP_PLATFORM_PLAYSTATION" - The app platform is Playstation. 1322 // "APP_PLATFORM_APPLE_TV" - The app platform is Apple TV. 1323 // "APP_PLATFORM_XBOX" - The app platform is Xbox. 1324 // "APP_PLATFORM_SAMSUNG_TV" - The app platform is Samsung TV. 1325 // "APP_PLATFORM_ANDROID_TV" - The app platform is Android TV. 1326 // "APP_PLATFORM_GENERIC_CTV" - The app platform is a CTV platform 1327 // that is not explicitly listed elsewhere. 1328 AppPlatform string `json:"appPlatform,omitempty"` 1329 1330 // DisplayName: Output only. The display name of the app. 1331 DisplayName string `json:"displayName,omitempty"` 1332 1333 // Negative: Indicates if this option is being negatively targeted. 1334 Negative bool `json:"negative,omitempty"` 1335 1336 // ForceSendFields is a list of field names (e.g. "AppId") to 1337 // unconditionally include in API requests. By default, fields with 1338 // empty or default values are omitted from API requests. However, any 1339 // non-pointer, non-interface field appearing in ForceSendFields will be 1340 // sent to the server regardless of whether the field is empty or not. 1341 // This may be used to include empty fields in Patch requests. 1342 ForceSendFields []string `json:"-"` 1343 1344 // NullFields is a list of field names (e.g. "AppId") to include in API 1345 // requests with the JSON null value. By default, fields with empty 1346 // values are omitted from API requests. However, any field with an 1347 // empty value appearing in NullFields will be sent to the server as 1348 // null. It is an error if a field in this list has a non-empty value. 1349 // This may be used to include null fields in Patch requests. 1350 NullFields []string `json:"-"` 1351 } 1352 1353 func (s *AppAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1354 type NoMethod AppAssignedTargetingOptionDetails 1355 raw := NoMethod(*s) 1356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1357 } 1358 1359 // AppCategoryAssignedTargetingOptionDetails: Details for assigned app 1360 // category targeting option. This will be populated in the 1361 // app_category_details field of an AssignedTargetingOption when 1362 // targeting_type is `TARGETING_TYPE_APP_CATEGORY`. 1363 type AppCategoryAssignedTargetingOptionDetails struct { 1364 // DisplayName: Output only. The display name of the app category. 1365 DisplayName string `json:"displayName,omitempty"` 1366 1367 // Negative: Indicates if this option is being negatively targeted. 1368 Negative bool `json:"negative,omitempty"` 1369 1370 // TargetingOptionId: Required. The targeting_option_id field when 1371 // targeting_type is `TARGETING_TYPE_APP_CATEGORY`. 1372 TargetingOptionId string `json:"targetingOptionId,omitempty"` 1373 1374 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1375 // unconditionally include in API requests. By default, fields with 1376 // empty or default values are omitted from API requests. However, any 1377 // non-pointer, non-interface field appearing in ForceSendFields will be 1378 // sent to the server regardless of whether the field is empty or not. 1379 // This may be used to include empty fields in Patch requests. 1380 ForceSendFields []string `json:"-"` 1381 1382 // NullFields is a list of field names (e.g. "DisplayName") to include 1383 // in API requests with the JSON null value. By default, fields with 1384 // empty values are omitted from API requests. However, any field with 1385 // an empty value appearing in NullFields will be sent to the server as 1386 // null. It is an error if a field in this list has a non-empty value. 1387 // This may be used to include null fields in Patch requests. 1388 NullFields []string `json:"-"` 1389 } 1390 1391 func (s *AppCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1392 type NoMethod AppCategoryAssignedTargetingOptionDetails 1393 raw := NoMethod(*s) 1394 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1395 } 1396 1397 // AppCategoryTargetingOptionDetails: Represents a targetable collection 1398 // of apps. A collection lets you target dynamic groups of related apps 1399 // that are maintained by the platform, for example `All Apps/Google 1400 // Play/Games`. This will be populated in the app_category_details field 1401 // when targeting_type is `TARGETING_TYPE_APP_CATEGORY`. 1402 type AppCategoryTargetingOptionDetails struct { 1403 // DisplayName: Output only. The name of the app collection. 1404 DisplayName string `json:"displayName,omitempty"` 1405 1406 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1407 // unconditionally include in API requests. By default, fields with 1408 // empty or default values are omitted from API requests. However, any 1409 // non-pointer, non-interface field appearing in ForceSendFields will be 1410 // sent to the server regardless of whether the field is empty or not. 1411 // This may be used to include empty fields in Patch requests. 1412 ForceSendFields []string `json:"-"` 1413 1414 // NullFields is a list of field names (e.g. "DisplayName") to include 1415 // in API requests with the JSON null value. By default, fields with 1416 // empty values are omitted from API requests. However, any field with 1417 // an empty value appearing in NullFields will be sent to the server as 1418 // null. It is an error if a field in this list has a non-empty value. 1419 // This may be used to include null fields in Patch requests. 1420 NullFields []string `json:"-"` 1421 } 1422 1423 func (s *AppCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1424 type NoMethod AppCategoryTargetingOptionDetails 1425 raw := NoMethod(*s) 1426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1427 } 1428 1429 // Asset: A single asset. 1430 type Asset struct { 1431 // Content: The asset content. For uploaded assets, the content is the 1432 // serving path. 1433 Content string `json:"content,omitempty"` 1434 1435 // MediaId: Media ID of the uploaded asset. This is a unique identifier 1436 // for the asset. This ID can be passed to other API calls, e.g. 1437 // CreateCreative to associate the asset with a creative. The Media ID 1438 // space updated on **April 5, 2023**. Update media IDs cached before 1439 // **April 5, 2023** by retrieving the new media ID from associated 1440 // creative resources or re-uploading the asset. 1441 MediaId int64 `json:"mediaId,omitempty,string"` 1442 1443 // ForceSendFields is a list of field names (e.g. "Content") to 1444 // unconditionally include in API requests. By default, fields with 1445 // empty or default values are omitted from API requests. However, any 1446 // non-pointer, non-interface field appearing in ForceSendFields will be 1447 // sent to the server regardless of whether the field is empty or not. 1448 // This may be used to include empty fields in Patch requests. 1449 ForceSendFields []string `json:"-"` 1450 1451 // NullFields is a list of field names (e.g. "Content") 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 1460 func (s *Asset) MarshalJSON() ([]byte, error) { 1461 type NoMethod Asset 1462 raw := NoMethod(*s) 1463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1464 } 1465 1466 // AssetAssociation: Asset association for the creative. 1467 type AssetAssociation struct { 1468 // Asset: The associated asset. 1469 Asset *Asset `json:"asset,omitempty"` 1470 1471 // Role: The role of this asset for the creative. 1472 // 1473 // Possible values: 1474 // "ASSET_ROLE_UNSPECIFIED" - Asset role is not specified or is 1475 // unknown in this version. 1476 // "ASSET_ROLE_MAIN" - The asset is the main asset of the creative. 1477 // "ASSET_ROLE_BACKUP" - The asset is a backup asset of the creative. 1478 // "ASSET_ROLE_POLITE_LOAD" - The asset is a polite load asset of the 1479 // creative. 1480 // "ASSET_ROLE_HEADLINE" - Headline of a native creative. The content 1481 // must be UTF-8 encoded with a length of no more than 25 characters. 1482 // This role is only supported in following creative_type: * 1483 // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * 1484 // `CREATIVE_TYPE_NATIVE_VIDEO` 1485 // "ASSET_ROLE_LONG_HEADLINE" - Long headline of a native creative. 1486 // The content must be UTF-8 encoded with a length of no more than 50 1487 // characters. This role is only supported in following creative_type: * 1488 // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * 1489 // `CREATIVE_TYPE_NATIVE_VIDEO` 1490 // "ASSET_ROLE_BODY" - Body text of a native creative. The content 1491 // must be UTF-8 encoded with a length of no more than 90 characters. 1492 // This role is only supported in following creative_type: * 1493 // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * 1494 // `CREATIVE_TYPE_NATIVE_VIDEO` 1495 // "ASSET_ROLE_LONG_BODY" - Long body text of a native creative. The 1496 // content must be UTF-8 encoded with a length of no more than 150 1497 // characters. This role is only supported in following creative_type: * 1498 // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * 1499 // `CREATIVE_TYPE_NATIVE_VIDEO` 1500 // "ASSET_ROLE_CAPTION_URL" - A short, friendly version of the landing 1501 // page URL to show in the creative. This URL gives people an idea of 1502 // where they'll arrive after they click on the creative. The content 1503 // must be UTF-8 encoded with a length of no more than 30 characters. 1504 // For example, if the landing page URL is 1505 // 'http://www.example.com/page', the caption URL can be 'example.com'. 1506 // The protocol (http://) is optional, but the URL can't contain spaces 1507 // or special characters. This role is only supported in following 1508 // creative_type: * `CREATIVE_TYPE_NATIVE` * 1509 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` 1510 // "ASSET_ROLE_CALL_TO_ACTION" - The text to use on the call-to-action 1511 // button of a native creative. The content must be UTF-8 encoded with a 1512 // length of no more than 15 characters. This role is only supported in 1513 // following creative_type: * `CREATIVE_TYPE_NATIVE` * 1514 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` 1515 // "ASSET_ROLE_ADVERTISER_NAME" - The text that identifies the 1516 // advertiser or brand name. The content must be UTF-8 encoded with a 1517 // length of no more than 25 characters. This role is only supported in 1518 // following creative_type: * `CREATIVE_TYPE_NATIVE` * 1519 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` 1520 // "ASSET_ROLE_PRICE" - The purchase price of your app in the Google 1521 // play store or iOS app store (for example, $5.99). Note that this 1522 // value is not automatically synced with the actual value listed in the 1523 // store. It will always be the one provided when save the creative. The 1524 // content must be UTF-8 encoded with a length of no more than 15 1525 // characters. Assets of this role are read-only. 1526 // "ASSET_ROLE_ANDROID_APP_ID" - The ID of an Android app in the 1527 // Google play store. You can find this ID in the App’s Google Play 1528 // Store URL after ‘id’. For example, in 1529 // https://play.google.com/store/apps/details?id=com.company.appname the 1530 // identifier is com.company.appname. Assets of this role are read-only. 1531 // "ASSET_ROLE_IOS_APP_ID" - The ID of an iOS app in the Apple app 1532 // store. This ID number can be found in the Apple App Store URL as the 1533 // string of numbers directly after "id". For example, in 1534 // https://apps.apple.com/us/app/gmail-email-by-google/id422689480 the 1535 // ID is 422689480. Assets of this role are read-only. 1536 // "ASSET_ROLE_RATING" - The rating of an app in the Google play store 1537 // or iOS app store. Note that this value is not automatically synced 1538 // with the actual rating in the store. It will always be the one 1539 // provided when save the creative. Assets of this role are read-only. 1540 // "ASSET_ROLE_ICON" - The icon of a creative. This role is only 1541 // supported and required in following creative_type: * 1542 // `CREATIVE_TYPE_NATIVE` * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1543 // "ASSET_ROLE_COVER_IMAGE" - The cover image of a native video 1544 // creative. This role is only supported and required in following 1545 // creative_type: * `CREATIVE_TYPE_VIDEO` 1546 Role string `json:"role,omitempty"` 1547 1548 // ForceSendFields is a list of field names (e.g. "Asset") to 1549 // unconditionally include in API requests. By default, fields with 1550 // empty or default values are omitted from API requests. However, any 1551 // non-pointer, non-interface field appearing in ForceSendFields will be 1552 // sent to the server regardless of whether the field is empty or not. 1553 // This may be used to include empty fields in Patch requests. 1554 ForceSendFields []string `json:"-"` 1555 1556 // NullFields is a list of field names (e.g. "Asset") to include in API 1557 // requests with the JSON null value. By default, fields with empty 1558 // values are omitted from API requests. However, any field with an 1559 // empty value appearing in NullFields will be sent to the server as 1560 // null. It is an error if a field in this list has a non-empty value. 1561 // This may be used to include null fields in Patch requests. 1562 NullFields []string `json:"-"` 1563 } 1564 1565 func (s *AssetAssociation) MarshalJSON() ([]byte, error) { 1566 type NoMethod AssetAssociation 1567 raw := NoMethod(*s) 1568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1569 } 1570 1571 // AssignedInventorySource: An assignment between a targetable inventory 1572 // source and an inventory source group. 1573 type AssignedInventorySource struct { 1574 // AssignedInventorySourceId: Output only. The unique ID of the assigned 1575 // inventory source. The ID is only unique within a given inventory 1576 // source group. It may be reused in other contexts. 1577 AssignedInventorySourceId int64 `json:"assignedInventorySourceId,omitempty,string"` 1578 1579 // InventorySourceId: Required. The ID of the inventory source entity 1580 // being targeted. 1581 InventorySourceId string `json:"inventorySourceId,omitempty"` 1582 1583 // Name: Output only. The resource name of the assigned inventory 1584 // source. 1585 Name string `json:"name,omitempty"` 1586 1587 // ServerResponse contains the HTTP response code and headers from the 1588 // server. 1589 googleapi.ServerResponse `json:"-"` 1590 1591 // ForceSendFields is a list of field names (e.g. 1592 // "AssignedInventorySourceId") to unconditionally include in API 1593 // requests. By default, fields with empty or default values are omitted 1594 // from API requests. However, any non-pointer, non-interface field 1595 // appearing in ForceSendFields will be sent to the server regardless of 1596 // whether the field is empty or not. This may be used to include empty 1597 // fields in Patch requests. 1598 ForceSendFields []string `json:"-"` 1599 1600 // NullFields is a list of field names (e.g. 1601 // "AssignedInventorySourceId") to include in API requests with the JSON 1602 // null value. By default, fields with empty values are omitted from API 1603 // requests. However, any field with an empty value appearing in 1604 // NullFields will be sent to the server as null. It is an error if a 1605 // field in this list has a non-empty value. This may be used to include 1606 // null fields in Patch requests. 1607 NullFields []string `json:"-"` 1608 } 1609 1610 func (s *AssignedInventorySource) MarshalJSON() ([]byte, error) { 1611 type NoMethod AssignedInventorySource 1612 raw := NoMethod(*s) 1613 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1614 } 1615 1616 // AssignedLocation: An assignment between a location list and a 1617 // relevant targeting option. 1618 type AssignedLocation struct { 1619 // AssignedLocationId: Output only. The unique ID of the assigned 1620 // location. The ID is only unique within a location list. It may be 1621 // reused in other contexts. 1622 AssignedLocationId int64 `json:"assignedLocationId,omitempty,string"` 1623 1624 // Name: Output only. The resource name of the assigned location. 1625 Name string `json:"name,omitempty"` 1626 1627 // TargetingOptionId: Required. The ID of the targeting option assigned 1628 // to the location list. 1629 TargetingOptionId string `json:"targetingOptionId,omitempty"` 1630 1631 // ServerResponse contains the HTTP response code and headers from the 1632 // server. 1633 googleapi.ServerResponse `json:"-"` 1634 1635 // ForceSendFields is a list of field names (e.g. "AssignedLocationId") 1636 // to unconditionally include in API requests. By default, fields with 1637 // empty or default values are omitted from API requests. However, any 1638 // non-pointer, non-interface field appearing in ForceSendFields will be 1639 // sent to the server regardless of whether the field is empty or not. 1640 // This may be used to include empty fields in Patch requests. 1641 ForceSendFields []string `json:"-"` 1642 1643 // NullFields is a list of field names (e.g. "AssignedLocationId") to 1644 // include in API requests with the JSON null value. By default, fields 1645 // with empty values are omitted from API requests. However, any field 1646 // with an empty value appearing in NullFields will be sent to the 1647 // server as null. It is an error if a field in this list has a 1648 // non-empty value. This may be used to include null fields in Patch 1649 // requests. 1650 NullFields []string `json:"-"` 1651 } 1652 1653 func (s *AssignedLocation) MarshalJSON() ([]byte, error) { 1654 type NoMethod AssignedLocation 1655 raw := NoMethod(*s) 1656 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1657 } 1658 1659 // AssignedTargetingOption: A single assigned targeting option, which 1660 // defines the state of a targeting option for an entity with targeting 1661 // settings. 1662 type AssignedTargetingOption struct { 1663 // AgeRangeDetails: Age range details. This field will be populated when 1664 // the targeting_type is `TARGETING_TYPE_AGE_RANGE`. 1665 AgeRangeDetails *AgeRangeAssignedTargetingOptionDetails `json:"ageRangeDetails,omitempty"` 1666 1667 // AppCategoryDetails: App category details. This field will be 1668 // populated when the targeting_type is `TARGETING_TYPE_APP_CATEGORY`. 1669 AppCategoryDetails *AppCategoryAssignedTargetingOptionDetails `json:"appCategoryDetails,omitempty"` 1670 1671 // AppDetails: App details. This field will be populated when the 1672 // targeting_type is `TARGETING_TYPE_APP`. 1673 AppDetails *AppAssignedTargetingOptionDetails `json:"appDetails,omitempty"` 1674 1675 // AssignedTargetingOptionId: Output only. The unique ID of the assigned 1676 // targeting option. The ID is only unique within a given resource and 1677 // targeting type. It may be reused in other contexts. 1678 AssignedTargetingOptionId string `json:"assignedTargetingOptionId,omitempty"` 1679 1680 // AudienceGroupDetails: Audience targeting details. This field will be 1681 // populated when the targeting_type is `TARGETING_TYPE_AUDIENCE_GROUP`. 1682 // You can only target one audience group option per resource. 1683 AudienceGroupDetails *AudienceGroupAssignedTargetingOptionDetails `json:"audienceGroupDetails,omitempty"` 1684 1685 // AudioContentTypeDetails: Audio content type details. This field will 1686 // be populated when the targeting_type is 1687 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE`. 1688 AudioContentTypeDetails *AudioContentTypeAssignedTargetingOptionDetails `json:"audioContentTypeDetails,omitempty"` 1689 1690 // AuthorizedSellerStatusDetails: Authorized seller status details. This 1691 // field will be populated when the targeting_type is 1692 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. You can only target one 1693 // authorized seller status option per resource. If a resource doesn't 1694 // have an authorized seller status option, all authorized sellers 1695 // indicated as DIRECT or RESELLER in the ads.txt file are targeted by 1696 // default. 1697 AuthorizedSellerStatusDetails *AuthorizedSellerStatusAssignedTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"` 1698 1699 // BrowserDetails: Browser details. This field will be populated when 1700 // the targeting_type is `TARGETING_TYPE_BROWSER`. 1701 BrowserDetails *BrowserAssignedTargetingOptionDetails `json:"browserDetails,omitempty"` 1702 1703 // BusinessChainDetails: Business chain details. This field will be 1704 // populated when the targeting_type is `TARGETING_TYPE_BUSINESS_CHAIN`. 1705 BusinessChainDetails *BusinessChainAssignedTargetingOptionDetails `json:"businessChainDetails,omitempty"` 1706 1707 // CarrierAndIspDetails: Carrier and ISP details. This field will be 1708 // populated when the targeting_type is 1709 // `TARGETING_TYPE_CARRIER_AND_ISP`. 1710 CarrierAndIspDetails *CarrierAndIspAssignedTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"` 1711 1712 // CategoryDetails: Category details. This field will be populated when 1713 // the targeting_type is `TARGETING_TYPE_CATEGORY`. Targeting a category 1714 // will also target its subcategories. If a category is excluded from 1715 // targeting and a subcategory is included, the exclusion will take 1716 // precedence. 1717 CategoryDetails *CategoryAssignedTargetingOptionDetails `json:"categoryDetails,omitempty"` 1718 1719 // ChannelDetails: Channel details. This field will be populated when 1720 // the targeting_type is `TARGETING_TYPE_CHANNEL`. 1721 ChannelDetails *ChannelAssignedTargetingOptionDetails `json:"channelDetails,omitempty"` 1722 1723 // ContentDurationDetails: Content duration details. This field will be 1724 // populated when the targeting_type is 1725 // `TARGETING_TYPE_CONTENT_DURATION`. 1726 ContentDurationDetails *ContentDurationAssignedTargetingOptionDetails `json:"contentDurationDetails,omitempty"` 1727 1728 // ContentGenreDetails: Content genre details. This field will be 1729 // populated when the targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. 1730 ContentGenreDetails *ContentGenreAssignedTargetingOptionDetails `json:"contentGenreDetails,omitempty"` 1731 1732 // ContentInstreamPositionDetails: Content instream position details. 1733 // This field will be populated when the targeting_type is 1734 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 1735 ContentInstreamPositionDetails *ContentInstreamPositionAssignedTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"` 1736 1737 // ContentOutstreamPositionDetails: Content outstream position details. 1738 // This field will be populated when the targeting_type is 1739 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 1740 ContentOutstreamPositionDetails *ContentOutstreamPositionAssignedTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"` 1741 1742 // ContentStreamTypeDetails: Content duration details. This field will 1743 // be populated when the TargetingType is 1744 // `TARGETING_TYPE_CONTENT_STREAM_TYPE`. 1745 ContentStreamTypeDetails *ContentStreamTypeAssignedTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"` 1746 1747 // DayAndTimeDetails: Day and time details. This field will be populated 1748 // when the targeting_type is `TARGETING_TYPE_DAY_AND_TIME`. 1749 DayAndTimeDetails *DayAndTimeAssignedTargetingOptionDetails `json:"dayAndTimeDetails,omitempty"` 1750 1751 // DeviceMakeModelDetails: Device make and model details. This field 1752 // will be populated when the targeting_type is 1753 // `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 1754 DeviceMakeModelDetails *DeviceMakeModelAssignedTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"` 1755 1756 // DeviceTypeDetails: Device Type details. This field will be populated 1757 // when the targeting_type is `TARGETING_TYPE_DEVICE_TYPE`. 1758 DeviceTypeDetails *DeviceTypeAssignedTargetingOptionDetails `json:"deviceTypeDetails,omitempty"` 1759 1760 // DigitalContentLabelExclusionDetails: Digital content label details. 1761 // This field will be populated when the targeting_type is 1762 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION`. Digital content 1763 // labels are targeting exclusions. Advertiser level digital content 1764 // label exclusions, if set, are always applied in serving (even though 1765 // they aren't visible in resource settings). Resource settings can 1766 // exclude content labels in addition to advertiser exclusions, but 1767 // can't override them. A line item won't serve if all the digital 1768 // content labels are excluded. 1769 DigitalContentLabelExclusionDetails *DigitalContentLabelAssignedTargetingOptionDetails `json:"digitalContentLabelExclusionDetails,omitempty"` 1770 1771 // EnvironmentDetails: Environment details. This field will be populated 1772 // when the targeting_type is `TARGETING_TYPE_ENVIRONMENT`. 1773 EnvironmentDetails *EnvironmentAssignedTargetingOptionDetails `json:"environmentDetails,omitempty"` 1774 1775 // ExchangeDetails: Exchange details. This field will be populated when 1776 // the targeting_type is `TARGETING_TYPE_EXCHANGE`. 1777 ExchangeDetails *ExchangeAssignedTargetingOptionDetails `json:"exchangeDetails,omitempty"` 1778 1779 // GenderDetails: Gender details. This field will be populated when the 1780 // targeting_type is `TARGETING_TYPE_GENDER`. 1781 GenderDetails *GenderAssignedTargetingOptionDetails `json:"genderDetails,omitempty"` 1782 1783 // GeoRegionDetails: Geographic region details. This field will be 1784 // populated when the targeting_type is `TARGETING_TYPE_GEO_REGION`. 1785 GeoRegionDetails *GeoRegionAssignedTargetingOptionDetails `json:"geoRegionDetails,omitempty"` 1786 1787 // HouseholdIncomeDetails: Household income details. This field will be 1788 // populated when the targeting_type is 1789 // `TARGETING_TYPE_HOUSEHOLD_INCOME`. 1790 HouseholdIncomeDetails *HouseholdIncomeAssignedTargetingOptionDetails `json:"householdIncomeDetails,omitempty"` 1791 1792 // Inheritance: Output only. The inheritance status of the assigned 1793 // targeting option. 1794 // 1795 // Possible values: 1796 // "INHERITANCE_UNSPECIFIED" - The inheritance is unspecified or 1797 // unknown. 1798 // "NOT_INHERITED" - The assigned targeting option is not inherited 1799 // from higher level entity. 1800 // "INHERITED_FROM_PARTNER" - The assigned targeting option is 1801 // inherited from partner targeting settings. 1802 // "INHERITED_FROM_ADVERTISER" - The assigned targeting option is 1803 // inherited from advertiser targeting settings. 1804 Inheritance string `json:"inheritance,omitempty"` 1805 1806 // InventorySourceDetails: Inventory source details. This field will be 1807 // populated when the targeting_type is 1808 // `TARGETING_TYPE_INVENTORY_SOURCE`. 1809 InventorySourceDetails *InventorySourceAssignedTargetingOptionDetails `json:"inventorySourceDetails,omitempty"` 1810 1811 // InventorySourceGroupDetails: Inventory source group details. This 1812 // field will be populated when the targeting_type is 1813 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP`. 1814 InventorySourceGroupDetails *InventorySourceGroupAssignedTargetingOptionDetails `json:"inventorySourceGroupDetails,omitempty"` 1815 1816 // KeywordDetails: Keyword details. This field will be populated when 1817 // the targeting_type is `TARGETING_TYPE_KEYWORD`. A maximum of 5000 1818 // direct negative keywords can be assigned to a resource. No limit on 1819 // number of positive keywords that can be assigned. 1820 KeywordDetails *KeywordAssignedTargetingOptionDetails `json:"keywordDetails,omitempty"` 1821 1822 // LanguageDetails: Language details. This field will be populated when 1823 // the targeting_type is `TARGETING_TYPE_LANGUAGE`. 1824 LanguageDetails *LanguageAssignedTargetingOptionDetails `json:"languageDetails,omitempty"` 1825 1826 // Name: Output only. The resource name for this assigned targeting 1827 // option. 1828 Name string `json:"name,omitempty"` 1829 1830 // NativeContentPositionDetails: Native content position details. This 1831 // field will be populated when the targeting_type is 1832 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION`. 1833 NativeContentPositionDetails *NativeContentPositionAssignedTargetingOptionDetails `json:"nativeContentPositionDetails,omitempty"` 1834 1835 // NegativeKeywordListDetails: Keyword details. This field will be 1836 // populated when the targeting_type is 1837 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST`. A maximum of 4 negative 1838 // keyword lists can be assigned to a resource. 1839 NegativeKeywordListDetails *NegativeKeywordListAssignedTargetingOptionDetails `json:"negativeKeywordListDetails,omitempty"` 1840 1841 // OmidDetails: Open Measurement enabled inventory details. This field 1842 // will be populated when the targeting_type is `TARGETING_TYPE_OMID`. 1843 OmidDetails *OmidAssignedTargetingOptionDetails `json:"omidDetails,omitempty"` 1844 1845 // OnScreenPositionDetails: On screen position details. This field will 1846 // be populated when the targeting_type is 1847 // `TARGETING_TYPE_ON_SCREEN_POSITION`. 1848 OnScreenPositionDetails *OnScreenPositionAssignedTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"` 1849 1850 // OperatingSystemDetails: Operating system details. This field will be 1851 // populated when the targeting_type is 1852 // `TARGETING_TYPE_OPERATING_SYSTEM`. 1853 OperatingSystemDetails *OperatingSystemAssignedTargetingOptionDetails `json:"operatingSystemDetails,omitempty"` 1854 1855 // ParentalStatusDetails: Parental status details. This field will be 1856 // populated when the targeting_type is 1857 // `TARGETING_TYPE_PARENTAL_STATUS`. 1858 ParentalStatusDetails *ParentalStatusAssignedTargetingOptionDetails `json:"parentalStatusDetails,omitempty"` 1859 1860 // PoiDetails: POI details. This field will be populated when the 1861 // targeting_type is `TARGETING_TYPE_POI`. 1862 PoiDetails *PoiAssignedTargetingOptionDetails `json:"poiDetails,omitempty"` 1863 1864 // ProximityLocationListDetails: Proximity location list details. This 1865 // field will be populated when the targeting_type is 1866 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST`. 1867 ProximityLocationListDetails *ProximityLocationListAssignedTargetingOptionDetails `json:"proximityLocationListDetails,omitempty"` 1868 1869 // RegionalLocationListDetails: Regional location list details. This 1870 // field will be populated when the targeting_type is 1871 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST`. 1872 RegionalLocationListDetails *RegionalLocationListAssignedTargetingOptionDetails `json:"regionalLocationListDetails,omitempty"` 1873 1874 // SensitiveCategoryExclusionDetails: Sensitive category details. This 1875 // field will be populated when the targeting_type is 1876 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. Sensitive categories 1877 // are targeting exclusions. Advertiser level sensitive category 1878 // exclusions, if set, are always applied in serving (even though they 1879 // aren't visible in resource settings). Resource settings can exclude 1880 // sensitive categories in addition to advertiser exclusions, but can't 1881 // override them. 1882 SensitiveCategoryExclusionDetails *SensitiveCategoryAssignedTargetingOptionDetails `json:"sensitiveCategoryExclusionDetails,omitempty"` 1883 1884 // SubExchangeDetails: Sub-exchange details. This field will be 1885 // populated when the targeting_type is `TARGETING_TYPE_SUB_EXCHANGE`. 1886 SubExchangeDetails *SubExchangeAssignedTargetingOptionDetails `json:"subExchangeDetails,omitempty"` 1887 1888 // TargetingType: Output only. Identifies the type of this assigned 1889 // targeting option. 1890 // 1891 // Possible values: 1892 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 1893 // specified or is unknown in this version. 1894 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 1895 // related websites or apps). 1896 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 1897 // example, education or puzzle games). 1898 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 1899 // Birds). 1900 // "TARGETING_TYPE_URL" - Target a specific url (for example, 1901 // quora.com). 1902 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 1903 // period on a specific day. 1904 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 1905 // (for example, 18-24). 1906 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 1907 // specified regions on a regional location list. 1908 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 1909 // specified points of interest on a proximity location list. 1910 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 1911 // example, female or male). 1912 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 1913 // size for video ads. 1914 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 1915 // content for video ads. 1916 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 1917 // parental status (for example, parent or not a parent). 1918 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 1919 // ads in a specific content instream position (for example, pre-roll, 1920 // mid-roll, or post-roll). 1921 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 1922 // specific content outstream position. 1923 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 1924 // (for example, tablet or connected TV). 1925 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 1926 // groups of audiences. Singleton field, at most one can exist on a 1927 // single Lineitem at a time. 1928 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 1929 // example, Chrome). 1930 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 1931 // household income range (for example, top 10%). 1932 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 1933 // screen position. 1934 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 1935 // third party verification (for example, IAS or DoubleVerify). 1936 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 1937 // by specific digital content label ratings (for example, DL-MA: 1938 // suitable only for mature audiences). 1939 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 1940 // content by sensitive categories (for example, adult). 1941 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 1942 // (for example, web or app). 1943 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 1944 // carrier or internet service provider (ISP) (for example, Comcast or 1945 // Orange). 1946 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 1947 // operating system (for example, macOS). 1948 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 1949 // device make or model (for example, Roku or Samsung). 1950 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 1951 // example, dog or retriever). 1952 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 1953 // negative keyword list. 1954 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 1955 // (for example, 80% viewable). 1956 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 1957 // category (for example, arts & entertainment). 1958 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 1959 // specific deals and auction packages. 1960 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 1961 // example, English or Japanese). 1962 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 1963 // authorized sellers. If no targeting option of this type is assigned, 1964 // the resource uses the "Authorized Direct Sellers and Resellers" 1965 // option by default. 1966 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 1967 // location (for example, a city or state). 1968 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 1969 // a group of deals and auction packages. 1970 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 1971 // exchanges. 1972 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 1973 // sub-exchanges. 1974 // "TARGETING_TYPE_POI" - Target ads around a specific point of 1975 // interest, such as a notable building, a street address, or 1976 // latitude/longitude coordinates. 1977 // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a 1978 // business chain within a specific geo region. 1979 // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video 1980 // content duration. 1981 // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific 1982 // video content stream type. 1983 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific 1984 // native content position. 1985 // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled 1986 // inventory. 1987 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific 1988 // audio content type. 1989 // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content 1990 // genre. 1991 TargetingType string `json:"targetingType,omitempty"` 1992 1993 // ThirdPartyVerifierDetails: Third party verification details. This 1994 // field will be populated when the targeting_type is 1995 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER`. 1996 ThirdPartyVerifierDetails *ThirdPartyVerifierAssignedTargetingOptionDetails `json:"thirdPartyVerifierDetails,omitempty"` 1997 1998 // UrlDetails: URL details. This field will be populated when the 1999 // targeting_type is `TARGETING_TYPE_URL`. 2000 UrlDetails *UrlAssignedTargetingOptionDetails `json:"urlDetails,omitempty"` 2001 2002 // UserRewardedContentDetails: User rewarded content details. This field 2003 // will be populated when the targeting_type is 2004 // `TARGETING_TYPE_USER_REWARDED_CONTENT`. 2005 UserRewardedContentDetails *UserRewardedContentAssignedTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"` 2006 2007 // VideoPlayerSizeDetails: Video player size details. This field will be 2008 // populated when the targeting_type is 2009 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 2010 VideoPlayerSizeDetails *VideoPlayerSizeAssignedTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"` 2011 2012 // ViewabilityDetails: Viewability details. This field will be populated 2013 // when the targeting_type is `TARGETING_TYPE_VIEWABILITY`. You can only 2014 // target one viewability option per resource. 2015 ViewabilityDetails *ViewabilityAssignedTargetingOptionDetails `json:"viewabilityDetails,omitempty"` 2016 2017 // ServerResponse contains the HTTP response code and headers from the 2018 // server. 2019 googleapi.ServerResponse `json:"-"` 2020 2021 // ForceSendFields is a list of field names (e.g. "AgeRangeDetails") to 2022 // unconditionally include in API requests. By default, fields with 2023 // empty or default values are omitted from API requests. However, any 2024 // non-pointer, non-interface field appearing in ForceSendFields will be 2025 // sent to the server regardless of whether the field is empty or not. 2026 // This may be used to include empty fields in Patch requests. 2027 ForceSendFields []string `json:"-"` 2028 2029 // NullFields is a list of field names (e.g. "AgeRangeDetails") to 2030 // include in API requests with the JSON null value. By default, fields 2031 // with empty values are omitted from API requests. However, any field 2032 // with an empty value appearing in NullFields will be sent to the 2033 // server as null. It is an error if a field in this list has a 2034 // non-empty value. This may be used to include null fields in Patch 2035 // requests. 2036 NullFields []string `json:"-"` 2037 } 2038 2039 func (s *AssignedTargetingOption) MarshalJSON() ([]byte, error) { 2040 type NoMethod AssignedTargetingOption 2041 raw := NoMethod(*s) 2042 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2043 } 2044 2045 // AssignedUserRole: A single assigned user role, which defines a user's 2046 // authorized interaction with a specified partner or advertiser. 2047 type AssignedUserRole struct { 2048 // AdvertiserId: The ID of the advertiser that the assigend user role 2049 // applies to. 2050 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 2051 2052 // AssignedUserRoleId: Output only. The ID of the assigned user role. 2053 AssignedUserRoleId string `json:"assignedUserRoleId,omitempty"` 2054 2055 // PartnerId: The ID of the partner that the assigned user role applies 2056 // to. 2057 PartnerId int64 `json:"partnerId,omitempty,string"` 2058 2059 // UserRole: Required. The user role to assign to a user for the entity. 2060 // 2061 // Possible values: 2062 // "USER_ROLE_UNSPECIFIED" - Default value when the user role is not 2063 // specified or is unknown in this version. 2064 // "ADMIN" - The user can manage campaigns, creatives, insertion 2065 // orders, line items, and reports for the entity. They can view and 2066 // edit billing information, create or modify users, and enable or 2067 // disable exchanges. This role can only be assigned for a partner 2068 // entity. 2069 // "ADMIN_PARTNER_CLIENT" - The user can manage campaigns, creatives, 2070 // insertion orders, line items, and reports for the entity. They can 2071 // create and modify other `ADMIN_PARTNER_CLIENT` users and view billing 2072 // information. They cannot view revenue models, markups, or any other 2073 // reseller-sensitive fields. This role can only be assigned for a 2074 // partner entity. 2075 // "STANDARD" - The user can manage campaigns, creatives, insertion 2076 // orders, line items, and reports for the entity. They cannot create 2077 // and modify users or view billing information. 2078 // "STANDARD_PLANNER" - The user can view all campaigns, creatives, 2079 // insertion orders, line items, and reports for the entity, including 2080 // all cost data. They can create and modify planning-related features, 2081 // including plans and inventory. 2082 // "STANDARD_PLANNER_LIMITED" - The user can view all campaigns, 2083 // creatives, insertion orders, line items, and reports for the entity. 2084 // They can create or modify planning-related features, including plans 2085 // and inventory. They have no access to cost data and cannot start, 2086 // accept, or negotiate deals. 2087 // "STANDARD_PARTNER_CLIENT" - The user can manage campaigns, 2088 // creatives, insertion orders, line items, and reports for the entity. 2089 // They cannot create or modify other users or view billing information. 2090 // They cannot view revenue models, markups, or any other 2091 // reseller-sensitive fields. This role can only be assigned for an 2092 // advertiser entity. 2093 // "READ_ONLY" - The user can only build reports and view data for the 2094 // entity. 2095 // "REPORTING_ONLY" - The user can only create and manage reports. 2096 // "LIMITED_REPORTING_ONLY" - The user can only create and manage the 2097 // following client-safe reports: General, Audience Performance, 2098 // Cross-Partner, Keyword, Order ID, Category, and Third-Party Data 2099 // Provider. 2100 // "CREATIVE" - The user can view media plan information they need to 2101 // collaborate, but can't view cost-related data or Marketplace. 2102 // "CREATIVE_ADMIN" - The user can view media plan information they 2103 // need to collaborate, but can't view cost-related data or Marketplace. 2104 // In addition, they can add other creative admins or creative users to 2105 // the entity. 2106 UserRole string `json:"userRole,omitempty"` 2107 2108 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 2109 // unconditionally include in API requests. By default, fields with 2110 // empty or default values are omitted from API requests. However, any 2111 // non-pointer, non-interface field appearing in ForceSendFields will be 2112 // sent to the server regardless of whether the field is empty or not. 2113 // This may be used to include empty fields in Patch requests. 2114 ForceSendFields []string `json:"-"` 2115 2116 // NullFields is a list of field names (e.g. "AdvertiserId") to include 2117 // in API requests with the JSON null value. By default, fields with 2118 // empty values are omitted from API requests. However, any field with 2119 // an empty value appearing in NullFields will be sent to the server as 2120 // null. It is an error if a field in this list has a non-empty value. 2121 // This may be used to include null fields in Patch requests. 2122 NullFields []string `json:"-"` 2123 } 2124 2125 func (s *AssignedUserRole) MarshalJSON() ([]byte, error) { 2126 type NoMethod AssignedUserRole 2127 raw := NoMethod(*s) 2128 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2129 } 2130 2131 // AudienceGroupAssignedTargetingOptionDetails: Assigned audience group 2132 // targeting option details. This will be populated in the details field 2133 // of an AssignedTargetingOption when targeting_type is 2134 // `TARGETING_TYPE_AUDIENCE_GROUP`. The relation between each group is 2135 // UNION, except for excluded_first_and_third_party_audience_group and 2136 // excluded_google_audience_group, of which COMPLEMENT is used as an 2137 // INTERSECTION with other groups. 2138 type AudienceGroupAssignedTargetingOptionDetails struct { 2139 // ExcludedFirstAndThirdPartyAudienceGroup: The first and third party 2140 // audience ids and recencies of the excluded first and third party 2141 // audience group. Used for negative targeting. The COMPLEMENT of the 2142 // UNION of this group and other excluded audience groups is used as an 2143 // INTERSECTION to any positive audience targeting. All items are 2144 // logically ‘OR’ of each other. 2145 ExcludedFirstAndThirdPartyAudienceGroup *FirstAndThirdPartyAudienceGroup `json:"excludedFirstAndThirdPartyAudienceGroup,omitempty"` 2146 2147 // ExcludedGoogleAudienceGroup: The Google audience ids of the excluded 2148 // Google audience group. Used for negative targeting. The COMPLEMENT of 2149 // the UNION of this group and other excluded audience groups is used as 2150 // an INTERSECTION to any positive audience targeting. Only contains 2151 // Affinity, In-market and Installed-apps type Google audiences. All 2152 // items are logically ‘OR’ of each other. 2153 ExcludedGoogleAudienceGroup *GoogleAudienceGroup `json:"excludedGoogleAudienceGroup,omitempty"` 2154 2155 // IncludedCombinedAudienceGroup: The combined audience ids of the 2156 // included combined audience group. Contains combined audience ids 2157 // only. 2158 IncludedCombinedAudienceGroup *CombinedAudienceGroup `json:"includedCombinedAudienceGroup,omitempty"` 2159 2160 // IncludedCustomListGroup: The custom list ids of the included custom 2161 // list group. Contains custom list ids only. 2162 IncludedCustomListGroup *CustomListGroup `json:"includedCustomListGroup,omitempty"` 2163 2164 // IncludedFirstAndThirdPartyAudienceGroups: The first and third party 2165 // audience ids and recencies of included first and third party audience 2166 // groups. Each first and third party audience group contains first and 2167 // third party audience ids only. The relation between each first and 2168 // third party audience group is INTERSECTION, and the result is 2169 // UNION'ed with other audience groups. Repeated groups with same 2170 // settings will be ignored. 2171 IncludedFirstAndThirdPartyAudienceGroups []*FirstAndThirdPartyAudienceGroup `json:"includedFirstAndThirdPartyAudienceGroups,omitempty"` 2172 2173 // IncludedGoogleAudienceGroup: The Google audience ids of the included 2174 // Google audience group. Contains Google audience ids only. 2175 IncludedGoogleAudienceGroup *GoogleAudienceGroup `json:"includedGoogleAudienceGroup,omitempty"` 2176 2177 // ForceSendFields is a list of field names (e.g. 2178 // "ExcludedFirstAndThirdPartyAudienceGroup") to unconditionally include 2179 // in API requests. By default, fields with empty or default values are 2180 // omitted from API requests. However, any non-pointer, non-interface 2181 // field appearing in ForceSendFields will be sent to the server 2182 // regardless of whether the field is empty or not. This may be used to 2183 // include empty fields in Patch requests. 2184 ForceSendFields []string `json:"-"` 2185 2186 // NullFields is a list of field names (e.g. 2187 // "ExcludedFirstAndThirdPartyAudienceGroup") to include in API requests 2188 // with the JSON null value. By default, fields with empty values are 2189 // omitted from API requests. However, any field with an empty value 2190 // appearing in NullFields will be sent to the server as null. It is an 2191 // error if a field in this list has a non-empty value. This may be used 2192 // to include null fields in Patch requests. 2193 NullFields []string `json:"-"` 2194 } 2195 2196 func (s *AudienceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2197 type NoMethod AudienceGroupAssignedTargetingOptionDetails 2198 raw := NoMethod(*s) 2199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2200 } 2201 2202 // AudioContentTypeAssignedTargetingOptionDetails: Details for audio 2203 // content type assigned targeting option. This will be populated in the 2204 // audio_content_type_details field when targeting_type is 2205 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE`. Explicitly targeting all options 2206 // is not supported. Remove all audio content type targeting options to 2207 // achieve this effect. 2208 type AudioContentTypeAssignedTargetingOptionDetails struct { 2209 // AudioContentType: Required. The audio content type. 2210 // 2211 // Possible values: 2212 // "AUDIO_CONTENT_TYPE_UNSPECIFIED" - Audio content type is not 2213 // specified in this version. This enum is a place holder for a default 2214 // value and does not represent a real content stream type. 2215 // "AUDIO_CONTENT_TYPE_UNKNOWN" - The audio content type is unknown. 2216 // "AUDIO_CONTENT_TYPE_MUSIC" - The audio content type is music. 2217 // "AUDIO_CONTENT_TYPE_BROADCAST" - The audio content type is 2218 // broadcast. 2219 // "AUDIO_CONTENT_TYPE_PODCAST" - The audio content type is podcast. 2220 AudioContentType string `json:"audioContentType,omitempty"` 2221 2222 // TargetingOptionId: Required. The targeting_option_id field when 2223 // targeting_type is `TARGETING_TYPE_AUDIO_CONTENT_TYPE`. 2224 TargetingOptionId string `json:"targetingOptionId,omitempty"` 2225 2226 // ForceSendFields is a list of field names (e.g. "AudioContentType") to 2227 // unconditionally include in API requests. By default, fields with 2228 // empty or default values are omitted from API requests. However, any 2229 // non-pointer, non-interface field appearing in ForceSendFields will be 2230 // sent to the server regardless of whether the field is empty or not. 2231 // This may be used to include empty fields in Patch requests. 2232 ForceSendFields []string `json:"-"` 2233 2234 // NullFields is a list of field names (e.g. "AudioContentType") to 2235 // include in API requests with the JSON null value. By default, fields 2236 // with empty values are omitted from API requests. However, any field 2237 // with an empty value appearing in NullFields will be sent to the 2238 // server as null. It is an error if a field in this list has a 2239 // non-empty value. This may be used to include null fields in Patch 2240 // requests. 2241 NullFields []string `json:"-"` 2242 } 2243 2244 func (s *AudioContentTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2245 type NoMethod AudioContentTypeAssignedTargetingOptionDetails 2246 raw := NoMethod(*s) 2247 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2248 } 2249 2250 // AudioContentTypeTargetingOptionDetails: Represents a targetable audio 2251 // content type. This will be populated in the 2252 // audio_content_type_details field when targeting_type is 2253 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE`. 2254 type AudioContentTypeTargetingOptionDetails struct { 2255 // AudioContentType: Output only. The audio content type. 2256 // 2257 // Possible values: 2258 // "AUDIO_CONTENT_TYPE_UNSPECIFIED" - Audio content type is not 2259 // specified in this version. This enum is a place holder for a default 2260 // value and does not represent a real content stream type. 2261 // "AUDIO_CONTENT_TYPE_UNKNOWN" - The audio content type is unknown. 2262 // "AUDIO_CONTENT_TYPE_MUSIC" - The audio content type is music. 2263 // "AUDIO_CONTENT_TYPE_BROADCAST" - The audio content type is 2264 // broadcast. 2265 // "AUDIO_CONTENT_TYPE_PODCAST" - The audio content type is podcast. 2266 AudioContentType string `json:"audioContentType,omitempty"` 2267 2268 // ForceSendFields is a list of field names (e.g. "AudioContentType") to 2269 // unconditionally include in API requests. By default, fields with 2270 // empty or default values are omitted from API requests. However, any 2271 // non-pointer, non-interface field appearing in ForceSendFields will be 2272 // sent to the server regardless of whether the field is empty or not. 2273 // This may be used to include empty fields in Patch requests. 2274 ForceSendFields []string `json:"-"` 2275 2276 // NullFields is a list of field names (e.g. "AudioContentType") to 2277 // include in API requests with the JSON null value. By default, fields 2278 // with empty values are omitted from API requests. However, any field 2279 // with an empty value appearing in NullFields will be sent to the 2280 // server as null. It is an error if a field in this list has a 2281 // non-empty value. This may be used to include null fields in Patch 2282 // requests. 2283 NullFields []string `json:"-"` 2284 } 2285 2286 func (s *AudioContentTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2287 type NoMethod AudioContentTypeTargetingOptionDetails 2288 raw := NoMethod(*s) 2289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2290 } 2291 2292 // AudioVideoOffset: The length an audio or a video has been played. 2293 type AudioVideoOffset struct { 2294 // Percentage: The offset in percentage of the audio or video duration. 2295 Percentage int64 `json:"percentage,omitempty,string"` 2296 2297 // Seconds: The offset in seconds from the start of the audio or video. 2298 Seconds int64 `json:"seconds,omitempty,string"` 2299 2300 // ForceSendFields is a list of field names (e.g. "Percentage") to 2301 // unconditionally include in API requests. By default, fields with 2302 // empty or default values are omitted from API requests. However, any 2303 // non-pointer, non-interface field appearing in ForceSendFields will be 2304 // sent to the server regardless of whether the field is empty or not. 2305 // This may be used to include empty fields in Patch requests. 2306 ForceSendFields []string `json:"-"` 2307 2308 // NullFields is a list of field names (e.g. "Percentage") to include in 2309 // API requests with the JSON null value. By default, fields with empty 2310 // values are omitted from API requests. However, any field with an 2311 // empty value appearing in NullFields will be sent to the server as 2312 // null. It is an error if a field in this list has a non-empty value. 2313 // This may be used to include null fields in Patch requests. 2314 NullFields []string `json:"-"` 2315 } 2316 2317 func (s *AudioVideoOffset) MarshalJSON() ([]byte, error) { 2318 type NoMethod AudioVideoOffset 2319 raw := NoMethod(*s) 2320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2321 } 2322 2323 // AuditAdvertiserResponse: Response message for 2324 // AdvertiserService.AuditAdvertiser. 2325 type AuditAdvertiserResponse struct { 2326 // AdGroupCriteriaCount: The number of individual targeting options from 2327 // the following targeting types that are assigned to a line item under 2328 // this advertiser. These individual targeting options count towards the 2329 // limit of 4500000 ad group targeting options per advertiser. 2330 // Qualifying Targeting types: * Channels, URLs, apps, and collections * 2331 // Demographic * Google Audiences, including Affinity, Custom Affinity, 2332 // and In-market audiences * Inventory source * Keyword * Mobile app 2333 // category * User lists * Video targeting * Viewability 2334 AdGroupCriteriaCount int64 `json:"adGroupCriteriaCount,omitempty,string"` 2335 2336 // CampaignCriteriaCount: The number of individual targeting options 2337 // from the following targeting types that are assigned to a line item 2338 // under this advertiser. These individual targeting options count 2339 // towards the limit of 900000 campaign targeting options per 2340 // advertiser. Qualifying Targeting types: * Position * Browser * 2341 // Connection speed * Day and time * Device and operating system * 2342 // Digital content label * Sensitive categories * Environment * 2343 // Geography, including business chains and proximity * ISP * Language * 2344 // Third-party verification 2345 CampaignCriteriaCount int64 `json:"campaignCriteriaCount,omitempty,string"` 2346 2347 // ChannelsCount: The number of channels created under this advertiser. 2348 // These channels count towards the limit of 1000 channels per 2349 // advertiser. 2350 ChannelsCount int64 `json:"channelsCount,omitempty,string"` 2351 2352 // NegativeKeywordListsCount: The number of negative keyword lists 2353 // created under this advertiser. These negative keyword lists count 2354 // towards the limit of 20 negative keyword lists per advertiser. 2355 NegativeKeywordListsCount int64 `json:"negativeKeywordListsCount,omitempty,string"` 2356 2357 // NegativelyTargetedChannelsCount: The number of negatively targeted 2358 // channels created under this advertiser. These negatively targeted 2359 // channels count towards the limit of 5 negatively targeted channels 2360 // per advertiser. 2361 NegativelyTargetedChannelsCount int64 `json:"negativelyTargetedChannelsCount,omitempty,string"` 2362 2363 // UsedCampaignsCount: The number of ACTIVE and PAUSED campaigns under 2364 // this advertiser. These campaigns count towards the limit of 9999 2365 // campaigns per advertiser. 2366 UsedCampaignsCount int64 `json:"usedCampaignsCount,omitempty,string"` 2367 2368 // UsedInsertionOrdersCount: The number of ACTIVE, PAUSED and DRAFT 2369 // insertion orders under this advertiser. These insertion orders count 2370 // towards the limit of 9999 insertion orders per advertiser. 2371 UsedInsertionOrdersCount int64 `json:"usedInsertionOrdersCount,omitempty,string"` 2372 2373 // UsedLineItemsCount: The number of ACTIVE, PAUSED, and DRAFT line 2374 // items under this advertiser. These line items count towards the limit 2375 // of 9999 line items per advertiser. 2376 UsedLineItemsCount int64 `json:"usedLineItemsCount,omitempty,string"` 2377 2378 // ServerResponse contains the HTTP response code and headers from the 2379 // server. 2380 googleapi.ServerResponse `json:"-"` 2381 2382 // ForceSendFields is a list of field names (e.g. 2383 // "AdGroupCriteriaCount") to unconditionally include in API requests. 2384 // By default, fields with empty or default values are omitted from API 2385 // requests. However, any non-pointer, non-interface field appearing in 2386 // ForceSendFields will be sent to the server regardless of whether the 2387 // field is empty or not. This may be used to include empty fields in 2388 // Patch requests. 2389 ForceSendFields []string `json:"-"` 2390 2391 // NullFields is a list of field names (e.g. "AdGroupCriteriaCount") to 2392 // include in API requests with the JSON null value. By default, fields 2393 // with empty values are omitted from API requests. However, any field 2394 // with an empty value appearing in NullFields will be sent to the 2395 // server as null. It is an error if a field in this list has a 2396 // non-empty value. This may be used to include null fields in Patch 2397 // requests. 2398 NullFields []string `json:"-"` 2399 } 2400 2401 func (s *AuditAdvertiserResponse) MarshalJSON() ([]byte, error) { 2402 type NoMethod AuditAdvertiserResponse 2403 raw := NoMethod(*s) 2404 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2405 } 2406 2407 // AuthorizedSellerStatusAssignedTargetingOptionDetails: Represents an 2408 // assigned authorized seller status. This will be populated in the 2409 // details field of an AssignedTargetingOption when targeting_type is 2410 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. If a resource does not 2411 // have an `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` assigned targeting 2412 // option, it is using the "Authorized Direct Sellers and Resellers" 2413 // option. 2414 type AuthorizedSellerStatusAssignedTargetingOptionDetails struct { 2415 // AuthorizedSellerStatus: Output only. The authorized seller status to 2416 // target. 2417 // 2418 // Possible values: 2419 // "AUTHORIZED_SELLER_STATUS_UNSPECIFIED" - Default value when 2420 // authorized seller status is not specified in this version. This enum 2421 // is a placeholder for the default value, or "Authorized Direct Sellers 2422 // and Resellers" in the UI. 2423 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_DIRECT_SELLERS_ONLY" - Only 2424 // authorized sellers that directly own the inventory being monetized, 2425 // as indicated by a DIRECT declaration in the ads.txt file. This value 2426 // is equivalent to "Authorized Direct Sellers" in the UI. 2427 // 2428 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_AND_NON_PARTICIPATING_PUBLISHERS" 2429 // - All authorized sellers, including publishers that have not posted 2430 // an ads.txt file. Display & Video 360 automatically disallows 2431 // unauthorized sellers. This value is equivalent to "Authorized and 2432 // Non-Participating Publishers" in the UI. 2433 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"` 2434 2435 // TargetingOptionId: Required. The targeting_option_id of a 2436 // TargetingOption of type `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. 2437 TargetingOptionId string `json:"targetingOptionId,omitempty"` 2438 2439 // ForceSendFields is a list of field names (e.g. 2440 // "AuthorizedSellerStatus") to unconditionally include in API requests. 2441 // By default, fields with empty or default values are omitted from API 2442 // requests. However, any non-pointer, non-interface field appearing in 2443 // ForceSendFields will be sent to the server regardless of whether the 2444 // field is empty or not. This may be used to include empty fields in 2445 // Patch requests. 2446 ForceSendFields []string `json:"-"` 2447 2448 // NullFields is a list of field names (e.g. "AuthorizedSellerStatus") 2449 // to include in API requests with the JSON null value. By default, 2450 // fields with empty values are omitted from API requests. However, any 2451 // field with an empty value appearing in NullFields will be sent to the 2452 // server as null. It is an error if a field in this list has a 2453 // non-empty value. This may be used to include null fields in Patch 2454 // requests. 2455 NullFields []string `json:"-"` 2456 } 2457 2458 func (s *AuthorizedSellerStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2459 type NoMethod AuthorizedSellerStatusAssignedTargetingOptionDetails 2460 raw := NoMethod(*s) 2461 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2462 } 2463 2464 // AuthorizedSellerStatusTargetingOptionDetails: Represents a targetable 2465 // authorized seller status. This will be populated in the 2466 // authorized_seller_status_details field when targeting_type is 2467 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. 2468 type AuthorizedSellerStatusTargetingOptionDetails struct { 2469 // AuthorizedSellerStatus: Output only. The authorized seller status. 2470 // 2471 // Possible values: 2472 // "AUTHORIZED_SELLER_STATUS_UNSPECIFIED" - Default value when 2473 // authorized seller status is not specified in this version. This enum 2474 // is a placeholder for the default value, or "Authorized Direct Sellers 2475 // and Resellers" in the UI. 2476 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_DIRECT_SELLERS_ONLY" - Only 2477 // authorized sellers that directly own the inventory being monetized, 2478 // as indicated by a DIRECT declaration in the ads.txt file. This value 2479 // is equivalent to "Authorized Direct Sellers" in the UI. 2480 // 2481 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_AND_NON_PARTICIPATING_PUBLISHERS" 2482 // - All authorized sellers, including publishers that have not posted 2483 // an ads.txt file. Display & Video 360 automatically disallows 2484 // unauthorized sellers. This value is equivalent to "Authorized and 2485 // Non-Participating Publishers" in the UI. 2486 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"` 2487 2488 // ForceSendFields is a list of field names (e.g. 2489 // "AuthorizedSellerStatus") to unconditionally include in API requests. 2490 // By default, fields with empty or default values are omitted from API 2491 // requests. However, any non-pointer, non-interface field appearing in 2492 // ForceSendFields will be sent to the server regardless of whether the 2493 // field is empty or not. This may be used to include empty fields in 2494 // Patch requests. 2495 ForceSendFields []string `json:"-"` 2496 2497 // NullFields is a list of field names (e.g. "AuthorizedSellerStatus") 2498 // to include in API requests with the JSON null value. By default, 2499 // fields with empty values are omitted from API requests. However, any 2500 // field with an empty value appearing in NullFields will be sent to the 2501 // server as null. It is an error if a field in this list has a 2502 // non-empty value. This may be used to include null fields in Patch 2503 // requests. 2504 NullFields []string `json:"-"` 2505 } 2506 2507 func (s *AuthorizedSellerStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2508 type NoMethod AuthorizedSellerStatusTargetingOptionDetails 2509 raw := NoMethod(*s) 2510 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2511 } 2512 2513 // BiddingStrategy: Settings that control the bid strategy. Bid strategy 2514 // determines the bid price. 2515 type BiddingStrategy struct { 2516 // FixedBid: A strategy that uses a fixed bid price. 2517 FixedBid *FixedBidStrategy `json:"fixedBid,omitempty"` 2518 2519 // MaximizeSpendAutoBid: A strategy that automatically adjusts the bid 2520 // to optimize to your performance goal while spending the full budget. 2521 // At insertion order level, the markup_type of line items cannot be set 2522 // to `PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM`. In addition, when 2523 // performance_goal_type is one of: * 2524 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA` * 2525 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC` * 2526 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED` , the 2527 // line_item_type of the insertion order line items must be either: * 2528 // `LINE_ITEM_TYPE_DISPLAY_DEFAULT` * `LINE_ITEM_TYPE_VIDEO_DEFAULT` , 2529 // and when performance_goal_type is either: * 2530 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA` * 2531 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN` the line_item_type 2532 // of the insertion order line items must be 2533 // `LINE_ITEM_TYPE_VIDEO_DEFAULT`. 2534 MaximizeSpendAutoBid *MaximizeSpendBidStrategy `json:"maximizeSpendAutoBid,omitempty"` 2535 2536 // PerformanceGoalAutoBid: A strategy that automatically adjusts the bid 2537 // to meet or beat a specified performance goal. It is to be used only 2538 // for a line item entity. 2539 PerformanceGoalAutoBid *PerformanceGoalBidStrategy `json:"performanceGoalAutoBid,omitempty"` 2540 2541 // ForceSendFields is a list of field names (e.g. "FixedBid") to 2542 // unconditionally include in API requests. By default, fields with 2543 // empty or default values are omitted from API requests. However, any 2544 // non-pointer, non-interface field appearing in ForceSendFields will be 2545 // sent to the server regardless of whether the field is empty or not. 2546 // This may be used to include empty fields in Patch requests. 2547 ForceSendFields []string `json:"-"` 2548 2549 // NullFields is a list of field names (e.g. "FixedBid") to include in 2550 // API requests with the JSON null value. By default, fields with empty 2551 // values are omitted from API requests. However, any field with an 2552 // empty value appearing in NullFields will be sent to the server as 2553 // null. It is an error if a field in this list has a non-empty value. 2554 // This may be used to include null fields in Patch requests. 2555 NullFields []string `json:"-"` 2556 } 2557 2558 func (s *BiddingStrategy) MarshalJSON() ([]byte, error) { 2559 type NoMethod BiddingStrategy 2560 raw := NoMethod(*s) 2561 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2562 } 2563 2564 // BrowserAssignedTargetingOptionDetails: Details for assigned browser 2565 // targeting option. This will be populated in the details field of an 2566 // AssignedTargetingOption when targeting_type is 2567 // `TARGETING_TYPE_BROWSER`. 2568 type BrowserAssignedTargetingOptionDetails struct { 2569 // DisplayName: Output only. The display name of the browser. 2570 DisplayName string `json:"displayName,omitempty"` 2571 2572 // Negative: Indicates if this option is being negatively targeted. All 2573 // assigned browser targeting options on the same resource must have the 2574 // same value for this field. 2575 Negative bool `json:"negative,omitempty"` 2576 2577 // TargetingOptionId: Required. The targeting_option_id of a 2578 // TargetingOption of type `TARGETING_TYPE_BROWSER`. 2579 TargetingOptionId string `json:"targetingOptionId,omitempty"` 2580 2581 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2582 // unconditionally include in API requests. By default, fields with 2583 // empty or default values are omitted from API requests. However, any 2584 // non-pointer, non-interface field appearing in ForceSendFields will be 2585 // sent to the server regardless of whether the field is empty or not. 2586 // This may be used to include empty fields in Patch requests. 2587 ForceSendFields []string `json:"-"` 2588 2589 // NullFields is a list of field names (e.g. "DisplayName") to include 2590 // in API requests with the JSON null value. By default, fields with 2591 // empty values are omitted from API requests. However, any field with 2592 // an empty value appearing in NullFields will be sent to the server as 2593 // null. It is an error if a field in this list has a non-empty value. 2594 // This may be used to include null fields in Patch requests. 2595 NullFields []string `json:"-"` 2596 } 2597 2598 func (s *BrowserAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2599 type NoMethod BrowserAssignedTargetingOptionDetails 2600 raw := NoMethod(*s) 2601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2602 } 2603 2604 // BrowserTargetingOptionDetails: Represents a targetable browser. This 2605 // will be populated in the browser_details field when targeting_type is 2606 // `TARGETING_TYPE_BROWSER`. 2607 type BrowserTargetingOptionDetails struct { 2608 // DisplayName: Output only. The display name of the browser. 2609 DisplayName string `json:"displayName,omitempty"` 2610 2611 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2612 // unconditionally include in API requests. By default, fields with 2613 // empty or default values are omitted from API requests. However, any 2614 // non-pointer, non-interface field appearing in ForceSendFields will be 2615 // sent to the server regardless of whether the field is empty or not. 2616 // This may be used to include empty fields in Patch requests. 2617 ForceSendFields []string `json:"-"` 2618 2619 // NullFields is a list of field names (e.g. "DisplayName") to include 2620 // in API requests with the JSON null value. By default, fields with 2621 // empty values are omitted from API requests. However, any field with 2622 // an empty value appearing in NullFields will be sent to the server as 2623 // null. It is an error if a field in this list has a non-empty value. 2624 // This may be used to include null fields in Patch requests. 2625 NullFields []string `json:"-"` 2626 } 2627 2628 func (s *BrowserTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2629 type NoMethod BrowserTargetingOptionDetails 2630 raw := NoMethod(*s) 2631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2632 } 2633 2634 // BudgetSummary: Summarized information of an individual campaign 2635 // budget. 2636 type BudgetSummary struct { 2637 // ExternalBudgetId: Corresponds to the external_budget_id of a campaign 2638 // budget. If the value is not set in the campaign budget, this field 2639 // will be empty. 2640 ExternalBudgetId string `json:"externalBudgetId,omitempty"` 2641 2642 // PreTaxAmountMicros: The sum of charges made under this budget before 2643 // taxes, in micros of the invoice's currency. For example, if 2644 // currency_code is `USD`, then 1000000 represents one US dollar. 2645 PreTaxAmountMicros int64 `json:"preTaxAmountMicros,omitempty,string"` 2646 2647 // PrismaCpeCode: Relevant client, product, and estimate codes from the 2648 // Mediaocean Prisma tool. Only applicable for campaign budgets with an 2649 // external_budget_source of EXTERNAL_BUDGET_SOURCE_MEDIA_OCEAN. 2650 PrismaCpeCode *PrismaCpeCode `json:"prismaCpeCode,omitempty"` 2651 2652 // TaxAmountMicros: The amount of tax applied to charges under this 2653 // budget, in micros of the invoice's currency. For example, if 2654 // currency_code is `USD`, then 1000000 represents one US dollar. 2655 TaxAmountMicros int64 `json:"taxAmountMicros,omitempty,string"` 2656 2657 // TotalAmountMicros: The total sum of charges made under this budget, 2658 // including tax, in micros of the invoice's currency. For example, if 2659 // currency_code is `USD`, then 1000000 represents one US dollar. 2660 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"` 2661 2662 // ForceSendFields is a list of field names (e.g. "ExternalBudgetId") to 2663 // unconditionally include in API requests. By default, fields with 2664 // empty or default values are omitted from API requests. However, any 2665 // non-pointer, non-interface field appearing in ForceSendFields will be 2666 // sent to the server regardless of whether the field is empty or not. 2667 // This may be used to include empty fields in Patch requests. 2668 ForceSendFields []string `json:"-"` 2669 2670 // NullFields is a list of field names (e.g. "ExternalBudgetId") to 2671 // include in API requests with the JSON null value. By default, fields 2672 // with empty values are omitted from API requests. However, any field 2673 // with an empty value appearing in NullFields will be sent to the 2674 // server as null. It is an error if a field in this list has a 2675 // non-empty value. This may be used to include null fields in Patch 2676 // requests. 2677 NullFields []string `json:"-"` 2678 } 2679 2680 func (s *BudgetSummary) MarshalJSON() ([]byte, error) { 2681 type NoMethod BudgetSummary 2682 raw := NoMethod(*s) 2683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2684 } 2685 2686 // BulkEditAdvertiserAssignedTargetingOptionsRequest: Request message 2687 // for BulkEditAdvertiserAssignedTargetingOptions. 2688 type BulkEditAdvertiserAssignedTargetingOptionsRequest struct { 2689 // CreateRequests: The assigned targeting options to create in batch, 2690 // specified as a list of `CreateAssignedTargetingOptionsRequest`. 2691 // Supported targeting types: * `TARGETING_TYPE_CHANNEL` * 2692 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 2693 // `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` 2694 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"` 2695 2696 // DeleteRequests: The assigned targeting options to delete in batch, 2697 // specified as a list of `DeleteAssignedTargetingOptionsRequest`. 2698 // Supported targeting types: * `TARGETING_TYPE_CHANNEL` * 2699 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 2700 // `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` 2701 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"` 2702 2703 // ForceSendFields is a list of field names (e.g. "CreateRequests") to 2704 // unconditionally include in API requests. By default, fields with 2705 // empty or default values are omitted from API requests. However, any 2706 // non-pointer, non-interface field appearing in ForceSendFields will be 2707 // sent to the server regardless of whether the field is empty or not. 2708 // This may be used to include empty fields in Patch requests. 2709 ForceSendFields []string `json:"-"` 2710 2711 // NullFields is a list of field names (e.g. "CreateRequests") to 2712 // include in API requests with the JSON null value. By default, fields 2713 // with empty values are omitted from API requests. However, any field 2714 // with an empty value appearing in NullFields will be sent to the 2715 // server as null. It is an error if a field in this list has a 2716 // non-empty value. This may be used to include null fields in Patch 2717 // requests. 2718 NullFields []string `json:"-"` 2719 } 2720 2721 func (s *BulkEditAdvertiserAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 2722 type NoMethod BulkEditAdvertiserAssignedTargetingOptionsRequest 2723 raw := NoMethod(*s) 2724 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2725 } 2726 2727 type BulkEditAdvertiserAssignedTargetingOptionsResponse struct { 2728 // CreatedAssignedTargetingOptions: The list of assigned targeting 2729 // options that have been successfully created. This list will be absent 2730 // if empty. 2731 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"` 2732 2733 // ServerResponse contains the HTTP response code and headers from the 2734 // server. 2735 googleapi.ServerResponse `json:"-"` 2736 2737 // ForceSendFields is a list of field names (e.g. 2738 // "CreatedAssignedTargetingOptions") to unconditionally include in API 2739 // requests. By default, fields with empty or default values are omitted 2740 // from API requests. However, any non-pointer, non-interface field 2741 // appearing in ForceSendFields will be sent to the server regardless of 2742 // whether the field is empty or not. This may be used to include empty 2743 // fields in Patch requests. 2744 ForceSendFields []string `json:"-"` 2745 2746 // NullFields is a list of field names (e.g. 2747 // "CreatedAssignedTargetingOptions") to include in API requests with 2748 // the JSON null value. By default, fields with empty values are omitted 2749 // from API requests. However, any field with an empty value appearing 2750 // in NullFields will be sent to the server as null. It is an error if a 2751 // field in this list has a non-empty value. This may be used to include 2752 // null fields in Patch requests. 2753 NullFields []string `json:"-"` 2754 } 2755 2756 func (s *BulkEditAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 2757 type NoMethod BulkEditAdvertiserAssignedTargetingOptionsResponse 2758 raw := NoMethod(*s) 2759 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2760 } 2761 2762 // BulkEditAssignedInventorySourcesRequest: Request message for 2763 // AssignedInventorySourceService.BulkEdit. 2764 type BulkEditAssignedInventorySourcesRequest struct { 2765 // AdvertiserId: The ID of the advertiser that owns the parent inventory 2766 // source group. The parent partner does not have access to these 2767 // assigned inventory sources. 2768 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 2769 2770 // CreatedAssignedInventorySources: The assigned inventory sources to 2771 // create in bulk, specified as a list of AssignedInventorySources. 2772 CreatedAssignedInventorySources []*AssignedInventorySource `json:"createdAssignedInventorySources,omitempty"` 2773 2774 // DeletedAssignedInventorySources: The IDs of the assigned inventory 2775 // sources to delete in bulk, specified as a list of 2776 // assigned_inventory_source_ids. 2777 DeletedAssignedInventorySources googleapi.Int64s `json:"deletedAssignedInventorySources,omitempty"` 2778 2779 // PartnerId: The ID of the partner that owns the inventory source 2780 // group. Only this partner has write access to these assigned inventory 2781 // sources. 2782 PartnerId int64 `json:"partnerId,omitempty,string"` 2783 2784 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 2785 // unconditionally include in API requests. By default, fields with 2786 // empty or default values are omitted from API requests. However, any 2787 // non-pointer, non-interface field appearing in ForceSendFields will be 2788 // sent to the server regardless of whether the field is empty or not. 2789 // This may be used to include empty fields in Patch requests. 2790 ForceSendFields []string `json:"-"` 2791 2792 // NullFields is a list of field names (e.g. "AdvertiserId") to include 2793 // in API requests with the JSON null value. By default, fields with 2794 // empty values are omitted from API requests. However, any field with 2795 // an empty value appearing in NullFields will be sent to the server as 2796 // null. It is an error if a field in this list has a non-empty value. 2797 // This may be used to include null fields in Patch requests. 2798 NullFields []string `json:"-"` 2799 } 2800 2801 func (s *BulkEditAssignedInventorySourcesRequest) MarshalJSON() ([]byte, error) { 2802 type NoMethod BulkEditAssignedInventorySourcesRequest 2803 raw := NoMethod(*s) 2804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2805 } 2806 2807 // BulkEditAssignedInventorySourcesResponse: Response message for 2808 // AssignedInventorySourceService.BulkEdit. 2809 type BulkEditAssignedInventorySourcesResponse struct { 2810 // AssignedInventorySources: The list of assigned inventory sources that 2811 // have been successfully created. This list will be absent if empty. 2812 AssignedInventorySources []*AssignedInventorySource `json:"assignedInventorySources,omitempty"` 2813 2814 // ServerResponse contains the HTTP response code and headers from the 2815 // server. 2816 googleapi.ServerResponse `json:"-"` 2817 2818 // ForceSendFields is a list of field names (e.g. 2819 // "AssignedInventorySources") to unconditionally include in API 2820 // requests. By default, fields with empty or default values are omitted 2821 // from API requests. However, any non-pointer, non-interface field 2822 // appearing in ForceSendFields will be sent to the server regardless of 2823 // whether the field is empty or not. This may be used to include empty 2824 // fields in Patch requests. 2825 ForceSendFields []string `json:"-"` 2826 2827 // NullFields is a list of field names (e.g. "AssignedInventorySources") 2828 // to include in API requests with the JSON null value. By default, 2829 // fields with empty values are omitted from API requests. However, any 2830 // field with an empty value appearing in NullFields will be sent to the 2831 // server as null. It is an error if a field in this list has a 2832 // non-empty value. This may be used to include null fields in Patch 2833 // requests. 2834 NullFields []string `json:"-"` 2835 } 2836 2837 func (s *BulkEditAssignedInventorySourcesResponse) MarshalJSON() ([]byte, error) { 2838 type NoMethod BulkEditAssignedInventorySourcesResponse 2839 raw := NoMethod(*s) 2840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2841 } 2842 2843 // BulkEditAssignedLocationsRequest: Request message for 2844 // AssignedLocationService.BulkEditAssignedLocations. 2845 type BulkEditAssignedLocationsRequest struct { 2846 // CreatedAssignedLocations: The assigned locations to create in bulk, 2847 // specified as a list of AssignedLocation resources. 2848 CreatedAssignedLocations []*AssignedLocation `json:"createdAssignedLocations,omitempty"` 2849 2850 // DeletedAssignedLocations: The IDs of the assigned locations to delete 2851 // in bulk, specified as a list of assignedLocationId values. 2852 DeletedAssignedLocations googleapi.Int64s `json:"deletedAssignedLocations,omitempty"` 2853 2854 // ForceSendFields is a list of field names (e.g. 2855 // "CreatedAssignedLocations") to unconditionally include in API 2856 // requests. By default, fields with empty or default values are omitted 2857 // from API requests. However, any non-pointer, non-interface field 2858 // appearing in ForceSendFields will be sent to the server regardless of 2859 // whether the field is empty or not. This may be used to include empty 2860 // fields in Patch requests. 2861 ForceSendFields []string `json:"-"` 2862 2863 // NullFields is a list of field names (e.g. "CreatedAssignedLocations") 2864 // to include in API requests with the JSON null value. By default, 2865 // fields with empty values are omitted from API requests. However, any 2866 // field with an empty value appearing in NullFields will be sent to the 2867 // server as null. It is an error if a field in this list has a 2868 // non-empty value. This may be used to include null fields in Patch 2869 // requests. 2870 NullFields []string `json:"-"` 2871 } 2872 2873 func (s *BulkEditAssignedLocationsRequest) MarshalJSON() ([]byte, error) { 2874 type NoMethod BulkEditAssignedLocationsRequest 2875 raw := NoMethod(*s) 2876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2877 } 2878 2879 type BulkEditAssignedLocationsResponse struct { 2880 // AssignedLocations: The list of assigned locations that have been 2881 // successfully created. This list will be absent if empty. 2882 AssignedLocations []*AssignedLocation `json:"assignedLocations,omitempty"` 2883 2884 // ServerResponse contains the HTTP response code and headers from the 2885 // server. 2886 googleapi.ServerResponse `json:"-"` 2887 2888 // ForceSendFields is a list of field names (e.g. "AssignedLocations") 2889 // to unconditionally include in API requests. By default, fields with 2890 // empty or default values are omitted from API requests. However, any 2891 // non-pointer, non-interface field appearing in ForceSendFields will be 2892 // sent to the server regardless of whether the field is empty or not. 2893 // This may be used to include empty fields in Patch requests. 2894 ForceSendFields []string `json:"-"` 2895 2896 // NullFields is a list of field names (e.g. "AssignedLocations") to 2897 // include in API requests with the JSON null value. By default, fields 2898 // with empty values are omitted from API requests. However, any field 2899 // with an empty value appearing in NullFields will be sent to the 2900 // server as null. It is an error if a field in this list has a 2901 // non-empty value. This may be used to include null fields in Patch 2902 // requests. 2903 NullFields []string `json:"-"` 2904 } 2905 2906 func (s *BulkEditAssignedLocationsResponse) MarshalJSON() ([]byte, error) { 2907 type NoMethod BulkEditAssignedLocationsResponse 2908 raw := NoMethod(*s) 2909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2910 } 2911 2912 // BulkEditAssignedUserRolesRequest: Request message for 2913 // BulkEditAssignedUserRoles. 2914 type BulkEditAssignedUserRolesRequest struct { 2915 // CreatedAssignedUserRoles: The assigned user roles to create in batch, 2916 // specified as a list of AssignedUserRoles. 2917 CreatedAssignedUserRoles []*AssignedUserRole `json:"createdAssignedUserRoles,omitempty"` 2918 2919 // DeletedAssignedUserRoles: The assigned user roles to delete in batch, 2920 // specified as a list of assigned_user_role_ids. The format of 2921 // assigned_user_role_id is `entityType-entityid`, for example 2922 // `partner-123`. 2923 DeletedAssignedUserRoles []string `json:"deletedAssignedUserRoles,omitempty"` 2924 2925 // ForceSendFields is a list of field names (e.g. 2926 // "CreatedAssignedUserRoles") to unconditionally include in API 2927 // requests. By default, fields with empty or default values are omitted 2928 // from API requests. However, any non-pointer, non-interface field 2929 // appearing in ForceSendFields will be sent to the server regardless of 2930 // whether the field is empty or not. This may be used to include empty 2931 // fields in Patch requests. 2932 ForceSendFields []string `json:"-"` 2933 2934 // NullFields is a list of field names (e.g. "CreatedAssignedUserRoles") 2935 // to include in API requests with the JSON null value. By default, 2936 // fields with empty values are omitted from API requests. However, any 2937 // field with an empty value appearing in NullFields will be sent to the 2938 // server as null. It is an error if a field in this list has a 2939 // non-empty value. This may be used to include null fields in Patch 2940 // requests. 2941 NullFields []string `json:"-"` 2942 } 2943 2944 func (s *BulkEditAssignedUserRolesRequest) MarshalJSON() ([]byte, error) { 2945 type NoMethod BulkEditAssignedUserRolesRequest 2946 raw := NoMethod(*s) 2947 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2948 } 2949 2950 type BulkEditAssignedUserRolesResponse struct { 2951 // CreatedAssignedUserRoles: The list of assigned user roles that have 2952 // been successfully created. This list will be absent if empty. 2953 CreatedAssignedUserRoles []*AssignedUserRole `json:"createdAssignedUserRoles,omitempty"` 2954 2955 // ServerResponse contains the HTTP response code and headers from the 2956 // server. 2957 googleapi.ServerResponse `json:"-"` 2958 2959 // ForceSendFields is a list of field names (e.g. 2960 // "CreatedAssignedUserRoles") to unconditionally include in API 2961 // requests. By default, fields with empty or default values are omitted 2962 // from API requests. However, any non-pointer, non-interface field 2963 // appearing in ForceSendFields will be sent to the server regardless of 2964 // whether the field is empty or not. This may be used to include empty 2965 // fields in Patch requests. 2966 ForceSendFields []string `json:"-"` 2967 2968 // NullFields is a list of field names (e.g. "CreatedAssignedUserRoles") 2969 // to include in API requests with the JSON null value. By default, 2970 // fields with empty values are omitted from API requests. However, any 2971 // field with an empty value appearing in NullFields will be sent to the 2972 // server as null. It is an error if a field in this list has a 2973 // non-empty value. This may be used to include null fields in Patch 2974 // requests. 2975 NullFields []string `json:"-"` 2976 } 2977 2978 func (s *BulkEditAssignedUserRolesResponse) MarshalJSON() ([]byte, error) { 2979 type NoMethod BulkEditAssignedUserRolesResponse 2980 raw := NoMethod(*s) 2981 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2982 } 2983 2984 // BulkEditLineItemAssignedTargetingOptionsRequest: Request message for 2985 // BulkEditLineItemAssignedTargetingOptions. 2986 type BulkEditLineItemAssignedTargetingOptionsRequest struct { 2987 // CreateRequests: The assigned targeting options to create in batch, 2988 // specified as a list of `CreateAssignedTargetingOptionsRequest`. 2989 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"` 2990 2991 // DeleteRequests: The assigned targeting options to delete in batch, 2992 // specified as a list of `DeleteAssignedTargetingOptionsRequest`. 2993 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"` 2994 2995 // ForceSendFields is a list of field names (e.g. "CreateRequests") to 2996 // unconditionally include in API requests. By default, fields with 2997 // empty or default values are omitted from API requests. However, any 2998 // non-pointer, non-interface field appearing in ForceSendFields will be 2999 // sent to the server regardless of whether the field is empty or not. 3000 // This may be used to include empty fields in Patch requests. 3001 ForceSendFields []string `json:"-"` 3002 3003 // NullFields is a list of field names (e.g. "CreateRequests") to 3004 // include in API requests with the JSON null value. By default, fields 3005 // with empty values are omitted from API requests. However, any field 3006 // with an empty value appearing in NullFields will be sent to the 3007 // server as null. It is an error if a field in this list has a 3008 // non-empty value. This may be used to include null fields in Patch 3009 // requests. 3010 NullFields []string `json:"-"` 3011 } 3012 3013 func (s *BulkEditLineItemAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 3014 type NoMethod BulkEditLineItemAssignedTargetingOptionsRequest 3015 raw := NoMethod(*s) 3016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3017 } 3018 3019 type BulkEditLineItemAssignedTargetingOptionsResponse struct { 3020 // CreatedAssignedTargetingOptions: The list of assigned targeting 3021 // options that have been successfully created. This list will be absent 3022 // if empty. 3023 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"` 3024 3025 // ServerResponse contains the HTTP response code and headers from the 3026 // server. 3027 googleapi.ServerResponse `json:"-"` 3028 3029 // ForceSendFields is a list of field names (e.g. 3030 // "CreatedAssignedTargetingOptions") to unconditionally include in API 3031 // requests. By default, fields with empty or default values are omitted 3032 // from API requests. However, any non-pointer, non-interface field 3033 // appearing in ForceSendFields will be sent to the server regardless of 3034 // whether the field is empty or not. This may be used to include empty 3035 // fields in Patch requests. 3036 ForceSendFields []string `json:"-"` 3037 3038 // NullFields is a list of field names (e.g. 3039 // "CreatedAssignedTargetingOptions") to include in API requests with 3040 // the JSON null value. By default, fields with empty values are omitted 3041 // from API requests. However, any field with an empty value appearing 3042 // in NullFields will be sent to the server as null. It is an error if a 3043 // field in this list has a non-empty value. This may be used to include 3044 // null fields in Patch requests. 3045 NullFields []string `json:"-"` 3046 } 3047 3048 func (s *BulkEditLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 3049 type NoMethod BulkEditLineItemAssignedTargetingOptionsResponse 3050 raw := NoMethod(*s) 3051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3052 } 3053 3054 // BulkEditNegativeKeywordsRequest: Request message for 3055 // NegativeKeywordService.BulkEditNegativeKeywords. 3056 type BulkEditNegativeKeywordsRequest struct { 3057 // CreatedNegativeKeywords: The negative keywords to create in batch, 3058 // specified as a list of NegativeKeywords. 3059 CreatedNegativeKeywords []*NegativeKeyword `json:"createdNegativeKeywords,omitempty"` 3060 3061 // DeletedNegativeKeywords: The negative keywords to delete in batch, 3062 // specified as a list of keyword_values. 3063 DeletedNegativeKeywords []string `json:"deletedNegativeKeywords,omitempty"` 3064 3065 // ForceSendFields is a list of field names (e.g. 3066 // "CreatedNegativeKeywords") to unconditionally include in API 3067 // requests. By default, fields with empty or default values are omitted 3068 // from API requests. However, any non-pointer, non-interface field 3069 // appearing in ForceSendFields will be sent to the server regardless of 3070 // whether the field is empty or not. This may be used to include empty 3071 // fields in Patch requests. 3072 ForceSendFields []string `json:"-"` 3073 3074 // NullFields is a list of field names (e.g. "CreatedNegativeKeywords") 3075 // to include in API requests with the JSON null value. By default, 3076 // fields with empty values are omitted from API requests. However, any 3077 // field with an empty value appearing in NullFields will be sent to the 3078 // server as null. It is an error if a field in this list has a 3079 // non-empty value. This may be used to include null fields in Patch 3080 // requests. 3081 NullFields []string `json:"-"` 3082 } 3083 3084 func (s *BulkEditNegativeKeywordsRequest) MarshalJSON() ([]byte, error) { 3085 type NoMethod BulkEditNegativeKeywordsRequest 3086 raw := NoMethod(*s) 3087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3088 } 3089 3090 // BulkEditNegativeKeywordsResponse: Response message for 3091 // NegativeKeywordService.BulkEditNegativeKeywords. 3092 type BulkEditNegativeKeywordsResponse struct { 3093 // NegativeKeywords: The list of negative keywords that have been 3094 // successfully created. This list will be absent if empty. 3095 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"` 3096 3097 // ServerResponse contains the HTTP response code and headers from the 3098 // server. 3099 googleapi.ServerResponse `json:"-"` 3100 3101 // ForceSendFields is a list of field names (e.g. "NegativeKeywords") to 3102 // unconditionally include in API requests. By default, fields with 3103 // empty or default values are omitted from API requests. However, any 3104 // non-pointer, non-interface field appearing in ForceSendFields will be 3105 // sent to the server regardless of whether the field is empty or not. 3106 // This may be used to include empty fields in Patch requests. 3107 ForceSendFields []string `json:"-"` 3108 3109 // NullFields is a list of field names (e.g. "NegativeKeywords") to 3110 // include in API requests with the JSON null value. By default, fields 3111 // with empty values are omitted from API requests. However, any field 3112 // with an empty value appearing in NullFields will be sent to the 3113 // server as null. It is an error if a field in this list has a 3114 // non-empty value. This may be used to include null fields in Patch 3115 // requests. 3116 NullFields []string `json:"-"` 3117 } 3118 3119 func (s *BulkEditNegativeKeywordsResponse) MarshalJSON() ([]byte, error) { 3120 type NoMethod BulkEditNegativeKeywordsResponse 3121 raw := NoMethod(*s) 3122 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3123 } 3124 3125 // BulkEditPartnerAssignedTargetingOptionsRequest: Request message for 3126 // BulkEditPartnerAssignedTargetingOptions. 3127 type BulkEditPartnerAssignedTargetingOptionsRequest struct { 3128 // CreateRequests: The assigned targeting options to create in batch, 3129 // specified as a list of `CreateAssignedTargetingOptionsRequest`. 3130 // Supported targeting types: * `TARGETING_TYPE_CHANNEL` 3131 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"` 3132 3133 // DeleteRequests: The assigned targeting options to delete in batch, 3134 // specified as a list of `DeleteAssignedTargetingOptionsRequest`. 3135 // Supported targeting types: * `TARGETING_TYPE_CHANNEL` 3136 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"` 3137 3138 // ForceSendFields is a list of field names (e.g. "CreateRequests") to 3139 // unconditionally include in API requests. By default, fields with 3140 // empty or default values are omitted from API requests. However, any 3141 // non-pointer, non-interface field appearing in ForceSendFields will be 3142 // sent to the server regardless of whether the field is empty or not. 3143 // This may be used to include empty fields in Patch requests. 3144 ForceSendFields []string `json:"-"` 3145 3146 // NullFields is a list of field names (e.g. "CreateRequests") to 3147 // include in API requests with the JSON null value. By default, fields 3148 // with empty values are omitted from API requests. However, any field 3149 // with an empty value appearing in NullFields will be sent to the 3150 // server as null. It is an error if a field in this list has a 3151 // non-empty value. This may be used to include null fields in Patch 3152 // requests. 3153 NullFields []string `json:"-"` 3154 } 3155 3156 func (s *BulkEditPartnerAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 3157 type NoMethod BulkEditPartnerAssignedTargetingOptionsRequest 3158 raw := NoMethod(*s) 3159 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3160 } 3161 3162 type BulkEditPartnerAssignedTargetingOptionsResponse struct { 3163 // CreatedAssignedTargetingOptions: The list of assigned targeting 3164 // options that have been successfully created. This list will be absent 3165 // if empty. 3166 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"` 3167 3168 // ServerResponse contains the HTTP response code and headers from the 3169 // server. 3170 googleapi.ServerResponse `json:"-"` 3171 3172 // ForceSendFields is a list of field names (e.g. 3173 // "CreatedAssignedTargetingOptions") to unconditionally include in API 3174 // requests. By default, fields with empty or default values are omitted 3175 // from API requests. However, any non-pointer, non-interface field 3176 // appearing in ForceSendFields will be sent to the server regardless of 3177 // whether the field is empty or not. This may be used to include empty 3178 // fields in Patch requests. 3179 ForceSendFields []string `json:"-"` 3180 3181 // NullFields is a list of field names (e.g. 3182 // "CreatedAssignedTargetingOptions") to include in API requests with 3183 // the JSON null value. By default, fields with empty values are omitted 3184 // from API requests. However, any field with an empty value appearing 3185 // in NullFields will be sent to the server as null. It is an error if a 3186 // field in this list has a non-empty value. This may be used to include 3187 // null fields in Patch requests. 3188 NullFields []string `json:"-"` 3189 } 3190 3191 func (s *BulkEditPartnerAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 3192 type NoMethod BulkEditPartnerAssignedTargetingOptionsResponse 3193 raw := NoMethod(*s) 3194 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3195 } 3196 3197 // BulkEditSitesRequest: Request message for SiteService.BulkEditSites. 3198 type BulkEditSitesRequest struct { 3199 // AdvertiserId: The ID of the advertiser that owns the parent channel. 3200 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 3201 3202 // CreatedSites: The sites to create in batch, specified as a list of 3203 // Sites. 3204 CreatedSites []*Site `json:"createdSites,omitempty"` 3205 3206 // DeletedSites: The sites to delete in batch, specified as a list of 3207 // site url_or_app_ids. 3208 DeletedSites []string `json:"deletedSites,omitempty"` 3209 3210 // PartnerId: The ID of the partner that owns the parent channel. 3211 PartnerId int64 `json:"partnerId,omitempty,string"` 3212 3213 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 3214 // unconditionally include in API requests. By default, fields with 3215 // empty or default values are omitted from API requests. However, any 3216 // non-pointer, non-interface field appearing in ForceSendFields will be 3217 // sent to the server regardless of whether the field is empty or not. 3218 // This may be used to include empty fields in Patch requests. 3219 ForceSendFields []string `json:"-"` 3220 3221 // NullFields is a list of field names (e.g. "AdvertiserId") to include 3222 // in API requests with the JSON null value. By default, fields with 3223 // empty values are omitted from API requests. However, any field with 3224 // an empty value appearing in NullFields will be sent to the server as 3225 // null. It is an error if a field in this list has a non-empty value. 3226 // This may be used to include null fields in Patch requests. 3227 NullFields []string `json:"-"` 3228 } 3229 3230 func (s *BulkEditSitesRequest) MarshalJSON() ([]byte, error) { 3231 type NoMethod BulkEditSitesRequest 3232 raw := NoMethod(*s) 3233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3234 } 3235 3236 // BulkEditSitesResponse: Response message for 3237 // SiteService.BulkEditSites. 3238 type BulkEditSitesResponse struct { 3239 // Sites: The list of sites that have been successfully created. This 3240 // list will be absent if empty. 3241 Sites []*Site `json:"sites,omitempty"` 3242 3243 // ServerResponse contains the HTTP response code and headers from the 3244 // server. 3245 googleapi.ServerResponse `json:"-"` 3246 3247 // ForceSendFields is a list of field names (e.g. "Sites") to 3248 // unconditionally include in API requests. By default, fields with 3249 // empty or default values are omitted from API requests. However, any 3250 // non-pointer, non-interface field appearing in ForceSendFields will be 3251 // sent to the server regardless of whether the field is empty or not. 3252 // This may be used to include empty fields in Patch requests. 3253 ForceSendFields []string `json:"-"` 3254 3255 // NullFields is a list of field names (e.g. "Sites") to include in API 3256 // requests with the JSON null value. By default, fields with empty 3257 // values are omitted from API requests. However, any field with an 3258 // empty value appearing in NullFields will be sent to the server as 3259 // null. It is an error if a field in this list has a non-empty value. 3260 // This may be used to include null fields in Patch requests. 3261 NullFields []string `json:"-"` 3262 } 3263 3264 func (s *BulkEditSitesResponse) MarshalJSON() ([]byte, error) { 3265 type NoMethod BulkEditSitesResponse 3266 raw := NoMethod(*s) 3267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3268 } 3269 3270 type BulkListAdvertiserAssignedTargetingOptionsResponse struct { 3271 // AssignedTargetingOptions: The list of assigned targeting options. 3272 // This list will be absent if empty. 3273 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 3274 3275 // NextPageToken: A token identifying the next page of results. This 3276 // value should be specified as the pageToken in a subsequent 3277 // BulkListAdvertiserAssignedTargetingOptionsRequest to fetch the next 3278 // page of results. This token will be absent if there are no more 3279 // assigned_targeting_options to return. 3280 NextPageToken string `json:"nextPageToken,omitempty"` 3281 3282 // ServerResponse contains the HTTP response code and headers from the 3283 // server. 3284 googleapi.ServerResponse `json:"-"` 3285 3286 // ForceSendFields is a list of field names (e.g. 3287 // "AssignedTargetingOptions") to unconditionally include in API 3288 // requests. By default, fields with empty or default values are omitted 3289 // from API requests. However, any non-pointer, non-interface field 3290 // appearing in ForceSendFields will be sent to the server regardless of 3291 // whether the field is empty or not. This may be used to include empty 3292 // fields in Patch requests. 3293 ForceSendFields []string `json:"-"` 3294 3295 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 3296 // to include in API requests with the JSON null value. By default, 3297 // fields with empty values are omitted from API requests. However, any 3298 // field with an empty value appearing in NullFields will be sent to the 3299 // server as null. It is an error if a field in this list has a 3300 // non-empty value. This may be used to include null fields in Patch 3301 // requests. 3302 NullFields []string `json:"-"` 3303 } 3304 3305 func (s *BulkListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 3306 type NoMethod BulkListAdvertiserAssignedTargetingOptionsResponse 3307 raw := NoMethod(*s) 3308 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3309 } 3310 3311 type BulkListCampaignAssignedTargetingOptionsResponse struct { 3312 // AssignedTargetingOptions: The list of assigned targeting options. 3313 // This list will be absent if empty. 3314 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 3315 3316 // NextPageToken: A token identifying the next page of results. This 3317 // value should be specified as the pageToken in a subsequent 3318 // BulkListCampaignAssignedTargetingOptionsRequest to fetch the next 3319 // page of results. This token will be absent if there are no more 3320 // assigned_targeting_options to return. 3321 NextPageToken string `json:"nextPageToken,omitempty"` 3322 3323 // ServerResponse contains the HTTP response code and headers from the 3324 // server. 3325 googleapi.ServerResponse `json:"-"` 3326 3327 // ForceSendFields is a list of field names (e.g. 3328 // "AssignedTargetingOptions") to unconditionally include in API 3329 // requests. By default, fields with empty or default values are omitted 3330 // from API requests. However, any non-pointer, non-interface field 3331 // appearing in ForceSendFields will be sent to the server regardless of 3332 // whether the field is empty or not. This may be used to include empty 3333 // fields in Patch requests. 3334 ForceSendFields []string `json:"-"` 3335 3336 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 3337 // to include in API requests with the JSON null value. By default, 3338 // fields with empty values are omitted from API requests. However, any 3339 // field with an empty value appearing in NullFields will be sent to the 3340 // server as null. It is an error if a field in this list has a 3341 // non-empty value. This may be used to include null fields in Patch 3342 // requests. 3343 NullFields []string `json:"-"` 3344 } 3345 3346 func (s *BulkListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 3347 type NoMethod BulkListCampaignAssignedTargetingOptionsResponse 3348 raw := NoMethod(*s) 3349 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3350 } 3351 3352 type BulkListInsertionOrderAssignedTargetingOptionsResponse struct { 3353 // AssignedTargetingOptions: The list of assigned targeting options. 3354 // This list will be absent if empty. 3355 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 3356 3357 // NextPageToken: A token identifying the next page of results. This 3358 // value should be specified as the pageToken in a subsequent 3359 // BulkListInsertionOrderAssignedTargetingOptionsRequest to fetch the 3360 // next page of results. This token will be absent if there are no more 3361 // assigned_targeting_options to return. 3362 NextPageToken string `json:"nextPageToken,omitempty"` 3363 3364 // ServerResponse contains the HTTP response code and headers from the 3365 // server. 3366 googleapi.ServerResponse `json:"-"` 3367 3368 // ForceSendFields is a list of field names (e.g. 3369 // "AssignedTargetingOptions") to unconditionally include in API 3370 // requests. By default, fields with empty or default values are omitted 3371 // from API requests. However, any non-pointer, non-interface field 3372 // appearing in ForceSendFields will be sent to the server regardless of 3373 // whether the field is empty or not. This may be used to include empty 3374 // fields in Patch requests. 3375 ForceSendFields []string `json:"-"` 3376 3377 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 3378 // to include in API requests with the JSON null value. By default, 3379 // fields with empty values are omitted from API requests. However, any 3380 // field with an empty value appearing in NullFields will be sent to the 3381 // server as null. It is an error if a field in this list has a 3382 // non-empty value. This may be used to include null fields in Patch 3383 // requests. 3384 NullFields []string `json:"-"` 3385 } 3386 3387 func (s *BulkListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 3388 type NoMethod BulkListInsertionOrderAssignedTargetingOptionsResponse 3389 raw := NoMethod(*s) 3390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3391 } 3392 3393 type BulkListLineItemAssignedTargetingOptionsResponse struct { 3394 // AssignedTargetingOptions: The list of assigned targeting options. 3395 // This list will be absent if empty. 3396 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 3397 3398 // NextPageToken: A token identifying the next page of results. This 3399 // value should be specified as the pageToken in a subsequent 3400 // BulkListLineItemAssignedTargetingOptionsRequest to fetch the next 3401 // page of results. This token will be absent if there are no more 3402 // assigned_targeting_options to return. 3403 NextPageToken string `json:"nextPageToken,omitempty"` 3404 3405 // ServerResponse contains the HTTP response code and headers from the 3406 // server. 3407 googleapi.ServerResponse `json:"-"` 3408 3409 // ForceSendFields is a list of field names (e.g. 3410 // "AssignedTargetingOptions") to unconditionally include in API 3411 // requests. By default, fields with empty or default values are omitted 3412 // from API requests. However, any non-pointer, non-interface field 3413 // appearing in ForceSendFields will be sent to the server regardless of 3414 // whether the field is empty or not. This may be used to include empty 3415 // fields in Patch requests. 3416 ForceSendFields []string `json:"-"` 3417 3418 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 3419 // to include in API requests with the JSON null value. By default, 3420 // fields with empty values are omitted from API requests. However, any 3421 // field with an empty value appearing in NullFields will be sent to the 3422 // server as null. It is an error if a field in this list has a 3423 // non-empty value. This may be used to include null fields in Patch 3424 // requests. 3425 NullFields []string `json:"-"` 3426 } 3427 3428 func (s *BulkListLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 3429 type NoMethod BulkListLineItemAssignedTargetingOptionsResponse 3430 raw := NoMethod(*s) 3431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3432 } 3433 3434 // BusinessChainAssignedTargetingOptionDetails: Details for assigned 3435 // Business chain targeting option. This will be populated in the 3436 // details field of an AssignedTargetingOption when targeting_type is 3437 // `TARGETING_TYPE_BUSINESS_CHAIN`. 3438 type BusinessChainAssignedTargetingOptionDetails struct { 3439 // DisplayName: Output only. The display name of a business chain, e.g. 3440 // "KFC", "Chase Bank". 3441 DisplayName string `json:"displayName,omitempty"` 3442 3443 // ProximityRadiusAmount: Required. The radius of the area around the 3444 // business chain that will be targeted. The units of the radius are 3445 // specified by proximity_radius_unit. Must be 1 to 800 if unit is 3446 // `DISTANCE_UNIT_KILOMETERS` and 1 to 500 if unit is 3447 // `DISTANCE_UNIT_MILES`. The minimum increment for both cases is 0.1. 3448 // Inputs will be rounded to the nearest acceptable value if it is too 3449 // granular, e.g. 15.57 will become 15.6. 3450 ProximityRadiusAmount float64 `json:"proximityRadiusAmount,omitempty"` 3451 3452 // ProximityRadiusUnit: Required. The unit of distance by which the 3453 // targeting radius is measured. 3454 // 3455 // Possible values: 3456 // "DISTANCE_UNIT_UNSPECIFIED" - Type value is not specified or is 3457 // unknown in this version. 3458 // "DISTANCE_UNIT_MILES" - Miles. 3459 // "DISTANCE_UNIT_KILOMETERS" - Kilometers. 3460 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"` 3461 3462 // TargetingOptionId: Required. The targeting_option_id of a 3463 // TargetingOption of type `TARGETING_TYPE_BUSINESS_CHAIN`. Accepted 3464 // business chain targeting option IDs can be retrieved using 3465 // SearchTargetingOptions. 3466 TargetingOptionId string `json:"targetingOptionId,omitempty"` 3467 3468 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3469 // unconditionally include in API requests. By default, fields with 3470 // empty or default values are omitted from API requests. However, any 3471 // non-pointer, non-interface field appearing in ForceSendFields will be 3472 // sent to the server regardless of whether the field is empty or not. 3473 // This may be used to include empty fields in Patch requests. 3474 ForceSendFields []string `json:"-"` 3475 3476 // NullFields is a list of field names (e.g. "DisplayName") to include 3477 // in API requests with the JSON null value. By default, fields with 3478 // empty values are omitted from API requests. However, any field with 3479 // an empty value appearing in NullFields will be sent to the server as 3480 // null. It is an error if a field in this list has a non-empty value. 3481 // This may be used to include null fields in Patch requests. 3482 NullFields []string `json:"-"` 3483 } 3484 3485 func (s *BusinessChainAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3486 type NoMethod BusinessChainAssignedTargetingOptionDetails 3487 raw := NoMethod(*s) 3488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3489 } 3490 3491 func (s *BusinessChainAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error { 3492 type NoMethod BusinessChainAssignedTargetingOptionDetails 3493 var s1 struct { 3494 ProximityRadiusAmount gensupport.JSONFloat64 `json:"proximityRadiusAmount"` 3495 *NoMethod 3496 } 3497 s1.NoMethod = (*NoMethod)(s) 3498 if err := json.Unmarshal(data, &s1); err != nil { 3499 return err 3500 } 3501 s.ProximityRadiusAmount = float64(s1.ProximityRadiusAmount) 3502 return nil 3503 } 3504 3505 // BusinessChainSearchTerms: Search terms for Business Chain targeting 3506 // options. At least one of the field should be populated. 3507 type BusinessChainSearchTerms struct { 3508 // BusinessChainQuery: The search query for the desired business chain. 3509 // The query must be the full name of the business, e.g. "KFC", 3510 // "mercedes-benz". 3511 BusinessChainQuery string `json:"businessChainQuery,omitempty"` 3512 3513 // RegionQuery: The search query for the desired geo region, e.g. 3514 // "Seattle", "United State". 3515 RegionQuery string `json:"regionQuery,omitempty"` 3516 3517 // ForceSendFields is a list of field names (e.g. "BusinessChainQuery") 3518 // to unconditionally include in API requests. By default, fields with 3519 // empty or default values are omitted from API requests. However, any 3520 // non-pointer, non-interface field appearing in ForceSendFields will be 3521 // sent to the server regardless of whether the field is empty or not. 3522 // This may be used to include empty fields in Patch requests. 3523 ForceSendFields []string `json:"-"` 3524 3525 // NullFields is a list of field names (e.g. "BusinessChainQuery") to 3526 // include in API requests with the JSON null value. By default, fields 3527 // with empty values are omitted from API requests. However, any field 3528 // with an empty value appearing in NullFields will be sent to the 3529 // server as null. It is an error if a field in this list has a 3530 // non-empty value. This may be used to include null fields in Patch 3531 // requests. 3532 NullFields []string `json:"-"` 3533 } 3534 3535 func (s *BusinessChainSearchTerms) MarshalJSON() ([]byte, error) { 3536 type NoMethod BusinessChainSearchTerms 3537 raw := NoMethod(*s) 3538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3539 } 3540 3541 // BusinessChainTargetingOptionDetails: Represents a targetable business 3542 // chain within a geo region. This will be populated in the 3543 // business_chain_details field when targeting_type is 3544 // `TARGETING_TYPE_BUSINESS_CHAIN`. 3545 type BusinessChainTargetingOptionDetails struct { 3546 // BusinessChain: Output only. The display name of the business chain, 3547 // e.g. "KFC", "Chase Bank". 3548 BusinessChain string `json:"businessChain,omitempty"` 3549 3550 // GeoRegion: Output only. The display name of the geographic region, 3551 // e.g. "Ontario, Canada". 3552 GeoRegion string `json:"geoRegion,omitempty"` 3553 3554 // GeoRegionType: Output only. The type of the geographic region. 3555 // 3556 // Possible values: 3557 // "GEO_REGION_TYPE_UNKNOWN" - The geographic region type is unknown. 3558 // "GEO_REGION_TYPE_OTHER" - The geographic region type is other. 3559 // "GEO_REGION_TYPE_COUNTRY" - The geographic region is a country. 3560 // "GEO_REGION_TYPE_REGION" - The geographic region type is region. 3561 // "GEO_REGION_TYPE_TERRITORY" - The geographic region is a territory. 3562 // "GEO_REGION_TYPE_PROVINCE" - The geographic region is a province. 3563 // "GEO_REGION_TYPE_STATE" - The geographic region is a state. 3564 // "GEO_REGION_TYPE_PREFECTURE" - The geographic region is a 3565 // prefecture. 3566 // "GEO_REGION_TYPE_GOVERNORATE" - The geographic region is a 3567 // governorate. 3568 // "GEO_REGION_TYPE_CANTON" - The geographic region is a canton. 3569 // "GEO_REGION_TYPE_UNION_TERRITORY" - The geographic region is a 3570 // union territory. 3571 // "GEO_REGION_TYPE_AUTONOMOUS_COMMUNITY" - The geographic region is 3572 // an autonomous community. 3573 // "GEO_REGION_TYPE_DMA_REGION" - The geographic region is a 3574 // designated market area (DMA) region. 3575 // "GEO_REGION_TYPE_METRO" - The geographic region type is metro. 3576 // "GEO_REGION_TYPE_CONGRESSIONAL_DISTRICT" - The geographic region is 3577 // a congressional district. 3578 // "GEO_REGION_TYPE_COUNTY" - The geographic region is a county. 3579 // "GEO_REGION_TYPE_MUNICIPALITY" - The geographic region is a 3580 // municipality. 3581 // "GEO_REGION_TYPE_CITY" - The geographic region is a city. 3582 // "GEO_REGION_TYPE_POSTAL_CODE" - The geographic region targeting 3583 // type is postal code. 3584 // "GEO_REGION_TYPE_DEPARTMENT" - The geographic region targeting type 3585 // is department. 3586 // "GEO_REGION_TYPE_AIRPORT" - The geographic region is an airport. 3587 // "GEO_REGION_TYPE_TV_REGION" - The geographic region is a TV region. 3588 // "GEO_REGION_TYPE_OKRUG" - The geographic region is an okrug. 3589 // "GEO_REGION_TYPE_BOROUGH" - The geographic region is a borough. 3590 // "GEO_REGION_TYPE_CITY_REGION" - The geographic region is a city 3591 // region. 3592 // "GEO_REGION_TYPE_ARRONDISSEMENT" - The geographic region is an 3593 // arrondissement. 3594 // "GEO_REGION_TYPE_NEIGHBORHOOD" - The geographic region is a 3595 // neighborhood. 3596 // "GEO_REGION_TYPE_UNIVERSITY" - The geographic region is a 3597 // university. 3598 // "GEO_REGION_TYPE_DISTRICT" - The geographic region is a district. 3599 GeoRegionType string `json:"geoRegionType,omitempty"` 3600 3601 // ForceSendFields is a list of field names (e.g. "BusinessChain") to 3602 // unconditionally include in API requests. By default, fields with 3603 // empty or default values are omitted from API requests. However, any 3604 // non-pointer, non-interface field appearing in ForceSendFields will be 3605 // sent to the server regardless of whether the field is empty or not. 3606 // This may be used to include empty fields in Patch requests. 3607 ForceSendFields []string `json:"-"` 3608 3609 // NullFields is a list of field names (e.g. "BusinessChain") to include 3610 // in API requests with the JSON null value. By default, fields with 3611 // empty values are omitted from API requests. However, any field with 3612 // an empty value appearing in NullFields will be sent to the server as 3613 // null. It is an error if a field in this list has a non-empty value. 3614 // This may be used to include null fields in Patch requests. 3615 NullFields []string `json:"-"` 3616 } 3617 3618 func (s *BusinessChainTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3619 type NoMethod BusinessChainTargetingOptionDetails 3620 raw := NoMethod(*s) 3621 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3622 } 3623 3624 // Campaign: A single campaign. 3625 type Campaign struct { 3626 // AdvertiserId: Output only. The unique ID of the advertiser the 3627 // campaign belongs to. 3628 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 3629 3630 // CampaignBudgets: The list of budgets available to this campaign. If 3631 // this field is not set, the campaign uses an unlimited budget. 3632 CampaignBudgets []*CampaignBudget `json:"campaignBudgets,omitempty"` 3633 3634 // CampaignFlight: Required. The planned spend and duration of the 3635 // campaign. 3636 CampaignFlight *CampaignFlight `json:"campaignFlight,omitempty"` 3637 3638 // CampaignGoal: Required. The goal of the campaign. 3639 CampaignGoal *CampaignGoal `json:"campaignGoal,omitempty"` 3640 3641 // CampaignId: Output only. The unique ID of the campaign. Assigned by 3642 // the system. 3643 CampaignId int64 `json:"campaignId,omitempty,string"` 3644 3645 // DisplayName: Required. The display name of the campaign. Must be 3646 // UTF-8 encoded with a maximum size of 240 bytes. 3647 DisplayName string `json:"displayName,omitempty"` 3648 3649 // EntityStatus: Required. Controls whether or not the insertion orders 3650 // under this campaign can spend their budgets and bid on inventory. * 3651 // Accepted values are `ENTITY_STATUS_ACTIVE`, `ENTITY_STATUS_ARCHIVED`, 3652 // and `ENTITY_STATUS_PAUSED`. * For CreateCampaign method, 3653 // `ENTITY_STATUS_ARCHIVED` is not allowed. 3654 // 3655 // Possible values: 3656 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 3657 // specified or is unknown in this version. 3658 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 3659 // budget. 3660 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 3661 // budget spending are disabled. An entity can be deleted after 3662 // archived. Deleted entities cannot be retrieved. 3663 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 3664 // budget spending are disabled. 3665 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 3666 // the entity. 3667 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 3668 // for deletion. 3669 EntityStatus string `json:"entityStatus,omitempty"` 3670 3671 // FrequencyCap: Required. The frequency cap setting of the campaign. 3672 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"` 3673 3674 // Name: Output only. The resource name of the campaign. 3675 Name string `json:"name,omitempty"` 3676 3677 // UpdateTime: Output only. The timestamp when the campaign was last 3678 // updated. Assigned by the system. 3679 UpdateTime string `json:"updateTime,omitempty"` 3680 3681 // ServerResponse contains the HTTP response code and headers from the 3682 // server. 3683 googleapi.ServerResponse `json:"-"` 3684 3685 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 3686 // unconditionally include in API requests. By default, fields with 3687 // empty or default values are omitted from API requests. However, any 3688 // non-pointer, non-interface field appearing in ForceSendFields will be 3689 // sent to the server regardless of whether the field is empty or not. 3690 // This may be used to include empty fields in Patch requests. 3691 ForceSendFields []string `json:"-"` 3692 3693 // NullFields is a list of field names (e.g. "AdvertiserId") to include 3694 // in API requests with the JSON null value. By default, fields with 3695 // empty values are omitted from API requests. However, any field with 3696 // an empty value appearing in NullFields will be sent to the server as 3697 // null. It is an error if a field in this list has a non-empty value. 3698 // This may be used to include null fields in Patch requests. 3699 NullFields []string `json:"-"` 3700 } 3701 3702 func (s *Campaign) MarshalJSON() ([]byte, error) { 3703 type NoMethod Campaign 3704 raw := NoMethod(*s) 3705 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3706 } 3707 3708 // CampaignBudget: Settings that control how the campaign budget is 3709 // allocated. 3710 type CampaignBudget struct { 3711 // BudgetAmountMicros: Required. The total amount the linked insertion 3712 // order segments can budget. The amount is in micros. Must be greater 3713 // than 0. For example, 500000000 represents 500 standard units of the 3714 // currency. 3715 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"` 3716 3717 // BudgetId: The unique ID of the campaign budget. Assigned by the 3718 // system. Do not set for new budgets. Must be included when updating or 3719 // adding budgets to campaign_budgets. Otherwise, a new ID will be 3720 // generated and assigned. 3721 BudgetId int64 `json:"budgetId,omitempty,string"` 3722 3723 // BudgetUnit: Required. Immutable. Specifies whether the budget is 3724 // measured in currency or impressions. 3725 // 3726 // Possible values: 3727 // "BUDGET_UNIT_UNSPECIFIED" - Type value is not specified or is 3728 // unknown in this version. 3729 // "BUDGET_UNIT_CURRENCY" - Budgeting in currency amounts. 3730 // "BUDGET_UNIT_IMPRESSIONS" - Budgeting in impression amounts. 3731 BudgetUnit string `json:"budgetUnit,omitempty"` 3732 3733 // DateRange: Required. The date range for the campaign budget. Linked 3734 // budget segments may have a different date range. They are resolved 3735 // relative to the parent advertiser's time zone. Both `start_date` and 3736 // `end_date` must be before the year 2037. 3737 DateRange *DateRange `json:"dateRange,omitempty"` 3738 3739 // DisplayName: Required. The display name of the budget. Must be UTF-8 3740 // encoded with a maximum size of 240 bytes. 3741 DisplayName string `json:"displayName,omitempty"` 3742 3743 // ExternalBudgetId: Immutable. The ID identifying this budget to the 3744 // external source. If this field is set and the invoice detail level of 3745 // the corresponding billing profile is set to "Budget level PO", all 3746 // impressions served against this budget will include this ID on the 3747 // invoice. Must be unique under the campaign. 3748 ExternalBudgetId string `json:"externalBudgetId,omitempty"` 3749 3750 // ExternalBudgetSource: Required. The external source of the budget. 3751 // 3752 // Possible values: 3753 // "EXTERNAL_BUDGET_SOURCE_UNSPECIFIED" - External budget source value 3754 // is not specified or unknown in this version. 3755 // "EXTERNAL_BUDGET_SOURCE_NONE" - Budget has no external source. 3756 // "EXTERNAL_BUDGET_SOURCE_MEDIA_OCEAN" - Budget source is Mediaocean. 3757 ExternalBudgetSource string `json:"externalBudgetSource,omitempty"` 3758 3759 // InvoiceGroupingId: Immutable. The ID used to group budgets to be 3760 // included the same invoice. If this field is set and the invoice level 3761 // of the corresponding billing profile is set to "Budget invoice 3762 // grouping ID", all external_budget_id sharing the same 3763 // invoice_grouping_id will be grouped in the same invoice. 3764 InvoiceGroupingId string `json:"invoiceGroupingId,omitempty"` 3765 3766 // PrismaConfig: Additional metadata for use by the Mediaocean Prisma 3767 // tool. Required for Mediaocean budgets. Only applicable to 3768 // prisma_enabled advertisers. 3769 PrismaConfig *PrismaConfig `json:"prismaConfig,omitempty"` 3770 3771 // ForceSendFields is a list of field names (e.g. "BudgetAmountMicros") 3772 // to unconditionally include in API requests. By default, fields with 3773 // empty or default values are omitted from API requests. However, any 3774 // non-pointer, non-interface field appearing in ForceSendFields will be 3775 // sent to the server regardless of whether the field is empty or not. 3776 // This may be used to include empty fields in Patch requests. 3777 ForceSendFields []string `json:"-"` 3778 3779 // NullFields is a list of field names (e.g. "BudgetAmountMicros") to 3780 // include in API requests with the JSON null value. By default, fields 3781 // with empty values are omitted from API requests. However, any field 3782 // with an empty value appearing in NullFields will be sent to the 3783 // server as null. It is an error if a field in this list has a 3784 // non-empty value. This may be used to include null fields in Patch 3785 // requests. 3786 NullFields []string `json:"-"` 3787 } 3788 3789 func (s *CampaignBudget) MarshalJSON() ([]byte, error) { 3790 type NoMethod CampaignBudget 3791 raw := NoMethod(*s) 3792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3793 } 3794 3795 // CampaignFlight: Settings that track the planned spend and duration of 3796 // a campaign. 3797 type CampaignFlight struct { 3798 // PlannedDates: Required. The dates that the campaign is expected to 3799 // run. They are resolved relative to the parent advertiser's time zone. 3800 // * The dates specified here will not affect serving. They are used to 3801 // generate alerts and warnings. For example, if the flight date of any 3802 // child insertion order is outside the range of these dates, the user 3803 // interface will show a warning. * `start_date` is required and must be 3804 // the current date or later. * `end_date` is optional. If specified, it 3805 // must be the `start_date` or later. * Any specified date must be 3806 // before the year 2037. 3807 PlannedDates *DateRange `json:"plannedDates,omitempty"` 3808 3809 // PlannedSpendAmountMicros: The amount the campaign is expected to 3810 // spend for its given planned_dates. This will not limit serving, but 3811 // will be used for tracking spend in the DV360 UI. The amount is in 3812 // micros. Must be greater than or equal to 0. For example, 500000000 3813 // represents 500 standard units of the currency. 3814 PlannedSpendAmountMicros int64 `json:"plannedSpendAmountMicros,omitempty,string"` 3815 3816 // ForceSendFields is a list of field names (e.g. "PlannedDates") to 3817 // unconditionally include in API requests. By default, fields with 3818 // empty or default values are omitted from API requests. However, any 3819 // non-pointer, non-interface field appearing in ForceSendFields will be 3820 // sent to the server regardless of whether the field is empty or not. 3821 // This may be used to include empty fields in Patch requests. 3822 ForceSendFields []string `json:"-"` 3823 3824 // NullFields is a list of field names (e.g. "PlannedDates") to include 3825 // in API requests with the JSON null value. By default, fields with 3826 // empty values are omitted from API requests. However, any field with 3827 // an empty value appearing in NullFields will be sent to the server as 3828 // null. It is an error if a field in this list has a non-empty value. 3829 // This may be used to include null fields in Patch requests. 3830 NullFields []string `json:"-"` 3831 } 3832 3833 func (s *CampaignFlight) MarshalJSON() ([]byte, error) { 3834 type NoMethod CampaignFlight 3835 raw := NoMethod(*s) 3836 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3837 } 3838 3839 // CampaignGoal: Settings that control the goal of a campaign. 3840 type CampaignGoal struct { 3841 // CampaignGoalType: Required. The type of the campaign goal. 3842 // 3843 // Possible values: 3844 // "CAMPAIGN_GOAL_TYPE_UNSPECIFIED" - Goal value is not specified or 3845 // unknown in this version. 3846 // "CAMPAIGN_GOAL_TYPE_APP_INSTALL" - Drive app installs or 3847 // engagements. 3848 // "CAMPAIGN_GOAL_TYPE_BRAND_AWARENESS" - Raise awareness of a brand 3849 // or product. 3850 // "CAMPAIGN_GOAL_TYPE_OFFLINE_ACTION" - Drive offline or in-store 3851 // sales. 3852 // "CAMPAIGN_GOAL_TYPE_ONLINE_ACTION" - Drive online action or visits. 3853 CampaignGoalType string `json:"campaignGoalType,omitempty"` 3854 3855 // PerformanceGoal: Required. The performance goal of the campaign. 3856 // Acceptable values for performance_goal_type are: * 3857 // `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * 3858 // `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * 3859 // `PERFORMANCE_GOAL_TYPE_CTR` * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * 3860 // `PERFORMANCE_GOAL_TYPE_OTHER` 3861 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"` 3862 3863 // ForceSendFields is a list of field names (e.g. "CampaignGoalType") to 3864 // unconditionally include in API requests. By default, fields with 3865 // empty or default values are omitted from API requests. However, any 3866 // non-pointer, non-interface field appearing in ForceSendFields will be 3867 // sent to the server regardless of whether the field is empty or not. 3868 // This may be used to include empty fields in Patch requests. 3869 ForceSendFields []string `json:"-"` 3870 3871 // NullFields is a list of field names (e.g. "CampaignGoalType") to 3872 // include in API requests with the JSON null value. By default, fields 3873 // with empty values are omitted from API requests. However, any field 3874 // with an empty value appearing in NullFields will be sent to the 3875 // server as null. It is an error if a field in this list has a 3876 // non-empty value. This may be used to include null fields in Patch 3877 // requests. 3878 NullFields []string `json:"-"` 3879 } 3880 3881 func (s *CampaignGoal) MarshalJSON() ([]byte, error) { 3882 type NoMethod CampaignGoal 3883 raw := NoMethod(*s) 3884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3885 } 3886 3887 // CarrierAndIspAssignedTargetingOptionDetails: Details for assigned 3888 // carrier and ISP targeting option. This will be populated in the 3889 // details field of an AssignedTargetingOption when targeting_type is 3890 // `TARGETING_TYPE_CARRIER_AND_ISP`. 3891 type CarrierAndIspAssignedTargetingOptionDetails struct { 3892 // DisplayName: Output only. The display name of the carrier or ISP. 3893 DisplayName string `json:"displayName,omitempty"` 3894 3895 // Negative: Indicates if this option is being negatively targeted. All 3896 // assigned carrier and ISP targeting options on the same resource must 3897 // have the same value for this field. 3898 Negative bool `json:"negative,omitempty"` 3899 3900 // TargetingOptionId: Required. The targeting_option_id of a 3901 // TargetingOption of type `TARGETING_TYPE_CARRIER_AND_ISP`. 3902 TargetingOptionId string `json:"targetingOptionId,omitempty"` 3903 3904 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3905 // unconditionally include in API requests. By default, fields with 3906 // empty or default values are omitted from API requests. However, any 3907 // non-pointer, non-interface field appearing in ForceSendFields will be 3908 // sent to the server regardless of whether the field is empty or not. 3909 // This may be used to include empty fields in Patch requests. 3910 ForceSendFields []string `json:"-"` 3911 3912 // NullFields is a list of field names (e.g. "DisplayName") to include 3913 // in API requests with the JSON null value. By default, fields with 3914 // empty values are omitted from API requests. However, any field with 3915 // an empty value appearing in NullFields will be sent to the server as 3916 // null. It is an error if a field in this list has a non-empty value. 3917 // This may be used to include null fields in Patch requests. 3918 NullFields []string `json:"-"` 3919 } 3920 3921 func (s *CarrierAndIspAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3922 type NoMethod CarrierAndIspAssignedTargetingOptionDetails 3923 raw := NoMethod(*s) 3924 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3925 } 3926 3927 // CarrierAndIspTargetingOptionDetails: Represents a targetable carrier 3928 // or ISP. This will be populated in the carrier_and_isp_details field 3929 // of a TargetingOption when targeting_type is 3930 // `TARGETING_TYPE_CARRIER_AND_ISP`. 3931 type CarrierAndIspTargetingOptionDetails struct { 3932 // DisplayName: Output only. The display name of the carrier or ISP. 3933 DisplayName string `json:"displayName,omitempty"` 3934 3935 // Type: Output only. The type indicating if it's carrier or ISP. 3936 // 3937 // Possible values: 3938 // "CARRIER_AND_ISP_TYPE_UNSPECIFIED" - Default value when type is not 3939 // specified or is unknown in this version. 3940 // "CARRIER_AND_ISP_TYPE_ISP" - Indicates this targeting resource 3941 // refers to an ISP. 3942 // "CARRIER_AND_ISP_TYPE_CARRIER" - Indicates this targeting resource 3943 // refers to a mobile carrier. 3944 Type string `json:"type,omitempty"` 3945 3946 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3947 // unconditionally include in API requests. By default, fields with 3948 // empty or default values are omitted from API requests. However, any 3949 // non-pointer, non-interface field appearing in ForceSendFields will be 3950 // sent to the server regardless of whether the field is empty or not. 3951 // This may be used to include empty fields in Patch requests. 3952 ForceSendFields []string `json:"-"` 3953 3954 // NullFields is a list of field names (e.g. "DisplayName") to include 3955 // in API requests with the JSON null value. By default, fields with 3956 // empty values are omitted from API requests. However, any field with 3957 // an empty value appearing in NullFields will be sent to the server as 3958 // null. It is an error if a field in this list has a non-empty value. 3959 // This may be used to include null fields in Patch requests. 3960 NullFields []string `json:"-"` 3961 } 3962 3963 func (s *CarrierAndIspTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3964 type NoMethod CarrierAndIspTargetingOptionDetails 3965 raw := NoMethod(*s) 3966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3967 } 3968 3969 // CategoryAssignedTargetingOptionDetails: Assigned category targeting 3970 // option details. This will be populated in the category_details field 3971 // when targeting_type is `TARGETING_TYPE_CATEGORY`. 3972 type CategoryAssignedTargetingOptionDetails struct { 3973 // DisplayName: Output only. The display name of the category. 3974 DisplayName string `json:"displayName,omitempty"` 3975 3976 // Negative: Indicates if this option is being negatively targeted. 3977 Negative bool `json:"negative,omitempty"` 3978 3979 // TargetingOptionId: Required. The targeting_option_id field when 3980 // targeting_type is `TARGETING_TYPE_CATEGORY`. 3981 TargetingOptionId string `json:"targetingOptionId,omitempty"` 3982 3983 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3984 // unconditionally include in API requests. By default, fields with 3985 // empty or default values are omitted from API requests. However, any 3986 // non-pointer, non-interface field appearing in ForceSendFields will be 3987 // sent to the server regardless of whether the field is empty or not. 3988 // This may be used to include empty fields in Patch requests. 3989 ForceSendFields []string `json:"-"` 3990 3991 // NullFields is a list of field names (e.g. "DisplayName") to include 3992 // in API requests with the JSON null value. By default, fields with 3993 // empty values are omitted from API requests. However, any field with 3994 // an empty value appearing in NullFields will be sent to the server as 3995 // null. It is an error if a field in this list has a non-empty value. 3996 // This may be used to include null fields in Patch requests. 3997 NullFields []string `json:"-"` 3998 } 3999 4000 func (s *CategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4001 type NoMethod CategoryAssignedTargetingOptionDetails 4002 raw := NoMethod(*s) 4003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4004 } 4005 4006 // CategoryTargetingOptionDetails: Represents a targetable category. 4007 // This will be populated in the category_details field of a 4008 // TargetingOption when targeting_type is `TARGETING_TYPE_CATEGORY`. 4009 type CategoryTargetingOptionDetails struct { 4010 // DisplayName: Output only. The display name of the category. 4011 DisplayName string `json:"displayName,omitempty"` 4012 4013 // ForceSendFields is a list of field names (e.g. "DisplayName") to 4014 // unconditionally include in API requests. By default, fields with 4015 // empty or default values are omitted from API requests. However, any 4016 // non-pointer, non-interface field appearing in ForceSendFields will be 4017 // sent to the server regardless of whether the field is empty or not. 4018 // This may be used to include empty fields in Patch requests. 4019 ForceSendFields []string `json:"-"` 4020 4021 // NullFields is a list of field names (e.g. "DisplayName") to include 4022 // in API requests with the JSON null value. By default, fields with 4023 // empty values are omitted from API requests. However, any field with 4024 // an empty value appearing in NullFields will be sent to the server as 4025 // null. It is an error if a field in this list has a non-empty value. 4026 // This may be used to include null fields in Patch requests. 4027 NullFields []string `json:"-"` 4028 } 4029 4030 func (s *CategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4031 type NoMethod CategoryTargetingOptionDetails 4032 raw := NoMethod(*s) 4033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4034 } 4035 4036 // Channel: A single channel. Channels are custom groups of related 4037 // websites and apps. 4038 type Channel struct { 4039 // AdvertiserId: The ID of the advertiser that owns the channel. 4040 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 4041 4042 // ChannelId: Output only. The unique ID of the channel. Assigned by the 4043 // system. 4044 ChannelId int64 `json:"channelId,omitempty,string"` 4045 4046 // DisplayName: Required. The display name of the channel. Must be UTF-8 4047 // encoded with a maximum length of 240 bytes. 4048 DisplayName string `json:"displayName,omitempty"` 4049 4050 // Name: Output only. The resource name of the channel. 4051 Name string `json:"name,omitempty"` 4052 4053 // NegativelyTargetedLineItemCount: Output only. Number of line items 4054 // that are directly targeting this channel negatively. 4055 NegativelyTargetedLineItemCount int64 `json:"negativelyTargetedLineItemCount,omitempty,string"` 4056 4057 // PartnerId: The ID of the partner that owns the channel. 4058 PartnerId int64 `json:"partnerId,omitempty,string"` 4059 4060 // PositivelyTargetedLineItemCount: Output only. Number of line items 4061 // that are directly targeting this channel positively. 4062 PositivelyTargetedLineItemCount int64 `json:"positivelyTargetedLineItemCount,omitempty,string"` 4063 4064 // ServerResponse contains the HTTP response code and headers from the 4065 // server. 4066 googleapi.ServerResponse `json:"-"` 4067 4068 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 4069 // unconditionally include in API requests. By default, fields with 4070 // empty or default values are omitted from API requests. However, any 4071 // non-pointer, non-interface field appearing in ForceSendFields will be 4072 // sent to the server regardless of whether the field is empty or not. 4073 // This may be used to include empty fields in Patch requests. 4074 ForceSendFields []string `json:"-"` 4075 4076 // NullFields is a list of field names (e.g. "AdvertiserId") to include 4077 // in API requests with the JSON null value. By default, fields with 4078 // empty values are omitted from API requests. However, any field with 4079 // an empty value appearing in NullFields will be sent to the server as 4080 // null. It is an error if a field in this list has a non-empty value. 4081 // This may be used to include null fields in Patch requests. 4082 NullFields []string `json:"-"` 4083 } 4084 4085 func (s *Channel) MarshalJSON() ([]byte, error) { 4086 type NoMethod Channel 4087 raw := NoMethod(*s) 4088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4089 } 4090 4091 // ChannelAssignedTargetingOptionDetails: Details for assigned channel 4092 // targeting option. This will be populated in the details field of an 4093 // AssignedTargetingOption when targeting_type is 4094 // `TARGETING_TYPE_CHANNEL`. 4095 type ChannelAssignedTargetingOptionDetails struct { 4096 // ChannelId: Required. ID of the channel. Should refer to the channel 4097 // ID field on a Partner-owned channel 4098 // (partners.channels#Channel.FIELDS.channel_id) or advertiser-owned 4099 // channel (advertisers.channels#Channel.FIELDS.channel_id) resource. 4100 ChannelId int64 `json:"channelId,omitempty,string"` 4101 4102 // Negative: Indicates if this option is being negatively targeted. For 4103 // advertiser level assigned targeting option, this field must be true. 4104 Negative bool `json:"negative,omitempty"` 4105 4106 // ForceSendFields is a list of field names (e.g. "ChannelId") to 4107 // unconditionally include in API requests. By default, fields with 4108 // empty or default values are omitted from API requests. However, any 4109 // non-pointer, non-interface field appearing in ForceSendFields will be 4110 // sent to the server regardless of whether the field is empty or not. 4111 // This may be used to include empty fields in Patch requests. 4112 ForceSendFields []string `json:"-"` 4113 4114 // NullFields is a list of field names (e.g. "ChannelId") to include in 4115 // API requests with the JSON null value. By default, fields with empty 4116 // values are omitted from API requests. However, any field with an 4117 // empty value appearing in NullFields will be sent to the server as 4118 // null. It is an error if a field in this list has a non-empty value. 4119 // This may be used to include null fields in Patch requests. 4120 NullFields []string `json:"-"` 4121 } 4122 4123 func (s *ChannelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4124 type NoMethod ChannelAssignedTargetingOptionDetails 4125 raw := NoMethod(*s) 4126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4127 } 4128 4129 // CmHybridConfig: Settings for advertisers that use both Campaign 4130 // Manager 360 (CM360) and third-party ad servers. 4131 type CmHybridConfig struct { 4132 // CmAccountId: Required. Immutable. Account ID of the CM360 Floodlight 4133 // configuration linked with the DV360 advertiser. 4134 CmAccountId int64 `json:"cmAccountId,omitempty,string"` 4135 4136 // CmAdvertiserIds: Output only. The set of CM360 Advertiser IDs sharing 4137 // the CM360 Floodlight configuration. 4138 CmAdvertiserIds googleapi.Int64s `json:"cmAdvertiserIds,omitempty"` 4139 4140 // CmFloodlightConfigId: Required. Immutable. ID of the CM360 Floodlight 4141 // configuration linked with the DV360 advertiser. 4142 CmFloodlightConfigId int64 `json:"cmFloodlightConfigId,omitempty,string"` 4143 4144 // CmFloodlightLinkingAuthorized: Required. Immutable. By setting this 4145 // field to `true`, you, on behalf of your company, authorize the 4146 // sharing of information from the given Floodlight configuration to 4147 // this Display & Video 360 advertiser. 4148 CmFloodlightLinkingAuthorized bool `json:"cmFloodlightLinkingAuthorized,omitempty"` 4149 4150 // CmSyncableSiteIds: A list of CM360 sites whose placements will be 4151 // synced to DV360 as creatives. If absent or empty in CreateAdvertiser 4152 // method, the system will automatically create a CM360 site. Removing 4153 // sites from this list may cause DV360 creatives synced from CM360 to 4154 // be deleted. At least one site must be specified. 4155 CmSyncableSiteIds googleapi.Int64s `json:"cmSyncableSiteIds,omitempty"` 4156 4157 // Dv360ToCmCostReportingEnabled: Whether or not to report DV360 cost to 4158 // CM360. 4159 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"` 4160 4161 // Dv360ToCmDataSharingEnabled: Whether or not to include DV360 data in 4162 // CM360 data transfer reports. 4163 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"` 4164 4165 // ForceSendFields is a list of field names (e.g. "CmAccountId") to 4166 // unconditionally include in API requests. By default, fields with 4167 // empty or default values are omitted from API requests. However, any 4168 // non-pointer, non-interface field appearing in ForceSendFields will be 4169 // sent to the server regardless of whether the field is empty or not. 4170 // This may be used to include empty fields in Patch requests. 4171 ForceSendFields []string `json:"-"` 4172 4173 // NullFields is a list of field names (e.g. "CmAccountId") to include 4174 // in API requests with the JSON null value. By default, fields with 4175 // empty values are omitted from API requests. However, any field with 4176 // an empty value appearing in NullFields will be sent to the server as 4177 // null. It is an error if a field in this list has a non-empty value. 4178 // This may be used to include null fields in Patch requests. 4179 NullFields []string `json:"-"` 4180 } 4181 4182 func (s *CmHybridConfig) MarshalJSON() ([]byte, error) { 4183 type NoMethod CmHybridConfig 4184 raw := NoMethod(*s) 4185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4186 } 4187 4188 // CmTrackingAd: A Campaign Manager 360 tracking ad. 4189 type CmTrackingAd struct { 4190 // CmAdId: The ad ID of the campaign manager 360 tracking Ad. 4191 CmAdId int64 `json:"cmAdId,omitempty,string"` 4192 4193 // CmCreativeId: The creative ID of the campaign manager 360 tracking 4194 // Ad. 4195 CmCreativeId int64 `json:"cmCreativeId,omitempty,string"` 4196 4197 // CmPlacementId: The placement ID of the campaign manager 360 tracking 4198 // Ad. 4199 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"` 4200 4201 // ForceSendFields is a list of field names (e.g. "CmAdId") to 4202 // unconditionally include in API requests. By default, fields with 4203 // empty or default values are omitted from API requests. However, any 4204 // non-pointer, non-interface field appearing in ForceSendFields will be 4205 // sent to the server regardless of whether the field is empty or not. 4206 // This may be used to include empty fields in Patch requests. 4207 ForceSendFields []string `json:"-"` 4208 4209 // NullFields is a list of field names (e.g. "CmAdId") to include in API 4210 // requests with the JSON null value. By default, fields with empty 4211 // values are omitted from API requests. However, any field with an 4212 // empty value appearing in NullFields will be sent to the server as 4213 // null. It is an error if a field in this list has a non-empty value. 4214 // This may be used to include null fields in Patch requests. 4215 NullFields []string `json:"-"` 4216 } 4217 4218 func (s *CmTrackingAd) MarshalJSON() ([]byte, error) { 4219 type NoMethod CmTrackingAd 4220 raw := NoMethod(*s) 4221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4222 } 4223 4224 // CombinedAudience: Describes a combined audience resource. 4225 type CombinedAudience struct { 4226 // CombinedAudienceId: Output only. The unique ID of the combined 4227 // audience. Assigned by the system. 4228 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"` 4229 4230 // DisplayName: Output only. The display name of the combined audience. 4231 // . 4232 DisplayName string `json:"displayName,omitempty"` 4233 4234 // Name: Output only. The resource name of the combined audience. 4235 Name string `json:"name,omitempty"` 4236 4237 // ServerResponse contains the HTTP response code and headers from the 4238 // server. 4239 googleapi.ServerResponse `json:"-"` 4240 4241 // ForceSendFields is a list of field names (e.g. "CombinedAudienceId") 4242 // to unconditionally include in API requests. By default, fields with 4243 // empty or default values are omitted from API requests. However, any 4244 // non-pointer, non-interface field appearing in ForceSendFields will be 4245 // sent to the server regardless of whether the field is empty or not. 4246 // This may be used to include empty fields in Patch requests. 4247 ForceSendFields []string `json:"-"` 4248 4249 // NullFields is a list of field names (e.g. "CombinedAudienceId") to 4250 // include in API requests with the JSON null value. By default, fields 4251 // with empty values are omitted from API requests. However, any field 4252 // with an empty value appearing in NullFields will be sent to the 4253 // server as null. It is an error if a field in this list has a 4254 // non-empty value. This may be used to include null fields in Patch 4255 // requests. 4256 NullFields []string `json:"-"` 4257 } 4258 4259 func (s *CombinedAudience) MarshalJSON() ([]byte, error) { 4260 type NoMethod CombinedAudience 4261 raw := NoMethod(*s) 4262 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4263 } 4264 4265 // CombinedAudienceGroup: Details of combined audience group. All 4266 // combined audience targeting settings are logically ‘OR’ of each 4267 // other. 4268 type CombinedAudienceGroup struct { 4269 // Settings: Required. All combined audience targeting settings in 4270 // combined audience group. Repeated settings with same id will be 4271 // ignored. The number of combined audience settings should be no more 4272 // than five, error will be thrown otherwise. 4273 Settings []*CombinedAudienceTargetingSetting `json:"settings,omitempty"` 4274 4275 // ForceSendFields is a list of field names (e.g. "Settings") to 4276 // unconditionally include in API requests. By default, fields with 4277 // empty or default values are omitted from API requests. However, any 4278 // non-pointer, non-interface field appearing in ForceSendFields will be 4279 // sent to the server regardless of whether the field is empty or not. 4280 // This may be used to include empty fields in Patch requests. 4281 ForceSendFields []string `json:"-"` 4282 4283 // NullFields is a list of field names (e.g. "Settings") to include in 4284 // API requests with the JSON null value. By default, fields with empty 4285 // values are omitted from API requests. However, any field with an 4286 // empty value appearing in NullFields will be sent to the server as 4287 // null. It is an error if a field in this list has a non-empty value. 4288 // This may be used to include null fields in Patch requests. 4289 NullFields []string `json:"-"` 4290 } 4291 4292 func (s *CombinedAudienceGroup) MarshalJSON() ([]byte, error) { 4293 type NoMethod CombinedAudienceGroup 4294 raw := NoMethod(*s) 4295 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4296 } 4297 4298 // CombinedAudienceTargetingSetting: Details of combined audience 4299 // targeting setting. 4300 type CombinedAudienceTargetingSetting struct { 4301 // CombinedAudienceId: Required. Combined audience id of combined 4302 // audience targeting setting. This id is combined_audience_id. 4303 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"` 4304 4305 // ForceSendFields is a list of field names (e.g. "CombinedAudienceId") 4306 // to unconditionally include in API requests. By default, fields with 4307 // empty or default values are omitted from API requests. However, any 4308 // non-pointer, non-interface field appearing in ForceSendFields will be 4309 // sent to the server regardless of whether the field is empty or not. 4310 // This may be used to include empty fields in Patch requests. 4311 ForceSendFields []string `json:"-"` 4312 4313 // NullFields is a list of field names (e.g. "CombinedAudienceId") to 4314 // include in API requests with the JSON null value. By default, fields 4315 // with empty values are omitted from API requests. However, any field 4316 // with an empty value appearing in NullFields will be sent to the 4317 // server as null. It is an error if a field in this list has a 4318 // non-empty value. This may be used to include null fields in Patch 4319 // requests. 4320 NullFields []string `json:"-"` 4321 } 4322 4323 func (s *CombinedAudienceTargetingSetting) MarshalJSON() ([]byte, error) { 4324 type NoMethod CombinedAudienceTargetingSetting 4325 raw := NoMethod(*s) 4326 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4327 } 4328 4329 // Consent: User consent status. 4330 type Consent struct { 4331 // AdPersonalization: Represents consent for ad personalization. 4332 // 4333 // Possible values: 4334 // "CONSENT_STATUS_UNSPECIFIED" - Type value is not specified or is 4335 // unknown in this version. 4336 // "CONSENT_STATUS_GRANTED" - Consent is granted. 4337 // "CONSENT_STATUS_DENIED" - Consent is denied. 4338 AdPersonalization string `json:"adPersonalization,omitempty"` 4339 4340 // AdUserData: Represents consent for ad user data. 4341 // 4342 // Possible values: 4343 // "CONSENT_STATUS_UNSPECIFIED" - Type value is not specified or is 4344 // unknown in this version. 4345 // "CONSENT_STATUS_GRANTED" - Consent is granted. 4346 // "CONSENT_STATUS_DENIED" - Consent is denied. 4347 AdUserData string `json:"adUserData,omitempty"` 4348 4349 // ForceSendFields is a list of field names (e.g. "AdPersonalization") 4350 // to unconditionally include in API requests. By default, fields with 4351 // empty or default values are omitted from API requests. However, any 4352 // non-pointer, non-interface field appearing in ForceSendFields will be 4353 // sent to the server regardless of whether the field is empty or not. 4354 // This may be used to include empty fields in Patch requests. 4355 ForceSendFields []string `json:"-"` 4356 4357 // NullFields is a list of field names (e.g. "AdPersonalization") to 4358 // include in API requests with the JSON null value. By default, fields 4359 // with empty values are omitted from API requests. However, any field 4360 // with an empty value appearing in NullFields will be sent to the 4361 // server as null. It is an error if a field in this list has a 4362 // non-empty value. This may be used to include null fields in Patch 4363 // requests. 4364 NullFields []string `json:"-"` 4365 } 4366 4367 func (s *Consent) MarshalJSON() ([]byte, error) { 4368 type NoMethod Consent 4369 raw := NoMethod(*s) 4370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4371 } 4372 4373 // ContactInfo: Contact information defining a Customer Match audience 4374 // member. 4375 type ContactInfo struct { 4376 // CountryCode: Country code of the member. Must also be set with the 4377 // following fields: * hashed_first_name * hashed_last_name * zip_codes 4378 CountryCode string `json:"countryCode,omitempty"` 4379 4380 // HashedEmails: A list of SHA256 hashed email of the member. Before 4381 // hashing, remove all whitespace and make sure the string is all 4382 // lowercase. 4383 HashedEmails []string `json:"hashedEmails,omitempty"` 4384 4385 // HashedFirstName: SHA256 hashed first name of the member. Before 4386 // hashing, remove all whitespace and make sure the string is all 4387 // lowercase. Must also be set with the following fields: * country_code 4388 // * hashed_last_name * zip_codes 4389 HashedFirstName string `json:"hashedFirstName,omitempty"` 4390 4391 // HashedLastName: SHA256 hashed last name of the member. Before 4392 // hashing, remove all whitespace and make sure the string is all 4393 // lowercase. Must also be set with the following fields: * country_code 4394 // * hashed_first_name * zip_codes 4395 HashedLastName string `json:"hashedLastName,omitempty"` 4396 4397 // HashedPhoneNumbers: A list of SHA256 hashed phone numbers of the 4398 // member. Before hashing, all phone numbers must be formatted using the 4399 // E.164 format (//en.wikipedia.org/wiki/E.164) and include the country 4400 // calling code. 4401 HashedPhoneNumbers []string `json:"hashedPhoneNumbers,omitempty"` 4402 4403 // ZipCodes: A list of zip codes of the member. Must also be set with 4404 // the following fields: * country_code * hashed_first_name * 4405 // hashed_last_name 4406 ZipCodes []string `json:"zipCodes,omitempty"` 4407 4408 // ForceSendFields is a list of field names (e.g. "CountryCode") to 4409 // unconditionally include in API requests. By default, fields with 4410 // empty or default values are omitted from API requests. However, any 4411 // non-pointer, non-interface field appearing in ForceSendFields will be 4412 // sent to the server regardless of whether the field is empty or not. 4413 // This may be used to include empty fields in Patch requests. 4414 ForceSendFields []string `json:"-"` 4415 4416 // NullFields is a list of field names (e.g. "CountryCode") to include 4417 // in API requests with the JSON null value. By default, fields with 4418 // empty values are omitted from API requests. However, any field with 4419 // an empty value appearing in NullFields will be sent to the server as 4420 // null. It is an error if a field in this list has a non-empty value. 4421 // This may be used to include null fields in Patch requests. 4422 NullFields []string `json:"-"` 4423 } 4424 4425 func (s *ContactInfo) MarshalJSON() ([]byte, error) { 4426 type NoMethod ContactInfo 4427 raw := NoMethod(*s) 4428 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4429 } 4430 4431 // ContactInfoList: Wrapper message for a list of contact information 4432 // defining Customer Match audience members. 4433 type ContactInfoList struct { 4434 // Consent: Input only. The consent setting for the users in 4435 // contact_infos. Leaving this field unset indicates that consent is not 4436 // specified. If ad_user_data or ad_personalization fields are set to 4437 // `CONSENT_STATUS_DENIED`, the request will return an error. 4438 Consent *Consent `json:"consent,omitempty"` 4439 4440 // ContactInfos: A list of ContactInfo objects defining Customer Match 4441 // audience members. The size of members after splitting the 4442 // contact_infos mustn't be greater than 500,000. 4443 ContactInfos []*ContactInfo `json:"contactInfos,omitempty"` 4444 4445 // ForceSendFields is a list of field names (e.g. "Consent") to 4446 // unconditionally include in API requests. By default, fields with 4447 // empty or default values are omitted from API requests. However, any 4448 // non-pointer, non-interface field appearing in ForceSendFields will be 4449 // sent to the server regardless of whether the field is empty or not. 4450 // This may be used to include empty fields in Patch requests. 4451 ForceSendFields []string `json:"-"` 4452 4453 // NullFields is a list of field names (e.g. "Consent") to include in 4454 // API requests with the JSON null value. By default, fields with empty 4455 // values are omitted from API requests. However, any field with an 4456 // empty value appearing in NullFields will be sent to the server as 4457 // null. It is an error if a field in this list has a non-empty value. 4458 // This may be used to include null fields in Patch requests. 4459 NullFields []string `json:"-"` 4460 } 4461 4462 func (s *ContactInfoList) MarshalJSON() ([]byte, error) { 4463 type NoMethod ContactInfoList 4464 raw := NoMethod(*s) 4465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4466 } 4467 4468 // ContentDurationAssignedTargetingOptionDetails: Details for content 4469 // duration assigned targeting option. This will be populated in the 4470 // content_duration_details field when targeting_type is 4471 // `TARGETING_TYPE_CONTENT_DURATION`. Explicitly targeting all options 4472 // is not supported. Remove all content duration targeting options to 4473 // achieve this effect. 4474 type ContentDurationAssignedTargetingOptionDetails struct { 4475 // ContentDuration: Output only. The content duration. 4476 // 4477 // Possible values: 4478 // "CONTENT_DURATION_UNSPECIFIED" - Content duration is not specified 4479 // in this version. This enum is a place holder for a default value and 4480 // does not represent a real content duration. 4481 // "CONTENT_DURATION_UNKNOWN" - The content duration is unknown. 4482 // "CONTENT_DURATION_0_TO_1_MIN" - Content is 0-1 minute long. 4483 // "CONTENT_DURATION_1_TO_5_MIN" - Content is 1-5 minutes long. 4484 // "CONTENT_DURATION_5_TO_15_MIN" - Content is 5-15 minutes long. 4485 // "CONTENT_DURATION_15_TO_30_MIN" - Content is 15-30 minutes long. 4486 // "CONTENT_DURATION_30_TO_60_MIN" - Content is 30-60 minutes long. 4487 // "CONTENT_DURATION_OVER_60_MIN" - Content is over 60 minutes long. 4488 ContentDuration string `json:"contentDuration,omitempty"` 4489 4490 // TargetingOptionId: Required. The targeting_option_id field when 4491 // targeting_type is `TARGETING_TYPE_CONTENT_DURATION`. 4492 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4493 4494 // ForceSendFields is a list of field names (e.g. "ContentDuration") to 4495 // unconditionally include in API requests. By default, fields with 4496 // empty or default values are omitted from API requests. However, any 4497 // non-pointer, non-interface field appearing in ForceSendFields will be 4498 // sent to the server regardless of whether the field is empty or not. 4499 // This may be used to include empty fields in Patch requests. 4500 ForceSendFields []string `json:"-"` 4501 4502 // NullFields is a list of field names (e.g. "ContentDuration") to 4503 // include in API requests with the JSON null value. By default, fields 4504 // with empty values are omitted from API requests. However, any field 4505 // with an empty value appearing in NullFields will be sent to the 4506 // server as null. It is an error if a field in this list has a 4507 // non-empty value. This may be used to include null fields in Patch 4508 // requests. 4509 NullFields []string `json:"-"` 4510 } 4511 4512 func (s *ContentDurationAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4513 type NoMethod ContentDurationAssignedTargetingOptionDetails 4514 raw := NoMethod(*s) 4515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4516 } 4517 4518 // ContentDurationTargetingOptionDetails: Represents a targetable 4519 // content duration. This will be populated in the 4520 // content_duration_details field when targeting_type is 4521 // `TARGETING_TYPE_CONTENT_DURATION`. 4522 type ContentDurationTargetingOptionDetails struct { 4523 // ContentDuration: Output only. The content duration. 4524 // 4525 // Possible values: 4526 // "CONTENT_DURATION_UNSPECIFIED" - Content duration is not specified 4527 // in this version. This enum is a place holder for a default value and 4528 // does not represent a real content duration. 4529 // "CONTENT_DURATION_UNKNOWN" - The content duration is unknown. 4530 // "CONTENT_DURATION_0_TO_1_MIN" - Content is 0-1 minute long. 4531 // "CONTENT_DURATION_1_TO_5_MIN" - Content is 1-5 minutes long. 4532 // "CONTENT_DURATION_5_TO_15_MIN" - Content is 5-15 minutes long. 4533 // "CONTENT_DURATION_15_TO_30_MIN" - Content is 15-30 minutes long. 4534 // "CONTENT_DURATION_30_TO_60_MIN" - Content is 30-60 minutes long. 4535 // "CONTENT_DURATION_OVER_60_MIN" - Content is over 60 minutes long. 4536 ContentDuration string `json:"contentDuration,omitempty"` 4537 4538 // ForceSendFields is a list of field names (e.g. "ContentDuration") to 4539 // unconditionally include in API requests. By default, fields with 4540 // empty or default values are omitted from API requests. However, any 4541 // non-pointer, non-interface field appearing in ForceSendFields will be 4542 // sent to the server regardless of whether the field is empty or not. 4543 // This may be used to include empty fields in Patch requests. 4544 ForceSendFields []string `json:"-"` 4545 4546 // NullFields is a list of field names (e.g. "ContentDuration") to 4547 // include in API requests with the JSON null value. By default, fields 4548 // with empty values are omitted from API requests. However, any field 4549 // with an empty value appearing in NullFields will be sent to the 4550 // server as null. It is an error if a field in this list has a 4551 // non-empty value. This may be used to include null fields in Patch 4552 // requests. 4553 NullFields []string `json:"-"` 4554 } 4555 4556 func (s *ContentDurationTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4557 type NoMethod ContentDurationTargetingOptionDetails 4558 raw := NoMethod(*s) 4559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4560 } 4561 4562 // ContentGenreAssignedTargetingOptionDetails: Details for content genre 4563 // assigned targeting option. This will be populated in the 4564 // content_genre_details field when targeting_type is 4565 // `TARGETING_TYPE_CONTENT_GENRE`. Explicitly targeting all options is 4566 // not supported. Remove all content genre targeting options to achieve 4567 // this effect. 4568 type ContentGenreAssignedTargetingOptionDetails struct { 4569 // DisplayName: Output only. The display name of the content genre. 4570 DisplayName string `json:"displayName,omitempty"` 4571 4572 // Negative: Indicates if this option is being negatively targeted. 4573 Negative bool `json:"negative,omitempty"` 4574 4575 // TargetingOptionId: Required. The targeting_option_id field when 4576 // targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. 4577 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4578 4579 // ForceSendFields is a list of field names (e.g. "DisplayName") to 4580 // unconditionally include in API requests. By default, fields with 4581 // empty or default values are omitted from API requests. However, any 4582 // non-pointer, non-interface field appearing in ForceSendFields will be 4583 // sent to the server regardless of whether the field is empty or not. 4584 // This may be used to include empty fields in Patch requests. 4585 ForceSendFields []string `json:"-"` 4586 4587 // NullFields is a list of field names (e.g. "DisplayName") to include 4588 // in API requests with the JSON null value. By default, fields with 4589 // empty values are omitted from API requests. However, any field with 4590 // an empty value appearing in NullFields will be sent to the server as 4591 // null. It is an error if a field in this list has a non-empty value. 4592 // This may be used to include null fields in Patch requests. 4593 NullFields []string `json:"-"` 4594 } 4595 4596 func (s *ContentGenreAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4597 type NoMethod ContentGenreAssignedTargetingOptionDetails 4598 raw := NoMethod(*s) 4599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4600 } 4601 4602 // ContentGenreTargetingOptionDetails: Represents a targetable content 4603 // genre. This will be populated in the content_genre_details field when 4604 // targeting_type is `TARGETING_TYPE_CONTENT_GENRE`. 4605 type ContentGenreTargetingOptionDetails struct { 4606 // DisplayName: Output only. The display name of the content genre 4607 DisplayName string `json:"displayName,omitempty"` 4608 4609 // ForceSendFields is a list of field names (e.g. "DisplayName") to 4610 // unconditionally include in API requests. By default, fields with 4611 // empty or default values are omitted from API requests. However, any 4612 // non-pointer, non-interface field appearing in ForceSendFields will be 4613 // sent to the server regardless of whether the field is empty or not. 4614 // This may be used to include empty fields in Patch requests. 4615 ForceSendFields []string `json:"-"` 4616 4617 // NullFields is a list of field names (e.g. "DisplayName") to include 4618 // in API requests with the JSON null value. By default, fields with 4619 // empty values are omitted from API requests. However, any field with 4620 // an empty value appearing in NullFields will be sent to the server as 4621 // null. It is an error if a field in this list has a non-empty value. 4622 // This may be used to include null fields in Patch requests. 4623 NullFields []string `json:"-"` 4624 } 4625 4626 func (s *ContentGenreTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4627 type NoMethod ContentGenreTargetingOptionDetails 4628 raw := NoMethod(*s) 4629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4630 } 4631 4632 // ContentInstreamPositionAssignedTargetingOptionDetails: Assigned 4633 // content instream position targeting option details. This will be 4634 // populated in the content_instream_position_details field when 4635 // targeting_type is `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 4636 type ContentInstreamPositionAssignedTargetingOptionDetails struct { 4637 // AdType: Output only. The ad type to target. Only applicable to 4638 // insertion order targeting and new line items supporting the specified 4639 // ad type will inherit this targeting option by default. Possible 4640 // values are: * `AD_TYPE_VIDEO`, the setting will be inherited by new 4641 // line item when line_item_type is `LINE_ITEM_TYPE_VIDEO_DEFAULT`. * 4642 // `AD_TYPE_AUDIO`, the setting will be inherited by new line item when 4643 // line_item_type is `LINE_ITEM_TYPE_AUDIO_DEFAULT`. 4644 // 4645 // Possible values: 4646 // "AD_TYPE_UNSPECIFIED" - Ad type is not specified or is unknown in 4647 // this version. 4648 // "AD_TYPE_DISPLAY" - Display creatives, e.g. image and HTML5. 4649 // "AD_TYPE_VIDEO" - Video creatives, e.g. video ads that play during 4650 // streaming content in video players. 4651 // "AD_TYPE_AUDIO" - Audio creatives, e.g. audio ads that play during 4652 // audio content. 4653 AdType string `json:"adType,omitempty"` 4654 4655 // ContentInstreamPosition: Required. The content instream position for 4656 // video or audio ads. 4657 // 4658 // Possible values: 4659 // "CONTENT_INSTREAM_POSITION_UNSPECIFIED" - Content instream position 4660 // is not specified in this version. This enum is a place holder for a 4661 // default value and does not represent a real in stream ad position. 4662 // "CONTENT_INSTREAM_POSITION_PRE_ROLL" - Ads that play before 4663 // streaming content. 4664 // "CONTENT_INSTREAM_POSITION_MID_ROLL" - Ads that play between the 4665 // beginning and end of streaming content. 4666 // "CONTENT_INSTREAM_POSITION_POST_ROLL" - Ads that play at the end of 4667 // streaming content. 4668 // "CONTENT_INSTREAM_POSITION_UNKNOWN" - Ads instream position is 4669 // unknown. 4670 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"` 4671 4672 // TargetingOptionId: Required. The targeting_option_id field when 4673 // targeting_type is `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 4674 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4675 4676 // ForceSendFields is a list of field names (e.g. "AdType") to 4677 // unconditionally include in API requests. By default, fields with 4678 // empty or default values are omitted from API requests. However, any 4679 // non-pointer, non-interface field appearing in ForceSendFields will be 4680 // sent to the server regardless of whether the field is empty or not. 4681 // This may be used to include empty fields in Patch requests. 4682 ForceSendFields []string `json:"-"` 4683 4684 // NullFields is a list of field names (e.g. "AdType") to include in API 4685 // requests with the JSON null value. By default, fields with empty 4686 // values are omitted from API requests. However, any field with an 4687 // empty value appearing in NullFields will be sent to the server as 4688 // null. It is an error if a field in this list has a non-empty value. 4689 // This may be used to include null fields in Patch requests. 4690 NullFields []string `json:"-"` 4691 } 4692 4693 func (s *ContentInstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4694 type NoMethod ContentInstreamPositionAssignedTargetingOptionDetails 4695 raw := NoMethod(*s) 4696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4697 } 4698 4699 // ContentInstreamPositionTargetingOptionDetails: Represents a 4700 // targetable content instream position, which could be used by video 4701 // and audio ads. This will be populated in the 4702 // content_instream_position_details field when targeting_type is 4703 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 4704 type ContentInstreamPositionTargetingOptionDetails struct { 4705 // ContentInstreamPosition: Output only. The content instream position. 4706 // 4707 // Possible values: 4708 // "CONTENT_INSTREAM_POSITION_UNSPECIFIED" - Content instream position 4709 // is not specified in this version. This enum is a place holder for a 4710 // default value and does not represent a real in stream ad position. 4711 // "CONTENT_INSTREAM_POSITION_PRE_ROLL" - Ads that play before 4712 // streaming content. 4713 // "CONTENT_INSTREAM_POSITION_MID_ROLL" - Ads that play between the 4714 // beginning and end of streaming content. 4715 // "CONTENT_INSTREAM_POSITION_POST_ROLL" - Ads that play at the end of 4716 // streaming content. 4717 // "CONTENT_INSTREAM_POSITION_UNKNOWN" - Ads instream position is 4718 // unknown. 4719 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"` 4720 4721 // ForceSendFields is a list of field names (e.g. 4722 // "ContentInstreamPosition") to unconditionally include in API 4723 // requests. By default, fields with empty or default values are omitted 4724 // from API requests. However, any non-pointer, non-interface field 4725 // appearing in ForceSendFields will be sent to the server regardless of 4726 // whether the field is empty or not. This may be used to include empty 4727 // fields in Patch requests. 4728 ForceSendFields []string `json:"-"` 4729 4730 // NullFields is a list of field names (e.g. "ContentInstreamPosition") 4731 // to include in API requests with the JSON null value. By default, 4732 // fields with empty values are omitted from API requests. However, any 4733 // field with an empty value appearing in NullFields will be sent to the 4734 // server as null. It is an error if a field in this list has a 4735 // non-empty value. This may be used to include null fields in Patch 4736 // requests. 4737 NullFields []string `json:"-"` 4738 } 4739 4740 func (s *ContentInstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4741 type NoMethod ContentInstreamPositionTargetingOptionDetails 4742 raw := NoMethod(*s) 4743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4744 } 4745 4746 // ContentOutstreamPositionAssignedTargetingOptionDetails: Assigned 4747 // content outstream position targeting option details. This will be 4748 // populated in the content_outstream_position_details field when 4749 // targeting_type is `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 4750 type ContentOutstreamPositionAssignedTargetingOptionDetails struct { 4751 // AdType: Output only. The ad type to target. Only applicable to 4752 // insertion order targeting and new line items supporting the specified 4753 // ad type will inherit this targeting option by default. Possible 4754 // values are: * `AD_TYPE_DISPLAY`, the setting will be inherited by new 4755 // line item when line_item_type is `LINE_ITEM_TYPE_DISPLAY_DEFAULT`. * 4756 // `AD_TYPE_VIDEO`, the setting will be inherited by new line item when 4757 // line_item_type is `LINE_ITEM_TYPE_VIDEO_DEFAULT`. 4758 // 4759 // Possible values: 4760 // "AD_TYPE_UNSPECIFIED" - Ad type is not specified or is unknown in 4761 // this version. 4762 // "AD_TYPE_DISPLAY" - Display creatives, e.g. image and HTML5. 4763 // "AD_TYPE_VIDEO" - Video creatives, e.g. video ads that play during 4764 // streaming content in video players. 4765 // "AD_TYPE_AUDIO" - Audio creatives, e.g. audio ads that play during 4766 // audio content. 4767 AdType string `json:"adType,omitempty"` 4768 4769 // ContentOutstreamPosition: Required. The content outstream position. 4770 // 4771 // Possible values: 4772 // "CONTENT_OUTSTREAM_POSITION_UNSPECIFIED" - Content outstream 4773 // position is not specified in this version. This enum is a place 4774 // holder for a default value and does not represent a real content 4775 // outstream position. 4776 // "CONTENT_OUTSTREAM_POSITION_UNKNOWN" - The ad position is unknown 4777 // in the content outstream. 4778 // "CONTENT_OUTSTREAM_POSITION_IN_ARTICLE" - Ads that appear between 4779 // the paragraphs of your pages. 4780 // "CONTENT_OUTSTREAM_POSITION_IN_BANNER" - Ads that display on the 4781 // top and the sides of a page. 4782 // "CONTENT_OUTSTREAM_POSITION_IN_FEED" - Ads that appear in a 4783 // scrollable stream of content. A feed is typically editorial (e.g. a 4784 // list of articles or news) or listings (e.g. a list of products or 4785 // services). 4786 // "CONTENT_OUTSTREAM_POSITION_INTERSTITIAL" - Ads shown before or 4787 // between content loads. 4788 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"` 4789 4790 // TargetingOptionId: Required. The targeting_option_id field when 4791 // targeting_type is `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 4792 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4793 4794 // ForceSendFields is a list of field names (e.g. "AdType") to 4795 // unconditionally include in API requests. By default, fields with 4796 // empty or default values are omitted from API requests. However, any 4797 // non-pointer, non-interface field appearing in ForceSendFields will be 4798 // sent to the server regardless of whether the field is empty or not. 4799 // This may be used to include empty fields in Patch requests. 4800 ForceSendFields []string `json:"-"` 4801 4802 // NullFields is a list of field names (e.g. "AdType") to include in API 4803 // requests with the JSON null value. By default, fields with empty 4804 // values are omitted from API requests. However, any field with an 4805 // empty value appearing in NullFields will be sent to the server as 4806 // null. It is an error if a field in this list has a non-empty value. 4807 // This may be used to include null fields in Patch requests. 4808 NullFields []string `json:"-"` 4809 } 4810 4811 func (s *ContentOutstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4812 type NoMethod ContentOutstreamPositionAssignedTargetingOptionDetails 4813 raw := NoMethod(*s) 4814 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4815 } 4816 4817 // ContentOutstreamPositionTargetingOptionDetails: Represents a 4818 // targetable content outstream position, which could be used by display 4819 // and video ads. This will be populated in the 4820 // content_outstream_position_details field when targeting_type is 4821 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 4822 type ContentOutstreamPositionTargetingOptionDetails struct { 4823 // ContentOutstreamPosition: Output only. The content outstream 4824 // position. 4825 // 4826 // Possible values: 4827 // "CONTENT_OUTSTREAM_POSITION_UNSPECIFIED" - Content outstream 4828 // position is not specified in this version. This enum is a place 4829 // holder for a default value and does not represent a real content 4830 // outstream position. 4831 // "CONTENT_OUTSTREAM_POSITION_UNKNOWN" - The ad position is unknown 4832 // in the content outstream. 4833 // "CONTENT_OUTSTREAM_POSITION_IN_ARTICLE" - Ads that appear between 4834 // the paragraphs of your pages. 4835 // "CONTENT_OUTSTREAM_POSITION_IN_BANNER" - Ads that display on the 4836 // top and the sides of a page. 4837 // "CONTENT_OUTSTREAM_POSITION_IN_FEED" - Ads that appear in a 4838 // scrollable stream of content. A feed is typically editorial (e.g. a 4839 // list of articles or news) or listings (e.g. a list of products or 4840 // services). 4841 // "CONTENT_OUTSTREAM_POSITION_INTERSTITIAL" - Ads shown before or 4842 // between content loads. 4843 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"` 4844 4845 // ForceSendFields is a list of field names (e.g. 4846 // "ContentOutstreamPosition") to unconditionally include in API 4847 // requests. By default, fields with empty or default values are omitted 4848 // from API requests. However, any non-pointer, non-interface field 4849 // appearing in ForceSendFields will be sent to the server regardless of 4850 // whether the field is empty or not. This may be used to include empty 4851 // fields in Patch requests. 4852 ForceSendFields []string `json:"-"` 4853 4854 // NullFields is a list of field names (e.g. "ContentOutstreamPosition") 4855 // to include in API requests with the JSON null value. By default, 4856 // fields with empty values are omitted from API requests. However, any 4857 // field with an empty value appearing in NullFields will be sent to the 4858 // server as null. It is an error if a field in this list has a 4859 // non-empty value. This may be used to include null fields in Patch 4860 // requests. 4861 NullFields []string `json:"-"` 4862 } 4863 4864 func (s *ContentOutstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4865 type NoMethod ContentOutstreamPositionTargetingOptionDetails 4866 raw := NoMethod(*s) 4867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4868 } 4869 4870 // ContentStreamTypeAssignedTargetingOptionDetails: Details for content 4871 // stream type assigned targeting option. This will be populated in the 4872 // content_stream_type_details field when targeting_type is 4873 // `TARGETING_TYPE_CONTENT_STREAM_TYPE`. Explicitly targeting all 4874 // options is not supported. Remove all content stream type targeting 4875 // options to achieve this effect. 4876 type ContentStreamTypeAssignedTargetingOptionDetails struct { 4877 // ContentStreamType: Output only. The content stream type. 4878 // 4879 // Possible values: 4880 // "CONTENT_STREAM_TYPE_UNSPECIFIED" - Content stream type is not 4881 // specified in this version. This enum is a place holder for a default 4882 // value and does not represent a real content stream type. 4883 // "CONTENT_LIVE_STREAM" - The content is being live-streamed. 4884 // "CONTENT_ON_DEMAND" - The content is viewed on-demand. 4885 ContentStreamType string `json:"contentStreamType,omitempty"` 4886 4887 // TargetingOptionId: Required. The targeting_option_id field when 4888 // targeting_type is `TARGETING_TYPE_CONTENT_STREAM_TYPE`. 4889 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4890 4891 // ForceSendFields is a list of field names (e.g. "ContentStreamType") 4892 // to unconditionally include in API requests. By default, fields with 4893 // empty or default values are omitted from API requests. However, any 4894 // non-pointer, non-interface field appearing in ForceSendFields will be 4895 // sent to the server regardless of whether the field is empty or not. 4896 // This may be used to include empty fields in Patch requests. 4897 ForceSendFields []string `json:"-"` 4898 4899 // NullFields is a list of field names (e.g. "ContentStreamType") to 4900 // include in API requests with the JSON null value. By default, fields 4901 // with empty values are omitted from API requests. However, any field 4902 // with an empty value appearing in NullFields will be sent to the 4903 // server as null. It is an error if a field in this list has a 4904 // non-empty value. This may be used to include null fields in Patch 4905 // requests. 4906 NullFields []string `json:"-"` 4907 } 4908 4909 func (s *ContentStreamTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4910 type NoMethod ContentStreamTypeAssignedTargetingOptionDetails 4911 raw := NoMethod(*s) 4912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4913 } 4914 4915 // ContentStreamTypeTargetingOptionDetails: Represents a targetable 4916 // content stream type. This will be populated in the 4917 // content_stream_type_details field when targeting_type is 4918 // `TARGETING_TYPE_CONTENT_STREAM_TYPE`. 4919 type ContentStreamTypeTargetingOptionDetails struct { 4920 // ContentStreamType: Output only. The content stream type. 4921 // 4922 // Possible values: 4923 // "CONTENT_STREAM_TYPE_UNSPECIFIED" - Content stream type is not 4924 // specified in this version. This enum is a place holder for a default 4925 // value and does not represent a real content stream type. 4926 // "CONTENT_LIVE_STREAM" - The content is being live-streamed. 4927 // "CONTENT_ON_DEMAND" - The content is viewed on-demand. 4928 ContentStreamType string `json:"contentStreamType,omitempty"` 4929 4930 // ForceSendFields is a list of field names (e.g. "ContentStreamType") 4931 // to unconditionally include in API requests. By default, fields with 4932 // empty or default values are omitted from API requests. However, any 4933 // non-pointer, non-interface field appearing in ForceSendFields will be 4934 // sent to the server regardless of whether the field is empty or not. 4935 // This may be used to include empty fields in Patch requests. 4936 ForceSendFields []string `json:"-"` 4937 4938 // NullFields is a list of field names (e.g. "ContentStreamType") to 4939 // include in API requests with the JSON null value. By default, fields 4940 // with empty values are omitted from API requests. However, any field 4941 // with an empty value appearing in NullFields will be sent to the 4942 // server as null. It is an error if a field in this list has a 4943 // non-empty value. This may be used to include null fields in Patch 4944 // requests. 4945 NullFields []string `json:"-"` 4946 } 4947 4948 func (s *ContentStreamTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4949 type NoMethod ContentStreamTypeTargetingOptionDetails 4950 raw := NoMethod(*s) 4951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4952 } 4953 4954 // ConversionCountingConfig: Settings that control how conversions are 4955 // counted. All post-click conversions will be counted. A percentage 4956 // value can be set for post-view conversions counting. 4957 type ConversionCountingConfig struct { 4958 // FloodlightActivityConfigs: The Floodlight activity configs used to 4959 // track conversions. The number of conversions counted is the sum of 4960 // all of the conversions counted by all of the Floodlight activity IDs 4961 // specified in this field. 4962 FloodlightActivityConfigs []*TrackingFloodlightActivityConfig `json:"floodlightActivityConfigs,omitempty"` 4963 4964 // PostViewCountPercentageMillis: The percentage of post-view 4965 // conversions to count, in millis (1/1000 of a percent). Must be 4966 // between 0 and 100000 inclusive. For example, to track 50% of the 4967 // post-click conversions, set a value of 50000. 4968 PostViewCountPercentageMillis int64 `json:"postViewCountPercentageMillis,omitempty,string"` 4969 4970 // ForceSendFields is a list of field names (e.g. 4971 // "FloodlightActivityConfigs") to unconditionally include in API 4972 // requests. By default, fields with empty or default values are omitted 4973 // from API requests. However, any non-pointer, non-interface field 4974 // appearing in ForceSendFields will be sent to the server regardless of 4975 // whether the field is empty or not. This may be used to include empty 4976 // fields in Patch requests. 4977 ForceSendFields []string `json:"-"` 4978 4979 // NullFields is a list of field names (e.g. 4980 // "FloodlightActivityConfigs") to include in API requests with the JSON 4981 // null value. By default, fields with empty values are omitted from API 4982 // requests. However, any field with an empty value appearing in 4983 // NullFields will be sent to the server as null. It is an error if a 4984 // field in this list has a non-empty value. This may be used to include 4985 // null fields in Patch requests. 4986 NullFields []string `json:"-"` 4987 } 4988 4989 func (s *ConversionCountingConfig) MarshalJSON() ([]byte, error) { 4990 type NoMethod ConversionCountingConfig 4991 raw := NoMethod(*s) 4992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4993 } 4994 4995 // CounterEvent: Counter event of the creative. 4996 type CounterEvent struct { 4997 // Name: Required. The name of the counter event. 4998 Name string `json:"name,omitempty"` 4999 5000 // ReportingName: Required. The name used to identify this counter event 5001 // in reports. 5002 ReportingName string `json:"reportingName,omitempty"` 5003 5004 // ForceSendFields is a list of field names (e.g. "Name") to 5005 // unconditionally include in API requests. By default, fields with 5006 // empty or default values are omitted from API requests. However, any 5007 // non-pointer, non-interface field appearing in ForceSendFields will be 5008 // sent to the server regardless of whether the field is empty or not. 5009 // This may be used to include empty fields in Patch requests. 5010 ForceSendFields []string `json:"-"` 5011 5012 // NullFields is a list of field names (e.g. "Name") to include in API 5013 // requests with the JSON null value. By default, fields with empty 5014 // values are omitted from API requests. However, any field with an 5015 // empty value appearing in NullFields will be sent to the server as 5016 // null. It is an error if a field in this list has a non-empty value. 5017 // This may be used to include null fields in Patch requests. 5018 NullFields []string `json:"-"` 5019 } 5020 5021 func (s *CounterEvent) MarshalJSON() ([]byte, error) { 5022 type NoMethod CounterEvent 5023 raw := NoMethod(*s) 5024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5025 } 5026 5027 // CreateAssetRequest: A request message for CreateAsset. 5028 type CreateAssetRequest struct { 5029 // Filename: Required. The filename of the asset, including the file 5030 // extension. The filename must be UTF-8 encoded with a maximum size of 5031 // 240 bytes. 5032 Filename string `json:"filename,omitempty"` 5033 5034 // ForceSendFields is a list of field names (e.g. "Filename") to 5035 // unconditionally include in API requests. By default, fields with 5036 // empty or default values are omitted from API requests. However, any 5037 // non-pointer, non-interface field appearing in ForceSendFields will be 5038 // sent to the server regardless of whether the field is empty or not. 5039 // This may be used to include empty fields in Patch requests. 5040 ForceSendFields []string `json:"-"` 5041 5042 // NullFields is a list of field names (e.g. "Filename") to include in 5043 // API requests with the JSON null value. By default, fields with empty 5044 // values are omitted from API requests. However, any field with an 5045 // empty value appearing in NullFields will be sent to the server as 5046 // null. It is an error if a field in this list has a non-empty value. 5047 // This may be used to include null fields in Patch requests. 5048 NullFields []string `json:"-"` 5049 } 5050 5051 func (s *CreateAssetRequest) MarshalJSON() ([]byte, error) { 5052 type NoMethod CreateAssetRequest 5053 raw := NoMethod(*s) 5054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5055 } 5056 5057 // CreateAssetResponse: A response message for CreateAsset. 5058 type CreateAssetResponse struct { 5059 // Asset: The uploaded asset, if successful. 5060 Asset *Asset `json:"asset,omitempty"` 5061 5062 // ServerResponse contains the HTTP response code and headers from the 5063 // server. 5064 googleapi.ServerResponse `json:"-"` 5065 5066 // ForceSendFields is a list of field names (e.g. "Asset") to 5067 // unconditionally include in API requests. By default, fields with 5068 // empty or default values are omitted from API requests. However, any 5069 // non-pointer, non-interface field appearing in ForceSendFields will be 5070 // sent to the server regardless of whether the field is empty or not. 5071 // This may be used to include empty fields in Patch requests. 5072 ForceSendFields []string `json:"-"` 5073 5074 // NullFields is a list of field names (e.g. "Asset") to include in API 5075 // requests with the JSON null value. By default, fields with empty 5076 // values are omitted from API requests. However, any field with an 5077 // empty value appearing in NullFields will be sent to the server as 5078 // null. It is an error if a field in this list has a non-empty value. 5079 // This may be used to include null fields in Patch requests. 5080 NullFields []string `json:"-"` 5081 } 5082 5083 func (s *CreateAssetResponse) MarshalJSON() ([]byte, error) { 5084 type NoMethod CreateAssetResponse 5085 raw := NoMethod(*s) 5086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5087 } 5088 5089 // CreateAssignedTargetingOptionsRequest: A request listing which 5090 // assigned targeting options of a given targeting type should be 5091 // created and added. 5092 type CreateAssignedTargetingOptionsRequest struct { 5093 // AssignedTargetingOptions: Required. The assigned targeting options to 5094 // create and add. 5095 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 5096 5097 // TargetingType: Required. Identifies the type of this assigned 5098 // targeting option. 5099 // 5100 // Possible values: 5101 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 5102 // specified or is unknown in this version. 5103 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 5104 // related websites or apps). 5105 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 5106 // example, education or puzzle games). 5107 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 5108 // Birds). 5109 // "TARGETING_TYPE_URL" - Target a specific url (for example, 5110 // quora.com). 5111 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 5112 // period on a specific day. 5113 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 5114 // (for example, 18-24). 5115 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 5116 // specified regions on a regional location list. 5117 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 5118 // specified points of interest on a proximity location list. 5119 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 5120 // example, female or male). 5121 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 5122 // size for video ads. 5123 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 5124 // content for video ads. 5125 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 5126 // parental status (for example, parent or not a parent). 5127 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 5128 // ads in a specific content instream position (for example, pre-roll, 5129 // mid-roll, or post-roll). 5130 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 5131 // specific content outstream position. 5132 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 5133 // (for example, tablet or connected TV). 5134 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 5135 // groups of audiences. Singleton field, at most one can exist on a 5136 // single Lineitem at a time. 5137 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 5138 // example, Chrome). 5139 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 5140 // household income range (for example, top 10%). 5141 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 5142 // screen position. 5143 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 5144 // third party verification (for example, IAS or DoubleVerify). 5145 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 5146 // by specific digital content label ratings (for example, DL-MA: 5147 // suitable only for mature audiences). 5148 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 5149 // content by sensitive categories (for example, adult). 5150 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 5151 // (for example, web or app). 5152 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 5153 // carrier or internet service provider (ISP) (for example, Comcast or 5154 // Orange). 5155 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 5156 // operating system (for example, macOS). 5157 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 5158 // device make or model (for example, Roku or Samsung). 5159 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 5160 // example, dog or retriever). 5161 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 5162 // negative keyword list. 5163 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 5164 // (for example, 80% viewable). 5165 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 5166 // category (for example, arts & entertainment). 5167 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 5168 // specific deals and auction packages. 5169 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 5170 // example, English or Japanese). 5171 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 5172 // authorized sellers. If no targeting option of this type is assigned, 5173 // the resource uses the "Authorized Direct Sellers and Resellers" 5174 // option by default. 5175 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 5176 // location (for example, a city or state). 5177 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 5178 // a group of deals and auction packages. 5179 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 5180 // exchanges. 5181 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 5182 // sub-exchanges. 5183 // "TARGETING_TYPE_POI" - Target ads around a specific point of 5184 // interest, such as a notable building, a street address, or 5185 // latitude/longitude coordinates. 5186 // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a 5187 // business chain within a specific geo region. 5188 // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video 5189 // content duration. 5190 // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific 5191 // video content stream type. 5192 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific 5193 // native content position. 5194 // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled 5195 // inventory. 5196 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific 5197 // audio content type. 5198 // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content 5199 // genre. 5200 TargetingType string `json:"targetingType,omitempty"` 5201 5202 // ForceSendFields is a list of field names (e.g. 5203 // "AssignedTargetingOptions") to unconditionally include in API 5204 // requests. By default, fields with empty or default values are omitted 5205 // from API requests. However, any non-pointer, non-interface field 5206 // appearing in ForceSendFields will be sent to the server regardless of 5207 // whether the field is empty or not. This may be used to include empty 5208 // fields in Patch requests. 5209 ForceSendFields []string `json:"-"` 5210 5211 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 5212 // to include in API requests with the JSON null value. By default, 5213 // fields with empty values are omitted from API requests. However, any 5214 // field with an empty value appearing in NullFields will be sent to the 5215 // server as null. It is an error if a field in this list has a 5216 // non-empty value. This may be used to include null fields in Patch 5217 // requests. 5218 NullFields []string `json:"-"` 5219 } 5220 5221 func (s *CreateAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 5222 type NoMethod CreateAssignedTargetingOptionsRequest 5223 raw := NoMethod(*s) 5224 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5225 } 5226 5227 // CreateSdfDownloadTaskRequest: Request message for 5228 // [SdfDownloadTaskService.CreateSdfDownloadTask]. 5229 type CreateSdfDownloadTaskRequest struct { 5230 // AdvertiserId: The ID of the advertiser to download SDF for. 5231 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 5232 5233 // IdFilter: Filters on entities by their entity IDs. 5234 IdFilter *IdFilter `json:"idFilter,omitempty"` 5235 5236 // InventorySourceFilter: Filters on Inventory Sources by their IDs. 5237 InventorySourceFilter *InventorySourceFilter `json:"inventorySourceFilter,omitempty"` 5238 5239 // ParentEntityFilter: Filters on selected file types. The entities in 5240 // each file are filtered by a chosen set of filter entities. The filter 5241 // entities must be the same type as, or a parent type of, the selected 5242 // file types. 5243 ParentEntityFilter *ParentEntityFilter `json:"parentEntityFilter,omitempty"` 5244 5245 // PartnerId: The ID of the partner to download SDF for. 5246 PartnerId int64 `json:"partnerId,omitempty,string"` 5247 5248 // Version: Required. The SDF version of the downloaded file. If set to 5249 // `SDF_VERSION_UNSPECIFIED`, this will default to the version specified 5250 // by the advertiser or partner identified by `root_id`. An advertiser 5251 // inherits its SDF version from its partner unless configured 5252 // otherwise. 5253 // 5254 // Possible values: 5255 // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or 5256 // is unknown in this version. 5257 // "SDF_VERSION_3_1" - SDF version 3.1 5258 // "SDF_VERSION_4" - SDF version 4 5259 // "SDF_VERSION_4_1" - SDF version 4.1 5260 // "SDF_VERSION_4_2" - SDF version 4.2 5261 // "SDF_VERSION_5" - SDF version 5. 5262 // "SDF_VERSION_5_1" - SDF version 5.1 5263 // "SDF_VERSION_5_2" - SDF version 5.2 5264 // "SDF_VERSION_5_3" - SDF version 5.3 5265 // "SDF_VERSION_5_4" - SDF version 5.4 5266 // "SDF_VERSION_5_5" - SDF version 5.5 5267 // "SDF_VERSION_6" - SDF version 6 5268 // "SDF_VERSION_7" - SDF version 7. Read the [v7 migration 5269 // guide](/display-video/api/structured-data-file/v7-migration-guide) 5270 // before migrating to this version. Currently in beta. Only available 5271 // for use by a subset of users. 5272 Version string `json:"version,omitempty"` 5273 5274 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 5275 // unconditionally include in API requests. By default, fields with 5276 // empty or default values are omitted from API requests. However, any 5277 // non-pointer, non-interface field appearing in ForceSendFields will be 5278 // sent to the server regardless of whether the field is empty or not. 5279 // This may be used to include empty fields in Patch requests. 5280 ForceSendFields []string `json:"-"` 5281 5282 // NullFields is a list of field names (e.g. "AdvertiserId") to include 5283 // in API requests with the JSON null value. By default, fields with 5284 // empty values are omitted from API requests. However, any field with 5285 // an empty value appearing in NullFields will be sent to the server as 5286 // null. It is an error if a field in this list has a non-empty value. 5287 // This may be used to include null fields in Patch requests. 5288 NullFields []string `json:"-"` 5289 } 5290 5291 func (s *CreateSdfDownloadTaskRequest) MarshalJSON() ([]byte, error) { 5292 type NoMethod CreateSdfDownloadTaskRequest 5293 raw := NoMethod(*s) 5294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5295 } 5296 5297 // Creative: A single Creative. 5298 type Creative struct { 5299 // AdditionalDimensions: Additional dimensions. Applicable when 5300 // creative_type is one of: * `CREATIVE_TYPE_STANDARD` * 5301 // `CREATIVE_TYPE_EXPANDABLE` * `CREATIVE_TYPE_NATIVE` * 5302 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_LIGHTBOX` * 5303 // `CREATIVE_TYPE_PUBLISHER_HOSTED` If this field is specified, 5304 // width_pixels and height_pixels are both required and must be greater 5305 // than or equal to 0. 5306 AdditionalDimensions []*Dimensions `json:"additionalDimensions,omitempty"` 5307 5308 // AdvertiserId: Output only. The unique ID of the advertiser the 5309 // creative belongs to. 5310 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 5311 5312 // AppendedTag: Third-party HTML tracking tag to be appended to the 5313 // creative tag. 5314 AppendedTag string `json:"appendedTag,omitempty"` 5315 5316 // Assets: Required. Assets associated to this creative. 5317 Assets []*AssetAssociation `json:"assets,omitempty"` 5318 5319 // CmPlacementId: Output only. The unique ID of the Campaign Manager 360 5320 // placement associated with the creative. This field is only applicable 5321 // for creatives that are synced from Campaign Manager. 5322 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"` 5323 5324 // CmTrackingAd: The Campaign Manager 360 tracking ad associated with 5325 // the creative. Optional for the following creative_type when created 5326 // by an advertiser that uses both Campaign Manager 360 and third-party 5327 // ad serving: * `CREATIVE_TYPE_NATIVE` * 5328 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` Output only for other cases. 5329 CmTrackingAd *CmTrackingAd `json:"cmTrackingAd,omitempty"` 5330 5331 // CompanionCreativeIds: The IDs of companion creatives for a video 5332 // creative. You can assign existing display creatives (with image or 5333 // HTML5 assets) to serve surrounding the publisher's video player. 5334 // Companions display around the video player while the video is playing 5335 // and remain after the video has completed. Creatives contain 5336 // additional dimensions can not be companion creatives. This field is 5337 // only supported for following creative_type: * `CREATIVE_TYPE_AUDIO` * 5338 // `CREATIVE_TYPE_VIDEO` 5339 CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"` 5340 5341 // CounterEvents: Counter events for a rich media creative. Counters 5342 // track the number of times that a user interacts with any part of a 5343 // rich media creative in a specified way (mouse-overs, mouse-outs, 5344 // clicks, taps, data loading, keyboard entries, etc.). Any event that 5345 // can be captured in the creative can be recorded as a counter. Leave 5346 // it empty or unset for creatives containing image assets only. 5347 CounterEvents []*CounterEvent `json:"counterEvents,omitempty"` 5348 5349 // CreateTime: Output only. The timestamp when the creative was created. 5350 // Assigned by the system. 5351 CreateTime string `json:"createTime,omitempty"` 5352 5353 // CreativeAttributes: Output only. A list of attributes of the creative 5354 // that is generated by the system. 5355 // 5356 // Possible values: 5357 // "CREATIVE_ATTRIBUTE_UNSPECIFIED" - The creative attribute is not 5358 // specified or is unknown in this version. 5359 // "CREATIVE_ATTRIBUTE_VAST" - The creative is a VAST creative. 5360 // "CREATIVE_ATTRIBUTE_VPAID_LINEAR" - The creative is a linear VPAID 5361 // creative. 5362 // "CREATIVE_ATTRIBUTE_VPAID_NON_LINEAR" - The creative is a 5363 // non-linear VPAID creative. 5364 CreativeAttributes []string `json:"creativeAttributes,omitempty"` 5365 5366 // CreativeId: Output only. The unique ID of the creative. Assigned by 5367 // the system. 5368 CreativeId int64 `json:"creativeId,omitempty,string"` 5369 5370 // CreativeType: Required. Immutable. The type of the creative. 5371 // 5372 // Possible values: 5373 // "CREATIVE_TYPE_UNSPECIFIED" - Type value is not specified or is 5374 // unknown in this version. 5375 // "CREATIVE_TYPE_STANDARD" - Standard display creative. Create and 5376 // update methods are supported for this creative type if the 5377 // hosting_source is one of the following: * `HOSTING_SOURCE_HOSTED` * 5378 // `HOSTING_SOURCE_THIRD_PARTY` 5379 // "CREATIVE_TYPE_EXPANDABLE" - Expandable creative. Create and update 5380 // methods are supported for this creative type if the hosting_source is 5381 // `HOSTING_SOURCE_THIRD_PARTY` 5382 // "CREATIVE_TYPE_VIDEO" - Video creative. Create and update methods 5383 // are supported for this creative type if the hosting_source is one of 5384 // the following: * `HOSTING_SOURCE_HOSTED` * 5385 // `HOSTING_SOURCE_THIRD_PARTY` 5386 // "CREATIVE_TYPE_NATIVE" - Native creative rendered by publishers 5387 // with assets from advertiser. Create and update methods are supported 5388 // for this creative type if the hosting_source is 5389 // `HOSTING_SOURCE_HOSTED` 5390 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL" - Templated app install 5391 // mobile creative (banner). Create and update methods are **not** 5392 // supported for this creative type. 5393 // "CREATIVE_TYPE_NATIVE_SITE_SQUARE" - Square native creative. Create 5394 // and update methods are supported for this creative type if the 5395 // hosting_source is `HOSTING_SOURCE_HOSTED` 5396 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL" - Interstitial 5397 // creative including both display and video. Create and update methods 5398 // are **not** supported for this creative type. 5399 // "CREATIVE_TYPE_LIGHTBOX" - Responsive and expandable Lightbox 5400 // creative. Create and update methods are **not** supported for this 5401 // creative type. 5402 // "CREATIVE_TYPE_NATIVE_APP_INSTALL" - Native app install creative. 5403 // Create and update methods are **not** supported for this creative 5404 // type. 5405 // "CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE" - Square native app 5406 // install creative. Create and update methods are **not** supported for 5407 // this creative type. 5408 // "CREATIVE_TYPE_AUDIO" - Audio creative. Create and update methods 5409 // are supported for this creative type if the hosting_source is 5410 // `HOSTING_SOURCE_HOSTED` 5411 // "CREATIVE_TYPE_PUBLISHER_HOSTED" - Publisher hosted creative. 5412 // Create and update methods are **not** supported for this creative 5413 // type. 5414 // "CREATIVE_TYPE_NATIVE_VIDEO" - Native video creative. Create and 5415 // update methods are supported for this creative type if the 5416 // hosting_source is `HOSTING_SOURCE_HOSTED` 5417 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO" - Templated app install 5418 // mobile video creative. Create and update methods are **not** 5419 // supported for this creative type. 5420 CreativeType string `json:"creativeType,omitempty"` 5421 5422 // Dimensions: Required. Primary dimensions of the creative. Applicable 5423 // to all creative types. The value of width_pixels and height_pixels 5424 // defaults to `0` when creative_type is one of: * `CREATIVE_TYPE_VIDEO` 5425 // * `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE_VIDEO` 5426 Dimensions *Dimensions `json:"dimensions,omitempty"` 5427 5428 // DisplayName: Required. The display name of the creative. Must be 5429 // UTF-8 encoded with a maximum size of 240 bytes. 5430 DisplayName string `json:"displayName,omitempty"` 5431 5432 // Dynamic: Output only. Indicates whether the creative is dynamic. 5433 Dynamic bool `json:"dynamic,omitempty"` 5434 5435 // EntityStatus: Required. Controls whether or not the creative can 5436 // serve. Accepted values are: * `ENTITY_STATUS_ACTIVE` * 5437 // `ENTITY_STATUS_ARCHIVED` * `ENTITY_STATUS_PAUSED` 5438 // 5439 // Possible values: 5440 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 5441 // specified or is unknown in this version. 5442 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 5443 // budget. 5444 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 5445 // budget spending are disabled. An entity can be deleted after 5446 // archived. Deleted entities cannot be retrieved. 5447 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 5448 // budget spending are disabled. 5449 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 5450 // the entity. 5451 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 5452 // for deletion. 5453 EntityStatus string `json:"entityStatus,omitempty"` 5454 5455 // ExitEvents: Required. Exit events for this creative. An exit (also 5456 // known as a click tag) is any area in your creative that someone can 5457 // click or tap to open an advertiser's landing page. Every creative 5458 // must include at least one exit. You can add an exit to your creative 5459 // in any of the following ways: * Use Google Web Designer's tap area. * 5460 // Define a JavaScript variable called "clickTag". * Use the Enabler 5461 // (Enabler.exit()) to track exits in rich media formats. 5462 ExitEvents []*ExitEvent `json:"exitEvents,omitempty"` 5463 5464 // ExpandOnHover: Optional. Indicates the creative will automatically 5465 // expand on hover. Optional and only valid for third-party expandable 5466 // creatives. Third-party expandable creatives are creatives with 5467 // following hosting source: * `HOSTING_SOURCE_THIRD_PARTY` combined 5468 // with following creative_type: * `CREATIVE_TYPE_EXPANDABLE` 5469 ExpandOnHover bool `json:"expandOnHover,omitempty"` 5470 5471 // ExpandingDirection: Optional. Specifies the expanding direction of 5472 // the creative. Required and only valid for third-party expandable 5473 // creatives. Third-party expandable creatives are creatives with 5474 // following hosting source: * `HOSTING_SOURCE_THIRD_PARTY` combined 5475 // with following creative_type: * `CREATIVE_TYPE_EXPANDABLE` 5476 // 5477 // Possible values: 5478 // "EXPANDING_DIRECTION_UNSPECIFIED" - The expanding direction is not 5479 // specified. 5480 // "EXPANDING_DIRECTION_NONE" - Does not expand in any direction. 5481 // "EXPANDING_DIRECTION_UP" - Expands up. 5482 // "EXPANDING_DIRECTION_DOWN" - Expands down. 5483 // "EXPANDING_DIRECTION_LEFT" - Expands left. 5484 // "EXPANDING_DIRECTION_RIGHT" - Expands right. 5485 // "EXPANDING_DIRECTION_UP_AND_LEFT" - Expands up and to the left 5486 // side. 5487 // "EXPANDING_DIRECTION_UP_AND_RIGHT" - Expands up and to the right 5488 // side. 5489 // "EXPANDING_DIRECTION_DOWN_AND_LEFT" - Expands down and to the left 5490 // side. 5491 // "EXPANDING_DIRECTION_DOWN_AND_RIGHT" - Expands down and to the 5492 // right side. 5493 // "EXPANDING_DIRECTION_UP_OR_DOWN" - Expands either up or down. 5494 // "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - Expands to either the left or 5495 // the right side. 5496 // "EXPANDING_DIRECTION_ANY_DIAGONAL" - Can expand in any diagonal 5497 // direction. 5498 ExpandingDirection string `json:"expandingDirection,omitempty"` 5499 5500 // HostingSource: Required. Indicates where the creative is hosted. 5501 // 5502 // Possible values: 5503 // "HOSTING_SOURCE_UNSPECIFIED" - Hosting source is not specified or 5504 // is unknown in this version. 5505 // "HOSTING_SOURCE_CM" - A creative synced from Campaign Manager 360. 5506 // Create and update methods are **not** supported for this hosting 5507 // type. 5508 // "HOSTING_SOURCE_THIRD_PARTY" - A creative hosted by a third-party 5509 // ad server (3PAS). Create and update methods are supported for this 5510 // hosting type if the creative_type is one of the following: * 5511 // `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_EXPANDABLE` * 5512 // `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO` 5513 // "HOSTING_SOURCE_HOSTED" - A creative created in DV360 and hosted by 5514 // Campaign Manager 360. Create and update methods are supported for 5515 // this hosting type if the creative_type is one of the following: * 5516 // `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE` * 5517 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` * 5518 // `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO` 5519 // "HOSTING_SOURCE_RICH_MEDIA" - A rich media creative created in 5520 // Studio and hosted by Campaign Manager 360. Create and update methods 5521 // are **not** supported for this hosting type. 5522 HostingSource string `json:"hostingSource,omitempty"` 5523 5524 // Html5Video: Output only. Indicates the third-party VAST tag creative 5525 // requires HTML5 Video support. Output only and only valid for 5526 // third-party VAST tag creatives. Third-party VAST tag creatives are 5527 // creatives with following hosting_source: * 5528 // `HOSTING_SOURCE_THIRD_PARTY` combined with following creative_type: * 5529 // `CREATIVE_TYPE_VIDEO` 5530 Html5Video bool `json:"html5Video,omitempty"` 5531 5532 // IasCampaignMonitoring: Indicates whether Integral Ad Science (IAS) 5533 // campaign monitoring is enabled. To enable this for the creative, make 5534 // sure the Advertiser.creative_config.ias_client_id has been set to 5535 // your IAS client ID. 5536 IasCampaignMonitoring bool `json:"iasCampaignMonitoring,omitempty"` 5537 5538 // IntegrationCode: ID information used to link this creative to an 5539 // external system. Must be UTF-8 encoded with a length of no more than 5540 // 10,000 characters. 5541 IntegrationCode string `json:"integrationCode,omitempty"` 5542 5543 // JsTrackerUrl: JavaScript measurement URL from supported third-party 5544 // verification providers (ComScore, DoubleVerify, IAS, Moat). HTML 5545 // script tags are not supported. This field is only writeable in 5546 // following creative_type: * `CREATIVE_TYPE_NATIVE` * 5547 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` 5548 JsTrackerUrl string `json:"jsTrackerUrl,omitempty"` 5549 5550 // LineItemIds: Output only. The IDs of the line items this creative is 5551 // associated with. To associate a creative to a line item, use 5552 // LineItem.creative_ids instead. 5553 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"` 5554 5555 // MediaDuration: Output only. Media duration of the creative. 5556 // Applicable when creative_type is one of: * `CREATIVE_TYPE_VIDEO` * 5557 // `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_NATIVE_VIDEO` * 5558 // `CREATIVE_TYPE_PUBLISHER_HOSTED` 5559 MediaDuration string `json:"mediaDuration,omitempty"` 5560 5561 // Mp3Audio: Output only. Indicates the third-party audio creative 5562 // supports MP3. Output only and only valid for third-party audio 5563 // creatives. Third-party audio creatives are creatives with following 5564 // hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined with 5565 // following creative_type: * `CREATIVE_TYPE_AUDIO` 5566 Mp3Audio bool `json:"mp3Audio,omitempty"` 5567 5568 // Name: Output only. The resource name of the creative. 5569 Name string `json:"name,omitempty"` 5570 5571 // Notes: User notes for this creative. Must be UTF-8 encoded with a 5572 // length of no more than 20,000 characters. 5573 Notes string `json:"notes,omitempty"` 5574 5575 // ObaIcon: Specifies the OBA icon for a video creative. This field is 5576 // only supported in following creative_type: * `CREATIVE_TYPE_VIDEO` 5577 ObaIcon *ObaIcon `json:"obaIcon,omitempty"` 5578 5579 // OggAudio: Output only. Indicates the third-party audio creative 5580 // supports OGG. Output only and only valid for third-party audio 5581 // creatives. Third-party audio creatives are creatives with following 5582 // hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined with 5583 // following creative_type: * `CREATIVE_TYPE_AUDIO` 5584 OggAudio bool `json:"oggAudio,omitempty"` 5585 5586 // ProgressOffset: Amount of time to play the video before counting a 5587 // view. This field is required when skippable is true. This field is 5588 // only supported for the following creative_type: * 5589 // `CREATIVE_TYPE_VIDEO` 5590 ProgressOffset *AudioVideoOffset `json:"progressOffset,omitempty"` 5591 5592 // RequireHtml5: Optional. Indicates that the creative relies on HTML5 5593 // to render properly. Optional and only valid for third-party tag 5594 // creatives. Third-party tag creatives are creatives with following 5595 // hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined with 5596 // following creative_type: * `CREATIVE_TYPE_STANDARD` * 5597 // `CREATIVE_TYPE_EXPANDABLE` 5598 RequireHtml5 bool `json:"requireHtml5,omitempty"` 5599 5600 // RequireMraid: Optional. Indicates that the creative requires MRAID 5601 // (Mobile Rich Media Ad Interface Definitions system). Set this if the 5602 // creative relies on mobile gestures for interactivity, such as swiping 5603 // or tapping. Optional and only valid for third-party tag creatives. 5604 // Third-party tag creatives are creatives with following 5605 // hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined with 5606 // following creative_type: * `CREATIVE_TYPE_STANDARD` * 5607 // `CREATIVE_TYPE_EXPANDABLE` 5608 RequireMraid bool `json:"requireMraid,omitempty"` 5609 5610 // RequirePingForAttribution: Optional. Indicates that the creative will 5611 // wait for a return ping for attribution. Only valid when using a 5612 // Campaign Manager 360 tracking ad with a third-party ad server 5613 // parameter and the ${DC_DBM_TOKEN} macro. Optional and only valid for 5614 // third-party tag creatives or third-party VAST tag creatives. 5615 // Third-party tag creatives are creatives with following 5616 // hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined with 5617 // following creative_type: * `CREATIVE_TYPE_STANDARD` * 5618 // `CREATIVE_TYPE_EXPANDABLE` Third-party VAST tag creatives are 5619 // creatives with following hosting_source: * 5620 // `HOSTING_SOURCE_THIRD_PARTY` combined with following creative_type: * 5621 // `CREATIVE_TYPE_AUDIO` * `CREATIVE_TYPE_VIDEO` 5622 RequirePingForAttribution bool `json:"requirePingForAttribution,omitempty"` 5623 5624 // ReviewStatus: Output only. The current status of the creative review 5625 // process. 5626 ReviewStatus *ReviewStatusInfo `json:"reviewStatus,omitempty"` 5627 5628 // SkipOffset: Amount of time to play the video before the skip button 5629 // appears. This field is required when skippable is true. This field is 5630 // only supported for the following creative_type: * 5631 // `CREATIVE_TYPE_VIDEO` 5632 SkipOffset *AudioVideoOffset `json:"skipOffset,omitempty"` 5633 5634 // Skippable: Whether the user can choose to skip a video creative. This 5635 // field is only supported for the following creative_type: * 5636 // `CREATIVE_TYPE_VIDEO` 5637 Skippable bool `json:"skippable,omitempty"` 5638 5639 // ThirdPartyTag: Optional. The original third-party tag used for the 5640 // creative. Required and only valid for third-party tag creatives. 5641 // Third-party tag creatives are creatives with following 5642 // hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined with 5643 // following creative_type: * `CREATIVE_TYPE_STANDARD` * 5644 // `CREATIVE_TYPE_EXPANDABLE` 5645 ThirdPartyTag string `json:"thirdPartyTag,omitempty"` 5646 5647 // ThirdPartyUrls: Tracking URLs from third parties to track 5648 // interactions with a video creative. This field is only supported for 5649 // the following creative_type: * `CREATIVE_TYPE_AUDIO` * 5650 // `CREATIVE_TYPE_VIDEO` * `CREATIVE_TYPE_NATIVE_VIDEO` 5651 ThirdPartyUrls []*ThirdPartyUrl `json:"thirdPartyUrls,omitempty"` 5652 5653 // TimerEvents: Timer custom events for a rich media creative. Timers 5654 // track the time during which a user views and interacts with a 5655 // specified part of a rich media creative. A creative can have multiple 5656 // timer events, each timed independently. Leave it empty or unset for 5657 // creatives containing image assets only. 5658 TimerEvents []*TimerEvent `json:"timerEvents,omitempty"` 5659 5660 // TrackerUrls: Tracking URLs for analytics providers or third-party ad 5661 // technology vendors. The URLs must start with https (except on 5662 // inventory that doesn't require SSL compliance). If using macros in 5663 // your URL, use only macros supported by Display & Video 360. Standard 5664 // URLs only, no IMG or SCRIPT tags. This field is only writeable in 5665 // following creative_type: * `CREATIVE_TYPE_NATIVE` * 5666 // `CREATIVE_TYPE_NATIVE_SITE_SQUARE` * `CREATIVE_TYPE_NATIVE_VIDEO` 5667 TrackerUrls []string `json:"trackerUrls,omitempty"` 5668 5669 // Transcodes: Output only. Audio/Video transcodes. Display & Video 360 5670 // transcodes the main asset into a number of alternative versions that 5671 // use different file formats or have different properties (resolution, 5672 // audio bit rate, and video bit rate), each designed for specific video 5673 // players or bandwidths. These transcodes give a publisher's system 5674 // more options to choose from for each impression on your video and 5675 // ensures that the appropriate file serves based on the viewer’s 5676 // connection and screen size. This field is only supported in following 5677 // creative_type: * `CREATIVE_TYPE_VIDEO` * `CREATIVE_TYPE_NATIVE_VIDEO` 5678 // * `CREATIVE_TYPE_AUDIO` 5679 Transcodes []*Transcode `json:"transcodes,omitempty"` 5680 5681 // UniversalAdId: Optional. An optional creative identifier provided by 5682 // a registry that is unique across all platforms. Universal Ad ID is 5683 // part of the VAST 4.0 standard. It can be modified after the creative 5684 // is created. This field is only supported for the following 5685 // creative_type: * `CREATIVE_TYPE_VIDEO` 5686 UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"` 5687 5688 // UpdateTime: Output only. The timestamp when the creative was last 5689 // updated, either by the user or system (e.g. creative review). 5690 // Assigned by the system. 5691 UpdateTime string `json:"updateTime,omitempty"` 5692 5693 // VastTagUrl: Optional. The URL of the VAST tag for a third-party VAST 5694 // tag creative. Required and only valid for third-party VAST tag 5695 // creatives. Third-party VAST tag creatives are creatives with 5696 // following hosting_source: * `HOSTING_SOURCE_THIRD_PARTY` combined 5697 // with following creative_type: * `CREATIVE_TYPE_AUDIO` * 5698 // `CREATIVE_TYPE_VIDEO` 5699 VastTagUrl string `json:"vastTagUrl,omitempty"` 5700 5701 // Vpaid: Output only. Indicates the third-party VAST tag creative 5702 // requires VPAID (Digital Video Player-Ad Interface). Output only and 5703 // only valid for third-party VAST tag creatives. Third-party VAST tag 5704 // creatives are creatives with following hosting_source: * 5705 // `HOSTING_SOURCE_THIRD_PARTY` combined with following creative_type: * 5706 // `CREATIVE_TYPE_VIDEO` 5707 Vpaid bool `json:"vpaid,omitempty"` 5708 5709 // ServerResponse contains the HTTP response code and headers from the 5710 // server. 5711 googleapi.ServerResponse `json:"-"` 5712 5713 // ForceSendFields is a list of field names (e.g. 5714 // "AdditionalDimensions") to unconditionally include in API requests. 5715 // By default, fields with empty or default values are omitted from API 5716 // requests. However, any non-pointer, non-interface field appearing in 5717 // ForceSendFields will be sent to the server regardless of whether the 5718 // field is empty or not. This may be used to include empty fields in 5719 // Patch requests. 5720 ForceSendFields []string `json:"-"` 5721 5722 // NullFields is a list of field names (e.g. "AdditionalDimensions") to 5723 // include in API requests with the JSON null value. By default, fields 5724 // with empty values are omitted from API requests. However, any field 5725 // with an empty value appearing in NullFields will be sent to the 5726 // server as null. It is an error if a field in this list has a 5727 // non-empty value. This may be used to include null fields in Patch 5728 // requests. 5729 NullFields []string `json:"-"` 5730 } 5731 5732 func (s *Creative) MarshalJSON() ([]byte, error) { 5733 type NoMethod Creative 5734 raw := NoMethod(*s) 5735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5736 } 5737 5738 // CreativeConfig: Creative requirements configuration for the inventory 5739 // source. 5740 type CreativeConfig struct { 5741 // CreativeType: The type of creative that can be assigned to the 5742 // inventory source. Only the following types are supported: * 5743 // `CREATIVE_TYPE_STANDARD` * `CREATIVE_TYPE_VIDEO` 5744 // 5745 // Possible values: 5746 // "CREATIVE_TYPE_UNSPECIFIED" - Type value is not specified or is 5747 // unknown in this version. 5748 // "CREATIVE_TYPE_STANDARD" - Standard display creative. Create and 5749 // update methods are supported for this creative type if the 5750 // hosting_source is one of the following: * `HOSTING_SOURCE_HOSTED` * 5751 // `HOSTING_SOURCE_THIRD_PARTY` 5752 // "CREATIVE_TYPE_EXPANDABLE" - Expandable creative. Create and update 5753 // methods are supported for this creative type if the hosting_source is 5754 // `HOSTING_SOURCE_THIRD_PARTY` 5755 // "CREATIVE_TYPE_VIDEO" - Video creative. Create and update methods 5756 // are supported for this creative type if the hosting_source is one of 5757 // the following: * `HOSTING_SOURCE_HOSTED` * 5758 // `HOSTING_SOURCE_THIRD_PARTY` 5759 // "CREATIVE_TYPE_NATIVE" - Native creative rendered by publishers 5760 // with assets from advertiser. Create and update methods are supported 5761 // for this creative type if the hosting_source is 5762 // `HOSTING_SOURCE_HOSTED` 5763 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL" - Templated app install 5764 // mobile creative (banner). Create and update methods are **not** 5765 // supported for this creative type. 5766 // "CREATIVE_TYPE_NATIVE_SITE_SQUARE" - Square native creative. Create 5767 // and update methods are supported for this creative type if the 5768 // hosting_source is `HOSTING_SOURCE_HOSTED` 5769 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL" - Interstitial 5770 // creative including both display and video. Create and update methods 5771 // are **not** supported for this creative type. 5772 // "CREATIVE_TYPE_LIGHTBOX" - Responsive and expandable Lightbox 5773 // creative. Create and update methods are **not** supported for this 5774 // creative type. 5775 // "CREATIVE_TYPE_NATIVE_APP_INSTALL" - Native app install creative. 5776 // Create and update methods are **not** supported for this creative 5777 // type. 5778 // "CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE" - Square native app 5779 // install creative. Create and update methods are **not** supported for 5780 // this creative type. 5781 // "CREATIVE_TYPE_AUDIO" - Audio creative. Create and update methods 5782 // are supported for this creative type if the hosting_source is 5783 // `HOSTING_SOURCE_HOSTED` 5784 // "CREATIVE_TYPE_PUBLISHER_HOSTED" - Publisher hosted creative. 5785 // Create and update methods are **not** supported for this creative 5786 // type. 5787 // "CREATIVE_TYPE_NATIVE_VIDEO" - Native video creative. Create and 5788 // update methods are supported for this creative type if the 5789 // hosting_source is `HOSTING_SOURCE_HOSTED` 5790 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO" - Templated app install 5791 // mobile video creative. Create and update methods are **not** 5792 // supported for this creative type. 5793 CreativeType string `json:"creativeType,omitempty"` 5794 5795 // DisplayCreativeConfig: The configuration for display creatives. 5796 // Applicable when creative_type is `CREATIVE_TYPE_STANDARD`. 5797 DisplayCreativeConfig *InventorySourceDisplayCreativeConfig `json:"displayCreativeConfig,omitempty"` 5798 5799 // VideoCreativeConfig: The configuration for video creatives. 5800 // Applicable when creative_type is `CREATIVE_TYPE_VIDEO`. 5801 VideoCreativeConfig *InventorySourceVideoCreativeConfig `json:"videoCreativeConfig,omitempty"` 5802 5803 // ForceSendFields is a list of field names (e.g. "CreativeType") to 5804 // unconditionally include in API requests. By default, fields with 5805 // empty or default values are omitted from API requests. However, any 5806 // non-pointer, non-interface field appearing in ForceSendFields will be 5807 // sent to the server regardless of whether the field is empty or not. 5808 // This may be used to include empty fields in Patch requests. 5809 ForceSendFields []string `json:"-"` 5810 5811 // NullFields is a list of field names (e.g. "CreativeType") to include 5812 // in API requests with the JSON null value. By default, fields with 5813 // empty values are omitted from API requests. However, any field with 5814 // an empty value appearing in NullFields will be sent to the server as 5815 // null. It is an error if a field in this list has a non-empty value. 5816 // This may be used to include null fields in Patch requests. 5817 NullFields []string `json:"-"` 5818 } 5819 5820 func (s *CreativeConfig) MarshalJSON() ([]byte, error) { 5821 type NoMethod CreativeConfig 5822 raw := NoMethod(*s) 5823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5824 } 5825 5826 // CustomBiddingAlgorithm: A single custom bidding algorithm. 5827 type CustomBiddingAlgorithm struct { 5828 // AdvertiserId: Immutable. The unique ID of the advertiser that owns 5829 // the custom bidding algorithm. 5830 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 5831 5832 // CustomBiddingAlgorithmId: Output only. The unique ID of the custom 5833 // bidding algorithm. Assigned by the system. 5834 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"` 5835 5836 // CustomBiddingAlgorithmState: Output only. The status of custom 5837 // bidding algorithm. 5838 // 5839 // Possible values: 5840 // "STATE_UNSPECIFIED" - State is not specified or is unknown in this 5841 // version. 5842 // "ENABLED" - Algorithm is enabled, either recently used, currently 5843 // used or scheduled to be used. The algorithm is actively scoring 5844 // impressions. 5845 // "DORMANT" - Algorithm has not been used recently. Although the 5846 // algorithm still acts as `ENABLED`, it will eventually be suspended if 5847 // not used. 5848 // "SUSPENDED" - Algorithm is susepended from scoring impressions and 5849 // doesn't have a serving model trained. If the algorithm is assigned to 5850 // a line item or otherwise updated, it will switch back to the 5851 // `ENABLED` state and require time to prepare the serving model again. 5852 CustomBiddingAlgorithmState string `json:"customBiddingAlgorithmState,omitempty"` 5853 5854 // CustomBiddingAlgorithmType: Required. Immutable. The type of custom 5855 // bidding algorithm. 5856 // 5857 // Possible values: 5858 // "CUSTOM_BIDDING_ALGORITHM_TYPE_UNSPECIFIED" - Algorithm type is not 5859 // specified or is unknown in this version. 5860 // "SCRIPT_BASED" - Algorithm generated through customer-uploaded 5861 // custom bidding script files. 5862 // "ADS_DATA_HUB_BASED" - Algorithm created through Ads Data Hub 5863 // product. 5864 // "GOAL_BUILDER_BASED" - Algorithm created through goal builder in 5865 // DV3 UI. 5866 CustomBiddingAlgorithmType string `json:"customBiddingAlgorithmType,omitempty"` 5867 5868 // DisplayName: Required. The display name of the custom bidding 5869 // algorithm. Must be UTF-8 encoded with a maximum size of 240 bytes. 5870 DisplayName string `json:"displayName,omitempty"` 5871 5872 // EntityStatus: Controls whether or not the custom bidding algorithm 5873 // can be used as a bidding strategy. Accepted values are: * 5874 // `ENTITY_STATUS_ACTIVE` * `ENTITY_STATUS_ARCHIVED` 5875 // 5876 // Possible values: 5877 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 5878 // specified or is unknown in this version. 5879 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 5880 // budget. 5881 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 5882 // budget spending are disabled. An entity can be deleted after 5883 // archived. Deleted entities cannot be retrieved. 5884 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 5885 // budget spending are disabled. 5886 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 5887 // the entity. 5888 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 5889 // for deletion. 5890 EntityStatus string `json:"entityStatus,omitempty"` 5891 5892 // ModelReadiness: Output only. The state of custom bidding model 5893 // readiness for each advertiser who has access. This field may only 5894 // include the state of the queried advertiser if the algorithm `owner` 5895 // (/display-video/api/reference/rest/v1/customBiddingAlgorithms#CustomBi 5896 // ddingAlgorithm.FIELDS.oneof_owner) is a partner and is being 5897 // retrieved using an advertiser `accessor` 5898 // (/display-video/api/reference/rest/v1/customBiddingAlgorithms/list#bod 5899 // y.QUERY_PARAMETERS.oneof_accessor). 5900 ModelReadiness []*CustomBiddingModelReadinessState `json:"modelReadiness,omitempty"` 5901 5902 // Name: Output only. The resource name of the custom bidding algorithm. 5903 Name string `json:"name,omitempty"` 5904 5905 // PartnerId: Immutable. The unique ID of the partner that owns the 5906 // custom bidding algorithm. 5907 PartnerId int64 `json:"partnerId,omitempty,string"` 5908 5909 // SharedAdvertiserIds: The IDs of the advertisers who have access to 5910 // this algorithm. If advertiser_id is set, this field will only consist 5911 // of that value. This field will not be set if the algorithm `owner` 5912 // (/display-video/api/reference/rest/v1/customBiddingAlgorithms#CustomBi 5913 // ddingAlgorithm.FIELDS.oneof_owner) is a partner and is being 5914 // retrieved using an advertiser `accessor` 5915 // (/display-video/api/reference/rest/v1/customBiddingAlgorithms/list#bod 5916 // y.QUERY_PARAMETERS.oneof_accessor). 5917 SharedAdvertiserIds googleapi.Int64s `json:"sharedAdvertiserIds,omitempty"` 5918 5919 // ServerResponse contains the HTTP response code and headers from the 5920 // server. 5921 googleapi.ServerResponse `json:"-"` 5922 5923 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 5924 // unconditionally include in API requests. By default, fields with 5925 // empty or default values are omitted from API requests. However, any 5926 // non-pointer, non-interface field appearing in ForceSendFields will be 5927 // sent to the server regardless of whether the field is empty or not. 5928 // This may be used to include empty fields in Patch requests. 5929 ForceSendFields []string `json:"-"` 5930 5931 // NullFields is a list of field names (e.g. "AdvertiserId") to include 5932 // in API requests with the JSON null value. By default, fields with 5933 // empty values are omitted from API requests. However, any field with 5934 // an empty value appearing in NullFields will be sent to the server as 5935 // null. It is an error if a field in this list has a non-empty value. 5936 // This may be used to include null fields in Patch requests. 5937 NullFields []string `json:"-"` 5938 } 5939 5940 func (s *CustomBiddingAlgorithm) MarshalJSON() ([]byte, error) { 5941 type NoMethod CustomBiddingAlgorithm 5942 raw := NoMethod(*s) 5943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5944 } 5945 5946 // CustomBiddingModelReadinessState: The custom bidding algorithm model 5947 // readiness state for a single shared advertiser. 5948 type CustomBiddingModelReadinessState struct { 5949 // AdvertiserId: The unique ID of the relevant advertiser. 5950 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 5951 5952 // ReadinessState: The readiness state of custom bidding model. 5953 // 5954 // Possible values: 5955 // "READINESS_STATE_UNSPECIFIED" - State is not specified or is 5956 // unknown in this version. 5957 // "READINESS_STATE_ACTIVE" - The model is trained and ready for 5958 // serving. 5959 // "READINESS_STATE_INSUFFICIENT_DATA" - There is not enough data to 5960 // train the serving model. 5961 // "READINESS_STATE_TRAINING" - The model is training and not ready 5962 // for serving. 5963 // "READINESS_STATE_NO_VALID_SCRIPT" - A valid custom bidding script 5964 // has not been provided with which to train the model. This state will 5965 // only be applied to algorithms whose `custom_bidding_algorithm_type` 5966 // is `SCRIPT_BASED`. 5967 ReadinessState string `json:"readinessState,omitempty"` 5968 5969 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 5970 // unconditionally include in API requests. By default, fields with 5971 // empty or default values are omitted from API requests. However, any 5972 // non-pointer, non-interface field appearing in ForceSendFields will be 5973 // sent to the server regardless of whether the field is empty or not. 5974 // This may be used to include empty fields in Patch requests. 5975 ForceSendFields []string `json:"-"` 5976 5977 // NullFields is a list of field names (e.g. "AdvertiserId") to include 5978 // in API requests with the JSON null value. By default, fields with 5979 // empty values are omitted from API requests. However, any field with 5980 // an empty value appearing in NullFields will be sent to the server as 5981 // null. It is an error if a field in this list has a non-empty value. 5982 // This may be used to include null fields in Patch requests. 5983 NullFields []string `json:"-"` 5984 } 5985 5986 func (s *CustomBiddingModelReadinessState) MarshalJSON() ([]byte, error) { 5987 type NoMethod CustomBiddingModelReadinessState 5988 raw := NoMethod(*s) 5989 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5990 } 5991 5992 // CustomBiddingScript: A single custom bidding script. 5993 type CustomBiddingScript struct { 5994 // Active: Output only. Whether the script is currently being used for 5995 // scoring by the parent algorithm. 5996 Active bool `json:"active,omitempty"` 5997 5998 // CreateTime: Output only. The time when the script was created. 5999 CreateTime string `json:"createTime,omitempty"` 6000 6001 // CustomBiddingAlgorithmId: Output only. The unique ID of the custom 6002 // bidding algorithm the script belongs to. 6003 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"` 6004 6005 // CustomBiddingScriptId: Output only. The unique ID of the custom 6006 // bidding script. 6007 CustomBiddingScriptId int64 `json:"customBiddingScriptId,omitempty,string"` 6008 6009 // Errors: Output only. Error details of a rejected custom bidding 6010 // script. This field will only be populated when state is REJECTED. 6011 Errors []*ScriptError `json:"errors,omitempty"` 6012 6013 // Name: Output only. The resource name of the custom bidding script. 6014 Name string `json:"name,omitempty"` 6015 6016 // Script: The reference to the uploaded script file. 6017 Script *CustomBiddingScriptRef `json:"script,omitempty"` 6018 6019 // State: Output only. The state of the custom bidding script. 6020 // 6021 // Possible values: 6022 // "STATE_UNSPECIFIED" - The script state is not specified or is 6023 // unknown in this version. 6024 // "ACCEPTED" - The script has been accepted for scoring impressions. 6025 // "REJECTED" - The script has been rejected by backend pipelines. It 6026 // may have errors. 6027 // "PENDING" - The script is being processed for backend pipelines. 6028 State string `json:"state,omitempty"` 6029 6030 // ServerResponse contains the HTTP response code and headers from the 6031 // server. 6032 googleapi.ServerResponse `json:"-"` 6033 6034 // ForceSendFields is a list of field names (e.g. "Active") to 6035 // unconditionally include in API requests. By default, fields with 6036 // empty or default values are omitted from API requests. However, any 6037 // non-pointer, non-interface field appearing in ForceSendFields will be 6038 // sent to the server regardless of whether the field is empty or not. 6039 // This may be used to include empty fields in Patch requests. 6040 ForceSendFields []string `json:"-"` 6041 6042 // NullFields is a list of field names (e.g. "Active") to include in API 6043 // requests with the JSON null value. By default, fields with empty 6044 // values are omitted from API requests. However, any field with an 6045 // empty value appearing in NullFields will be sent to the server as 6046 // null. It is an error if a field in this list has a non-empty value. 6047 // This may be used to include null fields in Patch requests. 6048 NullFields []string `json:"-"` 6049 } 6050 6051 func (s *CustomBiddingScript) MarshalJSON() ([]byte, error) { 6052 type NoMethod CustomBiddingScript 6053 raw := NoMethod(*s) 6054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6055 } 6056 6057 // CustomBiddingScriptRef: The reference to the uploaded custom bidding 6058 // script file. 6059 type CustomBiddingScriptRef struct { 6060 // ResourceName: A resource name to be used in media.download to 6061 // Download the script files. Or media.upload to Upload the script 6062 // files. Resource names have the format 6063 // `customBiddingAlgorithms/{custom_bidding_algorithm_id}/scriptRef/{ref_ 6064 // id}`. 6065 ResourceName string `json:"resourceName,omitempty"` 6066 6067 // ServerResponse contains the HTTP response code and headers from the 6068 // server. 6069 googleapi.ServerResponse `json:"-"` 6070 6071 // ForceSendFields is a list of field names (e.g. "ResourceName") to 6072 // unconditionally include in API requests. By default, fields with 6073 // empty or default values are omitted from API requests. However, any 6074 // non-pointer, non-interface field appearing in ForceSendFields will be 6075 // sent to the server regardless of whether the field is empty or not. 6076 // This may be used to include empty fields in Patch requests. 6077 ForceSendFields []string `json:"-"` 6078 6079 // NullFields is a list of field names (e.g. "ResourceName") to include 6080 // in API requests with the JSON null value. By default, fields with 6081 // empty values are omitted from API requests. However, any field with 6082 // an empty value appearing in NullFields will be sent to the server as 6083 // null. It is an error if a field in this list has a non-empty value. 6084 // This may be used to include null fields in Patch requests. 6085 NullFields []string `json:"-"` 6086 } 6087 6088 func (s *CustomBiddingScriptRef) MarshalJSON() ([]byte, error) { 6089 type NoMethod CustomBiddingScriptRef 6090 raw := NoMethod(*s) 6091 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6092 } 6093 6094 // CustomList: Describes a custom list entity, such as a custom affinity 6095 // or custom intent audience list. 6096 type CustomList struct { 6097 // CustomListId: Output only. The unique ID of the custom list. Assigned 6098 // by the system. 6099 CustomListId int64 `json:"customListId,omitempty,string"` 6100 6101 // DisplayName: Output only. The display name of the custom list. . 6102 DisplayName string `json:"displayName,omitempty"` 6103 6104 // Name: Output only. The resource name of the custom list. 6105 Name string `json:"name,omitempty"` 6106 6107 // ServerResponse contains the HTTP response code and headers from the 6108 // server. 6109 googleapi.ServerResponse `json:"-"` 6110 6111 // ForceSendFields is a list of field names (e.g. "CustomListId") to 6112 // unconditionally include in API requests. By default, fields with 6113 // empty or default values are omitted from API requests. However, any 6114 // non-pointer, non-interface field appearing in ForceSendFields will be 6115 // sent to the server regardless of whether the field is empty or not. 6116 // This may be used to include empty fields in Patch requests. 6117 ForceSendFields []string `json:"-"` 6118 6119 // NullFields is a list of field names (e.g. "CustomListId") to include 6120 // in API requests with the JSON null value. By default, fields with 6121 // empty values are omitted from API requests. However, any field with 6122 // an empty value appearing in NullFields will be sent to the server as 6123 // null. It is an error if a field in this list has a non-empty value. 6124 // This may be used to include null fields in Patch requests. 6125 NullFields []string `json:"-"` 6126 } 6127 6128 func (s *CustomList) MarshalJSON() ([]byte, error) { 6129 type NoMethod CustomList 6130 raw := NoMethod(*s) 6131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6132 } 6133 6134 // CustomListGroup: Details of custom list group. All custom list 6135 // targeting settings are logically ‘OR’ of each other. 6136 type CustomListGroup struct { 6137 // Settings: Required. All custom list targeting settings in custom list 6138 // group. Repeated settings with same id will be ignored. 6139 Settings []*CustomListTargetingSetting `json:"settings,omitempty"` 6140 6141 // ForceSendFields is a list of field names (e.g. "Settings") to 6142 // unconditionally include in API requests. By default, fields with 6143 // empty or default values are omitted from API requests. However, any 6144 // non-pointer, non-interface field appearing in ForceSendFields will be 6145 // sent to the server regardless of whether the field is empty or not. 6146 // This may be used to include empty fields in Patch requests. 6147 ForceSendFields []string `json:"-"` 6148 6149 // NullFields is a list of field names (e.g. "Settings") to include in 6150 // API requests with the JSON null value. By default, fields with empty 6151 // values are omitted from API requests. However, any field with an 6152 // empty value appearing in NullFields will be sent to the server as 6153 // null. It is an error if a field in this list has a non-empty value. 6154 // This may be used to include null fields in Patch requests. 6155 NullFields []string `json:"-"` 6156 } 6157 6158 func (s *CustomListGroup) MarshalJSON() ([]byte, error) { 6159 type NoMethod CustomListGroup 6160 raw := NoMethod(*s) 6161 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6162 } 6163 6164 // CustomListTargetingSetting: Details of custom list targeting setting. 6165 type CustomListTargetingSetting struct { 6166 // CustomListId: Required. Custom id of custom list targeting setting. 6167 // This id is custom_list_id. 6168 CustomListId int64 `json:"customListId,omitempty,string"` 6169 6170 // ForceSendFields is a list of field names (e.g. "CustomListId") to 6171 // unconditionally include in API requests. By default, fields with 6172 // empty or default values are omitted from API requests. However, any 6173 // non-pointer, non-interface field appearing in ForceSendFields will be 6174 // sent to the server regardless of whether the field is empty or not. 6175 // This may be used to include empty fields in Patch requests. 6176 ForceSendFields []string `json:"-"` 6177 6178 // NullFields is a list of field names (e.g. "CustomListId") to include 6179 // in API requests with the JSON null value. By default, fields with 6180 // empty values are omitted from API requests. However, any field with 6181 // an empty value appearing in NullFields will be sent to the server as 6182 // null. It is an error if a field in this list has a non-empty value. 6183 // This may be used to include null fields in Patch requests. 6184 NullFields []string `json:"-"` 6185 } 6186 6187 func (s *CustomListTargetingSetting) MarshalJSON() ([]byte, error) { 6188 type NoMethod CustomListTargetingSetting 6189 raw := NoMethod(*s) 6190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6191 } 6192 6193 // Date: Represents a whole or partial calendar date, such as a 6194 // birthday. The time of day and time zone are either specified 6195 // elsewhere or are insignificant. The date is relative to the Gregorian 6196 // Calendar. This can represent one of the following: * A full date, 6197 // with non-zero year, month, and day values. * A month and day, with a 6198 // zero year (for example, an anniversary). * A year on its own, with a 6199 // zero month and a zero day. * A year and month, with a zero day (for 6200 // example, a credit card expiration date). Related types: * 6201 // google.type.TimeOfDay * google.type.DateTime * 6202 // google.protobuf.Timestamp 6203 type Date struct { 6204 // Day: Day of a month. Must be from 1 to 31 and valid for the year and 6205 // month, or 0 to specify a year by itself or a year and month where the 6206 // day isn't significant. 6207 Day int64 `json:"day,omitempty"` 6208 6209 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year 6210 // without a month and day. 6211 Month int64 `json:"month,omitempty"` 6212 6213 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a 6214 // date without a year. 6215 Year int64 `json:"year,omitempty"` 6216 6217 // ForceSendFields is a list of field names (e.g. "Day") to 6218 // unconditionally include in API requests. By default, fields with 6219 // empty or default values are omitted from API requests. However, any 6220 // non-pointer, non-interface field appearing in ForceSendFields will be 6221 // sent to the server regardless of whether the field is empty or not. 6222 // This may be used to include empty fields in Patch requests. 6223 ForceSendFields []string `json:"-"` 6224 6225 // NullFields is a list of field names (e.g. "Day") to include in API 6226 // requests with the JSON null value. By default, fields with empty 6227 // values are omitted from API requests. However, any field with an 6228 // empty value appearing in NullFields will be sent to the server as 6229 // null. It is an error if a field in this list has a non-empty value. 6230 // This may be used to include null fields in Patch requests. 6231 NullFields []string `json:"-"` 6232 } 6233 6234 func (s *Date) MarshalJSON() ([]byte, error) { 6235 type NoMethod Date 6236 raw := NoMethod(*s) 6237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6238 } 6239 6240 // DateRange: A date range. 6241 type DateRange struct { 6242 // EndDate: The upper bound of the date range, inclusive. Must specify a 6243 // positive value for `year`, `month`, and `day`. 6244 EndDate *Date `json:"endDate,omitempty"` 6245 6246 // StartDate: The lower bound of the date range, inclusive. Must specify 6247 // a positive value for `year`, `month`, and `day`. 6248 StartDate *Date `json:"startDate,omitempty"` 6249 6250 // ForceSendFields is a list of field names (e.g. "EndDate") to 6251 // unconditionally include in API requests. By default, fields with 6252 // empty or default values are omitted from API requests. However, any 6253 // non-pointer, non-interface field appearing in ForceSendFields will be 6254 // sent to the server regardless of whether the field is empty or not. 6255 // This may be used to include empty fields in Patch requests. 6256 ForceSendFields []string `json:"-"` 6257 6258 // NullFields is a list of field names (e.g. "EndDate") to include in 6259 // API requests with the JSON null value. By default, fields with empty 6260 // values are omitted from API requests. However, any field with an 6261 // empty value appearing in NullFields will be sent to the server as 6262 // null. It is an error if a field in this list has a non-empty value. 6263 // This may be used to include null fields in Patch requests. 6264 NullFields []string `json:"-"` 6265 } 6266 6267 func (s *DateRange) MarshalJSON() ([]byte, error) { 6268 type NoMethod DateRange 6269 raw := NoMethod(*s) 6270 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6271 } 6272 6273 // DayAndTimeAssignedTargetingOptionDetails: Representation of a segment 6274 // of time defined on a specific day of the week and with a start and 6275 // end time. The time represented by `start_hour` must be before the 6276 // time represented by `end_hour`. 6277 type DayAndTimeAssignedTargetingOptionDetails struct { 6278 // DayOfWeek: Required. The day of the week for this day and time 6279 // targeting setting. 6280 // 6281 // Possible values: 6282 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 6283 // "MONDAY" - Monday 6284 // "TUESDAY" - Tuesday 6285 // "WEDNESDAY" - Wednesday 6286 // "THURSDAY" - Thursday 6287 // "FRIDAY" - Friday 6288 // "SATURDAY" - Saturday 6289 // "SUNDAY" - Sunday 6290 DayOfWeek string `json:"dayOfWeek,omitempty"` 6291 6292 // EndHour: Required. The end hour for day and time targeting. Must be 6293 // between 1 (1 hour after start of day) and 24 (end of day). 6294 EndHour int64 `json:"endHour,omitempty"` 6295 6296 // StartHour: Required. The start hour for day and time targeting. Must 6297 // be between 0 (start of day) and 23 (1 hour before end of day). 6298 StartHour int64 `json:"startHour,omitempty"` 6299 6300 // TimeZoneResolution: Required. The mechanism used to determine which 6301 // timezone to use for this day and time targeting setting. 6302 // 6303 // Possible values: 6304 // "TIME_ZONE_RESOLUTION_UNSPECIFIED" - Time zone resolution is either 6305 // unspecific or unknown. 6306 // "TIME_ZONE_RESOLUTION_END_USER" - Times are resolved in the time 6307 // zone of the user that saw the ad. 6308 // "TIME_ZONE_RESOLUTION_ADVERTISER" - Times are resolved in the time 6309 // zone of the advertiser that served the ad. 6310 TimeZoneResolution string `json:"timeZoneResolution,omitempty"` 6311 6312 // ForceSendFields is a list of field names (e.g. "DayOfWeek") to 6313 // unconditionally include in API requests. By default, fields with 6314 // empty or default values are omitted from API requests. However, any 6315 // non-pointer, non-interface field appearing in ForceSendFields will be 6316 // sent to the server regardless of whether the field is empty or not. 6317 // This may be used to include empty fields in Patch requests. 6318 ForceSendFields []string `json:"-"` 6319 6320 // NullFields is a list of field names (e.g. "DayOfWeek") to include in 6321 // API requests with the JSON null value. By default, fields with empty 6322 // values are omitted from API requests. However, any field with an 6323 // empty value appearing in NullFields will be sent to the server as 6324 // null. It is an error if a field in this list has a non-empty value. 6325 // This may be used to include null fields in Patch requests. 6326 NullFields []string `json:"-"` 6327 } 6328 6329 func (s *DayAndTimeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6330 type NoMethod DayAndTimeAssignedTargetingOptionDetails 6331 raw := NoMethod(*s) 6332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6333 } 6334 6335 // DeactivateManualTriggerRequest: Request message for 6336 // ManualTriggerService.DeactivateManualTrigger. 6337 type DeactivateManualTriggerRequest struct { 6338 } 6339 6340 // DeleteAssignedTargetingOptionsRequest: A request listing which 6341 // assigned targeting options of a given targeting type should be 6342 // deleted. 6343 type DeleteAssignedTargetingOptionsRequest struct { 6344 // AssignedTargetingOptionIds: Required. The assigned targeting option 6345 // IDs to delete. 6346 AssignedTargetingOptionIds []string `json:"assignedTargetingOptionIds,omitempty"` 6347 6348 // TargetingType: Required. Identifies the type of this assigned 6349 // targeting option. 6350 // 6351 // Possible values: 6352 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 6353 // specified or is unknown in this version. 6354 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 6355 // related websites or apps). 6356 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 6357 // example, education or puzzle games). 6358 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 6359 // Birds). 6360 // "TARGETING_TYPE_URL" - Target a specific url (for example, 6361 // quora.com). 6362 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 6363 // period on a specific day. 6364 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 6365 // (for example, 18-24). 6366 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 6367 // specified regions on a regional location list. 6368 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 6369 // specified points of interest on a proximity location list. 6370 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 6371 // example, female or male). 6372 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 6373 // size for video ads. 6374 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 6375 // content for video ads. 6376 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 6377 // parental status (for example, parent or not a parent). 6378 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 6379 // ads in a specific content instream position (for example, pre-roll, 6380 // mid-roll, or post-roll). 6381 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 6382 // specific content outstream position. 6383 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 6384 // (for example, tablet or connected TV). 6385 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 6386 // groups of audiences. Singleton field, at most one can exist on a 6387 // single Lineitem at a time. 6388 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 6389 // example, Chrome). 6390 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 6391 // household income range (for example, top 10%). 6392 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 6393 // screen position. 6394 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 6395 // third party verification (for example, IAS or DoubleVerify). 6396 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 6397 // by specific digital content label ratings (for example, DL-MA: 6398 // suitable only for mature audiences). 6399 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 6400 // content by sensitive categories (for example, adult). 6401 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 6402 // (for example, web or app). 6403 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 6404 // carrier or internet service provider (ISP) (for example, Comcast or 6405 // Orange). 6406 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 6407 // operating system (for example, macOS). 6408 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 6409 // device make or model (for example, Roku or Samsung). 6410 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 6411 // example, dog or retriever). 6412 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 6413 // negative keyword list. 6414 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 6415 // (for example, 80% viewable). 6416 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 6417 // category (for example, arts & entertainment). 6418 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 6419 // specific deals and auction packages. 6420 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 6421 // example, English or Japanese). 6422 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 6423 // authorized sellers. If no targeting option of this type is assigned, 6424 // the resource uses the "Authorized Direct Sellers and Resellers" 6425 // option by default. 6426 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 6427 // location (for example, a city or state). 6428 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 6429 // a group of deals and auction packages. 6430 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 6431 // exchanges. 6432 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 6433 // sub-exchanges. 6434 // "TARGETING_TYPE_POI" - Target ads around a specific point of 6435 // interest, such as a notable building, a street address, or 6436 // latitude/longitude coordinates. 6437 // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a 6438 // business chain within a specific geo region. 6439 // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video 6440 // content duration. 6441 // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific 6442 // video content stream type. 6443 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific 6444 // native content position. 6445 // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled 6446 // inventory. 6447 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific 6448 // audio content type. 6449 // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content 6450 // genre. 6451 TargetingType string `json:"targetingType,omitempty"` 6452 6453 // ForceSendFields is a list of field names (e.g. 6454 // "AssignedTargetingOptionIds") to unconditionally include in API 6455 // requests. By default, fields with empty or default values are omitted 6456 // from API requests. However, any non-pointer, non-interface field 6457 // appearing in ForceSendFields will be sent to the server regardless of 6458 // whether the field is empty or not. This may be used to include empty 6459 // fields in Patch requests. 6460 ForceSendFields []string `json:"-"` 6461 6462 // NullFields is a list of field names (e.g. 6463 // "AssignedTargetingOptionIds") to include in API requests with the 6464 // JSON null value. By default, fields with empty values are omitted 6465 // from API requests. However, any field with an empty value appearing 6466 // in NullFields will be sent to the server as null. It is an error if a 6467 // field in this list has a non-empty value. This may be used to include 6468 // null fields in Patch requests. 6469 NullFields []string `json:"-"` 6470 } 6471 6472 func (s *DeleteAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 6473 type NoMethod DeleteAssignedTargetingOptionsRequest 6474 raw := NoMethod(*s) 6475 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6476 } 6477 6478 // DeviceMakeModelAssignedTargetingOptionDetails: Assigned device make 6479 // and model targeting option details. This will be populated in the 6480 // device_make_model_details field when targeting_type is 6481 // `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 6482 type DeviceMakeModelAssignedTargetingOptionDetails struct { 6483 // DisplayName: Output only. The display name of the device make and 6484 // model. 6485 DisplayName string `json:"displayName,omitempty"` 6486 6487 // Negative: Indicates if this option is being negatively targeted. 6488 Negative bool `json:"negative,omitempty"` 6489 6490 // TargetingOptionId: Required. The targeting_option_id field when 6491 // targeting_type is `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 6492 TargetingOptionId string `json:"targetingOptionId,omitempty"` 6493 6494 // ForceSendFields is a list of field names (e.g. "DisplayName") to 6495 // unconditionally include in API requests. By default, fields with 6496 // empty or default values are omitted from API requests. However, any 6497 // non-pointer, non-interface field appearing in ForceSendFields will be 6498 // sent to the server regardless of whether the field is empty or not. 6499 // This may be used to include empty fields in Patch requests. 6500 ForceSendFields []string `json:"-"` 6501 6502 // NullFields is a list of field names (e.g. "DisplayName") to include 6503 // in API requests with the JSON null value. By default, fields with 6504 // empty values are omitted from API requests. However, any field with 6505 // an empty value appearing in NullFields will be sent to the server as 6506 // null. It is an error if a field in this list has a non-empty value. 6507 // This may be used to include null fields in Patch requests. 6508 NullFields []string `json:"-"` 6509 } 6510 6511 func (s *DeviceMakeModelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6512 type NoMethod DeviceMakeModelAssignedTargetingOptionDetails 6513 raw := NoMethod(*s) 6514 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6515 } 6516 6517 // DeviceMakeModelTargetingOptionDetails: Represents a targetable device 6518 // make and model. This will be populated in the 6519 // device_make_model_details field of a TargetingOption when 6520 // targeting_type is `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 6521 type DeviceMakeModelTargetingOptionDetails struct { 6522 // DisplayName: Output only. The display name of the device make and 6523 // model. 6524 DisplayName string `json:"displayName,omitempty"` 6525 6526 // ForceSendFields is a list of field names (e.g. "DisplayName") to 6527 // unconditionally include in API requests. By default, fields with 6528 // empty or default values are omitted from API requests. However, any 6529 // non-pointer, non-interface field appearing in ForceSendFields will be 6530 // sent to the server regardless of whether the field is empty or not. 6531 // This may be used to include empty fields in Patch requests. 6532 ForceSendFields []string `json:"-"` 6533 6534 // NullFields is a list of field names (e.g. "DisplayName") to include 6535 // in API requests with the JSON null value. By default, fields with 6536 // empty values are omitted from API requests. However, any field with 6537 // an empty value appearing in NullFields will be sent to the server as 6538 // null. It is an error if a field in this list has a non-empty value. 6539 // This may be used to include null fields in Patch requests. 6540 NullFields []string `json:"-"` 6541 } 6542 6543 func (s *DeviceMakeModelTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6544 type NoMethod DeviceMakeModelTargetingOptionDetails 6545 raw := NoMethod(*s) 6546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6547 } 6548 6549 // DeviceTypeAssignedTargetingOptionDetails: Targeting details for 6550 // device type. This will be populated in the details field of an 6551 // AssignedTargetingOption when targeting_type is 6552 // `TARGETING_TYPE_DEVICE_TYPE`. 6553 type DeviceTypeAssignedTargetingOptionDetails struct { 6554 // DeviceType: Required. The display name of the device type. 6555 // 6556 // Possible values: 6557 // "DEVICE_TYPE_UNSPECIFIED" - Default value when device type is not 6558 // specified in this version. This enum is a placeholder for default 6559 // value and does not represent a real device type option. 6560 // "DEVICE_TYPE_COMPUTER" - Computer. 6561 // "DEVICE_TYPE_CONNECTED_TV" - Connected TV. 6562 // "DEVICE_TYPE_SMART_PHONE" - Smart phone. 6563 // "DEVICE_TYPE_TABLET" - Tablet. 6564 DeviceType string `json:"deviceType,omitempty"` 6565 6566 // TargetingOptionId: Required. ID of the device type. 6567 TargetingOptionId string `json:"targetingOptionId,omitempty"` 6568 6569 // ForceSendFields is a list of field names (e.g. "DeviceType") to 6570 // unconditionally include in API requests. By default, fields with 6571 // empty or default values are omitted from API requests. However, any 6572 // non-pointer, non-interface field appearing in ForceSendFields will be 6573 // sent to the server regardless of whether the field is empty or not. 6574 // This may be used to include empty fields in Patch requests. 6575 ForceSendFields []string `json:"-"` 6576 6577 // NullFields is a list of field names (e.g. "DeviceType") to include in 6578 // API requests with the JSON null value. By default, fields with empty 6579 // values are omitted from API requests. However, any field with an 6580 // empty value appearing in NullFields will be sent to the server as 6581 // null. It is an error if a field in this list has a non-empty value. 6582 // This may be used to include null fields in Patch requests. 6583 NullFields []string `json:"-"` 6584 } 6585 6586 func (s *DeviceTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6587 type NoMethod DeviceTypeAssignedTargetingOptionDetails 6588 raw := NoMethod(*s) 6589 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6590 } 6591 6592 // DeviceTypeTargetingOptionDetails: Represents a targetable device 6593 // type. This will be populated in the device_type_details field of a 6594 // TargetingOption when targeting_type is `TARGETING_TYPE_DEVICE_TYPE`. 6595 type DeviceTypeTargetingOptionDetails struct { 6596 // DeviceType: Output only. The device type that is used to be targeted. 6597 // 6598 // Possible values: 6599 // "DEVICE_TYPE_UNSPECIFIED" - Default value when device type is not 6600 // specified in this version. This enum is a placeholder for default 6601 // value and does not represent a real device type option. 6602 // "DEVICE_TYPE_COMPUTER" - Computer. 6603 // "DEVICE_TYPE_CONNECTED_TV" - Connected TV. 6604 // "DEVICE_TYPE_SMART_PHONE" - Smart phone. 6605 // "DEVICE_TYPE_TABLET" - Tablet. 6606 DeviceType string `json:"deviceType,omitempty"` 6607 6608 // ForceSendFields is a list of field names (e.g. "DeviceType") to 6609 // unconditionally include in API requests. By default, fields with 6610 // empty or default values are omitted from API requests. However, any 6611 // non-pointer, non-interface field appearing in ForceSendFields will be 6612 // sent to the server regardless of whether the field is empty or not. 6613 // This may be used to include empty fields in Patch requests. 6614 ForceSendFields []string `json:"-"` 6615 6616 // NullFields is a list of field names (e.g. "DeviceType") to include in 6617 // API requests with the JSON null value. By default, fields with empty 6618 // values are omitted from API requests. However, any field with an 6619 // empty value appearing in NullFields will be sent to the server as 6620 // null. It is an error if a field in this list has a non-empty value. 6621 // This may be used to include null fields in Patch requests. 6622 NullFields []string `json:"-"` 6623 } 6624 6625 func (s *DeviceTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6626 type NoMethod DeviceTypeTargetingOptionDetails 6627 raw := NoMethod(*s) 6628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6629 } 6630 6631 // DigitalContentLabelAssignedTargetingOptionDetails: Targeting details 6632 // for digital content label. This will be populated in the details 6633 // field of an AssignedTargetingOption when targeting_type is 6634 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION`. 6635 type DigitalContentLabelAssignedTargetingOptionDetails struct { 6636 // ContentRatingTier: Output only. The display name of the digital 6637 // content label rating tier. 6638 // 6639 // Possible values: 6640 // "CONTENT_RATING_TIER_UNSPECIFIED" - Content label is not specified 6641 // in this version. This enum is a place holder for a default value and 6642 // does not represent a real content rating. 6643 // "CONTENT_RATING_TIER_UNRATED" - Content that has not been labeled. 6644 // "CONTENT_RATING_TIER_GENERAL" - Content suitable for general 6645 // audiences. 6646 // "CONTENT_RATING_TIER_PARENTAL_GUIDANCE" - Content suitable for most 6647 // audiences with parental guidance. 6648 // "CONTENT_RATING_TIER_TEENS" - Content suitable for teen and older 6649 // audiences. 6650 // "CONTENT_RATING_TIER_MATURE" - Content suitable only for mature 6651 // audiences. 6652 ContentRatingTier string `json:"contentRatingTier,omitempty"` 6653 6654 // ExcludedTargetingOptionId: Required. ID of the digital content label 6655 // to be EXCLUDED. 6656 ExcludedTargetingOptionId string `json:"excludedTargetingOptionId,omitempty"` 6657 6658 // ForceSendFields is a list of field names (e.g. "ContentRatingTier") 6659 // to unconditionally include in API requests. By default, fields with 6660 // empty or default values are omitted from API requests. However, any 6661 // non-pointer, non-interface field appearing in ForceSendFields will be 6662 // sent to the server regardless of whether the field is empty or not. 6663 // This may be used to include empty fields in Patch requests. 6664 ForceSendFields []string `json:"-"` 6665 6666 // NullFields is a list of field names (e.g. "ContentRatingTier") to 6667 // include in API requests with the JSON null value. By default, fields 6668 // with empty values are omitted from API requests. However, any field 6669 // with an empty value appearing in NullFields will be sent to the 6670 // server as null. It is an error if a field in this list has a 6671 // non-empty value. This may be used to include null fields in Patch 6672 // requests. 6673 NullFields []string `json:"-"` 6674 } 6675 6676 func (s *DigitalContentLabelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6677 type NoMethod DigitalContentLabelAssignedTargetingOptionDetails 6678 raw := NoMethod(*s) 6679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6680 } 6681 6682 // DigitalContentLabelTargetingOptionDetails: Represents a targetable 6683 // digital content label rating tier. This will be populated in the 6684 // digital_content_label_details field of the TargetingOption when 6685 // targeting_type is `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION`. 6686 type DigitalContentLabelTargetingOptionDetails struct { 6687 // ContentRatingTier: Output only. An enum for the content label brand 6688 // safety tiers. 6689 // 6690 // Possible values: 6691 // "CONTENT_RATING_TIER_UNSPECIFIED" - Content label is not specified 6692 // in this version. This enum is a place holder for a default value and 6693 // does not represent a real content rating. 6694 // "CONTENT_RATING_TIER_UNRATED" - Content that has not been labeled. 6695 // "CONTENT_RATING_TIER_GENERAL" - Content suitable for general 6696 // audiences. 6697 // "CONTENT_RATING_TIER_PARENTAL_GUIDANCE" - Content suitable for most 6698 // audiences with parental guidance. 6699 // "CONTENT_RATING_TIER_TEENS" - Content suitable for teen and older 6700 // audiences. 6701 // "CONTENT_RATING_TIER_MATURE" - Content suitable only for mature 6702 // audiences. 6703 ContentRatingTier string `json:"contentRatingTier,omitempty"` 6704 6705 // ForceSendFields is a list of field names (e.g. "ContentRatingTier") 6706 // to unconditionally include in API requests. By default, fields with 6707 // empty or default values are omitted from API requests. However, any 6708 // non-pointer, non-interface field appearing in ForceSendFields will be 6709 // sent to the server regardless of whether the field is empty or not. 6710 // This may be used to include empty fields in Patch requests. 6711 ForceSendFields []string `json:"-"` 6712 6713 // NullFields is a list of field names (e.g. "ContentRatingTier") to 6714 // include in API requests with the JSON null value. By default, fields 6715 // with empty values are omitted from API requests. However, any field 6716 // with an empty value appearing in NullFields will be sent to the 6717 // server as null. It is an error if a field in this list has a 6718 // non-empty value. This may be used to include null fields in Patch 6719 // requests. 6720 NullFields []string `json:"-"` 6721 } 6722 6723 func (s *DigitalContentLabelTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6724 type NoMethod DigitalContentLabelTargetingOptionDetails 6725 raw := NoMethod(*s) 6726 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6727 } 6728 6729 // Dimensions: Dimensions. 6730 type Dimensions struct { 6731 // HeightPixels: The height in pixels. 6732 HeightPixels int64 `json:"heightPixels,omitempty"` 6733 6734 // WidthPixels: The width in pixels. 6735 WidthPixels int64 `json:"widthPixels,omitempty"` 6736 6737 // ForceSendFields is a list of field names (e.g. "HeightPixels") to 6738 // unconditionally include in API requests. By default, fields with 6739 // empty or default values are omitted from API requests. However, any 6740 // non-pointer, non-interface field appearing in ForceSendFields will be 6741 // sent to the server regardless of whether the field is empty or not. 6742 // This may be used to include empty fields in Patch requests. 6743 ForceSendFields []string `json:"-"` 6744 6745 // NullFields is a list of field names (e.g. "HeightPixels") to include 6746 // in API requests with the JSON null value. By default, fields with 6747 // empty values are omitted from API requests. However, any field with 6748 // an empty value appearing in NullFields will be sent to the server as 6749 // null. It is an error if a field in this list has a non-empty value. 6750 // This may be used to include null fields in Patch requests. 6751 NullFields []string `json:"-"` 6752 } 6753 6754 func (s *Dimensions) MarshalJSON() ([]byte, error) { 6755 type NoMethod Dimensions 6756 raw := NoMethod(*s) 6757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6758 } 6759 6760 // DoubleVerify: Details of DoubleVerify settings. 6761 type DoubleVerify struct { 6762 // AppStarRating: Avoid bidding on apps with the star ratings. 6763 AppStarRating *DoubleVerifyAppStarRating `json:"appStarRating,omitempty"` 6764 6765 // AvoidedAgeRatings: Avoid bidding on apps with the age rating. 6766 // 6767 // Possible values: 6768 // "AGE_RATING_UNSPECIFIED" - This enum is only a placeholder and it 6769 // doesn't specify any age rating options. 6770 // "APP_AGE_RATE_UNKNOWN" - Apps with unknown age rating. 6771 // "APP_AGE_RATE_4_PLUS" - Apps rated for Everyone (4+). 6772 // "APP_AGE_RATE_9_PLUS" - Apps rated for Everyone (9+). 6773 // "APP_AGE_RATE_12_PLUS" - Apps rated for Teens (12+). 6774 // "APP_AGE_RATE_17_PLUS" - Apps rated for Mature (17+). 6775 // "APP_AGE_RATE_18_PLUS" - Apps rated for Adults Only (18+). 6776 AvoidedAgeRatings []string `json:"avoidedAgeRatings,omitempty"` 6777 6778 // BrandSafetyCategories: DV Brand Safety Controls. 6779 BrandSafetyCategories *DoubleVerifyBrandSafetyCategories `json:"brandSafetyCategories,omitempty"` 6780 6781 // CustomSegmentId: The custom segment ID provided by DoubleVerify. The 6782 // ID must start with "51" and consist of eight digits. Custom segment 6783 // ID cannot be specified along with any of the following fields: * 6784 // brand_safety_categories * avoided_age_ratings * app_star_rating * 6785 // fraud_invalid_traffic 6786 CustomSegmentId int64 `json:"customSegmentId,omitempty,string"` 6787 6788 // DisplayViewability: Display viewability settings (applicable to 6789 // display line items only). 6790 DisplayViewability *DoubleVerifyDisplayViewability `json:"displayViewability,omitempty"` 6791 6792 // FraudInvalidTraffic: Avoid Sites and Apps with historical Fraud & IVT 6793 // Rates. 6794 FraudInvalidTraffic *DoubleVerifyFraudInvalidTraffic `json:"fraudInvalidTraffic,omitempty"` 6795 6796 // VideoViewability: Video viewability settings (applicable to video 6797 // line items only). 6798 VideoViewability *DoubleVerifyVideoViewability `json:"videoViewability,omitempty"` 6799 6800 // ForceSendFields is a list of field names (e.g. "AppStarRating") to 6801 // unconditionally include in API requests. By default, fields with 6802 // empty or default values are omitted from API requests. However, any 6803 // non-pointer, non-interface field appearing in ForceSendFields will be 6804 // sent to the server regardless of whether the field is empty or not. 6805 // This may be used to include empty fields in Patch requests. 6806 ForceSendFields []string `json:"-"` 6807 6808 // NullFields is a list of field names (e.g. "AppStarRating") to include 6809 // in API requests with the JSON null value. By default, fields with 6810 // empty values are omitted from API requests. However, any field with 6811 // an empty value appearing in NullFields will be sent to the server as 6812 // null. It is an error if a field in this list has a non-empty value. 6813 // This may be used to include null fields in Patch requests. 6814 NullFields []string `json:"-"` 6815 } 6816 6817 func (s *DoubleVerify) MarshalJSON() ([]byte, error) { 6818 type NoMethod DoubleVerify 6819 raw := NoMethod(*s) 6820 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6821 } 6822 6823 // DoubleVerifyAppStarRating: Details of DoubleVerify star ratings 6824 // settings. 6825 type DoubleVerifyAppStarRating struct { 6826 // AvoidInsufficientStarRating: Avoid bidding on apps with insufficient 6827 // star ratings. 6828 AvoidInsufficientStarRating bool `json:"avoidInsufficientStarRating,omitempty"` 6829 6830 // AvoidedStarRating: Avoid bidding on apps with the star ratings. 6831 // 6832 // Possible values: 6833 // "APP_STAR_RATE_UNSPECIFIED" - This enum is only a placeholder and 6834 // it doesn't specify any app star rating options. 6835 // "APP_STAR_RATE_1_POINT_5_LESS" - Official Apps with rating < 1.5 6836 // Stars. 6837 // "APP_STAR_RATE_2_LESS" - Official Apps with rating < 2 Stars. 6838 // "APP_STAR_RATE_2_POINT_5_LESS" - Official Apps with rating < 2.5 6839 // Stars. 6840 // "APP_STAR_RATE_3_LESS" - Official Apps with rating < 3 Stars. 6841 // "APP_STAR_RATE_3_POINT_5_LESS" - Official Apps with rating < 3.5 6842 // Stars. 6843 // "APP_STAR_RATE_4_LESS" - Official Apps with rating < 4 Stars. 6844 // "APP_STAR_RATE_4_POINT_5_LESS" - Official Apps with rating < 4.5 6845 // Stars. 6846 AvoidedStarRating string `json:"avoidedStarRating,omitempty"` 6847 6848 // ForceSendFields is a list of field names (e.g. 6849 // "AvoidInsufficientStarRating") to unconditionally include in API 6850 // requests. By default, fields with empty or default values are omitted 6851 // from API requests. However, any non-pointer, non-interface field 6852 // appearing in ForceSendFields will be sent to the server regardless of 6853 // whether the field is empty or not. This may be used to include empty 6854 // fields in Patch requests. 6855 ForceSendFields []string `json:"-"` 6856 6857 // NullFields is a list of field names (e.g. 6858 // "AvoidInsufficientStarRating") to include in API requests with the 6859 // JSON null value. By default, fields with empty values are omitted 6860 // from API requests. However, any field with an empty value appearing 6861 // in NullFields will be sent to the server as null. It is an error if a 6862 // field in this list has a non-empty value. This may be used to include 6863 // null fields in Patch requests. 6864 NullFields []string `json:"-"` 6865 } 6866 6867 func (s *DoubleVerifyAppStarRating) MarshalJSON() ([]byte, error) { 6868 type NoMethod DoubleVerifyAppStarRating 6869 raw := NoMethod(*s) 6870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6871 } 6872 6873 // DoubleVerifyBrandSafetyCategories: Settings for brand safety 6874 // controls. 6875 type DoubleVerifyBrandSafetyCategories struct { 6876 // AvoidUnknownBrandSafetyCategory: Unknown or unrateable. 6877 AvoidUnknownBrandSafetyCategory bool `json:"avoidUnknownBrandSafetyCategory,omitempty"` 6878 6879 // AvoidedHighSeverityCategories: Brand safety high severity avoidance 6880 // categories. 6881 // 6882 // Possible values: 6883 // "HIGHER_SEVERITY_UNSPECIFIED" - This enum is only a placeholder and 6884 // it doesn't specify any high severity categories. 6885 // "ADULT_CONTENT_PORNOGRAPHY" - Adult Content: Pornography, Mature 6886 // Topics & Nudity. 6887 // "COPYRIGHT_INFRINGEMENT" - Copyright Infringement. 6888 // "SUBSTANCE_ABUSE" - Drugs/Alcohol/Controlled Substances: Substance 6889 // Abuse. 6890 // "GRAPHIC_VIOLENCE_WEAPONS" - Extreme Graphic/Explicit 6891 // Violence/Weapons. 6892 // "HATE_PROFANITY" - Hate/Profanity. 6893 // "CRIMINAL_SKILLS" - Illegal Activities: Criminal Skills. 6894 // "NUISANCE_INCENTIVIZED_MALWARE_CLUTTER" - 6895 // Incentivized/Malware/Clutter. 6896 AvoidedHighSeverityCategories []string `json:"avoidedHighSeverityCategories,omitempty"` 6897 6898 // AvoidedMediumSeverityCategories: Brand safety medium severity 6899 // avoidance categories. 6900 // 6901 // Possible values: 6902 // "MEDIUM_SEVERITY_UNSPECIFIED" - This enum is only a placeholder and 6903 // it doesn't specify any medium severity categories. 6904 // "AD_SERVERS" - Ad Servers. 6905 // "ADULT_CONTENT_SWIMSUIT" - Adult Content: Swimsuit. 6906 // "ALTERNATIVE_LIFESTYLES" - Controversial Subjects: Alternative 6907 // Lifestyles. 6908 // "CELEBRITY_GOSSIP" - Controversial Subjects: Celebrity Gossip. 6909 // "GAMBLING" - Controversial Subjects: Gambling. 6910 // "OCCULT" - Controversial Subjects: Occult. 6911 // "SEX_EDUCATION" - Controversial Subjects: Sex Education. 6912 // "DISASTER_AVIATION" - Disaster: Aviation. 6913 // "DISASTER_MAN_MADE" - Disaster: Man-made. 6914 // "DISASTER_NATURAL" - Disaster: Natural. 6915 // "DISASTER_TERRORIST_EVENTS" - Disaster: Terrorist Events. 6916 // "DISASTER_VEHICLE" - Disaster: Vehicle. 6917 // "ALCOHOL" - Drugs/Alcohol/Controlled Substances: Alcohol. 6918 // "SMOKING" - Drugs/Alcohol/Controlled Substances: Smoking. 6919 // "NEGATIVE_NEWS_FINANCIAL" - Negative News: Financial. 6920 // "NON_ENGLISH" - Non-Std Content: Non-English. 6921 // "PARKING_PAGE" - Non-Std Content: Parking Page. 6922 // "UNMODERATED_UGC" - Unmoderated UGC: Forums, Images & Video. 6923 // "INFLAMMATORY_POLITICS_AND_NEWS" - Controversial Subjects: 6924 // Inflammatory Politics and News. 6925 // "NEGATIVE_NEWS_PHARMACEUTICAL" - Negative News: Pharmaceutical. 6926 AvoidedMediumSeverityCategories []string `json:"avoidedMediumSeverityCategories,omitempty"` 6927 6928 // ForceSendFields is a list of field names (e.g. 6929 // "AvoidUnknownBrandSafetyCategory") to unconditionally include in API 6930 // requests. By default, fields with empty or default values are omitted 6931 // from API requests. However, any non-pointer, non-interface field 6932 // appearing in ForceSendFields will be sent to the server regardless of 6933 // whether the field is empty or not. This may be used to include empty 6934 // fields in Patch requests. 6935 ForceSendFields []string `json:"-"` 6936 6937 // NullFields is a list of field names (e.g. 6938 // "AvoidUnknownBrandSafetyCategory") to include in API requests with 6939 // the JSON null value. By default, fields with empty values are omitted 6940 // from API requests. However, any field with an empty value appearing 6941 // in NullFields will be sent to the server as null. It is an error if a 6942 // field in this list has a non-empty value. This may be used to include 6943 // null fields in Patch requests. 6944 NullFields []string `json:"-"` 6945 } 6946 6947 func (s *DoubleVerifyBrandSafetyCategories) MarshalJSON() ([]byte, error) { 6948 type NoMethod DoubleVerifyBrandSafetyCategories 6949 raw := NoMethod(*s) 6950 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6951 } 6952 6953 // DoubleVerifyDisplayViewability: Details of DoubleVerify display 6954 // viewability settings. 6955 type DoubleVerifyDisplayViewability struct { 6956 // Iab: Target web and app inventory to maximize IAB viewable rate. 6957 // 6958 // Possible values: 6959 // "IAB_VIEWED_RATE_UNSPECIFIED" - This enum is only a placeholder and 6960 // it doesn't specify any IAB viewed rate options. 6961 // "IAB_VIEWED_RATE_80_PERCENT_HIGHER" - Target web and app inventory 6962 // to maximize IAB viewable rate 80% or higher. 6963 // "IAB_VIEWED_RATE_75_PERCENT_HIGHER" - Target web and app inventory 6964 // to maximize IAB viewable rate 75% or higher. 6965 // "IAB_VIEWED_RATE_70_PERCENT_HIGHER" - Target web and app inventory 6966 // to maximize IAB viewable rate 70% or higher. 6967 // "IAB_VIEWED_RATE_65_PERCENT_HIGHER" - Target web and app inventory 6968 // to maximize IAB viewable rate 65% or higher. 6969 // "IAB_VIEWED_RATE_60_PERCENT_HIGHER" - Target web and app inventory 6970 // to maximize IAB viewable rate 60% or higher. 6971 // "IAB_VIEWED_RATE_55_PERCENT_HIGHER" - Target web and app inventory 6972 // to maximize IAB viewable rate 55% or higher. 6973 // "IAB_VIEWED_RATE_50_PERCENT_HIGHER" - Target web and app inventory 6974 // to maximize IAB viewable rate 50% or higher. 6975 // "IAB_VIEWED_RATE_40_PERCENT_HIGHER" - Target web and app inventory 6976 // to maximize IAB viewable rate 40% or higher. 6977 // "IAB_VIEWED_RATE_30_PERCENT_HIGHER" - Target web and app inventory 6978 // to maximize IAB viewable rate 30% or higher. 6979 Iab string `json:"iab,omitempty"` 6980 6981 // ViewableDuring: Target web and app inventory to maximize 100% 6982 // viewable duration. 6983 // 6984 // Possible values: 6985 // "AVERAGE_VIEW_DURATION_UNSPECIFIED" - This enum is only a 6986 // placeholder and it doesn't specify any average view duration options. 6987 // "AVERAGE_VIEW_DURATION_5_SEC" - Target web and app inventory to 6988 // maximize 100% viewable duration 5 seconds or more. 6989 // "AVERAGE_VIEW_DURATION_10_SEC" - Target web and app inventory to 6990 // maximize 100% viewable duration 10 seconds or more. 6991 // "AVERAGE_VIEW_DURATION_15_SEC" - Target web and app inventory to 6992 // maximize 100% viewable duration 15 seconds or more. 6993 ViewableDuring string `json:"viewableDuring,omitempty"` 6994 6995 // ForceSendFields is a list of field names (e.g. "Iab") to 6996 // unconditionally include in API requests. By default, fields with 6997 // empty or default values are omitted from API requests. However, any 6998 // non-pointer, non-interface field appearing in ForceSendFields will be 6999 // sent to the server regardless of whether the field is empty or not. 7000 // This may be used to include empty fields in Patch requests. 7001 ForceSendFields []string `json:"-"` 7002 7003 // NullFields is a list of field names (e.g. "Iab") to include in API 7004 // requests with the JSON null value. By default, fields with empty 7005 // values are omitted from API requests. However, any field with an 7006 // empty value appearing in NullFields will be sent to the server as 7007 // null. It is an error if a field in this list has a non-empty value. 7008 // This may be used to include null fields in Patch requests. 7009 NullFields []string `json:"-"` 7010 } 7011 7012 func (s *DoubleVerifyDisplayViewability) MarshalJSON() ([]byte, error) { 7013 type NoMethod DoubleVerifyDisplayViewability 7014 raw := NoMethod(*s) 7015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7016 } 7017 7018 // DoubleVerifyFraudInvalidTraffic: DoubleVerify Fraud & Invalid Traffic 7019 // settings. 7020 type DoubleVerifyFraudInvalidTraffic struct { 7021 // AvoidInsufficientOption: Insufficient Historical Fraud & IVT Stats. 7022 AvoidInsufficientOption bool `json:"avoidInsufficientOption,omitempty"` 7023 7024 // AvoidedFraudOption: Avoid Sites and Apps with historical Fraud & IVT. 7025 // 7026 // Possible values: 7027 // "FRAUD_UNSPECIFIED" - This enum is only a placeholder and it 7028 // doesn't specify any fraud and invalid traffic options. 7029 // "AD_IMPRESSION_FRAUD_100" - 100% Fraud & IVT. 7030 // "AD_IMPRESSION_FRAUD_50" - 50% or Higher Fraud & IVT. 7031 // "AD_IMPRESSION_FRAUD_25" - 25% or Higher Fraud & IVT. 7032 // "AD_IMPRESSION_FRAUD_10" - 10% or Higher Fraud & IVT. 7033 // "AD_IMPRESSION_FRAUD_8" - 8% or Higher Fraud & IVT. 7034 // "AD_IMPRESSION_FRAUD_6" - 6% or Higher Fraud & IVT. 7035 // "AD_IMPRESSION_FRAUD_4" - 4% or Higher Fraud & IVT. 7036 // "AD_IMPRESSION_FRAUD_2" - 2% or Higher Fraud & IVT. 7037 AvoidedFraudOption string `json:"avoidedFraudOption,omitempty"` 7038 7039 // ForceSendFields is a list of field names (e.g. 7040 // "AvoidInsufficientOption") to unconditionally include in API 7041 // requests. By default, fields with empty or default values are omitted 7042 // from API requests. However, any non-pointer, non-interface field 7043 // appearing in ForceSendFields will be sent to the server regardless of 7044 // whether the field is empty or not. This may be used to include empty 7045 // fields in Patch requests. 7046 ForceSendFields []string `json:"-"` 7047 7048 // NullFields is a list of field names (e.g. "AvoidInsufficientOption") 7049 // to include in API requests with the JSON null value. By default, 7050 // fields with empty values are omitted from API requests. However, any 7051 // field with an empty value appearing in NullFields will be sent to the 7052 // server as null. It is an error if a field in this list has a 7053 // non-empty value. This may be used to include null fields in Patch 7054 // requests. 7055 NullFields []string `json:"-"` 7056 } 7057 7058 func (s *DoubleVerifyFraudInvalidTraffic) MarshalJSON() ([]byte, error) { 7059 type NoMethod DoubleVerifyFraudInvalidTraffic 7060 raw := NoMethod(*s) 7061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7062 } 7063 7064 // DoubleVerifyVideoViewability: Details of DoubleVerify video 7065 // viewability settings. 7066 type DoubleVerifyVideoViewability struct { 7067 // PlayerImpressionRate: Target inventory to maximize impressions with 7068 // 400x300 or greater player size. 7069 // 7070 // Possible values: 7071 // "PLAYER_SIZE_400X300_UNSPECIFIED" - This enum is only a placeholder 7072 // and it doesn't specify any impressions options. 7073 // "PLAYER_SIZE_400X300_95" - Sites with 95%+ of impressions. 7074 // "PLAYER_SIZE_400X300_70" - Sites with 70%+ of impressions. 7075 // "PLAYER_SIZE_400X300_25" - Sites with 25%+ of impressions. 7076 // "PLAYER_SIZE_400X300_5" - Sites with 5%+ of impressions. 7077 PlayerImpressionRate string `json:"playerImpressionRate,omitempty"` 7078 7079 // VideoIab: Target web inventory to maximize IAB viewable rate. 7080 // 7081 // Possible values: 7082 // "VIDEO_IAB_UNSPECIFIED" - This enum is only a placeholder and it 7083 // doesn't specify any video IAB viewable rate options. 7084 // "IAB_VIEWABILITY_80_PERCENT_HIGHER" - Target web and app inventory 7085 // to maximize IAB viewable rate 80% or higher. 7086 // "IAB_VIEWABILITY_75_PERCENT_HIGHER" - Target web and app inventory 7087 // to maximize IAB viewable rate 75% or higher. 7088 // "IAB_VIEWABILITY_70_PERCENT_HIGHER" - Target web and app inventory 7089 // to maximize IAB viewable rate 70% or higher. 7090 // "IAB_VIEWABILITY_65_PERCENT_HIHGER" - Target web and app inventory 7091 // to maximize IAB viewable rate 65% or higher. 7092 // "IAB_VIEWABILITY_60_PERCENT_HIGHER" - Target web and app inventory 7093 // to maximize IAB viewable rate 60% or higher. 7094 // "IAB_VIEWABILITY_55_PERCENT_HIHGER" - Target web and app inventory 7095 // to maximize IAB viewable rate 55% or higher. 7096 // "IAB_VIEWABILITY_50_PERCENT_HIGHER" - Target web and app inventory 7097 // to maximize IAB viewable rate 50% or higher. 7098 // "IAB_VIEWABILITY_40_PERCENT_HIHGER" - Target web and app inventory 7099 // to maximize IAB viewable rate 40% or higher. 7100 // "IAB_VIEWABILITY_30_PERCENT_HIHGER" - Target web and app inventory 7101 // to maximize IAB viewable rate 30% or higher. 7102 VideoIab string `json:"videoIab,omitempty"` 7103 7104 // VideoViewableRate: Target web inventory to maximize fully viewable 7105 // rate. 7106 // 7107 // Possible values: 7108 // "VIDEO_VIEWABLE_RATE_UNSPECIFIED" - This enum is only a placeholder 7109 // and it doesn't specify any video viewable rate options. 7110 // "VIEWED_PERFORMANCE_40_PERCENT_HIGHER" - Target web inventory to 7111 // maximize fully viewable rate 40% or higher. 7112 // "VIEWED_PERFORMANCE_35_PERCENT_HIGHER" - Target web inventory to 7113 // maximize fully viewable rate 35% or higher. 7114 // "VIEWED_PERFORMANCE_30_PERCENT_HIGHER" - Target web inventory to 7115 // maximize fully viewable rate 30% or higher. 7116 // "VIEWED_PERFORMANCE_25_PERCENT_HIGHER" - Target web inventory to 7117 // maximize fully viewable rate 25% or higher. 7118 // "VIEWED_PERFORMANCE_20_PERCENT_HIGHER" - Target web inventory to 7119 // maximize fully viewable rate 20% or higher. 7120 // "VIEWED_PERFORMANCE_10_PERCENT_HIGHER" - Target web inventory to 7121 // maximize fully viewable rate 10% or higher. 7122 VideoViewableRate string `json:"videoViewableRate,omitempty"` 7123 7124 // ForceSendFields is a list of field names (e.g. 7125 // "PlayerImpressionRate") to unconditionally include in API requests. 7126 // By default, fields with empty or default values are omitted from API 7127 // requests. However, any non-pointer, non-interface field appearing in 7128 // ForceSendFields will be sent to the server regardless of whether the 7129 // field is empty or not. This may be used to include empty fields in 7130 // Patch requests. 7131 ForceSendFields []string `json:"-"` 7132 7133 // NullFields is a list of field names (e.g. "PlayerImpressionRate") to 7134 // include in API requests with the JSON null value. By default, fields 7135 // with empty values are omitted from API requests. However, any field 7136 // with an empty value appearing in NullFields will be sent to the 7137 // server as null. It is an error if a field in this list has a 7138 // non-empty value. This may be used to include null fields in Patch 7139 // requests. 7140 NullFields []string `json:"-"` 7141 } 7142 7143 func (s *DoubleVerifyVideoViewability) MarshalJSON() ([]byte, error) { 7144 type NoMethod DoubleVerifyVideoViewability 7145 raw := NoMethod(*s) 7146 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7147 } 7148 7149 // EditCustomerMatchMembersRequest: Request message for 7150 // FirstAndThirdPartyAudienceService.EditCustomerMatchMembers. 7151 type EditCustomerMatchMembersRequest struct { 7152 // AddedContactInfoList: Input only. A list of contact information to 7153 // define the members to be added. 7154 AddedContactInfoList *ContactInfoList `json:"addedContactInfoList,omitempty"` 7155 7156 // AddedMobileDeviceIdList: Input only. A list of mobile device IDs to 7157 // define the members to be added. 7158 AddedMobileDeviceIdList *MobileDeviceIdList `json:"addedMobileDeviceIdList,omitempty"` 7159 7160 // AdvertiserId: Required. The ID of the owner advertiser of the updated 7161 // Customer Match FirstAndThirdPartyAudience. 7162 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 7163 7164 // ForceSendFields is a list of field names (e.g. 7165 // "AddedContactInfoList") to unconditionally include in API requests. 7166 // By default, fields with empty or default values are omitted from API 7167 // requests. However, any non-pointer, non-interface field appearing in 7168 // ForceSendFields will be sent to the server regardless of whether the 7169 // field is empty or not. This may be used to include empty fields in 7170 // Patch requests. 7171 ForceSendFields []string `json:"-"` 7172 7173 // NullFields is a list of field names (e.g. "AddedContactInfoList") to 7174 // include in API requests with the JSON null value. By default, fields 7175 // with empty values are omitted from API requests. However, any field 7176 // with an empty value appearing in NullFields will be sent to the 7177 // server as null. It is an error if a field in this list has a 7178 // non-empty value. This may be used to include null fields in Patch 7179 // requests. 7180 NullFields []string `json:"-"` 7181 } 7182 7183 func (s *EditCustomerMatchMembersRequest) MarshalJSON() ([]byte, error) { 7184 type NoMethod EditCustomerMatchMembersRequest 7185 raw := NoMethod(*s) 7186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7187 } 7188 7189 // EditCustomerMatchMembersResponse: The response of 7190 // FirstAndThirdPartyAudienceService.EditCustomerMatchMembers. 7191 type EditCustomerMatchMembersResponse struct { 7192 // FirstAndThirdPartyAudienceId: Required. The ID of the updated 7193 // Customer Match FirstAndThirdPartyAudience. 7194 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"` 7195 7196 // ServerResponse contains the HTTP response code and headers from the 7197 // server. 7198 googleapi.ServerResponse `json:"-"` 7199 7200 // ForceSendFields is a list of field names (e.g. 7201 // "FirstAndThirdPartyAudienceId") to unconditionally include in API 7202 // requests. By default, fields with empty or default values are omitted 7203 // from API requests. However, any non-pointer, non-interface field 7204 // appearing in ForceSendFields will be sent to the server regardless of 7205 // whether the field is empty or not. This may be used to include empty 7206 // fields in Patch requests. 7207 ForceSendFields []string `json:"-"` 7208 7209 // NullFields is a list of field names (e.g. 7210 // "FirstAndThirdPartyAudienceId") to include in API requests with the 7211 // JSON null value. By default, fields with empty values are omitted 7212 // from API requests. However, any field with an empty value appearing 7213 // in NullFields will be sent to the server as null. It is an error if a 7214 // field in this list has a non-empty value. This may be used to include 7215 // null fields in Patch requests. 7216 NullFields []string `json:"-"` 7217 } 7218 7219 func (s *EditCustomerMatchMembersResponse) MarshalJSON() ([]byte, error) { 7220 type NoMethod EditCustomerMatchMembersResponse 7221 raw := NoMethod(*s) 7222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7223 } 7224 7225 // EditGuaranteedOrderReadAccessorsRequest: Request message for 7226 // GuaranteedOrderService.EditGuaranteedOrderReadAccessors. 7227 type EditGuaranteedOrderReadAccessorsRequest struct { 7228 // AddedAdvertisers: The advertisers to add as read accessors to the 7229 // guaranteed order. 7230 AddedAdvertisers googleapi.Int64s `json:"addedAdvertisers,omitempty"` 7231 7232 // PartnerId: Required. The partner context in which the change is being 7233 // made. 7234 PartnerId int64 `json:"partnerId,omitempty,string"` 7235 7236 // ReadAccessInherited: Whether to give all advertisers of the 7237 // read/write accessor partner read access to the guaranteed order. Only 7238 // applicable if read_write_partner_id is set in the guaranteed order. 7239 ReadAccessInherited bool `json:"readAccessInherited,omitempty"` 7240 7241 // RemovedAdvertisers: The advertisers to remove as read accessors to 7242 // the guaranteed order. 7243 RemovedAdvertisers googleapi.Int64s `json:"removedAdvertisers,omitempty"` 7244 7245 // ForceSendFields is a list of field names (e.g. "AddedAdvertisers") to 7246 // unconditionally include in API requests. By default, fields with 7247 // empty or default values are omitted from API requests. However, any 7248 // non-pointer, non-interface field appearing in ForceSendFields will be 7249 // sent to the server regardless of whether the field is empty or not. 7250 // This may be used to include empty fields in Patch requests. 7251 ForceSendFields []string `json:"-"` 7252 7253 // NullFields is a list of field names (e.g. "AddedAdvertisers") to 7254 // include in API requests with the JSON null value. By default, fields 7255 // with empty values are omitted from API requests. However, any field 7256 // with an empty value appearing in NullFields will be sent to the 7257 // server as null. It is an error if a field in this list has a 7258 // non-empty value. This may be used to include null fields in Patch 7259 // requests. 7260 NullFields []string `json:"-"` 7261 } 7262 7263 func (s *EditGuaranteedOrderReadAccessorsRequest) MarshalJSON() ([]byte, error) { 7264 type NoMethod EditGuaranteedOrderReadAccessorsRequest 7265 raw := NoMethod(*s) 7266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7267 } 7268 7269 type EditGuaranteedOrderReadAccessorsResponse struct { 7270 // ReadAccessInherited: Whether all advertisers of read_write_partner_id 7271 // have read access to the guaranteed order. 7272 ReadAccessInherited bool `json:"readAccessInherited,omitempty"` 7273 7274 // ReadAdvertiserIds: The IDs of advertisers with read access to the 7275 // guaranteed order. 7276 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"` 7277 7278 // ServerResponse contains the HTTP response code and headers from the 7279 // server. 7280 googleapi.ServerResponse `json:"-"` 7281 7282 // ForceSendFields is a list of field names (e.g. "ReadAccessInherited") 7283 // to unconditionally include in API requests. By default, fields with 7284 // empty or default values are omitted from API requests. However, any 7285 // non-pointer, non-interface field appearing in ForceSendFields will be 7286 // sent to the server regardless of whether the field is empty or not. 7287 // This may be used to include empty fields in Patch requests. 7288 ForceSendFields []string `json:"-"` 7289 7290 // NullFields is a list of field names (e.g. "ReadAccessInherited") to 7291 // include in API requests with the JSON null value. By default, fields 7292 // with empty values are omitted from API requests. However, any field 7293 // with an empty value appearing in NullFields will be sent to the 7294 // server as null. It is an error if a field in this list has a 7295 // non-empty value. This may be used to include null fields in Patch 7296 // requests. 7297 NullFields []string `json:"-"` 7298 } 7299 7300 func (s *EditGuaranteedOrderReadAccessorsResponse) MarshalJSON() ([]byte, error) { 7301 type NoMethod EditGuaranteedOrderReadAccessorsResponse 7302 raw := NoMethod(*s) 7303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7304 } 7305 7306 // EditInventorySourceReadWriteAccessorsRequest: Request message for 7307 // InventorySourceService.EditInventorySourceReadWriteAccessors. 7308 type EditInventorySourceReadWriteAccessorsRequest struct { 7309 // AdvertisersUpdate: The advertisers to add or remove from the list of 7310 // advertisers that have read/write access to the inventory source. This 7311 // change will remove an existing partner read/write accessor. 7312 AdvertisersUpdate *EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate `json:"advertisersUpdate,omitempty"` 7313 7314 // AssignPartner: Set the partner context as read/write accessor of the 7315 // inventory source. This will remove all other current read/write 7316 // advertiser accessors. 7317 AssignPartner bool `json:"assignPartner,omitempty"` 7318 7319 // PartnerId: Required. The partner context by which the accessors 7320 // change is being made. 7321 PartnerId int64 `json:"partnerId,omitempty,string"` 7322 7323 // ForceSendFields is a list of field names (e.g. "AdvertisersUpdate") 7324 // to unconditionally include in API requests. By default, fields with 7325 // empty or default values are omitted from API requests. However, any 7326 // non-pointer, non-interface field appearing in ForceSendFields will be 7327 // sent to the server regardless of whether the field is empty or not. 7328 // This may be used to include empty fields in Patch requests. 7329 ForceSendFields []string `json:"-"` 7330 7331 // NullFields is a list of field names (e.g. "AdvertisersUpdate") to 7332 // include in API requests with the JSON null value. By default, fields 7333 // with empty values are omitted from API requests. However, any field 7334 // with an empty value appearing in NullFields will be sent to the 7335 // server as null. It is an error if a field in this list has a 7336 // non-empty value. This may be used to include null fields in Patch 7337 // requests. 7338 NullFields []string `json:"-"` 7339 } 7340 7341 func (s *EditInventorySourceReadWriteAccessorsRequest) MarshalJSON() ([]byte, error) { 7342 type NoMethod EditInventorySourceReadWriteAccessorsRequest 7343 raw := NoMethod(*s) 7344 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7345 } 7346 7347 // EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate: Update 7348 // to the list of advertisers with read/write access to the inventory 7349 // source. 7350 type EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate struct { 7351 // AddedAdvertisers: The advertisers to add. 7352 AddedAdvertisers googleapi.Int64s `json:"addedAdvertisers,omitempty"` 7353 7354 // RemovedAdvertisers: The advertisers to remove. 7355 RemovedAdvertisers googleapi.Int64s `json:"removedAdvertisers,omitempty"` 7356 7357 // ForceSendFields is a list of field names (e.g. "AddedAdvertisers") to 7358 // unconditionally include in API requests. By default, fields with 7359 // empty or default values are omitted from API requests. However, any 7360 // non-pointer, non-interface field appearing in ForceSendFields will be 7361 // sent to the server regardless of whether the field is empty or not. 7362 // This may be used to include empty fields in Patch requests. 7363 ForceSendFields []string `json:"-"` 7364 7365 // NullFields is a list of field names (e.g. "AddedAdvertisers") to 7366 // include in API requests with the JSON null value. By default, fields 7367 // with empty values are omitted from API requests. However, any field 7368 // with an empty value appearing in NullFields will be sent to the 7369 // server as null. It is an error if a field in this list has a 7370 // non-empty value. This may be used to include null fields in Patch 7371 // requests. 7372 NullFields []string `json:"-"` 7373 } 7374 7375 func (s *EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate) MarshalJSON() ([]byte, error) { 7376 type NoMethod EditInventorySourceReadWriteAccessorsRequestAdvertisersUpdate 7377 raw := NoMethod(*s) 7378 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7379 } 7380 7381 // Empty: A generic empty message that you can re-use to avoid defining 7382 // duplicated empty messages in your APIs. A typical example is to use 7383 // it as the request or the response type of an API method. For 7384 // instance: service Foo { rpc Bar(google.protobuf.Empty) returns 7385 // (google.protobuf.Empty); } 7386 type Empty struct { 7387 // ServerResponse contains the HTTP response code and headers from the 7388 // server. 7389 googleapi.ServerResponse `json:"-"` 7390 } 7391 7392 // EnvironmentAssignedTargetingOptionDetails: Assigned environment 7393 // targeting option details. This will be populated in the details field 7394 // of an AssignedTargetingOption when targeting_type is 7395 // `TARGETING_TYPE_ENVIRONMENT`. 7396 type EnvironmentAssignedTargetingOptionDetails struct { 7397 // Environment: Required. The serving environment. 7398 // 7399 // Possible values: 7400 // "ENVIRONMENT_UNSPECIFIED" - Default value when environment is not 7401 // specified in this version. This enum is a placeholder for default 7402 // value and does not represent a real environment option. 7403 // "ENVIRONMENT_WEB_OPTIMIZED" - Target inventory displayed in 7404 // browsers. This includes inventory that was designed for the device it 7405 // was viewed on, such as mobile websites viewed on a mobile device. 7406 // ENVIRONMENT_WEB_NOT_OPTIMIZED, if targeted, should be deleted prior 7407 // to the deletion of this targeting option. 7408 // "ENVIRONMENT_WEB_NOT_OPTIMIZED" - Target inventory displayed in 7409 // browsers. This includes inventory that was not designed for the 7410 // device but viewed on it, such as websites optimized for desktop but 7411 // viewed on a mobile device. ENVIRONMENT_WEB_OPTIMIZED should be 7412 // targeted prior to the addition of this targeting option. 7413 // "ENVIRONMENT_APP" - Target inventory displayed in apps. 7414 Environment string `json:"environment,omitempty"` 7415 7416 // TargetingOptionId: Required. The targeting_option_id of a 7417 // TargetingOption of type `TARGETING_TYPE_ENVIRONMENT` (e.g., "508010" 7418 // for targeting the `ENVIRONMENT_WEB_OPTIMIZED` option). 7419 TargetingOptionId string `json:"targetingOptionId,omitempty"` 7420 7421 // ForceSendFields is a list of field names (e.g. "Environment") to 7422 // unconditionally include in API requests. By default, fields with 7423 // empty or default values are omitted from API requests. However, any 7424 // non-pointer, non-interface field appearing in ForceSendFields will be 7425 // sent to the server regardless of whether the field is empty or not. 7426 // This may be used to include empty fields in Patch requests. 7427 ForceSendFields []string `json:"-"` 7428 7429 // NullFields is a list of field names (e.g. "Environment") to include 7430 // in API requests with the JSON null value. By default, fields with 7431 // empty values are omitted from API requests. However, any field with 7432 // an empty value appearing in NullFields will be sent to the server as 7433 // null. It is an error if a field in this list has a non-empty value. 7434 // This may be used to include null fields in Patch requests. 7435 NullFields []string `json:"-"` 7436 } 7437 7438 func (s *EnvironmentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7439 type NoMethod EnvironmentAssignedTargetingOptionDetails 7440 raw := NoMethod(*s) 7441 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7442 } 7443 7444 // EnvironmentTargetingOptionDetails: Represents a targetable 7445 // environment. This will be populated in the environment_details field 7446 // of a TargetingOption when targeting_type is 7447 // `TARGETING_TYPE_ENVIRONMENT`. 7448 type EnvironmentTargetingOptionDetails struct { 7449 // Environment: Output only. The serving environment. 7450 // 7451 // Possible values: 7452 // "ENVIRONMENT_UNSPECIFIED" - Default value when environment is not 7453 // specified in this version. This enum is a placeholder for default 7454 // value and does not represent a real environment option. 7455 // "ENVIRONMENT_WEB_OPTIMIZED" - Target inventory displayed in 7456 // browsers. This includes inventory that was designed for the device it 7457 // was viewed on, such as mobile websites viewed on a mobile device. 7458 // ENVIRONMENT_WEB_NOT_OPTIMIZED, if targeted, should be deleted prior 7459 // to the deletion of this targeting option. 7460 // "ENVIRONMENT_WEB_NOT_OPTIMIZED" - Target inventory displayed in 7461 // browsers. This includes inventory that was not designed for the 7462 // device but viewed on it, such as websites optimized for desktop but 7463 // viewed on a mobile device. ENVIRONMENT_WEB_OPTIMIZED should be 7464 // targeted prior to the addition of this targeting option. 7465 // "ENVIRONMENT_APP" - Target inventory displayed in apps. 7466 Environment string `json:"environment,omitempty"` 7467 7468 // ForceSendFields is a list of field names (e.g. "Environment") to 7469 // unconditionally include in API requests. By default, fields with 7470 // empty or default values are omitted from API requests. However, any 7471 // non-pointer, non-interface field appearing in ForceSendFields will be 7472 // sent to the server regardless of whether the field is empty or not. 7473 // This may be used to include empty fields in Patch requests. 7474 ForceSendFields []string `json:"-"` 7475 7476 // NullFields is a list of field names (e.g. "Environment") to include 7477 // in API requests with the JSON null value. By default, fields with 7478 // empty values are omitted from API requests. However, any field with 7479 // an empty value appearing in NullFields will be sent to the server as 7480 // null. It is an error if a field in this list has a non-empty value. 7481 // This may be used to include null fields in Patch requests. 7482 NullFields []string `json:"-"` 7483 } 7484 7485 func (s *EnvironmentTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7486 type NoMethod EnvironmentTargetingOptionDetails 7487 raw := NoMethod(*s) 7488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7489 } 7490 7491 // ExchangeAssignedTargetingOptionDetails: Details for assigned exchange 7492 // targeting option. This will be populated in the details field of an 7493 // AssignedTargetingOption when targeting_type is 7494 // `TARGETING_TYPE_EXCHANGE`. 7495 type ExchangeAssignedTargetingOptionDetails struct { 7496 // TargetingOptionId: Required. The targeting_option_id of a 7497 // TargetingOption of type `TARGETING_TYPE_EXCHANGE`. 7498 TargetingOptionId string `json:"targetingOptionId,omitempty"` 7499 7500 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 7501 // to unconditionally include in API requests. By default, fields with 7502 // empty or default values are omitted from API requests. However, any 7503 // non-pointer, non-interface field appearing in ForceSendFields will be 7504 // sent to the server regardless of whether the field is empty or not. 7505 // This may be used to include empty fields in Patch requests. 7506 ForceSendFields []string `json:"-"` 7507 7508 // NullFields is a list of field names (e.g. "TargetingOptionId") to 7509 // include in API requests with the JSON null value. By default, fields 7510 // with empty values are omitted from API requests. However, any field 7511 // with an empty value appearing in NullFields will be sent to the 7512 // server as null. It is an error if a field in this list has a 7513 // non-empty value. This may be used to include null fields in Patch 7514 // requests. 7515 NullFields []string `json:"-"` 7516 } 7517 7518 func (s *ExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7519 type NoMethod ExchangeAssignedTargetingOptionDetails 7520 raw := NoMethod(*s) 7521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7522 } 7523 7524 // ExchangeConfig: Settings that control which exchanges are enabled for 7525 // a partner. 7526 type ExchangeConfig struct { 7527 // EnabledExchanges: All enabled exchanges in the partner. Duplicate 7528 // enabled exchanges will be ignored. 7529 EnabledExchanges []*ExchangeConfigEnabledExchange `json:"enabledExchanges,omitempty"` 7530 7531 // ForceSendFields is a list of field names (e.g. "EnabledExchanges") to 7532 // unconditionally include in API requests. By default, fields with 7533 // empty or default values are omitted from API requests. However, any 7534 // non-pointer, non-interface field appearing in ForceSendFields will be 7535 // sent to the server regardless of whether the field is empty or not. 7536 // This may be used to include empty fields in Patch requests. 7537 ForceSendFields []string `json:"-"` 7538 7539 // NullFields is a list of field names (e.g. "EnabledExchanges") to 7540 // include in API requests with the JSON null value. By default, fields 7541 // with empty values are omitted from API requests. However, any field 7542 // with an empty value appearing in NullFields will be sent to the 7543 // server as null. It is an error if a field in this list has a 7544 // non-empty value. This may be used to include null fields in Patch 7545 // requests. 7546 NullFields []string `json:"-"` 7547 } 7548 7549 func (s *ExchangeConfig) MarshalJSON() ([]byte, error) { 7550 type NoMethod ExchangeConfig 7551 raw := NoMethod(*s) 7552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7553 } 7554 7555 // ExchangeConfigEnabledExchange: An enabled exchange in the partner. 7556 type ExchangeConfigEnabledExchange struct { 7557 // Exchange: The enabled exchange. 7558 // 7559 // Possible values: 7560 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 7561 // this version. 7562 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 7563 // "EXCHANGE_APPNEXUS" - AppNexus. 7564 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 7565 // "EXCHANGE_ADFORM" - Adform. 7566 // "EXCHANGE_ADMETA" - Admeta. 7567 // "EXCHANGE_ADMIXER" - Admixer. 7568 // "EXCHANGE_ADSMOGO" - AdsMogo. 7569 // "EXCHANGE_ADSWIZZ" - AdsWizz. 7570 // "EXCHANGE_BIDSWITCH" - BidSwitch. 7571 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 7572 // from Yahoo!. 7573 // "EXCHANGE_CADREON" - Cadreon. 7574 // "EXCHANGE_DAILYMOTION" - Dailymotion. 7575 // "EXCHANGE_FIVE" - Five. 7576 // "EXCHANGE_FLUCT" - Fluct. 7577 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 7578 // "EXCHANGE_GENIEE" - Geniee. 7579 // "EXCHANGE_GUMGUM" - GumGum. 7580 // "EXCHANGE_IMOBILE" - i-mobile. 7581 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 7582 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 7583 // "EXCHANGE_INDEX" - Index Exchange. 7584 // "EXCHANGE_KARGO" - Kargo. 7585 // "EXCHANGE_MICROAD" - MicroAd. 7586 // "EXCHANGE_MOPUB" - MoPub. 7587 // "EXCHANGE_NEND" - Nend. 7588 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 7589 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 7590 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 7591 // "EXCHANGE_OOYALA" - Ooyala. 7592 // "EXCHANGE_OPENX" - OpenX. 7593 // "EXCHANGE_PERMODO" - Permodo. 7594 // "EXCHANGE_PLATFORMONE" - Platform One. 7595 // "EXCHANGE_PLATFORMID" - PlatformId. 7596 // "EXCHANGE_PUBMATIC" - PubMatic. 7597 // "EXCHANGE_PULSEPOINT" - PulsePoint. 7598 // "EXCHANGE_REVENUEMAX" - RevenueMax. 7599 // "EXCHANGE_RUBICON" - Rubicon. 7600 // "EXCHANGE_SMARTCLIP" - SmartClip. 7601 // "EXCHANGE_SMARTRTB" - SmartRTB+. 7602 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 7603 // "EXCHANGE_SOVRN" - Sovrn. 7604 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 7605 // "EXCHANGE_STROER" - Ströer SSP. 7606 // "EXCHANGE_TEADSTV" - TeadsTv. 7607 // "EXCHANGE_TELARIA" - Telaria. 7608 // "EXCHANGE_TVN" - TVN. 7609 // "EXCHANGE_UNITED" - United. 7610 // "EXCHANGE_YIELDLAB" - Yieldlab. 7611 // "EXCHANGE_YIELDMO" - Yieldmo. 7612 // "EXCHANGE_UNRULYX" - UnrulyX. 7613 // "EXCHANGE_OPEN8" - Open8. 7614 // "EXCHANGE_TRITON" - Triton. 7615 // "EXCHANGE_TRIPLELIFT" - TripleLift. 7616 // "EXCHANGE_TABOOLA" - Taboola. 7617 // "EXCHANGE_INMOBI" - InMobi. 7618 // "EXCHANGE_SMAATO" - Smaato. 7619 // "EXCHANGE_AJA" - Aja. 7620 // "EXCHANGE_SUPERSHIP" - Supership. 7621 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 7622 // "EXCHANGE_WAZE" - Waze. 7623 // "EXCHANGE_SOUNDCAST" - SoundCast. 7624 // "EXCHANGE_SHARETHROUGH" - Sharethrough. 7625 // "EXCHANGE_FYBER" - Fyber. 7626 // "EXCHANGE_RED_FOR_PUBLISHERS" - Red For Publishers. 7627 // "EXCHANGE_MEDIANET" - Media.net. 7628 // "EXCHANGE_TAPJOY" - Tapjoy. 7629 // "EXCHANGE_VISTAR" - Vistar. 7630 // "EXCHANGE_DAX" - DAX. 7631 // "EXCHANGE_JCD" - JCD. 7632 // "EXCHANGE_PLACE_EXCHANGE" - Place Exchange. 7633 // "EXCHANGE_APPLOVIN" - AppLovin. 7634 // "EXCHANGE_CONNATIX" - Connatix. 7635 // "EXCHANGE_RESET_DIGITAL" - Reset Digital. 7636 // "EXCHANGE_HIVESTACK" - Hivestack. 7637 Exchange string `json:"exchange,omitempty"` 7638 7639 // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. 7640 // The field is only relevant when Google Ad Manager is the enabled 7641 // exchange. 7642 GoogleAdManagerAgencyId string `json:"googleAdManagerAgencyId,omitempty"` 7643 7644 // GoogleAdManagerBuyerNetworkId: Output only. Network ID of Google Ad 7645 // Manager. The field is only relevant when Google Ad Manager is the 7646 // enabled exchange. 7647 GoogleAdManagerBuyerNetworkId string `json:"googleAdManagerBuyerNetworkId,omitempty"` 7648 7649 // SeatId: Output only. Seat ID of the enabled exchange. 7650 SeatId string `json:"seatId,omitempty"` 7651 7652 // ForceSendFields is a list of field names (e.g. "Exchange") to 7653 // unconditionally include in API requests. By default, fields with 7654 // empty or default values are omitted from API requests. However, any 7655 // non-pointer, non-interface field appearing in ForceSendFields will be 7656 // sent to the server regardless of whether the field is empty or not. 7657 // This may be used to include empty fields in Patch requests. 7658 ForceSendFields []string `json:"-"` 7659 7660 // NullFields is a list of field names (e.g. "Exchange") to include in 7661 // API requests with the JSON null value. By default, fields with empty 7662 // values are omitted from API requests. However, any field with an 7663 // empty value appearing in NullFields will be sent to the server as 7664 // null. It is an error if a field in this list has a non-empty value. 7665 // This may be used to include null fields in Patch requests. 7666 NullFields []string `json:"-"` 7667 } 7668 7669 func (s *ExchangeConfigEnabledExchange) MarshalJSON() ([]byte, error) { 7670 type NoMethod ExchangeConfigEnabledExchange 7671 raw := NoMethod(*s) 7672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7673 } 7674 7675 // ExchangeReviewStatus: Exchange review status for the creative. 7676 type ExchangeReviewStatus struct { 7677 // Exchange: The exchange reviewing the creative. 7678 // 7679 // Possible values: 7680 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 7681 // this version. 7682 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 7683 // "EXCHANGE_APPNEXUS" - AppNexus. 7684 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 7685 // "EXCHANGE_ADFORM" - Adform. 7686 // "EXCHANGE_ADMETA" - Admeta. 7687 // "EXCHANGE_ADMIXER" - Admixer. 7688 // "EXCHANGE_ADSMOGO" - AdsMogo. 7689 // "EXCHANGE_ADSWIZZ" - AdsWizz. 7690 // "EXCHANGE_BIDSWITCH" - BidSwitch. 7691 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 7692 // from Yahoo!. 7693 // "EXCHANGE_CADREON" - Cadreon. 7694 // "EXCHANGE_DAILYMOTION" - Dailymotion. 7695 // "EXCHANGE_FIVE" - Five. 7696 // "EXCHANGE_FLUCT" - Fluct. 7697 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 7698 // "EXCHANGE_GENIEE" - Geniee. 7699 // "EXCHANGE_GUMGUM" - GumGum. 7700 // "EXCHANGE_IMOBILE" - i-mobile. 7701 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 7702 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 7703 // "EXCHANGE_INDEX" - Index Exchange. 7704 // "EXCHANGE_KARGO" - Kargo. 7705 // "EXCHANGE_MICROAD" - MicroAd. 7706 // "EXCHANGE_MOPUB" - MoPub. 7707 // "EXCHANGE_NEND" - Nend. 7708 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 7709 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 7710 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 7711 // "EXCHANGE_OOYALA" - Ooyala. 7712 // "EXCHANGE_OPENX" - OpenX. 7713 // "EXCHANGE_PERMODO" - Permodo. 7714 // "EXCHANGE_PLATFORMONE" - Platform One. 7715 // "EXCHANGE_PLATFORMID" - PlatformId. 7716 // "EXCHANGE_PUBMATIC" - PubMatic. 7717 // "EXCHANGE_PULSEPOINT" - PulsePoint. 7718 // "EXCHANGE_REVENUEMAX" - RevenueMax. 7719 // "EXCHANGE_RUBICON" - Rubicon. 7720 // "EXCHANGE_SMARTCLIP" - SmartClip. 7721 // "EXCHANGE_SMARTRTB" - SmartRTB+. 7722 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 7723 // "EXCHANGE_SOVRN" - Sovrn. 7724 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 7725 // "EXCHANGE_STROER" - Ströer SSP. 7726 // "EXCHANGE_TEADSTV" - TeadsTv. 7727 // "EXCHANGE_TELARIA" - Telaria. 7728 // "EXCHANGE_TVN" - TVN. 7729 // "EXCHANGE_UNITED" - United. 7730 // "EXCHANGE_YIELDLAB" - Yieldlab. 7731 // "EXCHANGE_YIELDMO" - Yieldmo. 7732 // "EXCHANGE_UNRULYX" - UnrulyX. 7733 // "EXCHANGE_OPEN8" - Open8. 7734 // "EXCHANGE_TRITON" - Triton. 7735 // "EXCHANGE_TRIPLELIFT" - TripleLift. 7736 // "EXCHANGE_TABOOLA" - Taboola. 7737 // "EXCHANGE_INMOBI" - InMobi. 7738 // "EXCHANGE_SMAATO" - Smaato. 7739 // "EXCHANGE_AJA" - Aja. 7740 // "EXCHANGE_SUPERSHIP" - Supership. 7741 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 7742 // "EXCHANGE_WAZE" - Waze. 7743 // "EXCHANGE_SOUNDCAST" - SoundCast. 7744 // "EXCHANGE_SHARETHROUGH" - Sharethrough. 7745 // "EXCHANGE_FYBER" - Fyber. 7746 // "EXCHANGE_RED_FOR_PUBLISHERS" - Red For Publishers. 7747 // "EXCHANGE_MEDIANET" - Media.net. 7748 // "EXCHANGE_TAPJOY" - Tapjoy. 7749 // "EXCHANGE_VISTAR" - Vistar. 7750 // "EXCHANGE_DAX" - DAX. 7751 // "EXCHANGE_JCD" - JCD. 7752 // "EXCHANGE_PLACE_EXCHANGE" - Place Exchange. 7753 // "EXCHANGE_APPLOVIN" - AppLovin. 7754 // "EXCHANGE_CONNATIX" - Connatix. 7755 // "EXCHANGE_RESET_DIGITAL" - Reset Digital. 7756 // "EXCHANGE_HIVESTACK" - Hivestack. 7757 Exchange string `json:"exchange,omitempty"` 7758 7759 // Status: Status of the exchange review. 7760 // 7761 // Possible values: 7762 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 7763 // unknown in this version. 7764 // "REVIEW_STATUS_APPROVED" - The creative is approved. 7765 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 7766 // "REVIEW_STATUS_PENDING" - The creative is pending review. 7767 Status string `json:"status,omitempty"` 7768 7769 // ForceSendFields is a list of field names (e.g. "Exchange") to 7770 // unconditionally include in API requests. By default, fields with 7771 // empty or default values are omitted from API requests. However, any 7772 // non-pointer, non-interface field appearing in ForceSendFields will be 7773 // sent to the server regardless of whether the field is empty or not. 7774 // This may be used to include empty fields in Patch requests. 7775 ForceSendFields []string `json:"-"` 7776 7777 // NullFields is a list of field names (e.g. "Exchange") to include in 7778 // API requests with the JSON null value. By default, fields with empty 7779 // values are omitted from API requests. However, any field with an 7780 // empty value appearing in NullFields will be sent to the server as 7781 // null. It is an error if a field in this list has a non-empty value. 7782 // This may be used to include null fields in Patch requests. 7783 NullFields []string `json:"-"` 7784 } 7785 7786 func (s *ExchangeReviewStatus) MarshalJSON() ([]byte, error) { 7787 type NoMethod ExchangeReviewStatus 7788 raw := NoMethod(*s) 7789 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7790 } 7791 7792 // ExchangeTargetingOptionDetails: Represents a targetable exchange. 7793 // This will be populated in the exchange_details field of a 7794 // TargetingOption when targeting_type is `TARGETING_TYPE_EXCHANGE`. 7795 type ExchangeTargetingOptionDetails struct { 7796 // Exchange: Output only. The type of exchange. 7797 // 7798 // Possible values: 7799 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 7800 // this version. 7801 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 7802 // "EXCHANGE_APPNEXUS" - AppNexus. 7803 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 7804 // "EXCHANGE_ADFORM" - Adform. 7805 // "EXCHANGE_ADMETA" - Admeta. 7806 // "EXCHANGE_ADMIXER" - Admixer. 7807 // "EXCHANGE_ADSMOGO" - AdsMogo. 7808 // "EXCHANGE_ADSWIZZ" - AdsWizz. 7809 // "EXCHANGE_BIDSWITCH" - BidSwitch. 7810 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 7811 // from Yahoo!. 7812 // "EXCHANGE_CADREON" - Cadreon. 7813 // "EXCHANGE_DAILYMOTION" - Dailymotion. 7814 // "EXCHANGE_FIVE" - Five. 7815 // "EXCHANGE_FLUCT" - Fluct. 7816 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 7817 // "EXCHANGE_GENIEE" - Geniee. 7818 // "EXCHANGE_GUMGUM" - GumGum. 7819 // "EXCHANGE_IMOBILE" - i-mobile. 7820 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 7821 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 7822 // "EXCHANGE_INDEX" - Index Exchange. 7823 // "EXCHANGE_KARGO" - Kargo. 7824 // "EXCHANGE_MICROAD" - MicroAd. 7825 // "EXCHANGE_MOPUB" - MoPub. 7826 // "EXCHANGE_NEND" - Nend. 7827 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 7828 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 7829 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 7830 // "EXCHANGE_OOYALA" - Ooyala. 7831 // "EXCHANGE_OPENX" - OpenX. 7832 // "EXCHANGE_PERMODO" - Permodo. 7833 // "EXCHANGE_PLATFORMONE" - Platform One. 7834 // "EXCHANGE_PLATFORMID" - PlatformId. 7835 // "EXCHANGE_PUBMATIC" - PubMatic. 7836 // "EXCHANGE_PULSEPOINT" - PulsePoint. 7837 // "EXCHANGE_REVENUEMAX" - RevenueMax. 7838 // "EXCHANGE_RUBICON" - Rubicon. 7839 // "EXCHANGE_SMARTCLIP" - SmartClip. 7840 // "EXCHANGE_SMARTRTB" - SmartRTB+. 7841 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 7842 // "EXCHANGE_SOVRN" - Sovrn. 7843 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 7844 // "EXCHANGE_STROER" - Ströer SSP. 7845 // "EXCHANGE_TEADSTV" - TeadsTv. 7846 // "EXCHANGE_TELARIA" - Telaria. 7847 // "EXCHANGE_TVN" - TVN. 7848 // "EXCHANGE_UNITED" - United. 7849 // "EXCHANGE_YIELDLAB" - Yieldlab. 7850 // "EXCHANGE_YIELDMO" - Yieldmo. 7851 // "EXCHANGE_UNRULYX" - UnrulyX. 7852 // "EXCHANGE_OPEN8" - Open8. 7853 // "EXCHANGE_TRITON" - Triton. 7854 // "EXCHANGE_TRIPLELIFT" - TripleLift. 7855 // "EXCHANGE_TABOOLA" - Taboola. 7856 // "EXCHANGE_INMOBI" - InMobi. 7857 // "EXCHANGE_SMAATO" - Smaato. 7858 // "EXCHANGE_AJA" - Aja. 7859 // "EXCHANGE_SUPERSHIP" - Supership. 7860 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 7861 // "EXCHANGE_WAZE" - Waze. 7862 // "EXCHANGE_SOUNDCAST" - SoundCast. 7863 // "EXCHANGE_SHARETHROUGH" - Sharethrough. 7864 // "EXCHANGE_FYBER" - Fyber. 7865 // "EXCHANGE_RED_FOR_PUBLISHERS" - Red For Publishers. 7866 // "EXCHANGE_MEDIANET" - Media.net. 7867 // "EXCHANGE_TAPJOY" - Tapjoy. 7868 // "EXCHANGE_VISTAR" - Vistar. 7869 // "EXCHANGE_DAX" - DAX. 7870 // "EXCHANGE_JCD" - JCD. 7871 // "EXCHANGE_PLACE_EXCHANGE" - Place Exchange. 7872 // "EXCHANGE_APPLOVIN" - AppLovin. 7873 // "EXCHANGE_CONNATIX" - Connatix. 7874 // "EXCHANGE_RESET_DIGITAL" - Reset Digital. 7875 // "EXCHANGE_HIVESTACK" - Hivestack. 7876 Exchange string `json:"exchange,omitempty"` 7877 7878 // ForceSendFields is a list of field names (e.g. "Exchange") to 7879 // unconditionally include in API requests. By default, fields with 7880 // empty or default values are omitted from API requests. However, any 7881 // non-pointer, non-interface field appearing in ForceSendFields will be 7882 // sent to the server regardless of whether the field is empty or not. 7883 // This may be used to include empty fields in Patch requests. 7884 ForceSendFields []string `json:"-"` 7885 7886 // NullFields is a list of field names (e.g. "Exchange") to include in 7887 // API requests with the JSON null value. By default, fields with empty 7888 // values are omitted from API requests. However, any field with an 7889 // empty value appearing in NullFields will be sent to the server as 7890 // null. It is an error if a field in this list has a non-empty value. 7891 // This may be used to include null fields in Patch requests. 7892 NullFields []string `json:"-"` 7893 } 7894 7895 func (s *ExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7896 type NoMethod ExchangeTargetingOptionDetails 7897 raw := NoMethod(*s) 7898 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7899 } 7900 7901 // ExitEvent: Exit event of the creative. 7902 type ExitEvent struct { 7903 // Name: The name of the click tag of the exit event. The name must be 7904 // unique within one creative. Leave it empty or unset for creatives 7905 // containing image assets only. 7906 Name string `json:"name,omitempty"` 7907 7908 // ReportingName: The name used to identify this event in reports. Leave 7909 // it empty or unset for creatives containing image assets only. 7910 ReportingName string `json:"reportingName,omitempty"` 7911 7912 // Type: Required. The type of the exit event. 7913 // 7914 // Possible values: 7915 // "EXIT_EVENT_TYPE_UNSPECIFIED" - Exit event type is not specified or 7916 // is unknown in this version. 7917 // "EXIT_EVENT_TYPE_DEFAULT" - The exit event is the default one. 7918 // "EXIT_EVENT_TYPE_BACKUP" - The exit event is a backup exit event. 7919 // There could be multiple backup exit events in a creative. 7920 Type string `json:"type,omitempty"` 7921 7922 // Url: Required. The click through URL of the exit event. This is 7923 // required when type is: * `EXIT_EVENT_TYPE_DEFAULT` * 7924 // `EXIT_EVENT_TYPE_BACKUP` 7925 Url string `json:"url,omitempty"` 7926 7927 // ForceSendFields is a list of field names (e.g. "Name") to 7928 // unconditionally include in API requests. By default, fields with 7929 // empty or default values are omitted from API requests. However, any 7930 // non-pointer, non-interface field appearing in ForceSendFields will be 7931 // sent to the server regardless of whether the field is empty or not. 7932 // This may be used to include empty fields in Patch requests. 7933 ForceSendFields []string `json:"-"` 7934 7935 // NullFields is a list of field names (e.g. "Name") to include in API 7936 // requests with the JSON null value. By default, fields with empty 7937 // values are omitted from API requests. However, any field with an 7938 // empty value appearing in NullFields will be sent to the server as 7939 // null. It is an error if a field in this list has a non-empty value. 7940 // This may be used to include null fields in Patch requests. 7941 NullFields []string `json:"-"` 7942 } 7943 7944 func (s *ExitEvent) MarshalJSON() ([]byte, error) { 7945 type NoMethod ExitEvent 7946 raw := NoMethod(*s) 7947 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7948 } 7949 7950 // FirstAndThirdPartyAudience: Describes a first or third party audience 7951 // list used for targeting. First party audiences are created via usage 7952 // of client data. Third party audiences are provided by Third Party 7953 // data providers and can only be licensed to customers. 7954 type FirstAndThirdPartyAudience struct { 7955 // ActiveDisplayAudienceSize: Output only. The estimated audience size 7956 // for the Display network in the past month. If the size is less than 7957 // 1000, the number will be hidden and 0 will be returned due to privacy 7958 // reasons. Otherwise, the number will be rounded off to two significant 7959 // digits. Only returned in GET request. 7960 ActiveDisplayAudienceSize int64 `json:"activeDisplayAudienceSize,omitempty,string"` 7961 7962 // AppId: The app_id matches with the type of the mobile_device_ids 7963 // being uploaded. Only applicable to audience_type 7964 // `CUSTOMER_MATCH_DEVICE_ID` 7965 AppId string `json:"appId,omitempty"` 7966 7967 // AudienceSource: Output only. The source of the audience. 7968 // 7969 // Possible values: 7970 // "AUDIENCE_SOURCE_UNSPECIFIED" - Default value when audience source 7971 // is not specified or is unknown. 7972 // "DISPLAY_VIDEO_360" - Originated from Display & Video 360. 7973 // "CAMPAIGN_MANAGER" - Originated from Campaign Manager 360. 7974 // "AD_MANAGER" - Originated from Google Ad Manager. 7975 // "SEARCH_ADS_360" - Originated from Search Ads 360. 7976 // "YOUTUBE" - Originated from Youtube. 7977 // "ADS_DATA_HUB" - Originated from Ads Data Hub. 7978 AudienceSource string `json:"audienceSource,omitempty"` 7979 7980 // AudienceType: The type of the audience. 7981 // 7982 // Possible values: 7983 // "AUDIENCE_TYPE_UNSPECIFIED" - Default value when type is not 7984 // specified or is unknown. 7985 // "CUSTOMER_MATCH_CONTACT_INFO" - Audience was generated through 7986 // matching customers to known contact information. 7987 // "CUSTOMER_MATCH_DEVICE_ID" - Audience was generated through 7988 // matching customers to known Mobile device IDs. 7989 // "CUSTOMER_MATCH_USER_ID" - Audience was generated through matching 7990 // customers to known User IDs. 7991 // "ACTIVITY_BASED" - Audience was created based on campaign activity. 7992 // "FREQUENCY_CAP" - Audience was created based on excluding the 7993 // number of impressions they were served. 7994 // "TAG_BASED" - Audience was created based on custom variables 7995 // attached to pixel. 7996 // "YOUTUBE_USERS" - Audience was created based on past interactions 7997 // with videos, YouTube ads, or YouTube channel. 7998 // "LICENSED" - Subtype of third party audience type. 7999 AudienceType string `json:"audienceType,omitempty"` 8000 8001 // ContactInfoList: Input only. A list of contact information to define 8002 // the initial audience members. Only applicable to audience_type 8003 // `CUSTOMER_MATCH_CONTACT_INFO` 8004 ContactInfoList *ContactInfoList `json:"contactInfoList,omitempty"` 8005 8006 // Description: The user-provided description of the audience. Only 8007 // applicable to first party audiences. 8008 Description string `json:"description,omitempty"` 8009 8010 // DisplayAudienceSize: Output only. The estimated audience size for the 8011 // Display network. If the size is less than 1000, the number will be 8012 // hidden and 0 will be returned due to privacy reasons. Otherwise, the 8013 // number will be rounded off to two significant digits. Only returned 8014 // in GET request. 8015 DisplayAudienceSize int64 `json:"displayAudienceSize,omitempty,string"` 8016 8017 // DisplayDesktopAudienceSize: Output only. The estimated desktop 8018 // audience size in Display network. If the size is less than 1000, the 8019 // number will be hidden and 0 will be returned due to privacy reasons. 8020 // Otherwise, the number will be rounded off to two significant digits. 8021 // Only applicable to first party audiences. Only returned in GET 8022 // request. 8023 DisplayDesktopAudienceSize int64 `json:"displayDesktopAudienceSize,omitempty,string"` 8024 8025 // DisplayMobileAppAudienceSize: Output only. The estimated mobile app 8026 // audience size in Display network. If the size is less than 1000, the 8027 // number will be hidden and 0 will be returned due to privacy reasons. 8028 // Otherwise, the number will be rounded off to two significant digits. 8029 // Only applicable to first party audiences. Only returned in GET 8030 // request. 8031 DisplayMobileAppAudienceSize int64 `json:"displayMobileAppAudienceSize,omitempty,string"` 8032 8033 // DisplayMobileWebAudienceSize: Output only. The estimated mobile web 8034 // audience size in Display network. If the size is less than 1000, the 8035 // number will be hidden and 0 will be returned due to privacy reasons. 8036 // Otherwise, the number will be rounded off to two significant digits. 8037 // Only applicable to first party audiences. Only returned in GET 8038 // request. 8039 DisplayMobileWebAudienceSize int64 `json:"displayMobileWebAudienceSize,omitempty,string"` 8040 8041 // DisplayName: The display name of the first and third party audience. 8042 DisplayName string `json:"displayName,omitempty"` 8043 8044 // FirstAndThirdPartyAudienceId: Output only. The unique ID of the first 8045 // and third party audience. Assigned by the system. 8046 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"` 8047 8048 // FirstAndThirdPartyAudienceType: Whether the audience is a first or 8049 // third party audience. 8050 // 8051 // Possible values: 8052 // "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_UNSPECIFIED" - Default value 8053 // when type is not specified or is unknown. 8054 // "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY" - Audience that 8055 // is created via usage of client data. 8056 // "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_THIRD_PARTY" - Audience that 8057 // is provided by Third Party data providers. 8058 FirstAndThirdPartyAudienceType string `json:"firstAndThirdPartyAudienceType,omitempty"` 8059 8060 // GmailAudienceSize: Output only. The estimated audience size for Gmail 8061 // network. If the size is less than 1000, the number will be hidden and 8062 // 0 will be returned due to privacy reasons. Otherwise, the number will 8063 // be rounded off to two significant digits. Only applicable to first 8064 // party audiences. Only returned in GET request. 8065 GmailAudienceSize int64 `json:"gmailAudienceSize,omitempty,string"` 8066 8067 // MembershipDurationDays: The duration in days that an entry remains in 8068 // the audience after the qualifying event. If the audience has no 8069 // expiration, set the value of this field to 10000. Otherwise, the set 8070 // value must be greater than 0 and less than or equal to 540. Only 8071 // applicable to first party audiences. This field is required if one of 8072 // the following audience_type is used: * `CUSTOMER_MATCH_CONTACT_INFO` 8073 // * `CUSTOMER_MATCH_DEVICE_ID` 8074 MembershipDurationDays int64 `json:"membershipDurationDays,omitempty,string"` 8075 8076 // MobileDeviceIdList: Input only. A list of mobile device IDs to define 8077 // the initial audience members. Only applicable to audience_type 8078 // `CUSTOMER_MATCH_DEVICE_ID` 8079 MobileDeviceIdList *MobileDeviceIdList `json:"mobileDeviceIdList,omitempty"` 8080 8081 // Name: Output only. The resource name of the first and third party 8082 // audience. 8083 Name string `json:"name,omitempty"` 8084 8085 // YoutubeAudienceSize: Output only. The estimated audience size for 8086 // YouTube network. If the size is less than 1000, the number will be 8087 // hidden and 0 will be returned due to privacy reasons. Otherwise, the 8088 // number will be rounded off to two significant digits. Only applicable 8089 // to first party audiences. Only returned in GET request. 8090 YoutubeAudienceSize int64 `json:"youtubeAudienceSize,omitempty,string"` 8091 8092 // ServerResponse contains the HTTP response code and headers from the 8093 // server. 8094 googleapi.ServerResponse `json:"-"` 8095 8096 // ForceSendFields is a list of field names (e.g. 8097 // "ActiveDisplayAudienceSize") to unconditionally include in API 8098 // requests. By default, fields with empty or default values are omitted 8099 // from API requests. However, any non-pointer, non-interface field 8100 // appearing in ForceSendFields will be sent to the server regardless of 8101 // whether the field is empty or not. This may be used to include empty 8102 // fields in Patch requests. 8103 ForceSendFields []string `json:"-"` 8104 8105 // NullFields is a list of field names (e.g. 8106 // "ActiveDisplayAudienceSize") to include in API requests with the JSON 8107 // null value. By default, fields with empty values are omitted from API 8108 // requests. However, any field with an empty value appearing in 8109 // NullFields will be sent to the server as null. It is an error if a 8110 // field in this list has a non-empty value. This may be used to include 8111 // null fields in Patch requests. 8112 NullFields []string `json:"-"` 8113 } 8114 8115 func (s *FirstAndThirdPartyAudience) MarshalJSON() ([]byte, error) { 8116 type NoMethod FirstAndThirdPartyAudience 8117 raw := NoMethod(*s) 8118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8119 } 8120 8121 // FirstAndThirdPartyAudienceGroup: Details of first and third party 8122 // audience group. All first and third party audience targeting settings 8123 // are logically ‘OR’ of each other. 8124 type FirstAndThirdPartyAudienceGroup struct { 8125 // Settings: Required. All first and third party audience targeting 8126 // settings in first and third party audience group. Repeated settings 8127 // with same id are not allowed. 8128 Settings []*FirstAndThirdPartyAudienceTargetingSetting `json:"settings,omitempty"` 8129 8130 // ForceSendFields is a list of field names (e.g. "Settings") to 8131 // unconditionally include in API requests. By default, fields with 8132 // empty or default values are omitted from API requests. However, any 8133 // non-pointer, non-interface field appearing in ForceSendFields will be 8134 // sent to the server regardless of whether the field is empty or not. 8135 // This may be used to include empty fields in Patch requests. 8136 ForceSendFields []string `json:"-"` 8137 8138 // NullFields is a list of field names (e.g. "Settings") to include in 8139 // API requests with the JSON null value. By default, fields with empty 8140 // values are omitted from API requests. However, any field with an 8141 // empty value appearing in NullFields will be sent to the server as 8142 // null. It is an error if a field in this list has a non-empty value. 8143 // This may be used to include null fields in Patch requests. 8144 NullFields []string `json:"-"` 8145 } 8146 8147 func (s *FirstAndThirdPartyAudienceGroup) MarshalJSON() ([]byte, error) { 8148 type NoMethod FirstAndThirdPartyAudienceGroup 8149 raw := NoMethod(*s) 8150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8151 } 8152 8153 // FirstAndThirdPartyAudienceTargetingSetting: Details of first and 8154 // third party audience targeting setting. 8155 type FirstAndThirdPartyAudienceTargetingSetting struct { 8156 // FirstAndThirdPartyAudienceId: Required. First and third party 8157 // audience id of the first and third party audience targeting setting. 8158 // This id is first_and_third_party_audience_id. 8159 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"` 8160 8161 // Recency: The recency of the first and third party audience targeting 8162 // setting. Only applicable to first party audiences, otherwise will be 8163 // ignored. For more info, refer to 8164 // https://support.google.com/displayvideo/answer/2949947#recency When 8165 // unspecified, no recency limit will be used. 8166 // 8167 // Possible values: 8168 // "RECENCY_NO_LIMIT" - No limit of recency. 8169 // "RECENCY_1_MINUTE" - Recency is 1 minute. 8170 // "RECENCY_5_MINUTES" - Recency is 5 minutes. 8171 // "RECENCY_10_MINUTES" - Recency is 10 minutes. 8172 // "RECENCY_15_MINUTES" - Recency is 15 minutes. 8173 // "RECENCY_30_MINUTES" - Recency is 30 minutes. 8174 // "RECENCY_1_HOUR" - Recency is 1 hour. 8175 // "RECENCY_2_HOURS" - Recency is 2 hours. 8176 // "RECENCY_3_HOURS" - Recency is 3 hours. 8177 // "RECENCY_6_HOURS" - Recency is 6 hours. 8178 // "RECENCY_12_HOURS" - Recency is 12 hours. 8179 // "RECENCY_1_DAY" - Recency is 1 day. 8180 // "RECENCY_2_DAYS" - Recency is 2 days. 8181 // "RECENCY_3_DAYS" - Recency is 3 days. 8182 // "RECENCY_5_DAYS" - Recency is 5 days. 8183 // "RECENCY_7_DAYS" - Recency is 7 days. 8184 // "RECENCY_10_DAYS" - Recency is 10 days. 8185 // "RECENCY_14_DAYS" - Recency is 14 days. 8186 // "RECENCY_15_DAYS" - Recency is 15 days. 8187 // "RECENCY_21_DAYS" - Recency is 21 days. 8188 // "RECENCY_28_DAYS" - Recency is 28 days. 8189 // "RECENCY_30_DAYS" - Recency is 30 days. 8190 // "RECENCY_40_DAYS" - Recency is 40 days. 8191 // "RECENCY_45_DAYS" - Recency is 45 days. 8192 // "RECENCY_60_DAYS" - Recency is 60 days. 8193 // "RECENCY_90_DAYS" - Recency is 90 days. 8194 // "RECENCY_120_DAYS" - Recency is 120 days. 8195 // "RECENCY_180_DAYS" - Recency is 180 days. 8196 // "RECENCY_270_DAYS" - Recency is 270 days. 8197 // "RECENCY_365_DAYS" - Recency is 365 days. 8198 Recency string `json:"recency,omitempty"` 8199 8200 // ForceSendFields is a list of field names (e.g. 8201 // "FirstAndThirdPartyAudienceId") to unconditionally include in API 8202 // requests. By default, fields with empty or default values are omitted 8203 // from API requests. However, any non-pointer, non-interface field 8204 // appearing in ForceSendFields will be sent to the server regardless of 8205 // whether the field is empty or not. This may be used to include empty 8206 // fields in Patch requests. 8207 ForceSendFields []string `json:"-"` 8208 8209 // NullFields is a list of field names (e.g. 8210 // "FirstAndThirdPartyAudienceId") to include in API requests with the 8211 // JSON null value. By default, fields with empty values are omitted 8212 // from API requests. However, any field with an empty value appearing 8213 // in NullFields will be sent to the server as null. It is an error if a 8214 // field in this list has a non-empty value. This may be used to include 8215 // null fields in Patch requests. 8216 NullFields []string `json:"-"` 8217 } 8218 8219 func (s *FirstAndThirdPartyAudienceTargetingSetting) MarshalJSON() ([]byte, error) { 8220 type NoMethod FirstAndThirdPartyAudienceTargetingSetting 8221 raw := NoMethod(*s) 8222 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8223 } 8224 8225 // FixedBidStrategy: A strategy that uses a fixed bidding price. 8226 type FixedBidStrategy struct { 8227 // BidAmountMicros: The fixed bid amount, in micros of the advertiser's 8228 // currency. For insertion order entity, bid_amount_micros should be set 8229 // as 0. For line item entity, bid_amount_micros must be greater than or 8230 // equal to billable unit of the given currency and smaller than or 8231 // equal to the upper limit 1000000000. For example, 1500000 represents 8232 // 1.5 standard units of the currency. 8233 BidAmountMicros int64 `json:"bidAmountMicros,omitempty,string"` 8234 8235 // ForceSendFields is a list of field names (e.g. "BidAmountMicros") to 8236 // unconditionally include in API requests. By default, fields with 8237 // empty or default values are omitted from API requests. However, any 8238 // non-pointer, non-interface field appearing in ForceSendFields will be 8239 // sent to the server regardless of whether the field is empty or not. 8240 // This may be used to include empty fields in Patch requests. 8241 ForceSendFields []string `json:"-"` 8242 8243 // NullFields is a list of field names (e.g. "BidAmountMicros") to 8244 // include in API requests with the JSON null value. By default, fields 8245 // with empty values are omitted from API requests. However, any field 8246 // with an empty value appearing in NullFields will be sent to the 8247 // server as null. It is an error if a field in this list has a 8248 // non-empty value. This may be used to include null fields in Patch 8249 // requests. 8250 NullFields []string `json:"-"` 8251 } 8252 8253 func (s *FixedBidStrategy) MarshalJSON() ([]byte, error) { 8254 type NoMethod FixedBidStrategy 8255 raw := NoMethod(*s) 8256 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8257 } 8258 8259 // FloodlightGroup: A single Floodlight group. 8260 type FloodlightGroup struct { 8261 // ActiveViewConfig: The Active View video viewability metric 8262 // configuration for the Floodlight group. 8263 ActiveViewConfig *ActiveViewVideoViewabilityMetricConfig `json:"activeViewConfig,omitempty"` 8264 8265 // CustomVariables: User-defined custom variables owned by the 8266 // Floodlight group. Use custom Floodlight variables to create reporting 8267 // data that is tailored to your unique business needs. Custom 8268 // Floodlight variables use the keys `U1=`, `U2=`, and so on, and can 8269 // take any values that you choose to pass to them. You can use them to 8270 // track virtually any type of data that you collect about your 8271 // customers, such as the genre of movie that a customer purchases, the 8272 // country to which the item is shipped, and so on. Custom Floodlight 8273 // variables may not be used to pass any data that could be used or 8274 // recognized as personally identifiable information (PII). Example: 8275 // `custom_variables { fields { "U1": value { number_value: 123.4 }, 8276 // "U2": value { string_value: "MyVariable2" }, "U3": value { 8277 // string_value: "MyVariable3" } } }` Acceptable values for keys are 8278 // "U1" through "U100", inclusive. String values must be less than 64 8279 // characters long, and cannot contain the following characters: "<>`. 8280 CustomVariables googleapi.RawMessage `json:"customVariables,omitempty"` 8281 8282 // DisplayName: Required. The display name of the Floodlight group. 8283 DisplayName string `json:"displayName,omitempty"` 8284 8285 // FloodlightGroupId: Output only. The unique ID of the Floodlight 8286 // group. Assigned by the system. 8287 FloodlightGroupId int64 `json:"floodlightGroupId,omitempty,string"` 8288 8289 // LookbackWindow: Required. The lookback window for the Floodlight 8290 // group. Both click_days and impression_days are required. Acceptable 8291 // values for both are `0` to `90`, inclusive. 8292 LookbackWindow *LookbackWindow `json:"lookbackWindow,omitempty"` 8293 8294 // Name: Output only. The resource name of the Floodlight group. 8295 Name string `json:"name,omitempty"` 8296 8297 // WebTagType: Required. The web tag type enabled for the Floodlight 8298 // group. 8299 // 8300 // Possible values: 8301 // "WEB_TAG_TYPE_UNSPECIFIED" - Type value is not specified or is 8302 // unknown in this version. 8303 // "WEB_TAG_TYPE_NONE" - No tag type. 8304 // "WEB_TAG_TYPE_IMAGE" - Image tag. 8305 // "WEB_TAG_TYPE_DYNAMIC" - Dynamic tag. 8306 WebTagType string `json:"webTagType,omitempty"` 8307 8308 // ServerResponse contains the HTTP response code and headers from the 8309 // server. 8310 googleapi.ServerResponse `json:"-"` 8311 8312 // ForceSendFields is a list of field names (e.g. "ActiveViewConfig") to 8313 // unconditionally include in API requests. By default, fields with 8314 // empty or default values are omitted from API requests. However, any 8315 // non-pointer, non-interface field appearing in ForceSendFields will be 8316 // sent to the server regardless of whether the field is empty or not. 8317 // This may be used to include empty fields in Patch requests. 8318 ForceSendFields []string `json:"-"` 8319 8320 // NullFields is a list of field names (e.g. "ActiveViewConfig") to 8321 // include in API requests with the JSON null value. By default, fields 8322 // with empty values are omitted from API requests. However, any field 8323 // with an empty value appearing in NullFields will be sent to the 8324 // server as null. It is an error if a field in this list has a 8325 // non-empty value. This may be used to include null fields in Patch 8326 // requests. 8327 NullFields []string `json:"-"` 8328 } 8329 8330 func (s *FloodlightGroup) MarshalJSON() ([]byte, error) { 8331 type NoMethod FloodlightGroup 8332 raw := NoMethod(*s) 8333 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8334 } 8335 8336 // FrequencyCap: Settings that control the number of times a user may be 8337 // shown with the same ad during a given time period. 8338 type FrequencyCap struct { 8339 // MaxImpressions: The maximum number of times a user may be shown the 8340 // same ad during this period. Must be greater than 0. Required when 8341 // unlimited is `false` and max_views is not set. 8342 MaxImpressions int64 `json:"maxImpressions,omitempty"` 8343 8344 // TimeUnit: The time unit in which the frequency cap will be applied. 8345 // Required when unlimited is `false`. 8346 // 8347 // Possible values: 8348 // "TIME_UNIT_UNSPECIFIED" - Time unit value is not specified or is 8349 // unknown in this version. 8350 // "TIME_UNIT_LIFETIME" - The frequency cap will be applied to the 8351 // whole life time of the line item. 8352 // "TIME_UNIT_MONTHS" - The frequency cap will be applied to a number 8353 // of months. 8354 // "TIME_UNIT_WEEKS" - The frequency cap will be applied to a number 8355 // of weeks. 8356 // "TIME_UNIT_DAYS" - The frequency cap will be applied to a number of 8357 // days. 8358 // "TIME_UNIT_HOURS" - The frequency cap will be applied to a number 8359 // of hours. 8360 // "TIME_UNIT_MINUTES" - The frequency cap will be applied to a number 8361 // of minutes. 8362 TimeUnit string `json:"timeUnit,omitempty"` 8363 8364 // TimeUnitCount: The number of time_unit the frequency cap will last. 8365 // Required when unlimited is `false`. The following restrictions apply 8366 // based on the value of time_unit: * `TIME_UNIT_LIFETIME` - this field 8367 // is output only and will default to 1 * `TIME_UNIT_MONTHS` - must be 8368 // between 1 and 2 * `TIME_UNIT_WEEKS` - must be between 1 and 4 * 8369 // `TIME_UNIT_DAYS` - must be between 1 and 6 * `TIME_UNIT_HOURS` - must 8370 // be between 1 and 23 * `TIME_UNIT_MINUTES` - must be between 1 and 59 8371 TimeUnitCount int64 `json:"timeUnitCount,omitempty"` 8372 8373 // Unlimited: Whether unlimited frequency capping is applied. When this 8374 // field is set to `true`, the remaining frequency cap fields are not 8375 // applicable. 8376 Unlimited bool `json:"unlimited,omitempty"` 8377 8378 // ForceSendFields is a list of field names (e.g. "MaxImpressions") to 8379 // unconditionally include in API requests. By default, fields with 8380 // empty or default values are omitted from API requests. However, any 8381 // non-pointer, non-interface field appearing in ForceSendFields will be 8382 // sent to the server regardless of whether the field is empty or not. 8383 // This may be used to include empty fields in Patch requests. 8384 ForceSendFields []string `json:"-"` 8385 8386 // NullFields is a list of field names (e.g. "MaxImpressions") to 8387 // include in API requests with the JSON null value. By default, fields 8388 // with empty values are omitted from API requests. However, any field 8389 // with an empty value appearing in NullFields will be sent to the 8390 // server as null. It is an error if a field in this list has a 8391 // non-empty value. This may be used to include null fields in Patch 8392 // requests. 8393 NullFields []string `json:"-"` 8394 } 8395 8396 func (s *FrequencyCap) MarshalJSON() ([]byte, error) { 8397 type NoMethod FrequencyCap 8398 raw := NoMethod(*s) 8399 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8400 } 8401 8402 // GenderAssignedTargetingOptionDetails: Details for assigned gender 8403 // targeting option. This will be populated in the details field of an 8404 // AssignedTargetingOption when targeting_type is 8405 // `TARGETING_TYPE_GENDER`. 8406 type GenderAssignedTargetingOptionDetails struct { 8407 // Gender: Required. The gender of the audience. 8408 // 8409 // Possible values: 8410 // "GENDER_UNSPECIFIED" - Default value when gender is not specified 8411 // in this version. This enum is a place holder for default value and 8412 // does not represent a real gender option. 8413 // "GENDER_MALE" - The audience gender is male. 8414 // "GENDER_FEMALE" - The audience gender is female. 8415 // "GENDER_UNKNOWN" - The audience gender is unknown. 8416 Gender string `json:"gender,omitempty"` 8417 8418 // TargetingOptionId: Required. The targeting_option_id of a 8419 // TargetingOption of type `TARGETING_TYPE_GENDER`. 8420 TargetingOptionId string `json:"targetingOptionId,omitempty"` 8421 8422 // ForceSendFields is a list of field names (e.g. "Gender") to 8423 // unconditionally include in API requests. By default, fields with 8424 // empty or default values are omitted from API requests. However, any 8425 // non-pointer, non-interface field appearing in ForceSendFields will be 8426 // sent to the server regardless of whether the field is empty or not. 8427 // This may be used to include empty fields in Patch requests. 8428 ForceSendFields []string `json:"-"` 8429 8430 // NullFields is a list of field names (e.g. "Gender") to include in API 8431 // requests with the JSON null value. By default, fields with empty 8432 // values are omitted from API requests. However, any field with an 8433 // empty value appearing in NullFields will be sent to the server as 8434 // null. It is an error if a field in this list has a non-empty value. 8435 // This may be used to include null fields in Patch requests. 8436 NullFields []string `json:"-"` 8437 } 8438 8439 func (s *GenderAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 8440 type NoMethod GenderAssignedTargetingOptionDetails 8441 raw := NoMethod(*s) 8442 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8443 } 8444 8445 // GenderTargetingOptionDetails: Represents a targetable gender. This 8446 // will be populated in the gender_details field of a TargetingOption 8447 // when targeting_type is `TARGETING_TYPE_GENDER`. 8448 type GenderTargetingOptionDetails struct { 8449 // Gender: Output only. The gender of an audience. 8450 // 8451 // Possible values: 8452 // "GENDER_UNSPECIFIED" - Default value when gender is not specified 8453 // in this version. This enum is a place holder for default value and 8454 // does not represent a real gender option. 8455 // "GENDER_MALE" - The audience gender is male. 8456 // "GENDER_FEMALE" - The audience gender is female. 8457 // "GENDER_UNKNOWN" - The audience gender is unknown. 8458 Gender string `json:"gender,omitempty"` 8459 8460 // ForceSendFields is a list of field names (e.g. "Gender") to 8461 // unconditionally include in API requests. By default, fields with 8462 // empty or default values are omitted from API requests. However, any 8463 // non-pointer, non-interface field appearing in ForceSendFields will be 8464 // sent to the server regardless of whether the field is empty or not. 8465 // This may be used to include empty fields in Patch requests. 8466 ForceSendFields []string `json:"-"` 8467 8468 // NullFields is a list of field names (e.g. "Gender") to include in API 8469 // requests with the JSON null value. By default, fields with empty 8470 // values are omitted from API requests. However, any field with an 8471 // empty value appearing in NullFields will be sent to the server as 8472 // null. It is an error if a field in this list has a non-empty value. 8473 // This may be used to include null fields in Patch requests. 8474 NullFields []string `json:"-"` 8475 } 8476 8477 func (s *GenderTargetingOptionDetails) MarshalJSON() ([]byte, error) { 8478 type NoMethod GenderTargetingOptionDetails 8479 raw := NoMethod(*s) 8480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8481 } 8482 8483 // GenerateDefaultLineItemRequest: Request message for 8484 // LineItemService.GenerateDefaultLineItem. 8485 type GenerateDefaultLineItemRequest struct { 8486 // DisplayName: Required. The display name of the line item. Must be 8487 // UTF-8 encoded with a maximum size of 240 bytes. 8488 DisplayName string `json:"displayName,omitempty"` 8489 8490 // InsertionOrderId: Required. The unique ID of the insertion order that 8491 // the line item belongs to. 8492 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"` 8493 8494 // LineItemType: Required. The type of the line item. 8495 // 8496 // Possible values: 8497 // "LINE_ITEM_TYPE_UNSPECIFIED" - Type value is not specified or is 8498 // unknown in this version. Line items of this type and their targeting 8499 // cannot be created or updated using the API. 8500 // "LINE_ITEM_TYPE_DISPLAY_DEFAULT" - Image, HTML5, native, or rich 8501 // media ads. 8502 // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL" - Display ads that 8503 // drive installs of an app. 8504 // "LINE_ITEM_TYPE_VIDEO_DEFAULT" - Video ads sold on a CPM basis for 8505 // a variety of environments. 8506 // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL" - Video ads that drive 8507 // installs of an app. 8508 // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INVENTORY" - Display ads served 8509 // on mobile app inventory. Line items of this type and their targeting 8510 // cannot be created or updated using the API. 8511 // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INVENTORY" - Video ads served on 8512 // mobile app inventory. Line items of this type and their targeting 8513 // cannot be created or updated using the API. 8514 // "LINE_ITEM_TYPE_AUDIO_DEFAULT" - RTB Audio ads sold for a variety 8515 // of environments. 8516 // "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" - Over-the-top ads present in 8517 // OTT insertion orders. This type is only applicable to line items with 8518 // an insertion order of insertion_order_type `OVER_THE_TOP`. 8519 // "LINE_ITEM_TYPE_DISPLAY_OUT_OF_HOME" - Display ads served on 8520 // digital-out-of-home inventory. Line items of this type and their 8521 // targeting cannot be created or updated using the API. 8522 // "LINE_ITEM_TYPE_VIDEO_OUT_OF_HOME" - Video ads served on 8523 // digital-out-of-home inventory. Line items of this type and their 8524 // targeting cannot be created or updated using the API. 8525 LineItemType string `json:"lineItemType,omitempty"` 8526 8527 // MobileApp: The mobile app promoted by the line item. This is 8528 // applicable only when line_item_type is either 8529 // `LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL` or 8530 // `LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL`. 8531 MobileApp *MobileApp `json:"mobileApp,omitempty"` 8532 8533 // ForceSendFields is a list of field names (e.g. "DisplayName") to 8534 // unconditionally include in API requests. By default, fields with 8535 // empty or default values are omitted from API requests. However, any 8536 // non-pointer, non-interface field appearing in ForceSendFields will be 8537 // sent to the server regardless of whether the field is empty or not. 8538 // This may be used to include empty fields in Patch requests. 8539 ForceSendFields []string `json:"-"` 8540 8541 // NullFields is a list of field names (e.g. "DisplayName") to include 8542 // in API requests with the JSON null value. By default, fields with 8543 // empty values are omitted from API requests. However, any field with 8544 // an empty value appearing in NullFields will be sent to the server as 8545 // null. It is an error if a field in this list has a non-empty value. 8546 // This may be used to include null fields in Patch requests. 8547 NullFields []string `json:"-"` 8548 } 8549 8550 func (s *GenerateDefaultLineItemRequest) MarshalJSON() ([]byte, error) { 8551 type NoMethod GenerateDefaultLineItemRequest 8552 raw := NoMethod(*s) 8553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8554 } 8555 8556 // GeoRegionAssignedTargetingOptionDetails: Details for assigned 8557 // geographic region targeting option. This will be populated in the 8558 // details field of an AssignedTargetingOption when targeting_type is 8559 // `TARGETING_TYPE_GEO_REGION`. 8560 type GeoRegionAssignedTargetingOptionDetails struct { 8561 // DisplayName: Output only. The display name of the geographic region 8562 // (e.g., "Ontario, Canada"). 8563 DisplayName string `json:"displayName,omitempty"` 8564 8565 // GeoRegionType: Output only. The type of geographic region targeting. 8566 // 8567 // Possible values: 8568 // "GEO_REGION_TYPE_UNKNOWN" - The geographic region type is unknown. 8569 // "GEO_REGION_TYPE_OTHER" - The geographic region type is other. 8570 // "GEO_REGION_TYPE_COUNTRY" - The geographic region is a country. 8571 // "GEO_REGION_TYPE_REGION" - The geographic region type is region. 8572 // "GEO_REGION_TYPE_TERRITORY" - The geographic region is a territory. 8573 // "GEO_REGION_TYPE_PROVINCE" - The geographic region is a province. 8574 // "GEO_REGION_TYPE_STATE" - The geographic region is a state. 8575 // "GEO_REGION_TYPE_PREFECTURE" - The geographic region is a 8576 // prefecture. 8577 // "GEO_REGION_TYPE_GOVERNORATE" - The geographic region is a 8578 // governorate. 8579 // "GEO_REGION_TYPE_CANTON" - The geographic region is a canton. 8580 // "GEO_REGION_TYPE_UNION_TERRITORY" - The geographic region is a 8581 // union territory. 8582 // "GEO_REGION_TYPE_AUTONOMOUS_COMMUNITY" - The geographic region is 8583 // an autonomous community. 8584 // "GEO_REGION_TYPE_DMA_REGION" - The geographic region is a 8585 // designated market area (DMA) region. 8586 // "GEO_REGION_TYPE_METRO" - The geographic region type is metro. 8587 // "GEO_REGION_TYPE_CONGRESSIONAL_DISTRICT" - The geographic region is 8588 // a congressional district. 8589 // "GEO_REGION_TYPE_COUNTY" - The geographic region is a county. 8590 // "GEO_REGION_TYPE_MUNICIPALITY" - The geographic region is a 8591 // municipality. 8592 // "GEO_REGION_TYPE_CITY" - The geographic region is a city. 8593 // "GEO_REGION_TYPE_POSTAL_CODE" - The geographic region targeting 8594 // type is postal code. 8595 // "GEO_REGION_TYPE_DEPARTMENT" - The geographic region targeting type 8596 // is department. 8597 // "GEO_REGION_TYPE_AIRPORT" - The geographic region is an airport. 8598 // "GEO_REGION_TYPE_TV_REGION" - The geographic region is a TV region. 8599 // "GEO_REGION_TYPE_OKRUG" - The geographic region is an okrug. 8600 // "GEO_REGION_TYPE_BOROUGH" - The geographic region is a borough. 8601 // "GEO_REGION_TYPE_CITY_REGION" - The geographic region is a city 8602 // region. 8603 // "GEO_REGION_TYPE_ARRONDISSEMENT" - The geographic region is an 8604 // arrondissement. 8605 // "GEO_REGION_TYPE_NEIGHBORHOOD" - The geographic region is a 8606 // neighborhood. 8607 // "GEO_REGION_TYPE_UNIVERSITY" - The geographic region is a 8608 // university. 8609 // "GEO_REGION_TYPE_DISTRICT" - The geographic region is a district. 8610 GeoRegionType string `json:"geoRegionType,omitempty"` 8611 8612 // Negative: Indicates if this option is being negatively targeted. 8613 Negative bool `json:"negative,omitempty"` 8614 8615 // TargetingOptionId: Required. The targeting_option_id of a 8616 // TargetingOption of type `TARGETING_TYPE_GEO_REGION`. 8617 TargetingOptionId string `json:"targetingOptionId,omitempty"` 8618 8619 // ForceSendFields is a list of field names (e.g. "DisplayName") to 8620 // unconditionally include in API requests. By default, fields with 8621 // empty or default values are omitted from API requests. However, any 8622 // non-pointer, non-interface field appearing in ForceSendFields will be 8623 // sent to the server regardless of whether the field is empty or not. 8624 // This may be used to include empty fields in Patch requests. 8625 ForceSendFields []string `json:"-"` 8626 8627 // NullFields is a list of field names (e.g. "DisplayName") to include 8628 // in API requests with the JSON null value. By default, fields with 8629 // empty values are omitted from API requests. However, any field with 8630 // an empty value appearing in NullFields will be sent to the server as 8631 // null. It is an error if a field in this list has a non-empty value. 8632 // This may be used to include null fields in Patch requests. 8633 NullFields []string `json:"-"` 8634 } 8635 8636 func (s *GeoRegionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 8637 type NoMethod GeoRegionAssignedTargetingOptionDetails 8638 raw := NoMethod(*s) 8639 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8640 } 8641 8642 // GeoRegionSearchTerms: Search terms for geo region targeting options. 8643 type GeoRegionSearchTerms struct { 8644 // GeoRegionQuery: The search query for the desired geo region. The 8645 // query can be a prefix, e.g. "New Yor", "Seattle", "USA", etc. 8646 GeoRegionQuery string `json:"geoRegionQuery,omitempty"` 8647 8648 // ForceSendFields is a list of field names (e.g. "GeoRegionQuery") to 8649 // unconditionally include in API requests. By default, fields with 8650 // empty or default values are omitted from API requests. However, any 8651 // non-pointer, non-interface field appearing in ForceSendFields will be 8652 // sent to the server regardless of whether the field is empty or not. 8653 // This may be used to include empty fields in Patch requests. 8654 ForceSendFields []string `json:"-"` 8655 8656 // NullFields is a list of field names (e.g. "GeoRegionQuery") to 8657 // include in API requests with the JSON null value. By default, fields 8658 // with empty values are omitted from API requests. However, any field 8659 // with an empty value appearing in NullFields will be sent to the 8660 // server as null. It is an error if a field in this list has a 8661 // non-empty value. This may be used to include null fields in Patch 8662 // requests. 8663 NullFields []string `json:"-"` 8664 } 8665 8666 func (s *GeoRegionSearchTerms) MarshalJSON() ([]byte, error) { 8667 type NoMethod GeoRegionSearchTerms 8668 raw := NoMethod(*s) 8669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8670 } 8671 8672 // GeoRegionTargetingOptionDetails: Represents a targetable geographic 8673 // region. This will be populated in the geo_region_details field when 8674 // targeting_type is `TARGETING_TYPE_GEO_REGION`. 8675 type GeoRegionTargetingOptionDetails struct { 8676 // DisplayName: Output only. The display name of the geographic region 8677 // (e.g., "Ontario, Canada"). 8678 DisplayName string `json:"displayName,omitempty"` 8679 8680 // GeoRegionType: Output only. The type of geographic region targeting. 8681 // 8682 // Possible values: 8683 // "GEO_REGION_TYPE_UNKNOWN" - The geographic region type is unknown. 8684 // "GEO_REGION_TYPE_OTHER" - The geographic region type is other. 8685 // "GEO_REGION_TYPE_COUNTRY" - The geographic region is a country. 8686 // "GEO_REGION_TYPE_REGION" - The geographic region type is region. 8687 // "GEO_REGION_TYPE_TERRITORY" - The geographic region is a territory. 8688 // "GEO_REGION_TYPE_PROVINCE" - The geographic region is a province. 8689 // "GEO_REGION_TYPE_STATE" - The geographic region is a state. 8690 // "GEO_REGION_TYPE_PREFECTURE" - The geographic region is a 8691 // prefecture. 8692 // "GEO_REGION_TYPE_GOVERNORATE" - The geographic region is a 8693 // governorate. 8694 // "GEO_REGION_TYPE_CANTON" - The geographic region is a canton. 8695 // "GEO_REGION_TYPE_UNION_TERRITORY" - The geographic region is a 8696 // union territory. 8697 // "GEO_REGION_TYPE_AUTONOMOUS_COMMUNITY" - The geographic region is 8698 // an autonomous community. 8699 // "GEO_REGION_TYPE_DMA_REGION" - The geographic region is a 8700 // designated market area (DMA) region. 8701 // "GEO_REGION_TYPE_METRO" - The geographic region type is metro. 8702 // "GEO_REGION_TYPE_CONGRESSIONAL_DISTRICT" - The geographic region is 8703 // a congressional district. 8704 // "GEO_REGION_TYPE_COUNTY" - The geographic region is a county. 8705 // "GEO_REGION_TYPE_MUNICIPALITY" - The geographic region is a 8706 // municipality. 8707 // "GEO_REGION_TYPE_CITY" - The geographic region is a city. 8708 // "GEO_REGION_TYPE_POSTAL_CODE" - The geographic region targeting 8709 // type is postal code. 8710 // "GEO_REGION_TYPE_DEPARTMENT" - The geographic region targeting type 8711 // is department. 8712 // "GEO_REGION_TYPE_AIRPORT" - The geographic region is an airport. 8713 // "GEO_REGION_TYPE_TV_REGION" - The geographic region is a TV region. 8714 // "GEO_REGION_TYPE_OKRUG" - The geographic region is an okrug. 8715 // "GEO_REGION_TYPE_BOROUGH" - The geographic region is a borough. 8716 // "GEO_REGION_TYPE_CITY_REGION" - The geographic region is a city 8717 // region. 8718 // "GEO_REGION_TYPE_ARRONDISSEMENT" - The geographic region is an 8719 // arrondissement. 8720 // "GEO_REGION_TYPE_NEIGHBORHOOD" - The geographic region is a 8721 // neighborhood. 8722 // "GEO_REGION_TYPE_UNIVERSITY" - The geographic region is a 8723 // university. 8724 // "GEO_REGION_TYPE_DISTRICT" - The geographic region is a district. 8725 GeoRegionType string `json:"geoRegionType,omitempty"` 8726 8727 // ForceSendFields is a list of field names (e.g. "DisplayName") to 8728 // unconditionally include in API requests. By default, fields with 8729 // empty or default values are omitted from API requests. However, any 8730 // non-pointer, non-interface field appearing in ForceSendFields will be 8731 // sent to the server regardless of whether the field is empty or not. 8732 // This may be used to include empty fields in Patch requests. 8733 ForceSendFields []string `json:"-"` 8734 8735 // NullFields is a list of field names (e.g. "DisplayName") to include 8736 // in API requests with the JSON null value. By default, fields with 8737 // empty values are omitted from API requests. However, any field with 8738 // an empty value appearing in NullFields will be sent to the server as 8739 // null. It is an error if a field in this list has a non-empty value. 8740 // This may be used to include null fields in Patch requests. 8741 NullFields []string `json:"-"` 8742 } 8743 8744 func (s *GeoRegionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 8745 type NoMethod GeoRegionTargetingOptionDetails 8746 raw := NoMethod(*s) 8747 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8748 } 8749 8750 // GoogleAudience: Describes a Google audience resource. Includes Google 8751 // audience lists. 8752 type GoogleAudience struct { 8753 // DisplayName: Output only. The display name of the Google audience. . 8754 DisplayName string `json:"displayName,omitempty"` 8755 8756 // GoogleAudienceId: Output only. The unique ID of the Google audience. 8757 // Assigned by the system. 8758 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"` 8759 8760 // GoogleAudienceType: Output only. The type of Google audience. . 8761 // 8762 // Possible values: 8763 // "GOOGLE_AUDIENCE_TYPE_UNSPECIFIED" - Default value when type is not 8764 // specified or is unknown. 8765 // "GOOGLE_AUDIENCE_TYPE_AFFINITY" - Affinity type Google audience. 8766 // "GOOGLE_AUDIENCE_TYPE_IN_MARKET" - In-Market type Google audience. 8767 // "GOOGLE_AUDIENCE_TYPE_INSTALLED_APPS" - Installed-Apps type Google 8768 // audience. 8769 // "GOOGLE_AUDIENCE_TYPE_NEW_MOBILE_DEVICES" - New-Mobile-Devices type 8770 // Google audience. 8771 // "GOOGLE_AUDIENCE_TYPE_LIFE_EVENT" - Life-Event type Google 8772 // audience. 8773 // "GOOGLE_AUDIENCE_TYPE_EXTENDED_DEMOGRAPHIC" - Extended-Demographic 8774 // type Google audience. 8775 GoogleAudienceType string `json:"googleAudienceType,omitempty"` 8776 8777 // Name: Output only. The resource name of the google audience. 8778 Name string `json:"name,omitempty"` 8779 8780 // ServerResponse contains the HTTP response code and headers from the 8781 // server. 8782 googleapi.ServerResponse `json:"-"` 8783 8784 // ForceSendFields is a list of field names (e.g. "DisplayName") to 8785 // unconditionally include in API requests. By default, fields with 8786 // empty or default values are omitted from API requests. However, any 8787 // non-pointer, non-interface field appearing in ForceSendFields will be 8788 // sent to the server regardless of whether the field is empty or not. 8789 // This may be used to include empty fields in Patch requests. 8790 ForceSendFields []string `json:"-"` 8791 8792 // NullFields is a list of field names (e.g. "DisplayName") to include 8793 // in API requests with the JSON null value. By default, fields with 8794 // empty values are omitted from API requests. However, any field with 8795 // an empty value appearing in NullFields will be sent to the server as 8796 // null. It is an error if a field in this list has a non-empty value. 8797 // This may be used to include null fields in Patch requests. 8798 NullFields []string `json:"-"` 8799 } 8800 8801 func (s *GoogleAudience) MarshalJSON() ([]byte, error) { 8802 type NoMethod GoogleAudience 8803 raw := NoMethod(*s) 8804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8805 } 8806 8807 // GoogleAudienceGroup: Details of Google audience group. All Google 8808 // audience targeting settings are logically ‘OR’ of each other. 8809 type GoogleAudienceGroup struct { 8810 // Settings: Required. All Google audience targeting settings in Google 8811 // audience group. Repeated settings with same id will be ignored. 8812 Settings []*GoogleAudienceTargetingSetting `json:"settings,omitempty"` 8813 8814 // ForceSendFields is a list of field names (e.g. "Settings") to 8815 // unconditionally include in API requests. By default, fields with 8816 // empty or default values are omitted from API requests. However, any 8817 // non-pointer, non-interface field appearing in ForceSendFields will be 8818 // sent to the server regardless of whether the field is empty or not. 8819 // This may be used to include empty fields in Patch requests. 8820 ForceSendFields []string `json:"-"` 8821 8822 // NullFields is a list of field names (e.g. "Settings") to include in 8823 // API requests with the JSON null value. By default, fields with empty 8824 // values are omitted from API requests. However, any field with an 8825 // empty value appearing in NullFields will be sent to the server as 8826 // null. It is an error if a field in this list has a non-empty value. 8827 // This may be used to include null fields in Patch requests. 8828 NullFields []string `json:"-"` 8829 } 8830 8831 func (s *GoogleAudienceGroup) MarshalJSON() ([]byte, error) { 8832 type NoMethod GoogleAudienceGroup 8833 raw := NoMethod(*s) 8834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8835 } 8836 8837 // GoogleAudienceTargetingSetting: Details of Google audience targeting 8838 // setting. 8839 type GoogleAudienceTargetingSetting struct { 8840 // GoogleAudienceId: Required. Google audience id of the Google audience 8841 // targeting setting. This id is google_audience_id. 8842 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"` 8843 8844 // ForceSendFields is a list of field names (e.g. "GoogleAudienceId") to 8845 // unconditionally include in API requests. By default, fields with 8846 // empty or default values are omitted from API requests. However, any 8847 // non-pointer, non-interface field appearing in ForceSendFields will be 8848 // sent to the server regardless of whether the field is empty or not. 8849 // This may be used to include empty fields in Patch requests. 8850 ForceSendFields []string `json:"-"` 8851 8852 // NullFields is a list of field names (e.g. "GoogleAudienceId") to 8853 // include in API requests with the JSON null value. By default, fields 8854 // with empty values are omitted from API requests. However, any field 8855 // with an empty value appearing in NullFields will be sent to the 8856 // server as null. It is an error if a field in this list has a 8857 // non-empty value. This may be used to include null fields in Patch 8858 // requests. 8859 NullFields []string `json:"-"` 8860 } 8861 8862 func (s *GoogleAudienceTargetingSetting) MarshalJSON() ([]byte, error) { 8863 type NoMethod GoogleAudienceTargetingSetting 8864 raw := NoMethod(*s) 8865 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8866 } 8867 8868 // GoogleBytestreamMedia: Media resource. 8869 type GoogleBytestreamMedia struct { 8870 // ResourceName: Name of the media resource. 8871 ResourceName string `json:"resourceName,omitempty"` 8872 8873 // ServerResponse contains the HTTP response code and headers from the 8874 // server. 8875 googleapi.ServerResponse `json:"-"` 8876 8877 // ForceSendFields is a list of field names (e.g. "ResourceName") to 8878 // unconditionally include in API requests. By default, fields with 8879 // empty or default values are omitted from API requests. However, any 8880 // non-pointer, non-interface field appearing in ForceSendFields will be 8881 // sent to the server regardless of whether the field is empty or not. 8882 // This may be used to include empty fields in Patch requests. 8883 ForceSendFields []string `json:"-"` 8884 8885 // NullFields is a list of field names (e.g. "ResourceName") to include 8886 // in API requests with the JSON null value. By default, fields with 8887 // empty values are omitted from API requests. However, any field with 8888 // an empty value appearing in NullFields will be sent to the server as 8889 // null. It is an error if a field in this list has a non-empty value. 8890 // This may be used to include null fields in Patch requests. 8891 NullFields []string `json:"-"` 8892 } 8893 8894 func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte, error) { 8895 type NoMethod GoogleBytestreamMedia 8896 raw := NoMethod(*s) 8897 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8898 } 8899 8900 // GuaranteedOrder: A guaranteed order. Guaranteed orders are parent 8901 // entity of guaranteed inventory sources. When creating a guaranteed 8902 // inventory source, a guaranteed order ID must be assigned to the 8903 // inventory source. 8904 type GuaranteedOrder struct { 8905 // DefaultAdvertiserId: Output only. The ID of default advertiser of the 8906 // guaranteed order. The default advertiser is either the 8907 // read_write_advertiser_id or, if that is not set, the first advertiser 8908 // listed in read_advertiser_ids. Otherwise, there is no default 8909 // advertiser. 8910 DefaultAdvertiserId int64 `json:"defaultAdvertiserId,omitempty,string"` 8911 8912 // DefaultCampaignId: The ID of the default campaign that is assigned to 8913 // the guaranteed order. The default campaign must belong to the default 8914 // advertiser. 8915 DefaultCampaignId int64 `json:"defaultCampaignId,omitempty,string"` 8916 8917 // DisplayName: Required. The display name of the guaranteed order. Must 8918 // be UTF-8 encoded with a maximum size of 240 bytes. 8919 DisplayName string `json:"displayName,omitempty"` 8920 8921 // Exchange: Required. Immutable. The exchange where the guaranteed 8922 // order originated. 8923 // 8924 // Possible values: 8925 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 8926 // this version. 8927 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 8928 // "EXCHANGE_APPNEXUS" - AppNexus. 8929 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 8930 // "EXCHANGE_ADFORM" - Adform. 8931 // "EXCHANGE_ADMETA" - Admeta. 8932 // "EXCHANGE_ADMIXER" - Admixer. 8933 // "EXCHANGE_ADSMOGO" - AdsMogo. 8934 // "EXCHANGE_ADSWIZZ" - AdsWizz. 8935 // "EXCHANGE_BIDSWITCH" - BidSwitch. 8936 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 8937 // from Yahoo!. 8938 // "EXCHANGE_CADREON" - Cadreon. 8939 // "EXCHANGE_DAILYMOTION" - Dailymotion. 8940 // "EXCHANGE_FIVE" - Five. 8941 // "EXCHANGE_FLUCT" - Fluct. 8942 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 8943 // "EXCHANGE_GENIEE" - Geniee. 8944 // "EXCHANGE_GUMGUM" - GumGum. 8945 // "EXCHANGE_IMOBILE" - i-mobile. 8946 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 8947 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 8948 // "EXCHANGE_INDEX" - Index Exchange. 8949 // "EXCHANGE_KARGO" - Kargo. 8950 // "EXCHANGE_MICROAD" - MicroAd. 8951 // "EXCHANGE_MOPUB" - MoPub. 8952 // "EXCHANGE_NEND" - Nend. 8953 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 8954 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 8955 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 8956 // "EXCHANGE_OOYALA" - Ooyala. 8957 // "EXCHANGE_OPENX" - OpenX. 8958 // "EXCHANGE_PERMODO" - Permodo. 8959 // "EXCHANGE_PLATFORMONE" - Platform One. 8960 // "EXCHANGE_PLATFORMID" - PlatformId. 8961 // "EXCHANGE_PUBMATIC" - PubMatic. 8962 // "EXCHANGE_PULSEPOINT" - PulsePoint. 8963 // "EXCHANGE_REVENUEMAX" - RevenueMax. 8964 // "EXCHANGE_RUBICON" - Rubicon. 8965 // "EXCHANGE_SMARTCLIP" - SmartClip. 8966 // "EXCHANGE_SMARTRTB" - SmartRTB+. 8967 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 8968 // "EXCHANGE_SOVRN" - Sovrn. 8969 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 8970 // "EXCHANGE_STROER" - Ströer SSP. 8971 // "EXCHANGE_TEADSTV" - TeadsTv. 8972 // "EXCHANGE_TELARIA" - Telaria. 8973 // "EXCHANGE_TVN" - TVN. 8974 // "EXCHANGE_UNITED" - United. 8975 // "EXCHANGE_YIELDLAB" - Yieldlab. 8976 // "EXCHANGE_YIELDMO" - Yieldmo. 8977 // "EXCHANGE_UNRULYX" - UnrulyX. 8978 // "EXCHANGE_OPEN8" - Open8. 8979 // "EXCHANGE_TRITON" - Triton. 8980 // "EXCHANGE_TRIPLELIFT" - TripleLift. 8981 // "EXCHANGE_TABOOLA" - Taboola. 8982 // "EXCHANGE_INMOBI" - InMobi. 8983 // "EXCHANGE_SMAATO" - Smaato. 8984 // "EXCHANGE_AJA" - Aja. 8985 // "EXCHANGE_SUPERSHIP" - Supership. 8986 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 8987 // "EXCHANGE_WAZE" - Waze. 8988 // "EXCHANGE_SOUNDCAST" - SoundCast. 8989 // "EXCHANGE_SHARETHROUGH" - Sharethrough. 8990 // "EXCHANGE_FYBER" - Fyber. 8991 // "EXCHANGE_RED_FOR_PUBLISHERS" - Red For Publishers. 8992 // "EXCHANGE_MEDIANET" - Media.net. 8993 // "EXCHANGE_TAPJOY" - Tapjoy. 8994 // "EXCHANGE_VISTAR" - Vistar. 8995 // "EXCHANGE_DAX" - DAX. 8996 // "EXCHANGE_JCD" - JCD. 8997 // "EXCHANGE_PLACE_EXCHANGE" - Place Exchange. 8998 // "EXCHANGE_APPLOVIN" - AppLovin. 8999 // "EXCHANGE_CONNATIX" - Connatix. 9000 // "EXCHANGE_RESET_DIGITAL" - Reset Digital. 9001 // "EXCHANGE_HIVESTACK" - Hivestack. 9002 Exchange string `json:"exchange,omitempty"` 9003 9004 // GuaranteedOrderId: Output only. The unique identifier of the 9005 // guaranteed order. The guaranteed order IDs have the format 9006 // `{exchange}-{legacy_guaranteed_order_id}`. 9007 GuaranteedOrderId string `json:"guaranteedOrderId,omitempty"` 9008 9009 // LegacyGuaranteedOrderId: Output only. The legacy ID of the guaranteed 9010 // order. Assigned by the original exchange. The legacy ID is unique 9011 // within one exchange, but is not guaranteed to be unique across all 9012 // guaranteed orders. This ID is used in SDF and UI. 9013 LegacyGuaranteedOrderId string `json:"legacyGuaranteedOrderId,omitempty"` 9014 9015 // Name: Output only. The resource name of the guaranteed order. 9016 Name string `json:"name,omitempty"` 9017 9018 // PublisherName: Required. The publisher name of the guaranteed order. 9019 // Must be UTF-8 encoded with a maximum size of 240 bytes. 9020 PublisherName string `json:"publisherName,omitempty"` 9021 9022 // ReadAccessInherited: Whether all advertisers of read_write_partner_id 9023 // have read access to the guaranteed order. Only applicable if 9024 // read_write_partner_id is set. If True, overrides read_advertiser_ids. 9025 ReadAccessInherited bool `json:"readAccessInherited,omitempty"` 9026 9027 // ReadAdvertiserIds: The IDs of advertisers with read access to the 9028 // guaranteed order. This field must not include the advertiser assigned 9029 // to read_write_advertiser_id if it is set. All advertisers in this 9030 // field must belong to read_write_partner_id or the same partner as 9031 // read_write_advertiser_id. 9032 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"` 9033 9034 // ReadWriteAdvertiserId: The advertiser with read/write access to the 9035 // guaranteed order. This is also the default advertiser of the 9036 // guaranteed order. 9037 ReadWriteAdvertiserId int64 `json:"readWriteAdvertiserId,omitempty,string"` 9038 9039 // ReadWritePartnerId: The partner with read/write access to the 9040 // guaranteed order. 9041 ReadWritePartnerId int64 `json:"readWritePartnerId,omitempty,string"` 9042 9043 // Status: The status settings of the guaranteed order. 9044 Status *GuaranteedOrderStatus `json:"status,omitempty"` 9045 9046 // UpdateTime: Output only. The timestamp when the guaranteed order was 9047 // last updated. Assigned by the system. 9048 UpdateTime string `json:"updateTime,omitempty"` 9049 9050 // ServerResponse contains the HTTP response code and headers from the 9051 // server. 9052 googleapi.ServerResponse `json:"-"` 9053 9054 // ForceSendFields is a list of field names (e.g. "DefaultAdvertiserId") 9055 // to unconditionally include in API requests. By default, fields with 9056 // empty or default values are omitted from API requests. However, any 9057 // non-pointer, non-interface field appearing in ForceSendFields will be 9058 // sent to the server regardless of whether the field is empty or not. 9059 // This may be used to include empty fields in Patch requests. 9060 ForceSendFields []string `json:"-"` 9061 9062 // NullFields is a list of field names (e.g. "DefaultAdvertiserId") to 9063 // include in API requests with the JSON null value. By default, fields 9064 // with empty values are omitted from API requests. However, any field 9065 // with an empty value appearing in NullFields will be sent to the 9066 // server as null. It is an error if a field in this list has a 9067 // non-empty value. This may be used to include null fields in Patch 9068 // requests. 9069 NullFields []string `json:"-"` 9070 } 9071 9072 func (s *GuaranteedOrder) MarshalJSON() ([]byte, error) { 9073 type NoMethod GuaranteedOrder 9074 raw := NoMethod(*s) 9075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9076 } 9077 9078 // GuaranteedOrderStatus: The status settings of the guaranteed order. 9079 type GuaranteedOrderStatus struct { 9080 // ConfigStatus: Output only. The configuration status of the guaranteed 9081 // order. Acceptable values are `PENDING` and `COMPLETED`. A guaranteed 9082 // order must be configured (fill in the required fields, choose 9083 // creatives, and select a default campaign) before it can serve. 9084 // Currently the configuration action can only be performed via UI. 9085 // 9086 // Possible values: 9087 // "GUARANTEED_ORDER_CONFIG_STATUS_UNSPECIFIED" - The approval status 9088 // is not specified or is unknown in this version. 9089 // "PENDING" - The beginning state of a guaranteed order. The 9090 // guaranteed order in this state needs to be configured before it can 9091 // serve. 9092 // "COMPLETED" - The state after the buyer configures a guaranteed 9093 // order. 9094 ConfigStatus string `json:"configStatus,omitempty"` 9095 9096 // EntityPauseReason: The user-provided reason for pausing this 9097 // guaranteed order. Must be UTF-8 encoded with a maximum length of 100 9098 // bytes. Only applicable when entity_status is set to 9099 // `ENTITY_STATUS_PAUSED`. 9100 EntityPauseReason string `json:"entityPauseReason,omitempty"` 9101 9102 // EntityStatus: Whether or not the guaranteed order is servable. 9103 // Acceptable values are `ENTITY_STATUS_ACTIVE`, 9104 // `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. Default value 9105 // is `ENTITY_STATUS_ACTIVE`. 9106 // 9107 // Possible values: 9108 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 9109 // specified or is unknown in this version. 9110 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 9111 // budget. 9112 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 9113 // budget spending are disabled. An entity can be deleted after 9114 // archived. Deleted entities cannot be retrieved. 9115 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 9116 // budget spending are disabled. 9117 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 9118 // the entity. 9119 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 9120 // for deletion. 9121 EntityStatus string `json:"entityStatus,omitempty"` 9122 9123 // ForceSendFields is a list of field names (e.g. "ConfigStatus") to 9124 // unconditionally include in API requests. By default, fields with 9125 // empty or default values are omitted from API requests. However, any 9126 // non-pointer, non-interface field appearing in ForceSendFields will be 9127 // sent to the server regardless of whether the field is empty or not. 9128 // This may be used to include empty fields in Patch requests. 9129 ForceSendFields []string `json:"-"` 9130 9131 // NullFields is a list of field names (e.g. "ConfigStatus") to include 9132 // in API requests with the JSON null value. By default, fields with 9133 // empty values are omitted from API requests. However, any field with 9134 // an empty value appearing in NullFields will be sent to the server as 9135 // null. It is an error if a field in this list has a non-empty value. 9136 // This may be used to include null fields in Patch requests. 9137 NullFields []string `json:"-"` 9138 } 9139 9140 func (s *GuaranteedOrderStatus) MarshalJSON() ([]byte, error) { 9141 type NoMethod GuaranteedOrderStatus 9142 raw := NoMethod(*s) 9143 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9144 } 9145 9146 // HouseholdIncomeAssignedTargetingOptionDetails: Details for assigned 9147 // household income targeting option. This will be populated in the 9148 // details field of an AssignedTargetingOption when targeting_type is 9149 // `TARGETING_TYPE_HOUSEHOLD_INCOME`. 9150 type HouseholdIncomeAssignedTargetingOptionDetails struct { 9151 // HouseholdIncome: Required. The household income of the audience. 9152 // 9153 // Possible values: 9154 // "HOUSEHOLD_INCOME_UNSPECIFIED" - Default value when household 9155 // income is not specified in this version. This enum is a placeholder 9156 // for default value and does not represent a real household income 9157 // option. 9158 // "HOUSEHOLD_INCOME_UNKNOWN" - The household income of the audience 9159 // is unknown. 9160 // "HOUSEHOLD_INCOME_LOWER_50_PERCENT" - The audience is in the lower 9161 // 50% of U.S. household incomes. 9162 // "HOUSEHOLD_INCOME_TOP_41_TO_50_PERCENT" - The audience is in the 9163 // top 41-50% of U.S. household incomes. 9164 // "HOUSEHOLD_INCOME_TOP_31_TO_40_PERCENT" - The audience is in the 9165 // top 31-40% of U.S. household incomes. 9166 // "HOUSEHOLD_INCOME_TOP_21_TO_30_PERCENT" - The audience is in the 9167 // top 21-30% of U.S. household incomes. 9168 // "HOUSEHOLD_INCOME_TOP_11_TO_20_PERCENT" - The audience is in the 9169 // top 11-20% of U.S. household incomes. 9170 // "HOUSEHOLD_INCOME_TOP_10_PERCENT" - The audience is in the top 10% 9171 // of U.S. household incomes. 9172 HouseholdIncome string `json:"householdIncome,omitempty"` 9173 9174 // TargetingOptionId: Required. The targeting_option_id of a 9175 // TargetingOption of type `TARGETING_TYPE_HOUSEHOLD_INCOME`. 9176 TargetingOptionId string `json:"targetingOptionId,omitempty"` 9177 9178 // ForceSendFields is a list of field names (e.g. "HouseholdIncome") to 9179 // unconditionally include in API requests. By default, fields with 9180 // empty or default values are omitted from API requests. However, any 9181 // non-pointer, non-interface field appearing in ForceSendFields will be 9182 // sent to the server regardless of whether the field is empty or not. 9183 // This may be used to include empty fields in Patch requests. 9184 ForceSendFields []string `json:"-"` 9185 9186 // NullFields is a list of field names (e.g. "HouseholdIncome") to 9187 // include in API requests with the JSON null value. By default, fields 9188 // with empty values are omitted from API requests. However, any field 9189 // with an empty value appearing in NullFields will be sent to the 9190 // server as null. It is an error if a field in this list has a 9191 // non-empty value. This may be used to include null fields in Patch 9192 // requests. 9193 NullFields []string `json:"-"` 9194 } 9195 9196 func (s *HouseholdIncomeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9197 type NoMethod HouseholdIncomeAssignedTargetingOptionDetails 9198 raw := NoMethod(*s) 9199 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9200 } 9201 9202 // HouseholdIncomeTargetingOptionDetails: Represents a targetable 9203 // household income. This will be populated in the 9204 // household_income_details field of a TargetingOption when 9205 // targeting_type is `TARGETING_TYPE_HOUSEHOLD_INCOME`. 9206 type HouseholdIncomeTargetingOptionDetails struct { 9207 // HouseholdIncome: Output only. The household income of an audience. 9208 // 9209 // Possible values: 9210 // "HOUSEHOLD_INCOME_UNSPECIFIED" - Default value when household 9211 // income is not specified in this version. This enum is a placeholder 9212 // for default value and does not represent a real household income 9213 // option. 9214 // "HOUSEHOLD_INCOME_UNKNOWN" - The household income of the audience 9215 // is unknown. 9216 // "HOUSEHOLD_INCOME_LOWER_50_PERCENT" - The audience is in the lower 9217 // 50% of U.S. household incomes. 9218 // "HOUSEHOLD_INCOME_TOP_41_TO_50_PERCENT" - The audience is in the 9219 // top 41-50% of U.S. household incomes. 9220 // "HOUSEHOLD_INCOME_TOP_31_TO_40_PERCENT" - The audience is in the 9221 // top 31-40% of U.S. household incomes. 9222 // "HOUSEHOLD_INCOME_TOP_21_TO_30_PERCENT" - The audience is in the 9223 // top 21-30% of U.S. household incomes. 9224 // "HOUSEHOLD_INCOME_TOP_11_TO_20_PERCENT" - The audience is in the 9225 // top 11-20% of U.S. household incomes. 9226 // "HOUSEHOLD_INCOME_TOP_10_PERCENT" - The audience is in the top 10% 9227 // of U.S. household incomes. 9228 HouseholdIncome string `json:"householdIncome,omitempty"` 9229 9230 // ForceSendFields is a list of field names (e.g. "HouseholdIncome") to 9231 // unconditionally include in API requests. By default, fields with 9232 // empty or default values are omitted from API requests. However, any 9233 // non-pointer, non-interface field appearing in ForceSendFields will be 9234 // sent to the server regardless of whether the field is empty or not. 9235 // This may be used to include empty fields in Patch requests. 9236 ForceSendFields []string `json:"-"` 9237 9238 // NullFields is a list of field names (e.g. "HouseholdIncome") to 9239 // include in API requests with the JSON null value. By default, fields 9240 // with empty values are omitted from API requests. However, any field 9241 // with an empty value appearing in NullFields will be sent to the 9242 // server as null. It is an error if a field in this list has a 9243 // non-empty value. This may be used to include null fields in Patch 9244 // requests. 9245 NullFields []string `json:"-"` 9246 } 9247 9248 func (s *HouseholdIncomeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9249 type NoMethod HouseholdIncomeTargetingOptionDetails 9250 raw := NoMethod(*s) 9251 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9252 } 9253 9254 // IdFilter: A filtering option that filters entities by their entity 9255 // IDs. 9256 type IdFilter struct { 9257 // AdGroupAdIds: YouTube Ads to download by ID. All IDs must belong to 9258 // the same Advertiser or Partner specified in 9259 // CreateSdfDownloadTaskRequest. 9260 AdGroupAdIds googleapi.Int64s `json:"adGroupAdIds,omitempty"` 9261 9262 // AdGroupIds: YouTube Ad Groups to download by ID. All IDs must belong 9263 // to the same Advertiser or Partner specified in 9264 // CreateSdfDownloadTaskRequest. 9265 AdGroupIds googleapi.Int64s `json:"adGroupIds,omitempty"` 9266 9267 // CampaignIds: Campaigns to download by ID. All IDs must belong to the 9268 // same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. 9269 CampaignIds googleapi.Int64s `json:"campaignIds,omitempty"` 9270 9271 // InsertionOrderIds: Insertion Orders to download by ID. All IDs must 9272 // belong to the same Advertiser or Partner specified in 9273 // CreateSdfDownloadTaskRequest. 9274 InsertionOrderIds googleapi.Int64s `json:"insertionOrderIds,omitempty"` 9275 9276 // LineItemIds: Line Items to download by ID. All IDs must belong to the 9277 // same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. 9278 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"` 9279 9280 // MediaProductIds: Media Products to download by ID. All IDs must 9281 // belong to the same Advertiser or Partner specified in 9282 // CreateSdfDownloadTaskRequest. 9283 MediaProductIds googleapi.Int64s `json:"mediaProductIds,omitempty"` 9284 9285 // ForceSendFields is a list of field names (e.g. "AdGroupAdIds") to 9286 // unconditionally include in API requests. By default, fields with 9287 // empty or default values are omitted from API requests. However, any 9288 // non-pointer, non-interface field appearing in ForceSendFields will be 9289 // sent to the server regardless of whether the field is empty or not. 9290 // This may be used to include empty fields in Patch requests. 9291 ForceSendFields []string `json:"-"` 9292 9293 // NullFields is a list of field names (e.g. "AdGroupAdIds") to include 9294 // in API requests with the JSON null value. By default, fields with 9295 // empty values are omitted from API requests. However, any field with 9296 // an empty value appearing in NullFields will be sent to the server as 9297 // null. It is an error if a field in this list has a non-empty value. 9298 // This may be used to include null fields in Patch requests. 9299 NullFields []string `json:"-"` 9300 } 9301 9302 func (s *IdFilter) MarshalJSON() ([]byte, error) { 9303 type NoMethod IdFilter 9304 raw := NoMethod(*s) 9305 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9306 } 9307 9308 // InsertionOrder: A single insertion order. 9309 type InsertionOrder struct { 9310 // AdvertiserId: Output only. The unique ID of the advertiser the 9311 // insertion order belongs to. 9312 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 9313 9314 // BidStrategy: The bidding strategy of the insertion order. By default, 9315 // fixed_bid is set. 9316 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"` 9317 9318 // BillableOutcome: Immutable. The billable outcome of the insertion 9319 // order. Outcome based buying is deprecated. 9320 // `BILLABLE_OUTCOME_PAY_PER_IMPRESSION` is the only valid value. 9321 // 9322 // Possible values: 9323 // "BILLABLE_OUTCOME_UNSPECIFIED" - Unspecified billable outcome. 9324 // "BILLABLE_OUTCOME_PAY_PER_IMPRESSION" - Pay per impressions. 9325 // "BILLABLE_OUTCOME_PAY_PER_CLICK" - Pay per click. 9326 // "BILLABLE_OUTCOME_PAY_PER_VIEWABLE_IMPRESSION" - Pay per active 9327 // view. 9328 BillableOutcome string `json:"billableOutcome,omitempty"` 9329 9330 // Budget: Required. The budget allocation settings of the insertion 9331 // order. 9332 Budget *InsertionOrderBudget `json:"budget,omitempty"` 9333 9334 // CampaignId: Required. Immutable. The unique ID of the campaign that 9335 // the insertion order belongs to. 9336 CampaignId int64 `json:"campaignId,omitempty,string"` 9337 9338 // DisplayName: Required. The display name of the insertion order. Must 9339 // be UTF-8 encoded with a maximum size of 240 bytes. 9340 DisplayName string `json:"displayName,omitempty"` 9341 9342 // EntityStatus: Required. Controls whether or not the insertion order 9343 // can spend its budget and bid on inventory. * For CreateInsertionOrder 9344 // method, only `ENTITY_STATUS_DRAFT` is allowed. To activate an 9345 // insertion order, use UpdateInsertionOrder method and update the 9346 // status to `ENTITY_STATUS_ACTIVE` after creation. * An insertion order 9347 // cannot be changed back to `ENTITY_STATUS_DRAFT` status from any other 9348 // status. * An insertion order cannot be set to `ENTITY_STATUS_ACTIVE` 9349 // if its parent campaign is not active. 9350 // 9351 // Possible values: 9352 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 9353 // specified or is unknown in this version. 9354 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 9355 // budget. 9356 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 9357 // budget spending are disabled. An entity can be deleted after 9358 // archived. Deleted entities cannot be retrieved. 9359 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 9360 // budget spending are disabled. 9361 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 9362 // the entity. 9363 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 9364 // for deletion. 9365 EntityStatus string `json:"entityStatus,omitempty"` 9366 9367 // FrequencyCap: Required. The frequency capping setting of the 9368 // insertion order. 9369 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"` 9370 9371 // InsertionOrderId: Output only. The unique ID of the insertion order. 9372 // Assigned by the system. 9373 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"` 9374 9375 // InsertionOrderType: The type of insertion order. If this field is 9376 // unspecified in creation, the value defaults to `RTB`. 9377 // 9378 // Possible values: 9379 // "INSERTION_ORDER_TYPE_UNSPECIFIED" - Insertion order type is not 9380 // specified or is unknown. 9381 // "RTB" - Real-time bidding. 9382 // "OVER_THE_TOP" - Over-the-top. 9383 InsertionOrderType string `json:"insertionOrderType,omitempty"` 9384 9385 // IntegrationDetails: Additional integration details of the insertion 9386 // order. 9387 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"` 9388 9389 // Name: Output only. The resource name of the insertion order. 9390 Name string `json:"name,omitempty"` 9391 9392 // Pacing: Required. The budget spending speed setting of the insertion 9393 // order. 9394 Pacing *Pacing `json:"pacing,omitempty"` 9395 9396 // PartnerCosts: The partner costs associated with the insertion order. 9397 // If absent or empty in CreateInsertionOrder method, the newly created 9398 // insertion order will inherit partner costs from the partner settings. 9399 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"` 9400 9401 // PerformanceGoal: Required. Performance goal of the insertion order. 9402 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"` 9403 9404 // ReservationType: Output only. The reservation type of the insertion 9405 // order. 9406 // 9407 // Possible values: 9408 // "RESERVATION_TYPE_UNSPECIFIED" - Reservation type value is not 9409 // specified or is unknown in this version. 9410 // "RESERVATION_TYPE_NOT_GUARANTEED" - Not created through a 9411 // guaranteed inventory source. 9412 // "RESERVATION_TYPE_PROGRAMMATIC_GUARANTEED" - Created through a 9413 // programmatic guaranteed inventory source. 9414 // "RESERVATION_TYPE_TAG_GUARANTEED" - Created through a tag 9415 // guaranteed inventory source. 9416 ReservationType string `json:"reservationType,omitempty"` 9417 9418 // UpdateTime: Output only. The timestamp when the insertion order was 9419 // last updated. Assigned by the system. 9420 UpdateTime string `json:"updateTime,omitempty"` 9421 9422 // ServerResponse contains the HTTP response code and headers from the 9423 // server. 9424 googleapi.ServerResponse `json:"-"` 9425 9426 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 9427 // unconditionally include in API requests. By default, fields with 9428 // empty or default values are omitted from API requests. However, any 9429 // non-pointer, non-interface field appearing in ForceSendFields will be 9430 // sent to the server regardless of whether the field is empty or not. 9431 // This may be used to include empty fields in Patch requests. 9432 ForceSendFields []string `json:"-"` 9433 9434 // NullFields is a list of field names (e.g. "AdvertiserId") to include 9435 // in API requests with the JSON null value. By default, fields with 9436 // empty values are omitted from API requests. However, any field with 9437 // an empty value appearing in NullFields will be sent to the server as 9438 // null. It is an error if a field in this list has a non-empty value. 9439 // This may be used to include null fields in Patch requests. 9440 NullFields []string `json:"-"` 9441 } 9442 9443 func (s *InsertionOrder) MarshalJSON() ([]byte, error) { 9444 type NoMethod InsertionOrder 9445 raw := NoMethod(*s) 9446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9447 } 9448 9449 // InsertionOrderBudget: Settings that control how insertion order 9450 // budget is allocated. 9451 type InsertionOrderBudget struct { 9452 // AutomationType: The type of automation used to manage bid and budget 9453 // for the insertion order. If this field is unspecified in creation, 9454 // the value defaults to `INSERTION_ORDER_AUTOMATION_TYPE_NONE`. 9455 // 9456 // Possible values: 9457 // "INSERTION_ORDER_AUTOMATION_TYPE_UNSPECIFIED" - Insertion order 9458 // automation option is not specified or is unknown in this version. 9459 // "INSERTION_ORDER_AUTOMATION_TYPE_BUDGET" - Automatic budget 9460 // allocation. Allow the system to automatically shift budget to owning 9461 // line items to optimize performance defined by kpi. No automation on 9462 // bid settings. 9463 // "INSERTION_ORDER_AUTOMATION_TYPE_NONE" - No automation of bid or 9464 // budget on insertion order level. Bid and budget must be manually 9465 // configured at the line item level. 9466 // "INSERTION_ORDER_AUTOMATION_TYPE_BID_BUDGET" - Allow the system to 9467 // automatically adjust bids and shift budget to owning line items to 9468 // optimize performance defined by kpi. 9469 AutomationType string `json:"automationType,omitempty"` 9470 9471 // BudgetSegments: Required. The list of budget segments. Use a budget 9472 // segment to specify a specific budget for a given period of time an 9473 // insertion order is running. 9474 BudgetSegments []*InsertionOrderBudgetSegment `json:"budgetSegments,omitempty"` 9475 9476 // BudgetUnit: Required. Immutable. The budget unit specifies whether 9477 // the budget is currency based or impression based. 9478 // 9479 // Possible values: 9480 // "BUDGET_UNIT_UNSPECIFIED" - Type value is not specified or is 9481 // unknown in this version. 9482 // "BUDGET_UNIT_CURRENCY" - Budgeting in currency amounts. 9483 // "BUDGET_UNIT_IMPRESSIONS" - Budgeting in impression amounts. 9484 BudgetUnit string `json:"budgetUnit,omitempty"` 9485 9486 // ForceSendFields is a list of field names (e.g. "AutomationType") to 9487 // unconditionally include in API requests. By default, fields with 9488 // empty or default values are omitted from API requests. However, any 9489 // non-pointer, non-interface field appearing in ForceSendFields will be 9490 // sent to the server regardless of whether the field is empty or not. 9491 // This may be used to include empty fields in Patch requests. 9492 ForceSendFields []string `json:"-"` 9493 9494 // NullFields is a list of field names (e.g. "AutomationType") to 9495 // include in API requests with the JSON null value. By default, fields 9496 // with empty values are omitted from API requests. However, any field 9497 // with an empty value appearing in NullFields will be sent to the 9498 // server as null. It is an error if a field in this list has a 9499 // non-empty value. This may be used to include null fields in Patch 9500 // requests. 9501 NullFields []string `json:"-"` 9502 } 9503 9504 func (s *InsertionOrderBudget) MarshalJSON() ([]byte, error) { 9505 type NoMethod InsertionOrderBudget 9506 raw := NoMethod(*s) 9507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9508 } 9509 9510 // InsertionOrderBudgetSegment: Settings that control the budget of a 9511 // single budget segment. 9512 type InsertionOrderBudgetSegment struct { 9513 // BudgetAmountMicros: Required. The budget amount the insertion order 9514 // will spend for the given date_range. The amount is in micros. Must be 9515 // greater than 0. For example, 500000000 represents 500 standard units 9516 // of the currency. 9517 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"` 9518 9519 // CampaignBudgetId: The budget_id of the campaign budget that this 9520 // insertion order budget segment is a part of. 9521 CampaignBudgetId int64 `json:"campaignBudgetId,omitempty,string"` 9522 9523 // DateRange: Required. The start and end date settings of the budget 9524 // segment. They are resolved relative to the parent advertiser's time 9525 // zone. * When creating a new budget segment, both `start_date` and 9526 // `end_date` must be in the future. * An existing budget segment with a 9527 // `start_date` in the past has a mutable `end_date` but an immutable 9528 // `start_date`. * `end_date` must be the `start_date` or later, both 9529 // before the year 2037. 9530 DateRange *DateRange `json:"dateRange,omitempty"` 9531 9532 // Description: The budget segment description. It can be used to enter 9533 // Purchase Order information for each budget segment and have that 9534 // information printed on the invoices. Must be UTF-8 encoded. 9535 Description string `json:"description,omitempty"` 9536 9537 // ForceSendFields is a list of field names (e.g. "BudgetAmountMicros") 9538 // to unconditionally include in API requests. By default, fields with 9539 // empty or default values are omitted from API requests. However, any 9540 // non-pointer, non-interface field appearing in ForceSendFields will be 9541 // sent to the server regardless of whether the field is empty or not. 9542 // This may be used to include empty fields in Patch requests. 9543 ForceSendFields []string `json:"-"` 9544 9545 // NullFields is a list of field names (e.g. "BudgetAmountMicros") to 9546 // include in API requests with the JSON null value. By default, fields 9547 // with empty values are omitted from API requests. However, any field 9548 // with an empty value appearing in NullFields will be sent to the 9549 // server as null. It is an error if a field in this list has a 9550 // non-empty value. This may be used to include null fields in Patch 9551 // requests. 9552 NullFields []string `json:"-"` 9553 } 9554 9555 func (s *InsertionOrderBudgetSegment) MarshalJSON() ([]byte, error) { 9556 type NoMethod InsertionOrderBudgetSegment 9557 raw := NoMethod(*s) 9558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9559 } 9560 9561 // IntegralAdScience: Details of Integral Ad Science settings. 9562 type IntegralAdScience struct { 9563 // CustomSegmentId: The custom segment ID provided by Integral Ad 9564 // Science. The ID must be between `1000001` and `1999999`, inclusive. 9565 CustomSegmentId googleapi.Int64s `json:"customSegmentId,omitempty"` 9566 9567 // DisplayViewability: Display Viewability section (applicable to 9568 // display line items only). 9569 // 9570 // Possible values: 9571 // "PERFORMANCE_VIEWABILITY_UNSPECIFIED" - This enum is only a 9572 // placeholder and it doesn't specify any display viewability options. 9573 // "PERFORMANCE_VIEWABILITY_40" - Target 40% Viewability or Higher. 9574 // "PERFORMANCE_VIEWABILITY_50" - Target 50% Viewability or Higher. 9575 // "PERFORMANCE_VIEWABILITY_60" - Target 60% Viewability or Higher. 9576 // "PERFORMANCE_VIEWABILITY_70" - Target 70% Viewability or Higher. 9577 DisplayViewability string `json:"displayViewability,omitempty"` 9578 9579 // ExcludeUnrateable: Brand Safety - **Unrateable**. 9580 ExcludeUnrateable bool `json:"excludeUnrateable,omitempty"` 9581 9582 // ExcludedAdFraudRisk: Ad Fraud settings. 9583 // 9584 // Possible values: 9585 // "SUSPICIOUS_ACTIVITY_UNSPECIFIED" - This enum is only a placeholder 9586 // and it doesn't specify any ad fraud prevention options. 9587 // "SUSPICIOUS_ACTIVITY_HR" - Ad Fraud - Exclude High Risk. 9588 // "SUSPICIOUS_ACTIVITY_HMR" - Ad Fraud - Exclude High and Moderate 9589 // Risk. 9590 ExcludedAdFraudRisk string `json:"excludedAdFraudRisk,omitempty"` 9591 9592 // ExcludedAdultRisk: Brand Safety - **Adult content**. 9593 // 9594 // Possible values: 9595 // "ADULT_UNSPECIFIED" - This enum is only a placeholder and it 9596 // doesn't specify any adult options. 9597 // "ADULT_HR" - Adult - Exclude High Risk. 9598 // "ADULT_HMR" - Adult - Exclude High and Moderate Risk. 9599 ExcludedAdultRisk string `json:"excludedAdultRisk,omitempty"` 9600 9601 // ExcludedAlcoholRisk: Brand Safety - **Alcohol**. 9602 // 9603 // Possible values: 9604 // "ALCOHOL_UNSPECIFIED" - This enum is only a placeholder and it 9605 // doesn't specify any alcohol options. 9606 // "ALCOHOL_HR" - Alcohol - Exclude High Risk. 9607 // "ALCOHOL_HMR" - Alcohol - Exclude High and Moderate Risk. 9608 ExcludedAlcoholRisk string `json:"excludedAlcoholRisk,omitempty"` 9609 9610 // ExcludedDrugsRisk: Brand Safety - **Drugs**. 9611 // 9612 // Possible values: 9613 // "DRUGS_UNSPECIFIED" - This enum is only a placeholder and it 9614 // doesn't specify any drugs options. 9615 // "DRUGS_HR" - Drugs - Exclude High Risk. 9616 // "DRUGS_HMR" - Drugs - Exclude High and Moderate Risk. 9617 ExcludedDrugsRisk string `json:"excludedDrugsRisk,omitempty"` 9618 9619 // ExcludedGamblingRisk: Brand Safety - **Gambling**. 9620 // 9621 // Possible values: 9622 // "GAMBLING_UNSPECIFIED" - This enum is only a placeholder and it 9623 // doesn't specify any gambling options. 9624 // "GAMBLING_HR" - Gambling - Exclude High Risk. 9625 // "GAMBLING_HMR" - Gambling - Exclude High and Moderate Risk. 9626 ExcludedGamblingRisk string `json:"excludedGamblingRisk,omitempty"` 9627 9628 // ExcludedHateSpeechRisk: Brand Safety - **Hate speech**. 9629 // 9630 // Possible values: 9631 // "HATE_SPEECH_UNSPECIFIED" - This enum is only a placeholder and it 9632 // doesn't specify any hate speech options. 9633 // "HATE_SPEECH_HR" - Hate Speech - Exclude High Risk. 9634 // "HATE_SPEECH_HMR" - Hate Speech - Exclude High and Moderate Risk. 9635 ExcludedHateSpeechRisk string `json:"excludedHateSpeechRisk,omitempty"` 9636 9637 // ExcludedIllegalDownloadsRisk: Brand Safety - **Illegal downloads**. 9638 // 9639 // Possible values: 9640 // "ILLEGAL_DOWNLOADS_UNSPECIFIED" - This enum is only a placeholder 9641 // and it doesn't specify any illegal downloads options. 9642 // "ILLEGAL_DOWNLOADS_HR" - Illegal Downloads - Exclude High Risk. 9643 // "ILLEGAL_DOWNLOADS_HMR" - Illegal Downloads - Exclude High and 9644 // Moderate Risk. 9645 ExcludedIllegalDownloadsRisk string `json:"excludedIllegalDownloadsRisk,omitempty"` 9646 9647 // ExcludedOffensiveLanguageRisk: Brand Safety - **Offensive language**. 9648 // 9649 // Possible values: 9650 // "OFFENSIVE_LANGUAGE_UNSPECIFIED" - This enum is only a placeholder 9651 // and it doesn't specify any language options. 9652 // "OFFENSIVE_LANGUAGE_HR" - Offensive Language - Exclude High Risk. 9653 // "OFFENSIVE_LANGUAGE_HMR" - Offensive Language - Exclude High and 9654 // Moderate Risk. 9655 ExcludedOffensiveLanguageRisk string `json:"excludedOffensiveLanguageRisk,omitempty"` 9656 9657 // ExcludedViolenceRisk: Brand Safety - **Violence**. 9658 // 9659 // Possible values: 9660 // "VIOLENCE_UNSPECIFIED" - This enum is only a placeholder and it 9661 // doesn't specify any violence options. 9662 // "VIOLENCE_HR" - Violence - Exclude High Risk. 9663 // "VIOLENCE_HMR" - Violence - Exclude High and Moderate Risk. 9664 ExcludedViolenceRisk string `json:"excludedViolenceRisk,omitempty"` 9665 9666 // TraqScoreOption: True advertising quality (applicable to Display line 9667 // items only). 9668 // 9669 // Possible values: 9670 // "TRAQ_UNSPECIFIED" - This enum is only a placeholder and it doesn't 9671 // specify any true advertising quality scores. 9672 // "TRAQ_250" - TRAQ score 250-1000. 9673 // "TRAQ_500" - TRAQ score 500-1000. 9674 // "TRAQ_600" - TRAQ score 600-1000. 9675 // "TRAQ_700" - TRAQ score 700-1000. 9676 // "TRAQ_750" - TRAQ score 750-1000. 9677 // "TRAQ_875" - TRAQ score 875-1000. 9678 // "TRAQ_1000" - TRAQ score 1000. 9679 TraqScoreOption string `json:"traqScoreOption,omitempty"` 9680 9681 // VideoViewability: Video Viewability Section (applicable to video line 9682 // items only). 9683 // 9684 // Possible values: 9685 // "VIDEO_VIEWABILITY_UNSPECIFIED" - This enum is only a placeholder 9686 // and it doesn't specify any video viewability options. 9687 // "VIDEO_VIEWABILITY_40" - 40%+ in view (IAB video viewability 9688 // standard). 9689 // "VIDEO_VIEWABILITY_50" - 50%+ in view (IAB video viewability 9690 // standard). 9691 // "VIDEO_VIEWABILITY_60" - 60%+ in view (IAB video viewability 9692 // standard). 9693 // "VIDEO_VIEWABILITY_70" - 70%+ in view (IAB video viewability 9694 // standard). 9695 VideoViewability string `json:"videoViewability,omitempty"` 9696 9697 // ForceSendFields is a list of field names (e.g. "CustomSegmentId") to 9698 // unconditionally include in API requests. By default, fields with 9699 // empty or default values are omitted from API requests. However, any 9700 // non-pointer, non-interface field appearing in ForceSendFields will be 9701 // sent to the server regardless of whether the field is empty or not. 9702 // This may be used to include empty fields in Patch requests. 9703 ForceSendFields []string `json:"-"` 9704 9705 // NullFields is a list of field names (e.g. "CustomSegmentId") to 9706 // include in API requests with the JSON null value. By default, fields 9707 // with empty values are omitted from API requests. However, any field 9708 // with an empty value appearing in NullFields will be sent to the 9709 // server as null. It is an error if a field in this list has a 9710 // non-empty value. This may be used to include null fields in Patch 9711 // requests. 9712 NullFields []string `json:"-"` 9713 } 9714 9715 func (s *IntegralAdScience) MarshalJSON() ([]byte, error) { 9716 type NoMethod IntegralAdScience 9717 raw := NoMethod(*s) 9718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9719 } 9720 9721 // IntegrationDetails: Integration details of an entry. 9722 type IntegrationDetails struct { 9723 // Details: Additional details of the entry in string format. Must be 9724 // UTF-8 encoded with a length of no more than 1000 characters. 9725 Details string `json:"details,omitempty"` 9726 9727 // IntegrationCode: An external identifier to be associated with the 9728 // entry. The integration code will show up together with the entry in 9729 // many places in the system, for example, reporting. Must be UTF-8 9730 // encoded with a length of no more than 500 characters. 9731 IntegrationCode string `json:"integrationCode,omitempty"` 9732 9733 // ForceSendFields is a list of field names (e.g. "Details") to 9734 // unconditionally include in API requests. By default, fields with 9735 // empty or default values are omitted from API requests. However, any 9736 // non-pointer, non-interface field appearing in ForceSendFields will be 9737 // sent to the server regardless of whether the field is empty or not. 9738 // This may be used to include empty fields in Patch requests. 9739 ForceSendFields []string `json:"-"` 9740 9741 // NullFields is a list of field names (e.g. "Details") to include in 9742 // API requests with the JSON null value. By default, fields with empty 9743 // values are omitted from API requests. However, any field with an 9744 // empty value appearing in NullFields will be sent to the server as 9745 // null. It is an error if a field in this list has a non-empty value. 9746 // This may be used to include null fields in Patch requests. 9747 NullFields []string `json:"-"` 9748 } 9749 9750 func (s *IntegrationDetails) MarshalJSON() ([]byte, error) { 9751 type NoMethod IntegrationDetails 9752 raw := NoMethod(*s) 9753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9754 } 9755 9756 // InventorySource: An inventory source. 9757 type InventorySource struct { 9758 // Commitment: Whether the inventory source has a guaranteed or 9759 // non-guaranteed delivery. 9760 // 9761 // Possible values: 9762 // "INVENTORY_SOURCE_COMMITMENT_UNSPECIFIED" - The commitment is not 9763 // specified or is unknown in this version. 9764 // "INVENTORY_SOURCE_COMMITMENT_GUARANTEED" - The commitment is 9765 // guaranteed delivery. 9766 // "INVENTORY_SOURCE_COMMITMENT_NON_GUARANTEED" - The commitment is 9767 // non-guaranteed delivery. 9768 Commitment string `json:"commitment,omitempty"` 9769 9770 // CreativeConfigs: The creative requirements of the inventory source. 9771 // Not applicable for auction packages. 9772 CreativeConfigs []*CreativeConfig `json:"creativeConfigs,omitempty"` 9773 9774 // DealId: The ID in the exchange space that uniquely identifies the 9775 // inventory source. Must be unique across buyers within each exchange 9776 // but not necessarily unique across exchanges. 9777 DealId string `json:"dealId,omitempty"` 9778 9779 // DeliveryMethod: The delivery method of the inventory source. * For 9780 // non-guaranteed inventory sources, the only acceptable value is 9781 // `INVENTORY_SOURCE_DELIVERY_METHOD_PROGRAMMATIC`. * For guaranteed 9782 // inventory sources, acceptable values are 9783 // `INVENTORY_SOURCE_DELIVERY_METHOD_TAG` and 9784 // `INVENTORY_SOURCE_DELIVERY_METHOD_PROGRAMMATIC`. 9785 // 9786 // Possible values: 9787 // "INVENTORY_SOURCE_DELIVERY_METHOD_UNSPECIFIED" - The delivery 9788 // method is not specified or is unknown in this version. 9789 // "INVENTORY_SOURCE_DELIVERY_METHOD_PROGRAMMATIC" - The delivery 9790 // method is programmatic. 9791 // "INVENTORY_SOURCE_DELIVERY_METHOD_TAG" - The delivery method is 9792 // tag. 9793 DeliveryMethod string `json:"deliveryMethod,omitempty"` 9794 9795 // DisplayName: The display name of the inventory source. Must be UTF-8 9796 // encoded with a maximum size of 240 bytes. 9797 DisplayName string `json:"displayName,omitempty"` 9798 9799 // Exchange: The exchange to which the inventory source belongs. 9800 // 9801 // Possible values: 9802 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 9803 // this version. 9804 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 9805 // "EXCHANGE_APPNEXUS" - AppNexus. 9806 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 9807 // "EXCHANGE_ADFORM" - Adform. 9808 // "EXCHANGE_ADMETA" - Admeta. 9809 // "EXCHANGE_ADMIXER" - Admixer. 9810 // "EXCHANGE_ADSMOGO" - AdsMogo. 9811 // "EXCHANGE_ADSWIZZ" - AdsWizz. 9812 // "EXCHANGE_BIDSWITCH" - BidSwitch. 9813 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 9814 // from Yahoo!. 9815 // "EXCHANGE_CADREON" - Cadreon. 9816 // "EXCHANGE_DAILYMOTION" - Dailymotion. 9817 // "EXCHANGE_FIVE" - Five. 9818 // "EXCHANGE_FLUCT" - Fluct. 9819 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 9820 // "EXCHANGE_GENIEE" - Geniee. 9821 // "EXCHANGE_GUMGUM" - GumGum. 9822 // "EXCHANGE_IMOBILE" - i-mobile. 9823 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 9824 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 9825 // "EXCHANGE_INDEX" - Index Exchange. 9826 // "EXCHANGE_KARGO" - Kargo. 9827 // "EXCHANGE_MICROAD" - MicroAd. 9828 // "EXCHANGE_MOPUB" - MoPub. 9829 // "EXCHANGE_NEND" - Nend. 9830 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 9831 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 9832 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 9833 // "EXCHANGE_OOYALA" - Ooyala. 9834 // "EXCHANGE_OPENX" - OpenX. 9835 // "EXCHANGE_PERMODO" - Permodo. 9836 // "EXCHANGE_PLATFORMONE" - Platform One. 9837 // "EXCHANGE_PLATFORMID" - PlatformId. 9838 // "EXCHANGE_PUBMATIC" - PubMatic. 9839 // "EXCHANGE_PULSEPOINT" - PulsePoint. 9840 // "EXCHANGE_REVENUEMAX" - RevenueMax. 9841 // "EXCHANGE_RUBICON" - Rubicon. 9842 // "EXCHANGE_SMARTCLIP" - SmartClip. 9843 // "EXCHANGE_SMARTRTB" - SmartRTB+. 9844 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 9845 // "EXCHANGE_SOVRN" - Sovrn. 9846 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 9847 // "EXCHANGE_STROER" - Ströer SSP. 9848 // "EXCHANGE_TEADSTV" - TeadsTv. 9849 // "EXCHANGE_TELARIA" - Telaria. 9850 // "EXCHANGE_TVN" - TVN. 9851 // "EXCHANGE_UNITED" - United. 9852 // "EXCHANGE_YIELDLAB" - Yieldlab. 9853 // "EXCHANGE_YIELDMO" - Yieldmo. 9854 // "EXCHANGE_UNRULYX" - UnrulyX. 9855 // "EXCHANGE_OPEN8" - Open8. 9856 // "EXCHANGE_TRITON" - Triton. 9857 // "EXCHANGE_TRIPLELIFT" - TripleLift. 9858 // "EXCHANGE_TABOOLA" - Taboola. 9859 // "EXCHANGE_INMOBI" - InMobi. 9860 // "EXCHANGE_SMAATO" - Smaato. 9861 // "EXCHANGE_AJA" - Aja. 9862 // "EXCHANGE_SUPERSHIP" - Supership. 9863 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 9864 // "EXCHANGE_WAZE" - Waze. 9865 // "EXCHANGE_SOUNDCAST" - SoundCast. 9866 // "EXCHANGE_SHARETHROUGH" - Sharethrough. 9867 // "EXCHANGE_FYBER" - Fyber. 9868 // "EXCHANGE_RED_FOR_PUBLISHERS" - Red For Publishers. 9869 // "EXCHANGE_MEDIANET" - Media.net. 9870 // "EXCHANGE_TAPJOY" - Tapjoy. 9871 // "EXCHANGE_VISTAR" - Vistar. 9872 // "EXCHANGE_DAX" - DAX. 9873 // "EXCHANGE_JCD" - JCD. 9874 // "EXCHANGE_PLACE_EXCHANGE" - Place Exchange. 9875 // "EXCHANGE_APPLOVIN" - AppLovin. 9876 // "EXCHANGE_CONNATIX" - Connatix. 9877 // "EXCHANGE_RESET_DIGITAL" - Reset Digital. 9878 // "EXCHANGE_HIVESTACK" - Hivestack. 9879 Exchange string `json:"exchange,omitempty"` 9880 9881 // GuaranteedOrderId: Immutable. The ID of the guaranteed order that 9882 // this inventory source belongs to. Only applicable when commitment is 9883 // `INVENTORY_SOURCE_COMMITMENT_GUARANTEED`. 9884 GuaranteedOrderId string `json:"guaranteedOrderId,omitempty"` 9885 9886 // InventorySourceId: Output only. The unique ID of the inventory 9887 // source. Assigned by the system. 9888 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"` 9889 9890 // InventorySourceProductType: Output only. The product type of the 9891 // inventory source, denoting the way through which it sells inventory. 9892 // 9893 // Possible values: 9894 // "INVENTORY_SOURCE_PRODUCT_TYPE_UNSPECIFIED" - The product type is 9895 // not specified or is unknown in this version. Modifying inventory 9896 // sources of this product type are not supported via API. 9897 // "PREFERRED_DEAL" - The inventory source sells inventory through 9898 // Preferred Deal. 9899 // "PRIVATE_AUCTION" - The inventory source sells inventory through 9900 // Private Auction. 9901 // "PROGRAMMATIC_GUARANTEED" - The inventory source sells inventory 9902 // through Programmatic Guaranteed. 9903 // "TAG_GUARANTEED" - The inventory source sells inventory through Tag 9904 // Guaranteed. 9905 // "YOUTUBE_RESERVE" - The inventory source sells inventory through 9906 // YouTube Reserve. 9907 // "INSTANT_RESERVE" - The inventory source sells inventory through 9908 // Instant Reserve. Modifying inventory sources of this product type are 9909 // not supported via API. 9910 // "GUARANTEED_PACKAGE" - The inventory source sells inventory through 9911 // Guaranteed Package. Modifying inventory sources of this product type 9912 // are not supported via API. 9913 // "PROGRAMMATIC_TV" - The inventory source sells inventory through 9914 // Programmtic TV. Modifying inventory sources of this product type are 9915 // not supported via API. 9916 // "AUCTION_PACKAGE" - The inventory source sells inventory through 9917 // Auction Package. Modifying inventory sources of this product type are 9918 // not supported via API. 9919 InventorySourceProductType string `json:"inventorySourceProductType,omitempty"` 9920 9921 // InventorySourceType: Denotes the type of the inventory source. 9922 // 9923 // Possible values: 9924 // "INVENTORY_SOURCE_TYPE_UNSPECIFIED" - The inventory source type is 9925 // not specified or is unknown in this version. 9926 // "INVENTORY_SOURCE_TYPE_PRIVATE" - Private inventory source. 9927 // "INVENTORY_SOURCE_TYPE_AUCTION_PACKAGE" - Auction package. 9928 InventorySourceType string `json:"inventorySourceType,omitempty"` 9929 9930 // Name: Output only. The resource name of the inventory source. 9931 Name string `json:"name,omitempty"` 9932 9933 // PublisherName: The publisher/seller name of the inventory source. 9934 PublisherName string `json:"publisherName,omitempty"` 9935 9936 // RateDetails: Required. The rate details of the inventory source. 9937 RateDetails *RateDetails `json:"rateDetails,omitempty"` 9938 9939 // ReadAdvertiserIds: Output only. The IDs of advertisers with read-only 9940 // access to the inventory source. 9941 ReadAdvertiserIds googleapi.Int64s `json:"readAdvertiserIds,omitempty"` 9942 9943 // ReadPartnerIds: Output only. The IDs of partners with read-only 9944 // access to the inventory source. All advertisers of partners in this 9945 // field inherit read-only access to the inventory source. 9946 ReadPartnerIds googleapi.Int64s `json:"readPartnerIds,omitempty"` 9947 9948 // ReadWriteAccessors: The partner or advertisers that have read/write 9949 // access to the inventory source. Output only when commitment is 9950 // `INVENTORY_SOURCE_COMMITMENT_GUARANTEED`, in which case the 9951 // read/write accessors are inherited from the parent guaranteed order. 9952 // Required when commitment is 9953 // `INVENTORY_SOURCE_COMMITMENT_NON_GUARANTEED`. If commitment is 9954 // `INVENTORY_SOURCE_COMMITMENT_NON_GUARANTEED` and a partner is set in 9955 // this field, all advertisers under this partner will automatically 9956 // have read-only access to the inventory source. These advertisers will 9957 // not be included in read_advertiser_ids. 9958 ReadWriteAccessors *InventorySourceAccessors `json:"readWriteAccessors,omitempty"` 9959 9960 // Status: The status settings of the inventory source. 9961 Status *InventorySourceStatus `json:"status,omitempty"` 9962 9963 // TimeRange: The time range when this inventory source starts and stops 9964 // serving. 9965 TimeRange *TimeRange `json:"timeRange,omitempty"` 9966 9967 // UpdateTime: Output only. The timestamp when the inventory source was 9968 // last updated. Assigned by the system. 9969 UpdateTime string `json:"updateTime,omitempty"` 9970 9971 // ServerResponse contains the HTTP response code and headers from the 9972 // server. 9973 googleapi.ServerResponse `json:"-"` 9974 9975 // ForceSendFields is a list of field names (e.g. "Commitment") to 9976 // unconditionally include in API requests. By default, fields with 9977 // empty or default values are omitted from API requests. However, any 9978 // non-pointer, non-interface field appearing in ForceSendFields will be 9979 // sent to the server regardless of whether the field is empty or not. 9980 // This may be used to include empty fields in Patch requests. 9981 ForceSendFields []string `json:"-"` 9982 9983 // NullFields is a list of field names (e.g. "Commitment") to include in 9984 // API requests with the JSON null value. By default, fields with empty 9985 // values are omitted from API requests. However, any field with an 9986 // empty value appearing in NullFields will be sent to the server as 9987 // null. It is an error if a field in this list has a non-empty value. 9988 // This may be used to include null fields in Patch requests. 9989 NullFields []string `json:"-"` 9990 } 9991 9992 func (s *InventorySource) MarshalJSON() ([]byte, error) { 9993 type NoMethod InventorySource 9994 raw := NoMethod(*s) 9995 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9996 } 9997 9998 // InventorySourceAccessors: The partner or advertisers with access to 9999 // the inventory source. 10000 type InventorySourceAccessors struct { 10001 // Advertisers: The advertisers with access to the inventory source. All 10002 // advertisers must belong to the same partner. 10003 Advertisers *InventorySourceAccessorsAdvertiserAccessors `json:"advertisers,omitempty"` 10004 10005 // Partner: The partner with access to the inventory source. 10006 Partner *InventorySourceAccessorsPartnerAccessor `json:"partner,omitempty"` 10007 10008 // ServerResponse contains the HTTP response code and headers from the 10009 // server. 10010 googleapi.ServerResponse `json:"-"` 10011 10012 // ForceSendFields is a list of field names (e.g. "Advertisers") to 10013 // unconditionally include in API requests. By default, fields with 10014 // empty or default values are omitted from API requests. However, any 10015 // non-pointer, non-interface field appearing in ForceSendFields will be 10016 // sent to the server regardless of whether the field is empty or not. 10017 // This may be used to include empty fields in Patch requests. 10018 ForceSendFields []string `json:"-"` 10019 10020 // NullFields is a list of field names (e.g. "Advertisers") to include 10021 // in API requests with the JSON null value. By default, fields with 10022 // empty values are omitted from API requests. However, any field with 10023 // an empty value appearing in NullFields will be sent to the server as 10024 // null. It is an error if a field in this list has a non-empty value. 10025 // This may be used to include null fields in Patch requests. 10026 NullFields []string `json:"-"` 10027 } 10028 10029 func (s *InventorySourceAccessors) MarshalJSON() ([]byte, error) { 10030 type NoMethod InventorySourceAccessors 10031 raw := NoMethod(*s) 10032 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10033 } 10034 10035 // InventorySourceAccessorsAdvertiserAccessors: The advertisers with 10036 // access to the inventory source. 10037 type InventorySourceAccessorsAdvertiserAccessors struct { 10038 // AdvertiserIds: The IDs of the advertisers. 10039 AdvertiserIds googleapi.Int64s `json:"advertiserIds,omitempty"` 10040 10041 // ForceSendFields is a list of field names (e.g. "AdvertiserIds") to 10042 // unconditionally include in API requests. By default, fields with 10043 // empty or default values are omitted from API requests. However, any 10044 // non-pointer, non-interface field appearing in ForceSendFields will be 10045 // sent to the server regardless of whether the field is empty or not. 10046 // This may be used to include empty fields in Patch requests. 10047 ForceSendFields []string `json:"-"` 10048 10049 // NullFields is a list of field names (e.g. "AdvertiserIds") to include 10050 // in API requests with the JSON null value. By default, fields with 10051 // empty values are omitted from API requests. However, any field with 10052 // an empty value appearing in NullFields will be sent to the server as 10053 // null. It is an error if a field in this list has a non-empty value. 10054 // This may be used to include null fields in Patch requests. 10055 NullFields []string `json:"-"` 10056 } 10057 10058 func (s *InventorySourceAccessorsAdvertiserAccessors) MarshalJSON() ([]byte, error) { 10059 type NoMethod InventorySourceAccessorsAdvertiserAccessors 10060 raw := NoMethod(*s) 10061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10062 } 10063 10064 // InventorySourceAccessorsPartnerAccessor: The partner with access to 10065 // the inventory source. 10066 type InventorySourceAccessorsPartnerAccessor struct { 10067 // PartnerId: The ID of the partner. 10068 PartnerId int64 `json:"partnerId,omitempty,string"` 10069 10070 // ForceSendFields is a list of field names (e.g. "PartnerId") to 10071 // unconditionally include in API requests. By default, fields with 10072 // empty or default values are omitted from API requests. However, any 10073 // non-pointer, non-interface field appearing in ForceSendFields will be 10074 // sent to the server regardless of whether the field is empty or not. 10075 // This may be used to include empty fields in Patch requests. 10076 ForceSendFields []string `json:"-"` 10077 10078 // NullFields is a list of field names (e.g. "PartnerId") to include in 10079 // API requests with the JSON null value. By default, fields with empty 10080 // values are omitted from API requests. However, any field with an 10081 // empty value appearing in NullFields will be sent to the server as 10082 // null. It is an error if a field in this list has a non-empty value. 10083 // This may be used to include null fields in Patch requests. 10084 NullFields []string `json:"-"` 10085 } 10086 10087 func (s *InventorySourceAccessorsPartnerAccessor) MarshalJSON() ([]byte, error) { 10088 type NoMethod InventorySourceAccessorsPartnerAccessor 10089 raw := NoMethod(*s) 10090 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10091 } 10092 10093 // InventorySourceAssignedTargetingOptionDetails: Targeting details for 10094 // inventory source. This will be populated in the details field of an 10095 // AssignedTargetingOption when targeting_type is 10096 // `TARGETING_TYPE_INVENTORY_SOURCE`. 10097 type InventorySourceAssignedTargetingOptionDetails struct { 10098 // InventorySourceId: Required. ID of the inventory source. Should refer 10099 // to the inventory_source_id field of an InventorySource resource. 10100 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"` 10101 10102 // ForceSendFields is a list of field names (e.g. "InventorySourceId") 10103 // to unconditionally include in API requests. By default, fields with 10104 // empty or default values are omitted from API requests. However, any 10105 // non-pointer, non-interface field appearing in ForceSendFields will be 10106 // sent to the server regardless of whether the field is empty or not. 10107 // This may be used to include empty fields in Patch requests. 10108 ForceSendFields []string `json:"-"` 10109 10110 // NullFields is a list of field names (e.g. "InventorySourceId") to 10111 // include in API requests with the JSON null value. By default, fields 10112 // with empty values are omitted from API requests. However, any field 10113 // with an empty value appearing in NullFields will be sent to the 10114 // server as null. It is an error if a field in this list has a 10115 // non-empty value. This may be used to include null fields in Patch 10116 // requests. 10117 NullFields []string `json:"-"` 10118 } 10119 10120 func (s *InventorySourceAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10121 type NoMethod InventorySourceAssignedTargetingOptionDetails 10122 raw := NoMethod(*s) 10123 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10124 } 10125 10126 // InventorySourceDisplayCreativeConfig: The configuration for display 10127 // creatives. 10128 type InventorySourceDisplayCreativeConfig struct { 10129 // CreativeSize: The size requirements for display creatives that can be 10130 // assigned to the inventory source. 10131 CreativeSize *Dimensions `json:"creativeSize,omitempty"` 10132 10133 // ForceSendFields is a list of field names (e.g. "CreativeSize") to 10134 // unconditionally include in API requests. By default, fields with 10135 // empty or default values are omitted from API requests. However, any 10136 // non-pointer, non-interface field appearing in ForceSendFields will be 10137 // sent to the server regardless of whether the field is empty or not. 10138 // This may be used to include empty fields in Patch requests. 10139 ForceSendFields []string `json:"-"` 10140 10141 // NullFields is a list of field names (e.g. "CreativeSize") to include 10142 // in API requests with the JSON null value. By default, fields with 10143 // empty values are omitted from API requests. However, any field with 10144 // an empty value appearing in NullFields will be sent to the server as 10145 // null. It is an error if a field in this list has a non-empty value. 10146 // This may be used to include null fields in Patch requests. 10147 NullFields []string `json:"-"` 10148 } 10149 10150 func (s *InventorySourceDisplayCreativeConfig) MarshalJSON() ([]byte, error) { 10151 type NoMethod InventorySourceDisplayCreativeConfig 10152 raw := NoMethod(*s) 10153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10154 } 10155 10156 // InventorySourceFilter: A filtering option for filtering on Inventory 10157 // Source entities. 10158 type InventorySourceFilter struct { 10159 // InventorySourceIds: Inventory Sources to download by ID. All IDs must 10160 // belong to the same Advertiser or Partner specified in 10161 // CreateSdfDownloadTaskRequest. Leave empty to download all Inventory 10162 // Sources for the selected Advertiser or Partner. 10163 InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"` 10164 10165 // ForceSendFields is a list of field names (e.g. "InventorySourceIds") 10166 // to unconditionally include in API requests. By default, fields with 10167 // empty or default values are omitted from API requests. However, any 10168 // non-pointer, non-interface field appearing in ForceSendFields will be 10169 // sent to the server regardless of whether the field is empty or not. 10170 // This may be used to include empty fields in Patch requests. 10171 ForceSendFields []string `json:"-"` 10172 10173 // NullFields is a list of field names (e.g. "InventorySourceIds") to 10174 // include in API requests with the JSON null value. By default, fields 10175 // with empty values are omitted from API requests. However, any field 10176 // with an empty value appearing in NullFields will be sent to the 10177 // server as null. It is an error if a field in this list has a 10178 // non-empty value. This may be used to include null fields in Patch 10179 // requests. 10180 NullFields []string `json:"-"` 10181 } 10182 10183 func (s *InventorySourceFilter) MarshalJSON() ([]byte, error) { 10184 type NoMethod InventorySourceFilter 10185 raw := NoMethod(*s) 10186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10187 } 10188 10189 // InventorySourceGroup: A collection of targetable inventory sources. 10190 type InventorySourceGroup struct { 10191 // DisplayName: Required. The display name of the inventory source 10192 // group. Must be UTF-8 encoded with a maximum size of 240 bytes. 10193 DisplayName string `json:"displayName,omitempty"` 10194 10195 // InventorySourceGroupId: Output only. The unique ID of the inventory 10196 // source group. Assigned by the system. 10197 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"` 10198 10199 // Name: Output only. The resource name of the inventory source group. 10200 Name string `json:"name,omitempty"` 10201 10202 // ServerResponse contains the HTTP response code and headers from the 10203 // server. 10204 googleapi.ServerResponse `json:"-"` 10205 10206 // ForceSendFields is a list of field names (e.g. "DisplayName") to 10207 // unconditionally include in API requests. By default, fields with 10208 // empty or default values are omitted from API requests. However, any 10209 // non-pointer, non-interface field appearing in ForceSendFields will be 10210 // sent to the server regardless of whether the field is empty or not. 10211 // This may be used to include empty fields in Patch requests. 10212 ForceSendFields []string `json:"-"` 10213 10214 // NullFields is a list of field names (e.g. "DisplayName") to include 10215 // in API requests with the JSON null value. By default, fields with 10216 // empty values are omitted from API requests. However, any field with 10217 // an empty value appearing in NullFields will be sent to the server as 10218 // null. It is an error if a field in this list has a non-empty value. 10219 // This may be used to include null fields in Patch requests. 10220 NullFields []string `json:"-"` 10221 } 10222 10223 func (s *InventorySourceGroup) MarshalJSON() ([]byte, error) { 10224 type NoMethod InventorySourceGroup 10225 raw := NoMethod(*s) 10226 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10227 } 10228 10229 // InventorySourceGroupAssignedTargetingOptionDetails: Targeting details 10230 // for inventory source group. This will be populated in the details 10231 // field of an AssignedTargetingOption when targeting_type is 10232 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP`. 10233 type InventorySourceGroupAssignedTargetingOptionDetails struct { 10234 // InventorySourceGroupId: Required. ID of the inventory source group. 10235 // Should refer to the inventory_source_group_id field of an 10236 // InventorySourceGroup resource. 10237 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"` 10238 10239 // ForceSendFields is a list of field names (e.g. 10240 // "InventorySourceGroupId") to unconditionally include in API requests. 10241 // By default, fields with empty or default values are omitted from API 10242 // requests. However, any non-pointer, non-interface field appearing in 10243 // ForceSendFields will be sent to the server regardless of whether the 10244 // field is empty or not. This may be used to include empty fields in 10245 // Patch requests. 10246 ForceSendFields []string `json:"-"` 10247 10248 // NullFields is a list of field names (e.g. "InventorySourceGroupId") 10249 // to include in API requests with the JSON null value. By default, 10250 // fields with empty values are omitted from API requests. However, any 10251 // field with an empty value appearing in NullFields will be sent to the 10252 // server as null. It is an error if a field in this list has a 10253 // non-empty value. This may be used to include null fields in Patch 10254 // requests. 10255 NullFields []string `json:"-"` 10256 } 10257 10258 func (s *InventorySourceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10259 type NoMethod InventorySourceGroupAssignedTargetingOptionDetails 10260 raw := NoMethod(*s) 10261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10262 } 10263 10264 // InventorySourceStatus: The status related settings of the inventory 10265 // source. 10266 type InventorySourceStatus struct { 10267 // ConfigStatus: Output only. The configuration status of the inventory 10268 // source. Only applicable for guaranteed inventory sources. Acceptable 10269 // values are `INVENTORY_SOURCE_CONFIG_STATUS_PENDING` and 10270 // `INVENTORY_SOURCE_CONFIG_STATUS_COMPLETED`. An inventory source must 10271 // be configured (fill in the required fields, choose creatives, and 10272 // select a default campaign) before it can serve. 10273 // 10274 // Possible values: 10275 // "INVENTORY_SOURCE_CONFIG_STATUS_UNSPECIFIED" - The approval status 10276 // is not specified or is unknown in this version. 10277 // "INVENTORY_SOURCE_CONFIG_STATUS_PENDING" - The beginning state of a 10278 // guaranteed inventory source. The inventory source in this state needs 10279 // to be configured. 10280 // "INVENTORY_SOURCE_CONFIG_STATUS_COMPLETED" - The state after the 10281 // buyer configures a guaranteed inventory source. 10282 ConfigStatus string `json:"configStatus,omitempty"` 10283 10284 // EntityPauseReason: The user-provided reason for pausing this 10285 // inventory source. Must not exceed 100 characters. Only applicable 10286 // when entity_status is set to `ENTITY_STATUS_PAUSED`. 10287 EntityPauseReason string `json:"entityPauseReason,omitempty"` 10288 10289 // EntityStatus: Whether or not the inventory source is servable. 10290 // Acceptable values are `ENTITY_STATUS_ACTIVE`, 10291 // `ENTITY_STATUS_ARCHIVED`, and `ENTITY_STATUS_PAUSED`. Default value 10292 // is `ENTITY_STATUS_ACTIVE`. 10293 // 10294 // Possible values: 10295 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 10296 // specified or is unknown in this version. 10297 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 10298 // budget. 10299 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 10300 // budget spending are disabled. An entity can be deleted after 10301 // archived. Deleted entities cannot be retrieved. 10302 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 10303 // budget spending are disabled. 10304 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 10305 // the entity. 10306 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 10307 // for deletion. 10308 EntityStatus string `json:"entityStatus,omitempty"` 10309 10310 // SellerPauseReason: Output only. The seller-provided reason for 10311 // pausing this inventory source. Only applicable for inventory sources 10312 // synced directly from the publishers and when seller_status is set to 10313 // `ENTITY_STATUS_PAUSED`. 10314 SellerPauseReason string `json:"sellerPauseReason,omitempty"` 10315 10316 // SellerStatus: Output only. The status set by the seller for the 10317 // inventory source. Only applicable for inventory sources synced 10318 // directly from the publishers. Acceptable values are 10319 // `ENTITY_STATUS_ACTIVE` and `ENTITY_STATUS_PAUSED`. 10320 // 10321 // Possible values: 10322 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 10323 // specified or is unknown in this version. 10324 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 10325 // budget. 10326 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 10327 // budget spending are disabled. An entity can be deleted after 10328 // archived. Deleted entities cannot be retrieved. 10329 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 10330 // budget spending are disabled. 10331 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 10332 // the entity. 10333 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 10334 // for deletion. 10335 SellerStatus string `json:"sellerStatus,omitempty"` 10336 10337 // ForceSendFields is a list of field names (e.g. "ConfigStatus") to 10338 // unconditionally include in API requests. By default, fields with 10339 // empty or default values are omitted from API requests. However, any 10340 // non-pointer, non-interface field appearing in ForceSendFields will be 10341 // sent to the server regardless of whether the field is empty or not. 10342 // This may be used to include empty fields in Patch requests. 10343 ForceSendFields []string `json:"-"` 10344 10345 // NullFields is a list of field names (e.g. "ConfigStatus") to include 10346 // in API requests with the JSON null value. By default, fields with 10347 // empty values are omitted from API requests. However, any field with 10348 // an empty value appearing in NullFields will be sent to the server as 10349 // null. It is an error if a field in this list has a non-empty value. 10350 // This may be used to include null fields in Patch requests. 10351 NullFields []string `json:"-"` 10352 } 10353 10354 func (s *InventorySourceStatus) MarshalJSON() ([]byte, error) { 10355 type NoMethod InventorySourceStatus 10356 raw := NoMethod(*s) 10357 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10358 } 10359 10360 // InventorySourceVideoCreativeConfig: The configuration for video 10361 // creatives. 10362 type InventorySourceVideoCreativeConfig struct { 10363 // Duration: The duration requirements for the video creatives that can 10364 // be assigned to the inventory source. 10365 Duration string `json:"duration,omitempty"` 10366 10367 // ForceSendFields is a list of field names (e.g. "Duration") to 10368 // unconditionally include in API requests. By default, fields with 10369 // empty or default values are omitted from API requests. However, any 10370 // non-pointer, non-interface field appearing in ForceSendFields will be 10371 // sent to the server regardless of whether the field is empty or not. 10372 // This may be used to include empty fields in Patch requests. 10373 ForceSendFields []string `json:"-"` 10374 10375 // NullFields is a list of field names (e.g. "Duration") to include in 10376 // API requests with the JSON null value. By default, fields with empty 10377 // values are omitted from API requests. However, any field with an 10378 // empty value appearing in NullFields will be sent to the server as 10379 // null. It is an error if a field in this list has a non-empty value. 10380 // This may be used to include null fields in Patch requests. 10381 NullFields []string `json:"-"` 10382 } 10383 10384 func (s *InventorySourceVideoCreativeConfig) MarshalJSON() ([]byte, error) { 10385 type NoMethod InventorySourceVideoCreativeConfig 10386 raw := NoMethod(*s) 10387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10388 } 10389 10390 // Invoice: A single invoice. 10391 type Invoice struct { 10392 // BudgetInvoiceGroupingId: The budget grouping ID for this invoice. 10393 // This field will only be set if the invoice level of the corresponding 10394 // billing profile was set to "Budget invoice grouping ID". 10395 BudgetInvoiceGroupingId string `json:"budgetInvoiceGroupingId,omitempty"` 10396 10397 // BudgetSummaries: The list of summarized information for each budget 10398 // associated with this invoice. This field will only be set if the 10399 // invoice detail level of the corresponding billing profile was set to 10400 // "Budget level PO". 10401 BudgetSummaries []*BudgetSummary `json:"budgetSummaries,omitempty"` 10402 10403 // CorrectedInvoiceId: The ID of the original invoice being adjusted by 10404 // this invoice, if applicable. May appear on the invoice PDF as 10405 // `Reference invoice number`. If replaced_invoice_ids is set, this 10406 // field will be empty. 10407 CorrectedInvoiceId string `json:"correctedInvoiceId,omitempty"` 10408 10409 // CurrencyCode: The currency used in the invoice in ISO 4217 format. 10410 CurrencyCode string `json:"currencyCode,omitempty"` 10411 10412 // DisplayName: The display name of the invoice. 10413 DisplayName string `json:"displayName,omitempty"` 10414 10415 // DueDate: The date when the invoice is due. 10416 DueDate *Date `json:"dueDate,omitempty"` 10417 10418 // InvoiceId: The unique ID of the invoice. 10419 InvoiceId string `json:"invoiceId,omitempty"` 10420 10421 // InvoiceType: The type of invoice document. 10422 // 10423 // Possible values: 10424 // "INVOICE_TYPE_UNSPECIFIED" - Not specified or is unknown in this 10425 // version. 10426 // "INVOICE_TYPE_CREDIT" - The invoice has a negative amount. 10427 // "INVOICE_TYPE_INVOICE" - The invoice has a positive amount. 10428 InvoiceType string `json:"invoiceType,omitempty"` 10429 10430 // IssueDate: The date when the invoice was issued. 10431 IssueDate *Date `json:"issueDate,omitempty"` 10432 10433 // Name: The resource name of the invoice. 10434 Name string `json:"name,omitempty"` 10435 10436 // NonBudgetMicros: The total amount of costs or adjustments not tied to 10437 // a particular budget, in micros of the invoice's currency. For 10438 // example, if currency_code is `USD`, then 1000000 represents one US 10439 // dollar. 10440 NonBudgetMicros int64 `json:"nonBudgetMicros,omitempty,string"` 10441 10442 // PaymentsAccountId: The ID of the payments account the invoice belongs 10443 // to. Appears on the invoice PDF as `Billing Account Number`. 10444 PaymentsAccountId string `json:"paymentsAccountId,omitempty"` 10445 10446 // PaymentsProfileId: The ID of the payments profile the invoice belongs 10447 // to. Appears on the invoice PDF as `Billing ID`. 10448 PaymentsProfileId string `json:"paymentsProfileId,omitempty"` 10449 10450 // PdfUrl: The URL to download a PDF copy of the invoice. This URL is 10451 // user specific and requires a valid OAuth 2.0 access token to access. 10452 // The access token must be provided in an `Authorization: Bearer` HTTP 10453 // header and be authorized for one of the following scopes: * 10454 // `https://www.googleapis.com/auth/display-video-mediaplanning` * 10455 // `https://www.googleapis.com/auth/display-video` The URL will be valid 10456 // for 7 days after retrieval of this invoice object or until this 10457 // invoice is retrieved again. 10458 PdfUrl string `json:"pdfUrl,omitempty"` 10459 10460 // PurchaseOrderNumber: Purchase order number associated with the 10461 // invoice. 10462 PurchaseOrderNumber string `json:"purchaseOrderNumber,omitempty"` 10463 10464 // ReplacedInvoiceIds: The ID(s) of any originally issued invoice that 10465 // is being cancelled by this invoice, if applicable. Multiple invoices 10466 // may be listed if those invoices are being consolidated into a single 10467 // invoice. May appear on invoice PDF as `Replaced invoice numbers`. If 10468 // corrected_invoice_id is set, this field will be empty. 10469 ReplacedInvoiceIds []string `json:"replacedInvoiceIds,omitempty"` 10470 10471 // ServiceDateRange: The service start and end dates which are covered 10472 // by this invoice. 10473 ServiceDateRange *DateRange `json:"serviceDateRange,omitempty"` 10474 10475 // SubtotalAmountMicros: The pre-tax subtotal amount, in micros of the 10476 // invoice's currency. For example, if currency_code is `USD`, then 10477 // 1000000 represents one US dollar. 10478 SubtotalAmountMicros int64 `json:"subtotalAmountMicros,omitempty,string"` 10479 10480 // TotalAmountMicros: The invoice total amount, in micros of the 10481 // invoice's currency. For example, if currency_code is `USD`, then 10482 // 1000000 represents one US dollar. 10483 TotalAmountMicros int64 `json:"totalAmountMicros,omitempty,string"` 10484 10485 // TotalTaxAmountMicros: The sum of all taxes in invoice, in micros of 10486 // the invoice's currency. For example, if currency_code is `USD`, then 10487 // 1000000 represents one US dollar. 10488 TotalTaxAmountMicros int64 `json:"totalTaxAmountMicros,omitempty,string"` 10489 10490 // ForceSendFields is a list of field names (e.g. 10491 // "BudgetInvoiceGroupingId") to unconditionally include in API 10492 // requests. By default, fields with empty or default values are omitted 10493 // from API requests. However, any non-pointer, non-interface field 10494 // appearing in ForceSendFields will be sent to the server regardless of 10495 // whether the field is empty or not. This may be used to include empty 10496 // fields in Patch requests. 10497 ForceSendFields []string `json:"-"` 10498 10499 // NullFields is a list of field names (e.g. "BudgetInvoiceGroupingId") 10500 // to include in API requests with the JSON null value. By default, 10501 // fields with empty values are omitted from API requests. However, any 10502 // field with an empty value appearing in NullFields will be sent to the 10503 // server as null. It is an error if a field in this list has a 10504 // non-empty value. This may be used to include null fields in Patch 10505 // requests. 10506 NullFields []string `json:"-"` 10507 } 10508 10509 func (s *Invoice) MarshalJSON() ([]byte, error) { 10510 type NoMethod Invoice 10511 raw := NoMethod(*s) 10512 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10513 } 10514 10515 // KeywordAssignedTargetingOptionDetails: Details for assigned keyword 10516 // targeting option. This will be populated in the details field of an 10517 // AssignedTargetingOption when targeting_type is 10518 // `TARGETING_TYPE_KEYWORD`. 10519 type KeywordAssignedTargetingOptionDetails struct { 10520 // Keyword: Required. The keyword, for example `car insurance`. Positive 10521 // keyword cannot be offensive word. Must be UTF-8 encoded with a 10522 // maximum size of 255 bytes. Maximum number of characters is 80. 10523 // Maximum number of words is 10. 10524 Keyword string `json:"keyword,omitempty"` 10525 10526 // Negative: Indicates if this option is being negatively targeted. 10527 Negative bool `json:"negative,omitempty"` 10528 10529 // ForceSendFields is a list of field names (e.g. "Keyword") to 10530 // unconditionally include in API requests. By default, fields with 10531 // empty or default values are omitted from API requests. However, any 10532 // non-pointer, non-interface field appearing in ForceSendFields will be 10533 // sent to the server regardless of whether the field is empty or not. 10534 // This may be used to include empty fields in Patch requests. 10535 ForceSendFields []string `json:"-"` 10536 10537 // NullFields is a list of field names (e.g. "Keyword") to include in 10538 // API requests with the JSON null value. By default, fields with empty 10539 // values are omitted from API requests. However, any field with an 10540 // empty value appearing in NullFields will be sent to the server as 10541 // null. It is an error if a field in this list has a non-empty value. 10542 // This may be used to include null fields in Patch requests. 10543 NullFields []string `json:"-"` 10544 } 10545 10546 func (s *KeywordAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10547 type NoMethod KeywordAssignedTargetingOptionDetails 10548 raw := NoMethod(*s) 10549 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10550 } 10551 10552 // LanguageAssignedTargetingOptionDetails: Details for assigned language 10553 // targeting option. This will be populated in the details field of an 10554 // AssignedTargetingOption when targeting_type is 10555 // `TARGETING_TYPE_LANGUAGE`. 10556 type LanguageAssignedTargetingOptionDetails struct { 10557 // DisplayName: Output only. The display name of the language (e.g., 10558 // "French"). 10559 DisplayName string `json:"displayName,omitempty"` 10560 10561 // Negative: Indicates if this option is being negatively targeted. All 10562 // assigned language targeting options on the same resource must have 10563 // the same value for this field. 10564 Negative bool `json:"negative,omitempty"` 10565 10566 // TargetingOptionId: Required. The targeting_option_id of a 10567 // TargetingOption of type `TARGETING_TYPE_LANGUAGE`. 10568 TargetingOptionId string `json:"targetingOptionId,omitempty"` 10569 10570 // ForceSendFields is a list of field names (e.g. "DisplayName") to 10571 // unconditionally include in API requests. By default, fields with 10572 // empty or default values are omitted from API requests. However, any 10573 // non-pointer, non-interface field appearing in ForceSendFields will be 10574 // sent to the server regardless of whether the field is empty or not. 10575 // This may be used to include empty fields in Patch requests. 10576 ForceSendFields []string `json:"-"` 10577 10578 // NullFields is a list of field names (e.g. "DisplayName") to include 10579 // in API requests with the JSON null value. By default, fields with 10580 // empty values are omitted from API requests. However, any field with 10581 // an empty value appearing in NullFields will be sent to the server as 10582 // null. It is an error if a field in this list has a non-empty value. 10583 // This may be used to include null fields in Patch requests. 10584 NullFields []string `json:"-"` 10585 } 10586 10587 func (s *LanguageAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10588 type NoMethod LanguageAssignedTargetingOptionDetails 10589 raw := NoMethod(*s) 10590 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10591 } 10592 10593 // LanguageTargetingOptionDetails: Represents a targetable language. 10594 // This will be populated in the language_details field when 10595 // targeting_type is `TARGETING_TYPE_LANGUAGE`. 10596 type LanguageTargetingOptionDetails struct { 10597 // DisplayName: Output only. The display name of the language (e.g., 10598 // "French"). 10599 DisplayName string `json:"displayName,omitempty"` 10600 10601 // ForceSendFields is a list of field names (e.g. "DisplayName") to 10602 // unconditionally include in API requests. By default, fields with 10603 // empty or default values are omitted from API requests. However, any 10604 // non-pointer, non-interface field appearing in ForceSendFields will be 10605 // sent to the server regardless of whether the field is empty or not. 10606 // This may be used to include empty fields in Patch requests. 10607 ForceSendFields []string `json:"-"` 10608 10609 // NullFields is a list of field names (e.g. "DisplayName") to include 10610 // in API requests with the JSON null value. By default, fields with 10611 // empty values are omitted from API requests. However, any field with 10612 // an empty value appearing in NullFields will be sent to the server as 10613 // null. It is an error if a field in this list has a non-empty value. 10614 // This may be used to include null fields in Patch requests. 10615 NullFields []string `json:"-"` 10616 } 10617 10618 func (s *LanguageTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10619 type NoMethod LanguageTargetingOptionDetails 10620 raw := NoMethod(*s) 10621 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10622 } 10623 10624 // LineItem: A single line item. 10625 type LineItem struct { 10626 // AdvertiserId: Output only. The unique ID of the advertiser the line 10627 // item belongs to. 10628 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 10629 10630 // BidStrategy: Required. The bidding strategy of the line item. 10631 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"` 10632 10633 // Budget: Required. The budget allocation setting of the line item. 10634 Budget *LineItemBudget `json:"budget,omitempty"` 10635 10636 // CampaignId: Output only. The unique ID of the campaign that the line 10637 // item belongs to. 10638 CampaignId int64 `json:"campaignId,omitempty,string"` 10639 10640 // ConversionCounting: The conversion tracking setting of the line item. 10641 ConversionCounting *ConversionCountingConfig `json:"conversionCounting,omitempty"` 10642 10643 // CreativeIds: The IDs of the creatives associated with the line item. 10644 CreativeIds googleapi.Int64s `json:"creativeIds,omitempty"` 10645 10646 // DisplayName: Required. The display name of the line item. Must be 10647 // UTF-8 encoded with a maximum size of 240 bytes. 10648 DisplayName string `json:"displayName,omitempty"` 10649 10650 // EntityStatus: Required. Controls whether or not the line item can 10651 // spend its budget and bid on inventory. * For CreateLineItem method, 10652 // only `ENTITY_STATUS_DRAFT` is allowed. To activate a line item, use 10653 // UpdateLineItem method and update the status to `ENTITY_STATUS_ACTIVE` 10654 // after creation. * A line item cannot be changed back to 10655 // `ENTITY_STATUS_DRAFT` status from any other status. * If the line 10656 // item's parent insertion order is not active, the line item can't 10657 // spend its budget even if its own status is `ENTITY_STATUS_ACTIVE`. 10658 // 10659 // Possible values: 10660 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 10661 // specified or is unknown in this version. 10662 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 10663 // budget. 10664 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 10665 // budget spending are disabled. An entity can be deleted after 10666 // archived. Deleted entities cannot be retrieved. 10667 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 10668 // budget spending are disabled. 10669 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 10670 // the entity. 10671 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 10672 // for deletion. 10673 EntityStatus string `json:"entityStatus,omitempty"` 10674 10675 // ExcludeNewExchanges: Whether to exclude new exchanges from 10676 // automatically being targeted by the line item. This field is false by 10677 // default. 10678 ExcludeNewExchanges bool `json:"excludeNewExchanges,omitempty"` 10679 10680 // Flight: Required. The start and end time of the line item's flight. 10681 Flight *LineItemFlight `json:"flight,omitempty"` 10682 10683 // FrequencyCap: Required. The impression frequency cap settings of the 10684 // line item. The max_impressions field in this settings object must be 10685 // used if assigning a limited cap. 10686 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"` 10687 10688 // InsertionOrderId: Required. Immutable. The unique ID of the insertion 10689 // order that the line item belongs to. 10690 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"` 10691 10692 // IntegrationDetails: Integration details of the line item. 10693 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"` 10694 10695 // InventorySourceIds: The IDs of the private inventory sources assigned 10696 // to the line item. 10697 InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"` 10698 10699 // LineItemId: Output only. The unique ID of the line item. Assigned by 10700 // the system. 10701 LineItemId int64 `json:"lineItemId,omitempty,string"` 10702 10703 // LineItemType: Required. Immutable. The type of the line item. 10704 // 10705 // Possible values: 10706 // "LINE_ITEM_TYPE_UNSPECIFIED" - Type value is not specified or is 10707 // unknown in this version. Line items of this type and their targeting 10708 // cannot be created or updated using the API. 10709 // "LINE_ITEM_TYPE_DISPLAY_DEFAULT" - Image, HTML5, native, or rich 10710 // media ads. 10711 // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL" - Display ads that 10712 // drive installs of an app. 10713 // "LINE_ITEM_TYPE_VIDEO_DEFAULT" - Video ads sold on a CPM basis for 10714 // a variety of environments. 10715 // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL" - Video ads that drive 10716 // installs of an app. 10717 // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INVENTORY" - Display ads served 10718 // on mobile app inventory. Line items of this type and their targeting 10719 // cannot be created or updated using the API. 10720 // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INVENTORY" - Video ads served on 10721 // mobile app inventory. Line items of this type and their targeting 10722 // cannot be created or updated using the API. 10723 // "LINE_ITEM_TYPE_AUDIO_DEFAULT" - RTB Audio ads sold for a variety 10724 // of environments. 10725 // "LINE_ITEM_TYPE_VIDEO_OVER_THE_TOP" - Over-the-top ads present in 10726 // OTT insertion orders. This type is only applicable to line items with 10727 // an insertion order of insertion_order_type `OVER_THE_TOP`. 10728 // "LINE_ITEM_TYPE_DISPLAY_OUT_OF_HOME" - Display ads served on 10729 // digital-out-of-home inventory. Line items of this type and their 10730 // targeting cannot be created or updated using the API. 10731 // "LINE_ITEM_TYPE_VIDEO_OUT_OF_HOME" - Video ads served on 10732 // digital-out-of-home inventory. Line items of this type and their 10733 // targeting cannot be created or updated using the API. 10734 LineItemType string `json:"lineItemType,omitempty"` 10735 10736 // MobileApp: The mobile app promoted by the line item. This is 10737 // applicable only when line_item_type is either 10738 // `LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL` or 10739 // `LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL`. 10740 MobileApp *MobileApp `json:"mobileApp,omitempty"` 10741 10742 // Name: Output only. The resource name of the line item. 10743 Name string `json:"name,omitempty"` 10744 10745 // Pacing: Required. The budget spending speed setting of the line item. 10746 Pacing *Pacing `json:"pacing,omitempty"` 10747 10748 // PartnerCosts: The partner costs associated with the line item. If 10749 // absent or empty in CreateLineItem method, the newly created line item 10750 // will inherit partner costs from its parent insertion order. 10751 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"` 10752 10753 // PartnerRevenueModel: Required. The partner revenue model setting of 10754 // the line item. 10755 PartnerRevenueModel *PartnerRevenueModel `json:"partnerRevenueModel,omitempty"` 10756 10757 // ReservationType: Output only. The reservation type of the line item. 10758 // 10759 // Possible values: 10760 // "RESERVATION_TYPE_UNSPECIFIED" - Reservation type value is not 10761 // specified or is unknown in this version. 10762 // "RESERVATION_TYPE_NOT_GUARANTEED" - Not created through a 10763 // guaranteed inventory source. 10764 // "RESERVATION_TYPE_PROGRAMMATIC_GUARANTEED" - Created through a 10765 // programmatic guaranteed inventory source. 10766 // "RESERVATION_TYPE_TAG_GUARANTEED" - Created through a tag 10767 // guaranteed inventory source. 10768 ReservationType string `json:"reservationType,omitempty"` 10769 10770 // TargetingExpansion: The optimized targeting 10771 // (//support.google.com/displayvideo/answer/12060859) settings of the 10772 // line item. This config is only applicable for display, video, or 10773 // audio line items that use automated bidding and positively target 10774 // eligible audience lists. 10775 TargetingExpansion *TargetingExpansionConfig `json:"targetingExpansion,omitempty"` 10776 10777 // UpdateTime: Output only. The timestamp when the line item was last 10778 // updated. Assigned by the system. 10779 UpdateTime string `json:"updateTime,omitempty"` 10780 10781 // WarningMessages: Output only. The warning messages generated by the 10782 // line item. These warnings do not block saving the line item, but some 10783 // may block the line item from running. 10784 // 10785 // Possible values: 10786 // "LINE_ITEM_WARNING_MESSAGE_UNSPECIFIED" - Not specified or is 10787 // unknown. 10788 // "INVALID_FLIGHT_DATES" - This line item has invalid flight dates. 10789 // The line item will not run. 10790 // "EXPIRED" - This line item's end date is in the past. 10791 // "PENDING_FLIGHT" - This line item will begin running in the future. 10792 // "ALL_PARTNER_ENABLED_EXCHANGES_NEGATIVELY_TARGETED" - All partner 10793 // enabled exchanges are negatively targeted. The line item will not 10794 // run. 10795 // "INVALID_INVENTORY_SOURCE" - No active inventory sources are being 10796 // targeted. The line item will not run. 10797 // "APP_INVENTORY_INVALID_SITE_TARGETING" - This line item's Apps & 10798 // URLs targeting doesn't include any mobile apps. This line item's type 10799 // requires you to include mobile apps in your channel, sitelist, or 10800 // apps targeting. The line item will not run. 10801 // "APP_INVENTORY_INVALID_AUDIENCE_LISTS" - This line item isn't 10802 // targeting any mobile users. This line item's type requires you to 10803 // target a user list with mobile users. The line item will not run. 10804 // "NO_VALID_CREATIVE" - This line item does not contain any valid 10805 // creative. The line item will not run. 10806 // "PARENT_INSERTION_ORDER_PAUSED" - The insertion order of this line 10807 // item is paused. The line item will not run. 10808 // "PARENT_INSERTION_ORDER_EXPIRED" - The insertion order of this line 10809 // item has its end date set in the past. The line item will not run. 10810 // "NO_POSITIVE_AUDIENCE_LIST_TARGETED" - This line item does not 10811 // target any audience lists, which may result in spending your budget 10812 // too quickly. 10813 // "APP_INSTALL_NO_CONVERSION_PIXEL" - This app install line item does 10814 // not have any conversion pixel set up. 10815 // "TARGETING_REVOKED_OR_CLOSED_USER_LIST" - This line item targets 10816 // one or more user lists that are no longer available. In the future, 10817 // this will prevent the line item from serving, so consider removing 10818 // these lists from your targeting. 10819 // "APP_INSTALL_NO_OPTIMAL_BIDDING_STRATEGY" - This app install line 10820 // item does not have an optimal bidding strategy. 10821 // "CREATIVE_SIZE_NOT_IN_USE_FOR_TARGETED_DEALS" - Deals targeted by 10822 // this line item accept creative sizes which are not in use. This may 10823 // limit the line item's delivery or performance. 10824 // "NO_CREATIVE_FOR_TARGETED_DEALS" - This line item does not contain 10825 // any creative for the targeted deals. 10826 // "TARGETING_DEPRECATED_GEO_TARGET" - This line item targets a geo 10827 // target that is deprecated. 10828 // "DEPRECATED_FIRST_PARTY_AUDIENCE_EXCLUSION" - This line item uses 10829 // the exclude_first_party_audience setting, which is deprecated and 10830 // scheduled to sunset after **March 25, 2023**. Update your API 10831 // integration to directly exclude any first-party audiences using 10832 // audience targeting before **March 25, 2023** to account for the 10833 // sunset of the exclude_first_party_audience field. 10834 WarningMessages []string `json:"warningMessages,omitempty"` 10835 10836 // ServerResponse contains the HTTP response code and headers from the 10837 // server. 10838 googleapi.ServerResponse `json:"-"` 10839 10840 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 10841 // unconditionally include in API requests. By default, fields with 10842 // empty or default values are omitted from API requests. However, any 10843 // non-pointer, non-interface field appearing in ForceSendFields will be 10844 // sent to the server regardless of whether the field is empty or not. 10845 // This may be used to include empty fields in Patch requests. 10846 ForceSendFields []string `json:"-"` 10847 10848 // NullFields is a list of field names (e.g. "AdvertiserId") to include 10849 // in API requests with the JSON null value. By default, fields with 10850 // empty values are omitted from API requests. However, any field with 10851 // an empty value appearing in NullFields will be sent to the server as 10852 // null. It is an error if a field in this list has a non-empty value. 10853 // This may be used to include null fields in Patch requests. 10854 NullFields []string `json:"-"` 10855 } 10856 10857 func (s *LineItem) MarshalJSON() ([]byte, error) { 10858 type NoMethod LineItem 10859 raw := NoMethod(*s) 10860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10861 } 10862 10863 // LineItemBudget: Settings that control how budget is allocated. 10864 type LineItemBudget struct { 10865 // BudgetAllocationType: Required. The type of the budget allocation. 10866 // `LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC` is only applicable when 10867 // automatic budget allocation is enabled for the parent insertion 10868 // order. 10869 // 10870 // Possible values: 10871 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNSPECIFIED" - Type value is not 10872 // specified or is unknown in this version. 10873 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC" - Automatic budget 10874 // allocation is enabled for the line item. 10875 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_FIXED" - A fixed max budget 10876 // amount is allocated for the line item. 10877 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNLIMITED" - No budget limit is 10878 // applied to the line item. 10879 BudgetAllocationType string `json:"budgetAllocationType,omitempty"` 10880 10881 // BudgetUnit: Output only. The budget unit specifies whether the budget 10882 // is currency based or impression based. This value is inherited from 10883 // the parent insertion order. 10884 // 10885 // Possible values: 10886 // "BUDGET_UNIT_UNSPECIFIED" - Type value is not specified or is 10887 // unknown in this version. 10888 // "BUDGET_UNIT_CURRENCY" - Budgeting in currency amounts. 10889 // "BUDGET_UNIT_IMPRESSIONS" - Budgeting in impression amounts. 10890 BudgetUnit string `json:"budgetUnit,omitempty"` 10891 10892 // MaxAmount: The maximum budget amount the line item will spend. Must 10893 // be greater than 0. When budget_allocation_type is: * 10894 // `LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC`, this field is immutable 10895 // and is set by the system. * `LINE_ITEM_BUDGET_ALLOCATION_TYPE_FIXED`, 10896 // if budget_unit is: - `BUDGET_UNIT_CURRENCY`, this field represents 10897 // maximum budget amount to spend, in micros of the advertiser's 10898 // currency. For example, 1500000 represents 1.5 standard units of the 10899 // currency. - `BUDGET_UNIT_IMPRESSIONS`, this field represents the 10900 // maximum number of impressions to serve. * 10901 // `LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNLIMITED`, this field is not 10902 // applicable and will be ignored by the system. 10903 MaxAmount int64 `json:"maxAmount,omitempty,string"` 10904 10905 // ForceSendFields is a list of field names (e.g. 10906 // "BudgetAllocationType") to unconditionally include in API requests. 10907 // By default, fields with empty or default values are omitted from API 10908 // requests. However, any non-pointer, non-interface field appearing in 10909 // ForceSendFields will be sent to the server regardless of whether the 10910 // field is empty or not. This may be used to include empty fields in 10911 // Patch requests. 10912 ForceSendFields []string `json:"-"` 10913 10914 // NullFields is a list of field names (e.g. "BudgetAllocationType") to 10915 // include in API requests with the JSON null value. By default, fields 10916 // with empty values are omitted from API requests. However, any field 10917 // with an empty value appearing in NullFields will be sent to the 10918 // server as null. It is an error if a field in this list has a 10919 // non-empty value. This may be used to include null fields in Patch 10920 // requests. 10921 NullFields []string `json:"-"` 10922 } 10923 10924 func (s *LineItemBudget) MarshalJSON() ([]byte, error) { 10925 type NoMethod LineItemBudget 10926 raw := NoMethod(*s) 10927 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10928 } 10929 10930 // LineItemFlight: Settings that control the active duration of a line 10931 // item. 10932 type LineItemFlight struct { 10933 // DateRange: The flight start and end dates of the line item. They are 10934 // resolved relative to the parent advertiser's time zone. * Required 10935 // when flight_date_type is `LINE_ITEM_FLIGHT_DATE_TYPE_CUSTOM`. Output 10936 // only otherwise. * When creating a new flight, both `start_date` and 10937 // `end_date` must be in the future. * An existing flight with a 10938 // `start_date` in the past has a mutable `end_date` but an immutable 10939 // `start_date`. * `end_date` must be the `start_date` or later, both 10940 // before the year 2037. 10941 DateRange *DateRange `json:"dateRange,omitempty"` 10942 10943 // FlightDateType: Required. The type of the line item's flight dates. 10944 // 10945 // Possible values: 10946 // "LINE_ITEM_FLIGHT_DATE_TYPE_UNSPECIFIED" - Type value is not 10947 // specified or is unknown in this version. 10948 // "LINE_ITEM_FLIGHT_DATE_TYPE_INHERITED" - The line item's flight 10949 // dates are inherited from its parent insertion order. 10950 // "LINE_ITEM_FLIGHT_DATE_TYPE_CUSTOM" - The line item uses its own 10951 // custom flight dates. 10952 // "LINE_ITEM_FLIGHT_DATE_TYPE_TRIGGER" - The line item uses a 10953 // trigger. **Warning:** Line Items using manual triggers no longer 10954 // serve in Display & Video 360. This value will sunset on August 1, 10955 // 2023. Read our [feature deprecation 10956 // announcement](/display-video/api/deprecations#features.manual_triggers 10957 // ) for more information. 10958 FlightDateType string `json:"flightDateType,omitempty"` 10959 10960 // TriggerId: The ID of the manual trigger associated with the line 10961 // item. * Required when flight_date_type is 10962 // `LINE_ITEM_FLIGHT_DATE_TYPE_TRIGGER`. Must not be set otherwise. * 10963 // When set, the line item's flight dates are inherited from its parent 10964 // insertion order. * Active line items will spend when the selected 10965 // trigger is activated within the parent insertion order's flight 10966 // dates. **Warning:** Line Items using manual triggers no longer serve 10967 // in Display & Video 360. This field will sunset on August 1, 2023. 10968 // Read our feature deprecation announcement 10969 // (/display-video/api/deprecations#features.manual_triggers) for more 10970 // information. 10971 TriggerId int64 `json:"triggerId,omitempty,string"` 10972 10973 // ForceSendFields is a list of field names (e.g. "DateRange") to 10974 // unconditionally include in API requests. By default, fields with 10975 // empty or default values are omitted from API requests. However, any 10976 // non-pointer, non-interface field appearing in ForceSendFields will be 10977 // sent to the server regardless of whether the field is empty or not. 10978 // This may be used to include empty fields in Patch requests. 10979 ForceSendFields []string `json:"-"` 10980 10981 // NullFields is a list of field names (e.g. "DateRange") to include in 10982 // API requests with the JSON null value. By default, fields with empty 10983 // values are omitted from API requests. However, any field with an 10984 // empty value appearing in NullFields will be sent to the server as 10985 // null. It is an error if a field in this list has a non-empty value. 10986 // This may be used to include null fields in Patch requests. 10987 NullFields []string `json:"-"` 10988 } 10989 10990 func (s *LineItemFlight) MarshalJSON() ([]byte, error) { 10991 type NoMethod LineItemFlight 10992 raw := NoMethod(*s) 10993 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10994 } 10995 10996 // ListAdvertiserAssignedTargetingOptionsResponse: Response message for 10997 // ListAdvertiserAssignedTargetingOptions. 10998 type ListAdvertiserAssignedTargetingOptionsResponse struct { 10999 // AssignedTargetingOptions: The list of assigned targeting options. 11000 // This list will be absent if empty. 11001 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 11002 11003 // NextPageToken: A token identifying the next page of results. This 11004 // value should be specified as the pageToken in a subsequent 11005 // ListAdvertiserAssignedTargetingOptionsRequest to fetch the next page 11006 // of results. This token will be absent if there are no more 11007 // assigned_targeting_options to return. 11008 NextPageToken string `json:"nextPageToken,omitempty"` 11009 11010 // ServerResponse contains the HTTP response code and headers from the 11011 // server. 11012 googleapi.ServerResponse `json:"-"` 11013 11014 // ForceSendFields is a list of field names (e.g. 11015 // "AssignedTargetingOptions") to unconditionally include in API 11016 // requests. By default, fields with empty or default values are omitted 11017 // from API requests. However, any non-pointer, non-interface field 11018 // appearing in ForceSendFields will be sent to the server regardless of 11019 // whether the field is empty or not. This may be used to include empty 11020 // fields in Patch requests. 11021 ForceSendFields []string `json:"-"` 11022 11023 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 11024 // to include in API requests with the JSON null value. By default, 11025 // fields with empty values are omitted from API requests. However, any 11026 // field with an empty value appearing in NullFields will be sent to the 11027 // server as null. It is an error if a field in this list has a 11028 // non-empty value. This may be used to include null fields in Patch 11029 // requests. 11030 NullFields []string `json:"-"` 11031 } 11032 11033 func (s *ListAdvertiserAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 11034 type NoMethod ListAdvertiserAssignedTargetingOptionsResponse 11035 raw := NoMethod(*s) 11036 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11037 } 11038 11039 type ListAdvertisersResponse struct { 11040 // Advertisers: The list of advertisers. This list will be absent if 11041 // empty. 11042 Advertisers []*Advertiser `json:"advertisers,omitempty"` 11043 11044 // NextPageToken: A token to retrieve the next page of results. Pass 11045 // this value in the page_token field in the subsequent call to 11046 // `ListAdvertisers` method to retrieve the next page of results. 11047 NextPageToken string `json:"nextPageToken,omitempty"` 11048 11049 // ServerResponse contains the HTTP response code and headers from the 11050 // server. 11051 googleapi.ServerResponse `json:"-"` 11052 11053 // ForceSendFields is a list of field names (e.g. "Advertisers") to 11054 // unconditionally include in API requests. By default, fields with 11055 // empty or default values are omitted from API requests. However, any 11056 // non-pointer, non-interface field appearing in ForceSendFields will be 11057 // sent to the server regardless of whether the field is empty or not. 11058 // This may be used to include empty fields in Patch requests. 11059 ForceSendFields []string `json:"-"` 11060 11061 // NullFields is a list of field names (e.g. "Advertisers") to include 11062 // in API requests with the JSON null value. By default, fields with 11063 // empty values are omitted from API requests. However, any field with 11064 // an empty value appearing in NullFields will be sent to the server as 11065 // null. It is an error if a field in this list has a non-empty value. 11066 // This may be used to include null fields in Patch requests. 11067 NullFields []string `json:"-"` 11068 } 11069 11070 func (s *ListAdvertisersResponse) MarshalJSON() ([]byte, error) { 11071 type NoMethod ListAdvertisersResponse 11072 raw := NoMethod(*s) 11073 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11074 } 11075 11076 // ListAssignedInventorySourcesResponse: Response message for 11077 // AssignedInventorySourceService.ListAssignedInventorySources. 11078 type ListAssignedInventorySourcesResponse struct { 11079 // AssignedInventorySources: The list of assigned inventory sources. 11080 // This list will be absent if empty. 11081 AssignedInventorySources []*AssignedInventorySource `json:"assignedInventorySources,omitempty"` 11082 11083 // NextPageToken: A token to retrieve the next page of results. Pass 11084 // this value in the page_token field in the subsequent call to 11085 // `ListAssignedInventorySources` method to retrieve the next page of 11086 // results. 11087 NextPageToken string `json:"nextPageToken,omitempty"` 11088 11089 // ServerResponse contains the HTTP response code and headers from the 11090 // server. 11091 googleapi.ServerResponse `json:"-"` 11092 11093 // ForceSendFields is a list of field names (e.g. 11094 // "AssignedInventorySources") to unconditionally include in API 11095 // requests. By default, fields with empty or default values are omitted 11096 // from API requests. However, any non-pointer, non-interface field 11097 // appearing in ForceSendFields will be sent to the server regardless of 11098 // whether the field is empty or not. This may be used to include empty 11099 // fields in Patch requests. 11100 ForceSendFields []string `json:"-"` 11101 11102 // NullFields is a list of field names (e.g. "AssignedInventorySources") 11103 // to include in API requests with the JSON null value. By default, 11104 // fields with empty values are omitted from API requests. However, any 11105 // field with an empty value appearing in NullFields will be sent to the 11106 // server as null. It is an error if a field in this list has a 11107 // non-empty value. This may be used to include null fields in Patch 11108 // requests. 11109 NullFields []string `json:"-"` 11110 } 11111 11112 func (s *ListAssignedInventorySourcesResponse) MarshalJSON() ([]byte, error) { 11113 type NoMethod ListAssignedInventorySourcesResponse 11114 raw := NoMethod(*s) 11115 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11116 } 11117 11118 // ListAssignedLocationsResponse: Response message for 11119 // AssignedLocationService.ListAssignedLocations. 11120 type ListAssignedLocationsResponse struct { 11121 // AssignedLocations: The list of assigned locations. This list will be 11122 // absent if empty. 11123 AssignedLocations []*AssignedLocation `json:"assignedLocations,omitempty"` 11124 11125 // NextPageToken: A token to retrieve the next page of results. Pass 11126 // this value in the page_token field in the subsequent call to 11127 // `ListAssignedLocations` method to retrieve the next page of results. 11128 NextPageToken string `json:"nextPageToken,omitempty"` 11129 11130 // ServerResponse contains the HTTP response code and headers from the 11131 // server. 11132 googleapi.ServerResponse `json:"-"` 11133 11134 // ForceSendFields is a list of field names (e.g. "AssignedLocations") 11135 // to unconditionally include in API requests. By default, fields with 11136 // empty or default values are omitted from API requests. However, any 11137 // non-pointer, non-interface field appearing in ForceSendFields will be 11138 // sent to the server regardless of whether the field is empty or not. 11139 // This may be used to include empty fields in Patch requests. 11140 ForceSendFields []string `json:"-"` 11141 11142 // NullFields is a list of field names (e.g. "AssignedLocations") to 11143 // include in API requests with the JSON null value. By default, fields 11144 // with empty values are omitted from API requests. However, any field 11145 // with an empty value appearing in NullFields will be sent to the 11146 // server as null. It is an error if a field in this list has a 11147 // non-empty value. This may be used to include null fields in Patch 11148 // requests. 11149 NullFields []string `json:"-"` 11150 } 11151 11152 func (s *ListAssignedLocationsResponse) MarshalJSON() ([]byte, error) { 11153 type NoMethod ListAssignedLocationsResponse 11154 raw := NoMethod(*s) 11155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11156 } 11157 11158 // ListCampaignAssignedTargetingOptionsResponse: Response message for 11159 // ListCampaignAssignedTargetingOptions. 11160 type ListCampaignAssignedTargetingOptionsResponse struct { 11161 // AssignedTargetingOptions: The list of assigned targeting options. 11162 // This list will be absent if empty. 11163 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 11164 11165 // NextPageToken: A token identifying the next page of results. This 11166 // value should be specified as the pageToken in a subsequent 11167 // ListCampaignAssignedTargetingOptionsRequest to fetch the next page of 11168 // results. This token will be absent if there are no more 11169 // assigned_targeting_options to return. 11170 NextPageToken string `json:"nextPageToken,omitempty"` 11171 11172 // ServerResponse contains the HTTP response code and headers from the 11173 // server. 11174 googleapi.ServerResponse `json:"-"` 11175 11176 // ForceSendFields is a list of field names (e.g. 11177 // "AssignedTargetingOptions") to unconditionally include in API 11178 // requests. By default, fields with empty or default values are omitted 11179 // from API requests. However, any non-pointer, non-interface field 11180 // appearing in ForceSendFields will be sent to the server regardless of 11181 // whether the field is empty or not. This may be used to include empty 11182 // fields in Patch requests. 11183 ForceSendFields []string `json:"-"` 11184 11185 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 11186 // to include in API requests with the JSON null value. By default, 11187 // fields with empty values are omitted from API requests. However, any 11188 // field with an empty value appearing in NullFields will be sent to the 11189 // server as null. It is an error if a field in this list has a 11190 // non-empty value. This may be used to include null fields in Patch 11191 // requests. 11192 NullFields []string `json:"-"` 11193 } 11194 11195 func (s *ListCampaignAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 11196 type NoMethod ListCampaignAssignedTargetingOptionsResponse 11197 raw := NoMethod(*s) 11198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11199 } 11200 11201 type ListCampaignsResponse struct { 11202 // Campaigns: The list of campaigns. This list will be absent if empty. 11203 Campaigns []*Campaign `json:"campaigns,omitempty"` 11204 11205 // NextPageToken: A token to retrieve the next page of results. Pass 11206 // this value in the page_token field in the subsequent call to 11207 // `ListCampaigns` method to retrieve the next page of results. 11208 NextPageToken string `json:"nextPageToken,omitempty"` 11209 11210 // ServerResponse contains the HTTP response code and headers from the 11211 // server. 11212 googleapi.ServerResponse `json:"-"` 11213 11214 // ForceSendFields is a list of field names (e.g. "Campaigns") to 11215 // unconditionally include in API requests. By default, fields with 11216 // empty or default values are omitted from API requests. However, any 11217 // non-pointer, non-interface field appearing in ForceSendFields will be 11218 // sent to the server regardless of whether the field is empty or not. 11219 // This may be used to include empty fields in Patch requests. 11220 ForceSendFields []string `json:"-"` 11221 11222 // NullFields is a list of field names (e.g. "Campaigns") to include in 11223 // API requests with the JSON null value. By default, fields with empty 11224 // values are omitted from API requests. However, any field with an 11225 // empty value appearing in NullFields will be sent to the server as 11226 // null. It is an error if a field in this list has a non-empty value. 11227 // This may be used to include null fields in Patch requests. 11228 NullFields []string `json:"-"` 11229 } 11230 11231 func (s *ListCampaignsResponse) MarshalJSON() ([]byte, error) { 11232 type NoMethod ListCampaignsResponse 11233 raw := NoMethod(*s) 11234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11235 } 11236 11237 type ListChannelsResponse struct { 11238 // Channels: The list of channels. This list will be absent if empty. 11239 Channels []*Channel `json:"channels,omitempty"` 11240 11241 // NextPageToken: A token to retrieve the next page of results. Pass 11242 // this value in the page_token field in the subsequent call to 11243 // `ListChannels` method to retrieve the next page of results. 11244 NextPageToken string `json:"nextPageToken,omitempty"` 11245 11246 // ServerResponse contains the HTTP response code and headers from the 11247 // server. 11248 googleapi.ServerResponse `json:"-"` 11249 11250 // ForceSendFields is a list of field names (e.g. "Channels") to 11251 // unconditionally include in API requests. By default, fields with 11252 // empty or default values are omitted from API requests. However, any 11253 // non-pointer, non-interface field appearing in ForceSendFields will be 11254 // sent to the server regardless of whether the field is empty or not. 11255 // This may be used to include empty fields in Patch requests. 11256 ForceSendFields []string `json:"-"` 11257 11258 // NullFields is a list of field names (e.g. "Channels") to include in 11259 // API requests with the JSON null value. By default, fields with empty 11260 // values are omitted from API requests. However, any field with an 11261 // empty value appearing in NullFields will be sent to the server as 11262 // null. It is an error if a field in this list has a non-empty value. 11263 // This may be used to include null fields in Patch requests. 11264 NullFields []string `json:"-"` 11265 } 11266 11267 func (s *ListChannelsResponse) MarshalJSON() ([]byte, error) { 11268 type NoMethod ListChannelsResponse 11269 raw := NoMethod(*s) 11270 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11271 } 11272 11273 type ListCombinedAudiencesResponse struct { 11274 // CombinedAudiences: The list of combined audiences. This list will be 11275 // absent if empty. 11276 CombinedAudiences []*CombinedAudience `json:"combinedAudiences,omitempty"` 11277 11278 // NextPageToken: A token to retrieve the next page of results. Pass 11279 // this value in the page_token field in the subsequent call to 11280 // `ListCombinedAudiences` method to retrieve the next page of results. 11281 NextPageToken string `json:"nextPageToken,omitempty"` 11282 11283 // ServerResponse contains the HTTP response code and headers from the 11284 // server. 11285 googleapi.ServerResponse `json:"-"` 11286 11287 // ForceSendFields is a list of field names (e.g. "CombinedAudiences") 11288 // to unconditionally include in API requests. By default, fields with 11289 // empty or default values are omitted from API requests. However, any 11290 // non-pointer, non-interface field appearing in ForceSendFields will be 11291 // sent to the server regardless of whether the field is empty or not. 11292 // This may be used to include empty fields in Patch requests. 11293 ForceSendFields []string `json:"-"` 11294 11295 // NullFields is a list of field names (e.g. "CombinedAudiences") to 11296 // include in API requests with the JSON null value. By default, fields 11297 // with empty values are omitted from API requests. However, any field 11298 // with an empty value appearing in NullFields will be sent to the 11299 // server as null. It is an error if a field in this list has a 11300 // non-empty value. This may be used to include null fields in Patch 11301 // requests. 11302 NullFields []string `json:"-"` 11303 } 11304 11305 func (s *ListCombinedAudiencesResponse) MarshalJSON() ([]byte, error) { 11306 type NoMethod ListCombinedAudiencesResponse 11307 raw := NoMethod(*s) 11308 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11309 } 11310 11311 type ListCreativesResponse struct { 11312 // Creatives: The list of creatives. This list will be absent if empty. 11313 Creatives []*Creative `json:"creatives,omitempty"` 11314 11315 // NextPageToken: A token to retrieve the next page of results. Pass 11316 // this value in the page_token field in the subsequent call to 11317 // `ListCreativesRequest` method to retrieve the next page of results. 11318 // If this field is null, it means this is the last page. 11319 NextPageToken string `json:"nextPageToken,omitempty"` 11320 11321 // ServerResponse contains the HTTP response code and headers from the 11322 // server. 11323 googleapi.ServerResponse `json:"-"` 11324 11325 // ForceSendFields is a list of field names (e.g. "Creatives") to 11326 // unconditionally include in API requests. By default, fields with 11327 // empty or default values are omitted from API requests. However, any 11328 // non-pointer, non-interface field appearing in ForceSendFields will be 11329 // sent to the server regardless of whether the field is empty or not. 11330 // This may be used to include empty fields in Patch requests. 11331 ForceSendFields []string `json:"-"` 11332 11333 // NullFields is a list of field names (e.g. "Creatives") to include in 11334 // API requests with the JSON null value. By default, fields with empty 11335 // values are omitted from API requests. However, any field with an 11336 // empty value appearing in NullFields will be sent to the server as 11337 // null. It is an error if a field in this list has a non-empty value. 11338 // This may be used to include null fields in Patch requests. 11339 NullFields []string `json:"-"` 11340 } 11341 11342 func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) { 11343 type NoMethod ListCreativesResponse 11344 raw := NoMethod(*s) 11345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11346 } 11347 11348 type ListCustomBiddingAlgorithmsResponse struct { 11349 // CustomBiddingAlgorithms: The list of custom bidding algorithms. This 11350 // list will be absent if empty. 11351 CustomBiddingAlgorithms []*CustomBiddingAlgorithm `json:"customBiddingAlgorithms,omitempty"` 11352 11353 // NextPageToken: A token to retrieve the next page of results. Pass 11354 // this value in the page_token field in the subsequent call to 11355 // `ListCustomBiddingAlgorithmsRequest` method to retrieve the next page 11356 // of results. If this field is null, it means this is the last page. 11357 NextPageToken string `json:"nextPageToken,omitempty"` 11358 11359 // ServerResponse contains the HTTP response code and headers from the 11360 // server. 11361 googleapi.ServerResponse `json:"-"` 11362 11363 // ForceSendFields is a list of field names (e.g. 11364 // "CustomBiddingAlgorithms") to unconditionally include in API 11365 // requests. By default, fields with empty or default values are omitted 11366 // from API requests. However, any non-pointer, non-interface field 11367 // appearing in ForceSendFields will be sent to the server regardless of 11368 // whether the field is empty or not. This may be used to include empty 11369 // fields in Patch requests. 11370 ForceSendFields []string `json:"-"` 11371 11372 // NullFields is a list of field names (e.g. "CustomBiddingAlgorithms") 11373 // to include in API requests with the JSON null value. By default, 11374 // fields with empty values are omitted from API requests. However, any 11375 // field with an empty value appearing in NullFields will be sent to the 11376 // server as null. It is an error if a field in this list has a 11377 // non-empty value. This may be used to include null fields in Patch 11378 // requests. 11379 NullFields []string `json:"-"` 11380 } 11381 11382 func (s *ListCustomBiddingAlgorithmsResponse) MarshalJSON() ([]byte, error) { 11383 type NoMethod ListCustomBiddingAlgorithmsResponse 11384 raw := NoMethod(*s) 11385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11386 } 11387 11388 type ListCustomBiddingScriptsResponse struct { 11389 // CustomBiddingScripts: The list of custom bidding scripts. This list 11390 // will be absent if empty. 11391 CustomBiddingScripts []*CustomBiddingScript `json:"customBiddingScripts,omitempty"` 11392 11393 // NextPageToken: A token to retrieve the next page of results. Pass 11394 // this value in the page_token field in the subsequent call to 11395 // `ListCustomBiddingScriptsRequest` method to retrieve the next page of 11396 // results. If this field is null, it means this is the last page. 11397 NextPageToken string `json:"nextPageToken,omitempty"` 11398 11399 // ServerResponse contains the HTTP response code and headers from the 11400 // server. 11401 googleapi.ServerResponse `json:"-"` 11402 11403 // ForceSendFields is a list of field names (e.g. 11404 // "CustomBiddingScripts") to unconditionally include in API requests. 11405 // By default, fields with empty or default values are omitted from API 11406 // requests. However, any non-pointer, non-interface field appearing in 11407 // ForceSendFields will be sent to the server regardless of whether the 11408 // field is empty or not. This may be used to include empty fields in 11409 // Patch requests. 11410 ForceSendFields []string `json:"-"` 11411 11412 // NullFields is a list of field names (e.g. "CustomBiddingScripts") to 11413 // include in API requests with the JSON null value. By default, fields 11414 // with empty values are omitted from API requests. However, any field 11415 // with an empty value appearing in NullFields will be sent to the 11416 // server as null. It is an error if a field in this list has a 11417 // non-empty value. This may be used to include null fields in Patch 11418 // requests. 11419 NullFields []string `json:"-"` 11420 } 11421 11422 func (s *ListCustomBiddingScriptsResponse) MarshalJSON() ([]byte, error) { 11423 type NoMethod ListCustomBiddingScriptsResponse 11424 raw := NoMethod(*s) 11425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11426 } 11427 11428 type ListCustomListsResponse struct { 11429 // CustomLists: The list of custom lists. This list will be absent if 11430 // empty. 11431 CustomLists []*CustomList `json:"customLists,omitempty"` 11432 11433 // NextPageToken: A token to retrieve the next page of results. Pass 11434 // this value in the page_token field in the subsequent call to 11435 // `ListCustomLists` method to retrieve the next page of results. 11436 NextPageToken string `json:"nextPageToken,omitempty"` 11437 11438 // ServerResponse contains the HTTP response code and headers from the 11439 // server. 11440 googleapi.ServerResponse `json:"-"` 11441 11442 // ForceSendFields is a list of field names (e.g. "CustomLists") to 11443 // unconditionally include in API requests. By default, fields with 11444 // empty or default values are omitted from API requests. However, any 11445 // non-pointer, non-interface field appearing in ForceSendFields will be 11446 // sent to the server regardless of whether the field is empty or not. 11447 // This may be used to include empty fields in Patch requests. 11448 ForceSendFields []string `json:"-"` 11449 11450 // NullFields is a list of field names (e.g. "CustomLists") to include 11451 // in API requests with the JSON null value. By default, fields with 11452 // empty values are omitted from API requests. However, any field with 11453 // an empty value appearing in NullFields will be sent to the server as 11454 // null. It is an error if a field in this list has a non-empty value. 11455 // This may be used to include null fields in Patch requests. 11456 NullFields []string `json:"-"` 11457 } 11458 11459 func (s *ListCustomListsResponse) MarshalJSON() ([]byte, error) { 11460 type NoMethod ListCustomListsResponse 11461 raw := NoMethod(*s) 11462 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11463 } 11464 11465 type ListFirstAndThirdPartyAudiencesResponse struct { 11466 // FirstAndThirdPartyAudiences: The list of first and third party 11467 // audiences. Audience size properties will not be included. This list 11468 // will be absent if empty. 11469 FirstAndThirdPartyAudiences []*FirstAndThirdPartyAudience `json:"firstAndThirdPartyAudiences,omitempty"` 11470 11471 // NextPageToken: A token to retrieve the next page of results. Pass 11472 // this value in the page_token field in the subsequent call to 11473 // `ListFirstAndThirdPartyAudiences` method to retrieve the next page of 11474 // results. 11475 NextPageToken string `json:"nextPageToken,omitempty"` 11476 11477 // ServerResponse contains the HTTP response code and headers from the 11478 // server. 11479 googleapi.ServerResponse `json:"-"` 11480 11481 // ForceSendFields is a list of field names (e.g. 11482 // "FirstAndThirdPartyAudiences") to unconditionally include in API 11483 // requests. By default, fields with empty or default values are omitted 11484 // from API requests. However, any non-pointer, non-interface field 11485 // appearing in ForceSendFields will be sent to the server regardless of 11486 // whether the field is empty or not. This may be used to include empty 11487 // fields in Patch requests. 11488 ForceSendFields []string `json:"-"` 11489 11490 // NullFields is a list of field names (e.g. 11491 // "FirstAndThirdPartyAudiences") to include in API requests with the 11492 // JSON null value. By default, fields with empty values are omitted 11493 // from API requests. However, any field with an empty value appearing 11494 // in NullFields will be sent to the server as null. It is an error if a 11495 // field in this list has a non-empty value. This may be used to include 11496 // null fields in Patch requests. 11497 NullFields []string `json:"-"` 11498 } 11499 11500 func (s *ListFirstAndThirdPartyAudiencesResponse) MarshalJSON() ([]byte, error) { 11501 type NoMethod ListFirstAndThirdPartyAudiencesResponse 11502 raw := NoMethod(*s) 11503 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11504 } 11505 11506 type ListGoogleAudiencesResponse struct { 11507 // GoogleAudiences: The list of Google audiences. This list will be 11508 // absent if empty. 11509 GoogleAudiences []*GoogleAudience `json:"googleAudiences,omitempty"` 11510 11511 // NextPageToken: A token to retrieve the next page of results. Pass 11512 // this value in the page_token field in the subsequent call to 11513 // `ListGoogleAudiences` method to retrieve the next page of results. 11514 NextPageToken string `json:"nextPageToken,omitempty"` 11515 11516 // ServerResponse contains the HTTP response code and headers from the 11517 // server. 11518 googleapi.ServerResponse `json:"-"` 11519 11520 // ForceSendFields is a list of field names (e.g. "GoogleAudiences") to 11521 // unconditionally include in API requests. By default, fields with 11522 // empty or default values are omitted from API requests. However, any 11523 // non-pointer, non-interface field appearing in ForceSendFields will be 11524 // sent to the server regardless of whether the field is empty or not. 11525 // This may be used to include empty fields in Patch requests. 11526 ForceSendFields []string `json:"-"` 11527 11528 // NullFields is a list of field names (e.g. "GoogleAudiences") to 11529 // include in API requests with the JSON null value. By default, fields 11530 // with empty values are omitted from API requests. However, any field 11531 // with an empty value appearing in NullFields will be sent to the 11532 // server as null. It is an error if a field in this list has a 11533 // non-empty value. This may be used to include null fields in Patch 11534 // requests. 11535 NullFields []string `json:"-"` 11536 } 11537 11538 func (s *ListGoogleAudiencesResponse) MarshalJSON() ([]byte, error) { 11539 type NoMethod ListGoogleAudiencesResponse 11540 raw := NoMethod(*s) 11541 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11542 } 11543 11544 type ListGuaranteedOrdersResponse struct { 11545 // GuaranteedOrders: The list of guaranteed orders. This list will be 11546 // absent if empty. 11547 GuaranteedOrders []*GuaranteedOrder `json:"guaranteedOrders,omitempty"` 11548 11549 // NextPageToken: A token to retrieve the next page of results. Pass 11550 // this value in the page_token field in the subsequent call to 11551 // `ListGuaranteedOrders` method to retrieve the next page of results. 11552 NextPageToken string `json:"nextPageToken,omitempty"` 11553 11554 // ServerResponse contains the HTTP response code and headers from the 11555 // server. 11556 googleapi.ServerResponse `json:"-"` 11557 11558 // ForceSendFields is a list of field names (e.g. "GuaranteedOrders") to 11559 // unconditionally include in API requests. By default, fields with 11560 // empty or default values are omitted from API requests. However, any 11561 // non-pointer, non-interface field appearing in ForceSendFields will be 11562 // sent to the server regardless of whether the field is empty or not. 11563 // This may be used to include empty fields in Patch requests. 11564 ForceSendFields []string `json:"-"` 11565 11566 // NullFields is a list of field names (e.g. "GuaranteedOrders") to 11567 // include in API requests with the JSON null value. By default, fields 11568 // with empty values are omitted from API requests. However, any field 11569 // with an empty value appearing in NullFields will be sent to the 11570 // server as null. It is an error if a field in this list has a 11571 // non-empty value. This may be used to include null fields in Patch 11572 // requests. 11573 NullFields []string `json:"-"` 11574 } 11575 11576 func (s *ListGuaranteedOrdersResponse) MarshalJSON() ([]byte, error) { 11577 type NoMethod ListGuaranteedOrdersResponse 11578 raw := NoMethod(*s) 11579 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11580 } 11581 11582 type ListInsertionOrderAssignedTargetingOptionsResponse struct { 11583 // AssignedTargetingOptions: The list of assigned targeting options. 11584 // This list will be absent if empty. 11585 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 11586 11587 // NextPageToken: A token identifying the next page of results. This 11588 // value should be specified as the pageToken in a subsequent 11589 // ListInsertionOrderAssignedTargetingOptionsRequest to fetch the next 11590 // page of results. This token will be absent if there are no more 11591 // assigned_targeting_options to return. 11592 NextPageToken string `json:"nextPageToken,omitempty"` 11593 11594 // ServerResponse contains the HTTP response code and headers from the 11595 // server. 11596 googleapi.ServerResponse `json:"-"` 11597 11598 // ForceSendFields is a list of field names (e.g. 11599 // "AssignedTargetingOptions") to unconditionally include in API 11600 // requests. By default, fields with empty or default values are omitted 11601 // from API requests. However, any non-pointer, non-interface field 11602 // appearing in ForceSendFields will be sent to the server regardless of 11603 // whether the field is empty or not. This may be used to include empty 11604 // fields in Patch requests. 11605 ForceSendFields []string `json:"-"` 11606 11607 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 11608 // to include in API requests with the JSON null value. By default, 11609 // fields with empty values are omitted from API requests. However, any 11610 // field with an empty value appearing in NullFields will be sent to the 11611 // server as null. It is an error if a field in this list has a 11612 // non-empty value. This may be used to include null fields in Patch 11613 // requests. 11614 NullFields []string `json:"-"` 11615 } 11616 11617 func (s *ListInsertionOrderAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 11618 type NoMethod ListInsertionOrderAssignedTargetingOptionsResponse 11619 raw := NoMethod(*s) 11620 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11621 } 11622 11623 type ListInsertionOrdersResponse struct { 11624 // InsertionOrders: The list of insertion orders. This list will be 11625 // absent if empty. 11626 InsertionOrders []*InsertionOrder `json:"insertionOrders,omitempty"` 11627 11628 // NextPageToken: A token to retrieve the next page of results. Pass 11629 // this value in the page_token field in the subsequent call to 11630 // `ListInsertionOrders` method to retrieve the next page of results. 11631 NextPageToken string `json:"nextPageToken,omitempty"` 11632 11633 // ServerResponse contains the HTTP response code and headers from the 11634 // server. 11635 googleapi.ServerResponse `json:"-"` 11636 11637 // ForceSendFields is a list of field names (e.g. "InsertionOrders") to 11638 // unconditionally include in API requests. By default, fields with 11639 // empty or default values are omitted from API requests. However, any 11640 // non-pointer, non-interface field appearing in ForceSendFields will be 11641 // sent to the server regardless of whether the field is empty or not. 11642 // This may be used to include empty fields in Patch requests. 11643 ForceSendFields []string `json:"-"` 11644 11645 // NullFields is a list of field names (e.g. "InsertionOrders") to 11646 // include in API requests with the JSON null value. By default, fields 11647 // with empty values are omitted from API requests. However, any field 11648 // with an empty value appearing in NullFields will be sent to the 11649 // server as null. It is an error if a field in this list has a 11650 // non-empty value. This may be used to include null fields in Patch 11651 // requests. 11652 NullFields []string `json:"-"` 11653 } 11654 11655 func (s *ListInsertionOrdersResponse) MarshalJSON() ([]byte, error) { 11656 type NoMethod ListInsertionOrdersResponse 11657 raw := NoMethod(*s) 11658 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11659 } 11660 11661 // ListInventorySourceGroupsResponse: Response message for 11662 // InventorySourceGroupService.ListInventorySourceGroups. 11663 type ListInventorySourceGroupsResponse struct { 11664 // InventorySourceGroups: The list of inventory source groups. This list 11665 // will be absent if empty. 11666 InventorySourceGroups []*InventorySourceGroup `json:"inventorySourceGroups,omitempty"` 11667 11668 // NextPageToken: A token to retrieve the next page of results. Pass 11669 // this value in the page_token field in the subsequent call to 11670 // `ListInventorySourceGroups` method to retrieve the next page of 11671 // results. 11672 NextPageToken string `json:"nextPageToken,omitempty"` 11673 11674 // ServerResponse contains the HTTP response code and headers from the 11675 // server. 11676 googleapi.ServerResponse `json:"-"` 11677 11678 // ForceSendFields is a list of field names (e.g. 11679 // "InventorySourceGroups") to unconditionally include in API requests. 11680 // By default, fields with empty or default values are omitted from API 11681 // requests. However, any non-pointer, non-interface field appearing in 11682 // ForceSendFields will be sent to the server regardless of whether the 11683 // field is empty or not. This may be used to include empty fields in 11684 // Patch requests. 11685 ForceSendFields []string `json:"-"` 11686 11687 // NullFields is a list of field names (e.g. "InventorySourceGroups") to 11688 // include in API requests with the JSON null value. By default, fields 11689 // with empty values are omitted from API requests. However, any field 11690 // with an empty value appearing in NullFields will be sent to the 11691 // server as null. It is an error if a field in this list has a 11692 // non-empty value. This may be used to include null fields in Patch 11693 // requests. 11694 NullFields []string `json:"-"` 11695 } 11696 11697 func (s *ListInventorySourceGroupsResponse) MarshalJSON() ([]byte, error) { 11698 type NoMethod ListInventorySourceGroupsResponse 11699 raw := NoMethod(*s) 11700 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11701 } 11702 11703 type ListInventorySourcesResponse struct { 11704 // InventorySources: The list of inventory sources. This list will be 11705 // absent if empty. 11706 InventorySources []*InventorySource `json:"inventorySources,omitempty"` 11707 11708 // NextPageToken: A token to retrieve the next page of results. Pass 11709 // this value in the page_token field in the subsequent call to 11710 // `ListInventorySources` method to retrieve the next page of results. 11711 NextPageToken string `json:"nextPageToken,omitempty"` 11712 11713 // ServerResponse contains the HTTP response code and headers from the 11714 // server. 11715 googleapi.ServerResponse `json:"-"` 11716 11717 // ForceSendFields is a list of field names (e.g. "InventorySources") to 11718 // unconditionally include in API requests. By default, fields with 11719 // empty or default values are omitted from API requests. However, any 11720 // non-pointer, non-interface field appearing in ForceSendFields will be 11721 // sent to the server regardless of whether the field is empty or not. 11722 // This may be used to include empty fields in Patch requests. 11723 ForceSendFields []string `json:"-"` 11724 11725 // NullFields is a list of field names (e.g. "InventorySources") to 11726 // include in API requests with the JSON null value. By default, fields 11727 // with empty values are omitted from API requests. However, any field 11728 // with an empty value appearing in NullFields will be sent to the 11729 // server as null. It is an error if a field in this list has a 11730 // non-empty value. This may be used to include null fields in Patch 11731 // requests. 11732 NullFields []string `json:"-"` 11733 } 11734 11735 func (s *ListInventorySourcesResponse) MarshalJSON() ([]byte, error) { 11736 type NoMethod ListInventorySourcesResponse 11737 raw := NoMethod(*s) 11738 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11739 } 11740 11741 type ListInvoicesResponse struct { 11742 // Invoices: The list of invoices. This list will be absent if empty. 11743 Invoices []*Invoice `json:"invoices,omitempty"` 11744 11745 // NextPageToken: A token to retrieve the next page of results. Pass 11746 // this value in the page_token field in the subsequent call to 11747 // `ListInvoices` method to retrieve the next page of results. This 11748 // token will be absent if there are no more invoices to return. 11749 NextPageToken string `json:"nextPageToken,omitempty"` 11750 11751 // ServerResponse contains the HTTP response code and headers from the 11752 // server. 11753 googleapi.ServerResponse `json:"-"` 11754 11755 // ForceSendFields is a list of field names (e.g. "Invoices") to 11756 // unconditionally include in API requests. By default, fields with 11757 // empty or default values are omitted from API requests. However, any 11758 // non-pointer, non-interface field appearing in ForceSendFields will be 11759 // sent to the server regardless of whether the field is empty or not. 11760 // This may be used to include empty fields in Patch requests. 11761 ForceSendFields []string `json:"-"` 11762 11763 // NullFields is a list of field names (e.g. "Invoices") to include in 11764 // API requests with the JSON null value. By default, fields with empty 11765 // values are omitted from API requests. However, any field with an 11766 // empty value appearing in NullFields will be sent to the server as 11767 // null. It is an error if a field in this list has a non-empty value. 11768 // This may be used to include null fields in Patch requests. 11769 NullFields []string `json:"-"` 11770 } 11771 11772 func (s *ListInvoicesResponse) MarshalJSON() ([]byte, error) { 11773 type NoMethod ListInvoicesResponse 11774 raw := NoMethod(*s) 11775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11776 } 11777 11778 // ListLineItemAssignedTargetingOptionsResponse: Response message for 11779 // ListLineItemAssignedTargetingOptions. 11780 type ListLineItemAssignedTargetingOptionsResponse struct { 11781 // AssignedTargetingOptions: The list of assigned targeting options. 11782 // This list will be absent if empty. 11783 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 11784 11785 // NextPageToken: A token identifying the next page of results. This 11786 // value should be specified as the pageToken in a subsequent 11787 // ListLineItemAssignedTargetingOptionsRequest to fetch the next page of 11788 // results. This token will be absent if there are no more 11789 // assigned_targeting_options to return. 11790 NextPageToken string `json:"nextPageToken,omitempty"` 11791 11792 // ServerResponse contains the HTTP response code and headers from the 11793 // server. 11794 googleapi.ServerResponse `json:"-"` 11795 11796 // ForceSendFields is a list of field names (e.g. 11797 // "AssignedTargetingOptions") to unconditionally include in API 11798 // requests. By default, fields with empty or default values are omitted 11799 // from API requests. However, any non-pointer, non-interface field 11800 // appearing in ForceSendFields will be sent to the server regardless of 11801 // whether the field is empty or not. This may be used to include empty 11802 // fields in Patch requests. 11803 ForceSendFields []string `json:"-"` 11804 11805 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 11806 // to include in API requests with the JSON null value. By default, 11807 // fields with empty values are omitted from API requests. However, any 11808 // field with an empty value appearing in NullFields will be sent to the 11809 // server as null. It is an error if a field in this list has a 11810 // non-empty value. This may be used to include null fields in Patch 11811 // requests. 11812 NullFields []string `json:"-"` 11813 } 11814 11815 func (s *ListLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 11816 type NoMethod ListLineItemAssignedTargetingOptionsResponse 11817 raw := NoMethod(*s) 11818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11819 } 11820 11821 type ListLineItemsResponse struct { 11822 // LineItems: The list of line items. This list will be absent if empty. 11823 LineItems []*LineItem `json:"lineItems,omitempty"` 11824 11825 // NextPageToken: A token to retrieve the next page of results. Pass 11826 // this value in the page_token field in the subsequent call to 11827 // `ListLineItems` method to retrieve the next page of results. 11828 NextPageToken string `json:"nextPageToken,omitempty"` 11829 11830 // ServerResponse contains the HTTP response code and headers from the 11831 // server. 11832 googleapi.ServerResponse `json:"-"` 11833 11834 // ForceSendFields is a list of field names (e.g. "LineItems") to 11835 // unconditionally include in API requests. By default, fields with 11836 // empty or default values are omitted from API requests. However, any 11837 // non-pointer, non-interface field appearing in ForceSendFields will be 11838 // sent to the server regardless of whether the field is empty or not. 11839 // This may be used to include empty fields in Patch requests. 11840 ForceSendFields []string `json:"-"` 11841 11842 // NullFields is a list of field names (e.g. "LineItems") to include in 11843 // API requests with the JSON null value. By default, fields with empty 11844 // values are omitted from API requests. However, any field with an 11845 // empty value appearing in NullFields will be sent to the server as 11846 // null. It is an error if a field in this list has a non-empty value. 11847 // This may be used to include null fields in Patch requests. 11848 NullFields []string `json:"-"` 11849 } 11850 11851 func (s *ListLineItemsResponse) MarshalJSON() ([]byte, error) { 11852 type NoMethod ListLineItemsResponse 11853 raw := NoMethod(*s) 11854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11855 } 11856 11857 type ListLocationListsResponse struct { 11858 // LocationLists: The list of location lists. This list will be absent 11859 // if empty. 11860 LocationLists []*LocationList `json:"locationLists,omitempty"` 11861 11862 // NextPageToken: A token to retrieve the next page of results. Pass 11863 // this value in the page_token field in the subsequent call to 11864 // `ListLocationLists` method to retrieve the next page of results. 11865 NextPageToken string `json:"nextPageToken,omitempty"` 11866 11867 // ServerResponse contains the HTTP response code and headers from the 11868 // server. 11869 googleapi.ServerResponse `json:"-"` 11870 11871 // ForceSendFields is a list of field names (e.g. "LocationLists") to 11872 // unconditionally include in API requests. By default, fields with 11873 // empty or default values are omitted from API requests. However, any 11874 // non-pointer, non-interface field appearing in ForceSendFields will be 11875 // sent to the server regardless of whether the field is empty or not. 11876 // This may be used to include empty fields in Patch requests. 11877 ForceSendFields []string `json:"-"` 11878 11879 // NullFields is a list of field names (e.g. "LocationLists") to include 11880 // in API requests with the JSON null value. By default, fields with 11881 // empty values are omitted from API requests. However, any field with 11882 // an empty value appearing in NullFields will be sent to the server as 11883 // null. It is an error if a field in this list has a non-empty value. 11884 // This may be used to include null fields in Patch requests. 11885 NullFields []string `json:"-"` 11886 } 11887 11888 func (s *ListLocationListsResponse) MarshalJSON() ([]byte, error) { 11889 type NoMethod ListLocationListsResponse 11890 raw := NoMethod(*s) 11891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11892 } 11893 11894 type ListManualTriggersResponse struct { 11895 // ManualTriggers: The list of manual triggers. This list will be absent 11896 // if empty. 11897 ManualTriggers []*ManualTrigger `json:"manualTriggers,omitempty"` 11898 11899 // NextPageToken: A token to retrieve the next page of results. Pass 11900 // this value in the page_token field in the subsequent call to 11901 // `ListManualTriggers` method to retrieve the next page of results. 11902 NextPageToken string `json:"nextPageToken,omitempty"` 11903 11904 // ServerResponse contains the HTTP response code and headers from the 11905 // server. 11906 googleapi.ServerResponse `json:"-"` 11907 11908 // ForceSendFields is a list of field names (e.g. "ManualTriggers") to 11909 // unconditionally include in API requests. By default, fields with 11910 // empty or default values are omitted from API requests. However, any 11911 // non-pointer, non-interface field appearing in ForceSendFields will be 11912 // sent to the server regardless of whether the field is empty or not. 11913 // This may be used to include empty fields in Patch requests. 11914 ForceSendFields []string `json:"-"` 11915 11916 // NullFields is a list of field names (e.g. "ManualTriggers") to 11917 // include in API requests with the JSON null value. By default, fields 11918 // with empty values are omitted from API requests. However, any field 11919 // with an empty value appearing in NullFields will be sent to the 11920 // server as null. It is an error if a field in this list has a 11921 // non-empty value. This may be used to include null fields in Patch 11922 // requests. 11923 NullFields []string `json:"-"` 11924 } 11925 11926 func (s *ListManualTriggersResponse) MarshalJSON() ([]byte, error) { 11927 type NoMethod ListManualTriggersResponse 11928 raw := NoMethod(*s) 11929 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11930 } 11931 11932 // ListNegativeKeywordListsResponse: Response message for 11933 // NegativeKeywordListService.ListNegativeKeywordLists. 11934 type ListNegativeKeywordListsResponse struct { 11935 // NegativeKeywordLists: The list of negative keyword lists. This list 11936 // will be absent if empty. 11937 NegativeKeywordLists []*NegativeKeywordList `json:"negativeKeywordLists,omitempty"` 11938 11939 // NextPageToken: A token to retrieve the next page of results. Pass 11940 // this value in the page_token field in the subsequent call to 11941 // `ListNegativeKeywordLists` method to retrieve the next page of 11942 // results. 11943 NextPageToken string `json:"nextPageToken,omitempty"` 11944 11945 // ServerResponse contains the HTTP response code and headers from the 11946 // server. 11947 googleapi.ServerResponse `json:"-"` 11948 11949 // ForceSendFields is a list of field names (e.g. 11950 // "NegativeKeywordLists") to unconditionally include in API requests. 11951 // By default, fields with empty or default values are omitted from API 11952 // requests. However, any non-pointer, non-interface field appearing in 11953 // ForceSendFields will be sent to the server regardless of whether the 11954 // field is empty or not. This may be used to include empty fields in 11955 // Patch requests. 11956 ForceSendFields []string `json:"-"` 11957 11958 // NullFields is a list of field names (e.g. "NegativeKeywordLists") to 11959 // include in API requests with the JSON null value. By default, fields 11960 // with empty values are omitted from API requests. However, any field 11961 // with an empty value appearing in NullFields will be sent to the 11962 // server as null. It is an error if a field in this list has a 11963 // non-empty value. This may be used to include null fields in Patch 11964 // requests. 11965 NullFields []string `json:"-"` 11966 } 11967 11968 func (s *ListNegativeKeywordListsResponse) MarshalJSON() ([]byte, error) { 11969 type NoMethod ListNegativeKeywordListsResponse 11970 raw := NoMethod(*s) 11971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11972 } 11973 11974 // ListNegativeKeywordsResponse: Response message for 11975 // NegativeKeywordService.ListNegativeKeywords. 11976 type ListNegativeKeywordsResponse struct { 11977 // NegativeKeywords: The list of negative keywords. This list will be 11978 // absent if empty. 11979 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"` 11980 11981 // NextPageToken: A token to retrieve the next page of results. Pass 11982 // this value in the page_token field in the subsequent call to 11983 // `ListNegativeKeywords` method to retrieve the next page of results. 11984 NextPageToken string `json:"nextPageToken,omitempty"` 11985 11986 // ServerResponse contains the HTTP response code and headers from the 11987 // server. 11988 googleapi.ServerResponse `json:"-"` 11989 11990 // ForceSendFields is a list of field names (e.g. "NegativeKeywords") to 11991 // unconditionally include in API requests. By default, fields with 11992 // empty or default values are omitted from API requests. However, any 11993 // non-pointer, non-interface field appearing in ForceSendFields will be 11994 // sent to the server regardless of whether the field is empty or not. 11995 // This may be used to include empty fields in Patch requests. 11996 ForceSendFields []string `json:"-"` 11997 11998 // NullFields is a list of field names (e.g. "NegativeKeywords") to 11999 // include in API requests with the JSON null value. By default, fields 12000 // with empty values are omitted from API requests. However, any field 12001 // with an empty value appearing in NullFields will be sent to the 12002 // server as null. It is an error if a field in this list has a 12003 // non-empty value. This may be used to include null fields in Patch 12004 // requests. 12005 NullFields []string `json:"-"` 12006 } 12007 12008 func (s *ListNegativeKeywordsResponse) MarshalJSON() ([]byte, error) { 12009 type NoMethod ListNegativeKeywordsResponse 12010 raw := NoMethod(*s) 12011 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12012 } 12013 12014 type ListPartnerAssignedTargetingOptionsResponse struct { 12015 // AssignedTargetingOptions: The list of assigned targeting options. 12016 // This list will be absent if empty. 12017 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 12018 12019 // NextPageToken: A token identifying the next page of results. This 12020 // value should be specified as the pageToken in a subsequent 12021 // ListPartnerAssignedTargetingOptionsRequest to fetch the next page of 12022 // results. This token will be absent if there are no more 12023 // assigned_targeting_options to return. 12024 NextPageToken string `json:"nextPageToken,omitempty"` 12025 12026 // ServerResponse contains the HTTP response code and headers from the 12027 // server. 12028 googleapi.ServerResponse `json:"-"` 12029 12030 // ForceSendFields is a list of field names (e.g. 12031 // "AssignedTargetingOptions") to unconditionally include in API 12032 // requests. By default, fields with empty or default values are omitted 12033 // from API requests. However, any non-pointer, non-interface field 12034 // appearing in ForceSendFields will be sent to the server regardless of 12035 // whether the field is empty or not. This may be used to include empty 12036 // fields in Patch requests. 12037 ForceSendFields []string `json:"-"` 12038 12039 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 12040 // to include in API requests with the JSON null value. By default, 12041 // fields with empty values are omitted from API requests. However, any 12042 // field with an empty value appearing in NullFields will be sent to the 12043 // server as null. It is an error if a field in this list has a 12044 // non-empty value. This may be used to include null fields in Patch 12045 // requests. 12046 NullFields []string `json:"-"` 12047 } 12048 12049 func (s *ListPartnerAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 12050 type NoMethod ListPartnerAssignedTargetingOptionsResponse 12051 raw := NoMethod(*s) 12052 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12053 } 12054 12055 type ListPartnersResponse struct { 12056 // NextPageToken: A token to retrieve the next page of results. Pass 12057 // this value in the page_token field in the subsequent call to 12058 // `ListPartners` method to retrieve the next page of results. 12059 NextPageToken string `json:"nextPageToken,omitempty"` 12060 12061 // Partners: The list of partners. This list will be absent if empty. 12062 Partners []*Partner `json:"partners,omitempty"` 12063 12064 // ServerResponse contains the HTTP response code and headers from the 12065 // server. 12066 googleapi.ServerResponse `json:"-"` 12067 12068 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 12069 // unconditionally include in API requests. By default, fields with 12070 // empty or default values are omitted from API requests. However, any 12071 // non-pointer, non-interface field appearing in ForceSendFields will be 12072 // sent to the server regardless of whether the field is empty or not. 12073 // This may be used to include empty fields in Patch requests. 12074 ForceSendFields []string `json:"-"` 12075 12076 // NullFields is a list of field names (e.g. "NextPageToken") to include 12077 // in API requests with the JSON null value. By default, fields with 12078 // empty values are omitted from API requests. However, any field with 12079 // an empty value appearing in NullFields will be sent to the server as 12080 // null. It is an error if a field in this list has a non-empty value. 12081 // This may be used to include null fields in Patch requests. 12082 NullFields []string `json:"-"` 12083 } 12084 12085 func (s *ListPartnersResponse) MarshalJSON() ([]byte, error) { 12086 type NoMethod ListPartnersResponse 12087 raw := NoMethod(*s) 12088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12089 } 12090 12091 // ListSitesResponse: Response message for SiteService.ListSites. 12092 type ListSitesResponse struct { 12093 // NextPageToken: A token to retrieve the next page of results. Pass 12094 // this value in the page_token field in the subsequent call to 12095 // `ListSites` method to retrieve the next page of results. 12096 NextPageToken string `json:"nextPageToken,omitempty"` 12097 12098 // Sites: The list of sites. This list will be absent if empty. 12099 Sites []*Site `json:"sites,omitempty"` 12100 12101 // ServerResponse contains the HTTP response code and headers from the 12102 // server. 12103 googleapi.ServerResponse `json:"-"` 12104 12105 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 12106 // unconditionally include in API requests. By default, fields with 12107 // empty or default values are omitted from API requests. However, any 12108 // non-pointer, non-interface field appearing in ForceSendFields will be 12109 // sent to the server regardless of whether the field is empty or not. 12110 // This may be used to include empty fields in Patch requests. 12111 ForceSendFields []string `json:"-"` 12112 12113 // NullFields is a list of field names (e.g. "NextPageToken") to include 12114 // in API requests with the JSON null value. By default, fields with 12115 // empty values are omitted from API requests. However, any field with 12116 // an empty value appearing in NullFields will be sent to the server as 12117 // null. It is an error if a field in this list has a non-empty value. 12118 // This may be used to include null fields in Patch requests. 12119 NullFields []string `json:"-"` 12120 } 12121 12122 func (s *ListSitesResponse) MarshalJSON() ([]byte, error) { 12123 type NoMethod ListSitesResponse 12124 raw := NoMethod(*s) 12125 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12126 } 12127 12128 // ListTargetingOptionsResponse: Response message for 12129 // ListTargetingOptions. 12130 type ListTargetingOptionsResponse struct { 12131 // NextPageToken: A token to retrieve the next page of results. Pass 12132 // this value in the page_token field in the subsequent call to 12133 // `ListTargetingOptions` method to retrieve the next page of results. 12134 NextPageToken string `json:"nextPageToken,omitempty"` 12135 12136 // TargetingOptions: The list of targeting options. This list will be 12137 // absent if empty. 12138 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"` 12139 12140 // ServerResponse contains the HTTP response code and headers from the 12141 // server. 12142 googleapi.ServerResponse `json:"-"` 12143 12144 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 12145 // unconditionally include in API requests. By default, fields with 12146 // empty or default values are omitted from API requests. However, any 12147 // non-pointer, non-interface field appearing in ForceSendFields will be 12148 // sent to the server regardless of whether the field is empty or not. 12149 // This may be used to include empty fields in Patch requests. 12150 ForceSendFields []string `json:"-"` 12151 12152 // NullFields is a list of field names (e.g. "NextPageToken") to include 12153 // in API requests with the JSON null value. By default, fields with 12154 // empty values are omitted from API requests. However, any field with 12155 // an empty value appearing in NullFields will be sent to the server as 12156 // null. It is an error if a field in this list has a non-empty value. 12157 // This may be used to include null fields in Patch requests. 12158 NullFields []string `json:"-"` 12159 } 12160 12161 func (s *ListTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 12162 type NoMethod ListTargetingOptionsResponse 12163 raw := NoMethod(*s) 12164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12165 } 12166 12167 type ListUsersResponse struct { 12168 // NextPageToken: A token to retrieve the next page of results. Pass 12169 // this value in the page_token field in the subsequent call to 12170 // `ListUsers` method to retrieve the next page of results. This token 12171 // will be absent if there are no more results to return. 12172 NextPageToken string `json:"nextPageToken,omitempty"` 12173 12174 // Users: The list of users. This list will be absent if empty. 12175 Users []*User `json:"users,omitempty"` 12176 12177 // ServerResponse contains the HTTP response code and headers from the 12178 // server. 12179 googleapi.ServerResponse `json:"-"` 12180 12181 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 12182 // unconditionally include in API requests. By default, fields with 12183 // empty or default values are omitted from API requests. However, any 12184 // non-pointer, non-interface field appearing in ForceSendFields will be 12185 // sent to the server regardless of whether the field is empty or not. 12186 // This may be used to include empty fields in Patch requests. 12187 ForceSendFields []string `json:"-"` 12188 12189 // NullFields is a list of field names (e.g. "NextPageToken") to include 12190 // in API requests with the JSON null value. By default, fields with 12191 // empty values are omitted from API requests. However, any field with 12192 // an empty value appearing in NullFields will be sent to the server as 12193 // null. It is an error if a field in this list has a non-empty value. 12194 // This may be used to include null fields in Patch requests. 12195 NullFields []string `json:"-"` 12196 } 12197 12198 func (s *ListUsersResponse) MarshalJSON() ([]byte, error) { 12199 type NoMethod ListUsersResponse 12200 raw := NoMethod(*s) 12201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12202 } 12203 12204 // LocationList: A list of locations used for targeting. 12205 type LocationList struct { 12206 // AdvertiserId: Required. Immutable. The unique ID of the advertiser 12207 // the location list belongs to. 12208 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 12209 12210 // DisplayName: Required. The display name of the location list. Must be 12211 // UTF-8 encoded with a maximum size of 240 bytes. 12212 DisplayName string `json:"displayName,omitempty"` 12213 12214 // LocationListId: Output only. The unique ID of the location list. 12215 // Assigned by the system. 12216 LocationListId int64 `json:"locationListId,omitempty,string"` 12217 12218 // LocationType: Required. Immutable. The type of location. All 12219 // locations in the list will share this type. 12220 // 12221 // Possible values: 12222 // "TARGETING_LOCATION_TYPE_UNSPECIFIED" - Default value when type is 12223 // not specified or is unknown. 12224 // "TARGETING_LOCATION_TYPE_PROXIMITY" - The type for proximity geo 12225 // location. 12226 // "TARGETING_LOCATION_TYPE_REGIONAL" - The type for regional geo 12227 // location. 12228 LocationType string `json:"locationType,omitempty"` 12229 12230 // Name: Output only. The resource name of the location list. 12231 Name string `json:"name,omitempty"` 12232 12233 // ServerResponse contains the HTTP response code and headers from the 12234 // server. 12235 googleapi.ServerResponse `json:"-"` 12236 12237 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 12238 // unconditionally include in API requests. By default, fields with 12239 // empty or default values are omitted from API requests. However, any 12240 // non-pointer, non-interface field appearing in ForceSendFields will be 12241 // sent to the server regardless of whether the field is empty or not. 12242 // This may be used to include empty fields in Patch requests. 12243 ForceSendFields []string `json:"-"` 12244 12245 // NullFields is a list of field names (e.g. "AdvertiserId") to include 12246 // in API requests with the JSON null value. By default, fields with 12247 // empty values are omitted from API requests. However, any field with 12248 // an empty value appearing in NullFields will be sent to the server as 12249 // null. It is an error if a field in this list has a non-empty value. 12250 // This may be used to include null fields in Patch requests. 12251 NullFields []string `json:"-"` 12252 } 12253 12254 func (s *LocationList) MarshalJSON() ([]byte, error) { 12255 type NoMethod LocationList 12256 raw := NoMethod(*s) 12257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12258 } 12259 12260 // LookbackWindow: Specifies how many days into the past to look when 12261 // determining whether to record a conversion. 12262 type LookbackWindow struct { 12263 // ClickDays: Lookback window, in days, from the last time a given user 12264 // clicked on one of your ads. 12265 ClickDays int64 `json:"clickDays,omitempty"` 12266 12267 // ImpressionDays: Lookback window, in days, from the last time a given 12268 // user viewed one of your ads. 12269 ImpressionDays int64 `json:"impressionDays,omitempty"` 12270 12271 // ForceSendFields is a list of field names (e.g. "ClickDays") to 12272 // unconditionally include in API requests. By default, fields with 12273 // empty or default values are omitted from API requests. However, any 12274 // non-pointer, non-interface field appearing in ForceSendFields will be 12275 // sent to the server regardless of whether the field is empty or not. 12276 // This may be used to include empty fields in Patch requests. 12277 ForceSendFields []string `json:"-"` 12278 12279 // NullFields is a list of field names (e.g. "ClickDays") to include in 12280 // API requests with the JSON null value. By default, fields with empty 12281 // values are omitted from API requests. However, any field with an 12282 // empty value appearing in NullFields will be sent to the server as 12283 // null. It is an error if a field in this list has a non-empty value. 12284 // This may be used to include null fields in Patch requests. 12285 NullFields []string `json:"-"` 12286 } 12287 12288 func (s *LookbackWindow) MarshalJSON() ([]byte, error) { 12289 type NoMethod LookbackWindow 12290 raw := NoMethod(*s) 12291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12292 } 12293 12294 type LookupInvoiceCurrencyResponse struct { 12295 // CurrencyCode: Currency used by the advertiser in ISO 4217 format. 12296 CurrencyCode string `json:"currencyCode,omitempty"` 12297 12298 // ServerResponse contains the HTTP response code and headers from the 12299 // server. 12300 googleapi.ServerResponse `json:"-"` 12301 12302 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 12303 // unconditionally include in API requests. By default, fields with 12304 // empty or default values are omitted from API requests. However, any 12305 // non-pointer, non-interface field appearing in ForceSendFields will be 12306 // sent to the server regardless of whether the field is empty or not. 12307 // This may be used to include empty fields in Patch requests. 12308 ForceSendFields []string `json:"-"` 12309 12310 // NullFields is a list of field names (e.g. "CurrencyCode") to include 12311 // in API requests with the JSON null value. By default, fields with 12312 // empty values are omitted from API requests. However, any field with 12313 // an empty value appearing in NullFields will be sent to the server as 12314 // null. It is an error if a field in this list has a non-empty value. 12315 // This may be used to include null fields in Patch requests. 12316 NullFields []string `json:"-"` 12317 } 12318 12319 func (s *LookupInvoiceCurrencyResponse) MarshalJSON() ([]byte, error) { 12320 type NoMethod LookupInvoiceCurrencyResponse 12321 raw := NoMethod(*s) 12322 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12323 } 12324 12325 // ManualTrigger: A single manual trigger in Display & Video 360. 12326 // **Warning:** Line Items using manual triggers no longer serve in 12327 // Display & Video 360. This resource will sunset on August 1, 2023. 12328 // Read our feature deprecation announcement 12329 // (/display-video/api/deprecations#features.manual_triggers) for more 12330 // information. 12331 type ManualTrigger struct { 12332 // ActivationDurationMinutes: Required. The maximum duration of each 12333 // activation in minutes. Must be between 1 and 360 inclusive. After 12334 // this duration, the trigger will be automatically deactivated. 12335 ActivationDurationMinutes int64 `json:"activationDurationMinutes,omitempty,string"` 12336 12337 // AdvertiserId: Required. Immutable. The unique ID of the advertiser 12338 // that the manual trigger belongs to. 12339 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 12340 12341 // DisplayName: Required. The display name of the manual trigger. Must 12342 // be UTF-8 encoded with a maximum size of 240 bytes. 12343 DisplayName string `json:"displayName,omitempty"` 12344 12345 // LatestActivationTime: Output only. The timestamp of the trigger's 12346 // latest activation. 12347 LatestActivationTime string `json:"latestActivationTime,omitempty"` 12348 12349 // Name: Output only. The resource name of the manual trigger. 12350 Name string `json:"name,omitempty"` 12351 12352 // State: Output only. The state of the manual trigger. Will be set to 12353 // the `INACTIVE` state upon creation. 12354 // 12355 // Possible values: 12356 // "STATE_UNSPECIFIED" - Default value when state is not specified or 12357 // is unknown in this version. 12358 // "INACTIVE" - The trigger is currently inactive and ready to be 12359 // activated. 12360 // "ACTIVE" - The trigger is currently active (activated). 12361 State string `json:"state,omitempty"` 12362 12363 // TriggerId: Output only. The unique ID of the manual trigger. 12364 TriggerId int64 `json:"triggerId,omitempty,string"` 12365 12366 // ServerResponse contains the HTTP response code and headers from the 12367 // server. 12368 googleapi.ServerResponse `json:"-"` 12369 12370 // ForceSendFields is a list of field names (e.g. 12371 // "ActivationDurationMinutes") to unconditionally include in API 12372 // requests. By default, fields with empty or default values are omitted 12373 // from API requests. However, any non-pointer, non-interface field 12374 // appearing in ForceSendFields will be sent to the server regardless of 12375 // whether the field is empty or not. This may be used to include empty 12376 // fields in Patch requests. 12377 ForceSendFields []string `json:"-"` 12378 12379 // NullFields is a list of field names (e.g. 12380 // "ActivationDurationMinutes") to include in API requests with the JSON 12381 // null value. By default, fields with empty values are omitted from API 12382 // requests. However, any field with an empty value appearing in 12383 // NullFields will be sent to the server as null. It is an error if a 12384 // field in this list has a non-empty value. This may be used to include 12385 // null fields in Patch requests. 12386 NullFields []string `json:"-"` 12387 } 12388 12389 func (s *ManualTrigger) MarshalJSON() ([]byte, error) { 12390 type NoMethod ManualTrigger 12391 raw := NoMethod(*s) 12392 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12393 } 12394 12395 // MaximizeSpendBidStrategy: A strategy that automatically adjusts the 12396 // bid to optimize a specified performance goal while spending the full 12397 // budget. 12398 type MaximizeSpendBidStrategy struct { 12399 // CustomBiddingAlgorithmId: The ID of the Custom Bidding Algorithm used 12400 // by this strategy. Only applicable when performance_goal_type is set 12401 // to `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO`. 12402 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"` 12403 12404 // MaxAverageCpmBidAmountMicros: The maximum average CPM that may be 12405 // bid, in micros of the advertiser's currency. Must be greater than or 12406 // equal to a billable unit of the given currency. For example, 1500000 12407 // represents 1.5 standard units of the currency. 12408 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"` 12409 12410 // PerformanceGoalType: Required. The type of the performance goal that 12411 // the bidding strategy tries to minimize while spending the full 12412 // budget. `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM` is not 12413 // supported for this strategy. 12414 // 12415 // Possible values: 12416 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_UNSPECIFIED" - Type value 12417 // is not specified or is unknown in this version. 12418 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA" - Cost per action. 12419 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC" - Cost per click. 12420 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM" - Viewable 12421 // CPM. 12422 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO" - Custom 12423 // bidding algorithm. 12424 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA" - Completed inview 12425 // and audible views. 12426 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN" - Inview time over 12427 // 10 secs views. 12428 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED" - Viewable 12429 // impressions. 12430 PerformanceGoalType string `json:"performanceGoalType,omitempty"` 12431 12432 // RaiseBidForDeals: Whether the strategy takes deal floor prices into 12433 // account. 12434 RaiseBidForDeals bool `json:"raiseBidForDeals,omitempty"` 12435 12436 // ForceSendFields is a list of field names (e.g. 12437 // "CustomBiddingAlgorithmId") to unconditionally include in API 12438 // requests. By default, fields with empty or default values are omitted 12439 // from API requests. However, any non-pointer, non-interface field 12440 // appearing in ForceSendFields will be sent to the server regardless of 12441 // whether the field is empty or not. This may be used to include empty 12442 // fields in Patch requests. 12443 ForceSendFields []string `json:"-"` 12444 12445 // NullFields is a list of field names (e.g. "CustomBiddingAlgorithmId") 12446 // to include in API requests with the JSON null value. By default, 12447 // fields with empty values are omitted from API requests. However, any 12448 // field with an empty value appearing in NullFields will be sent to the 12449 // server as null. It is an error if a field in this list has a 12450 // non-empty value. This may be used to include null fields in Patch 12451 // requests. 12452 NullFields []string `json:"-"` 12453 } 12454 12455 func (s *MaximizeSpendBidStrategy) MarshalJSON() ([]byte, error) { 12456 type NoMethod MaximizeSpendBidStrategy 12457 raw := NoMethod(*s) 12458 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12459 } 12460 12461 // MeasurementConfig: Measurement settings of a partner. 12462 type MeasurementConfig struct { 12463 // Dv360ToCmCostReportingEnabled: Whether or not to report DV360 cost to 12464 // CM360. 12465 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"` 12466 12467 // Dv360ToCmDataSharingEnabled: Whether or not to include DV360 data in 12468 // CM360 data transfer reports. 12469 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"` 12470 12471 // ForceSendFields is a list of field names (e.g. 12472 // "Dv360ToCmCostReportingEnabled") to unconditionally include in API 12473 // requests. By default, fields with empty or default values are omitted 12474 // from API requests. However, any non-pointer, non-interface field 12475 // appearing in ForceSendFields will be sent to the server regardless of 12476 // whether the field is empty or not. This may be used to include empty 12477 // fields in Patch requests. 12478 ForceSendFields []string `json:"-"` 12479 12480 // NullFields is a list of field names (e.g. 12481 // "Dv360ToCmCostReportingEnabled") to include in API requests with the 12482 // JSON null value. By default, fields with empty values are omitted 12483 // from API requests. However, any field with an empty value appearing 12484 // in NullFields will be sent to the server as null. It is an error if a 12485 // field in this list has a non-empty value. This may be used to include 12486 // null fields in Patch requests. 12487 NullFields []string `json:"-"` 12488 } 12489 12490 func (s *MeasurementConfig) MarshalJSON() ([]byte, error) { 12491 type NoMethod MeasurementConfig 12492 raw := NoMethod(*s) 12493 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12494 } 12495 12496 // MobileApp: A mobile app promoted by a mobile app install line item. 12497 type MobileApp struct { 12498 // AppId: Required. The ID of the app provided by the platform store. 12499 // Android apps are identified by the bundle ID used by Android's Play 12500 // store, such as `com.google.android.gm`. iOS apps are identified by a 12501 // nine-digit app ID used by Apple's App store, such as `422689480`. 12502 AppId string `json:"appId,omitempty"` 12503 12504 // DisplayName: Output only. The app name. 12505 DisplayName string `json:"displayName,omitempty"` 12506 12507 // Platform: Output only. The app platform. 12508 // 12509 // Possible values: 12510 // "PLATFORM_UNSPECIFIED" - Platform is not specified. 12511 // "IOS" - iOS platform. 12512 // "ANDROID" - Android platform. 12513 Platform string `json:"platform,omitempty"` 12514 12515 // Publisher: Output only. The app publisher. 12516 Publisher string `json:"publisher,omitempty"` 12517 12518 // ForceSendFields is a list of field names (e.g. "AppId") to 12519 // unconditionally include in API requests. By default, fields with 12520 // empty or default values are omitted from API requests. However, any 12521 // non-pointer, non-interface field appearing in ForceSendFields will be 12522 // sent to the server regardless of whether the field is empty or not. 12523 // This may be used to include empty fields in Patch requests. 12524 ForceSendFields []string `json:"-"` 12525 12526 // NullFields is a list of field names (e.g. "AppId") to include in API 12527 // requests with the JSON null value. By default, fields with empty 12528 // values are omitted from API requests. However, any field with an 12529 // empty value appearing in NullFields will be sent to the server as 12530 // null. It is an error if a field in this list has a non-empty value. 12531 // This may be used to include null fields in Patch requests. 12532 NullFields []string `json:"-"` 12533 } 12534 12535 func (s *MobileApp) MarshalJSON() ([]byte, error) { 12536 type NoMethod MobileApp 12537 raw := NoMethod(*s) 12538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12539 } 12540 12541 // MobileDeviceIdList: Wrapper message for a list of mobile device IDs 12542 // defining Customer Match audience members. 12543 type MobileDeviceIdList struct { 12544 // Consent: Input only. The consent setting for the users in 12545 // mobile_device_ids. Leaving this field unset indicates that consent is 12546 // not specified. If ad_user_data or ad_personalization fields are set 12547 // to `CONSENT_STATUS_DENIED`, the request will return an error. 12548 Consent *Consent `json:"consent,omitempty"` 12549 12550 // MobileDeviceIds: A list of mobile device IDs defining Customer Match 12551 // audience members. The size of mobile_device_ids mustn't be greater 12552 // than 500,000. 12553 MobileDeviceIds []string `json:"mobileDeviceIds,omitempty"` 12554 12555 // ForceSendFields is a list of field names (e.g. "Consent") to 12556 // unconditionally include in API requests. By default, fields with 12557 // empty or default values are omitted from API requests. However, any 12558 // non-pointer, non-interface field appearing in ForceSendFields will be 12559 // sent to the server regardless of whether the field is empty or not. 12560 // This may be used to include empty fields in Patch requests. 12561 ForceSendFields []string `json:"-"` 12562 12563 // NullFields is a list of field names (e.g. "Consent") to include in 12564 // API requests with the JSON null value. By default, fields with empty 12565 // values are omitted from API requests. However, any field with an 12566 // empty value appearing in NullFields will be sent to the server as 12567 // null. It is an error if a field in this list has a non-empty value. 12568 // This may be used to include null fields in Patch requests. 12569 NullFields []string `json:"-"` 12570 } 12571 12572 func (s *MobileDeviceIdList) MarshalJSON() ([]byte, error) { 12573 type NoMethod MobileDeviceIdList 12574 raw := NoMethod(*s) 12575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12576 } 12577 12578 // Money: Represents an amount of money with its currency type. 12579 type Money struct { 12580 // CurrencyCode: The three-letter currency code defined in ISO 4217. 12581 CurrencyCode string `json:"currencyCode,omitempty"` 12582 12583 // Nanos: Number of nano (10^-9) units of the amount. The value must be 12584 // between -999,999,999 and +999,999,999 inclusive. If `units` is 12585 // positive, `nanos` must be positive or zero. If `units` is zero, 12586 // `nanos` can be positive, zero, or negative. If `units` is negative, 12587 // `nanos` must be negative or zero. For example $-1.75 is represented 12588 // as `units`=-1 and `nanos`=-750,000,000. 12589 Nanos int64 `json:"nanos,omitempty"` 12590 12591 // Units: The whole units of the amount. For example if `currencyCode` 12592 // is "USD", then 1 unit is one US dollar. 12593 Units int64 `json:"units,omitempty,string"` 12594 12595 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 12596 // unconditionally include in API requests. By default, fields with 12597 // empty or default values are omitted from API requests. However, any 12598 // non-pointer, non-interface field appearing in ForceSendFields will be 12599 // sent to the server regardless of whether the field is empty or not. 12600 // This may be used to include empty fields in Patch requests. 12601 ForceSendFields []string `json:"-"` 12602 12603 // NullFields is a list of field names (e.g. "CurrencyCode") to include 12604 // in API requests with the JSON null value. By default, fields with 12605 // empty values are omitted from API requests. However, any field with 12606 // an empty value appearing in NullFields will be sent to the server as 12607 // null. It is an error if a field in this list has a non-empty value. 12608 // This may be used to include null fields in Patch requests. 12609 NullFields []string `json:"-"` 12610 } 12611 12612 func (s *Money) MarshalJSON() ([]byte, error) { 12613 type NoMethod Money 12614 raw := NoMethod(*s) 12615 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12616 } 12617 12618 // NativeContentPositionAssignedTargetingOptionDetails: Details for 12619 // native content position assigned targeting option. This will be 12620 // populated in the native_content_position_details field when 12621 // targeting_type is `TARGETING_TYPE_NATIVE_CONTENT_POSITION`. 12622 // Explicitly targeting all options is not supported. Remove all native 12623 // content position targeting options to achieve this effect. 12624 type NativeContentPositionAssignedTargetingOptionDetails struct { 12625 // ContentPosition: Required. The content position. 12626 // 12627 // Possible values: 12628 // "NATIVE_CONTENT_POSITION_UNSPECIFIED" - Native content position is 12629 // not specified in this version. This enum is a place holder for a 12630 // default value and does not represent a real native content position. 12631 // "NATIVE_CONTENT_POSITION_UNKNOWN" - The native content position is 12632 // unknown. 12633 // "NATIVE_CONTENT_POSITION_IN_ARTICLE" - Native content position is 12634 // in-article, i.e., ads appear between the paragraphs of pages. 12635 // "NATIVE_CONTENT_POSITION_IN_FEED" - Native content position is 12636 // in-feed, i.e., ads appear in a scrollable stream of content. A feed 12637 // is typically editorial (e.g. a list of articles or news) or listings 12638 // (e.g. a list of products or services). 12639 // "NATIVE_CONTENT_POSITION_PERIPHERAL" - Native content position is 12640 // peripheral, i.e., ads appear outside of core content on pages, such 12641 // as the right- or left-hand side of the page. 12642 // "NATIVE_CONTENT_POSITION_RECOMMENDATION" - Native content position 12643 // is recommendation, i.e., ads appear in sections for recommended 12644 // content. 12645 ContentPosition string `json:"contentPosition,omitempty"` 12646 12647 // TargetingOptionId: Required. The targeting_option_id field when 12648 // targeting_type is `TARGETING_TYPE_NATIVE_CONTENT_POSITION`. 12649 TargetingOptionId string `json:"targetingOptionId,omitempty"` 12650 12651 // ForceSendFields is a list of field names (e.g. "ContentPosition") to 12652 // unconditionally include in API requests. By default, fields with 12653 // empty or default values are omitted from API requests. However, any 12654 // non-pointer, non-interface field appearing in ForceSendFields will be 12655 // sent to the server regardless of whether the field is empty or not. 12656 // This may be used to include empty fields in Patch requests. 12657 ForceSendFields []string `json:"-"` 12658 12659 // NullFields is a list of field names (e.g. "ContentPosition") to 12660 // include in API requests with the JSON null value. By default, fields 12661 // with empty values are omitted from API requests. However, any field 12662 // with an empty value appearing in NullFields will be sent to the 12663 // server as null. It is an error if a field in this list has a 12664 // non-empty value. This may be used to include null fields in Patch 12665 // requests. 12666 NullFields []string `json:"-"` 12667 } 12668 12669 func (s *NativeContentPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 12670 type NoMethod NativeContentPositionAssignedTargetingOptionDetails 12671 raw := NoMethod(*s) 12672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12673 } 12674 12675 // NativeContentPositionTargetingOptionDetails: Represents a targetable 12676 // native content position. This will be populated in the 12677 // native_content_position_details field when targeting_type is 12678 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION`. 12679 type NativeContentPositionTargetingOptionDetails struct { 12680 // ContentPosition: Output only. The content position. 12681 // 12682 // Possible values: 12683 // "NATIVE_CONTENT_POSITION_UNSPECIFIED" - Native content position is 12684 // not specified in this version. This enum is a place holder for a 12685 // default value and does not represent a real native content position. 12686 // "NATIVE_CONTENT_POSITION_UNKNOWN" - The native content position is 12687 // unknown. 12688 // "NATIVE_CONTENT_POSITION_IN_ARTICLE" - Native content position is 12689 // in-article, i.e., ads appear between the paragraphs of pages. 12690 // "NATIVE_CONTENT_POSITION_IN_FEED" - Native content position is 12691 // in-feed, i.e., ads appear in a scrollable stream of content. A feed 12692 // is typically editorial (e.g. a list of articles or news) or listings 12693 // (e.g. a list of products or services). 12694 // "NATIVE_CONTENT_POSITION_PERIPHERAL" - Native content position is 12695 // peripheral, i.e., ads appear outside of core content on pages, such 12696 // as the right- or left-hand side of the page. 12697 // "NATIVE_CONTENT_POSITION_RECOMMENDATION" - Native content position 12698 // is recommendation, i.e., ads appear in sections for recommended 12699 // content. 12700 ContentPosition string `json:"contentPosition,omitempty"` 12701 12702 // ForceSendFields is a list of field names (e.g. "ContentPosition") to 12703 // unconditionally include in API requests. By default, fields with 12704 // empty or default values are omitted from API requests. However, any 12705 // non-pointer, non-interface field appearing in ForceSendFields will be 12706 // sent to the server regardless of whether the field is empty or not. 12707 // This may be used to include empty fields in Patch requests. 12708 ForceSendFields []string `json:"-"` 12709 12710 // NullFields is a list of field names (e.g. "ContentPosition") to 12711 // include in API requests with the JSON null value. By default, fields 12712 // with empty values are omitted from API requests. However, any field 12713 // with an empty value appearing in NullFields will be sent to the 12714 // server as null. It is an error if a field in this list has a 12715 // non-empty value. This may be used to include null fields in Patch 12716 // requests. 12717 NullFields []string `json:"-"` 12718 } 12719 12720 func (s *NativeContentPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 12721 type NoMethod NativeContentPositionTargetingOptionDetails 12722 raw := NoMethod(*s) 12723 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12724 } 12725 12726 // NegativeKeyword: A negatively targeted keyword that belongs to a 12727 // negative keyword list. 12728 type NegativeKeyword struct { 12729 // KeywordValue: Required. Immutable. The negatively targeted keyword, 12730 // for example `car insurance`. Must be UTF-8 encoded with a maximum 12731 // size of 255 bytes. Maximum number of characters is 80. Maximum number 12732 // of words is 10. Valid characters are restricted to ASCII characters 12733 // only. The only URL-escaping permitted is for representing whitespace 12734 // between words. Leading or trailing whitespace is ignored. 12735 KeywordValue string `json:"keywordValue,omitempty"` 12736 12737 // Name: Output only. The resource name of the negative keyword. 12738 Name string `json:"name,omitempty"` 12739 12740 // ServerResponse contains the HTTP response code and headers from the 12741 // server. 12742 googleapi.ServerResponse `json:"-"` 12743 12744 // ForceSendFields is a list of field names (e.g. "KeywordValue") to 12745 // unconditionally include in API requests. By default, fields with 12746 // empty or default values are omitted from API requests. However, any 12747 // non-pointer, non-interface field appearing in ForceSendFields will be 12748 // sent to the server regardless of whether the field is empty or not. 12749 // This may be used to include empty fields in Patch requests. 12750 ForceSendFields []string `json:"-"` 12751 12752 // NullFields is a list of field names (e.g. "KeywordValue") to include 12753 // in API requests with the JSON null value. By default, fields with 12754 // empty values are omitted from API requests. However, any field with 12755 // an empty value appearing in NullFields will be sent to the server as 12756 // null. It is an error if a field in this list has a non-empty value. 12757 // This may be used to include null fields in Patch requests. 12758 NullFields []string `json:"-"` 12759 } 12760 12761 func (s *NegativeKeyword) MarshalJSON() ([]byte, error) { 12762 type NoMethod NegativeKeyword 12763 raw := NoMethod(*s) 12764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12765 } 12766 12767 // NegativeKeywordList: A list of negative keywords used for targeting. 12768 type NegativeKeywordList struct { 12769 // AdvertiserId: Output only. The unique ID of the advertiser the 12770 // negative keyword list belongs to. 12771 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 12772 12773 // DisplayName: Required. The display name of the negative keyword list. 12774 // Must be UTF-8 encoded with a maximum size of 255 bytes. 12775 DisplayName string `json:"displayName,omitempty"` 12776 12777 // Name: Output only. The resource name of the negative keyword list. 12778 Name string `json:"name,omitempty"` 12779 12780 // NegativeKeywordListId: Output only. The unique ID of the negative 12781 // keyword list. Assigned by the system. 12782 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"` 12783 12784 // TargetedLineItemCount: Output only. Number of line items that are 12785 // directly targeting this negative keyword list. 12786 TargetedLineItemCount int64 `json:"targetedLineItemCount,omitempty,string"` 12787 12788 // ServerResponse contains the HTTP response code and headers from the 12789 // server. 12790 googleapi.ServerResponse `json:"-"` 12791 12792 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 12793 // unconditionally include in API requests. By default, fields with 12794 // empty or default values are omitted from API requests. However, any 12795 // non-pointer, non-interface field appearing in ForceSendFields will be 12796 // sent to the server regardless of whether the field is empty or not. 12797 // This may be used to include empty fields in Patch requests. 12798 ForceSendFields []string `json:"-"` 12799 12800 // NullFields is a list of field names (e.g. "AdvertiserId") to include 12801 // in API requests with the JSON null value. By default, fields with 12802 // empty values are omitted from API requests. However, any field with 12803 // an empty value appearing in NullFields will be sent to the server as 12804 // null. It is an error if a field in this list has a non-empty value. 12805 // This may be used to include null fields in Patch requests. 12806 NullFields []string `json:"-"` 12807 } 12808 12809 func (s *NegativeKeywordList) MarshalJSON() ([]byte, error) { 12810 type NoMethod NegativeKeywordList 12811 raw := NoMethod(*s) 12812 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12813 } 12814 12815 // NegativeKeywordListAssignedTargetingOptionDetails: Targeting details 12816 // for negative keyword list. This will be populated in the details 12817 // field of an AssignedTargetingOption when targeting_type is 12818 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST`. 12819 type NegativeKeywordListAssignedTargetingOptionDetails struct { 12820 // NegativeKeywordListId: Required. ID of the negative keyword list. 12821 // Should refer to the negative_keyword_list_id field of a 12822 // NegativeKeywordList resource. 12823 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"` 12824 12825 // ForceSendFields is a list of field names (e.g. 12826 // "NegativeKeywordListId") to unconditionally include in API requests. 12827 // By default, fields with empty or default values are omitted from API 12828 // requests. However, any non-pointer, non-interface field appearing in 12829 // ForceSendFields will be sent to the server regardless of whether the 12830 // field is empty or not. This may be used to include empty fields in 12831 // Patch requests. 12832 ForceSendFields []string `json:"-"` 12833 12834 // NullFields is a list of field names (e.g. "NegativeKeywordListId") to 12835 // include in API requests with the JSON null value. By default, fields 12836 // with empty values are omitted from API requests. However, any field 12837 // with an empty value appearing in NullFields will be sent to the 12838 // server as null. It is an error if a field in this list has a 12839 // non-empty value. This may be used to include null fields in Patch 12840 // requests. 12841 NullFields []string `json:"-"` 12842 } 12843 12844 func (s *NegativeKeywordListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 12845 type NoMethod NegativeKeywordListAssignedTargetingOptionDetails 12846 raw := NoMethod(*s) 12847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12848 } 12849 12850 // ObaIcon: OBA Icon for a Creative 12851 type ObaIcon struct { 12852 // ClickTrackingUrl: Required. The click tracking URL of the OBA icon. 12853 // Only URLs of the following domains are allowed: * 12854 // https://info.evidon.com * https://l.betrad.com 12855 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"` 12856 12857 // Dimensions: The dimensions of the OBA icon. 12858 Dimensions *Dimensions `json:"dimensions,omitempty"` 12859 12860 // LandingPageUrl: Required. The landing page URL of the OBA icon. Only 12861 // URLs of the following domains are allowed: * https://info.evidon.com 12862 // * https://l.betrad.com 12863 LandingPageUrl string `json:"landingPageUrl,omitempty"` 12864 12865 // Position: The position of the OBA icon on the creative. 12866 // 12867 // Possible values: 12868 // "OBA_ICON_POSITION_UNSPECIFIED" - The OBA icon position is not 12869 // specified. 12870 // "OBA_ICON_POSITION_UPPER_RIGHT" - At the upper right side of the 12871 // creative. 12872 // "OBA_ICON_POSITION_UPPER_LEFT" - At the upper left side of the 12873 // creative. 12874 // "OBA_ICON_POSITION_LOWER_RIGHT" - At the lower right side of the 12875 // creative. 12876 // "OBA_ICON_POSITION_LOWER_LEFT" - At the lower left side of the 12877 // creative. 12878 Position string `json:"position,omitempty"` 12879 12880 // Program: The program of the OBA icon. For example: “AdChoices”. 12881 Program string `json:"program,omitempty"` 12882 12883 // ResourceMimeType: The MIME type of the OBA icon resource. 12884 ResourceMimeType string `json:"resourceMimeType,omitempty"` 12885 12886 // ResourceUrl: The URL of the OBA icon resource. 12887 ResourceUrl string `json:"resourceUrl,omitempty"` 12888 12889 // ViewTrackingUrl: Required. The view tracking URL of the OBA icon. 12890 // Only URLs of the following domains are allowed: * 12891 // https://info.evidon.com * https://l.betrad.com 12892 ViewTrackingUrl string `json:"viewTrackingUrl,omitempty"` 12893 12894 // ForceSendFields is a list of field names (e.g. "ClickTrackingUrl") to 12895 // unconditionally include in API requests. By default, fields with 12896 // empty or default values are omitted from API requests. However, any 12897 // non-pointer, non-interface field appearing in ForceSendFields will be 12898 // sent to the server regardless of whether the field is empty or not. 12899 // This may be used to include empty fields in Patch requests. 12900 ForceSendFields []string `json:"-"` 12901 12902 // NullFields is a list of field names (e.g. "ClickTrackingUrl") to 12903 // include in API requests with the JSON null value. By default, fields 12904 // with empty values are omitted from API requests. However, any field 12905 // with an empty value appearing in NullFields will be sent to the 12906 // server as null. It is an error if a field in this list has a 12907 // non-empty value. This may be used to include null fields in Patch 12908 // requests. 12909 NullFields []string `json:"-"` 12910 } 12911 12912 func (s *ObaIcon) MarshalJSON() ([]byte, error) { 12913 type NoMethod ObaIcon 12914 raw := NoMethod(*s) 12915 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12916 } 12917 12918 // OmidAssignedTargetingOptionDetails: Represents a targetable Open 12919 // Measurement enabled inventory type. This will be populated in the 12920 // details field of an AssignedTargetingOption when targeting_type is 12921 // `TARGETING_TYPE_OMID`. 12922 type OmidAssignedTargetingOptionDetails struct { 12923 // Omid: Required. The type of Open Measurement enabled inventory. 12924 // 12925 // Possible values: 12926 // "OMID_UNSPECIFIED" - Default value when omid targeting is not 12927 // specified in this version. 12928 // "OMID_FOR_MOBILE_DISPLAY_ADS" - Open Measurement enabled mobile 12929 // display inventory. 12930 Omid string `json:"omid,omitempty"` 12931 12932 // TargetingOptionId: Required. The targeting_option_id of a 12933 // TargetingOption of type `TARGETING_TYPE_OMID`. 12934 TargetingOptionId string `json:"targetingOptionId,omitempty"` 12935 12936 // ForceSendFields is a list of field names (e.g. "Omid") to 12937 // unconditionally include in API requests. By default, fields with 12938 // empty or default values are omitted from API requests. However, any 12939 // non-pointer, non-interface field appearing in ForceSendFields will be 12940 // sent to the server regardless of whether the field is empty or not. 12941 // This may be used to include empty fields in Patch requests. 12942 ForceSendFields []string `json:"-"` 12943 12944 // NullFields is a list of field names (e.g. "Omid") to include in API 12945 // requests with the JSON null value. By default, fields with empty 12946 // values are omitted from API requests. However, any field with an 12947 // empty value appearing in NullFields will be sent to the server as 12948 // null. It is an error if a field in this list has a non-empty value. 12949 // This may be used to include null fields in Patch requests. 12950 NullFields []string `json:"-"` 12951 } 12952 12953 func (s *OmidAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 12954 type NoMethod OmidAssignedTargetingOptionDetails 12955 raw := NoMethod(*s) 12956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12957 } 12958 12959 // OmidTargetingOptionDetails: Represents a targetable Open Measurement 12960 // enabled inventory type. This will be populated in the omid_details 12961 // field when targeting_type is `TARGETING_TYPE_OMID`. 12962 type OmidTargetingOptionDetails struct { 12963 // Omid: Output only. The type of Open Measurement enabled inventory. 12964 // 12965 // Possible values: 12966 // "OMID_UNSPECIFIED" - Default value when omid targeting is not 12967 // specified in this version. 12968 // "OMID_FOR_MOBILE_DISPLAY_ADS" - Open Measurement enabled mobile 12969 // display inventory. 12970 Omid string `json:"omid,omitempty"` 12971 12972 // ForceSendFields is a list of field names (e.g. "Omid") to 12973 // unconditionally include in API requests. By default, fields with 12974 // empty or default values are omitted from API requests. However, any 12975 // non-pointer, non-interface field appearing in ForceSendFields will be 12976 // sent to the server regardless of whether the field is empty or not. 12977 // This may be used to include empty fields in Patch requests. 12978 ForceSendFields []string `json:"-"` 12979 12980 // NullFields is a list of field names (e.g. "Omid") to include in API 12981 // requests with the JSON null value. By default, fields with empty 12982 // values are omitted from API requests. However, any field with an 12983 // empty value appearing in NullFields will be sent to the server as 12984 // null. It is an error if a field in this list has a non-empty value. 12985 // This may be used to include null fields in Patch requests. 12986 NullFields []string `json:"-"` 12987 } 12988 12989 func (s *OmidTargetingOptionDetails) MarshalJSON() ([]byte, error) { 12990 type NoMethod OmidTargetingOptionDetails 12991 raw := NoMethod(*s) 12992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 12993 } 12994 12995 // OnScreenPositionAssignedTargetingOptionDetails: On screen position 12996 // targeting option details. This will be populated in the 12997 // on_screen_position_details field when targeting_type is 12998 // `TARGETING_TYPE_ON_SCREEN_POSITION`. 12999 type OnScreenPositionAssignedTargetingOptionDetails struct { 13000 // AdType: Output only. The ad type to target. Only applicable to 13001 // insertion order targeting and new line items supporting the specified 13002 // ad type will inherit this targeting option by default. Possible 13003 // values are: * `AD_TYPE_DISPLAY`, the setting will be inherited by new 13004 // line item when line_item_type is `LINE_ITEM_TYPE_DISPLAY_DEFAULT`. * 13005 // `AD_TYPE_VIDEO`, the setting will be inherited by new line item when 13006 // line_item_type is `LINE_ITEM_TYPE_VIDEO_DEFAULT`. 13007 // 13008 // Possible values: 13009 // "AD_TYPE_UNSPECIFIED" - Ad type is not specified or is unknown in 13010 // this version. 13011 // "AD_TYPE_DISPLAY" - Display creatives, e.g. image and HTML5. 13012 // "AD_TYPE_VIDEO" - Video creatives, e.g. video ads that play during 13013 // streaming content in video players. 13014 // "AD_TYPE_AUDIO" - Audio creatives, e.g. audio ads that play during 13015 // audio content. 13016 AdType string `json:"adType,omitempty"` 13017 13018 // OnScreenPosition: Output only. The on screen position. 13019 // 13020 // Possible values: 13021 // "ON_SCREEN_POSITION_UNSPECIFIED" - On screen position is not 13022 // specified in this version. This enum is a place holder for a default 13023 // value and does not represent a real on screen position. 13024 // "ON_SCREEN_POSITION_UNKNOWN" - The ad position is unknown on the 13025 // screen. 13026 // "ON_SCREEN_POSITION_ABOVE_THE_FOLD" - The ad is located above the 13027 // fold. 13028 // "ON_SCREEN_POSITION_BELOW_THE_FOLD" - The ad is located below the 13029 // fold. 13030 OnScreenPosition string `json:"onScreenPosition,omitempty"` 13031 13032 // TargetingOptionId: Required. The targeting_option_id field when 13033 // targeting_type is `TARGETING_TYPE_ON_SCREEN_POSITION`. 13034 TargetingOptionId string `json:"targetingOptionId,omitempty"` 13035 13036 // ForceSendFields is a list of field names (e.g. "AdType") to 13037 // unconditionally include in API requests. By default, fields with 13038 // empty or default values are omitted from API requests. However, any 13039 // non-pointer, non-interface field appearing in ForceSendFields will be 13040 // sent to the server regardless of whether the field is empty or not. 13041 // This may be used to include empty fields in Patch requests. 13042 ForceSendFields []string `json:"-"` 13043 13044 // NullFields is a list of field names (e.g. "AdType") to include in API 13045 // requests with the JSON null value. By default, fields with empty 13046 // values are omitted from API requests. However, any field with an 13047 // empty value appearing in NullFields will be sent to the server as 13048 // null. It is an error if a field in this list has a non-empty value. 13049 // This may be used to include null fields in Patch requests. 13050 NullFields []string `json:"-"` 13051 } 13052 13053 func (s *OnScreenPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 13054 type NoMethod OnScreenPositionAssignedTargetingOptionDetails 13055 raw := NoMethod(*s) 13056 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13057 } 13058 13059 // OnScreenPositionTargetingOptionDetails: Represents a targetable on 13060 // screen position, which could be used by display and video ads. This 13061 // will be populated in the on_screen_position_details field when 13062 // targeting_type is `TARGETING_TYPE_ON_SCREEN_POSITION`. 13063 type OnScreenPositionTargetingOptionDetails struct { 13064 // OnScreenPosition: Output only. The on screen position. 13065 // 13066 // Possible values: 13067 // "ON_SCREEN_POSITION_UNSPECIFIED" - On screen position is not 13068 // specified in this version. This enum is a place holder for a default 13069 // value and does not represent a real on screen position. 13070 // "ON_SCREEN_POSITION_UNKNOWN" - The ad position is unknown on the 13071 // screen. 13072 // "ON_SCREEN_POSITION_ABOVE_THE_FOLD" - The ad is located above the 13073 // fold. 13074 // "ON_SCREEN_POSITION_BELOW_THE_FOLD" - The ad is located below the 13075 // fold. 13076 OnScreenPosition string `json:"onScreenPosition,omitempty"` 13077 13078 // ForceSendFields is a list of field names (e.g. "OnScreenPosition") to 13079 // unconditionally include in API requests. By default, fields with 13080 // empty or default values are omitted from API requests. However, any 13081 // non-pointer, non-interface field appearing in ForceSendFields will be 13082 // sent to the server regardless of whether the field is empty or not. 13083 // This may be used to include empty fields in Patch requests. 13084 ForceSendFields []string `json:"-"` 13085 13086 // NullFields is a list of field names (e.g. "OnScreenPosition") to 13087 // include in API requests with the JSON null value. By default, fields 13088 // with empty values are omitted from API requests. However, any field 13089 // with an empty value appearing in NullFields will be sent to the 13090 // server as null. It is an error if a field in this list has a 13091 // non-empty value. This may be used to include null fields in Patch 13092 // requests. 13093 NullFields []string `json:"-"` 13094 } 13095 13096 func (s *OnScreenPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 13097 type NoMethod OnScreenPositionTargetingOptionDetails 13098 raw := NoMethod(*s) 13099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13100 } 13101 13102 // OperatingSystemAssignedTargetingOptionDetails: Assigned operating 13103 // system targeting option details. This will be populated in the 13104 // operating_system_details field when targeting_type is 13105 // `TARGETING_TYPE_OPERATING_SYSTEM`. 13106 type OperatingSystemAssignedTargetingOptionDetails struct { 13107 // DisplayName: Output only. The display name of the operating system. 13108 DisplayName string `json:"displayName,omitempty"` 13109 13110 // Negative: Indicates if this option is being negatively targeted. 13111 Negative bool `json:"negative,omitempty"` 13112 13113 // TargetingOptionId: Required. The targeting option ID populated in 13114 // targeting_option_id field when targeting_type is 13115 // `TARGETING_TYPE_OPERATING_SYSTEM`. 13116 TargetingOptionId string `json:"targetingOptionId,omitempty"` 13117 13118 // ForceSendFields is a list of field names (e.g. "DisplayName") to 13119 // unconditionally include in API requests. By default, fields with 13120 // empty or default values are omitted from API requests. However, any 13121 // non-pointer, non-interface field appearing in ForceSendFields will be 13122 // sent to the server regardless of whether the field is empty or not. 13123 // This may be used to include empty fields in Patch requests. 13124 ForceSendFields []string `json:"-"` 13125 13126 // NullFields is a list of field names (e.g. "DisplayName") to include 13127 // in API requests with the JSON null value. By default, fields with 13128 // empty values are omitted from API requests. However, any field with 13129 // an empty value appearing in NullFields will be sent to the server as 13130 // null. It is an error if a field in this list has a non-empty value. 13131 // This may be used to include null fields in Patch requests. 13132 NullFields []string `json:"-"` 13133 } 13134 13135 func (s *OperatingSystemAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 13136 type NoMethod OperatingSystemAssignedTargetingOptionDetails 13137 raw := NoMethod(*s) 13138 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13139 } 13140 13141 // OperatingSystemTargetingOptionDetails: Represents a targetable 13142 // operating system. This will be populated in the 13143 // operating_system_details field of a TargetingOption when 13144 // targeting_type is `TARGETING_TYPE_OPERATING_SYSTEM`. 13145 type OperatingSystemTargetingOptionDetails struct { 13146 // DisplayName: Output only. The display name of the operating system. 13147 DisplayName string `json:"displayName,omitempty"` 13148 13149 // ForceSendFields is a list of field names (e.g. "DisplayName") to 13150 // unconditionally include in API requests. By default, fields with 13151 // empty or default values are omitted from API requests. However, any 13152 // non-pointer, non-interface field appearing in ForceSendFields will be 13153 // sent to the server regardless of whether the field is empty or not. 13154 // This may be used to include empty fields in Patch requests. 13155 ForceSendFields []string `json:"-"` 13156 13157 // NullFields is a list of field names (e.g. "DisplayName") to include 13158 // in API requests with the JSON null value. By default, fields with 13159 // empty values are omitted from API requests. However, any field with 13160 // an empty value appearing in NullFields will be sent to the server as 13161 // null. It is an error if a field in this list has a non-empty value. 13162 // This may be used to include null fields in Patch requests. 13163 NullFields []string `json:"-"` 13164 } 13165 13166 func (s *OperatingSystemTargetingOptionDetails) MarshalJSON() ([]byte, error) { 13167 type NoMethod OperatingSystemTargetingOptionDetails 13168 raw := NoMethod(*s) 13169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13170 } 13171 13172 // Operation: This resource represents a long-running operation that is 13173 // the result of a network API call. 13174 type Operation struct { 13175 // Done: If the value is `false`, it means the operation is still in 13176 // progress. If `true`, the operation is completed, and either `error` 13177 // or `response` is available. 13178 Done bool `json:"done,omitempty"` 13179 13180 // Error: The error result of the operation in case of failure or 13181 // cancellation. 13182 Error *Status `json:"error,omitempty"` 13183 13184 // Metadata: Service-specific metadata associated with the operation. It 13185 // typically contains progress information and common metadata such as 13186 // create time. Some services might not provide such metadata. Any 13187 // method that returns a long-running operation should document the 13188 // metadata type, if any. 13189 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 13190 13191 // Name: The server-assigned name, which is only unique within the same 13192 // service that originally returns it. If you use the default HTTP 13193 // mapping, the `name` should be a resource name ending with 13194 // `operations/{unique_id}`. 13195 Name string `json:"name,omitempty"` 13196 13197 // Response: The normal, successful response of the operation. If the 13198 // original method returns no data on success, such as `Delete`, the 13199 // response is `google.protobuf.Empty`. If the original method is 13200 // standard `Get`/`Create`/`Update`, the response should be the 13201 // resource. For other methods, the response should have the type 13202 // `XxxResponse`, where `Xxx` is the original method name. For example, 13203 // if the original method name is `TakeSnapshot()`, the inferred 13204 // response type is `TakeSnapshotResponse`. 13205 Response googleapi.RawMessage `json:"response,omitempty"` 13206 13207 // ServerResponse contains the HTTP response code and headers from the 13208 // server. 13209 googleapi.ServerResponse `json:"-"` 13210 13211 // ForceSendFields is a list of field names (e.g. "Done") to 13212 // unconditionally include in API requests. By default, fields with 13213 // empty or default values are omitted from API requests. However, any 13214 // non-pointer, non-interface field appearing in ForceSendFields will be 13215 // sent to the server regardless of whether the field is empty or not. 13216 // This may be used to include empty fields in Patch requests. 13217 ForceSendFields []string `json:"-"` 13218 13219 // NullFields is a list of field names (e.g. "Done") to include in API 13220 // requests with the JSON null value. By default, fields with empty 13221 // values are omitted from API requests. However, any field with an 13222 // empty value appearing in NullFields will be sent to the server as 13223 // null. It is an error if a field in this list has a non-empty value. 13224 // This may be used to include null fields in Patch requests. 13225 NullFields []string `json:"-"` 13226 } 13227 13228 func (s *Operation) MarshalJSON() ([]byte, error) { 13229 type NoMethod Operation 13230 raw := NoMethod(*s) 13231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13232 } 13233 13234 // Pacing: Settings that control the rate at which a budget is spent. 13235 type Pacing struct { 13236 // DailyMaxImpressions: Maximum number of impressions to serve every 13237 // day. Applicable when the budget is impression based. Must be greater 13238 // than 0. 13239 DailyMaxImpressions int64 `json:"dailyMaxImpressions,omitempty,string"` 13240 13241 // DailyMaxMicros: Maximum currency amount to spend every day in micros 13242 // of advertiser's currency. Applicable when the budget is currency 13243 // based. Must be greater than 0. For example, for 1.5 standard unit of 13244 // the currency, set this field to 1500000. The value assigned will be 13245 // rounded to whole billable units for the relevant currency by the 13246 // following rules: any positive value less than a single billable unit 13247 // will be rounded up to one billable unit and any value larger than a 13248 // single billable unit will be rounded down to the nearest billable 13249 // value. For example, if the currency's billable unit is 0.01, and this 13250 // field is set to 10257770, it will round down to 10250000, a value of 13251 // 10.25. If set to 505, it will round up to 10000, a value of 0.01. 13252 DailyMaxMicros int64 `json:"dailyMaxMicros,omitempty,string"` 13253 13254 // PacingPeriod: Required. The time period in which the pacing budget 13255 // will be spent. When automatic budget allocation is enabled at the 13256 // insertion order via automationType, this field is output only and 13257 // defaults to `PACING_PERIOD_FLIGHT`. 13258 // 13259 // Possible values: 13260 // "PACING_PERIOD_UNSPECIFIED" - Period value is not specified or is 13261 // unknown in this version. 13262 // "PACING_PERIOD_DAILY" - The pacing setting will be applied on daily 13263 // basis. 13264 // "PACING_PERIOD_FLIGHT" - The pacing setting will be applied to the 13265 // whole flight duration. 13266 PacingPeriod string `json:"pacingPeriod,omitempty"` 13267 13268 // PacingType: Required. The type of pacing that defines how the budget 13269 // amount will be spent across the pacing_period. 13270 // 13271 // Possible values: 13272 // "PACING_TYPE_UNSPECIFIED" - Pacing mode value is not specified or 13273 // is unknown in this version. 13274 // "PACING_TYPE_AHEAD" - Only applicable to `PACING_PERIOD_FLIGHT` 13275 // pacing period. Ahead pacing attempts to spend faster than evenly, to 13276 // make sure the entire budget is spent by the end of the flight. 13277 // "PACING_TYPE_ASAP" - Spend all of pacing budget amount as quick as 13278 // possible. 13279 // "PACING_TYPE_EVEN" - Spend a consistent budget amount every period 13280 // of time. 13281 PacingType string `json:"pacingType,omitempty"` 13282 13283 // ForceSendFields is a list of field names (e.g. "DailyMaxImpressions") 13284 // to unconditionally include in API requests. By default, fields with 13285 // empty or default values are omitted from API requests. However, any 13286 // non-pointer, non-interface field appearing in ForceSendFields will be 13287 // sent to the server regardless of whether the field is empty or not. 13288 // This may be used to include empty fields in Patch requests. 13289 ForceSendFields []string `json:"-"` 13290 13291 // NullFields is a list of field names (e.g. "DailyMaxImpressions") to 13292 // include in API requests with the JSON null value. By default, fields 13293 // with empty values are omitted from API requests. However, any field 13294 // with an empty value appearing in NullFields will be sent to the 13295 // server as null. It is an error if a field in this list has a 13296 // non-empty value. This may be used to include null fields in Patch 13297 // requests. 13298 NullFields []string `json:"-"` 13299 } 13300 13301 func (s *Pacing) MarshalJSON() ([]byte, error) { 13302 type NoMethod Pacing 13303 raw := NoMethod(*s) 13304 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13305 } 13306 13307 // ParentEntityFilter: A filtering option that filters on selected file 13308 // types belonging to a chosen set of filter entities. 13309 type ParentEntityFilter struct { 13310 // FileType: Required. File types that will be returned. 13311 // 13312 // Possible values: 13313 // "FILE_TYPE_UNSPECIFIED" - Default value when type is unspecified or 13314 // is unknown in this version. 13315 // "FILE_TYPE_CAMPAIGN" - Campaign. 13316 // "FILE_TYPE_MEDIA_PRODUCT" - Media Product. 13317 // "FILE_TYPE_INSERTION_ORDER" - Insertion Order. 13318 // "FILE_TYPE_LINE_ITEM" - Line Item. 13319 // "FILE_TYPE_AD_GROUP" - YouTube Ad Group. 13320 // "FILE_TYPE_AD" - YouTube Ad. 13321 FileType []string `json:"fileType,omitempty"` 13322 13323 // FilterIds: The IDs of the specified filter type. This is used to 13324 // filter entities to fetch. If filter type is not `FILTER_TYPE_NONE`, 13325 // at least one ID must be specified. 13326 FilterIds googleapi.Int64s `json:"filterIds,omitempty"` 13327 13328 // FilterType: Required. Filter type used to filter fetched entities. 13329 // 13330 // Possible values: 13331 // "FILTER_TYPE_UNSPECIFIED" - Default value when type is unspecified 13332 // or is unknown in this version. 13333 // "FILTER_TYPE_NONE" - If selected, no filter will be applied to the 13334 // download. Can only be used if an Advertiser is specified in 13335 // CreateSdfDownloadTaskRequest. 13336 // "FILTER_TYPE_ADVERTISER_ID" - Advertiser ID. If selected, all 13337 // filter IDs must be Advertiser IDs that belong to the Partner 13338 // specified in CreateSdfDownloadTaskRequest. 13339 // "FILTER_TYPE_CAMPAIGN_ID" - Campaign ID. If selected, all filter 13340 // IDs must be Campaign IDs that belong to the Advertiser or Partner 13341 // specified in CreateSdfDownloadTaskRequest. 13342 // "FILTER_TYPE_MEDIA_PRODUCT_ID" - Media Product ID. If selected, all 13343 // filter IDs must be Media Product IDs that belong to the Advertiser or 13344 // Partner specified in CreateSdfDownloadTaskRequest. Can only be used 13345 // for downloading `FILE_TYPE_MEDIA_PRODUCT`. 13346 // "FILTER_TYPE_INSERTION_ORDER_ID" - Insertion Order ID. If selected, 13347 // all filter IDs must be Insertion Order IDs that belong to the 13348 // Advertiser or Partner specified in CreateSdfDownloadTaskRequest. Can 13349 // only be used for downloading `FILE_TYPE_INSERTION_ORDER`, 13350 // `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`. 13351 // "FILTER_TYPE_LINE_ITEM_ID" - Line Item ID. If selected, all filter 13352 // IDs must be Line Item IDs that belong to the Advertiser or Partner 13353 // specified in CreateSdfDownloadTaskRequest. Can only be used for 13354 // downloading `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and 13355 // `FILE_TYPE_AD`. 13356 FilterType string `json:"filterType,omitempty"` 13357 13358 // ForceSendFields is a list of field names (e.g. "FileType") to 13359 // unconditionally include in API requests. By default, fields with 13360 // empty or default values are omitted from API requests. However, any 13361 // non-pointer, non-interface field appearing in ForceSendFields will be 13362 // sent to the server regardless of whether the field is empty or not. 13363 // This may be used to include empty fields in Patch requests. 13364 ForceSendFields []string `json:"-"` 13365 13366 // NullFields is a list of field names (e.g. "FileType") to include in 13367 // API requests with the JSON null value. By default, fields with empty 13368 // values are omitted from API requests. However, any field with an 13369 // empty value appearing in NullFields will be sent to the server as 13370 // null. It is an error if a field in this list has a non-empty value. 13371 // This may be used to include null fields in Patch requests. 13372 NullFields []string `json:"-"` 13373 } 13374 13375 func (s *ParentEntityFilter) MarshalJSON() ([]byte, error) { 13376 type NoMethod ParentEntityFilter 13377 raw := NoMethod(*s) 13378 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13379 } 13380 13381 // ParentalStatusAssignedTargetingOptionDetails: Details for assigned 13382 // parental status targeting option. This will be populated in the 13383 // details field of an AssignedTargetingOption when targeting_type is 13384 // `TARGETING_TYPE_PARENTAL_STATUS`. 13385 type ParentalStatusAssignedTargetingOptionDetails struct { 13386 // ParentalStatus: Required. The parental status of the audience. 13387 // 13388 // Possible values: 13389 // "PARENTAL_STATUS_UNSPECIFIED" - Default value when parental status 13390 // is not specified in this version. This enum is a place holder for 13391 // default value and does not represent a real parental status option. 13392 // "PARENTAL_STATUS_PARENT" - The audience is a parent. 13393 // "PARENTAL_STATUS_NOT_A_PARENT" - The audience is not a parent. 13394 // "PARENTAL_STATUS_UNKNOWN" - The parental status of the audience is 13395 // unknown. 13396 ParentalStatus string `json:"parentalStatus,omitempty"` 13397 13398 // TargetingOptionId: Required. The targeting_option_id of a 13399 // TargetingOption of type `TARGETING_TYPE_PARENTAL_STATUS`. 13400 TargetingOptionId string `json:"targetingOptionId,omitempty"` 13401 13402 // ForceSendFields is a list of field names (e.g. "ParentalStatus") to 13403 // unconditionally include in API requests. By default, fields with 13404 // empty or default values are omitted from API requests. However, any 13405 // non-pointer, non-interface field appearing in ForceSendFields will be 13406 // sent to the server regardless of whether the field is empty or not. 13407 // This may be used to include empty fields in Patch requests. 13408 ForceSendFields []string `json:"-"` 13409 13410 // NullFields is a list of field names (e.g. "ParentalStatus") to 13411 // include in API requests with the JSON null value. By default, fields 13412 // with empty values are omitted from API requests. However, any field 13413 // with an empty value appearing in NullFields will be sent to the 13414 // server as null. It is an error if a field in this list has a 13415 // non-empty value. This may be used to include null fields in Patch 13416 // requests. 13417 NullFields []string `json:"-"` 13418 } 13419 13420 func (s *ParentalStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 13421 type NoMethod ParentalStatusAssignedTargetingOptionDetails 13422 raw := NoMethod(*s) 13423 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13424 } 13425 13426 // ParentalStatusTargetingOptionDetails: Represents a targetable 13427 // parental status. This will be populated in the 13428 // parental_status_details field of a TargetingOption when 13429 // targeting_type is `TARGETING_TYPE_PARENTAL_STATUS`. 13430 type ParentalStatusTargetingOptionDetails struct { 13431 // ParentalStatus: Output only. The parental status of an audience. 13432 // 13433 // Possible values: 13434 // "PARENTAL_STATUS_UNSPECIFIED" - Default value when parental status 13435 // is not specified in this version. This enum is a place holder for 13436 // default value and does not represent a real parental status option. 13437 // "PARENTAL_STATUS_PARENT" - The audience is a parent. 13438 // "PARENTAL_STATUS_NOT_A_PARENT" - The audience is not a parent. 13439 // "PARENTAL_STATUS_UNKNOWN" - The parental status of the audience is 13440 // unknown. 13441 ParentalStatus string `json:"parentalStatus,omitempty"` 13442 13443 // ForceSendFields is a list of field names (e.g. "ParentalStatus") to 13444 // unconditionally include in API requests. By default, fields with 13445 // empty or default values are omitted from API requests. However, any 13446 // non-pointer, non-interface field appearing in ForceSendFields will be 13447 // sent to the server regardless of whether the field is empty or not. 13448 // This may be used to include empty fields in Patch requests. 13449 ForceSendFields []string `json:"-"` 13450 13451 // NullFields is a list of field names (e.g. "ParentalStatus") to 13452 // include in API requests with the JSON null value. By default, fields 13453 // with empty values are omitted from API requests. However, any field 13454 // with an empty value appearing in NullFields will be sent to the 13455 // server as null. It is an error if a field in this list has a 13456 // non-empty value. This may be used to include null fields in Patch 13457 // requests. 13458 NullFields []string `json:"-"` 13459 } 13460 13461 func (s *ParentalStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) { 13462 type NoMethod ParentalStatusTargetingOptionDetails 13463 raw := NoMethod(*s) 13464 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13465 } 13466 13467 // Partner: A single partner in Display & Video 360 (DV360). 13468 type Partner struct { 13469 // AdServerConfig: Ad server related settings of the partner. 13470 AdServerConfig *PartnerAdServerConfig `json:"adServerConfig,omitempty"` 13471 13472 // DataAccessConfig: Settings that control how partner data may be 13473 // accessed. 13474 DataAccessConfig *PartnerDataAccessConfig `json:"dataAccessConfig,omitempty"` 13475 13476 // DisplayName: The display name of the partner. Must be UTF-8 encoded 13477 // with a maximum size of 240 bytes. 13478 DisplayName string `json:"displayName,omitempty"` 13479 13480 // EntityStatus: Output only. The status of the partner. 13481 // 13482 // Possible values: 13483 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 13484 // specified or is unknown in this version. 13485 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 13486 // budget. 13487 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 13488 // budget spending are disabled. An entity can be deleted after 13489 // archived. Deleted entities cannot be retrieved. 13490 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 13491 // budget spending are disabled. 13492 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 13493 // the entity. 13494 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 13495 // for deletion. 13496 EntityStatus string `json:"entityStatus,omitempty"` 13497 13498 // ExchangeConfig: Settings that control which exchanges are enabled for 13499 // the partner. 13500 ExchangeConfig *ExchangeConfig `json:"exchangeConfig,omitempty"` 13501 13502 // GeneralConfig: General settings of the partner. 13503 GeneralConfig *PartnerGeneralConfig `json:"generalConfig,omitempty"` 13504 13505 // Name: Output only. The resource name of the partner. 13506 Name string `json:"name,omitempty"` 13507 13508 // PartnerId: Output only. The unique ID of the partner. Assigned by the 13509 // system. 13510 PartnerId int64 `json:"partnerId,omitempty,string"` 13511 13512 // UpdateTime: Output only. The timestamp when the partner was last 13513 // updated. Assigned by the system. 13514 UpdateTime string `json:"updateTime,omitempty"` 13515 13516 // ServerResponse contains the HTTP response code and headers from the 13517 // server. 13518 googleapi.ServerResponse `json:"-"` 13519 13520 // ForceSendFields is a list of field names (e.g. "AdServerConfig") to 13521 // unconditionally include in API requests. By default, fields with 13522 // empty or default values are omitted from API requests. However, any 13523 // non-pointer, non-interface field appearing in ForceSendFields will be 13524 // sent to the server regardless of whether the field is empty or not. 13525 // This may be used to include empty fields in Patch requests. 13526 ForceSendFields []string `json:"-"` 13527 13528 // NullFields is a list of field names (e.g. "AdServerConfig") to 13529 // include in API requests with the JSON null value. By default, fields 13530 // with empty values are omitted from API requests. However, any field 13531 // with an empty value appearing in NullFields will be sent to the 13532 // server as null. It is an error if a field in this list has a 13533 // non-empty value. This may be used to include null fields in Patch 13534 // requests. 13535 NullFields []string `json:"-"` 13536 } 13537 13538 func (s *Partner) MarshalJSON() ([]byte, error) { 13539 type NoMethod Partner 13540 raw := NoMethod(*s) 13541 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13542 } 13543 13544 // PartnerAdServerConfig: Ad server related settings of a partner. 13545 type PartnerAdServerConfig struct { 13546 // MeasurementConfig: Measurement settings of a partner. 13547 MeasurementConfig *MeasurementConfig `json:"measurementConfig,omitempty"` 13548 13549 // ForceSendFields is a list of field names (e.g. "MeasurementConfig") 13550 // to unconditionally include in API requests. By default, fields with 13551 // empty or default values are omitted from API requests. However, any 13552 // non-pointer, non-interface field appearing in ForceSendFields will be 13553 // sent to the server regardless of whether the field is empty or not. 13554 // This may be used to include empty fields in Patch requests. 13555 ForceSendFields []string `json:"-"` 13556 13557 // NullFields is a list of field names (e.g. "MeasurementConfig") to 13558 // include in API requests with the JSON null value. By default, fields 13559 // with empty values are omitted from API requests. However, any field 13560 // with an empty value appearing in NullFields will be sent to the 13561 // server as null. It is an error if a field in this list has a 13562 // non-empty value. This may be used to include null fields in Patch 13563 // requests. 13564 NullFields []string `json:"-"` 13565 } 13566 13567 func (s *PartnerAdServerConfig) MarshalJSON() ([]byte, error) { 13568 type NoMethod PartnerAdServerConfig 13569 raw := NoMethod(*s) 13570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13571 } 13572 13573 // PartnerCost: Settings that control a partner cost. A partner cost is 13574 // any type of expense involved in running a campaign, other than the 13575 // costs of purchasing impressions (which is called the media cost) and 13576 // using third-party audience segment data (data fee). Some examples of 13577 // partner costs include the fees for using DV360, a third-party ad 13578 // server, or a third-party ad serving verification service. 13579 type PartnerCost struct { 13580 // CostType: Required. The type of the partner cost. 13581 // 13582 // Possible values: 13583 // "PARTNER_COST_TYPE_UNSPECIFIED" - Type value is not specified or is 13584 // unknown in this version. 13585 // "PARTNER_COST_TYPE_ADLOOX" - The cost is charged for using Adloox. 13586 // Billed by the partner. 13587 // "PARTNER_COST_TYPE_ADLOOX_PREBID" - The cost is charged for using 13588 // Adloox Pre-Bid. Billed through DV360. 13589 // "PARTNER_COST_TYPE_ADSAFE" - The cost is charged for using AdSafe. 13590 // Billed by the partner. 13591 // "PARTNER_COST_TYPE_ADXPOSE" - The cost is charged for using 13592 // AdExpose. Billed by the partner. 13593 // "PARTNER_COST_TYPE_AGGREGATE_KNOWLEDGE" - The cost is charged for 13594 // using Aggregate Knowledge. Billed by the partner. 13595 // "PARTNER_COST_TYPE_AGENCY_TRADING_DESK" - The cost is charged for 13596 // using an Agency Trading Desk. Billed by the partner. 13597 // "PARTNER_COST_TYPE_DV360_FEE" - The cost is charged for using 13598 // DV360. Billed through DV360. 13599 // "PARTNER_COST_TYPE_COMSCORE_VCE" - The cost is charged for using 13600 // comScore vCE. Billed through DV360. 13601 // "PARTNER_COST_TYPE_DATA_MANAGEMENT_PLATFORM" - The cost is charged 13602 // for using a Data Management Platform. Billed by the partner. 13603 // "PARTNER_COST_TYPE_DEFAULT" - The default cost type. Billed by the 13604 // partner. 13605 // "PARTNER_COST_TYPE_DOUBLE_VERIFY" - The cost is charged for using 13606 // DoubleVerify. Billed by the partner. 13607 // "PARTNER_COST_TYPE_DOUBLE_VERIFY_PREBID" - The cost is charged for 13608 // using DoubleVerify Pre-Bid. Billed through DV360. 13609 // "PARTNER_COST_TYPE_EVIDON" - The cost is charged for using Evidon. 13610 // Billed by the partner. 13611 // "PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_VIDEO" - The cost is charged 13612 // for using Integral Ad Science Video. Billed by the partner. 13613 // "PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_PREBID" - The cost is 13614 // charged for using Integral Ad Science Pre-Bid. Billed through DV360. 13615 // "PARTNER_COST_TYPE_MEDIA_COST_DATA" - The cost is charged for using 13616 // media cost data. Billed by the partner. 13617 // "PARTNER_COST_TYPE_MOAT_VIDEO" - The cost is charged for using MOAT 13618 // Video. Billed by the partner. 13619 // "PARTNER_COST_TYPE_NIELSEN_DAR" - The cost is charged for using 13620 // Nielsen Digital Ad Ratings. Billed through DV360. 13621 // "PARTNER_COST_TYPE_SHOP_LOCAL" - The cost is charged for using 13622 // ShopLocal. Billed by the partner. 13623 // "PARTNER_COST_TYPE_TERACENT" - The cost is charged for using 13624 // Teracent. Billed by the partner. 13625 // "PARTNER_COST_TYPE_THIRD_PARTY_AD_SERVER" - The cost is charged for 13626 // using a third-party ad server. Billed by the partner. 13627 // "PARTNER_COST_TYPE_TRUST_METRICS" - The cost is charged for using 13628 // TrustMetrics. Billed by the partner. 13629 // "PARTNER_COST_TYPE_VIZU" - The cost is charged for using Vizu. 13630 // Billed by the partner. 13631 // "PARTNER_COST_TYPE_ADLINGO_FEE" - The cost is charged for using 13632 // AdLingo. Billed through DV360. 13633 // "PARTNER_COST_TYPE_CUSTOM_FEE_1" - The cost is charged as custom 13634 // fee 1. Billed by the partner. 13635 // "PARTNER_COST_TYPE_CUSTOM_FEE_2" - The cost is charged as custom 13636 // fee 2. Billed by the partner. 13637 // "PARTNER_COST_TYPE_CUSTOM_FEE_3" - The cost is charged as custom 13638 // fee 3. Billed by the partner. 13639 // "PARTNER_COST_TYPE_CUSTOM_FEE_4" - The cost is charged as custom 13640 // fee 4. Billed by the partner. 13641 // "PARTNER_COST_TYPE_CUSTOM_FEE_5" - The cost is charged as custom 13642 // fee 5. Billed by the partner. 13643 // "PARTNER_COST_TYPE_SCIBIDS_FEE" - The cost is charged for using 13644 // Scibids. Billed through DV360. This type is currently only available 13645 // to certain customers. Other customers attempting to use this type 13646 // will receive an error. 13647 CostType string `json:"costType,omitempty"` 13648 13649 // FeeAmount: The CPM fee amount in micros of advertiser's currency. 13650 // Applicable when the fee_type is `PARTNER_FEE_TYPE_CPM_FEE`. Must be 13651 // greater than or equal to 0. For example, for 1.5 standard unit of the 13652 // advertiser's currency, set this field to 1500000. 13653 FeeAmount int64 `json:"feeAmount,omitempty,string"` 13654 13655 // FeePercentageMillis: The media fee percentage in millis (1/1000 of a 13656 // percent). Applicable when the fee_type is 13657 // `PARTNER_FEE_TYPE_MEDIA_FEE`. Must be greater than or equal to 0. For 13658 // example: 100 represents 0.1%. 13659 FeePercentageMillis int64 `json:"feePercentageMillis,omitempty,string"` 13660 13661 // FeeType: Required. The fee type for this partner cost. 13662 // 13663 // Possible values: 13664 // "PARTNER_COST_FEE_TYPE_UNSPECIFIED" - Value is not specified or is 13665 // unknown in this version. 13666 // "PARTNER_COST_FEE_TYPE_CPM_FEE" - The partner cost is a fixed CPM 13667 // fee. Not applicable when the partner cost cost_type is one of: * 13668 // `PARTNER_COST_TYPE_MEDIA_COST_DATA` * `PARTNER_COST_TYPE_DV360_FEE`. 13669 // "PARTNER_COST_FEE_TYPE_MEDIA_FEE" - The partner cost is a 13670 // percentage surcharge based on the media cost. Not applicable when the 13671 // partner cost_type is one of: * `PARTNER_COST_TYPE_SHOP_LOCAL` * 13672 // `PARTNER_COST_TYPE_TRUST_METRICS` * 13673 // `PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_VIDEO` * 13674 // `PARTNER_COST_TYPE_MOAT_VIDEO`. 13675 FeeType string `json:"feeType,omitempty"` 13676 13677 // InvoiceType: The invoice type for this partner cost. * Required when 13678 // cost_type is one of: - `PARTNER_COST_TYPE_ADLOOX` - 13679 // `PARTNER_COST_TYPE_DOUBLE_VERIFY` - 13680 // `PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE`. * Output only for other 13681 // types. 13682 // 13683 // Possible values: 13684 // "PARTNER_COST_INVOICE_TYPE_UNSPECIFIED" - Type value is not 13685 // specified or is unknown in this version. 13686 // "PARTNER_COST_INVOICE_TYPE_DV360" - Partner cost is billed through 13687 // DV360. 13688 // "PARTNER_COST_INVOICE_TYPE_PARTNER" - Partner cost is billed by the 13689 // partner. 13690 InvoiceType string `json:"invoiceType,omitempty"` 13691 13692 // ForceSendFields is a list of field names (e.g. "CostType") to 13693 // unconditionally include in API requests. By default, fields with 13694 // empty or default values are omitted from API requests. However, any 13695 // non-pointer, non-interface field appearing in ForceSendFields will be 13696 // sent to the server regardless of whether the field is empty or not. 13697 // This may be used to include empty fields in Patch requests. 13698 ForceSendFields []string `json:"-"` 13699 13700 // NullFields is a list of field names (e.g. "CostType") to include in 13701 // API requests with the JSON null value. By default, fields with empty 13702 // values are omitted from API requests. However, any field with an 13703 // empty value appearing in NullFields will be sent to the server as 13704 // null. It is an error if a field in this list has a non-empty value. 13705 // This may be used to include null fields in Patch requests. 13706 NullFields []string `json:"-"` 13707 } 13708 13709 func (s *PartnerCost) MarshalJSON() ([]byte, error) { 13710 type NoMethod PartnerCost 13711 raw := NoMethod(*s) 13712 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13713 } 13714 13715 // PartnerDataAccessConfig: Settings that control how partner related 13716 // data may be accessed. 13717 type PartnerDataAccessConfig struct { 13718 // SdfConfig: Structured Data Files (SDF) settings for the partner. The 13719 // SDF configuration for the partner. 13720 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"` 13721 13722 // ForceSendFields is a list of field names (e.g. "SdfConfig") to 13723 // unconditionally include in API requests. By default, fields with 13724 // empty or default values are omitted from API requests. However, any 13725 // non-pointer, non-interface field appearing in ForceSendFields will be 13726 // sent to the server regardless of whether the field is empty or not. 13727 // This may be used to include empty fields in Patch requests. 13728 ForceSendFields []string `json:"-"` 13729 13730 // NullFields is a list of field names (e.g. "SdfConfig") to include in 13731 // API requests with the JSON null value. By default, fields with empty 13732 // values are omitted from API requests. However, any field with an 13733 // empty value appearing in NullFields will be sent to the server as 13734 // null. It is an error if a field in this list has a non-empty value. 13735 // This may be used to include null fields in Patch requests. 13736 NullFields []string `json:"-"` 13737 } 13738 13739 func (s *PartnerDataAccessConfig) MarshalJSON() ([]byte, error) { 13740 type NoMethod PartnerDataAccessConfig 13741 raw := NoMethod(*s) 13742 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13743 } 13744 13745 // PartnerGeneralConfig: General settings of a partner. 13746 type PartnerGeneralConfig struct { 13747 // CurrencyCode: Immutable. Partner's currency in ISO 4217 format. 13748 CurrencyCode string `json:"currencyCode,omitempty"` 13749 13750 // TimeZone: Immutable. The standard TZ database name of the partner's 13751 // time zone. For example, `America/New_York`. See more at: 13752 // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 13753 TimeZone string `json:"timeZone,omitempty"` 13754 13755 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 13756 // unconditionally include in API requests. By default, fields with 13757 // empty or default values are omitted from API requests. However, any 13758 // non-pointer, non-interface field appearing in ForceSendFields will be 13759 // sent to the server regardless of whether the field is empty or not. 13760 // This may be used to include empty fields in Patch requests. 13761 ForceSendFields []string `json:"-"` 13762 13763 // NullFields is a list of field names (e.g. "CurrencyCode") to include 13764 // in API requests with the JSON null value. By default, fields with 13765 // empty values are omitted from API requests. However, any field with 13766 // an empty value appearing in NullFields will be sent to the server as 13767 // null. It is an error if a field in this list has a non-empty value. 13768 // This may be used to include null fields in Patch requests. 13769 NullFields []string `json:"-"` 13770 } 13771 13772 func (s *PartnerGeneralConfig) MarshalJSON() ([]byte, error) { 13773 type NoMethod PartnerGeneralConfig 13774 raw := NoMethod(*s) 13775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13776 } 13777 13778 // PartnerRevenueModel: Settings that control how partner revenue is 13779 // calculated. 13780 type PartnerRevenueModel struct { 13781 // MarkupAmount: Required. The markup amount of the partner revenue 13782 // model. Must be greater than or equal to 0. * When the markup_type is 13783 // set to be `PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM`, this field 13784 // represents the CPM markup in micros of advertiser's currency. For 13785 // example, 1500000 represents 1.5 standard units of the currency. * 13786 // When the markup_type is set to be 13787 // `PARTNER_REVENUE_MODEL_MARKUP_TYPE_MEDIA_COST_MARKUP`, this field 13788 // represents the media cost percent markup in millis. For example, 100 13789 // represents 0.1% (decimal 0.001). * When the markup_type is set to be 13790 // `PARTNER_REVENUE_MODEL_MARKUP_TYPE_TOTAL_MEDIA_COST_MARKUP`, this 13791 // field represents the total media cost percent markup in millis. For 13792 // example, 100 represents 0.1% (decimal 0.001). 13793 MarkupAmount int64 `json:"markupAmount,omitempty,string"` 13794 13795 // MarkupType: Required. The markup type of the partner revenue model. 13796 // 13797 // Possible values: 13798 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_UNSPECIFIED" - Type value is not 13799 // specified or is unknown in this version. 13800 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM" - Calculate the partner 13801 // revenue based on a fixed CPM. 13802 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_MEDIA_COST_MARKUP" - Calculate 13803 // the partner revenue based on a percentage surcharge of its media 13804 // cost. 13805 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_TOTAL_MEDIA_COST_MARKUP" - 13806 // Calculate the partner revenue based on a percentage surcharge of its 13807 // total media cost, which includes all partner costs and data costs. 13808 MarkupType string `json:"markupType,omitempty"` 13809 13810 // ForceSendFields is a list of field names (e.g. "MarkupAmount") to 13811 // unconditionally include in API requests. By default, fields with 13812 // empty or default values are omitted from API requests. However, any 13813 // non-pointer, non-interface field appearing in ForceSendFields will be 13814 // sent to the server regardless of whether the field is empty or not. 13815 // This may be used to include empty fields in Patch requests. 13816 ForceSendFields []string `json:"-"` 13817 13818 // NullFields is a list of field names (e.g. "MarkupAmount") to include 13819 // in API requests with the JSON null value. By default, fields with 13820 // empty values are omitted from API requests. However, any field with 13821 // an empty value appearing in NullFields will be sent to the server as 13822 // null. It is an error if a field in this list has a non-empty value. 13823 // This may be used to include null fields in Patch requests. 13824 NullFields []string `json:"-"` 13825 } 13826 13827 func (s *PartnerRevenueModel) MarshalJSON() ([]byte, error) { 13828 type NoMethod PartnerRevenueModel 13829 raw := NoMethod(*s) 13830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13831 } 13832 13833 // PerformanceGoal: Settings that control the performance goal of a 13834 // campaign. 13835 type PerformanceGoal struct { 13836 // PerformanceGoalAmountMicros: The goal amount, in micros of the 13837 // advertiser's currency. Applicable when performance_goal_type is one 13838 // of: * `PERFORMANCE_GOAL_TYPE_CPM` * `PERFORMANCE_GOAL_TYPE_CPC` * 13839 // `PERFORMANCE_GOAL_TYPE_CPA` * `PERFORMANCE_GOAL_TYPE_CPIAVC` * 13840 // `PERFORMANCE_GOAL_TYPE_VCPM` For example 1500000 represents 1.5 13841 // standard units of the currency. 13842 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"` 13843 13844 // PerformanceGoalPercentageMicros: The decimal representation of the 13845 // goal percentage in micros. Applicable when performance_goal_type is 13846 // one of: * `PERFORMANCE_GOAL_TYPE_CTR` * 13847 // `PERFORMANCE_GOAL_TYPE_VIEWABILITY` * 13848 // `PERFORMANCE_GOAL_TYPE_CLICK_CVR` * 13849 // `PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR` * `PERFORMANCE_GOAL_TYPE_VTR` 13850 // * `PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE` * 13851 // `PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE` For example, 70000 13852 // represents 7% (decimal 0.07). 13853 PerformanceGoalPercentageMicros int64 `json:"performanceGoalPercentageMicros,omitempty,string"` 13854 13855 // PerformanceGoalString: A key performance indicator (KPI) string, 13856 // which can be empty. Must be UTF-8 encoded with a length of no more 13857 // than 100 characters. Applicable when performance_goal_type is set to 13858 // `PERFORMANCE_GOAL_TYPE_OTHER`. 13859 PerformanceGoalString string `json:"performanceGoalString,omitempty"` 13860 13861 // PerformanceGoalType: Required. The type of the performance goal. 13862 // 13863 // Possible values: 13864 // "PERFORMANCE_GOAL_TYPE_UNSPECIFIED" - Performance goal type is not 13865 // specified or is unknown in this version. 13866 // "PERFORMANCE_GOAL_TYPE_CPM" - The performance goal is set in CPM 13867 // (cost per mille). 13868 // "PERFORMANCE_GOAL_TYPE_CPC" - The performance goal is set in CPC 13869 // (cost per click). 13870 // "PERFORMANCE_GOAL_TYPE_CPA" - The performance goal is set in CPA 13871 // (cost per action). 13872 // "PERFORMANCE_GOAL_TYPE_CTR" - The performance goal is set in CTR 13873 // (click-through rate) percentage. 13874 // "PERFORMANCE_GOAL_TYPE_VIEWABILITY" - The performance goal is set 13875 // in Viewability percentage. 13876 // "PERFORMANCE_GOAL_TYPE_CPIAVC" - The performance goal is set as 13877 // CPIAVC (cost per impression audible and visible at completion). 13878 // "PERFORMANCE_GOAL_TYPE_CPE" - The performance goal is set in CPE 13879 // (cost per engagement). 13880 // "PERFORMANCE_GOAL_TYPE_CLICK_CVR" - The performance goal is set in 13881 // click conversion rate (conversions per click) percentage. 13882 // "PERFORMANCE_GOAL_TYPE_IMPRESSION_CVR" - The performance goal is 13883 // set in impression conversion rate (conversions per impression) 13884 // percentage. 13885 // "PERFORMANCE_GOAL_TYPE_VCPM" - The performance goal is set in VCPM 13886 // (cost per thousand viewable impressions). 13887 // "PERFORMANCE_GOAL_TYPE_VTR" - The performance goal is set in 13888 // YouTube view rate (YouTube views per impression) percentage. 13889 // "PERFORMANCE_GOAL_TYPE_AUDIO_COMPLETION_RATE" - The performance 13890 // goal is set in audio completion rate (complete audio listens per 13891 // impression) percentage. 13892 // "PERFORMANCE_GOAL_TYPE_VIDEO_COMPLETION_RATE" - The performance 13893 // goal is set in video completion rate (complete video views per 13894 // impression) percentage. 13895 // "PERFORMANCE_GOAL_TYPE_OTHER" - The performance goal is set to 13896 // Other. 13897 PerformanceGoalType string `json:"performanceGoalType,omitempty"` 13898 13899 // ForceSendFields is a list of field names (e.g. 13900 // "PerformanceGoalAmountMicros") to unconditionally include in API 13901 // requests. By default, fields with empty or default values are omitted 13902 // from API requests. However, any non-pointer, non-interface field 13903 // appearing in ForceSendFields will be sent to the server regardless of 13904 // whether the field is empty or not. This may be used to include empty 13905 // fields in Patch requests. 13906 ForceSendFields []string `json:"-"` 13907 13908 // NullFields is a list of field names (e.g. 13909 // "PerformanceGoalAmountMicros") to include in API requests with the 13910 // JSON null value. By default, fields with empty values are omitted 13911 // from API requests. However, any field with an empty value appearing 13912 // in NullFields will be sent to the server as null. It is an error if a 13913 // field in this list has a non-empty value. This may be used to include 13914 // null fields in Patch requests. 13915 NullFields []string `json:"-"` 13916 } 13917 13918 func (s *PerformanceGoal) MarshalJSON() ([]byte, error) { 13919 type NoMethod PerformanceGoal 13920 raw := NoMethod(*s) 13921 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 13922 } 13923 13924 // PerformanceGoalBidStrategy: A strategy that automatically adjusts the 13925 // bid to meet or beat a specified performance goal. 13926 type PerformanceGoalBidStrategy struct { 13927 // CustomBiddingAlgorithmId: The ID of the Custom Bidding Algorithm used 13928 // by this strategy. Only applicable when performance_goal_type is set 13929 // to `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO`. 13930 CustomBiddingAlgorithmId int64 `json:"customBiddingAlgorithmId,omitempty,string"` 13931 13932 // MaxAverageCpmBidAmountMicros: The maximum average CPM that may be 13933 // bid, in micros of the advertiser's currency. Must be greater than or 13934 // equal to a billable unit of the given currency. Not applicable when 13935 // performance_goal_type is set to 13936 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`. For example, 13937 // 1500000 represents 1.5 standard units of the currency. 13938 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"` 13939 13940 // PerformanceGoalAmountMicros: Required. The performance goal the 13941 // bidding strategy will attempt to meet or beat, in micros of the 13942 // advertiser's currency or in micro of the ROAS (Return On Advertising 13943 // Spend) value which is also based on advertiser's currency. Must be 13944 // greater than or equal to a billable unit of the given currency and 13945 // smaller or equal to upper bounds. Each performance_goal_type has its 13946 // upper bound: * when performance_goal_type is 13947 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA`, upper bound is 10000.00 13948 // USD. * when performance_goal_type is 13949 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC`, upper bound is 1000.00 13950 // USD. * when performance_goal_type is 13951 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`, upper bound is 13952 // 1000.00 USD. * when performance_goal_type is 13953 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO`, upper bound is 13954 // 1000.00 and lower bound is 0.01. Example: If set to 13955 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`, the bid price 13956 // will be based on the probability that each available impression will 13957 // be viewable. For example, if viewable CPM target is $2 and an 13958 // impression is 40% likely to be viewable, the bid price will be $0.80 13959 // CPM (40% of $2). For example, 1500000 represents 1.5 standard units 13960 // of the currency or ROAS value. 13961 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"` 13962 13963 // PerformanceGoalType: Required. The type of the performance goal that 13964 // the bidding strategy will try to meet or beat. For line item level 13965 // usage, the value must be one of: * 13966 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA` * 13967 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC` * 13968 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM` * 13969 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO`. 13970 // 13971 // Possible values: 13972 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_UNSPECIFIED" - Type value 13973 // is not specified or is unknown in this version. 13974 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA" - Cost per action. 13975 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC" - Cost per click. 13976 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM" - Viewable 13977 // CPM. 13978 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CUSTOM_ALGO" - Custom 13979 // bidding algorithm. 13980 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA" - Completed inview 13981 // and audible views. 13982 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN" - Inview time over 13983 // 10 secs views. 13984 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED" - Viewable 13985 // impressions. 13986 PerformanceGoalType string `json:"performanceGoalType,omitempty"` 13987 13988 // ForceSendFields is a list of field names (e.g. 13989 // "CustomBiddingAlgorithmId") to unconditionally include in API 13990 // requests. By default, fields with empty or default values are omitted 13991 // from API requests. However, any non-pointer, non-interface field 13992 // appearing in ForceSendFields will be sent to the server regardless of 13993 // whether the field is empty or not. This may be used to include empty 13994 // fields in Patch requests. 13995 ForceSendFields []string `json:"-"` 13996 13997 // NullFields is a list of field names (e.g. "CustomBiddingAlgorithmId") 13998 // to include in API requests with the JSON null value. By default, 13999 // fields with empty values are omitted from API requests. However, any 14000 // field with an empty value appearing in NullFields will be sent to the 14001 // server as null. It is an error if a field in this list has a 14002 // non-empty value. This may be used to include null fields in Patch 14003 // requests. 14004 NullFields []string `json:"-"` 14005 } 14006 14007 func (s *PerformanceGoalBidStrategy) MarshalJSON() ([]byte, error) { 14008 type NoMethod PerformanceGoalBidStrategy 14009 raw := NoMethod(*s) 14010 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14011 } 14012 14013 // PoiAssignedTargetingOptionDetails: Details for assigned POI targeting 14014 // option. This will be populated in the details field of an 14015 // AssignedTargetingOption when targeting_type is `TARGETING_TYPE_POI`. 14016 type PoiAssignedTargetingOptionDetails struct { 14017 // DisplayName: Output only. The display name of a POI, e.g. "Times 14018 // Square", "Space Needle", followed by its full address if available. 14019 DisplayName string `json:"displayName,omitempty"` 14020 14021 // Latitude: Output only. Latitude of the POI rounding to 6th decimal 14022 // place. 14023 Latitude float64 `json:"latitude,omitempty"` 14024 14025 // Longitude: Output only. Longitude of the POI rounding to 6th decimal 14026 // place. 14027 Longitude float64 `json:"longitude,omitempty"` 14028 14029 // ProximityRadiusAmount: Required. The radius of the area around the 14030 // POI that will be targeted. The units of the radius are specified by 14031 // proximity_radius_unit. Must be 1 to 800 if unit is 14032 // `DISTANCE_UNIT_KILOMETERS` and 1 to 500 if unit is 14033 // `DISTANCE_UNIT_MILES`. 14034 ProximityRadiusAmount float64 `json:"proximityRadiusAmount,omitempty"` 14035 14036 // ProximityRadiusUnit: Required. The unit of distance by which the 14037 // targeting radius is measured. 14038 // 14039 // Possible values: 14040 // "DISTANCE_UNIT_UNSPECIFIED" - Type value is not specified or is 14041 // unknown in this version. 14042 // "DISTANCE_UNIT_MILES" - Miles. 14043 // "DISTANCE_UNIT_KILOMETERS" - Kilometers. 14044 ProximityRadiusUnit string `json:"proximityRadiusUnit,omitempty"` 14045 14046 // TargetingOptionId: Required. The targeting_option_id of a 14047 // TargetingOption of type `TARGETING_TYPE_POI`. Accepted POI targeting 14048 // option IDs can be retrieved using 14049 // `targetingTypes.targetingOptions.search`. If targeting a specific 14050 // latitude/longitude coordinate removed from an address or POI name, 14051 // you can generate the necessary targeting option ID by rounding the 14052 // desired coordinate values to the 6th decimal place, removing the 14053 // decimals, and concatenating the string values separated by a 14054 // semicolon. For example, you can target the latitude/longitude pair of 14055 // 40.7414691, -74.003387 using the targeting option ID 14056 // "40741469;-74003387". **Upon** **creation, this field value will be 14057 // updated to append a semicolon and** **alphanumerical hash value if 14058 // only latitude/longitude coordinates are** **provided.** 14059 TargetingOptionId string `json:"targetingOptionId,omitempty"` 14060 14061 // ForceSendFields is a list of field names (e.g. "DisplayName") to 14062 // unconditionally include in API requests. By default, fields with 14063 // empty or default values are omitted from API requests. However, any 14064 // non-pointer, non-interface field appearing in ForceSendFields will be 14065 // sent to the server regardless of whether the field is empty or not. 14066 // This may be used to include empty fields in Patch requests. 14067 ForceSendFields []string `json:"-"` 14068 14069 // NullFields is a list of field names (e.g. "DisplayName") to include 14070 // in API requests with the JSON null value. By default, fields with 14071 // empty values are omitted from API requests. However, any field with 14072 // an empty value appearing in NullFields will be sent to the server as 14073 // null. It is an error if a field in this list has a non-empty value. 14074 // This may be used to include null fields in Patch requests. 14075 NullFields []string `json:"-"` 14076 } 14077 14078 func (s *PoiAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 14079 type NoMethod PoiAssignedTargetingOptionDetails 14080 raw := NoMethod(*s) 14081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14082 } 14083 14084 func (s *PoiAssignedTargetingOptionDetails) UnmarshalJSON(data []byte) error { 14085 type NoMethod PoiAssignedTargetingOptionDetails 14086 var s1 struct { 14087 Latitude gensupport.JSONFloat64 `json:"latitude"` 14088 Longitude gensupport.JSONFloat64 `json:"longitude"` 14089 ProximityRadiusAmount gensupport.JSONFloat64 `json:"proximityRadiusAmount"` 14090 *NoMethod 14091 } 14092 s1.NoMethod = (*NoMethod)(s) 14093 if err := json.Unmarshal(data, &s1); err != nil { 14094 return err 14095 } 14096 s.Latitude = float64(s1.Latitude) 14097 s.Longitude = float64(s1.Longitude) 14098 s.ProximityRadiusAmount = float64(s1.ProximityRadiusAmount) 14099 return nil 14100 } 14101 14102 // PoiSearchTerms: Search terms for POI targeting options. 14103 type PoiSearchTerms struct { 14104 // PoiQuery: The search query for the desired POI name, street address, 14105 // or coordinate of the desired POI. The query can be a prefix, e.g. 14106 // "Times squar", "40.7505045,-73.99562", "315 W 44th St", etc. 14107 PoiQuery string `json:"poiQuery,omitempty"` 14108 14109 // ForceSendFields is a list of field names (e.g. "PoiQuery") to 14110 // unconditionally include in API requests. By default, fields with 14111 // empty or default values are omitted from API requests. However, any 14112 // non-pointer, non-interface field appearing in ForceSendFields will be 14113 // sent to the server regardless of whether the field is empty or not. 14114 // This may be used to include empty fields in Patch requests. 14115 ForceSendFields []string `json:"-"` 14116 14117 // NullFields is a list of field names (e.g. "PoiQuery") to include in 14118 // API requests with the JSON null value. By default, fields with empty 14119 // values are omitted from API requests. However, any field with an 14120 // empty value appearing in NullFields will be sent to the server as 14121 // null. It is an error if a field in this list has a non-empty value. 14122 // This may be used to include null fields in Patch requests. 14123 NullFields []string `json:"-"` 14124 } 14125 14126 func (s *PoiSearchTerms) MarshalJSON() ([]byte, error) { 14127 type NoMethod PoiSearchTerms 14128 raw := NoMethod(*s) 14129 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14130 } 14131 14132 // PoiTargetingOptionDetails: Represents a targetable point of 14133 // interest(POI). This will be populated in the poi_details field when 14134 // targeting_type is `TARGETING_TYPE_POI`. 14135 type PoiTargetingOptionDetails struct { 14136 // DisplayName: Output only. The display name of a POI(e.g. "Times 14137 // Square", "Space Needle"), followed by its full address if available. 14138 DisplayName string `json:"displayName,omitempty"` 14139 14140 // Latitude: Output only. Latitude of the POI rounding to 6th decimal 14141 // place. 14142 Latitude float64 `json:"latitude,omitempty"` 14143 14144 // Longitude: Output only. Longitude of the POI rounding to 6th decimal 14145 // place. 14146 Longitude float64 `json:"longitude,omitempty"` 14147 14148 // ForceSendFields is a list of field names (e.g. "DisplayName") to 14149 // unconditionally include in API requests. By default, fields with 14150 // empty or default values are omitted from API requests. However, any 14151 // non-pointer, non-interface field appearing in ForceSendFields will be 14152 // sent to the server regardless of whether the field is empty or not. 14153 // This may be used to include empty fields in Patch requests. 14154 ForceSendFields []string `json:"-"` 14155 14156 // NullFields is a list of field names (e.g. "DisplayName") to include 14157 // in API requests with the JSON null value. By default, fields with 14158 // empty values are omitted from API requests. However, any field with 14159 // an empty value appearing in NullFields will be sent to the server as 14160 // null. It is an error if a field in this list has a non-empty value. 14161 // This may be used to include null fields in Patch requests. 14162 NullFields []string `json:"-"` 14163 } 14164 14165 func (s *PoiTargetingOptionDetails) MarshalJSON() ([]byte, error) { 14166 type NoMethod PoiTargetingOptionDetails 14167 raw := NoMethod(*s) 14168 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14169 } 14170 14171 func (s *PoiTargetingOptionDetails) UnmarshalJSON(data []byte) error { 14172 type NoMethod PoiTargetingOptionDetails 14173 var s1 struct { 14174 Latitude gensupport.JSONFloat64 `json:"latitude"` 14175 Longitude gensupport.JSONFloat64 `json:"longitude"` 14176 *NoMethod 14177 } 14178 s1.NoMethod = (*NoMethod)(s) 14179 if err := json.Unmarshal(data, &s1); err != nil { 14180 return err 14181 } 14182 s.Latitude = float64(s1.Latitude) 14183 s.Longitude = float64(s1.Longitude) 14184 return nil 14185 } 14186 14187 // PrismaConfig: Settings specific to the Mediaocean Prisma tool. 14188 type PrismaConfig struct { 14189 // PrismaCpeCode: Required. Relevant client, product, and estimate codes 14190 // from the Mediaocean Prisma tool. 14191 PrismaCpeCode *PrismaCpeCode `json:"prismaCpeCode,omitempty"` 14192 14193 // PrismaType: Required. The Prisma type. 14194 // 14195 // Possible values: 14196 // "PRISMA_TYPE_UNSPECIFIED" - Type is not specified or unknown in 14197 // this version. 14198 // "PRISMA_TYPE_DISPLAY" - Display type. 14199 // "PRISMA_TYPE_SEARCH" - Search type. 14200 // "PRISMA_TYPE_VIDEO" - Video type. 14201 // "PRISMA_TYPE_AUDIO" - Audio type. 14202 // "PRISMA_TYPE_SOCIAL" - Social type. 14203 // "PRISMA_TYPE_FEE" - Fee type. 14204 PrismaType string `json:"prismaType,omitempty"` 14205 14206 // Supplier: Required. The entity allocated this budget (DSP, site, 14207 // etc.). 14208 Supplier string `json:"supplier,omitempty"` 14209 14210 // ForceSendFields is a list of field names (e.g. "PrismaCpeCode") to 14211 // unconditionally include in API requests. By default, fields with 14212 // empty or default values are omitted from API requests. However, any 14213 // non-pointer, non-interface field appearing in ForceSendFields will be 14214 // sent to the server regardless of whether the field is empty or not. 14215 // This may be used to include empty fields in Patch requests. 14216 ForceSendFields []string `json:"-"` 14217 14218 // NullFields is a list of field names (e.g. "PrismaCpeCode") to include 14219 // in API requests with the JSON null value. By default, fields with 14220 // empty values are omitted from API requests. However, any field with 14221 // an empty value appearing in NullFields will be sent to the server as 14222 // null. It is an error if a field in this list has a non-empty value. 14223 // This may be used to include null fields in Patch requests. 14224 NullFields []string `json:"-"` 14225 } 14226 14227 func (s *PrismaConfig) MarshalJSON() ([]byte, error) { 14228 type NoMethod PrismaConfig 14229 raw := NoMethod(*s) 14230 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14231 } 14232 14233 // PrismaCpeCode: Google Payments Center supports searching and 14234 // filtering on the component fields of this code. 14235 type PrismaCpeCode struct { 14236 // PrismaClientCode: The Prisma client code. 14237 PrismaClientCode string `json:"prismaClientCode,omitempty"` 14238 14239 // PrismaEstimateCode: The Prisma estimate code. 14240 PrismaEstimateCode string `json:"prismaEstimateCode,omitempty"` 14241 14242 // PrismaProductCode: The Prisma product code. 14243 PrismaProductCode string `json:"prismaProductCode,omitempty"` 14244 14245 // ForceSendFields is a list of field names (e.g. "PrismaClientCode") to 14246 // unconditionally include in API requests. By default, fields with 14247 // empty or default values are omitted from API requests. However, any 14248 // non-pointer, non-interface field appearing in ForceSendFields will be 14249 // sent to the server regardless of whether the field is empty or not. 14250 // This may be used to include empty fields in Patch requests. 14251 ForceSendFields []string `json:"-"` 14252 14253 // NullFields is a list of field names (e.g. "PrismaClientCode") to 14254 // include in API requests with the JSON null value. By default, fields 14255 // with empty values are omitted from API requests. However, any field 14256 // with an empty value appearing in NullFields will be sent to the 14257 // server as null. It is an error if a field in this list has a 14258 // non-empty value. This may be used to include null fields in Patch 14259 // requests. 14260 NullFields []string `json:"-"` 14261 } 14262 14263 func (s *PrismaCpeCode) MarshalJSON() ([]byte, error) { 14264 type NoMethod PrismaCpeCode 14265 raw := NoMethod(*s) 14266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14267 } 14268 14269 // ProximityLocationListAssignedTargetingOptionDetails: Targeting 14270 // details for proximity location list. This will be populated in the 14271 // details field of an AssignedTargetingOption when targeting_type is 14272 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST`. 14273 type ProximityLocationListAssignedTargetingOptionDetails struct { 14274 // ProximityLocationListId: Required. ID of the proximity location list. 14275 // Should refer to the location_list_id field of a LocationList resource 14276 // whose type is `TARGETING_LOCATION_TYPE_PROXIMITY`. 14277 ProximityLocationListId int64 `json:"proximityLocationListId,omitempty,string"` 14278 14279 // ProximityRadiusRange: Required. Radius range for proximity location 14280 // list. This represents the size of the area around a chosen location 14281 // that will be targeted. `All` proximity location targeting under a 14282 // single resource must have the same radius range value. Set this value 14283 // to match any existing targeting. If updated, this field will change 14284 // the radius range for all proximity targeting under the resource. 14285 // 14286 // Possible values: 14287 // "PROXIMITY_RADIUS_RANGE_UNSPECIFIED" - The targeted radius range is 14288 // not specified or is unknown. Default value when radius range is not 14289 // specified in this version. This enum is a placeholder for default 14290 // value and does not represent a real radius range option. 14291 // "PROXIMITY_RADIUS_RANGE_SMALL" - The targeted radius range is 14292 // small. 14293 // "PROXIMITY_RADIUS_RANGE_MEDIUM" - The targeted radius range is 14294 // medium. 14295 // "PROXIMITY_RADIUS_RANGE_LARGE" - The targeted radius range is 14296 // large. 14297 ProximityRadiusRange string `json:"proximityRadiusRange,omitempty"` 14298 14299 // ForceSendFields is a list of field names (e.g. 14300 // "ProximityLocationListId") to unconditionally include in API 14301 // requests. By default, fields with empty or default values are omitted 14302 // from API requests. However, any non-pointer, non-interface field 14303 // appearing in ForceSendFields will be sent to the server regardless of 14304 // whether the field is empty or not. This may be used to include empty 14305 // fields in Patch requests. 14306 ForceSendFields []string `json:"-"` 14307 14308 // NullFields is a list of field names (e.g. "ProximityLocationListId") 14309 // to include in API requests with the JSON null value. By default, 14310 // fields with empty values are omitted from API requests. However, any 14311 // field with an empty value appearing in NullFields will be sent to the 14312 // server as null. It is an error if a field in this list has a 14313 // non-empty value. This may be used to include null fields in Patch 14314 // requests. 14315 NullFields []string `json:"-"` 14316 } 14317 14318 func (s *ProximityLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 14319 type NoMethod ProximityLocationListAssignedTargetingOptionDetails 14320 raw := NoMethod(*s) 14321 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14322 } 14323 14324 // PublisherReviewStatus: Publisher review status for the creative. 14325 type PublisherReviewStatus struct { 14326 // PublisherName: The publisher reviewing the creative. 14327 PublisherName string `json:"publisherName,omitempty"` 14328 14329 // Status: Status of the publisher review. 14330 // 14331 // Possible values: 14332 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 14333 // unknown in this version. 14334 // "REVIEW_STATUS_APPROVED" - The creative is approved. 14335 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 14336 // "REVIEW_STATUS_PENDING" - The creative is pending review. 14337 Status string `json:"status,omitempty"` 14338 14339 // ForceSendFields is a list of field names (e.g. "PublisherName") to 14340 // unconditionally include in API requests. By default, fields with 14341 // empty or default values are omitted from API requests. However, any 14342 // non-pointer, non-interface field appearing in ForceSendFields will be 14343 // sent to the server regardless of whether the field is empty or not. 14344 // This may be used to include empty fields in Patch requests. 14345 ForceSendFields []string `json:"-"` 14346 14347 // NullFields is a list of field names (e.g. "PublisherName") to include 14348 // in API requests with the JSON null value. By default, fields with 14349 // empty values are omitted from API requests. However, any field with 14350 // an empty value appearing in NullFields will be sent to the server as 14351 // null. It is an error if a field in this list has a non-empty value. 14352 // This may be used to include null fields in Patch requests. 14353 NullFields []string `json:"-"` 14354 } 14355 14356 func (s *PublisherReviewStatus) MarshalJSON() ([]byte, error) { 14357 type NoMethod PublisherReviewStatus 14358 raw := NoMethod(*s) 14359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14360 } 14361 14362 // RateDetails: The rate related settings of the inventory source. 14363 type RateDetails struct { 14364 // InventorySourceRateType: The rate type. Acceptable values are 14365 // `INVENTORY_SOURCE_RATE_TYPE_CPM_FIXED`, 14366 // `INVENTORY_SOURCE_RATE_TYPE_CPM_FLOOR`, and 14367 // `INVENTORY_SOURCE_RATE_TYPE_CPD`. 14368 // 14369 // Possible values: 14370 // "INVENTORY_SOURCE_RATE_TYPE_UNSPECIFIED" - The rate type is not 14371 // specified or is unknown in this version. 14372 // "INVENTORY_SOURCE_RATE_TYPE_CPM_FIXED" - The rate type is CPM 14373 // (Fixed). 14374 // "INVENTORY_SOURCE_RATE_TYPE_CPM_FLOOR" - The rate type is CPM 14375 // (Floor). 14376 // "INVENTORY_SOURCE_RATE_TYPE_CPD" - The rate type is Cost per Day. 14377 // "INVENTORY_SOURCE_RATE_TYPE_FLAT" - The rate type is Flat. 14378 InventorySourceRateType string `json:"inventorySourceRateType,omitempty"` 14379 14380 // MinimumSpend: Output only. The amount that the buyer has committed to 14381 // spending on the inventory source up front. Only applicable for 14382 // guaranteed inventory sources. 14383 MinimumSpend *Money `json:"minimumSpend,omitempty"` 14384 14385 // Rate: The rate for the inventory source. 14386 Rate *Money `json:"rate,omitempty"` 14387 14388 // UnitsPurchased: Required for guaranteed inventory sources. The number 14389 // of impressions guaranteed by the seller. 14390 UnitsPurchased int64 `json:"unitsPurchased,omitempty,string"` 14391 14392 // ForceSendFields is a list of field names (e.g. 14393 // "InventorySourceRateType") to unconditionally include in API 14394 // requests. By default, fields with empty or default values are omitted 14395 // from API requests. However, any non-pointer, non-interface field 14396 // appearing in ForceSendFields will be sent to the server regardless of 14397 // whether the field is empty or not. This may be used to include empty 14398 // fields in Patch requests. 14399 ForceSendFields []string `json:"-"` 14400 14401 // NullFields is a list of field names (e.g. "InventorySourceRateType") 14402 // to include in API requests with the JSON null value. By default, 14403 // fields with empty values are omitted from API requests. However, any 14404 // field with an empty value appearing in NullFields will be sent to the 14405 // server as null. It is an error if a field in this list has a 14406 // non-empty value. This may be used to include null fields in Patch 14407 // requests. 14408 NullFields []string `json:"-"` 14409 } 14410 14411 func (s *RateDetails) MarshalJSON() ([]byte, error) { 14412 type NoMethod RateDetails 14413 raw := NoMethod(*s) 14414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14415 } 14416 14417 // RegionalLocationListAssignedTargetingOptionDetails: Targeting details 14418 // for regional location list. This will be populated in the details 14419 // field of an AssignedTargetingOption when targeting_type is 14420 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST`. 14421 type RegionalLocationListAssignedTargetingOptionDetails struct { 14422 // Negative: Indicates if this option is being negatively targeted. 14423 Negative bool `json:"negative,omitempty"` 14424 14425 // RegionalLocationListId: Required. ID of the regional location list. 14426 // Should refer to the location_list_id field of a LocationList resource 14427 // whose type is `TARGETING_LOCATION_TYPE_REGIONAL`. 14428 RegionalLocationListId int64 `json:"regionalLocationListId,omitempty,string"` 14429 14430 // ForceSendFields is a list of field names (e.g. "Negative") to 14431 // unconditionally include in API requests. By default, fields with 14432 // empty or default values are omitted from API requests. However, any 14433 // non-pointer, non-interface field appearing in ForceSendFields will be 14434 // sent to the server regardless of whether the field is empty or not. 14435 // This may be used to include empty fields in Patch requests. 14436 ForceSendFields []string `json:"-"` 14437 14438 // NullFields is a list of field names (e.g. "Negative") to include in 14439 // API requests with the JSON null value. By default, fields with empty 14440 // values are omitted from API requests. However, any field with an 14441 // empty value appearing in NullFields will be sent to the server as 14442 // null. It is an error if a field in this list has a non-empty value. 14443 // This may be used to include null fields in Patch requests. 14444 NullFields []string `json:"-"` 14445 } 14446 14447 func (s *RegionalLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 14448 type NoMethod RegionalLocationListAssignedTargetingOptionDetails 14449 raw := NoMethod(*s) 14450 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14451 } 14452 14453 // ReplaceNegativeKeywordsRequest: Request message for 14454 // NegativeKeywordService.ReplaceNegativeKeywords. 14455 type ReplaceNegativeKeywordsRequest struct { 14456 // NewNegativeKeywords: The negative keywords that will replace the 14457 // existing keywords in the negative keyword list, specified as a list 14458 // of NegativeKeywords. 14459 NewNegativeKeywords []*NegativeKeyword `json:"newNegativeKeywords,omitempty"` 14460 14461 // ForceSendFields is a list of field names (e.g. "NewNegativeKeywords") 14462 // to unconditionally include in API requests. By default, fields with 14463 // empty or default values are omitted from API requests. However, any 14464 // non-pointer, non-interface field appearing in ForceSendFields will be 14465 // sent to the server regardless of whether the field is empty or not. 14466 // This may be used to include empty fields in Patch requests. 14467 ForceSendFields []string `json:"-"` 14468 14469 // NullFields is a list of field names (e.g. "NewNegativeKeywords") to 14470 // include in API requests with the JSON null value. By default, fields 14471 // with empty values are omitted from API requests. However, any field 14472 // with an empty value appearing in NullFields will be sent to the 14473 // server as null. It is an error if a field in this list has a 14474 // non-empty value. This may be used to include null fields in Patch 14475 // requests. 14476 NullFields []string `json:"-"` 14477 } 14478 14479 func (s *ReplaceNegativeKeywordsRequest) MarshalJSON() ([]byte, error) { 14480 type NoMethod ReplaceNegativeKeywordsRequest 14481 raw := NoMethod(*s) 14482 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14483 } 14484 14485 // ReplaceNegativeKeywordsResponse: Response message for 14486 // NegativeKeywordService.ReplaceNegativeKeywords. 14487 type ReplaceNegativeKeywordsResponse struct { 14488 // NegativeKeywords: The full list of negative keywords now present in 14489 // the negative keyword list. 14490 NegativeKeywords []*NegativeKeyword `json:"negativeKeywords,omitempty"` 14491 14492 // ServerResponse contains the HTTP response code and headers from the 14493 // server. 14494 googleapi.ServerResponse `json:"-"` 14495 14496 // ForceSendFields is a list of field names (e.g. "NegativeKeywords") to 14497 // unconditionally include in API requests. By default, fields with 14498 // empty or default values are omitted from API requests. However, any 14499 // non-pointer, non-interface field appearing in ForceSendFields will be 14500 // sent to the server regardless of whether the field is empty or not. 14501 // This may be used to include empty fields in Patch requests. 14502 ForceSendFields []string `json:"-"` 14503 14504 // NullFields is a list of field names (e.g. "NegativeKeywords") to 14505 // include in API requests with the JSON null value. By default, fields 14506 // with empty values are omitted from API requests. However, any field 14507 // with an empty value appearing in NullFields will be sent to the 14508 // server as null. It is an error if a field in this list has a 14509 // non-empty value. This may be used to include null fields in Patch 14510 // requests. 14511 NullFields []string `json:"-"` 14512 } 14513 14514 func (s *ReplaceNegativeKeywordsResponse) MarshalJSON() ([]byte, error) { 14515 type NoMethod ReplaceNegativeKeywordsResponse 14516 raw := NoMethod(*s) 14517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14518 } 14519 14520 // ReplaceSitesRequest: Request message for SiteService.ReplaceSites. 14521 type ReplaceSitesRequest struct { 14522 // AdvertiserId: The ID of the advertiser that owns the parent channel. 14523 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 14524 14525 // NewSites: The sites that will replace the existing sites assigned to 14526 // the channel, specified as a list of Sites. 14527 NewSites []*Site `json:"newSites,omitempty"` 14528 14529 // PartnerId: The ID of the partner that owns the parent channel. 14530 PartnerId int64 `json:"partnerId,omitempty,string"` 14531 14532 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 14533 // unconditionally include in API requests. By default, fields with 14534 // empty or default values are omitted from API requests. However, any 14535 // non-pointer, non-interface field appearing in ForceSendFields will be 14536 // sent to the server regardless of whether the field is empty or not. 14537 // This may be used to include empty fields in Patch requests. 14538 ForceSendFields []string `json:"-"` 14539 14540 // NullFields is a list of field names (e.g. "AdvertiserId") to include 14541 // in API requests with the JSON null value. By default, fields with 14542 // empty values are omitted from API requests. However, any field with 14543 // an empty value appearing in NullFields will be sent to the server as 14544 // null. It is an error if a field in this list has a non-empty value. 14545 // This may be used to include null fields in Patch requests. 14546 NullFields []string `json:"-"` 14547 } 14548 14549 func (s *ReplaceSitesRequest) MarshalJSON() ([]byte, error) { 14550 type NoMethod ReplaceSitesRequest 14551 raw := NoMethod(*s) 14552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14553 } 14554 14555 // ReplaceSitesResponse: Response message for SiteService.ReplaceSites. 14556 type ReplaceSitesResponse struct { 14557 // Sites: The list of sites in the channel after replacing. 14558 Sites []*Site `json:"sites,omitempty"` 14559 14560 // ServerResponse contains the HTTP response code and headers from the 14561 // server. 14562 googleapi.ServerResponse `json:"-"` 14563 14564 // ForceSendFields is a list of field names (e.g. "Sites") to 14565 // unconditionally include in API requests. By default, fields with 14566 // empty or default values are omitted from API requests. However, any 14567 // non-pointer, non-interface field appearing in ForceSendFields will be 14568 // sent to the server regardless of whether the field is empty or not. 14569 // This may be used to include empty fields in Patch requests. 14570 ForceSendFields []string `json:"-"` 14571 14572 // NullFields is a list of field names (e.g. "Sites") to include in API 14573 // requests with the JSON null value. By default, fields with empty 14574 // values are omitted from API requests. However, any field with an 14575 // empty value appearing in NullFields will be sent to the server as 14576 // null. It is an error if a field in this list has a non-empty value. 14577 // This may be used to include null fields in Patch requests. 14578 NullFields []string `json:"-"` 14579 } 14580 14581 func (s *ReplaceSitesResponse) MarshalJSON() ([]byte, error) { 14582 type NoMethod ReplaceSitesResponse 14583 raw := NoMethod(*s) 14584 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14585 } 14586 14587 // ReviewStatusInfo: Review statuses for the creative. 14588 type ReviewStatusInfo struct { 14589 // ApprovalStatus: Represents the basic approval needed for a creative 14590 // to begin serving. Summary of creative_and_landing_page_review_status 14591 // and content_and_policy_review_status. 14592 // 14593 // Possible values: 14594 // "APPROVAL_STATUS_UNSPECIFIED" - Type value is not specified or is 14595 // unknown in this version. 14596 // "APPROVAL_STATUS_PENDING_NOT_SERVABLE" - The creative is still 14597 // under review and not servable. 14598 // "APPROVAL_STATUS_PENDING_SERVABLE" - The creative has passed 14599 // creative & landing page review and is servable, but is awaiting 14600 // additional content & policy review. 14601 // "APPROVAL_STATUS_APPROVED_SERVABLE" - Both creative & landing page 14602 // review and content & policy review are approved. The creative is 14603 // servable. 14604 // "APPROVAL_STATUS_REJECTED_NOT_SERVABLE" - There is an issue with 14605 // the creative that must be fixed before it can serve. 14606 ApprovalStatus string `json:"approvalStatus,omitempty"` 14607 14608 // ContentAndPolicyReviewStatus: Content and policy review status for 14609 // the creative. 14610 // 14611 // Possible values: 14612 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 14613 // unknown in this version. 14614 // "REVIEW_STATUS_APPROVED" - The creative is approved. 14615 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 14616 // "REVIEW_STATUS_PENDING" - The creative is pending review. 14617 ContentAndPolicyReviewStatus string `json:"contentAndPolicyReviewStatus,omitempty"` 14618 14619 // CreativeAndLandingPageReviewStatus: Creative and landing page review 14620 // status for the creative. 14621 // 14622 // Possible values: 14623 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 14624 // unknown in this version. 14625 // "REVIEW_STATUS_APPROVED" - The creative is approved. 14626 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 14627 // "REVIEW_STATUS_PENDING" - The creative is pending review. 14628 CreativeAndLandingPageReviewStatus string `json:"creativeAndLandingPageReviewStatus,omitempty"` 14629 14630 // ExchangeReviewStatuses: Exchange review statuses for the creative. 14631 ExchangeReviewStatuses []*ExchangeReviewStatus `json:"exchangeReviewStatuses,omitempty"` 14632 14633 // PublisherReviewStatuses: Publisher review statuses for the creative. 14634 PublisherReviewStatuses []*PublisherReviewStatus `json:"publisherReviewStatuses,omitempty"` 14635 14636 // ForceSendFields is a list of field names (e.g. "ApprovalStatus") to 14637 // unconditionally include in API requests. By default, fields with 14638 // empty or default values are omitted from API requests. However, any 14639 // non-pointer, non-interface field appearing in ForceSendFields will be 14640 // sent to the server regardless of whether the field is empty or not. 14641 // This may be used to include empty fields in Patch requests. 14642 ForceSendFields []string `json:"-"` 14643 14644 // NullFields is a list of field names (e.g. "ApprovalStatus") to 14645 // include in API requests with the JSON null value. By default, fields 14646 // with empty values are omitted from API requests. However, any field 14647 // with an empty value appearing in NullFields will be sent to the 14648 // server as null. It is an error if a field in this list has a 14649 // non-empty value. This may be used to include null fields in Patch 14650 // requests. 14651 NullFields []string `json:"-"` 14652 } 14653 14654 func (s *ReviewStatusInfo) MarshalJSON() ([]byte, error) { 14655 type NoMethod ReviewStatusInfo 14656 raw := NoMethod(*s) 14657 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14658 } 14659 14660 // ScriptError: An error message for a custom bidding script. 14661 type ScriptError struct { 14662 // Column: The column number in the script where the error was thrown. 14663 Column int64 `json:"column,omitempty,string"` 14664 14665 // ErrorCode: The type of error. 14666 // 14667 // Possible values: 14668 // "ERROR_CODE_UNSPECIFIED" - The script error is not specified or is 14669 // unknown in this version. 14670 // "SYNTAX_ERROR" - The script has a syntax error. 14671 // "DEPRECATED_SYNTAX" - The script uses deprecated syntax. 14672 // "INTERNAL_ERROR" - Internal errors were thrown while processing the 14673 // script. 14674 ErrorCode string `json:"errorCode,omitempty"` 14675 14676 // ErrorMessage: The detailed error message. 14677 ErrorMessage string `json:"errorMessage,omitempty"` 14678 14679 // Line: The line number in the script where the error was thrown. 14680 Line int64 `json:"line,omitempty,string"` 14681 14682 // ForceSendFields is a list of field names (e.g. "Column") to 14683 // unconditionally include in API requests. By default, fields with 14684 // empty or default values are omitted from API requests. However, any 14685 // non-pointer, non-interface field appearing in ForceSendFields will be 14686 // sent to the server regardless of whether the field is empty or not. 14687 // This may be used to include empty fields in Patch requests. 14688 ForceSendFields []string `json:"-"` 14689 14690 // NullFields is a list of field names (e.g. "Column") to include in API 14691 // requests with the JSON null value. By default, fields with empty 14692 // values are omitted from API requests. However, any field with an 14693 // empty value appearing in NullFields will be sent to the server as 14694 // null. It is an error if a field in this list has a non-empty value. 14695 // This may be used to include null fields in Patch requests. 14696 NullFields []string `json:"-"` 14697 } 14698 14699 func (s *ScriptError) MarshalJSON() ([]byte, error) { 14700 type NoMethod ScriptError 14701 raw := NoMethod(*s) 14702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14703 } 14704 14705 // SdfConfig: Structured Data File (SDF) related settings. 14706 type SdfConfig struct { 14707 // AdminEmail: An administrator email address to which the SDF 14708 // processing status reports will be sent. 14709 AdminEmail string `json:"adminEmail,omitempty"` 14710 14711 // Version: Required. The version of SDF being used. 14712 // 14713 // Possible values: 14714 // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or 14715 // is unknown in this version. 14716 // "SDF_VERSION_3_1" - SDF version 3.1 14717 // "SDF_VERSION_4" - SDF version 4 14718 // "SDF_VERSION_4_1" - SDF version 4.1 14719 // "SDF_VERSION_4_2" - SDF version 4.2 14720 // "SDF_VERSION_5" - SDF version 5. 14721 // "SDF_VERSION_5_1" - SDF version 5.1 14722 // "SDF_VERSION_5_2" - SDF version 5.2 14723 // "SDF_VERSION_5_3" - SDF version 5.3 14724 // "SDF_VERSION_5_4" - SDF version 5.4 14725 // "SDF_VERSION_5_5" - SDF version 5.5 14726 // "SDF_VERSION_6" - SDF version 6 14727 // "SDF_VERSION_7" - SDF version 7. Read the [v7 migration 14728 // guide](/display-video/api/structured-data-file/v7-migration-guide) 14729 // before migrating to this version. Currently in beta. Only available 14730 // for use by a subset of users. 14731 Version string `json:"version,omitempty"` 14732 14733 // ForceSendFields is a list of field names (e.g. "AdminEmail") to 14734 // unconditionally include in API requests. By default, fields with 14735 // empty or default values are omitted from API requests. However, any 14736 // non-pointer, non-interface field appearing in ForceSendFields will be 14737 // sent to the server regardless of whether the field is empty or not. 14738 // This may be used to include empty fields in Patch requests. 14739 ForceSendFields []string `json:"-"` 14740 14741 // NullFields is a list of field names (e.g. "AdminEmail") to include in 14742 // API requests with the JSON null value. By default, fields with empty 14743 // values are omitted from API requests. However, any field with an 14744 // empty value appearing in NullFields will be sent to the server as 14745 // null. It is an error if a field in this list has a non-empty value. 14746 // This may be used to include null fields in Patch requests. 14747 NullFields []string `json:"-"` 14748 } 14749 14750 func (s *SdfConfig) MarshalJSON() ([]byte, error) { 14751 type NoMethod SdfConfig 14752 raw := NoMethod(*s) 14753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14754 } 14755 14756 // SdfDownloadTask: Type for the response returned by 14757 // [SdfDownloadTaskService.CreateSdfDownloadTask]. 14758 type SdfDownloadTask struct { 14759 // ResourceName: A resource name to be used in media.download to 14760 // Download the prepared files. Resource names have the format 14761 // `download/sdfdownloadtasks/media/{media_id}`. `media_id` will be made 14762 // available by the long running operation service once the task status 14763 // is done. 14764 ResourceName string `json:"resourceName,omitempty"` 14765 14766 // ForceSendFields is a list of field names (e.g. "ResourceName") to 14767 // unconditionally include in API requests. By default, fields with 14768 // empty or default values are omitted from API requests. However, any 14769 // non-pointer, non-interface field appearing in ForceSendFields will be 14770 // sent to the server regardless of whether the field is empty or not. 14771 // This may be used to include empty fields in Patch requests. 14772 ForceSendFields []string `json:"-"` 14773 14774 // NullFields is a list of field names (e.g. "ResourceName") to include 14775 // in API requests with the JSON null value. By default, fields with 14776 // empty values are omitted from API requests. However, any field with 14777 // an empty value appearing in NullFields will be sent to the server as 14778 // null. It is an error if a field in this list has a non-empty value. 14779 // This may be used to include null fields in Patch requests. 14780 NullFields []string `json:"-"` 14781 } 14782 14783 func (s *SdfDownloadTask) MarshalJSON() ([]byte, error) { 14784 type NoMethod SdfDownloadTask 14785 raw := NoMethod(*s) 14786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14787 } 14788 14789 // SdfDownloadTaskMetadata: Type for the metadata returned by 14790 // [SdfDownloadTaskService.CreateSdfDownloadTask]. 14791 type SdfDownloadTaskMetadata struct { 14792 // CreateTime: The time when the operation was created. 14793 CreateTime string `json:"createTime,omitempty"` 14794 14795 // EndTime: The time when execution was completed. 14796 EndTime string `json:"endTime,omitempty"` 14797 14798 // Version: The SDF version used to execute this download task. 14799 // 14800 // Possible values: 14801 // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or 14802 // is unknown in this version. 14803 // "SDF_VERSION_3_1" - SDF version 3.1 14804 // "SDF_VERSION_4" - SDF version 4 14805 // "SDF_VERSION_4_1" - SDF version 4.1 14806 // "SDF_VERSION_4_2" - SDF version 4.2 14807 // "SDF_VERSION_5" - SDF version 5. 14808 // "SDF_VERSION_5_1" - SDF version 5.1 14809 // "SDF_VERSION_5_2" - SDF version 5.2 14810 // "SDF_VERSION_5_3" - SDF version 5.3 14811 // "SDF_VERSION_5_4" - SDF version 5.4 14812 // "SDF_VERSION_5_5" - SDF version 5.5 14813 // "SDF_VERSION_6" - SDF version 6 14814 // "SDF_VERSION_7" - SDF version 7. Read the [v7 migration 14815 // guide](/display-video/api/structured-data-file/v7-migration-guide) 14816 // before migrating to this version. Currently in beta. Only available 14817 // for use by a subset of users. 14818 Version string `json:"version,omitempty"` 14819 14820 // ForceSendFields is a list of field names (e.g. "CreateTime") to 14821 // unconditionally include in API requests. By default, fields with 14822 // empty or default values are omitted from API requests. However, any 14823 // non-pointer, non-interface field appearing in ForceSendFields will be 14824 // sent to the server regardless of whether the field is empty or not. 14825 // This may be used to include empty fields in Patch requests. 14826 ForceSendFields []string `json:"-"` 14827 14828 // NullFields is a list of field names (e.g. "CreateTime") to include in 14829 // API requests with the JSON null value. By default, fields with empty 14830 // values are omitted from API requests. However, any field with an 14831 // empty value appearing in NullFields will be sent to the server as 14832 // null. It is an error if a field in this list has a non-empty value. 14833 // This may be used to include null fields in Patch requests. 14834 NullFields []string `json:"-"` 14835 } 14836 14837 func (s *SdfDownloadTaskMetadata) MarshalJSON() ([]byte, error) { 14838 type NoMethod SdfDownloadTaskMetadata 14839 raw := NoMethod(*s) 14840 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14841 } 14842 14843 // SearchTargetingOptionsRequest: Request message for 14844 // SearchTargetingOptions. 14845 type SearchTargetingOptionsRequest struct { 14846 // AdvertiserId: Required. The Advertiser this request is being made in 14847 // the context of. 14848 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 14849 14850 // BusinessChainSearchTerms: Search terms for Business Chain targeting 14851 // options. Can only be used when targeting_type is 14852 // `TARGETING_TYPE_BUSINESS_CHAIN`. 14853 BusinessChainSearchTerms *BusinessChainSearchTerms `json:"businessChainSearchTerms,omitempty"` 14854 14855 // GeoRegionSearchTerms: Search terms for geo region targeting options. 14856 // Can only be used when targeting_type is `TARGETING_TYPE_GEO_REGION`. 14857 GeoRegionSearchTerms *GeoRegionSearchTerms `json:"geoRegionSearchTerms,omitempty"` 14858 14859 // PageSize: Requested page size. Must be between `1` and `200`. If 14860 // unspecified will default to `100`. Returns error code 14861 // `INVALID_ARGUMENT` if an invalid value is specified. 14862 PageSize int64 `json:"pageSize,omitempty"` 14863 14864 // PageToken: A token identifying a page of results the server should 14865 // return. Typically, this is the value of next_page_token returned from 14866 // the previous call to `SearchTargetingOptions` method. If not 14867 // specified, the first page of results will be returned. 14868 PageToken string `json:"pageToken,omitempty"` 14869 14870 // PoiSearchTerms: Search terms for POI targeting options. Can only be 14871 // used when targeting_type is `TARGETING_TYPE_POI`. 14872 PoiSearchTerms *PoiSearchTerms `json:"poiSearchTerms,omitempty"` 14873 14874 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 14875 // unconditionally include in API requests. By default, fields with 14876 // empty or default values are omitted from API requests. However, any 14877 // non-pointer, non-interface field appearing in ForceSendFields will be 14878 // sent to the server regardless of whether the field is empty or not. 14879 // This may be used to include empty fields in Patch requests. 14880 ForceSendFields []string `json:"-"` 14881 14882 // NullFields is a list of field names (e.g. "AdvertiserId") to include 14883 // in API requests with the JSON null value. By default, fields with 14884 // empty values are omitted from API requests. However, any field with 14885 // an empty value appearing in NullFields will be sent to the server as 14886 // null. It is an error if a field in this list has a non-empty value. 14887 // This may be used to include null fields in Patch requests. 14888 NullFields []string `json:"-"` 14889 } 14890 14891 func (s *SearchTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 14892 type NoMethod SearchTargetingOptionsRequest 14893 raw := NoMethod(*s) 14894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14895 } 14896 14897 // SearchTargetingOptionsResponse: Response message for 14898 // SearchTargetingOptions. 14899 type SearchTargetingOptionsResponse struct { 14900 // NextPageToken: A token to retrieve the next page of results. Pass 14901 // this value in the page_token field in the subsequent call to 14902 // `SearchTargetingOptions` method to retrieve the next page of results. 14903 NextPageToken string `json:"nextPageToken,omitempty"` 14904 14905 // TargetingOptions: The list of targeting options that match the search 14906 // criteria. This list will be absent if empty. 14907 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"` 14908 14909 // ServerResponse contains the HTTP response code and headers from the 14910 // server. 14911 googleapi.ServerResponse `json:"-"` 14912 14913 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 14914 // unconditionally include in API requests. By default, fields with 14915 // empty or default values are omitted from API requests. However, any 14916 // non-pointer, non-interface field appearing in ForceSendFields will be 14917 // sent to the server regardless of whether the field is empty or not. 14918 // This may be used to include empty fields in Patch requests. 14919 ForceSendFields []string `json:"-"` 14920 14921 // NullFields is a list of field names (e.g. "NextPageToken") to include 14922 // in API requests with the JSON null value. By default, fields with 14923 // empty values are omitted from API requests. However, any field with 14924 // an empty value appearing in NullFields will be sent to the server as 14925 // null. It is an error if a field in this list has a non-empty value. 14926 // This may be used to include null fields in Patch requests. 14927 NullFields []string `json:"-"` 14928 } 14929 14930 func (s *SearchTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 14931 type NoMethod SearchTargetingOptionsResponse 14932 raw := NoMethod(*s) 14933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 14934 } 14935 14936 // SensitiveCategoryAssignedTargetingOptionDetails: Targeting details 14937 // for sensitive category. This will be populated in the details field 14938 // of an AssignedTargetingOption when targeting_type is 14939 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 14940 type SensitiveCategoryAssignedTargetingOptionDetails struct { 14941 // ExcludedTargetingOptionId: Required. ID of the sensitive category to 14942 // be EXCLUDED. 14943 ExcludedTargetingOptionId string `json:"excludedTargetingOptionId,omitempty"` 14944 14945 // SensitiveCategory: Output only. An enum for the DV360 Sensitive 14946 // category content classifier. 14947 // 14948 // Possible values: 14949 // "SENSITIVE_CATEGORY_UNSPECIFIED" - This enum is only a placeholder 14950 // and doesn't specify a DV360 sensitive category. 14951 // "SENSITIVE_CATEGORY_ADULT" - Adult or pornographic text, image, or 14952 // video content. 14953 // "SENSITIVE_CATEGORY_DEROGATORY" - Content that may be construed as 14954 // biased against individuals, groups, or organizations based on 14955 // criteria such as race, religion, disability, sex, age, veteran 14956 // status, sexual orientation, gender identity, or political 14957 // affiliation. May also indicate discussion of such content, for 14958 // instance, in an academic or journalistic context. 14959 // "SENSITIVE_CATEGORY_DOWNLOADS_SHARING" - Content related to audio, 14960 // video, or software downloads. 14961 // "SENSITIVE_CATEGORY_WEAPONS" - Contains content related to personal 14962 // weapons, including knives, guns, small firearms, and ammunition. 14963 // Selecting either "weapons" or "sensitive social issues" will result 14964 // in selecting both. 14965 // "SENSITIVE_CATEGORY_GAMBLING" - Contains content related to betting 14966 // or wagering in a real-world or online setting. 14967 // "SENSITIVE_CATEGORY_VIOLENCE" - Content which may be considered 14968 // graphically violent, gory, gruesome, or shocking, such as street 14969 // fighting videos, accident photos, descriptions of torture, etc. 14970 // "SENSITIVE_CATEGORY_SUGGESTIVE" - Adult content, as well as 14971 // suggestive content that's not explicitly pornographic. This category 14972 // includes all pages categorized as adult. 14973 // "SENSITIVE_CATEGORY_PROFANITY" - Prominent use of words considered 14974 // indecent, such as curse words and sexual slang. Pages with only very 14975 // occasional usage, such as news sites that might include such words in 14976 // a quotation, are not included. 14977 // "SENSITIVE_CATEGORY_ALCOHOL" - Contains content related to 14978 // alcoholic beverages, alcohol brands, recipes, etc. 14979 // "SENSITIVE_CATEGORY_DRUGS" - Contains content related to the 14980 // recreational use of legal or illegal drugs, as well as to drug 14981 // paraphernalia or cultivation. 14982 // "SENSITIVE_CATEGORY_TOBACCO" - Contains content related to tobacco 14983 // and tobacco accessories, including lighters, humidors, ashtrays, etc. 14984 // "SENSITIVE_CATEGORY_POLITICS" - Political news and media, including 14985 // discussions of social, governmental, and public policy. 14986 // "SENSITIVE_CATEGORY_RELIGION" - Content related to religious 14987 // thought or beliefs. 14988 // "SENSITIVE_CATEGORY_TRAGEDY" - Content related to death, disasters, 14989 // accidents, war, etc. 14990 // "SENSITIVE_CATEGORY_TRANSPORTATION_ACCIDENTS" - Content related to 14991 // motor vehicle, aviation or other transportation accidents. 14992 // "SENSITIVE_CATEGORY_SENSITIVE_SOCIAL_ISSUES" - Issues that evoke 14993 // strong, opposing views and spark debate. These include issues that 14994 // are controversial in most countries and markets (such as abortion), 14995 // as well as those that are controversial in specific countries and 14996 // markets (such as immigration reform in the United States). 14997 // "SENSITIVE_CATEGORY_SHOCKING" - Content which may be considered 14998 // shocking or disturbing, such as violent news stories, stunts, or 14999 // toilet humor. 15000 SensitiveCategory string `json:"sensitiveCategory,omitempty"` 15001 15002 // ForceSendFields is a list of field names (e.g. 15003 // "ExcludedTargetingOptionId") to unconditionally include in API 15004 // requests. By default, fields with empty or default values are omitted 15005 // from API requests. However, any non-pointer, non-interface field 15006 // appearing in ForceSendFields will be sent to the server regardless of 15007 // whether the field is empty or not. This may be used to include empty 15008 // fields in Patch requests. 15009 ForceSendFields []string `json:"-"` 15010 15011 // NullFields is a list of field names (e.g. 15012 // "ExcludedTargetingOptionId") to include in API requests with the JSON 15013 // null value. By default, fields with empty values are omitted from API 15014 // requests. However, any field with an empty value appearing in 15015 // NullFields will be sent to the server as null. It is an error if a 15016 // field in this list has a non-empty value. This may be used to include 15017 // null fields in Patch requests. 15018 NullFields []string `json:"-"` 15019 } 15020 15021 func (s *SensitiveCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 15022 type NoMethod SensitiveCategoryAssignedTargetingOptionDetails 15023 raw := NoMethod(*s) 15024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15025 } 15026 15027 // SensitiveCategoryTargetingOptionDetails: Represents a targetable 15028 // sensitive category. This will be populated in the 15029 // sensitive_category_details field of the TargetingOption when 15030 // targeting_type is `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 15031 type SensitiveCategoryTargetingOptionDetails struct { 15032 // SensitiveCategory: Output only. An enum for the DV360 Sensitive 15033 // category content classifier. 15034 // 15035 // Possible values: 15036 // "SENSITIVE_CATEGORY_UNSPECIFIED" - This enum is only a placeholder 15037 // and doesn't specify a DV360 sensitive category. 15038 // "SENSITIVE_CATEGORY_ADULT" - Adult or pornographic text, image, or 15039 // video content. 15040 // "SENSITIVE_CATEGORY_DEROGATORY" - Content that may be construed as 15041 // biased against individuals, groups, or organizations based on 15042 // criteria such as race, religion, disability, sex, age, veteran 15043 // status, sexual orientation, gender identity, or political 15044 // affiliation. May also indicate discussion of such content, for 15045 // instance, in an academic or journalistic context. 15046 // "SENSITIVE_CATEGORY_DOWNLOADS_SHARING" - Content related to audio, 15047 // video, or software downloads. 15048 // "SENSITIVE_CATEGORY_WEAPONS" - Contains content related to personal 15049 // weapons, including knives, guns, small firearms, and ammunition. 15050 // Selecting either "weapons" or "sensitive social issues" will result 15051 // in selecting both. 15052 // "SENSITIVE_CATEGORY_GAMBLING" - Contains content related to betting 15053 // or wagering in a real-world or online setting. 15054 // "SENSITIVE_CATEGORY_VIOLENCE" - Content which may be considered 15055 // graphically violent, gory, gruesome, or shocking, such as street 15056 // fighting videos, accident photos, descriptions of torture, etc. 15057 // "SENSITIVE_CATEGORY_SUGGESTIVE" - Adult content, as well as 15058 // suggestive content that's not explicitly pornographic. This category 15059 // includes all pages categorized as adult. 15060 // "SENSITIVE_CATEGORY_PROFANITY" - Prominent use of words considered 15061 // indecent, such as curse words and sexual slang. Pages with only very 15062 // occasional usage, such as news sites that might include such words in 15063 // a quotation, are not included. 15064 // "SENSITIVE_CATEGORY_ALCOHOL" - Contains content related to 15065 // alcoholic beverages, alcohol brands, recipes, etc. 15066 // "SENSITIVE_CATEGORY_DRUGS" - Contains content related to the 15067 // recreational use of legal or illegal drugs, as well as to drug 15068 // paraphernalia or cultivation. 15069 // "SENSITIVE_CATEGORY_TOBACCO" - Contains content related to tobacco 15070 // and tobacco accessories, including lighters, humidors, ashtrays, etc. 15071 // "SENSITIVE_CATEGORY_POLITICS" - Political news and media, including 15072 // discussions of social, governmental, and public policy. 15073 // "SENSITIVE_CATEGORY_RELIGION" - Content related to religious 15074 // thought or beliefs. 15075 // "SENSITIVE_CATEGORY_TRAGEDY" - Content related to death, disasters, 15076 // accidents, war, etc. 15077 // "SENSITIVE_CATEGORY_TRANSPORTATION_ACCIDENTS" - Content related to 15078 // motor vehicle, aviation or other transportation accidents. 15079 // "SENSITIVE_CATEGORY_SENSITIVE_SOCIAL_ISSUES" - Issues that evoke 15080 // strong, opposing views and spark debate. These include issues that 15081 // are controversial in most countries and markets (such as abortion), 15082 // as well as those that are controversial in specific countries and 15083 // markets (such as immigration reform in the United States). 15084 // "SENSITIVE_CATEGORY_SHOCKING" - Content which may be considered 15085 // shocking or disturbing, such as violent news stories, stunts, or 15086 // toilet humor. 15087 SensitiveCategory string `json:"sensitiveCategory,omitempty"` 15088 15089 // ForceSendFields is a list of field names (e.g. "SensitiveCategory") 15090 // to unconditionally include in API requests. By default, fields with 15091 // empty or default values are omitted from API requests. However, any 15092 // non-pointer, non-interface field appearing in ForceSendFields will be 15093 // sent to the server regardless of whether the field is empty or not. 15094 // This may be used to include empty fields in Patch requests. 15095 ForceSendFields []string `json:"-"` 15096 15097 // NullFields is a list of field names (e.g. "SensitiveCategory") to 15098 // include in API requests with the JSON null value. By default, fields 15099 // with empty values are omitted from API requests. However, any field 15100 // with an empty value appearing in NullFields will be sent to the 15101 // server as null. It is an error if a field in this list has a 15102 // non-empty value. This may be used to include null fields in Patch 15103 // requests. 15104 NullFields []string `json:"-"` 15105 } 15106 15107 func (s *SensitiveCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) { 15108 type NoMethod SensitiveCategoryTargetingOptionDetails 15109 raw := NoMethod(*s) 15110 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15111 } 15112 15113 // Site: A single site. Sites are apps or websites belonging to a 15114 // channel. 15115 type Site struct { 15116 // Name: Output only. The resource name of the site. 15117 Name string `json:"name,omitempty"` 15118 15119 // UrlOrAppId: Required. The app ID or URL of the site. Must be UTF-8 15120 // encoded with a maximum length of 240 bytes. 15121 UrlOrAppId string `json:"urlOrAppId,omitempty"` 15122 15123 // ServerResponse contains the HTTP response code and headers from the 15124 // server. 15125 googleapi.ServerResponse `json:"-"` 15126 15127 // ForceSendFields is a list of field names (e.g. "Name") to 15128 // unconditionally include in API requests. By default, fields with 15129 // empty or default values are omitted from API requests. However, any 15130 // non-pointer, non-interface field appearing in ForceSendFields will be 15131 // sent to the server regardless of whether the field is empty or not. 15132 // This may be used to include empty fields in Patch requests. 15133 ForceSendFields []string `json:"-"` 15134 15135 // NullFields is a list of field names (e.g. "Name") to include in API 15136 // requests with the JSON null value. By default, fields with empty 15137 // values are omitted from API requests. However, any field with an 15138 // empty value appearing in NullFields will be sent to the server as 15139 // null. It is an error if a field in this list has a non-empty value. 15140 // This may be used to include null fields in Patch requests. 15141 NullFields []string `json:"-"` 15142 } 15143 15144 func (s *Site) MarshalJSON() ([]byte, error) { 15145 type NoMethod Site 15146 raw := NoMethod(*s) 15147 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15148 } 15149 15150 // Status: The `Status` type defines a logical error model that is 15151 // suitable for different programming environments, including REST APIs 15152 // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 15153 // `Status` message contains three pieces of data: error code, error 15154 // message, and error details. You can find out more about this error 15155 // model and how to work with it in the API Design Guide 15156 // (https://cloud.google.com/apis/design/errors). 15157 type Status struct { 15158 // Code: The status code, which should be an enum value of 15159 // google.rpc.Code. 15160 Code int64 `json:"code,omitempty"` 15161 15162 // Details: A list of messages that carry the error details. There is a 15163 // common set of message types for APIs to use. 15164 Details []googleapi.RawMessage `json:"details,omitempty"` 15165 15166 // Message: A developer-facing error message, which should be in 15167 // English. Any user-facing error message should be localized and sent 15168 // in the google.rpc.Status.details field, or localized by the client. 15169 Message string `json:"message,omitempty"` 15170 15171 // ForceSendFields is a list of field names (e.g. "Code") to 15172 // unconditionally include in API requests. By default, fields with 15173 // empty or default values are omitted from API requests. However, any 15174 // non-pointer, non-interface field appearing in ForceSendFields will be 15175 // sent to the server regardless of whether the field is empty or not. 15176 // This may be used to include empty fields in Patch requests. 15177 ForceSendFields []string `json:"-"` 15178 15179 // NullFields is a list of field names (e.g. "Code") to include in API 15180 // requests with the JSON null value. By default, fields with empty 15181 // values are omitted from API requests. However, any field with an 15182 // empty value appearing in NullFields will be sent to the server as 15183 // null. It is an error if a field in this list has a non-empty value. 15184 // This may be used to include null fields in Patch requests. 15185 NullFields []string `json:"-"` 15186 } 15187 15188 func (s *Status) MarshalJSON() ([]byte, error) { 15189 type NoMethod Status 15190 raw := NoMethod(*s) 15191 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15192 } 15193 15194 // SubExchangeAssignedTargetingOptionDetails: Details for assigned 15195 // sub-exchange targeting option. This will be populated in the details 15196 // field of an AssignedTargetingOption when targeting_type is 15197 // `TARGETING_TYPE_SUB_EXCHANGE`. 15198 type SubExchangeAssignedTargetingOptionDetails struct { 15199 // TargetingOptionId: Required. The targeting_option_id of a 15200 // TargetingOption of type `TARGETING_TYPE_SUB_EXCHANGE`. 15201 TargetingOptionId string `json:"targetingOptionId,omitempty"` 15202 15203 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 15204 // to unconditionally include in API requests. By default, fields with 15205 // empty or default values are omitted from API requests. However, any 15206 // non-pointer, non-interface field appearing in ForceSendFields will be 15207 // sent to the server regardless of whether the field is empty or not. 15208 // This may be used to include empty fields in Patch requests. 15209 ForceSendFields []string `json:"-"` 15210 15211 // NullFields is a list of field names (e.g. "TargetingOptionId") to 15212 // include in API requests with the JSON null value. By default, fields 15213 // with empty values are omitted from API requests. However, any field 15214 // with an empty value appearing in NullFields will be sent to the 15215 // server as null. It is an error if a field in this list has a 15216 // non-empty value. This may be used to include null fields in Patch 15217 // requests. 15218 NullFields []string `json:"-"` 15219 } 15220 15221 func (s *SubExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 15222 type NoMethod SubExchangeAssignedTargetingOptionDetails 15223 raw := NoMethod(*s) 15224 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15225 } 15226 15227 // SubExchangeTargetingOptionDetails: Represents a targetable 15228 // sub-exchange. This will be populated in the sub_exchange_details 15229 // field of a TargetingOption when targeting_type is 15230 // `TARGETING_TYPE_SUB_EXCHANGE`. 15231 type SubExchangeTargetingOptionDetails struct { 15232 // DisplayName: Output only. The display name of the sub-exchange. 15233 DisplayName string `json:"displayName,omitempty"` 15234 15235 // ForceSendFields is a list of field names (e.g. "DisplayName") to 15236 // unconditionally include in API requests. By default, fields with 15237 // empty or default values are omitted from API requests. However, any 15238 // non-pointer, non-interface field appearing in ForceSendFields will be 15239 // sent to the server regardless of whether the field is empty or not. 15240 // This may be used to include empty fields in Patch requests. 15241 ForceSendFields []string `json:"-"` 15242 15243 // NullFields is a list of field names (e.g. "DisplayName") to include 15244 // in API requests with the JSON null value. By default, fields with 15245 // empty values are omitted from API requests. However, any field with 15246 // an empty value appearing in NullFields will be sent to the server as 15247 // null. It is an error if a field in this list has a non-empty value. 15248 // This may be used to include null fields in Patch requests. 15249 NullFields []string `json:"-"` 15250 } 15251 15252 func (s *SubExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 15253 type NoMethod SubExchangeTargetingOptionDetails 15254 raw := NoMethod(*s) 15255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15256 } 15257 15258 // TargetingExpansionConfig: Settings that control the optimized 15259 // targeting (//support.google.com/displayvideo/answer/12060859) 15260 // settings of the line item. 15261 type TargetingExpansionConfig struct { 15262 // ExcludeFirstPartyAudience: Whether to exclude first-party audiences 15263 // from use in targeting expansion. This field was deprecated with the 15264 // launch of optimized targeting 15265 // (//support.google.com/displayvideo/answer/12060859). This field will 15266 // be set to `false`. If this field is set to `true` when deprecated, 15267 // all positive first-party audience targeting assigned to this line 15268 // item will be replaced with negative targeting of the same first-party 15269 // audiences to ensure the continued exclusion of those audiences. 15270 ExcludeFirstPartyAudience bool `json:"excludeFirstPartyAudience,omitempty"` 15271 15272 // TargetingExpansionLevel: Required. Whether optimized targeting is 15273 // turned on. This field supports the following values: * 15274 // `NO_EXPANSION`: optimized targeting is turned off * 15275 // `LEAST_EXPANSION`: optimized targeting is turned on If this field is 15276 // set to any other value, it will automatically be set to 15277 // `LEAST_EXPANSION`. `NO_EXPANSION` will be the default value for the 15278 // field and will be automatically assigned if you do not set the field. 15279 // 15280 // Possible values: 15281 // "TARGETING_EXPANSION_LEVEL_UNSPECIFIED" - The optimized targeting 15282 // setting is not specified or is unknown in this version. 15283 // "NO_EXPANSION" - Optimized targeting is off. 15284 // "LEAST_EXPANSION" - Optimized targeting is on. 15285 // "SOME_EXPANSION" - If used, will automatically be set to 15286 // `LEAST_EXPANSION`. 15287 // "BALANCED_EXPANSION" - If used, will automatically be set to 15288 // `LEAST_EXPANSION`. 15289 // "MORE_EXPANSION" - If used, will automatically be set to 15290 // `LEAST_EXPANSION`. 15291 // "MOST_EXPANSION" - If used, will automatically be set to 15292 // `LEAST_EXPANSION`. 15293 TargetingExpansionLevel string `json:"targetingExpansionLevel,omitempty"` 15294 15295 // ForceSendFields is a list of field names (e.g. 15296 // "ExcludeFirstPartyAudience") to unconditionally include in API 15297 // requests. By default, fields with empty or default values are omitted 15298 // from API requests. However, any non-pointer, non-interface field 15299 // appearing in ForceSendFields will be sent to the server regardless of 15300 // whether the field is empty or not. This may be used to include empty 15301 // fields in Patch requests. 15302 ForceSendFields []string `json:"-"` 15303 15304 // NullFields is a list of field names (e.g. 15305 // "ExcludeFirstPartyAudience") to include in API requests with the JSON 15306 // null value. By default, fields with empty values are omitted from API 15307 // requests. However, any field with an empty value appearing in 15308 // NullFields will be sent to the server as null. It is an error if a 15309 // field in this list has a non-empty value. This may be used to include 15310 // null fields in Patch requests. 15311 NullFields []string `json:"-"` 15312 } 15313 15314 func (s *TargetingExpansionConfig) MarshalJSON() ([]byte, error) { 15315 type NoMethod TargetingExpansionConfig 15316 raw := NoMethod(*s) 15317 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15318 } 15319 15320 // TargetingOption: Represents a single targeting option, which is a 15321 // targetable concept in DV360. 15322 type TargetingOption struct { 15323 // AgeRangeDetails: Age range details. 15324 AgeRangeDetails *AgeRangeTargetingOptionDetails `json:"ageRangeDetails,omitempty"` 15325 15326 // AppCategoryDetails: App category details. 15327 AppCategoryDetails *AppCategoryTargetingOptionDetails `json:"appCategoryDetails,omitempty"` 15328 15329 // AudioContentTypeDetails: Audio content type details. 15330 AudioContentTypeDetails *AudioContentTypeTargetingOptionDetails `json:"audioContentTypeDetails,omitempty"` 15331 15332 // AuthorizedSellerStatusDetails: Authorized seller status resource 15333 // details. 15334 AuthorizedSellerStatusDetails *AuthorizedSellerStatusTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"` 15335 15336 // BrowserDetails: Browser details. 15337 BrowserDetails *BrowserTargetingOptionDetails `json:"browserDetails,omitempty"` 15338 15339 // BusinessChainDetails: Business chain resource details. 15340 BusinessChainDetails *BusinessChainTargetingOptionDetails `json:"businessChainDetails,omitempty"` 15341 15342 // CarrierAndIspDetails: Carrier and ISP details. 15343 CarrierAndIspDetails *CarrierAndIspTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"` 15344 15345 // CategoryDetails: Category resource details. 15346 CategoryDetails *CategoryTargetingOptionDetails `json:"categoryDetails,omitempty"` 15347 15348 // ContentDurationDetails: Content duration resource details. 15349 ContentDurationDetails *ContentDurationTargetingOptionDetails `json:"contentDurationDetails,omitempty"` 15350 15351 // ContentGenreDetails: Content genre resource details. 15352 ContentGenreDetails *ContentGenreTargetingOptionDetails `json:"contentGenreDetails,omitempty"` 15353 15354 // ContentInstreamPositionDetails: Content instream position details. 15355 ContentInstreamPositionDetails *ContentInstreamPositionTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"` 15356 15357 // ContentOutstreamPositionDetails: Content outstream position details. 15358 ContentOutstreamPositionDetails *ContentOutstreamPositionTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"` 15359 15360 // ContentStreamTypeDetails: Content stream type resource details. 15361 ContentStreamTypeDetails *ContentStreamTypeTargetingOptionDetails `json:"contentStreamTypeDetails,omitempty"` 15362 15363 // DeviceMakeModelDetails: Device make and model resource details. 15364 DeviceMakeModelDetails *DeviceMakeModelTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"` 15365 15366 // DeviceTypeDetails: Device type details. 15367 DeviceTypeDetails *DeviceTypeTargetingOptionDetails `json:"deviceTypeDetails,omitempty"` 15368 15369 // DigitalContentLabelDetails: Digital content label details. 15370 DigitalContentLabelDetails *DigitalContentLabelTargetingOptionDetails `json:"digitalContentLabelDetails,omitempty"` 15371 15372 // EnvironmentDetails: Environment details. 15373 EnvironmentDetails *EnvironmentTargetingOptionDetails `json:"environmentDetails,omitempty"` 15374 15375 // ExchangeDetails: Exchange details. 15376 ExchangeDetails *ExchangeTargetingOptionDetails `json:"exchangeDetails,omitempty"` 15377 15378 // GenderDetails: Gender details. 15379 GenderDetails *GenderTargetingOptionDetails `json:"genderDetails,omitempty"` 15380 15381 // GeoRegionDetails: Geographic region resource details. 15382 GeoRegionDetails *GeoRegionTargetingOptionDetails `json:"geoRegionDetails,omitempty"` 15383 15384 // HouseholdIncomeDetails: Household income details. 15385 HouseholdIncomeDetails *HouseholdIncomeTargetingOptionDetails `json:"householdIncomeDetails,omitempty"` 15386 15387 // LanguageDetails: Language resource details. 15388 LanguageDetails *LanguageTargetingOptionDetails `json:"languageDetails,omitempty"` 15389 15390 // Name: Output only. The resource name for this targeting option. 15391 Name string `json:"name,omitempty"` 15392 15393 // NativeContentPositionDetails: Native content position details. 15394 NativeContentPositionDetails *NativeContentPositionTargetingOptionDetails `json:"nativeContentPositionDetails,omitempty"` 15395 15396 // OmidDetails: Open Measurement enabled inventory details. 15397 OmidDetails *OmidTargetingOptionDetails `json:"omidDetails,omitempty"` 15398 15399 // OnScreenPositionDetails: On screen position details. 15400 OnScreenPositionDetails *OnScreenPositionTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"` 15401 15402 // OperatingSystemDetails: Operating system resources details. 15403 OperatingSystemDetails *OperatingSystemTargetingOptionDetails `json:"operatingSystemDetails,omitempty"` 15404 15405 // ParentalStatusDetails: Parental status details. 15406 ParentalStatusDetails *ParentalStatusTargetingOptionDetails `json:"parentalStatusDetails,omitempty"` 15407 15408 // PoiDetails: POI resource details. 15409 PoiDetails *PoiTargetingOptionDetails `json:"poiDetails,omitempty"` 15410 15411 // SensitiveCategoryDetails: Sensitive Category details. 15412 SensitiveCategoryDetails *SensitiveCategoryTargetingOptionDetails `json:"sensitiveCategoryDetails,omitempty"` 15413 15414 // SubExchangeDetails: Sub-exchange details. 15415 SubExchangeDetails *SubExchangeTargetingOptionDetails `json:"subExchangeDetails,omitempty"` 15416 15417 // TargetingOptionId: Output only. A unique identifier for this 15418 // targeting option. The tuple {`targeting_type`, `targeting_option_id`} 15419 // will be unique. 15420 TargetingOptionId string `json:"targetingOptionId,omitempty"` 15421 15422 // TargetingType: Output only. The type of this targeting option. 15423 // 15424 // Possible values: 15425 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 15426 // specified or is unknown in this version. 15427 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 15428 // related websites or apps). 15429 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 15430 // example, education or puzzle games). 15431 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 15432 // Birds). 15433 // "TARGETING_TYPE_URL" - Target a specific url (for example, 15434 // quora.com). 15435 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 15436 // period on a specific day. 15437 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 15438 // (for example, 18-24). 15439 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 15440 // specified regions on a regional location list. 15441 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 15442 // specified points of interest on a proximity location list. 15443 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 15444 // example, female or male). 15445 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 15446 // size for video ads. 15447 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 15448 // content for video ads. 15449 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 15450 // parental status (for example, parent or not a parent). 15451 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 15452 // ads in a specific content instream position (for example, pre-roll, 15453 // mid-roll, or post-roll). 15454 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 15455 // specific content outstream position. 15456 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 15457 // (for example, tablet or connected TV). 15458 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 15459 // groups of audiences. Singleton field, at most one can exist on a 15460 // single Lineitem at a time. 15461 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 15462 // example, Chrome). 15463 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 15464 // household income range (for example, top 10%). 15465 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 15466 // screen position. 15467 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 15468 // third party verification (for example, IAS or DoubleVerify). 15469 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 15470 // by specific digital content label ratings (for example, DL-MA: 15471 // suitable only for mature audiences). 15472 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 15473 // content by sensitive categories (for example, adult). 15474 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 15475 // (for example, web or app). 15476 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 15477 // carrier or internet service provider (ISP) (for example, Comcast or 15478 // Orange). 15479 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 15480 // operating system (for example, macOS). 15481 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 15482 // device make or model (for example, Roku or Samsung). 15483 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 15484 // example, dog or retriever). 15485 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 15486 // negative keyword list. 15487 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 15488 // (for example, 80% viewable). 15489 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 15490 // category (for example, arts & entertainment). 15491 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 15492 // specific deals and auction packages. 15493 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 15494 // example, English or Japanese). 15495 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 15496 // authorized sellers. If no targeting option of this type is assigned, 15497 // the resource uses the "Authorized Direct Sellers and Resellers" 15498 // option by default. 15499 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 15500 // location (for example, a city or state). 15501 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 15502 // a group of deals and auction packages. 15503 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 15504 // exchanges. 15505 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 15506 // sub-exchanges. 15507 // "TARGETING_TYPE_POI" - Target ads around a specific point of 15508 // interest, such as a notable building, a street address, or 15509 // latitude/longitude coordinates. 15510 // "TARGETING_TYPE_BUSINESS_CHAIN" - Target ads around locations of a 15511 // business chain within a specific geo region. 15512 // "TARGETING_TYPE_CONTENT_DURATION" - Target ads to a specific video 15513 // content duration. 15514 // "TARGETING_TYPE_CONTENT_STREAM_TYPE" - Target ads to a specific 15515 // video content stream type. 15516 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION" - Target ads to a specific 15517 // native content position. 15518 // "TARGETING_TYPE_OMID" - Target ads in an Open Measurement enabled 15519 // inventory. 15520 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE" - Target ads to a specific 15521 // audio content type. 15522 // "TARGETING_TYPE_CONTENT_GENRE" - Target ads to a specific content 15523 // genre. 15524 TargetingType string `json:"targetingType,omitempty"` 15525 15526 // UserRewardedContentDetails: User rewarded content details. 15527 UserRewardedContentDetails *UserRewardedContentTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"` 15528 15529 // VideoPlayerSizeDetails: Video player size details. 15530 VideoPlayerSizeDetails *VideoPlayerSizeTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"` 15531 15532 // ViewabilityDetails: Viewability resource details. 15533 ViewabilityDetails *ViewabilityTargetingOptionDetails `json:"viewabilityDetails,omitempty"` 15534 15535 // ServerResponse contains the HTTP response code and headers from the 15536 // server. 15537 googleapi.ServerResponse `json:"-"` 15538 15539 // ForceSendFields is a list of field names (e.g. "AgeRangeDetails") to 15540 // unconditionally include in API requests. By default, fields with 15541 // empty or default values are omitted from API requests. However, any 15542 // non-pointer, non-interface field appearing in ForceSendFields will be 15543 // sent to the server regardless of whether the field is empty or not. 15544 // This may be used to include empty fields in Patch requests. 15545 ForceSendFields []string `json:"-"` 15546 15547 // NullFields is a list of field names (e.g. "AgeRangeDetails") to 15548 // include in API requests with the JSON null value. By default, fields 15549 // with empty values are omitted from API requests. However, any field 15550 // with an empty value appearing in NullFields will be sent to the 15551 // server as null. It is an error if a field in this list has a 15552 // non-empty value. This may be used to include null fields in Patch 15553 // requests. 15554 NullFields []string `json:"-"` 15555 } 15556 15557 func (s *TargetingOption) MarshalJSON() ([]byte, error) { 15558 type NoMethod TargetingOption 15559 raw := NoMethod(*s) 15560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15561 } 15562 15563 // ThirdPartyOnlyConfig: Settings for advertisers that use third-party 15564 // ad servers only. 15565 type ThirdPartyOnlyConfig struct { 15566 // PixelOrderIdReportingEnabled: Whether or not order ID reporting for 15567 // pixels is enabled. This value cannot be changed once set to `true`. 15568 PixelOrderIdReportingEnabled bool `json:"pixelOrderIdReportingEnabled,omitempty"` 15569 15570 // ForceSendFields is a list of field names (e.g. 15571 // "PixelOrderIdReportingEnabled") to unconditionally include in API 15572 // requests. By default, fields with empty or default values are omitted 15573 // from API requests. However, any non-pointer, non-interface field 15574 // appearing in ForceSendFields will be sent to the server regardless of 15575 // whether the field is empty or not. This may be used to include empty 15576 // fields in Patch requests. 15577 ForceSendFields []string `json:"-"` 15578 15579 // NullFields is a list of field names (e.g. 15580 // "PixelOrderIdReportingEnabled") to include in API requests with the 15581 // JSON null value. By default, fields with empty values are omitted 15582 // from API requests. However, any field with an empty value appearing 15583 // in NullFields will be sent to the server as null. It is an error if a 15584 // field in this list has a non-empty value. This may be used to include 15585 // null fields in Patch requests. 15586 NullFields []string `json:"-"` 15587 } 15588 15589 func (s *ThirdPartyOnlyConfig) MarshalJSON() ([]byte, error) { 15590 type NoMethod ThirdPartyOnlyConfig 15591 raw := NoMethod(*s) 15592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15593 } 15594 15595 // ThirdPartyUrl: Tracking URLs from third parties to track interactions 15596 // with an audio or a video creative. 15597 type ThirdPartyUrl struct { 15598 // Type: The type of interaction needs to be tracked by the tracking URL 15599 // 15600 // Possible values: 15601 // "THIRD_PARTY_URL_TYPE_UNSPECIFIED" - The type of third-party URL is 15602 // unspecified or is unknown in this version. 15603 // "THIRD_PARTY_URL_TYPE_IMPRESSION" - Used to count impressions of 15604 // the creative after the audio or video buffering is complete. 15605 // "THIRD_PARTY_URL_TYPE_CLICK_TRACKING" - Used to track user clicks 15606 // on the audio or video. 15607 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_START" - Used to track the number 15608 // of times a user starts the audio or video. 15609 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_FIRST_QUARTILE" - Used to track 15610 // the number of times the audio or video plays to 25% of its length. 15611 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_MIDPOINT" - Used to track the 15612 // number of times the audio or video plays to 50% of its length. 15613 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_THIRD_QUARTILE" - Used to track 15614 // the number of times the audio or video plays to 75% of its length. 15615 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_COMPLETE" - Used to track the 15616 // number of times the audio or video plays to the end. 15617 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_MUTE" - Used to track the number 15618 // of times a user mutes the audio or video. 15619 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_PAUSE" - Used to track the number 15620 // of times a user pauses the audio or video. 15621 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_REWIND" - Used to track the 15622 // number of times a user replays the audio or video. 15623 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_FULLSCREEN" - Used to track the 15624 // number of times a user expands the player to full-screen size. 15625 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_STOP" - Used to track the number 15626 // of times a user stops the audio or video. 15627 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_CUSTOM" - Used to track the 15628 // number of times a user performs a custom click, such as clicking on a 15629 // video hot spot. 15630 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_SKIP" - Used to track the number 15631 // of times the audio or video was skipped. 15632 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_PROGRESS" - Used to track the 15633 // number of times the audio or video plays to an offset determined by 15634 // the progress_offset. 15635 Type string `json:"type,omitempty"` 15636 15637 // Url: Tracking URL used to track the interaction. Provide a URL with 15638 // optional path or query string, beginning with `https:`. For example, 15639 // https://www.example.com/path 15640 Url string `json:"url,omitempty"` 15641 15642 // ForceSendFields is a list of field names (e.g. "Type") to 15643 // unconditionally include in API requests. By default, fields with 15644 // empty or default values are omitted from API requests. However, any 15645 // non-pointer, non-interface field appearing in ForceSendFields will be 15646 // sent to the server regardless of whether the field is empty or not. 15647 // This may be used to include empty fields in Patch requests. 15648 ForceSendFields []string `json:"-"` 15649 15650 // NullFields is a list of field names (e.g. "Type") to include in API 15651 // requests with the JSON null value. By default, fields with empty 15652 // values are omitted from API requests. However, any field with an 15653 // empty value appearing in NullFields will be sent to the server as 15654 // null. It is an error if a field in this list has a non-empty value. 15655 // This may be used to include null fields in Patch requests. 15656 NullFields []string `json:"-"` 15657 } 15658 15659 func (s *ThirdPartyUrl) MarshalJSON() ([]byte, error) { 15660 type NoMethod ThirdPartyUrl 15661 raw := NoMethod(*s) 15662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15663 } 15664 15665 // ThirdPartyVerifierAssignedTargetingOptionDetails: Assigned third 15666 // party verifier targeting option details. This will be populated in 15667 // the details field of an AssignedTargetingOption when targeting_type 15668 // is `TARGETING_TYPE_THIRD_PARTY_VERIFIER`. 15669 type ThirdPartyVerifierAssignedTargetingOptionDetails struct { 15670 // Adloox: Third party brand verifier -- Adloox. 15671 Adloox *Adloox `json:"adloox,omitempty"` 15672 15673 // DoubleVerify: Third party brand verifier -- DoubleVerify. 15674 DoubleVerify *DoubleVerify `json:"doubleVerify,omitempty"` 15675 15676 // IntegralAdScience: Third party brand verifier -- Integral Ad Science. 15677 IntegralAdScience *IntegralAdScience `json:"integralAdScience,omitempty"` 15678 15679 // ForceSendFields is a list of field names (e.g. "Adloox") to 15680 // unconditionally include in API requests. By default, fields with 15681 // empty or default values are omitted from API requests. However, any 15682 // non-pointer, non-interface field appearing in ForceSendFields will be 15683 // sent to the server regardless of whether the field is empty or not. 15684 // This may be used to include empty fields in Patch requests. 15685 ForceSendFields []string `json:"-"` 15686 15687 // NullFields is a list of field names (e.g. "Adloox") to include in API 15688 // requests with the JSON null value. By default, fields with empty 15689 // values are omitted from API requests. However, any field with an 15690 // empty value appearing in NullFields will be sent to the server as 15691 // null. It is an error if a field in this list has a non-empty value. 15692 // This may be used to include null fields in Patch requests. 15693 NullFields []string `json:"-"` 15694 } 15695 15696 func (s *ThirdPartyVerifierAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 15697 type NoMethod ThirdPartyVerifierAssignedTargetingOptionDetails 15698 raw := NoMethod(*s) 15699 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15700 } 15701 15702 // TimeRange: A time range. 15703 type TimeRange struct { 15704 // EndTime: Required. The upper bound of a time range, inclusive. 15705 EndTime string `json:"endTime,omitempty"` 15706 15707 // StartTime: Required. The lower bound of a time range, inclusive. 15708 StartTime string `json:"startTime,omitempty"` 15709 15710 // ForceSendFields is a list of field names (e.g. "EndTime") to 15711 // unconditionally include in API requests. By default, fields with 15712 // empty or default values are omitted from API requests. However, any 15713 // non-pointer, non-interface field appearing in ForceSendFields will be 15714 // sent to the server regardless of whether the field is empty or not. 15715 // This may be used to include empty fields in Patch requests. 15716 ForceSendFields []string `json:"-"` 15717 15718 // NullFields is a list of field names (e.g. "EndTime") to include in 15719 // API requests with the JSON null value. By default, fields with empty 15720 // values are omitted from API requests. However, any field with an 15721 // empty value appearing in NullFields will be sent to the server as 15722 // null. It is an error if a field in this list has a non-empty value. 15723 // This may be used to include null fields in Patch requests. 15724 NullFields []string `json:"-"` 15725 } 15726 15727 func (s *TimeRange) MarshalJSON() ([]byte, error) { 15728 type NoMethod TimeRange 15729 raw := NoMethod(*s) 15730 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15731 } 15732 15733 // TimerEvent: Timer event of the creative. 15734 type TimerEvent struct { 15735 // Name: Required. The name of the timer event. 15736 Name string `json:"name,omitempty"` 15737 15738 // ReportingName: Required. The name used to identify this timer event 15739 // in reports. 15740 ReportingName string `json:"reportingName,omitempty"` 15741 15742 // ForceSendFields is a list of field names (e.g. "Name") to 15743 // unconditionally include in API requests. By default, fields with 15744 // empty or default values are omitted from API requests. However, any 15745 // non-pointer, non-interface field appearing in ForceSendFields will be 15746 // sent to the server regardless of whether the field is empty or not. 15747 // This may be used to include empty fields in Patch requests. 15748 ForceSendFields []string `json:"-"` 15749 15750 // NullFields is a list of field names (e.g. "Name") to include in API 15751 // requests with the JSON null value. By default, fields with empty 15752 // values are omitted from API requests. However, any field with an 15753 // empty value appearing in NullFields will be sent to the server as 15754 // null. It is an error if a field in this list has a non-empty value. 15755 // This may be used to include null fields in Patch requests. 15756 NullFields []string `json:"-"` 15757 } 15758 15759 func (s *TimerEvent) MarshalJSON() ([]byte, error) { 15760 type NoMethod TimerEvent 15761 raw := NoMethod(*s) 15762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15763 } 15764 15765 // TrackingFloodlightActivityConfig: Settings that control the behavior 15766 // of a single Floodlight activity config. 15767 type TrackingFloodlightActivityConfig struct { 15768 // FloodlightActivityId: Required. The ID of the Floodlight activity. 15769 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"` 15770 15771 // PostClickLookbackWindowDays: Required. The number of days after an ad 15772 // has been clicked in which a conversion may be counted. Must be 15773 // between 0 and 90 inclusive. 15774 PostClickLookbackWindowDays int64 `json:"postClickLookbackWindowDays,omitempty"` 15775 15776 // PostViewLookbackWindowDays: Required. The number of days after an ad 15777 // has been viewed in which a conversion may be counted. Must be between 15778 // 0 and 90 inclusive. 15779 PostViewLookbackWindowDays int64 `json:"postViewLookbackWindowDays,omitempty"` 15780 15781 // ForceSendFields is a list of field names (e.g. 15782 // "FloodlightActivityId") to unconditionally include in API requests. 15783 // By default, fields with empty or default values are omitted from API 15784 // requests. However, any non-pointer, non-interface field appearing in 15785 // ForceSendFields will be sent to the server regardless of whether the 15786 // field is empty or not. This may be used to include empty fields in 15787 // Patch requests. 15788 ForceSendFields []string `json:"-"` 15789 15790 // NullFields is a list of field names (e.g. "FloodlightActivityId") to 15791 // include in API requests with the JSON null value. By default, fields 15792 // with empty values are omitted from API requests. However, any field 15793 // with an empty value appearing in NullFields will be sent to the 15794 // server as null. It is an error if a field in this list has a 15795 // non-empty value. This may be used to include null fields in Patch 15796 // requests. 15797 NullFields []string `json:"-"` 15798 } 15799 15800 func (s *TrackingFloodlightActivityConfig) MarshalJSON() ([]byte, error) { 15801 type NoMethod TrackingFloodlightActivityConfig 15802 raw := NoMethod(*s) 15803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15804 } 15805 15806 // Transcode: Represents information about the transcoded audio or video 15807 // file. 15808 type Transcode struct { 15809 // AudioBitRateKbps: The bit rate for the audio stream of the transcoded 15810 // video, or the bit rate for the transcoded audio, in kilobits per 15811 // second. 15812 AudioBitRateKbps int64 `json:"audioBitRateKbps,omitempty,string"` 15813 15814 // AudioSampleRateHz: The sample rate for the audio stream of the 15815 // transcoded video, or the sample rate for the transcoded audio, in 15816 // hertz. 15817 AudioSampleRateHz int64 `json:"audioSampleRateHz,omitempty,string"` 15818 15819 // BitRateKbps: The transcoding bit rate of the transcoded video, in 15820 // kilobits per second. 15821 BitRateKbps int64 `json:"bitRateKbps,omitempty,string"` 15822 15823 // Dimensions: The dimensions of the transcoded video. 15824 Dimensions *Dimensions `json:"dimensions,omitempty"` 15825 15826 // FileSizeBytes: The size of the transcoded file, in bytes. 15827 FileSizeBytes int64 `json:"fileSizeBytes,omitempty,string"` 15828 15829 // FrameRate: The frame rate of the transcoded video, in frames per 15830 // second. 15831 FrameRate float64 `json:"frameRate,omitempty"` 15832 15833 // MimeType: The MIME type of the transcoded file. 15834 MimeType string `json:"mimeType,omitempty"` 15835 15836 // Name: The name of the transcoded file. 15837 Name string `json:"name,omitempty"` 15838 15839 // Transcoded: Indicates if the transcoding was successful. 15840 Transcoded bool `json:"transcoded,omitempty"` 15841 15842 // ForceSendFields is a list of field names (e.g. "AudioBitRateKbps") to 15843 // unconditionally include in API requests. By default, fields with 15844 // empty or default values are omitted from API requests. However, any 15845 // non-pointer, non-interface field appearing in ForceSendFields will be 15846 // sent to the server regardless of whether the field is empty or not. 15847 // This may be used to include empty fields in Patch requests. 15848 ForceSendFields []string `json:"-"` 15849 15850 // NullFields is a list of field names (e.g. "AudioBitRateKbps") to 15851 // include in API requests with the JSON null value. By default, fields 15852 // with empty values are omitted from API requests. However, any field 15853 // with an empty value appearing in NullFields will be sent to the 15854 // server as null. It is an error if a field in this list has a 15855 // non-empty value. This may be used to include null fields in Patch 15856 // requests. 15857 NullFields []string `json:"-"` 15858 } 15859 15860 func (s *Transcode) MarshalJSON() ([]byte, error) { 15861 type NoMethod Transcode 15862 raw := NoMethod(*s) 15863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15864 } 15865 15866 func (s *Transcode) UnmarshalJSON(data []byte) error { 15867 type NoMethod Transcode 15868 var s1 struct { 15869 FrameRate gensupport.JSONFloat64 `json:"frameRate"` 15870 *NoMethod 15871 } 15872 s1.NoMethod = (*NoMethod)(s) 15873 if err := json.Unmarshal(data, &s1); err != nil { 15874 return err 15875 } 15876 s.FrameRate = float64(s1.FrameRate) 15877 return nil 15878 } 15879 15880 // UniversalAdId: A creative identifier provided by a registry that is 15881 // unique across all platforms. This is part of the VAST 4.0 standard. 15882 type UniversalAdId struct { 15883 // Id: The unique creative identifier. 15884 Id string `json:"id,omitempty"` 15885 15886 // Registry: The registry provides unique creative identifiers. 15887 // 15888 // Possible values: 15889 // "UNIVERSAL_AD_REGISTRY_UNSPECIFIED" - The Universal Ad registry is 15890 // unspecified or is unknown in this version. 15891 // "UNIVERSAL_AD_REGISTRY_OTHER" - Use a custom provider to provide 15892 // the Universal Ad ID. 15893 // "UNIVERSAL_AD_REGISTRY_AD_ID" - Use Ad-ID to provide the Universal 15894 // Ad ID. 15895 // "UNIVERSAL_AD_REGISTRY_CLEARCAST" - Use clearcast.co.uk to provide 15896 // the Universal Ad ID. 15897 // "UNIVERSAL_AD_REGISTRY_DV360" - Use Display & Video 360 to provide 15898 // the Universal Ad ID. 15899 // "UNIVERSAL_AD_REGISTRY_CM" - Use Campaign Manager 360 to provide 15900 // the Universal Ad ID. 15901 Registry string `json:"registry,omitempty"` 15902 15903 // ForceSendFields is a list of field names (e.g. "Id") to 15904 // unconditionally include in API requests. By default, fields with 15905 // empty or default values are omitted from API requests. However, any 15906 // non-pointer, non-interface field appearing in ForceSendFields will be 15907 // sent to the server regardless of whether the field is empty or not. 15908 // This may be used to include empty fields in Patch requests. 15909 ForceSendFields []string `json:"-"` 15910 15911 // NullFields is a list of field names (e.g. "Id") to include in API 15912 // requests with the JSON null value. By default, fields with empty 15913 // values are omitted from API requests. However, any field with an 15914 // empty value appearing in NullFields will be sent to the server as 15915 // null. It is an error if a field in this list has a non-empty value. 15916 // This may be used to include null fields in Patch requests. 15917 NullFields []string `json:"-"` 15918 } 15919 15920 func (s *UniversalAdId) MarshalJSON() ([]byte, error) { 15921 type NoMethod UniversalAdId 15922 raw := NoMethod(*s) 15923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15924 } 15925 15926 // UrlAssignedTargetingOptionDetails: Details for assigned URL targeting 15927 // option. This will be populated in the details field of an 15928 // AssignedTargetingOption when targeting_type is `TARGETING_TYPE_URL`. 15929 type UrlAssignedTargetingOptionDetails struct { 15930 // Negative: Indicates if this option is being negatively targeted. 15931 Negative bool `json:"negative,omitempty"` 15932 15933 // Url: Required. The URL, for example `example.com`. DV360 supports two 15934 // levels of subdirectory targeting, for example 15935 // `www.example.com/one-subdirectory-level/second-level`, and five 15936 // levels of subdomain targeting, for example 15937 // `five.four.three.two.one.example.com`. 15938 Url string `json:"url,omitempty"` 15939 15940 // ForceSendFields is a list of field names (e.g. "Negative") to 15941 // unconditionally include in API requests. By default, fields with 15942 // empty or default values are omitted from API requests. However, any 15943 // non-pointer, non-interface field appearing in ForceSendFields will be 15944 // sent to the server regardless of whether the field is empty or not. 15945 // This may be used to include empty fields in Patch requests. 15946 ForceSendFields []string `json:"-"` 15947 15948 // NullFields is a list of field names (e.g. "Negative") to include in 15949 // API requests with the JSON null value. By default, fields with empty 15950 // values are omitted from API requests. However, any field with an 15951 // empty value appearing in NullFields will be sent to the server as 15952 // null. It is an error if a field in this list has a non-empty value. 15953 // This may be used to include null fields in Patch requests. 15954 NullFields []string `json:"-"` 15955 } 15956 15957 func (s *UrlAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 15958 type NoMethod UrlAssignedTargetingOptionDetails 15959 raw := NoMethod(*s) 15960 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 15961 } 15962 15963 // User: A single user in Display & Video 360. 15964 type User struct { 15965 // AssignedUserRoles: The assigned user roles. Required in CreateUser. 15966 // Output only in UpdateUser. Can only be updated through 15967 // BulkEditAssignedUserRoles. 15968 AssignedUserRoles []*AssignedUserRole `json:"assignedUserRoles,omitempty"` 15969 15970 // DisplayName: Required. The display name of the user. Must be UTF-8 15971 // encoded with a maximum size of 240 bytes. 15972 DisplayName string `json:"displayName,omitempty"` 15973 15974 // Email: Required. Immutable. The email address used to identify the 15975 // user. 15976 Email string `json:"email,omitempty"` 15977 15978 // LastLoginTime: Output only. The timestamp when the user last logged 15979 // in DV360 UI. 15980 LastLoginTime string `json:"lastLoginTime,omitempty"` 15981 15982 // Name: Output only. The resource name of the user. 15983 Name string `json:"name,omitempty"` 15984 15985 // UserId: Output only. The unique ID of the user. Assigned by the 15986 // system. 15987 UserId int64 `json:"userId,omitempty,string"` 15988 15989 // ServerResponse contains the HTTP response code and headers from the 15990 // server. 15991 googleapi.ServerResponse `json:"-"` 15992 15993 // ForceSendFields is a list of field names (e.g. "AssignedUserRoles") 15994 // to unconditionally include in API requests. By default, fields with 15995 // empty or default values are omitted from API requests. However, any 15996 // non-pointer, non-interface field appearing in ForceSendFields will be 15997 // sent to the server regardless of whether the field is empty or not. 15998 // This may be used to include empty fields in Patch requests. 15999 ForceSendFields []string `json:"-"` 16000 16001 // NullFields is a list of field names (e.g. "AssignedUserRoles") to 16002 // include in API requests with the JSON null value. By default, fields 16003 // with empty values are omitted from API requests. However, any field 16004 // with an empty value appearing in NullFields will be sent to the 16005 // server as null. It is an error if a field in this list has a 16006 // non-empty value. This may be used to include null fields in Patch 16007 // requests. 16008 NullFields []string `json:"-"` 16009 } 16010 16011 func (s *User) MarshalJSON() ([]byte, error) { 16012 type NoMethod User 16013 raw := NoMethod(*s) 16014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16015 } 16016 16017 // UserRewardedContentAssignedTargetingOptionDetails: User rewarded 16018 // content targeting option details. This will be populated in the 16019 // user_rewarded_content_details field when targeting_type is 16020 // `TARGETING_TYPE_USER_REWARDED_CONTENT`. 16021 type UserRewardedContentAssignedTargetingOptionDetails struct { 16022 // TargetingOptionId: Required. The targeting_option_id field when 16023 // targeting_type is `TARGETING_TYPE_USER_REWARDED_CONTENT`. 16024 TargetingOptionId string `json:"targetingOptionId,omitempty"` 16025 16026 // UserRewardedContent: Output only. User rewarded content status for 16027 // video ads. 16028 // 16029 // Possible values: 16030 // "USER_REWARDED_CONTENT_UNSPECIFIED" - User rewarded content is not 16031 // specified or is unknown in this version. 16032 // "USER_REWARDED_CONTENT_USER_REWARDED" - Represents ads where the 16033 // user will see a reward after viewing. 16034 // "USER_REWARDED_CONTENT_NOT_USER_REWARDED" - Represents all other 16035 // ads besides user-rewarded. 16036 UserRewardedContent string `json:"userRewardedContent,omitempty"` 16037 16038 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 16039 // to unconditionally include in API requests. By default, fields with 16040 // empty or default values are omitted from API requests. However, any 16041 // non-pointer, non-interface field appearing in ForceSendFields will be 16042 // sent to the server regardless of whether the field is empty or not. 16043 // This may be used to include empty fields in Patch requests. 16044 ForceSendFields []string `json:"-"` 16045 16046 // NullFields is a list of field names (e.g. "TargetingOptionId") to 16047 // include in API requests with the JSON null value. By default, fields 16048 // with empty values are omitted from API requests. However, any field 16049 // with an empty value appearing in NullFields will be sent to the 16050 // server as null. It is an error if a field in this list has a 16051 // non-empty value. This may be used to include null fields in Patch 16052 // requests. 16053 NullFields []string `json:"-"` 16054 } 16055 16056 func (s *UserRewardedContentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 16057 type NoMethod UserRewardedContentAssignedTargetingOptionDetails 16058 raw := NoMethod(*s) 16059 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16060 } 16061 16062 // UserRewardedContentTargetingOptionDetails: Represents a targetable 16063 // user rewarded content status for video ads only. This will be 16064 // populated in the user_rewarded_content_details field when 16065 // targeting_type is `TARGETING_TYPE_USER_REWARDED_CONTENT`. 16066 type UserRewardedContentTargetingOptionDetails struct { 16067 // UserRewardedContent: Output only. User rewarded content status for 16068 // video ads. 16069 // 16070 // Possible values: 16071 // "USER_REWARDED_CONTENT_UNSPECIFIED" - User rewarded content is not 16072 // specified or is unknown in this version. 16073 // "USER_REWARDED_CONTENT_USER_REWARDED" - Represents ads where the 16074 // user will see a reward after viewing. 16075 // "USER_REWARDED_CONTENT_NOT_USER_REWARDED" - Represents all other 16076 // ads besides user-rewarded. 16077 UserRewardedContent string `json:"userRewardedContent,omitempty"` 16078 16079 // ForceSendFields is a list of field names (e.g. "UserRewardedContent") 16080 // to unconditionally include in API requests. By default, fields with 16081 // empty or default values are omitted from API requests. However, any 16082 // non-pointer, non-interface field appearing in ForceSendFields will be 16083 // sent to the server regardless of whether the field is empty or not. 16084 // This may be used to include empty fields in Patch requests. 16085 ForceSendFields []string `json:"-"` 16086 16087 // NullFields is a list of field names (e.g. "UserRewardedContent") to 16088 // include in API requests with the JSON null value. By default, fields 16089 // with empty values are omitted from API requests. However, any field 16090 // with an empty value appearing in NullFields will be sent to the 16091 // server as null. It is an error if a field in this list has a 16092 // non-empty value. This may be used to include null fields in Patch 16093 // requests. 16094 NullFields []string `json:"-"` 16095 } 16096 16097 func (s *UserRewardedContentTargetingOptionDetails) MarshalJSON() ([]byte, error) { 16098 type NoMethod UserRewardedContentTargetingOptionDetails 16099 raw := NoMethod(*s) 16100 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16101 } 16102 16103 // VideoPlayerSizeAssignedTargetingOptionDetails: Video player size 16104 // targeting option details. This will be populated in the 16105 // video_player_size_details field when targeting_type is 16106 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. Explicitly targeting all options 16107 // is not supported. Remove all video player size targeting options to 16108 // achieve this effect. 16109 type VideoPlayerSizeAssignedTargetingOptionDetails struct { 16110 // TargetingOptionId: Required. The targeting_option_id field when 16111 // targeting_type is `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 16112 TargetingOptionId string `json:"targetingOptionId,omitempty"` 16113 16114 // VideoPlayerSize: Required. The video player size. 16115 // 16116 // Possible values: 16117 // "VIDEO_PLAYER_SIZE_UNSPECIFIED" - Video player size is not 16118 // specified in this version. This enum is a place holder for a default 16119 // value and does not represent a real video player size. 16120 // "VIDEO_PLAYER_SIZE_SMALL" - The dimensions of the video player are 16121 // less than 400×300 (desktop), or up to 20% of screen covered 16122 // (mobile). 16123 // "VIDEO_PLAYER_SIZE_LARGE" - The dimensions of the video player are 16124 // between 400x300 and 1280x720 pixels (desktop), or 20% to 90% of the 16125 // screen covered (mobile). 16126 // "VIDEO_PLAYER_SIZE_HD" - The dimensions of the video player are 16127 // 1280×720 or greater (desktop), or over 90% of the screen covered 16128 // (mobile). 16129 // "VIDEO_PLAYER_SIZE_UNKNOWN" - The dimensions of the video player 16130 // are unknown. 16131 VideoPlayerSize string `json:"videoPlayerSize,omitempty"` 16132 16133 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 16134 // to unconditionally include in API requests. By default, fields with 16135 // empty or default values are omitted from API requests. However, any 16136 // non-pointer, non-interface field appearing in ForceSendFields will be 16137 // sent to the server regardless of whether the field is empty or not. 16138 // This may be used to include empty fields in Patch requests. 16139 ForceSendFields []string `json:"-"` 16140 16141 // NullFields is a list of field names (e.g. "TargetingOptionId") to 16142 // include in API requests with the JSON null value. By default, fields 16143 // with empty values are omitted from API requests. However, any field 16144 // with an empty value appearing in NullFields will be sent to the 16145 // server as null. It is an error if a field in this list has a 16146 // non-empty value. This may be used to include null fields in Patch 16147 // requests. 16148 NullFields []string `json:"-"` 16149 } 16150 16151 func (s *VideoPlayerSizeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 16152 type NoMethod VideoPlayerSizeAssignedTargetingOptionDetails 16153 raw := NoMethod(*s) 16154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16155 } 16156 16157 // VideoPlayerSizeTargetingOptionDetails: Represents a targetable video 16158 // player size. This will be populated in the video_player_size_details 16159 // field when targeting_type is `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 16160 type VideoPlayerSizeTargetingOptionDetails struct { 16161 // VideoPlayerSize: Output only. The video player size. 16162 // 16163 // Possible values: 16164 // "VIDEO_PLAYER_SIZE_UNSPECIFIED" - Video player size is not 16165 // specified in this version. This enum is a place holder for a default 16166 // value and does not represent a real video player size. 16167 // "VIDEO_PLAYER_SIZE_SMALL" - The dimensions of the video player are 16168 // less than 400×300 (desktop), or up to 20% of screen covered 16169 // (mobile). 16170 // "VIDEO_PLAYER_SIZE_LARGE" - The dimensions of the video player are 16171 // between 400x300 and 1280x720 pixels (desktop), or 20% to 90% of the 16172 // screen covered (mobile). 16173 // "VIDEO_PLAYER_SIZE_HD" - The dimensions of the video player are 16174 // 1280×720 or greater (desktop), or over 90% of the screen covered 16175 // (mobile). 16176 // "VIDEO_PLAYER_SIZE_UNKNOWN" - The dimensions of the video player 16177 // are unknown. 16178 VideoPlayerSize string `json:"videoPlayerSize,omitempty"` 16179 16180 // ForceSendFields is a list of field names (e.g. "VideoPlayerSize") to 16181 // unconditionally include in API requests. By default, fields with 16182 // empty or default values are omitted from API requests. However, any 16183 // non-pointer, non-interface field appearing in ForceSendFields will be 16184 // sent to the server regardless of whether the field is empty or not. 16185 // This may be used to include empty fields in Patch requests. 16186 ForceSendFields []string `json:"-"` 16187 16188 // NullFields is a list of field names (e.g. "VideoPlayerSize") to 16189 // include in API requests with the JSON null value. By default, fields 16190 // with empty values are omitted from API requests. However, any field 16191 // with an empty value appearing in NullFields will be sent to the 16192 // server as null. It is an error if a field in this list has a 16193 // non-empty value. This may be used to include null fields in Patch 16194 // requests. 16195 NullFields []string `json:"-"` 16196 } 16197 16198 func (s *VideoPlayerSizeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 16199 type NoMethod VideoPlayerSizeTargetingOptionDetails 16200 raw := NoMethod(*s) 16201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16202 } 16203 16204 // ViewabilityAssignedTargetingOptionDetails: Assigned viewability 16205 // targeting option details. This will be populated in the 16206 // viewability_details field of an AssignedTargetingOption when 16207 // targeting_type is `TARGETING_TYPE_VIEWABILITY`. 16208 type ViewabilityAssignedTargetingOptionDetails struct { 16209 // TargetingOptionId: Required. The targeting_option_id of a 16210 // TargetingOption of type `TARGETING_TYPE_VIEWABILITY` (e.g., "509010" 16211 // for targeting the `VIEWABILITY_10_PERCENT_OR_MORE` option). 16212 TargetingOptionId string `json:"targetingOptionId,omitempty"` 16213 16214 // Viewability: Required. The predicted viewability percentage. 16215 // 16216 // Possible values: 16217 // "VIEWABILITY_UNSPECIFIED" - Default value when viewability is not 16218 // specified in this version. This enum is a placeholder for default 16219 // value and does not represent a real viewability option. 16220 // "VIEWABILITY_10_PERCENT_OR_MORE" - Bid only on impressions that are 16221 // at least 10% likely to be viewable. 16222 // "VIEWABILITY_20_PERCENT_OR_MORE" - Bid only on impressions that are 16223 // at least 20% likely to be viewable. 16224 // "VIEWABILITY_30_PERCENT_OR_MORE" - Bid only on impressions that are 16225 // at least 30% likely to be viewable. 16226 // "VIEWABILITY_40_PERCENT_OR_MORE" - Bid only on impressions that are 16227 // at least 40% likely to be viewable. 16228 // "VIEWABILITY_50_PERCENT_OR_MORE" - Bid only on impressions that are 16229 // at least 50% likely to be viewable. 16230 // "VIEWABILITY_60_PERCENT_OR_MORE" - Bid only on impressions that are 16231 // at least 60% likely to be viewable. 16232 // "VIEWABILITY_70_PERCENT_OR_MORE" - Bid only on impressions that are 16233 // at least 70% likely to be viewable. 16234 // "VIEWABILITY_80_PERCENT_OR_MORE" - Bid only on impressions that are 16235 // at least 80% likely to be viewable. 16236 // "VIEWABILITY_90_PERCENT_OR_MORE" - Bid only on impressions that are 16237 // at least 90% likely to be viewable. 16238 Viewability string `json:"viewability,omitempty"` 16239 16240 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 16241 // to unconditionally include in API requests. By default, fields with 16242 // empty or default values are omitted from API requests. However, any 16243 // non-pointer, non-interface field appearing in ForceSendFields will be 16244 // sent to the server regardless of whether the field is empty or not. 16245 // This may be used to include empty fields in Patch requests. 16246 ForceSendFields []string `json:"-"` 16247 16248 // NullFields is a list of field names (e.g. "TargetingOptionId") to 16249 // include in API requests with the JSON null value. By default, fields 16250 // with empty values are omitted from API requests. However, any field 16251 // with an empty value appearing in NullFields will be sent to the 16252 // server as null. It is an error if a field in this list has a 16253 // non-empty value. This may be used to include null fields in Patch 16254 // requests. 16255 NullFields []string `json:"-"` 16256 } 16257 16258 func (s *ViewabilityAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 16259 type NoMethod ViewabilityAssignedTargetingOptionDetails 16260 raw := NoMethod(*s) 16261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16262 } 16263 16264 // ViewabilityTargetingOptionDetails: Represents a targetable 16265 // viewability. This will be populated in the viewability_details field 16266 // of a TargetingOption when targeting_type is 16267 // `TARGETING_TYPE_VIEWABILITY`. 16268 type ViewabilityTargetingOptionDetails struct { 16269 // Viewability: Output only. The predicted viewability percentage. 16270 // 16271 // Possible values: 16272 // "VIEWABILITY_UNSPECIFIED" - Default value when viewability is not 16273 // specified in this version. This enum is a placeholder for default 16274 // value and does not represent a real viewability option. 16275 // "VIEWABILITY_10_PERCENT_OR_MORE" - Bid only on impressions that are 16276 // at least 10% likely to be viewable. 16277 // "VIEWABILITY_20_PERCENT_OR_MORE" - Bid only on impressions that are 16278 // at least 20% likely to be viewable. 16279 // "VIEWABILITY_30_PERCENT_OR_MORE" - Bid only on impressions that are 16280 // at least 30% likely to be viewable. 16281 // "VIEWABILITY_40_PERCENT_OR_MORE" - Bid only on impressions that are 16282 // at least 40% likely to be viewable. 16283 // "VIEWABILITY_50_PERCENT_OR_MORE" - Bid only on impressions that are 16284 // at least 50% likely to be viewable. 16285 // "VIEWABILITY_60_PERCENT_OR_MORE" - Bid only on impressions that are 16286 // at least 60% likely to be viewable. 16287 // "VIEWABILITY_70_PERCENT_OR_MORE" - Bid only on impressions that are 16288 // at least 70% likely to be viewable. 16289 // "VIEWABILITY_80_PERCENT_OR_MORE" - Bid only on impressions that are 16290 // at least 80% likely to be viewable. 16291 // "VIEWABILITY_90_PERCENT_OR_MORE" - Bid only on impressions that are 16292 // at least 90% likely to be viewable. 16293 Viewability string `json:"viewability,omitempty"` 16294 16295 // ForceSendFields is a list of field names (e.g. "Viewability") to 16296 // unconditionally include in API requests. By default, fields with 16297 // empty or default values are omitted from API requests. However, any 16298 // non-pointer, non-interface field appearing in ForceSendFields will be 16299 // sent to the server regardless of whether the field is empty or not. 16300 // This may be used to include empty fields in Patch requests. 16301 ForceSendFields []string `json:"-"` 16302 16303 // NullFields is a list of field names (e.g. "Viewability") to include 16304 // in API requests with the JSON null value. By default, fields with 16305 // empty values are omitted from API requests. However, any field with 16306 // an empty value appearing in NullFields will be sent to the server as 16307 // null. It is an error if a field in this list has a non-empty value. 16308 // This may be used to include null fields in Patch requests. 16309 NullFields []string `json:"-"` 16310 } 16311 16312 func (s *ViewabilityTargetingOptionDetails) MarshalJSON() ([]byte, error) { 16313 type NoMethod ViewabilityTargetingOptionDetails 16314 raw := NoMethod(*s) 16315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 16316 } 16317 16318 // method id "displayvideo.advertisers.audit": 16319 16320 type AdvertisersAuditCall struct { 16321 s *Service 16322 advertiserId int64 16323 urlParams_ gensupport.URLParams 16324 ifNoneMatch_ string 16325 ctx_ context.Context 16326 header_ http.Header 16327 } 16328 16329 // Audit: Audits an advertiser. Returns the counts of used entities per 16330 // resource type under the advertiser provided. Used entities count 16331 // towards their respective resource limit. See 16332 // https://support.google.com/displayvideo/answer/6071450. 16333 // 16334 // - advertiserId: The ID of the advertiser to audit. 16335 func (r *AdvertisersService) Audit(advertiserId int64) *AdvertisersAuditCall { 16336 c := &AdvertisersAuditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16337 c.advertiserId = advertiserId 16338 return c 16339 } 16340 16341 // ReadMask sets the optional parameter "readMask": The specific fields 16342 // to return. If no mask is specified, all fields in the response proto 16343 // will be filled. Valid values are: * usedLineItemsCount * 16344 // usedInsertionOrdersCount * usedCampaignsCount * channelsCount * 16345 // negativelyTargetedChannelsCount * negativeKeywordListsCount * 16346 // adGroupCriteriaCount * campaignCriteriaCount 16347 func (c *AdvertisersAuditCall) ReadMask(readMask string) *AdvertisersAuditCall { 16348 c.urlParams_.Set("readMask", readMask) 16349 return c 16350 } 16351 16352 // Fields allows partial responses to be retrieved. See 16353 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16354 // for more information. 16355 func (c *AdvertisersAuditCall) Fields(s ...googleapi.Field) *AdvertisersAuditCall { 16356 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16357 return c 16358 } 16359 16360 // IfNoneMatch sets the optional parameter which makes the operation 16361 // fail if the object's ETag matches the given value. This is useful for 16362 // getting updates only after the object has changed since the last 16363 // request. Use googleapi.IsNotModified to check whether the response 16364 // error from Do is the result of In-None-Match. 16365 func (c *AdvertisersAuditCall) IfNoneMatch(entityTag string) *AdvertisersAuditCall { 16366 c.ifNoneMatch_ = entityTag 16367 return c 16368 } 16369 16370 // Context sets the context to be used in this call's Do method. Any 16371 // pending HTTP request will be aborted if the provided context is 16372 // canceled. 16373 func (c *AdvertisersAuditCall) Context(ctx context.Context) *AdvertisersAuditCall { 16374 c.ctx_ = ctx 16375 return c 16376 } 16377 16378 // Header returns an http.Header that can be modified by the caller to 16379 // add HTTP headers to the request. 16380 func (c *AdvertisersAuditCall) Header() http.Header { 16381 if c.header_ == nil { 16382 c.header_ = make(http.Header) 16383 } 16384 return c.header_ 16385 } 16386 16387 func (c *AdvertisersAuditCall) doRequest(alt string) (*http.Response, error) { 16388 reqHeaders := make(http.Header) 16389 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 16390 for k, v := range c.header_ { 16391 reqHeaders[k] = v 16392 } 16393 reqHeaders.Set("User-Agent", c.s.userAgent()) 16394 if c.ifNoneMatch_ != "" { 16395 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16396 } 16397 var body io.Reader = nil 16398 c.urlParams_.Set("alt", alt) 16399 c.urlParams_.Set("prettyPrint", "false") 16400 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}:audit") 16401 urls += "?" + c.urlParams_.Encode() 16402 req, err := http.NewRequest("GET", urls, body) 16403 if err != nil { 16404 return nil, err 16405 } 16406 req.Header = reqHeaders 16407 googleapi.Expand(req.URL, map[string]string{ 16408 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16409 }) 16410 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16411 } 16412 16413 // Do executes the "displayvideo.advertisers.audit" call. 16414 // Exactly one of *AuditAdvertiserResponse or error will be non-nil. Any 16415 // non-2xx status code is an error. Response headers are in either 16416 // *AuditAdvertiserResponse.ServerResponse.Header or (if a response was 16417 // returned at all) in error.(*googleapi.Error).Header. Use 16418 // googleapi.IsNotModified to check whether the returned error was 16419 // because http.StatusNotModified was returned. 16420 func (c *AdvertisersAuditCall) Do(opts ...googleapi.CallOption) (*AuditAdvertiserResponse, error) { 16421 gensupport.SetOptions(c.urlParams_, opts...) 16422 res, err := c.doRequest("json") 16423 if res != nil && res.StatusCode == http.StatusNotModified { 16424 if res.Body != nil { 16425 res.Body.Close() 16426 } 16427 return nil, gensupport.WrapError(&googleapi.Error{ 16428 Code: res.StatusCode, 16429 Header: res.Header, 16430 }) 16431 } 16432 if err != nil { 16433 return nil, err 16434 } 16435 defer googleapi.CloseBody(res) 16436 if err := googleapi.CheckResponse(res); err != nil { 16437 return nil, gensupport.WrapError(err) 16438 } 16439 ret := &AuditAdvertiserResponse{ 16440 ServerResponse: googleapi.ServerResponse{ 16441 Header: res.Header, 16442 HTTPStatusCode: res.StatusCode, 16443 }, 16444 } 16445 target := &ret 16446 if err := gensupport.DecodeResponse(target, res); err != nil { 16447 return nil, err 16448 } 16449 return ret, nil 16450 // { 16451 // "description": "Audits an advertiser. Returns the counts of used entities per resource type under the advertiser provided. Used entities count towards their respective resource limit. See https://support.google.com/displayvideo/answer/6071450.", 16452 // "flatPath": "v1/advertisers/{advertisersId}:audit", 16453 // "httpMethod": "GET", 16454 // "id": "displayvideo.advertisers.audit", 16455 // "parameterOrder": [ 16456 // "advertiserId" 16457 // ], 16458 // "parameters": { 16459 // "advertiserId": { 16460 // "description": "Required. The ID of the advertiser to audit.", 16461 // "format": "int64", 16462 // "location": "path", 16463 // "pattern": "^[^/]+$", 16464 // "required": true, 16465 // "type": "string" 16466 // }, 16467 // "readMask": { 16468 // "description": "Optional. The specific fields to return. If no mask is specified, all fields in the response proto will be filled. Valid values are: * usedLineItemsCount * usedInsertionOrdersCount * usedCampaignsCount * channelsCount * negativelyTargetedChannelsCount * negativeKeywordListsCount * adGroupCriteriaCount * campaignCriteriaCount", 16469 // "format": "google-fieldmask", 16470 // "location": "query", 16471 // "type": "string" 16472 // } 16473 // }, 16474 // "path": "v1/advertisers/{+advertiserId}:audit", 16475 // "response": { 16476 // "$ref": "AuditAdvertiserResponse" 16477 // }, 16478 // "scopes": [ 16479 // "https://www.googleapis.com/auth/display-video" 16480 // ] 16481 // } 16482 16483 } 16484 16485 // method id "displayvideo.advertisers.bulkEditAdvertiserAssignedTargetingOptions": 16486 16487 type AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall struct { 16488 s *Service 16489 advertiserId int64 16490 bulkeditadvertiserassignedtargetingoptionsrequest *BulkEditAdvertiserAssignedTargetingOptionsRequest 16491 urlParams_ gensupport.URLParams 16492 ctx_ context.Context 16493 header_ http.Header 16494 } 16495 16496 // BulkEditAdvertiserAssignedTargetingOptions: Bulk edits targeting 16497 // options under a single advertiser. The operation will delete the 16498 // assigned targeting options provided in 16499 // BulkEditAdvertiserAssignedTargetingOptionsRequest.delete_requests and 16500 // then create the assigned targeting options provided in 16501 // BulkEditAdvertiserAssignedTargetingOptionsRequest.create_requests . 16502 // 16503 // - advertiserId: The ID of the advertiser. 16504 func (r *AdvertisersService) BulkEditAdvertiserAssignedTargetingOptions(advertiserId int64, bulkeditadvertiserassignedtargetingoptionsrequest *BulkEditAdvertiserAssignedTargetingOptionsRequest) *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall { 16505 c := &AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16506 c.advertiserId = advertiserId 16507 c.bulkeditadvertiserassignedtargetingoptionsrequest = bulkeditadvertiserassignedtargetingoptionsrequest 16508 return c 16509 } 16510 16511 // Fields allows partial responses to be retrieved. See 16512 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16513 // for more information. 16514 func (c *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall { 16515 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16516 return c 16517 } 16518 16519 // Context sets the context to be used in this call's Do method. Any 16520 // pending HTTP request will be aborted if the provided context is 16521 // canceled. 16522 func (c *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall { 16523 c.ctx_ = ctx 16524 return c 16525 } 16526 16527 // Header returns an http.Header that can be modified by the caller to 16528 // add HTTP headers to the request. 16529 func (c *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall) Header() http.Header { 16530 if c.header_ == nil { 16531 c.header_ = make(http.Header) 16532 } 16533 return c.header_ 16534 } 16535 16536 func (c *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 16537 reqHeaders := make(http.Header) 16538 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 16539 for k, v := range c.header_ { 16540 reqHeaders[k] = v 16541 } 16542 reqHeaders.Set("User-Agent", c.s.userAgent()) 16543 var body io.Reader = nil 16544 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditadvertiserassignedtargetingoptionsrequest) 16545 if err != nil { 16546 return nil, err 16547 } 16548 reqHeaders.Set("Content-Type", "application/json") 16549 c.urlParams_.Set("alt", alt) 16550 c.urlParams_.Set("prettyPrint", "false") 16551 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}:bulkEditAdvertiserAssignedTargetingOptions") 16552 urls += "?" + c.urlParams_.Encode() 16553 req, err := http.NewRequest("POST", urls, body) 16554 if err != nil { 16555 return nil, err 16556 } 16557 req.Header = reqHeaders 16558 googleapi.Expand(req.URL, map[string]string{ 16559 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16560 }) 16561 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16562 } 16563 16564 // Do executes the "displayvideo.advertisers.bulkEditAdvertiserAssignedTargetingOptions" call. 16565 // Exactly one of *BulkEditAdvertiserAssignedTargetingOptionsResponse or 16566 // error will be non-nil. Any non-2xx status code is an error. Response 16567 // headers are in either 16568 // *BulkEditAdvertiserAssignedTargetingOptionsResponse.ServerResponse.Hea 16569 // der or (if a response was returned at all) in 16570 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16571 // whether the returned error was because http.StatusNotModified was 16572 // returned. 16573 func (c *AdvertisersBulkEditAdvertiserAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditAdvertiserAssignedTargetingOptionsResponse, error) { 16574 gensupport.SetOptions(c.urlParams_, opts...) 16575 res, err := c.doRequest("json") 16576 if res != nil && res.StatusCode == http.StatusNotModified { 16577 if res.Body != nil { 16578 res.Body.Close() 16579 } 16580 return nil, gensupport.WrapError(&googleapi.Error{ 16581 Code: res.StatusCode, 16582 Header: res.Header, 16583 }) 16584 } 16585 if err != nil { 16586 return nil, err 16587 } 16588 defer googleapi.CloseBody(res) 16589 if err := googleapi.CheckResponse(res); err != nil { 16590 return nil, gensupport.WrapError(err) 16591 } 16592 ret := &BulkEditAdvertiserAssignedTargetingOptionsResponse{ 16593 ServerResponse: googleapi.ServerResponse{ 16594 Header: res.Header, 16595 HTTPStatusCode: res.StatusCode, 16596 }, 16597 } 16598 target := &ret 16599 if err := gensupport.DecodeResponse(target, res); err != nil { 16600 return nil, err 16601 } 16602 return ret, nil 16603 // { 16604 // "description": "Bulk edits targeting options under a single advertiser. The operation will delete the assigned targeting options provided in BulkEditAdvertiserAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAdvertiserAssignedTargetingOptionsRequest.create_requests .", 16605 // "flatPath": "v1/advertisers/{advertisersId}:bulkEditAdvertiserAssignedTargetingOptions", 16606 // "httpMethod": "POST", 16607 // "id": "displayvideo.advertisers.bulkEditAdvertiserAssignedTargetingOptions", 16608 // "parameterOrder": [ 16609 // "advertiserId" 16610 // ], 16611 // "parameters": { 16612 // "advertiserId": { 16613 // "description": "Required. The ID of the advertiser.", 16614 // "format": "int64", 16615 // "location": "path", 16616 // "pattern": "^[^/]+$", 16617 // "required": true, 16618 // "type": "string" 16619 // } 16620 // }, 16621 // "path": "v1/advertisers/{+advertiserId}:bulkEditAdvertiserAssignedTargetingOptions", 16622 // "request": { 16623 // "$ref": "BulkEditAdvertiserAssignedTargetingOptionsRequest" 16624 // }, 16625 // "response": { 16626 // "$ref": "BulkEditAdvertiserAssignedTargetingOptionsResponse" 16627 // }, 16628 // "scopes": [ 16629 // "https://www.googleapis.com/auth/display-video" 16630 // ] 16631 // } 16632 16633 } 16634 16635 // method id "displayvideo.advertisers.bulkListAdvertiserAssignedTargetingOptions": 16636 16637 type AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall struct { 16638 s *Service 16639 advertiserId int64 16640 urlParams_ gensupport.URLParams 16641 ifNoneMatch_ string 16642 ctx_ context.Context 16643 header_ http.Header 16644 } 16645 16646 // BulkListAdvertiserAssignedTargetingOptions: Lists assigned targeting 16647 // options of an advertiser across targeting types. 16648 // 16649 // - advertiserId: The ID of the advertiser the line item belongs to. 16650 func (r *AdvertisersService) BulkListAdvertiserAssignedTargetingOptions(advertiserId int64) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16651 c := &AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16652 c.advertiserId = advertiserId 16653 return c 16654 } 16655 16656 // Filter sets the optional parameter "filter": Allows filtering by 16657 // assigned targeting option fields. Supported syntax: * Filter 16658 // expressions are made up of one or more restrictions. * Restrictions 16659 // can be combined by the `OR` logical operator. * A restriction has the 16660 // form of `{field} {operator} {value}`. * All fields must use the 16661 // `EQUALS (=) operator`. Supported fields: * `targetingType` Examples: 16662 // * targetingType with value TARGETING_TYPE_CHANNEL 16663 // `targetingType="TARGETING_TYPE_CHANNEL" The length of this field 16664 // should be no more than 500 characters. Reference our filter `LIST` 16665 // requests (/display-video/api/guides/how-tos/filters) guide for more 16666 // information. 16667 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16668 c.urlParams_.Set("filter", filter) 16669 return c 16670 } 16671 16672 // OrderBy sets the optional parameter "orderBy": Field by which to sort 16673 // the list. Acceptable values are: * `targetingType` (default) The 16674 // default sorting order is ascending. To specify descending order for a 16675 // field, a suffix "desc" should be added to the field name. Example: 16676 // `targetingType desc`. 16677 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16678 c.urlParams_.Set("orderBy", orderBy) 16679 return c 16680 } 16681 16682 // PageSize sets the optional parameter "pageSize": Requested page size. 16683 // The size must be an integer between `1` and `5000`. If unspecified, 16684 // the default is '5000'. Returns error code `INVALID_ARGUMENT` if an 16685 // invalid value is specified. 16686 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16687 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16688 return c 16689 } 16690 16691 // PageToken sets the optional parameter "pageToken": A token that lets 16692 // the client fetch the next page of results. Typically, this is the 16693 // value of next_page_token returned from the previous call to 16694 // `BulkListAdvertiserAssignedTargetingOptions` method. If not 16695 // specified, the first page of results will be returned. 16696 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16697 c.urlParams_.Set("pageToken", pageToken) 16698 return c 16699 } 16700 16701 // Fields allows partial responses to be retrieved. See 16702 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16703 // for more information. 16704 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16705 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16706 return c 16707 } 16708 16709 // IfNoneMatch sets the optional parameter which makes the operation 16710 // fail if the object's ETag matches the given value. This is useful for 16711 // getting updates only after the object has changed since the last 16712 // request. Use googleapi.IsNotModified to check whether the response 16713 // error from Do is the result of In-None-Match. 16714 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16715 c.ifNoneMatch_ = entityTag 16716 return c 16717 } 16718 16719 // Context sets the context to be used in this call's Do method. Any 16720 // pending HTTP request will be aborted if the provided context is 16721 // canceled. 16722 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall { 16723 c.ctx_ = ctx 16724 return c 16725 } 16726 16727 // Header returns an http.Header that can be modified by the caller to 16728 // add HTTP headers to the request. 16729 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) Header() http.Header { 16730 if c.header_ == nil { 16731 c.header_ = make(http.Header) 16732 } 16733 return c.header_ 16734 } 16735 16736 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 16737 reqHeaders := make(http.Header) 16738 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 16739 for k, v := range c.header_ { 16740 reqHeaders[k] = v 16741 } 16742 reqHeaders.Set("User-Agent", c.s.userAgent()) 16743 if c.ifNoneMatch_ != "" { 16744 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16745 } 16746 var body io.Reader = nil 16747 c.urlParams_.Set("alt", alt) 16748 c.urlParams_.Set("prettyPrint", "false") 16749 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}:bulkListAdvertiserAssignedTargetingOptions") 16750 urls += "?" + c.urlParams_.Encode() 16751 req, err := http.NewRequest("GET", urls, body) 16752 if err != nil { 16753 return nil, err 16754 } 16755 req.Header = reqHeaders 16756 googleapi.Expand(req.URL, map[string]string{ 16757 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16758 }) 16759 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16760 } 16761 16762 // Do executes the "displayvideo.advertisers.bulkListAdvertiserAssignedTargetingOptions" call. 16763 // Exactly one of *BulkListAdvertiserAssignedTargetingOptionsResponse or 16764 // error will be non-nil. Any non-2xx status code is an error. Response 16765 // headers are in either 16766 // *BulkListAdvertiserAssignedTargetingOptionsResponse.ServerResponse.Hea 16767 // der or (if a response was returned at all) in 16768 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16769 // whether the returned error was because http.StatusNotModified was 16770 // returned. 16771 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListAdvertiserAssignedTargetingOptionsResponse, error) { 16772 gensupport.SetOptions(c.urlParams_, opts...) 16773 res, err := c.doRequest("json") 16774 if res != nil && res.StatusCode == http.StatusNotModified { 16775 if res.Body != nil { 16776 res.Body.Close() 16777 } 16778 return nil, gensupport.WrapError(&googleapi.Error{ 16779 Code: res.StatusCode, 16780 Header: res.Header, 16781 }) 16782 } 16783 if err != nil { 16784 return nil, err 16785 } 16786 defer googleapi.CloseBody(res) 16787 if err := googleapi.CheckResponse(res); err != nil { 16788 return nil, gensupport.WrapError(err) 16789 } 16790 ret := &BulkListAdvertiserAssignedTargetingOptionsResponse{ 16791 ServerResponse: googleapi.ServerResponse{ 16792 Header: res.Header, 16793 HTTPStatusCode: res.StatusCode, 16794 }, 16795 } 16796 target := &ret 16797 if err := gensupport.DecodeResponse(target, res); err != nil { 16798 return nil, err 16799 } 16800 return ret, nil 16801 // { 16802 // "description": "Lists assigned targeting options of an advertiser across targeting types.", 16803 // "flatPath": "v1/advertisers/{advertisersId}:bulkListAdvertiserAssignedTargetingOptions", 16804 // "httpMethod": "GET", 16805 // "id": "displayvideo.advertisers.bulkListAdvertiserAssignedTargetingOptions", 16806 // "parameterOrder": [ 16807 // "advertiserId" 16808 // ], 16809 // "parameters": { 16810 // "advertiserId": { 16811 // "description": "Required. The ID of the advertiser the line item belongs to.", 16812 // "format": "int64", 16813 // "location": "path", 16814 // "pattern": "^[^/]+$", 16815 // "required": true, 16816 // "type": "string" 16817 // }, 16818 // "filter": { 16819 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=) operator`. Supported fields: * `targetingType` Examples: * targetingType with value TARGETING_TYPE_CHANNEL `targetingType=\"TARGETING_TYPE_CHANNEL\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 16820 // "location": "query", 16821 // "type": "string" 16822 // }, 16823 // "orderBy": { 16824 // "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", 16825 // "location": "query", 16826 // "type": "string" 16827 // }, 16828 // "pageSize": { 16829 // "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is '5000'. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 16830 // "format": "int32", 16831 // "location": "query", 16832 // "type": "integer" 16833 // }, 16834 // "pageToken": { 16835 // "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListAdvertiserAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 16836 // "location": "query", 16837 // "type": "string" 16838 // } 16839 // }, 16840 // "path": "v1/advertisers/{+advertiserId}:bulkListAdvertiserAssignedTargetingOptions", 16841 // "response": { 16842 // "$ref": "BulkListAdvertiserAssignedTargetingOptionsResponse" 16843 // }, 16844 // "scopes": [ 16845 // "https://www.googleapis.com/auth/display-video" 16846 // ] 16847 // } 16848 16849 } 16850 16851 // Pages invokes f for each page of results. 16852 // A non-nil error returned from f will halt the iteration. 16853 // The provided context supersedes any context provided to the Context method. 16854 func (c *AdvertisersBulkListAdvertiserAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListAdvertiserAssignedTargetingOptionsResponse) error) error { 16855 c.ctx_ = ctx 16856 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16857 for { 16858 x, err := c.Do() 16859 if err != nil { 16860 return err 16861 } 16862 if err := f(x); err != nil { 16863 return err 16864 } 16865 if x.NextPageToken == "" { 16866 return nil 16867 } 16868 c.PageToken(x.NextPageToken) 16869 } 16870 } 16871 16872 // method id "displayvideo.advertisers.create": 16873 16874 type AdvertisersCreateCall struct { 16875 s *Service 16876 advertiser *Advertiser 16877 urlParams_ gensupport.URLParams 16878 ctx_ context.Context 16879 header_ http.Header 16880 } 16881 16882 // Create: Creates a new advertiser. Returns the newly created 16883 // advertiser if successful. This method can take up to 180 seconds to 16884 // complete. 16885 func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall { 16886 c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16887 c.advertiser = advertiser 16888 return c 16889 } 16890 16891 // Fields allows partial responses to be retrieved. See 16892 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16893 // for more information. 16894 func (c *AdvertisersCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreateCall { 16895 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16896 return c 16897 } 16898 16899 // Context sets the context to be used in this call's Do method. Any 16900 // pending HTTP request will be aborted if the provided context is 16901 // canceled. 16902 func (c *AdvertisersCreateCall) Context(ctx context.Context) *AdvertisersCreateCall { 16903 c.ctx_ = ctx 16904 return c 16905 } 16906 16907 // Header returns an http.Header that can be modified by the caller to 16908 // add HTTP headers to the request. 16909 func (c *AdvertisersCreateCall) Header() http.Header { 16910 if c.header_ == nil { 16911 c.header_ = make(http.Header) 16912 } 16913 return c.header_ 16914 } 16915 16916 func (c *AdvertisersCreateCall) doRequest(alt string) (*http.Response, error) { 16917 reqHeaders := make(http.Header) 16918 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 16919 for k, v := range c.header_ { 16920 reqHeaders[k] = v 16921 } 16922 reqHeaders.Set("User-Agent", c.s.userAgent()) 16923 var body io.Reader = nil 16924 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser) 16925 if err != nil { 16926 return nil, err 16927 } 16928 reqHeaders.Set("Content-Type", "application/json") 16929 c.urlParams_.Set("alt", alt) 16930 c.urlParams_.Set("prettyPrint", "false") 16931 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers") 16932 urls += "?" + c.urlParams_.Encode() 16933 req, err := http.NewRequest("POST", urls, body) 16934 if err != nil { 16935 return nil, err 16936 } 16937 req.Header = reqHeaders 16938 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16939 } 16940 16941 // Do executes the "displayvideo.advertisers.create" call. 16942 // Exactly one of *Advertiser or error will be non-nil. Any non-2xx 16943 // status code is an error. Response headers are in either 16944 // *Advertiser.ServerResponse.Header or (if a response was returned at 16945 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16946 // to check whether the returned error was because 16947 // http.StatusNotModified was returned. 16948 func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) { 16949 gensupport.SetOptions(c.urlParams_, opts...) 16950 res, err := c.doRequest("json") 16951 if res != nil && res.StatusCode == http.StatusNotModified { 16952 if res.Body != nil { 16953 res.Body.Close() 16954 } 16955 return nil, gensupport.WrapError(&googleapi.Error{ 16956 Code: res.StatusCode, 16957 Header: res.Header, 16958 }) 16959 } 16960 if err != nil { 16961 return nil, err 16962 } 16963 defer googleapi.CloseBody(res) 16964 if err := googleapi.CheckResponse(res); err != nil { 16965 return nil, gensupport.WrapError(err) 16966 } 16967 ret := &Advertiser{ 16968 ServerResponse: googleapi.ServerResponse{ 16969 Header: res.Header, 16970 HTTPStatusCode: res.StatusCode, 16971 }, 16972 } 16973 target := &ret 16974 if err := gensupport.DecodeResponse(target, res); err != nil { 16975 return nil, err 16976 } 16977 return ret, nil 16978 // { 16979 // "description": "Creates a new advertiser. Returns the newly created advertiser if successful. This method can take up to 180 seconds to complete.", 16980 // "flatPath": "v1/advertisers", 16981 // "httpMethod": "POST", 16982 // "id": "displayvideo.advertisers.create", 16983 // "parameterOrder": [], 16984 // "parameters": {}, 16985 // "path": "v1/advertisers", 16986 // "request": { 16987 // "$ref": "Advertiser" 16988 // }, 16989 // "response": { 16990 // "$ref": "Advertiser" 16991 // }, 16992 // "scopes": [ 16993 // "https://www.googleapis.com/auth/display-video" 16994 // ] 16995 // } 16996 16997 } 16998 16999 // method id "displayvideo.advertisers.delete": 17000 17001 type AdvertisersDeleteCall struct { 17002 s *Service 17003 advertiserId int64 17004 urlParams_ gensupport.URLParams 17005 ctx_ context.Context 17006 header_ http.Header 17007 } 17008 17009 // Delete: Deletes an advertiser. Deleting an advertiser will delete all 17010 // of its child resources, for example, campaigns, insertion orders and 17011 // line items. A deleted advertiser cannot be recovered. 17012 // 17013 // - advertiserId: The ID of the advertiser we need to delete. 17014 func (r *AdvertisersService) Delete(advertiserId int64) *AdvertisersDeleteCall { 17015 c := &AdvertisersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17016 c.advertiserId = advertiserId 17017 return c 17018 } 17019 17020 // Fields allows partial responses to be retrieved. See 17021 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17022 // for more information. 17023 func (c *AdvertisersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersDeleteCall { 17024 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17025 return c 17026 } 17027 17028 // Context sets the context to be used in this call's Do method. Any 17029 // pending HTTP request will be aborted if the provided context is 17030 // canceled. 17031 func (c *AdvertisersDeleteCall) Context(ctx context.Context) *AdvertisersDeleteCall { 17032 c.ctx_ = ctx 17033 return c 17034 } 17035 17036 // Header returns an http.Header that can be modified by the caller to 17037 // add HTTP headers to the request. 17038 func (c *AdvertisersDeleteCall) Header() http.Header { 17039 if c.header_ == nil { 17040 c.header_ = make(http.Header) 17041 } 17042 return c.header_ 17043 } 17044 17045 func (c *AdvertisersDeleteCall) doRequest(alt string) (*http.Response, error) { 17046 reqHeaders := make(http.Header) 17047 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 17048 for k, v := range c.header_ { 17049 reqHeaders[k] = v 17050 } 17051 reqHeaders.Set("User-Agent", c.s.userAgent()) 17052 var body io.Reader = nil 17053 c.urlParams_.Set("alt", alt) 17054 c.urlParams_.Set("prettyPrint", "false") 17055 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}") 17056 urls += "?" + c.urlParams_.Encode() 17057 req, err := http.NewRequest("DELETE", urls, body) 17058 if err != nil { 17059 return nil, err 17060 } 17061 req.Header = reqHeaders 17062 googleapi.Expand(req.URL, map[string]string{ 17063 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17064 }) 17065 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17066 } 17067 17068 // Do executes the "displayvideo.advertisers.delete" call. 17069 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 17070 // code is an error. Response headers are in either 17071 // *Empty.ServerResponse.Header or (if a response was returned at all) 17072 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17073 // check whether the returned error was because http.StatusNotModified 17074 // was returned. 17075 func (c *AdvertisersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 17076 gensupport.SetOptions(c.urlParams_, opts...) 17077 res, err := c.doRequest("json") 17078 if res != nil && res.StatusCode == http.StatusNotModified { 17079 if res.Body != nil { 17080 res.Body.Close() 17081 } 17082 return nil, gensupport.WrapError(&googleapi.Error{ 17083 Code: res.StatusCode, 17084 Header: res.Header, 17085 }) 17086 } 17087 if err != nil { 17088 return nil, err 17089 } 17090 defer googleapi.CloseBody(res) 17091 if err := googleapi.CheckResponse(res); err != nil { 17092 return nil, gensupport.WrapError(err) 17093 } 17094 ret := &Empty{ 17095 ServerResponse: googleapi.ServerResponse{ 17096 Header: res.Header, 17097 HTTPStatusCode: res.StatusCode, 17098 }, 17099 } 17100 target := &ret 17101 if err := gensupport.DecodeResponse(target, res); err != nil { 17102 return nil, err 17103 } 17104 return ret, nil 17105 // { 17106 // "description": "Deletes an advertiser. Deleting an advertiser will delete all of its child resources, for example, campaigns, insertion orders and line items. A deleted advertiser cannot be recovered.", 17107 // "flatPath": "v1/advertisers/{advertisersId}", 17108 // "httpMethod": "DELETE", 17109 // "id": "displayvideo.advertisers.delete", 17110 // "parameterOrder": [ 17111 // "advertiserId" 17112 // ], 17113 // "parameters": { 17114 // "advertiserId": { 17115 // "description": "The ID of the advertiser we need to delete.", 17116 // "format": "int64", 17117 // "location": "path", 17118 // "pattern": "^[^/]+$", 17119 // "required": true, 17120 // "type": "string" 17121 // } 17122 // }, 17123 // "path": "v1/advertisers/{+advertiserId}", 17124 // "response": { 17125 // "$ref": "Empty" 17126 // }, 17127 // "scopes": [ 17128 // "https://www.googleapis.com/auth/display-video" 17129 // ] 17130 // } 17131 17132 } 17133 17134 // method id "displayvideo.advertisers.get": 17135 17136 type AdvertisersGetCall struct { 17137 s *Service 17138 advertiserId int64 17139 urlParams_ gensupport.URLParams 17140 ifNoneMatch_ string 17141 ctx_ context.Context 17142 header_ http.Header 17143 } 17144 17145 // Get: Gets an advertiser. 17146 // 17147 // - advertiserId: The ID of the advertiser to fetch. 17148 func (r *AdvertisersService) Get(advertiserId int64) *AdvertisersGetCall { 17149 c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17150 c.advertiserId = advertiserId 17151 return c 17152 } 17153 17154 // Fields allows partial responses to be retrieved. See 17155 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17156 // for more information. 17157 func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall { 17158 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17159 return c 17160 } 17161 17162 // IfNoneMatch sets the optional parameter which makes the operation 17163 // fail if the object's ETag matches the given value. This is useful for 17164 // getting updates only after the object has changed since the last 17165 // request. Use googleapi.IsNotModified to check whether the response 17166 // error from Do is the result of In-None-Match. 17167 func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall { 17168 c.ifNoneMatch_ = entityTag 17169 return c 17170 } 17171 17172 // Context sets the context to be used in this call's Do method. Any 17173 // pending HTTP request will be aborted if the provided context is 17174 // canceled. 17175 func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall { 17176 c.ctx_ = ctx 17177 return c 17178 } 17179 17180 // Header returns an http.Header that can be modified by the caller to 17181 // add HTTP headers to the request. 17182 func (c *AdvertisersGetCall) Header() http.Header { 17183 if c.header_ == nil { 17184 c.header_ = make(http.Header) 17185 } 17186 return c.header_ 17187 } 17188 17189 func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) { 17190 reqHeaders := make(http.Header) 17191 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 17192 for k, v := range c.header_ { 17193 reqHeaders[k] = v 17194 } 17195 reqHeaders.Set("User-Agent", c.s.userAgent()) 17196 if c.ifNoneMatch_ != "" { 17197 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17198 } 17199 var body io.Reader = nil 17200 c.urlParams_.Set("alt", alt) 17201 c.urlParams_.Set("prettyPrint", "false") 17202 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}") 17203 urls += "?" + c.urlParams_.Encode() 17204 req, err := http.NewRequest("GET", urls, body) 17205 if err != nil { 17206 return nil, err 17207 } 17208 req.Header = reqHeaders 17209 googleapi.Expand(req.URL, map[string]string{ 17210 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17211 }) 17212 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17213 } 17214 17215 // Do executes the "displayvideo.advertisers.get" call. 17216 // Exactly one of *Advertiser or error will be non-nil. Any non-2xx 17217 // status code is an error. Response headers are in either 17218 // *Advertiser.ServerResponse.Header or (if a response was returned at 17219 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17220 // to check whether the returned error was because 17221 // http.StatusNotModified was returned. 17222 func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) { 17223 gensupport.SetOptions(c.urlParams_, opts...) 17224 res, err := c.doRequest("json") 17225 if res != nil && res.StatusCode == http.StatusNotModified { 17226 if res.Body != nil { 17227 res.Body.Close() 17228 } 17229 return nil, gensupport.WrapError(&googleapi.Error{ 17230 Code: res.StatusCode, 17231 Header: res.Header, 17232 }) 17233 } 17234 if err != nil { 17235 return nil, err 17236 } 17237 defer googleapi.CloseBody(res) 17238 if err := googleapi.CheckResponse(res); err != nil { 17239 return nil, gensupport.WrapError(err) 17240 } 17241 ret := &Advertiser{ 17242 ServerResponse: googleapi.ServerResponse{ 17243 Header: res.Header, 17244 HTTPStatusCode: res.StatusCode, 17245 }, 17246 } 17247 target := &ret 17248 if err := gensupport.DecodeResponse(target, res); err != nil { 17249 return nil, err 17250 } 17251 return ret, nil 17252 // { 17253 // "description": "Gets an advertiser.", 17254 // "flatPath": "v1/advertisers/{advertisersId}", 17255 // "httpMethod": "GET", 17256 // "id": "displayvideo.advertisers.get", 17257 // "parameterOrder": [ 17258 // "advertiserId" 17259 // ], 17260 // "parameters": { 17261 // "advertiserId": { 17262 // "description": "Required. The ID of the advertiser to fetch.", 17263 // "format": "int64", 17264 // "location": "path", 17265 // "pattern": "^[^/]+$", 17266 // "required": true, 17267 // "type": "string" 17268 // } 17269 // }, 17270 // "path": "v1/advertisers/{+advertiserId}", 17271 // "response": { 17272 // "$ref": "Advertiser" 17273 // }, 17274 // "scopes": [ 17275 // "https://www.googleapis.com/auth/display-video" 17276 // ] 17277 // } 17278 17279 } 17280 17281 // method id "displayvideo.advertisers.list": 17282 17283 type AdvertisersListCall struct { 17284 s *Service 17285 urlParams_ gensupport.URLParams 17286 ifNoneMatch_ string 17287 ctx_ context.Context 17288 header_ http.Header 17289 } 17290 17291 // List: Lists advertisers that are accessible to the current user. The 17292 // order is defined by the order_by parameter. A single partner_id is 17293 // required. Cross-partner listing is not supported. 17294 func (r *AdvertisersService) List() *AdvertisersListCall { 17295 c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17296 return c 17297 } 17298 17299 // Filter sets the optional parameter "filter": Allows filtering by 17300 // advertiser fields. Supported syntax: * Filter expressions are made up 17301 // of one or more restrictions. * Restrictions can be combined by `AND` 17302 // or `OR` logical operators. * A restriction has the form of `{field} 17303 // {operator} {value}`. * The `updateTime` field must use the `GREATER 17304 // THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` operators. * 17305 // All other fields must use the `EQUALS (=)` operator. Supported 17306 // fields: * `advertiserId` * `displayName` * `entityStatus` * 17307 // `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) 17308 // Examples: * All active advertisers under a partner: 17309 // `entityStatus="ENTITY_STATUS_ACTIVE" * All advertisers with an 17310 // update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 17311 // 8601): `updateTime<="2020-11-04T18:54:47Z" * All advertisers with an 17312 // update time greater than or equal to 2020-11-04T18:54:47Z (format of 17313 // ISO 8601): `updateTime>="2020-11-04T18:54:47Z" The length of this 17314 // field should be no more than 500 characters. Reference our filter 17315 // `LIST` requests (/display-video/api/guides/how-tos/filters) guide for 17316 // more information. 17317 func (c *AdvertisersListCall) Filter(filter string) *AdvertisersListCall { 17318 c.urlParams_.Set("filter", filter) 17319 return c 17320 } 17321 17322 // OrderBy sets the optional parameter "orderBy": Field by which to sort 17323 // the list. Acceptable values are: * `displayName` (default) * 17324 // `entityStatus` * `updateTime` The default sorting order is ascending. 17325 // To specify descending order for a field, a suffix "desc" should be 17326 // added to the field name. For example, `displayName desc`. 17327 func (c *AdvertisersListCall) OrderBy(orderBy string) *AdvertisersListCall { 17328 c.urlParams_.Set("orderBy", orderBy) 17329 return c 17330 } 17331 17332 // PageSize sets the optional parameter "pageSize": Requested page size. 17333 // Must be between `1` and `200`. If unspecified will default to `100`. 17334 func (c *AdvertisersListCall) PageSize(pageSize int64) *AdvertisersListCall { 17335 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 17336 return c 17337 } 17338 17339 // PageToken sets the optional parameter "pageToken": A token 17340 // identifying a page of results the server should return. Typically, 17341 // this is the value of next_page_token returned from the previous call 17342 // to `ListAdvertisers` method. If not specified, the first page of 17343 // results will be returned. 17344 func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall { 17345 c.urlParams_.Set("pageToken", pageToken) 17346 return c 17347 } 17348 17349 // PartnerId sets the optional parameter "partnerId": Required. The ID 17350 // of the partner that the fetched advertisers should all belong to. The 17351 // system only supports listing advertisers for one partner at a time. 17352 func (c *AdvertisersListCall) PartnerId(partnerId int64) *AdvertisersListCall { 17353 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 17354 return c 17355 } 17356 17357 // Fields allows partial responses to be retrieved. See 17358 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17359 // for more information. 17360 func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall { 17361 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17362 return c 17363 } 17364 17365 // IfNoneMatch sets the optional parameter which makes the operation 17366 // fail if the object's ETag matches the given value. This is useful for 17367 // getting updates only after the object has changed since the last 17368 // request. Use googleapi.IsNotModified to check whether the response 17369 // error from Do is the result of In-None-Match. 17370 func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall { 17371 c.ifNoneMatch_ = entityTag 17372 return c 17373 } 17374 17375 // Context sets the context to be used in this call's Do method. Any 17376 // pending HTTP request will be aborted if the provided context is 17377 // canceled. 17378 func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall { 17379 c.ctx_ = ctx 17380 return c 17381 } 17382 17383 // Header returns an http.Header that can be modified by the caller to 17384 // add HTTP headers to the request. 17385 func (c *AdvertisersListCall) Header() http.Header { 17386 if c.header_ == nil { 17387 c.header_ = make(http.Header) 17388 } 17389 return c.header_ 17390 } 17391 17392 func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) { 17393 reqHeaders := make(http.Header) 17394 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 17395 for k, v := range c.header_ { 17396 reqHeaders[k] = v 17397 } 17398 reqHeaders.Set("User-Agent", c.s.userAgent()) 17399 if c.ifNoneMatch_ != "" { 17400 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17401 } 17402 var body io.Reader = nil 17403 c.urlParams_.Set("alt", alt) 17404 c.urlParams_.Set("prettyPrint", "false") 17405 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers") 17406 urls += "?" + c.urlParams_.Encode() 17407 req, err := http.NewRequest("GET", urls, body) 17408 if err != nil { 17409 return nil, err 17410 } 17411 req.Header = reqHeaders 17412 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17413 } 17414 17415 // Do executes the "displayvideo.advertisers.list" call. 17416 // Exactly one of *ListAdvertisersResponse or error will be non-nil. Any 17417 // non-2xx status code is an error. Response headers are in either 17418 // *ListAdvertisersResponse.ServerResponse.Header or (if a response was 17419 // returned at all) in error.(*googleapi.Error).Header. Use 17420 // googleapi.IsNotModified to check whether the returned error was 17421 // because http.StatusNotModified was returned. 17422 func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisersResponse, error) { 17423 gensupport.SetOptions(c.urlParams_, opts...) 17424 res, err := c.doRequest("json") 17425 if res != nil && res.StatusCode == http.StatusNotModified { 17426 if res.Body != nil { 17427 res.Body.Close() 17428 } 17429 return nil, gensupport.WrapError(&googleapi.Error{ 17430 Code: res.StatusCode, 17431 Header: res.Header, 17432 }) 17433 } 17434 if err != nil { 17435 return nil, err 17436 } 17437 defer googleapi.CloseBody(res) 17438 if err := googleapi.CheckResponse(res); err != nil { 17439 return nil, gensupport.WrapError(err) 17440 } 17441 ret := &ListAdvertisersResponse{ 17442 ServerResponse: googleapi.ServerResponse{ 17443 Header: res.Header, 17444 HTTPStatusCode: res.StatusCode, 17445 }, 17446 } 17447 target := &ret 17448 if err := gensupport.DecodeResponse(target, res); err != nil { 17449 return nil, err 17450 } 17451 return ret, nil 17452 // { 17453 // "description": "Lists advertisers that are accessible to the current user. The order is defined by the order_by parameter. A single partner_id is required. Cross-partner listing is not supported.", 17454 // "flatPath": "v1/advertisers", 17455 // "httpMethod": "GET", 17456 // "id": "displayvideo.advertisers.list", 17457 // "parameterOrder": [], 17458 // "parameters": { 17459 // "filter": { 17460 // "description": "Allows filtering by advertiser fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `advertiserId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All active advertisers under a partner: `entityStatus=\"ENTITY_STATUS_ACTIVE\"` * All advertisers with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All advertisers with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 17461 // "location": "query", 17462 // "type": "string" 17463 // }, 17464 // "orderBy": { 17465 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 17466 // "location": "query", 17467 // "type": "string" 17468 // }, 17469 // "pageSize": { 17470 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 17471 // "format": "int32", 17472 // "location": "query", 17473 // "type": "integer" 17474 // }, 17475 // "pageToken": { 17476 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListAdvertisers` method. If not specified, the first page of results will be returned.", 17477 // "location": "query", 17478 // "type": "string" 17479 // }, 17480 // "partnerId": { 17481 // "description": "Required. The ID of the partner that the fetched advertisers should all belong to. The system only supports listing advertisers for one partner at a time.", 17482 // "format": "int64", 17483 // "location": "query", 17484 // "type": "string" 17485 // } 17486 // }, 17487 // "path": "v1/advertisers", 17488 // "response": { 17489 // "$ref": "ListAdvertisersResponse" 17490 // }, 17491 // "scopes": [ 17492 // "https://www.googleapis.com/auth/display-video" 17493 // ] 17494 // } 17495 17496 } 17497 17498 // Pages invokes f for each page of results. 17499 // A non-nil error returned from f will halt the iteration. 17500 // The provided context supersedes any context provided to the Context method. 17501 func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*ListAdvertisersResponse) error) error { 17502 c.ctx_ = ctx 17503 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17504 for { 17505 x, err := c.Do() 17506 if err != nil { 17507 return err 17508 } 17509 if err := f(x); err != nil { 17510 return err 17511 } 17512 if x.NextPageToken == "" { 17513 return nil 17514 } 17515 c.PageToken(x.NextPageToken) 17516 } 17517 } 17518 17519 // method id "displayvideo.advertisers.patch": 17520 17521 type AdvertisersPatchCall struct { 17522 s *Service 17523 advertiserId int64 17524 advertiser *Advertiser 17525 urlParams_ gensupport.URLParams 17526 ctx_ context.Context 17527 header_ http.Header 17528 } 17529 17530 // Patch: Updates an existing advertiser. Returns the updated advertiser 17531 // if successful. 17532 // 17533 // - advertiserId: Output only. The unique ID of the advertiser. 17534 // Assigned by the system. 17535 func (r *AdvertisersService) Patch(advertiserId int64, advertiser *Advertiser) *AdvertisersPatchCall { 17536 c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17537 c.advertiserId = advertiserId 17538 c.advertiser = advertiser 17539 return c 17540 } 17541 17542 // UpdateMask sets the optional parameter "updateMask": Required. The 17543 // mask to control which fields to update. 17544 func (c *AdvertisersPatchCall) UpdateMask(updateMask string) *AdvertisersPatchCall { 17545 c.urlParams_.Set("updateMask", updateMask) 17546 return c 17547 } 17548 17549 // Fields allows partial responses to be retrieved. See 17550 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17551 // for more information. 17552 func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall { 17553 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17554 return c 17555 } 17556 17557 // Context sets the context to be used in this call's Do method. Any 17558 // pending HTTP request will be aborted if the provided context is 17559 // canceled. 17560 func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall { 17561 c.ctx_ = ctx 17562 return c 17563 } 17564 17565 // Header returns an http.Header that can be modified by the caller to 17566 // add HTTP headers to the request. 17567 func (c *AdvertisersPatchCall) Header() http.Header { 17568 if c.header_ == nil { 17569 c.header_ = make(http.Header) 17570 } 17571 return c.header_ 17572 } 17573 17574 func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) { 17575 reqHeaders := make(http.Header) 17576 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 17577 for k, v := range c.header_ { 17578 reqHeaders[k] = v 17579 } 17580 reqHeaders.Set("User-Agent", c.s.userAgent()) 17581 var body io.Reader = nil 17582 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser) 17583 if err != nil { 17584 return nil, err 17585 } 17586 reqHeaders.Set("Content-Type", "application/json") 17587 c.urlParams_.Set("alt", alt) 17588 c.urlParams_.Set("prettyPrint", "false") 17589 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}") 17590 urls += "?" + c.urlParams_.Encode() 17591 req, err := http.NewRequest("PATCH", urls, body) 17592 if err != nil { 17593 return nil, err 17594 } 17595 req.Header = reqHeaders 17596 googleapi.Expand(req.URL, map[string]string{ 17597 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17598 }) 17599 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17600 } 17601 17602 // Do executes the "displayvideo.advertisers.patch" call. 17603 // Exactly one of *Advertiser or error will be non-nil. Any non-2xx 17604 // status code is an error. Response headers are in either 17605 // *Advertiser.ServerResponse.Header or (if a response was returned at 17606 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17607 // to check whether the returned error was because 17608 // http.StatusNotModified was returned. 17609 func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) { 17610 gensupport.SetOptions(c.urlParams_, opts...) 17611 res, err := c.doRequest("json") 17612 if res != nil && res.StatusCode == http.StatusNotModified { 17613 if res.Body != nil { 17614 res.Body.Close() 17615 } 17616 return nil, gensupport.WrapError(&googleapi.Error{ 17617 Code: res.StatusCode, 17618 Header: res.Header, 17619 }) 17620 } 17621 if err != nil { 17622 return nil, err 17623 } 17624 defer googleapi.CloseBody(res) 17625 if err := googleapi.CheckResponse(res); err != nil { 17626 return nil, gensupport.WrapError(err) 17627 } 17628 ret := &Advertiser{ 17629 ServerResponse: googleapi.ServerResponse{ 17630 Header: res.Header, 17631 HTTPStatusCode: res.StatusCode, 17632 }, 17633 } 17634 target := &ret 17635 if err := gensupport.DecodeResponse(target, res); err != nil { 17636 return nil, err 17637 } 17638 return ret, nil 17639 // { 17640 // "description": "Updates an existing advertiser. Returns the updated advertiser if successful.", 17641 // "flatPath": "v1/advertisers/{advertisersId}", 17642 // "httpMethod": "PATCH", 17643 // "id": "displayvideo.advertisers.patch", 17644 // "parameterOrder": [ 17645 // "advertiserId" 17646 // ], 17647 // "parameters": { 17648 // "advertiserId": { 17649 // "description": "Output only. The unique ID of the advertiser. Assigned by the system.", 17650 // "format": "int64", 17651 // "location": "path", 17652 // "pattern": "^[^/]+$", 17653 // "required": true, 17654 // "type": "string" 17655 // }, 17656 // "updateMask": { 17657 // "description": "Required. The mask to control which fields to update.", 17658 // "format": "google-fieldmask", 17659 // "location": "query", 17660 // "type": "string" 17661 // } 17662 // }, 17663 // "path": "v1/advertisers/{+advertiserId}", 17664 // "request": { 17665 // "$ref": "Advertiser" 17666 // }, 17667 // "response": { 17668 // "$ref": "Advertiser" 17669 // }, 17670 // "scopes": [ 17671 // "https://www.googleapis.com/auth/display-video" 17672 // ] 17673 // } 17674 17675 } 17676 17677 // method id "displayvideo.advertisers.assets.upload": 17678 17679 type AdvertisersAssetsUploadCall struct { 17680 s *Service 17681 advertiserId int64 17682 createassetrequest *CreateAssetRequest 17683 urlParams_ gensupport.URLParams 17684 mediaInfo_ *gensupport.MediaInfo 17685 ctx_ context.Context 17686 header_ http.Header 17687 } 17688 17689 // Upload: Uploads an asset. Returns the ID of the newly uploaded asset 17690 // if successful. The asset file size should be no more than 10 MB for 17691 // images, 200 MB for ZIP files, and 1 GB for videos. Must be used 17692 // within the multipart media upload process 17693 // (/display-video/api/guides/how-tos/upload#multipart). Examples using 17694 // provided client libraries can be found in our Creating Creatives 17695 // guide 17696 // (/display-video/api/guides/creating-creatives/overview#upload_an_asset 17697 // ). 17698 // 17699 // - advertiserId: The ID of the advertiser this asset belongs to. 17700 func (r *AdvertisersAssetsService) Upload(advertiserId int64, createassetrequest *CreateAssetRequest) *AdvertisersAssetsUploadCall { 17701 c := &AdvertisersAssetsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17702 c.advertiserId = advertiserId 17703 c.createassetrequest = createassetrequest 17704 return c 17705 } 17706 17707 // Media specifies the media to upload in one or more chunks. The chunk 17708 // size may be controlled by supplying a MediaOption generated by 17709 // googleapi.ChunkSize. The chunk size defaults to 17710 // googleapi.DefaultUploadChunkSize.The Content-Type header used in the 17711 // upload request will be determined by sniffing the contents of r, 17712 // unless a MediaOption generated by googleapi.ContentType is 17713 // supplied. 17714 // At most one of Media and ResumableMedia may be set. 17715 func (c *AdvertisersAssetsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *AdvertisersAssetsUploadCall { 17716 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) 17717 return c 17718 } 17719 17720 // ResumableMedia specifies the media to upload in chunks and can be 17721 // canceled with ctx. 17722 // 17723 // Deprecated: use Media instead. 17724 // 17725 // At most one of Media and ResumableMedia may be set. mediaType 17726 // identifies the MIME media type of the upload, such as "image/png". If 17727 // mediaType is "", it will be auto-detected. The provided ctx will 17728 // supersede any context previously provided to the Context method. 17729 func (c *AdvertisersAssetsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *AdvertisersAssetsUploadCall { 17730 c.ctx_ = ctx 17731 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) 17732 return c 17733 } 17734 17735 // ProgressUpdater provides a callback function that will be called 17736 // after every chunk. It should be a low-latency function in order to 17737 // not slow down the upload operation. This should only be called when 17738 // using ResumableMedia (as opposed to Media). 17739 func (c *AdvertisersAssetsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *AdvertisersAssetsUploadCall { 17740 c.mediaInfo_.SetProgressUpdater(pu) 17741 return c 17742 } 17743 17744 // Fields allows partial responses to be retrieved. See 17745 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17746 // for more information. 17747 func (c *AdvertisersAssetsUploadCall) Fields(s ...googleapi.Field) *AdvertisersAssetsUploadCall { 17748 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17749 return c 17750 } 17751 17752 // Context sets the context to be used in this call's Do method. Any 17753 // pending HTTP request will be aborted if the provided context is 17754 // canceled. 17755 // This context will supersede any context previously provided to the 17756 // ResumableMedia method. 17757 func (c *AdvertisersAssetsUploadCall) Context(ctx context.Context) *AdvertisersAssetsUploadCall { 17758 c.ctx_ = ctx 17759 return c 17760 } 17761 17762 // Header returns an http.Header that can be modified by the caller to 17763 // add HTTP headers to the request. 17764 func (c *AdvertisersAssetsUploadCall) Header() http.Header { 17765 if c.header_ == nil { 17766 c.header_ = make(http.Header) 17767 } 17768 return c.header_ 17769 } 17770 17771 func (c *AdvertisersAssetsUploadCall) doRequest(alt string) (*http.Response, error) { 17772 reqHeaders := make(http.Header) 17773 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 17774 for k, v := range c.header_ { 17775 reqHeaders[k] = v 17776 } 17777 reqHeaders.Set("User-Agent", c.s.userAgent()) 17778 var body io.Reader = nil 17779 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createassetrequest) 17780 if err != nil { 17781 return nil, err 17782 } 17783 reqHeaders.Set("Content-Type", "application/json") 17784 c.urlParams_.Set("alt", alt) 17785 c.urlParams_.Set("prettyPrint", "false") 17786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/assets") 17787 if c.mediaInfo_ != nil { 17788 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/advertisers/{+advertiserId}/assets") 17789 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) 17790 } 17791 if body == nil { 17792 body = new(bytes.Buffer) 17793 reqHeaders.Set("Content-Type", "application/json") 17794 } 17795 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) 17796 defer cleanup() 17797 urls += "?" + c.urlParams_.Encode() 17798 req, err := http.NewRequest("POST", urls, body) 17799 if err != nil { 17800 return nil, err 17801 } 17802 req.Header = reqHeaders 17803 req.GetBody = getBody 17804 googleapi.Expand(req.URL, map[string]string{ 17805 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17806 }) 17807 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17808 } 17809 17810 // Do executes the "displayvideo.advertisers.assets.upload" call. 17811 // Exactly one of *CreateAssetResponse or error will be non-nil. Any 17812 // non-2xx status code is an error. Response headers are in either 17813 // *CreateAssetResponse.ServerResponse.Header or (if a response was 17814 // returned at all) in error.(*googleapi.Error).Header. Use 17815 // googleapi.IsNotModified to check whether the returned error was 17816 // because http.StatusNotModified was returned. 17817 func (c *AdvertisersAssetsUploadCall) Do(opts ...googleapi.CallOption) (*CreateAssetResponse, error) { 17818 gensupport.SetOptions(c.urlParams_, opts...) 17819 res, err := c.doRequest("json") 17820 if res != nil && res.StatusCode == http.StatusNotModified { 17821 if res.Body != nil { 17822 res.Body.Close() 17823 } 17824 return nil, gensupport.WrapError(&googleapi.Error{ 17825 Code: res.StatusCode, 17826 Header: res.Header, 17827 }) 17828 } 17829 if err != nil { 17830 return nil, err 17831 } 17832 defer googleapi.CloseBody(res) 17833 if err := googleapi.CheckResponse(res); err != nil { 17834 return nil, gensupport.WrapError(err) 17835 } 17836 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) 17837 if rx != nil { 17838 rx.Client = c.s.client 17839 rx.UserAgent = c.s.userAgent() 17840 ctx := c.ctx_ 17841 if ctx == nil { 17842 ctx = context.TODO() 17843 } 17844 res, err = rx.Upload(ctx) 17845 if err != nil { 17846 return nil, err 17847 } 17848 defer res.Body.Close() 17849 if err := googleapi.CheckResponse(res); err != nil { 17850 return nil, gensupport.WrapError(err) 17851 } 17852 } 17853 ret := &CreateAssetResponse{ 17854 ServerResponse: googleapi.ServerResponse{ 17855 Header: res.Header, 17856 HTTPStatusCode: res.StatusCode, 17857 }, 17858 } 17859 target := &ret 17860 if err := gensupport.DecodeResponse(target, res); err != nil { 17861 return nil, err 17862 } 17863 return ret, nil 17864 // { 17865 // "description": "Uploads an asset. Returns the ID of the newly uploaded asset if successful. The asset file size should be no more than 10 MB for images, 200 MB for ZIP files, and 1 GB for videos. Must be used within the [multipart media upload process](/display-video/api/guides/how-tos/upload#multipart). Examples using provided client libraries can be found in our [Creating Creatives guide](/display-video/api/guides/creating-creatives/overview#upload_an_asset).", 17866 // "flatPath": "v1/advertisers/{advertisersId}/assets", 17867 // "httpMethod": "POST", 17868 // "id": "displayvideo.advertisers.assets.upload", 17869 // "mediaUpload": { 17870 // "accept": [ 17871 // "*/*" 17872 // ], 17873 // "protocols": { 17874 // "simple": { 17875 // "multipart": true, 17876 // "path": "/upload/v1/advertisers/{+advertiserId}/assets" 17877 // } 17878 // } 17879 // }, 17880 // "parameterOrder": [ 17881 // "advertiserId" 17882 // ], 17883 // "parameters": { 17884 // "advertiserId": { 17885 // "description": "Required. The ID of the advertiser this asset belongs to.", 17886 // "format": "int64", 17887 // "location": "path", 17888 // "pattern": "^[^/]+$", 17889 // "required": true, 17890 // "type": "string" 17891 // } 17892 // }, 17893 // "path": "v1/advertisers/{+advertiserId}/assets", 17894 // "request": { 17895 // "$ref": "CreateAssetRequest" 17896 // }, 17897 // "response": { 17898 // "$ref": "CreateAssetResponse" 17899 // }, 17900 // "scopes": [ 17901 // "https://www.googleapis.com/auth/display-video" 17902 // ], 17903 // "supportsMediaUpload": true 17904 // } 17905 17906 } 17907 17908 // method id "displayvideo.advertisers.campaigns.bulkListCampaignAssignedTargetingOptions": 17909 17910 type AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall struct { 17911 s *Service 17912 advertiserId int64 17913 campaignId int64 17914 urlParams_ gensupport.URLParams 17915 ifNoneMatch_ string 17916 ctx_ context.Context 17917 header_ http.Header 17918 } 17919 17920 // BulkListCampaignAssignedTargetingOptions: Lists assigned targeting 17921 // options of a campaign across targeting types. 17922 // 17923 // - advertiserId: The ID of the advertiser the campaign belongs to. 17924 // - campaignId: The ID of the campaign to list assigned targeting 17925 // options for. 17926 func (r *AdvertisersCampaignsService) BulkListCampaignAssignedTargetingOptions(advertiserId int64, campaignId int64) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17927 c := &AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17928 c.advertiserId = advertiserId 17929 c.campaignId = campaignId 17930 return c 17931 } 17932 17933 // Filter sets the optional parameter "filter": Allows filtering by 17934 // assigned targeting option fields. Supported syntax: * Filter 17935 // expressions are made up of one or more restrictions. * Restrictions 17936 // can be combined by the `OR` logical operator. * A restriction has the 17937 // form of `{field} {operator} {value}`. * All fields must use the 17938 // `EQUALS (=)` operator. Supported fields: * `targetingType` * 17939 // `inheritance` Examples: * `AssignedTargetingOption` resources of 17940 // targeting type `TARGETING_TYPE_LANGUAGE` or `TARGETING_TYPE_GENDER`: 17941 // `targetingType="TARGETING_TYPE_LANGUAGE" OR 17942 // targetingType="TARGETING_TYPE_GENDER" * `AssignedTargetingOption` 17943 // resources with inheritance status of `NOT_INHERITED` or 17944 // `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR 17945 // inheritance="INHERITED_FROM_PARTNER" The length of this field should 17946 // be no more than 500 characters. Reference our filter `LIST` requests 17947 // (/display-video/api/guides/how-tos/filters) guide for more 17948 // information. 17949 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17950 c.urlParams_.Set("filter", filter) 17951 return c 17952 } 17953 17954 // OrderBy sets the optional parameter "orderBy": Field by which to sort 17955 // the list. Acceptable values are: * `targetingType` (default) The 17956 // default sorting order is ascending. To specify descending order for a 17957 // field, a suffix "desc" should be added to the field name. Example: 17958 // `targetingType desc`. 17959 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17960 c.urlParams_.Set("orderBy", orderBy) 17961 return c 17962 } 17963 17964 // PageSize sets the optional parameter "pageSize": Requested page size. 17965 // The size must be an integer between `1` and `5000`. If unspecified, 17966 // the default is `5000`. Returns error code `INVALID_ARGUMENT` if an 17967 // invalid value is specified. 17968 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17969 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 17970 return c 17971 } 17972 17973 // PageToken sets the optional parameter "pageToken": A token that lets 17974 // the client fetch the next page of results. Typically, this is the 17975 // value of next_page_token returned from the previous call to 17976 // `BulkListCampaignAssignedTargetingOptions` method. If not specified, 17977 // the first page of results will be returned. 17978 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17979 c.urlParams_.Set("pageToken", pageToken) 17980 return c 17981 } 17982 17983 // Fields allows partial responses to be retrieved. See 17984 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17985 // for more information. 17986 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17987 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17988 return c 17989 } 17990 17991 // IfNoneMatch sets the optional parameter which makes the operation 17992 // fail if the object's ETag matches the given value. This is useful for 17993 // getting updates only after the object has changed since the last 17994 // request. Use googleapi.IsNotModified to check whether the response 17995 // error from Do is the result of In-None-Match. 17996 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 17997 c.ifNoneMatch_ = entityTag 17998 return c 17999 } 18000 18001 // Context sets the context to be used in this call's Do method. Any 18002 // pending HTTP request will be aborted if the provided context is 18003 // canceled. 18004 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall { 18005 c.ctx_ = ctx 18006 return c 18007 } 18008 18009 // Header returns an http.Header that can be modified by the caller to 18010 // add HTTP headers to the request. 18011 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) Header() http.Header { 18012 if c.header_ == nil { 18013 c.header_ = make(http.Header) 18014 } 18015 return c.header_ 18016 } 18017 18018 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 18019 reqHeaders := make(http.Header) 18020 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 18021 for k, v := range c.header_ { 18022 reqHeaders[k] = v 18023 } 18024 reqHeaders.Set("User-Agent", c.s.userAgent()) 18025 if c.ifNoneMatch_ != "" { 18026 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18027 } 18028 var body io.Reader = nil 18029 c.urlParams_.Set("alt", alt) 18030 c.urlParams_.Set("prettyPrint", "false") 18031 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}:bulkListCampaignAssignedTargetingOptions") 18032 urls += "?" + c.urlParams_.Encode() 18033 req, err := http.NewRequest("GET", urls, body) 18034 if err != nil { 18035 return nil, err 18036 } 18037 req.Header = reqHeaders 18038 googleapi.Expand(req.URL, map[string]string{ 18039 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18040 "campaignId": strconv.FormatInt(c.campaignId, 10), 18041 }) 18042 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18043 } 18044 18045 // Do executes the "displayvideo.advertisers.campaigns.bulkListCampaignAssignedTargetingOptions" call. 18046 // Exactly one of *BulkListCampaignAssignedTargetingOptionsResponse or 18047 // error will be non-nil. Any non-2xx status code is an error. Response 18048 // headers are in either 18049 // *BulkListCampaignAssignedTargetingOptionsResponse.ServerResponse.Heade 18050 // r or (if a response was returned at all) in 18051 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18052 // whether the returned error was because http.StatusNotModified was 18053 // returned. 18054 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListCampaignAssignedTargetingOptionsResponse, error) { 18055 gensupport.SetOptions(c.urlParams_, opts...) 18056 res, err := c.doRequest("json") 18057 if res != nil && res.StatusCode == http.StatusNotModified { 18058 if res.Body != nil { 18059 res.Body.Close() 18060 } 18061 return nil, gensupport.WrapError(&googleapi.Error{ 18062 Code: res.StatusCode, 18063 Header: res.Header, 18064 }) 18065 } 18066 if err != nil { 18067 return nil, err 18068 } 18069 defer googleapi.CloseBody(res) 18070 if err := googleapi.CheckResponse(res); err != nil { 18071 return nil, gensupport.WrapError(err) 18072 } 18073 ret := &BulkListCampaignAssignedTargetingOptionsResponse{ 18074 ServerResponse: googleapi.ServerResponse{ 18075 Header: res.Header, 18076 HTTPStatusCode: res.StatusCode, 18077 }, 18078 } 18079 target := &ret 18080 if err := gensupport.DecodeResponse(target, res); err != nil { 18081 return nil, err 18082 } 18083 return ret, nil 18084 // { 18085 // "description": "Lists assigned targeting options of a campaign across targeting types.", 18086 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}:bulkListCampaignAssignedTargetingOptions", 18087 // "httpMethod": "GET", 18088 // "id": "displayvideo.advertisers.campaigns.bulkListCampaignAssignedTargetingOptions", 18089 // "parameterOrder": [ 18090 // "advertiserId", 18091 // "campaignId" 18092 // ], 18093 // "parameters": { 18094 // "advertiserId": { 18095 // "description": "Required. The ID of the advertiser the campaign belongs to.", 18096 // "format": "int64", 18097 // "location": "path", 18098 // "pattern": "^[^/]+$", 18099 // "required": true, 18100 // "type": "string" 18101 // }, 18102 // "campaignId": { 18103 // "description": "Required. The ID of the campaign to list assigned targeting options for.", 18104 // "format": "int64", 18105 // "location": "path", 18106 // "pattern": "^[^/]+$", 18107 // "required": true, 18108 // "type": "string" 18109 // }, 18110 // "filter": { 18111 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_LANGUAGE` or `TARGETING_TYPE_GENDER`: `targetingType=\"TARGETING_TYPE_LANGUAGE\" OR targetingType=\"TARGETING_TYPE_GENDER\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 18112 // "location": "query", 18113 // "type": "string" 18114 // }, 18115 // "orderBy": { 18116 // "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", 18117 // "location": "query", 18118 // "type": "string" 18119 // }, 18120 // "pageSize": { 18121 // "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 18122 // "format": "int32", 18123 // "location": "query", 18124 // "type": "integer" 18125 // }, 18126 // "pageToken": { 18127 // "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 18128 // "location": "query", 18129 // "type": "string" 18130 // } 18131 // }, 18132 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}:bulkListCampaignAssignedTargetingOptions", 18133 // "response": { 18134 // "$ref": "BulkListCampaignAssignedTargetingOptionsResponse" 18135 // }, 18136 // "scopes": [ 18137 // "https://www.googleapis.com/auth/display-video" 18138 // ] 18139 // } 18140 18141 } 18142 18143 // Pages invokes f for each page of results. 18144 // A non-nil error returned from f will halt the iteration. 18145 // The provided context supersedes any context provided to the Context method. 18146 func (c *AdvertisersCampaignsBulkListCampaignAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListCampaignAssignedTargetingOptionsResponse) error) error { 18147 c.ctx_ = ctx 18148 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18149 for { 18150 x, err := c.Do() 18151 if err != nil { 18152 return err 18153 } 18154 if err := f(x); err != nil { 18155 return err 18156 } 18157 if x.NextPageToken == "" { 18158 return nil 18159 } 18160 c.PageToken(x.NextPageToken) 18161 } 18162 } 18163 18164 // method id "displayvideo.advertisers.campaigns.create": 18165 18166 type AdvertisersCampaignsCreateCall struct { 18167 s *Service 18168 advertiserId int64 18169 campaign *Campaign 18170 urlParams_ gensupport.URLParams 18171 ctx_ context.Context 18172 header_ http.Header 18173 } 18174 18175 // Create: Creates a new campaign. Returns the newly created campaign if 18176 // successful. 18177 // 18178 // - advertiserId: Output only. The unique ID of the advertiser the 18179 // campaign belongs to. 18180 func (r *AdvertisersCampaignsService) Create(advertiserId int64, campaign *Campaign) *AdvertisersCampaignsCreateCall { 18181 c := &AdvertisersCampaignsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18182 c.advertiserId = advertiserId 18183 c.campaign = campaign 18184 return c 18185 } 18186 18187 // Fields allows partial responses to be retrieved. See 18188 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18189 // for more information. 18190 func (c *AdvertisersCampaignsCreateCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsCreateCall { 18191 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18192 return c 18193 } 18194 18195 // Context sets the context to be used in this call's Do method. Any 18196 // pending HTTP request will be aborted if the provided context is 18197 // canceled. 18198 func (c *AdvertisersCampaignsCreateCall) Context(ctx context.Context) *AdvertisersCampaignsCreateCall { 18199 c.ctx_ = ctx 18200 return c 18201 } 18202 18203 // Header returns an http.Header that can be modified by the caller to 18204 // add HTTP headers to the request. 18205 func (c *AdvertisersCampaignsCreateCall) Header() http.Header { 18206 if c.header_ == nil { 18207 c.header_ = make(http.Header) 18208 } 18209 return c.header_ 18210 } 18211 18212 func (c *AdvertisersCampaignsCreateCall) doRequest(alt string) (*http.Response, error) { 18213 reqHeaders := make(http.Header) 18214 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 18215 for k, v := range c.header_ { 18216 reqHeaders[k] = v 18217 } 18218 reqHeaders.Set("User-Agent", c.s.userAgent()) 18219 var body io.Reader = nil 18220 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign) 18221 if err != nil { 18222 return nil, err 18223 } 18224 reqHeaders.Set("Content-Type", "application/json") 18225 c.urlParams_.Set("alt", alt) 18226 c.urlParams_.Set("prettyPrint", "false") 18227 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns") 18228 urls += "?" + c.urlParams_.Encode() 18229 req, err := http.NewRequest("POST", urls, body) 18230 if err != nil { 18231 return nil, err 18232 } 18233 req.Header = reqHeaders 18234 googleapi.Expand(req.URL, map[string]string{ 18235 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18236 }) 18237 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18238 } 18239 18240 // Do executes the "displayvideo.advertisers.campaigns.create" call. 18241 // Exactly one of *Campaign or error will be non-nil. Any non-2xx status 18242 // code is an error. Response headers are in either 18243 // *Campaign.ServerResponse.Header or (if a response was returned at 18244 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18245 // to check whether the returned error was because 18246 // http.StatusNotModified was returned. 18247 func (c *AdvertisersCampaignsCreateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { 18248 gensupport.SetOptions(c.urlParams_, opts...) 18249 res, err := c.doRequest("json") 18250 if res != nil && res.StatusCode == http.StatusNotModified { 18251 if res.Body != nil { 18252 res.Body.Close() 18253 } 18254 return nil, gensupport.WrapError(&googleapi.Error{ 18255 Code: res.StatusCode, 18256 Header: res.Header, 18257 }) 18258 } 18259 if err != nil { 18260 return nil, err 18261 } 18262 defer googleapi.CloseBody(res) 18263 if err := googleapi.CheckResponse(res); err != nil { 18264 return nil, gensupport.WrapError(err) 18265 } 18266 ret := &Campaign{ 18267 ServerResponse: googleapi.ServerResponse{ 18268 Header: res.Header, 18269 HTTPStatusCode: res.StatusCode, 18270 }, 18271 } 18272 target := &ret 18273 if err := gensupport.DecodeResponse(target, res); err != nil { 18274 return nil, err 18275 } 18276 return ret, nil 18277 // { 18278 // "description": "Creates a new campaign. Returns the newly created campaign if successful.", 18279 // "flatPath": "v1/advertisers/{advertisersId}/campaigns", 18280 // "httpMethod": "POST", 18281 // "id": "displayvideo.advertisers.campaigns.create", 18282 // "parameterOrder": [ 18283 // "advertiserId" 18284 // ], 18285 // "parameters": { 18286 // "advertiserId": { 18287 // "description": "Output only. The unique ID of the advertiser the campaign belongs to.", 18288 // "format": "int64", 18289 // "location": "path", 18290 // "pattern": "^[^/]+$", 18291 // "required": true, 18292 // "type": "string" 18293 // } 18294 // }, 18295 // "path": "v1/advertisers/{+advertiserId}/campaigns", 18296 // "request": { 18297 // "$ref": "Campaign" 18298 // }, 18299 // "response": { 18300 // "$ref": "Campaign" 18301 // }, 18302 // "scopes": [ 18303 // "https://www.googleapis.com/auth/display-video", 18304 // "https://www.googleapis.com/auth/display-video-mediaplanning" 18305 // ] 18306 // } 18307 18308 } 18309 18310 // method id "displayvideo.advertisers.campaigns.delete": 18311 18312 type AdvertisersCampaignsDeleteCall struct { 18313 s *Service 18314 advertiserId int64 18315 campaignId int64 18316 urlParams_ gensupport.URLParams 18317 ctx_ context.Context 18318 header_ http.Header 18319 } 18320 18321 // Delete: Permanently deletes a campaign. A deleted campaign cannot be 18322 // recovered. The campaign should be archived first, i.e. set 18323 // entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. 18324 // 18325 // - advertiserId: The ID of the advertiser this campaign belongs to. 18326 // - campaignId: The ID of the campaign we need to delete. 18327 func (r *AdvertisersCampaignsService) Delete(advertiserId int64, campaignId int64) *AdvertisersCampaignsDeleteCall { 18328 c := &AdvertisersCampaignsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18329 c.advertiserId = advertiserId 18330 c.campaignId = campaignId 18331 return c 18332 } 18333 18334 // Fields allows partial responses to be retrieved. See 18335 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18336 // for more information. 18337 func (c *AdvertisersCampaignsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsDeleteCall { 18338 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18339 return c 18340 } 18341 18342 // Context sets the context to be used in this call's Do method. Any 18343 // pending HTTP request will be aborted if the provided context is 18344 // canceled. 18345 func (c *AdvertisersCampaignsDeleteCall) Context(ctx context.Context) *AdvertisersCampaignsDeleteCall { 18346 c.ctx_ = ctx 18347 return c 18348 } 18349 18350 // Header returns an http.Header that can be modified by the caller to 18351 // add HTTP headers to the request. 18352 func (c *AdvertisersCampaignsDeleteCall) Header() http.Header { 18353 if c.header_ == nil { 18354 c.header_ = make(http.Header) 18355 } 18356 return c.header_ 18357 } 18358 18359 func (c *AdvertisersCampaignsDeleteCall) doRequest(alt string) (*http.Response, error) { 18360 reqHeaders := make(http.Header) 18361 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 18362 for k, v := range c.header_ { 18363 reqHeaders[k] = v 18364 } 18365 reqHeaders.Set("User-Agent", c.s.userAgent()) 18366 var body io.Reader = nil 18367 c.urlParams_.Set("alt", alt) 18368 c.urlParams_.Set("prettyPrint", "false") 18369 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}") 18370 urls += "?" + c.urlParams_.Encode() 18371 req, err := http.NewRequest("DELETE", urls, body) 18372 if err != nil { 18373 return nil, err 18374 } 18375 req.Header = reqHeaders 18376 googleapi.Expand(req.URL, map[string]string{ 18377 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18378 "campaignId": strconv.FormatInt(c.campaignId, 10), 18379 }) 18380 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18381 } 18382 18383 // Do executes the "displayvideo.advertisers.campaigns.delete" call. 18384 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 18385 // code is an error. Response headers are in either 18386 // *Empty.ServerResponse.Header or (if a response was returned at all) 18387 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 18388 // check whether the returned error was because http.StatusNotModified 18389 // was returned. 18390 func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 18391 gensupport.SetOptions(c.urlParams_, opts...) 18392 res, err := c.doRequest("json") 18393 if res != nil && res.StatusCode == http.StatusNotModified { 18394 if res.Body != nil { 18395 res.Body.Close() 18396 } 18397 return nil, gensupport.WrapError(&googleapi.Error{ 18398 Code: res.StatusCode, 18399 Header: res.Header, 18400 }) 18401 } 18402 if err != nil { 18403 return nil, err 18404 } 18405 defer googleapi.CloseBody(res) 18406 if err := googleapi.CheckResponse(res); err != nil { 18407 return nil, gensupport.WrapError(err) 18408 } 18409 ret := &Empty{ 18410 ServerResponse: googleapi.ServerResponse{ 18411 Header: res.Header, 18412 HTTPStatusCode: res.StatusCode, 18413 }, 18414 } 18415 target := &ret 18416 if err := gensupport.DecodeResponse(target, res); err != nil { 18417 return nil, err 18418 } 18419 return ret, nil 18420 // { 18421 // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered. The campaign should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", 18422 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}", 18423 // "httpMethod": "DELETE", 18424 // "id": "displayvideo.advertisers.campaigns.delete", 18425 // "parameterOrder": [ 18426 // "advertiserId", 18427 // "campaignId" 18428 // ], 18429 // "parameters": { 18430 // "advertiserId": { 18431 // "description": "The ID of the advertiser this campaign belongs to.", 18432 // "format": "int64", 18433 // "location": "path", 18434 // "pattern": "^[^/]+$", 18435 // "required": true, 18436 // "type": "string" 18437 // }, 18438 // "campaignId": { 18439 // "description": "The ID of the campaign we need to delete.", 18440 // "format": "int64", 18441 // "location": "path", 18442 // "pattern": "^[^/]+$", 18443 // "required": true, 18444 // "type": "string" 18445 // } 18446 // }, 18447 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", 18448 // "response": { 18449 // "$ref": "Empty" 18450 // }, 18451 // "scopes": [ 18452 // "https://www.googleapis.com/auth/display-video", 18453 // "https://www.googleapis.com/auth/display-video-mediaplanning" 18454 // ] 18455 // } 18456 18457 } 18458 18459 // method id "displayvideo.advertisers.campaigns.get": 18460 18461 type AdvertisersCampaignsGetCall struct { 18462 s *Service 18463 advertiserId int64 18464 campaignId int64 18465 urlParams_ gensupport.URLParams 18466 ifNoneMatch_ string 18467 ctx_ context.Context 18468 header_ http.Header 18469 } 18470 18471 // Get: Gets a campaign. 18472 // 18473 // - advertiserId: The ID of the advertiser this campaign belongs to. 18474 // - campaignId: The ID of the campaign to fetch. 18475 func (r *AdvertisersCampaignsService) Get(advertiserId int64, campaignId int64) *AdvertisersCampaignsGetCall { 18476 c := &AdvertisersCampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18477 c.advertiserId = advertiserId 18478 c.campaignId = campaignId 18479 return c 18480 } 18481 18482 // Fields allows partial responses to be retrieved. See 18483 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18484 // for more information. 18485 func (c *AdvertisersCampaignsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsGetCall { 18486 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18487 return c 18488 } 18489 18490 // IfNoneMatch sets the optional parameter which makes the operation 18491 // fail if the object's ETag matches the given value. This is useful for 18492 // getting updates only after the object has changed since the last 18493 // request. Use googleapi.IsNotModified to check whether the response 18494 // error from Do is the result of In-None-Match. 18495 func (c *AdvertisersCampaignsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsGetCall { 18496 c.ifNoneMatch_ = entityTag 18497 return c 18498 } 18499 18500 // Context sets the context to be used in this call's Do method. Any 18501 // pending HTTP request will be aborted if the provided context is 18502 // canceled. 18503 func (c *AdvertisersCampaignsGetCall) Context(ctx context.Context) *AdvertisersCampaignsGetCall { 18504 c.ctx_ = ctx 18505 return c 18506 } 18507 18508 // Header returns an http.Header that can be modified by the caller to 18509 // add HTTP headers to the request. 18510 func (c *AdvertisersCampaignsGetCall) Header() http.Header { 18511 if c.header_ == nil { 18512 c.header_ = make(http.Header) 18513 } 18514 return c.header_ 18515 } 18516 18517 func (c *AdvertisersCampaignsGetCall) doRequest(alt string) (*http.Response, error) { 18518 reqHeaders := make(http.Header) 18519 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 18520 for k, v := range c.header_ { 18521 reqHeaders[k] = v 18522 } 18523 reqHeaders.Set("User-Agent", c.s.userAgent()) 18524 if c.ifNoneMatch_ != "" { 18525 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18526 } 18527 var body io.Reader = nil 18528 c.urlParams_.Set("alt", alt) 18529 c.urlParams_.Set("prettyPrint", "false") 18530 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}") 18531 urls += "?" + c.urlParams_.Encode() 18532 req, err := http.NewRequest("GET", urls, body) 18533 if err != nil { 18534 return nil, err 18535 } 18536 req.Header = reqHeaders 18537 googleapi.Expand(req.URL, map[string]string{ 18538 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18539 "campaignId": strconv.FormatInt(c.campaignId, 10), 18540 }) 18541 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18542 } 18543 18544 // Do executes the "displayvideo.advertisers.campaigns.get" call. 18545 // Exactly one of *Campaign or error will be non-nil. Any non-2xx status 18546 // code is an error. Response headers are in either 18547 // *Campaign.ServerResponse.Header or (if a response was returned at 18548 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18549 // to check whether the returned error was because 18550 // http.StatusNotModified was returned. 18551 func (c *AdvertisersCampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { 18552 gensupport.SetOptions(c.urlParams_, opts...) 18553 res, err := c.doRequest("json") 18554 if res != nil && res.StatusCode == http.StatusNotModified { 18555 if res.Body != nil { 18556 res.Body.Close() 18557 } 18558 return nil, gensupport.WrapError(&googleapi.Error{ 18559 Code: res.StatusCode, 18560 Header: res.Header, 18561 }) 18562 } 18563 if err != nil { 18564 return nil, err 18565 } 18566 defer googleapi.CloseBody(res) 18567 if err := googleapi.CheckResponse(res); err != nil { 18568 return nil, gensupport.WrapError(err) 18569 } 18570 ret := &Campaign{ 18571 ServerResponse: googleapi.ServerResponse{ 18572 Header: res.Header, 18573 HTTPStatusCode: res.StatusCode, 18574 }, 18575 } 18576 target := &ret 18577 if err := gensupport.DecodeResponse(target, res); err != nil { 18578 return nil, err 18579 } 18580 return ret, nil 18581 // { 18582 // "description": "Gets a campaign.", 18583 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}", 18584 // "httpMethod": "GET", 18585 // "id": "displayvideo.advertisers.campaigns.get", 18586 // "parameterOrder": [ 18587 // "advertiserId", 18588 // "campaignId" 18589 // ], 18590 // "parameters": { 18591 // "advertiserId": { 18592 // "description": "Required. The ID of the advertiser this campaign belongs to.", 18593 // "format": "int64", 18594 // "location": "path", 18595 // "pattern": "^[^/]+$", 18596 // "required": true, 18597 // "type": "string" 18598 // }, 18599 // "campaignId": { 18600 // "description": "Required. The ID of the campaign to fetch.", 18601 // "format": "int64", 18602 // "location": "path", 18603 // "pattern": "^[^/]+$", 18604 // "required": true, 18605 // "type": "string" 18606 // } 18607 // }, 18608 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", 18609 // "response": { 18610 // "$ref": "Campaign" 18611 // }, 18612 // "scopes": [ 18613 // "https://www.googleapis.com/auth/display-video", 18614 // "https://www.googleapis.com/auth/display-video-mediaplanning" 18615 // ] 18616 // } 18617 18618 } 18619 18620 // method id "displayvideo.advertisers.campaigns.list": 18621 18622 type AdvertisersCampaignsListCall struct { 18623 s *Service 18624 advertiserId int64 18625 urlParams_ gensupport.URLParams 18626 ifNoneMatch_ string 18627 ctx_ context.Context 18628 header_ http.Header 18629 } 18630 18631 // List: Lists campaigns in an advertiser. The order is defined by the 18632 // order_by parameter. If a filter by entity_status is not specified, 18633 // campaigns with `ENTITY_STATUS_ARCHIVED` will not be included in the 18634 // results. 18635 // 18636 // - advertiserId: The ID of the advertiser to list campaigns for. 18637 func (r *AdvertisersCampaignsService) List(advertiserId int64) *AdvertisersCampaignsListCall { 18638 c := &AdvertisersCampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18639 c.advertiserId = advertiserId 18640 return c 18641 } 18642 18643 // Filter sets the optional parameter "filter": Allows filtering by 18644 // campaign fields. Supported syntax: * Filter expressions are made up 18645 // of one or more restrictions. * Restrictions can be combined by `AND` 18646 // or `OR` logical operators. A sequence of restrictions implicitly uses 18647 // `AND`. * A restriction has the form of `{field} {operator} {value}`. 18648 // * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (>=)` 18649 // or `LESS THAN OR EQUAL TO (<=)` operators. * All other fields must 18650 // use the `EQUALS (=)` operator. Supported fields: * `campaignId` * 18651 // `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 18652 // format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All 18653 // `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns under an 18654 // advertiser: `(entityStatus="ENTITY_STATUS_ACTIVE" OR 18655 // entityStatus="ENTITY_STATUS_PAUSED")` * All campaigns with an update 18656 // time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): 18657 // `updateTime<="2020-11-04T18:54:47Z" * All campaigns with an update 18658 // time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 18659 // 8601): `updateTime>="2020-11-04T18:54:47Z" The length of this field 18660 // should be no more than 500 characters. Reference our filter `LIST` 18661 // requests (/display-video/api/guides/how-tos/filters) guide for more 18662 // information. 18663 func (c *AdvertisersCampaignsListCall) Filter(filter string) *AdvertisersCampaignsListCall { 18664 c.urlParams_.Set("filter", filter) 18665 return c 18666 } 18667 18668 // OrderBy sets the optional parameter "orderBy": Field by which to sort 18669 // the list. Acceptable values are: * `displayName` (default) * 18670 // `entityStatus` * `updateTime` The default sorting order is ascending. 18671 // To specify descending order for a field, a suffix "desc" should be 18672 // added to the field name. Example: `displayName desc`. 18673 func (c *AdvertisersCampaignsListCall) OrderBy(orderBy string) *AdvertisersCampaignsListCall { 18674 c.urlParams_.Set("orderBy", orderBy) 18675 return c 18676 } 18677 18678 // PageSize sets the optional parameter "pageSize": Requested page size. 18679 // Must be between `1` and `200`. If unspecified will default to `100`. 18680 func (c *AdvertisersCampaignsListCall) PageSize(pageSize int64) *AdvertisersCampaignsListCall { 18681 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18682 return c 18683 } 18684 18685 // PageToken sets the optional parameter "pageToken": A token 18686 // identifying a page of results the server should return. Typically, 18687 // this is the value of next_page_token returned from the previous call 18688 // to `ListCampaigns` method. If not specified, the first page of 18689 // results will be returned. 18690 func (c *AdvertisersCampaignsListCall) PageToken(pageToken string) *AdvertisersCampaignsListCall { 18691 c.urlParams_.Set("pageToken", pageToken) 18692 return c 18693 } 18694 18695 // Fields allows partial responses to be retrieved. See 18696 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18697 // for more information. 18698 func (c *AdvertisersCampaignsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListCall { 18699 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18700 return c 18701 } 18702 18703 // IfNoneMatch sets the optional parameter which makes the operation 18704 // fail if the object's ETag matches the given value. This is useful for 18705 // getting updates only after the object has changed since the last 18706 // request. Use googleapi.IsNotModified to check whether the response 18707 // error from Do is the result of In-None-Match. 18708 func (c *AdvertisersCampaignsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListCall { 18709 c.ifNoneMatch_ = entityTag 18710 return c 18711 } 18712 18713 // Context sets the context to be used in this call's Do method. Any 18714 // pending HTTP request will be aborted if the provided context is 18715 // canceled. 18716 func (c *AdvertisersCampaignsListCall) Context(ctx context.Context) *AdvertisersCampaignsListCall { 18717 c.ctx_ = ctx 18718 return c 18719 } 18720 18721 // Header returns an http.Header that can be modified by the caller to 18722 // add HTTP headers to the request. 18723 func (c *AdvertisersCampaignsListCall) Header() http.Header { 18724 if c.header_ == nil { 18725 c.header_ = make(http.Header) 18726 } 18727 return c.header_ 18728 } 18729 18730 func (c *AdvertisersCampaignsListCall) doRequest(alt string) (*http.Response, error) { 18731 reqHeaders := make(http.Header) 18732 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 18733 for k, v := range c.header_ { 18734 reqHeaders[k] = v 18735 } 18736 reqHeaders.Set("User-Agent", c.s.userAgent()) 18737 if c.ifNoneMatch_ != "" { 18738 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18739 } 18740 var body io.Reader = nil 18741 c.urlParams_.Set("alt", alt) 18742 c.urlParams_.Set("prettyPrint", "false") 18743 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns") 18744 urls += "?" + c.urlParams_.Encode() 18745 req, err := http.NewRequest("GET", urls, body) 18746 if err != nil { 18747 return nil, err 18748 } 18749 req.Header = reqHeaders 18750 googleapi.Expand(req.URL, map[string]string{ 18751 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18752 }) 18753 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18754 } 18755 18756 // Do executes the "displayvideo.advertisers.campaigns.list" call. 18757 // Exactly one of *ListCampaignsResponse or error will be non-nil. Any 18758 // non-2xx status code is an error. Response headers are in either 18759 // *ListCampaignsResponse.ServerResponse.Header or (if a response was 18760 // returned at all) in error.(*googleapi.Error).Header. Use 18761 // googleapi.IsNotModified to check whether the returned error was 18762 // because http.StatusNotModified was returned. 18763 func (c *AdvertisersCampaignsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignsResponse, error) { 18764 gensupport.SetOptions(c.urlParams_, opts...) 18765 res, err := c.doRequest("json") 18766 if res != nil && res.StatusCode == http.StatusNotModified { 18767 if res.Body != nil { 18768 res.Body.Close() 18769 } 18770 return nil, gensupport.WrapError(&googleapi.Error{ 18771 Code: res.StatusCode, 18772 Header: res.Header, 18773 }) 18774 } 18775 if err != nil { 18776 return nil, err 18777 } 18778 defer googleapi.CloseBody(res) 18779 if err := googleapi.CheckResponse(res); err != nil { 18780 return nil, gensupport.WrapError(err) 18781 } 18782 ret := &ListCampaignsResponse{ 18783 ServerResponse: googleapi.ServerResponse{ 18784 Header: res.Header, 18785 HTTPStatusCode: res.StatusCode, 18786 }, 18787 } 18788 target := &ret 18789 if err := gensupport.DecodeResponse(target, res); err != nil { 18790 return nil, err 18791 } 18792 return ret, nil 18793 // { 18794 // "description": "Lists campaigns in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, campaigns with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 18795 // "flatPath": "v1/advertisers/{advertisersId}/campaigns", 18796 // "httpMethod": "GET", 18797 // "id": "displayvideo.advertisers.campaigns.list", 18798 // "parameterOrder": [ 18799 // "advertiserId" 18800 // ], 18801 // "parameters": { 18802 // "advertiserId": { 18803 // "description": "The ID of the advertiser to list campaigns for.", 18804 // "format": "int64", 18805 // "location": "path", 18806 // "pattern": "^[^/]+$", 18807 // "required": true, 18808 // "type": "string" 18809 // }, 18810 // "filter": { 18811 // "description": "Allows filtering by campaign fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\")` * All campaigns with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All campaigns with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 18812 // "location": "query", 18813 // "type": "string" 18814 // }, 18815 // "orderBy": { 18816 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 18817 // "location": "query", 18818 // "type": "string" 18819 // }, 18820 // "pageSize": { 18821 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 18822 // "format": "int32", 18823 // "location": "query", 18824 // "type": "integer" 18825 // }, 18826 // "pageToken": { 18827 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaigns` method. If not specified, the first page of results will be returned.", 18828 // "location": "query", 18829 // "type": "string" 18830 // } 18831 // }, 18832 // "path": "v1/advertisers/{+advertiserId}/campaigns", 18833 // "response": { 18834 // "$ref": "ListCampaignsResponse" 18835 // }, 18836 // "scopes": [ 18837 // "https://www.googleapis.com/auth/display-video", 18838 // "https://www.googleapis.com/auth/display-video-mediaplanning" 18839 // ] 18840 // } 18841 18842 } 18843 18844 // Pages invokes f for each page of results. 18845 // A non-nil error returned from f will halt the iteration. 18846 // The provided context supersedes any context provided to the Context method. 18847 func (c *AdvertisersCampaignsListCall) Pages(ctx context.Context, f func(*ListCampaignsResponse) error) error { 18848 c.ctx_ = ctx 18849 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18850 for { 18851 x, err := c.Do() 18852 if err != nil { 18853 return err 18854 } 18855 if err := f(x); err != nil { 18856 return err 18857 } 18858 if x.NextPageToken == "" { 18859 return nil 18860 } 18861 c.PageToken(x.NextPageToken) 18862 } 18863 } 18864 18865 // method id "displayvideo.advertisers.campaigns.patch": 18866 18867 type AdvertisersCampaignsPatchCall struct { 18868 s *Service 18869 advertiserId int64 18870 campaignId int64 18871 campaign *Campaign 18872 urlParams_ gensupport.URLParams 18873 ctx_ context.Context 18874 header_ http.Header 18875 } 18876 18877 // Patch: Updates an existing campaign. Returns the updated campaign if 18878 // successful. 18879 // 18880 // - advertiserId: Output only. The unique ID of the advertiser the 18881 // campaign belongs to. 18882 // - campaignId: Output only. The unique ID of the campaign. Assigned by 18883 // the system. 18884 func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall { 18885 c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18886 c.advertiserId = advertiserId 18887 c.campaignId = campaignId 18888 c.campaign = campaign 18889 return c 18890 } 18891 18892 // UpdateMask sets the optional parameter "updateMask": Required. The 18893 // mask to control which fields to update. 18894 func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall { 18895 c.urlParams_.Set("updateMask", updateMask) 18896 return c 18897 } 18898 18899 // Fields allows partial responses to be retrieved. See 18900 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18901 // for more information. 18902 func (c *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall { 18903 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18904 return c 18905 } 18906 18907 // Context sets the context to be used in this call's Do method. Any 18908 // pending HTTP request will be aborted if the provided context is 18909 // canceled. 18910 func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall { 18911 c.ctx_ = ctx 18912 return c 18913 } 18914 18915 // Header returns an http.Header that can be modified by the caller to 18916 // add HTTP headers to the request. 18917 func (c *AdvertisersCampaignsPatchCall) Header() http.Header { 18918 if c.header_ == nil { 18919 c.header_ = make(http.Header) 18920 } 18921 return c.header_ 18922 } 18923 18924 func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) { 18925 reqHeaders := make(http.Header) 18926 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 18927 for k, v := range c.header_ { 18928 reqHeaders[k] = v 18929 } 18930 reqHeaders.Set("User-Agent", c.s.userAgent()) 18931 var body io.Reader = nil 18932 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign) 18933 if err != nil { 18934 return nil, err 18935 } 18936 reqHeaders.Set("Content-Type", "application/json") 18937 c.urlParams_.Set("alt", alt) 18938 c.urlParams_.Set("prettyPrint", "false") 18939 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}") 18940 urls += "?" + c.urlParams_.Encode() 18941 req, err := http.NewRequest("PATCH", urls, body) 18942 if err != nil { 18943 return nil, err 18944 } 18945 req.Header = reqHeaders 18946 googleapi.Expand(req.URL, map[string]string{ 18947 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18948 "campaignId": strconv.FormatInt(c.campaignId, 10), 18949 }) 18950 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18951 } 18952 18953 // Do executes the "displayvideo.advertisers.campaigns.patch" call. 18954 // Exactly one of *Campaign or error will be non-nil. Any non-2xx status 18955 // code is an error. Response headers are in either 18956 // *Campaign.ServerResponse.Header or (if a response was returned at 18957 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18958 // to check whether the returned error was because 18959 // http.StatusNotModified was returned. 18960 func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { 18961 gensupport.SetOptions(c.urlParams_, opts...) 18962 res, err := c.doRequest("json") 18963 if res != nil && res.StatusCode == http.StatusNotModified { 18964 if res.Body != nil { 18965 res.Body.Close() 18966 } 18967 return nil, gensupport.WrapError(&googleapi.Error{ 18968 Code: res.StatusCode, 18969 Header: res.Header, 18970 }) 18971 } 18972 if err != nil { 18973 return nil, err 18974 } 18975 defer googleapi.CloseBody(res) 18976 if err := googleapi.CheckResponse(res); err != nil { 18977 return nil, gensupport.WrapError(err) 18978 } 18979 ret := &Campaign{ 18980 ServerResponse: googleapi.ServerResponse{ 18981 Header: res.Header, 18982 HTTPStatusCode: res.StatusCode, 18983 }, 18984 } 18985 target := &ret 18986 if err := gensupport.DecodeResponse(target, res); err != nil { 18987 return nil, err 18988 } 18989 return ret, nil 18990 // { 18991 // "description": "Updates an existing campaign. Returns the updated campaign if successful.", 18992 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}", 18993 // "httpMethod": "PATCH", 18994 // "id": "displayvideo.advertisers.campaigns.patch", 18995 // "parameterOrder": [ 18996 // "advertiserId", 18997 // "campaignId" 18998 // ], 18999 // "parameters": { 19000 // "advertiserId": { 19001 // "description": "Output only. The unique ID of the advertiser the campaign belongs to.", 19002 // "format": "int64", 19003 // "location": "path", 19004 // "pattern": "^[^/]+$", 19005 // "required": true, 19006 // "type": "string" 19007 // }, 19008 // "campaignId": { 19009 // "description": "Output only. The unique ID of the campaign. Assigned by the system.", 19010 // "format": "int64", 19011 // "location": "path", 19012 // "pattern": "^[^/]+$", 19013 // "required": true, 19014 // "type": "string" 19015 // }, 19016 // "updateMask": { 19017 // "description": "Required. The mask to control which fields to update.", 19018 // "format": "google-fieldmask", 19019 // "location": "query", 19020 // "type": "string" 19021 // } 19022 // }, 19023 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", 19024 // "request": { 19025 // "$ref": "Campaign" 19026 // }, 19027 // "response": { 19028 // "$ref": "Campaign" 19029 // }, 19030 // "scopes": [ 19031 // "https://www.googleapis.com/auth/display-video", 19032 // "https://www.googleapis.com/auth/display-video-mediaplanning" 19033 // ] 19034 // } 19035 19036 } 19037 19038 // method id "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get": 19039 19040 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall struct { 19041 s *Service 19042 advertiserId int64 19043 campaignId int64 19044 targetingType string 19045 assignedTargetingOptionId string 19046 urlParams_ gensupport.URLParams 19047 ifNoneMatch_ string 19048 ctx_ context.Context 19049 header_ http.Header 19050 } 19051 19052 // Get: Gets a single targeting option assigned to a campaign. 19053 // 19054 // - advertiserId: The ID of the advertiser the campaign belongs to. 19055 // - assignedTargetingOptionId: An identifier unique to the targeting 19056 // type in this campaign that identifies the assigned targeting option 19057 // being requested. 19058 // - campaignId: The ID of the campaign the assigned targeting option 19059 // belongs to. 19060 // - targetingType: Identifies the type of this assigned targeting 19061 // option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * 19062 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 19063 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 19064 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 19065 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 19066 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 19067 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 19068 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 19069 // `TARGETING_TYPE_INVENTORY_SOURCE` * 19070 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` 19071 // - `TARGETING_TYPE_ON_SCREEN_POSITION` * 19072 // `TARGETING_TYPE_PARENTAL_STATUS` * 19073 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 19074 // `TARGETING_TYPE_SUB_EXCHANGE` * 19075 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * 19076 // `TARGETING_TYPE_VIEWABILITY`. 19077 func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, campaignId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { 19078 c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19079 c.advertiserId = advertiserId 19080 c.campaignId = campaignId 19081 c.targetingType = targetingType 19082 c.assignedTargetingOptionId = assignedTargetingOptionId 19083 return c 19084 } 19085 19086 // Fields allows partial responses to be retrieved. See 19087 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19088 // for more information. 19089 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { 19090 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19091 return c 19092 } 19093 19094 // IfNoneMatch sets the optional parameter which makes the operation 19095 // fail if the object's ETag matches the given value. This is useful for 19096 // getting updates only after the object has changed since the last 19097 // request. Use googleapi.IsNotModified to check whether the response 19098 // error from Do is the result of In-None-Match. 19099 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { 19100 c.ifNoneMatch_ = entityTag 19101 return c 19102 } 19103 19104 // Context sets the context to be used in this call's Do method. Any 19105 // pending HTTP request will be aborted if the provided context is 19106 // canceled. 19107 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall { 19108 c.ctx_ = ctx 19109 return c 19110 } 19111 19112 // Header returns an http.Header that can be modified by the caller to 19113 // add HTTP headers to the request. 19114 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { 19115 if c.header_ == nil { 19116 c.header_ = make(http.Header) 19117 } 19118 return c.header_ 19119 } 19120 19121 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 19122 reqHeaders := make(http.Header) 19123 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 19124 for k, v := range c.header_ { 19125 reqHeaders[k] = v 19126 } 19127 reqHeaders.Set("User-Agent", c.s.userAgent()) 19128 if c.ifNoneMatch_ != "" { 19129 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19130 } 19131 var body io.Reader = nil 19132 c.urlParams_.Set("alt", alt) 19133 c.urlParams_.Set("prettyPrint", "false") 19134 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 19135 urls += "?" + c.urlParams_.Encode() 19136 req, err := http.NewRequest("GET", urls, body) 19137 if err != nil { 19138 return nil, err 19139 } 19140 req.Header = reqHeaders 19141 googleapi.Expand(req.URL, map[string]string{ 19142 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 19143 "campaignId": strconv.FormatInt(c.campaignId, 10), 19144 "targetingType": c.targetingType, 19145 "assignedTargetingOptionId": c.assignedTargetingOptionId, 19146 }) 19147 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19148 } 19149 19150 // Do executes the "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get" call. 19151 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 19152 // non-2xx status code is an error. Response headers are in either 19153 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 19154 // returned at all) in error.(*googleapi.Error).Header. Use 19155 // googleapi.IsNotModified to check whether the returned error was 19156 // because http.StatusNotModified was returned. 19157 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 19158 gensupport.SetOptions(c.urlParams_, opts...) 19159 res, err := c.doRequest("json") 19160 if res != nil && res.StatusCode == http.StatusNotModified { 19161 if res.Body != nil { 19162 res.Body.Close() 19163 } 19164 return nil, gensupport.WrapError(&googleapi.Error{ 19165 Code: res.StatusCode, 19166 Header: res.Header, 19167 }) 19168 } 19169 if err != nil { 19170 return nil, err 19171 } 19172 defer googleapi.CloseBody(res) 19173 if err := googleapi.CheckResponse(res); err != nil { 19174 return nil, gensupport.WrapError(err) 19175 } 19176 ret := &AssignedTargetingOption{ 19177 ServerResponse: googleapi.ServerResponse{ 19178 Header: res.Header, 19179 HTTPStatusCode: res.StatusCode, 19180 }, 19181 } 19182 target := &ret 19183 if err := gensupport.DecodeResponse(target, res); err != nil { 19184 return nil, err 19185 } 19186 return ret, nil 19187 // { 19188 // "description": "Gets a single targeting option assigned to a campaign.", 19189 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 19190 // "httpMethod": "GET", 19191 // "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.get", 19192 // "parameterOrder": [ 19193 // "advertiserId", 19194 // "campaignId", 19195 // "targetingType", 19196 // "assignedTargetingOptionId" 19197 // ], 19198 // "parameters": { 19199 // "advertiserId": { 19200 // "description": "Required. The ID of the advertiser the campaign belongs to.", 19201 // "format": "int64", 19202 // "location": "path", 19203 // "pattern": "^[^/]+$", 19204 // "required": true, 19205 // "type": "string" 19206 // }, 19207 // "assignedTargetingOptionId": { 19208 // "description": "Required. An identifier unique to the targeting type in this campaign that identifies the assigned targeting option being requested.", 19209 // "location": "path", 19210 // "pattern": "^[^/]+$", 19211 // "required": true, 19212 // "type": "string" 19213 // }, 19214 // "campaignId": { 19215 // "description": "Required. The ID of the campaign the assigned targeting option belongs to.", 19216 // "format": "int64", 19217 // "location": "path", 19218 // "pattern": "^[^/]+$", 19219 // "required": true, 19220 // "type": "string" 19221 // }, 19222 // "targetingType": { 19223 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", 19224 // "enum": [ 19225 // "TARGETING_TYPE_UNSPECIFIED", 19226 // "TARGETING_TYPE_CHANNEL", 19227 // "TARGETING_TYPE_APP_CATEGORY", 19228 // "TARGETING_TYPE_APP", 19229 // "TARGETING_TYPE_URL", 19230 // "TARGETING_TYPE_DAY_AND_TIME", 19231 // "TARGETING_TYPE_AGE_RANGE", 19232 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 19233 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 19234 // "TARGETING_TYPE_GENDER", 19235 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 19236 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 19237 // "TARGETING_TYPE_PARENTAL_STATUS", 19238 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 19239 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 19240 // "TARGETING_TYPE_DEVICE_TYPE", 19241 // "TARGETING_TYPE_AUDIENCE_GROUP", 19242 // "TARGETING_TYPE_BROWSER", 19243 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 19244 // "TARGETING_TYPE_ON_SCREEN_POSITION", 19245 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 19246 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 19247 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 19248 // "TARGETING_TYPE_ENVIRONMENT", 19249 // "TARGETING_TYPE_CARRIER_AND_ISP", 19250 // "TARGETING_TYPE_OPERATING_SYSTEM", 19251 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 19252 // "TARGETING_TYPE_KEYWORD", 19253 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 19254 // "TARGETING_TYPE_VIEWABILITY", 19255 // "TARGETING_TYPE_CATEGORY", 19256 // "TARGETING_TYPE_INVENTORY_SOURCE", 19257 // "TARGETING_TYPE_LANGUAGE", 19258 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 19259 // "TARGETING_TYPE_GEO_REGION", 19260 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 19261 // "TARGETING_TYPE_EXCHANGE", 19262 // "TARGETING_TYPE_SUB_EXCHANGE", 19263 // "TARGETING_TYPE_POI", 19264 // "TARGETING_TYPE_BUSINESS_CHAIN", 19265 // "TARGETING_TYPE_CONTENT_DURATION", 19266 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 19267 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 19268 // "TARGETING_TYPE_OMID", 19269 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 19270 // "TARGETING_TYPE_CONTENT_GENRE" 19271 // ], 19272 // "enumDescriptions": [ 19273 // "Default value when type is not specified or is unknown in this version.", 19274 // "Target a channel (a custom group of related websites or apps).", 19275 // "Target an app category (for example, education or puzzle games).", 19276 // "Target a specific app (for example, Angry Birds).", 19277 // "Target a specific url (for example, quora.com).", 19278 // "Target ads during a chosen time period on a specific day.", 19279 // "Target ads to a specific age range (for example, 18-24).", 19280 // "Target ads to the specified regions on a regional location list.", 19281 // "Target ads to the specified points of interest on a proximity location list.", 19282 // "Target ads to a specific gender (for example, female or male).", 19283 // "Target a specific video player size for video ads.", 19284 // "Target user rewarded content for video ads.", 19285 // "Target ads to a specific parental status (for example, parent or not a parent).", 19286 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 19287 // "Target ads in a specific content outstream position.", 19288 // "Target ads to a specific device type (for example, tablet or connected TV).", 19289 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 19290 // "Target ads to specific web browsers (for example, Chrome).", 19291 // "Target ads to a specific household income range (for example, top 10%).", 19292 // "Target ads in a specific on screen position.", 19293 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 19294 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 19295 // "Filter website content by sensitive categories (for example, adult).", 19296 // "Target ads to a specific environment (for example, web or app).", 19297 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 19298 // "Target ads to a specific operating system (for example, macOS).", 19299 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 19300 // "Target ads to a specific keyword (for example, dog or retriever).", 19301 // "Target ads to a specific negative keyword list.", 19302 // "Target ads to a specific viewability (for example, 80% viewable).", 19303 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 19304 // "Purchase impressions from specific deals and auction packages.", 19305 // "Target ads to a specific language (for example, English or Japanese).", 19306 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 19307 // "Target ads to a specific regional location (for example, a city or state).", 19308 // "Purchase impressions from a group of deals and auction packages.", 19309 // "Purchase impressions from specific exchanges.", 19310 // "Purchase impressions from specific sub-exchanges.", 19311 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 19312 // "Target ads around locations of a business chain within a specific geo region.", 19313 // "Target ads to a specific video content duration.", 19314 // "Target ads to a specific video content stream type.", 19315 // "Target ads to a specific native content position.", 19316 // "Target ads in an Open Measurement enabled inventory.", 19317 // "Target ads to a specific audio content type.", 19318 // "Target ads to a specific content genre." 19319 // ], 19320 // "location": "path", 19321 // "pattern": "^[^/]+$", 19322 // "required": true, 19323 // "type": "string" 19324 // } 19325 // }, 19326 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 19327 // "response": { 19328 // "$ref": "AssignedTargetingOption" 19329 // }, 19330 // "scopes": [ 19331 // "https://www.googleapis.com/auth/display-video" 19332 // ] 19333 // } 19334 19335 } 19336 19337 // method id "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list": 19338 19339 type AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall struct { 19340 s *Service 19341 advertiserId int64 19342 campaignId int64 19343 targetingType string 19344 urlParams_ gensupport.URLParams 19345 ifNoneMatch_ string 19346 ctx_ context.Context 19347 header_ http.Header 19348 } 19349 19350 // List: Lists the targeting options assigned to a campaign for a 19351 // specified targeting type. 19352 // 19353 // - advertiserId: The ID of the advertiser the campaign belongs to. 19354 // - campaignId: The ID of the campaign to list assigned targeting 19355 // options for. 19356 // - targetingType: Identifies the type of assigned targeting options to 19357 // list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * 19358 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 19359 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 19360 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 19361 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 19362 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 19363 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 19364 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 19365 // `TARGETING_TYPE_INVENTORY_SOURCE` * 19366 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` 19367 // - `TARGETING_TYPE_ON_SCREEN_POSITION` * 19368 // `TARGETING_TYPE_PARENTAL_STATUS` * 19369 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 19370 // `TARGETING_TYPE_SUB_EXCHANGE` * 19371 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * 19372 // `TARGETING_TYPE_VIEWABILITY`. 19373 func (r *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, campaignId int64, targetingType string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19374 c := &AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19375 c.advertiserId = advertiserId 19376 c.campaignId = campaignId 19377 c.targetingType = targetingType 19378 return c 19379 } 19380 19381 // Filter sets the optional parameter "filter": Allows filtering by 19382 // assigned targeting option fields. Supported syntax: * Filter 19383 // expressions are made up of one or more restrictions. * Restrictions 19384 // can be combined by the `OR` logical operator. * A restriction has the 19385 // form of `{field} {operator} {value}`. * All fields must use the 19386 // `EQUALS (=)` operator. Supported fields: * 19387 // `assignedTargetingOptionId` * `inheritance` Examples: * 19388 // `AssignedTargetingOption` resources with ID 1 or 2 19389 // `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * 19390 // `AssignedTargetingOption` resources with inheritance status of 19391 // `NOT_INHERITED` or `INHERITED_FROM_PARTNER` 19392 // `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER" 19393 // The length of this field should be no more than 500 characters. 19394 // Reference our filter `LIST` requests 19395 // (/display-video/api/guides/how-tos/filters) guide for more 19396 // information. 19397 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19398 c.urlParams_.Set("filter", filter) 19399 return c 19400 } 19401 19402 // OrderBy sets the optional parameter "orderBy": Field by which to sort 19403 // the list. Acceptable values are: * `assignedTargetingOptionId` 19404 // (default) The default sorting order is ascending. To specify 19405 // descending order for a field, a suffix "desc" should be added to the 19406 // field name. Example: `assignedTargetingOptionId desc`. 19407 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19408 c.urlParams_.Set("orderBy", orderBy) 19409 return c 19410 } 19411 19412 // PageSize sets the optional parameter "pageSize": Requested page size. 19413 // Must be between `1` and `5000`. If unspecified will default to `100`. 19414 // Returns error code `INVALID_ARGUMENT` if an invalid value is 19415 // specified. 19416 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19417 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19418 return c 19419 } 19420 19421 // PageToken sets the optional parameter "pageToken": A token 19422 // identifying a page of results the server should return. Typically, 19423 // this is the value of next_page_token returned from the previous call 19424 // to `ListCampaignAssignedTargetingOptions` method. If not specified, 19425 // the first page of results will be returned. 19426 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19427 c.urlParams_.Set("pageToken", pageToken) 19428 return c 19429 } 19430 19431 // Fields allows partial responses to be retrieved. See 19432 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19433 // for more information. 19434 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19435 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19436 return c 19437 } 19438 19439 // IfNoneMatch sets the optional parameter which makes the operation 19440 // fail if the object's ETag matches the given value. This is useful for 19441 // getting updates only after the object has changed since the last 19442 // request. Use googleapi.IsNotModified to check whether the response 19443 // error from Do is the result of In-None-Match. 19444 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19445 c.ifNoneMatch_ = entityTag 19446 return c 19447 } 19448 19449 // Context sets the context to be used in this call's Do method. Any 19450 // pending HTTP request will be aborted if the provided context is 19451 // canceled. 19452 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall { 19453 c.ctx_ = ctx 19454 return c 19455 } 19456 19457 // Header returns an http.Header that can be modified by the caller to 19458 // add HTTP headers to the request. 19459 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { 19460 if c.header_ == nil { 19461 c.header_ = make(http.Header) 19462 } 19463 return c.header_ 19464 } 19465 19466 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 19467 reqHeaders := make(http.Header) 19468 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 19469 for k, v := range c.header_ { 19470 reqHeaders[k] = v 19471 } 19472 reqHeaders.Set("User-Agent", c.s.userAgent()) 19473 if c.ifNoneMatch_ != "" { 19474 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19475 } 19476 var body io.Reader = nil 19477 c.urlParams_.Set("alt", alt) 19478 c.urlParams_.Set("prettyPrint", "false") 19479 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 19480 urls += "?" + c.urlParams_.Encode() 19481 req, err := http.NewRequest("GET", urls, body) 19482 if err != nil { 19483 return nil, err 19484 } 19485 req.Header = reqHeaders 19486 googleapi.Expand(req.URL, map[string]string{ 19487 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 19488 "campaignId": strconv.FormatInt(c.campaignId, 10), 19489 "targetingType": c.targetingType, 19490 }) 19491 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19492 } 19493 19494 // Do executes the "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list" call. 19495 // Exactly one of *ListCampaignAssignedTargetingOptionsResponse or error 19496 // will be non-nil. Any non-2xx status code is an error. Response 19497 // headers are in either 19498 // *ListCampaignAssignedTargetingOptionsResponse.ServerResponse.Header 19499 // or (if a response was returned at all) in 19500 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 19501 // whether the returned error was because http.StatusNotModified was 19502 // returned. 19503 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignAssignedTargetingOptionsResponse, error) { 19504 gensupport.SetOptions(c.urlParams_, opts...) 19505 res, err := c.doRequest("json") 19506 if res != nil && res.StatusCode == http.StatusNotModified { 19507 if res.Body != nil { 19508 res.Body.Close() 19509 } 19510 return nil, gensupport.WrapError(&googleapi.Error{ 19511 Code: res.StatusCode, 19512 Header: res.Header, 19513 }) 19514 } 19515 if err != nil { 19516 return nil, err 19517 } 19518 defer googleapi.CloseBody(res) 19519 if err := googleapi.CheckResponse(res); err != nil { 19520 return nil, gensupport.WrapError(err) 19521 } 19522 ret := &ListCampaignAssignedTargetingOptionsResponse{ 19523 ServerResponse: googleapi.ServerResponse{ 19524 Header: res.Header, 19525 HTTPStatusCode: res.StatusCode, 19526 }, 19527 } 19528 target := &ret 19529 if err := gensupport.DecodeResponse(target, res); err != nil { 19530 return nil, err 19531 } 19532 return ret, nil 19533 // { 19534 // "description": "Lists the targeting options assigned to a campaign for a specified targeting type.", 19535 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 19536 // "httpMethod": "GET", 19537 // "id": "displayvideo.advertisers.campaigns.targetingTypes.assignedTargetingOptions.list", 19538 // "parameterOrder": [ 19539 // "advertiserId", 19540 // "campaignId", 19541 // "targetingType" 19542 // ], 19543 // "parameters": { 19544 // "advertiserId": { 19545 // "description": "Required. The ID of the advertiser the campaign belongs to.", 19546 // "format": "int64", 19547 // "location": "path", 19548 // "pattern": "^[^/]+$", 19549 // "required": true, 19550 // "type": "string" 19551 // }, 19552 // "campaignId": { 19553 // "description": "Required. The ID of the campaign to list assigned targeting options for.", 19554 // "format": "int64", 19555 // "location": "path", 19556 // "pattern": "^[^/]+$", 19557 // "required": true, 19558 // "type": "string" 19559 // }, 19560 // "filter": { 19561 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2 `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER` `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 19562 // "location": "query", 19563 // "type": "string" 19564 // }, 19565 // "orderBy": { 19566 // "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", 19567 // "location": "query", 19568 // "type": "string" 19569 // }, 19570 // "pageSize": { 19571 // "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 19572 // "format": "int32", 19573 // "location": "query", 19574 // "type": "integer" 19575 // }, 19576 // "pageToken": { 19577 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCampaignAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 19578 // "location": "query", 19579 // "type": "string" 19580 // }, 19581 // "targetingType": { 19582 // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_VIEWABILITY`", 19583 // "enum": [ 19584 // "TARGETING_TYPE_UNSPECIFIED", 19585 // "TARGETING_TYPE_CHANNEL", 19586 // "TARGETING_TYPE_APP_CATEGORY", 19587 // "TARGETING_TYPE_APP", 19588 // "TARGETING_TYPE_URL", 19589 // "TARGETING_TYPE_DAY_AND_TIME", 19590 // "TARGETING_TYPE_AGE_RANGE", 19591 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 19592 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 19593 // "TARGETING_TYPE_GENDER", 19594 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 19595 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 19596 // "TARGETING_TYPE_PARENTAL_STATUS", 19597 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 19598 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 19599 // "TARGETING_TYPE_DEVICE_TYPE", 19600 // "TARGETING_TYPE_AUDIENCE_GROUP", 19601 // "TARGETING_TYPE_BROWSER", 19602 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 19603 // "TARGETING_TYPE_ON_SCREEN_POSITION", 19604 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 19605 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 19606 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 19607 // "TARGETING_TYPE_ENVIRONMENT", 19608 // "TARGETING_TYPE_CARRIER_AND_ISP", 19609 // "TARGETING_TYPE_OPERATING_SYSTEM", 19610 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 19611 // "TARGETING_TYPE_KEYWORD", 19612 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 19613 // "TARGETING_TYPE_VIEWABILITY", 19614 // "TARGETING_TYPE_CATEGORY", 19615 // "TARGETING_TYPE_INVENTORY_SOURCE", 19616 // "TARGETING_TYPE_LANGUAGE", 19617 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 19618 // "TARGETING_TYPE_GEO_REGION", 19619 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 19620 // "TARGETING_TYPE_EXCHANGE", 19621 // "TARGETING_TYPE_SUB_EXCHANGE", 19622 // "TARGETING_TYPE_POI", 19623 // "TARGETING_TYPE_BUSINESS_CHAIN", 19624 // "TARGETING_TYPE_CONTENT_DURATION", 19625 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 19626 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 19627 // "TARGETING_TYPE_OMID", 19628 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 19629 // "TARGETING_TYPE_CONTENT_GENRE" 19630 // ], 19631 // "enumDescriptions": [ 19632 // "Default value when type is not specified or is unknown in this version.", 19633 // "Target a channel (a custom group of related websites or apps).", 19634 // "Target an app category (for example, education or puzzle games).", 19635 // "Target a specific app (for example, Angry Birds).", 19636 // "Target a specific url (for example, quora.com).", 19637 // "Target ads during a chosen time period on a specific day.", 19638 // "Target ads to a specific age range (for example, 18-24).", 19639 // "Target ads to the specified regions on a regional location list.", 19640 // "Target ads to the specified points of interest on a proximity location list.", 19641 // "Target ads to a specific gender (for example, female or male).", 19642 // "Target a specific video player size for video ads.", 19643 // "Target user rewarded content for video ads.", 19644 // "Target ads to a specific parental status (for example, parent or not a parent).", 19645 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 19646 // "Target ads in a specific content outstream position.", 19647 // "Target ads to a specific device type (for example, tablet or connected TV).", 19648 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 19649 // "Target ads to specific web browsers (for example, Chrome).", 19650 // "Target ads to a specific household income range (for example, top 10%).", 19651 // "Target ads in a specific on screen position.", 19652 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 19653 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 19654 // "Filter website content by sensitive categories (for example, adult).", 19655 // "Target ads to a specific environment (for example, web or app).", 19656 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 19657 // "Target ads to a specific operating system (for example, macOS).", 19658 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 19659 // "Target ads to a specific keyword (for example, dog or retriever).", 19660 // "Target ads to a specific negative keyword list.", 19661 // "Target ads to a specific viewability (for example, 80% viewable).", 19662 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 19663 // "Purchase impressions from specific deals and auction packages.", 19664 // "Target ads to a specific language (for example, English or Japanese).", 19665 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 19666 // "Target ads to a specific regional location (for example, a city or state).", 19667 // "Purchase impressions from a group of deals and auction packages.", 19668 // "Purchase impressions from specific exchanges.", 19669 // "Purchase impressions from specific sub-exchanges.", 19670 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 19671 // "Target ads around locations of a business chain within a specific geo region.", 19672 // "Target ads to a specific video content duration.", 19673 // "Target ads to a specific video content stream type.", 19674 // "Target ads to a specific native content position.", 19675 // "Target ads in an Open Measurement enabled inventory.", 19676 // "Target ads to a specific audio content type.", 19677 // "Target ads to a specific content genre." 19678 // ], 19679 // "location": "path", 19680 // "pattern": "^[^/]+$", 19681 // "required": true, 19682 // "type": "string" 19683 // } 19684 // }, 19685 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 19686 // "response": { 19687 // "$ref": "ListCampaignAssignedTargetingOptionsResponse" 19688 // }, 19689 // "scopes": [ 19690 // "https://www.googleapis.com/auth/display-video" 19691 // ] 19692 // } 19693 19694 } 19695 19696 // Pages invokes f for each page of results. 19697 // A non-nil error returned from f will halt the iteration. 19698 // The provided context supersedes any context provided to the Context method. 19699 func (c *AdvertisersCampaignsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListCampaignAssignedTargetingOptionsResponse) error) error { 19700 c.ctx_ = ctx 19701 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19702 for { 19703 x, err := c.Do() 19704 if err != nil { 19705 return err 19706 } 19707 if err := f(x); err != nil { 19708 return err 19709 } 19710 if x.NextPageToken == "" { 19711 return nil 19712 } 19713 c.PageToken(x.NextPageToken) 19714 } 19715 } 19716 19717 // method id "displayvideo.advertisers.channels.create": 19718 19719 type AdvertisersChannelsCreateCall struct { 19720 s *Service 19721 advertiserId int64 19722 channel *Channel 19723 urlParams_ gensupport.URLParams 19724 ctx_ context.Context 19725 header_ http.Header 19726 } 19727 19728 // Create: Creates a new channel. Returns the newly created channel if 19729 // successful. 19730 // 19731 // - advertiserId: The ID of the advertiser that owns the created 19732 // channel. 19733 func (r *AdvertisersChannelsService) Create(advertiserId int64, channel *Channel) *AdvertisersChannelsCreateCall { 19734 c := &AdvertisersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19735 c.advertiserId = advertiserId 19736 c.channel = channel 19737 return c 19738 } 19739 19740 // PartnerId sets the optional parameter "partnerId": The ID of the 19741 // partner that owns the created channel. 19742 func (c *AdvertisersChannelsCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsCreateCall { 19743 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 19744 return c 19745 } 19746 19747 // Fields allows partial responses to be retrieved. See 19748 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19749 // for more information. 19750 func (c *AdvertisersChannelsCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsCreateCall { 19751 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19752 return c 19753 } 19754 19755 // Context sets the context to be used in this call's Do method. Any 19756 // pending HTTP request will be aborted if the provided context is 19757 // canceled. 19758 func (c *AdvertisersChannelsCreateCall) Context(ctx context.Context) *AdvertisersChannelsCreateCall { 19759 c.ctx_ = ctx 19760 return c 19761 } 19762 19763 // Header returns an http.Header that can be modified by the caller to 19764 // add HTTP headers to the request. 19765 func (c *AdvertisersChannelsCreateCall) Header() http.Header { 19766 if c.header_ == nil { 19767 c.header_ = make(http.Header) 19768 } 19769 return c.header_ 19770 } 19771 19772 func (c *AdvertisersChannelsCreateCall) doRequest(alt string) (*http.Response, error) { 19773 reqHeaders := make(http.Header) 19774 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 19775 for k, v := range c.header_ { 19776 reqHeaders[k] = v 19777 } 19778 reqHeaders.Set("User-Agent", c.s.userAgent()) 19779 var body io.Reader = nil 19780 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) 19781 if err != nil { 19782 return nil, err 19783 } 19784 reqHeaders.Set("Content-Type", "application/json") 19785 c.urlParams_.Set("alt", alt) 19786 c.urlParams_.Set("prettyPrint", "false") 19787 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels") 19788 urls += "?" + c.urlParams_.Encode() 19789 req, err := http.NewRequest("POST", urls, body) 19790 if err != nil { 19791 return nil, err 19792 } 19793 req.Header = reqHeaders 19794 googleapi.Expand(req.URL, map[string]string{ 19795 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 19796 }) 19797 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19798 } 19799 19800 // Do executes the "displayvideo.advertisers.channels.create" call. 19801 // Exactly one of *Channel or error will be non-nil. Any non-2xx status 19802 // code is an error. Response headers are in either 19803 // *Channel.ServerResponse.Header or (if a response was returned at all) 19804 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19805 // check whether the returned error was because http.StatusNotModified 19806 // was returned. 19807 func (c *AdvertisersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 19808 gensupport.SetOptions(c.urlParams_, opts...) 19809 res, err := c.doRequest("json") 19810 if res != nil && res.StatusCode == http.StatusNotModified { 19811 if res.Body != nil { 19812 res.Body.Close() 19813 } 19814 return nil, gensupport.WrapError(&googleapi.Error{ 19815 Code: res.StatusCode, 19816 Header: res.Header, 19817 }) 19818 } 19819 if err != nil { 19820 return nil, err 19821 } 19822 defer googleapi.CloseBody(res) 19823 if err := googleapi.CheckResponse(res); err != nil { 19824 return nil, gensupport.WrapError(err) 19825 } 19826 ret := &Channel{ 19827 ServerResponse: googleapi.ServerResponse{ 19828 Header: res.Header, 19829 HTTPStatusCode: res.StatusCode, 19830 }, 19831 } 19832 target := &ret 19833 if err := gensupport.DecodeResponse(target, res); err != nil { 19834 return nil, err 19835 } 19836 return ret, nil 19837 // { 19838 // "description": "Creates a new channel. Returns the newly created channel if successful.", 19839 // "flatPath": "v1/advertisers/{advertisersId}/channels", 19840 // "httpMethod": "POST", 19841 // "id": "displayvideo.advertisers.channels.create", 19842 // "parameterOrder": [ 19843 // "advertiserId" 19844 // ], 19845 // "parameters": { 19846 // "advertiserId": { 19847 // "description": "The ID of the advertiser that owns the created channel.", 19848 // "format": "int64", 19849 // "location": "path", 19850 // "pattern": "^[^/]+$", 19851 // "required": true, 19852 // "type": "string" 19853 // }, 19854 // "partnerId": { 19855 // "description": "The ID of the partner that owns the created channel.", 19856 // "format": "int64", 19857 // "location": "query", 19858 // "type": "string" 19859 // } 19860 // }, 19861 // "path": "v1/advertisers/{+advertiserId}/channels", 19862 // "request": { 19863 // "$ref": "Channel" 19864 // }, 19865 // "response": { 19866 // "$ref": "Channel" 19867 // }, 19868 // "scopes": [ 19869 // "https://www.googleapis.com/auth/display-video" 19870 // ] 19871 // } 19872 19873 } 19874 19875 // method id "displayvideo.advertisers.channels.get": 19876 19877 type AdvertisersChannelsGetCall struct { 19878 s *Service 19879 advertiserId int64 19880 channelId int64 19881 urlParams_ gensupport.URLParams 19882 ifNoneMatch_ string 19883 ctx_ context.Context 19884 header_ http.Header 19885 } 19886 19887 // Get: Gets a channel for a partner or advertiser. 19888 // 19889 // - advertiserId: The ID of the advertiser that owns the fetched 19890 // channel. 19891 // - channelId: The ID of the channel to fetch. 19892 func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall { 19893 c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19894 c.advertiserId = advertiserId 19895 c.channelId = channelId 19896 return c 19897 } 19898 19899 // PartnerId sets the optional parameter "partnerId": The ID of the 19900 // partner that owns the fetched channel. 19901 func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall { 19902 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 19903 return c 19904 } 19905 19906 // Fields allows partial responses to be retrieved. See 19907 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19908 // for more information. 19909 func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall { 19910 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19911 return c 19912 } 19913 19914 // IfNoneMatch sets the optional parameter which makes the operation 19915 // fail if the object's ETag matches the given value. This is useful for 19916 // getting updates only after the object has changed since the last 19917 // request. Use googleapi.IsNotModified to check whether the response 19918 // error from Do is the result of In-None-Match. 19919 func (c *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall { 19920 c.ifNoneMatch_ = entityTag 19921 return c 19922 } 19923 19924 // Context sets the context to be used in this call's Do method. Any 19925 // pending HTTP request will be aborted if the provided context is 19926 // canceled. 19927 func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall { 19928 c.ctx_ = ctx 19929 return c 19930 } 19931 19932 // Header returns an http.Header that can be modified by the caller to 19933 // add HTTP headers to the request. 19934 func (c *AdvertisersChannelsGetCall) Header() http.Header { 19935 if c.header_ == nil { 19936 c.header_ = make(http.Header) 19937 } 19938 return c.header_ 19939 } 19940 19941 func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) { 19942 reqHeaders := make(http.Header) 19943 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 19944 for k, v := range c.header_ { 19945 reqHeaders[k] = v 19946 } 19947 reqHeaders.Set("User-Agent", c.s.userAgent()) 19948 if c.ifNoneMatch_ != "" { 19949 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19950 } 19951 var body io.Reader = nil 19952 c.urlParams_.Set("alt", alt) 19953 c.urlParams_.Set("prettyPrint", "false") 19954 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels/{+channelId}") 19955 urls += "?" + c.urlParams_.Encode() 19956 req, err := http.NewRequest("GET", urls, body) 19957 if err != nil { 19958 return nil, err 19959 } 19960 req.Header = reqHeaders 19961 googleapi.Expand(req.URL, map[string]string{ 19962 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 19963 "channelId": strconv.FormatInt(c.channelId, 10), 19964 }) 19965 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19966 } 19967 19968 // Do executes the "displayvideo.advertisers.channels.get" call. 19969 // Exactly one of *Channel or error will be non-nil. Any non-2xx status 19970 // code is an error. Response headers are in either 19971 // *Channel.ServerResponse.Header or (if a response was returned at all) 19972 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 19973 // check whether the returned error was because http.StatusNotModified 19974 // was returned. 19975 func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 19976 gensupport.SetOptions(c.urlParams_, opts...) 19977 res, err := c.doRequest("json") 19978 if res != nil && res.StatusCode == http.StatusNotModified { 19979 if res.Body != nil { 19980 res.Body.Close() 19981 } 19982 return nil, gensupport.WrapError(&googleapi.Error{ 19983 Code: res.StatusCode, 19984 Header: res.Header, 19985 }) 19986 } 19987 if err != nil { 19988 return nil, err 19989 } 19990 defer googleapi.CloseBody(res) 19991 if err := googleapi.CheckResponse(res); err != nil { 19992 return nil, gensupport.WrapError(err) 19993 } 19994 ret := &Channel{ 19995 ServerResponse: googleapi.ServerResponse{ 19996 Header: res.Header, 19997 HTTPStatusCode: res.StatusCode, 19998 }, 19999 } 20000 target := &ret 20001 if err := gensupport.DecodeResponse(target, res); err != nil { 20002 return nil, err 20003 } 20004 return ret, nil 20005 // { 20006 // "description": "Gets a channel for a partner or advertiser.", 20007 // "flatPath": "v1/advertisers/{advertisersId}/channels/{channelsId}", 20008 // "httpMethod": "GET", 20009 // "id": "displayvideo.advertisers.channels.get", 20010 // "parameterOrder": [ 20011 // "advertiserId", 20012 // "channelId" 20013 // ], 20014 // "parameters": { 20015 // "advertiserId": { 20016 // "description": "The ID of the advertiser that owns the fetched channel.", 20017 // "format": "int64", 20018 // "location": "path", 20019 // "pattern": "^[^/]+$", 20020 // "required": true, 20021 // "type": "string" 20022 // }, 20023 // "channelId": { 20024 // "description": "Required. The ID of the channel to fetch.", 20025 // "format": "int64", 20026 // "location": "path", 20027 // "pattern": "^[^/]+$", 20028 // "required": true, 20029 // "type": "string" 20030 // }, 20031 // "partnerId": { 20032 // "description": "The ID of the partner that owns the fetched channel.", 20033 // "format": "int64", 20034 // "location": "query", 20035 // "type": "string" 20036 // } 20037 // }, 20038 // "path": "v1/advertisers/{+advertiserId}/channels/{+channelId}", 20039 // "response": { 20040 // "$ref": "Channel" 20041 // }, 20042 // "scopes": [ 20043 // "https://www.googleapis.com/auth/display-video" 20044 // ] 20045 // } 20046 20047 } 20048 20049 // method id "displayvideo.advertisers.channels.list": 20050 20051 type AdvertisersChannelsListCall struct { 20052 s *Service 20053 advertiserId int64 20054 urlParams_ gensupport.URLParams 20055 ifNoneMatch_ string 20056 ctx_ context.Context 20057 header_ http.Header 20058 } 20059 20060 // List: Lists channels for a partner or advertiser. 20061 // 20062 // - advertiserId: The ID of the advertiser that owns the channels. 20063 func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall { 20064 c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20065 c.advertiserId = advertiserId 20066 return c 20067 } 20068 20069 // Filter sets the optional parameter "filter": Allows filtering by 20070 // channel fields. Supported syntax: * Filter expressions for channel 20071 // can only contain at most one restriction. * A restriction has the 20072 // form of `{field} {operator} {value}`. * All fields must use the `HAS 20073 // (:)` operator. Supported fields: * `displayName` Examples: * All 20074 // channels for which the display name contains "google": `displayName : 20075 // "google". The length of this field should be no more than 500 20076 // characters. Reference our filter `LIST` requests 20077 // (/display-video/api/guides/how-tos/filters) guide for more 20078 // information. 20079 func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall { 20080 c.urlParams_.Set("filter", filter) 20081 return c 20082 } 20083 20084 // OrderBy sets the optional parameter "orderBy": Field by which to sort 20085 // the list. Acceptable values are: * `displayName` (default) * 20086 // `channelId` The default sorting order is ascending. To specify 20087 // descending order for a field, a suffix " desc" should be added to the 20088 // field name. Example: `displayName desc`. 20089 func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall { 20090 c.urlParams_.Set("orderBy", orderBy) 20091 return c 20092 } 20093 20094 // PageSize sets the optional parameter "pageSize": Requested page size. 20095 // Must be between `1` and `200`. If unspecified will default to `100`. 20096 // Returns error code `INVALID_ARGUMENT` if an invalid value is 20097 // specified. 20098 func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { 20099 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 20100 return c 20101 } 20102 20103 // PageToken sets the optional parameter "pageToken": A token 20104 // identifying a page of results the server should return. Typically, 20105 // this is the value of next_page_token returned from the previous call 20106 // to `ListChannels` method. If not specified, the first page of results 20107 // will be returned. 20108 func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall { 20109 c.urlParams_.Set("pageToken", pageToken) 20110 return c 20111 } 20112 20113 // PartnerId sets the optional parameter "partnerId": The ID of the 20114 // partner that owns the channels. 20115 func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall { 20116 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20117 return c 20118 } 20119 20120 // Fields allows partial responses to be retrieved. See 20121 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20122 // for more information. 20123 func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall { 20124 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20125 return c 20126 } 20127 20128 // IfNoneMatch sets the optional parameter which makes the operation 20129 // fail if the object's ETag matches the given value. This is useful for 20130 // getting updates only after the object has changed since the last 20131 // request. Use googleapi.IsNotModified to check whether the response 20132 // error from Do is the result of In-None-Match. 20133 func (c *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall { 20134 c.ifNoneMatch_ = entityTag 20135 return c 20136 } 20137 20138 // Context sets the context to be used in this call's Do method. Any 20139 // pending HTTP request will be aborted if the provided context is 20140 // canceled. 20141 func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall { 20142 c.ctx_ = ctx 20143 return c 20144 } 20145 20146 // Header returns an http.Header that can be modified by the caller to 20147 // add HTTP headers to the request. 20148 func (c *AdvertisersChannelsListCall) Header() http.Header { 20149 if c.header_ == nil { 20150 c.header_ = make(http.Header) 20151 } 20152 return c.header_ 20153 } 20154 20155 func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) { 20156 reqHeaders := make(http.Header) 20157 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 20158 for k, v := range c.header_ { 20159 reqHeaders[k] = v 20160 } 20161 reqHeaders.Set("User-Agent", c.s.userAgent()) 20162 if c.ifNoneMatch_ != "" { 20163 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20164 } 20165 var body io.Reader = nil 20166 c.urlParams_.Set("alt", alt) 20167 c.urlParams_.Set("prettyPrint", "false") 20168 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels") 20169 urls += "?" + c.urlParams_.Encode() 20170 req, err := http.NewRequest("GET", urls, body) 20171 if err != nil { 20172 return nil, err 20173 } 20174 req.Header = reqHeaders 20175 googleapi.Expand(req.URL, map[string]string{ 20176 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 20177 }) 20178 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20179 } 20180 20181 // Do executes the "displayvideo.advertisers.channels.list" call. 20182 // Exactly one of *ListChannelsResponse or error will be non-nil. Any 20183 // non-2xx status code is an error. Response headers are in either 20184 // *ListChannelsResponse.ServerResponse.Header or (if a response was 20185 // returned at all) in error.(*googleapi.Error).Header. Use 20186 // googleapi.IsNotModified to check whether the returned error was 20187 // because http.StatusNotModified was returned. 20188 func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { 20189 gensupport.SetOptions(c.urlParams_, opts...) 20190 res, err := c.doRequest("json") 20191 if res != nil && res.StatusCode == http.StatusNotModified { 20192 if res.Body != nil { 20193 res.Body.Close() 20194 } 20195 return nil, gensupport.WrapError(&googleapi.Error{ 20196 Code: res.StatusCode, 20197 Header: res.Header, 20198 }) 20199 } 20200 if err != nil { 20201 return nil, err 20202 } 20203 defer googleapi.CloseBody(res) 20204 if err := googleapi.CheckResponse(res); err != nil { 20205 return nil, gensupport.WrapError(err) 20206 } 20207 ret := &ListChannelsResponse{ 20208 ServerResponse: googleapi.ServerResponse{ 20209 Header: res.Header, 20210 HTTPStatusCode: res.StatusCode, 20211 }, 20212 } 20213 target := &ret 20214 if err := gensupport.DecodeResponse(target, res); err != nil { 20215 return nil, err 20216 } 20217 return ret, nil 20218 // { 20219 // "description": "Lists channels for a partner or advertiser.", 20220 // "flatPath": "v1/advertisers/{advertisersId}/channels", 20221 // "httpMethod": "GET", 20222 // "id": "displayvideo.advertisers.channels.list", 20223 // "parameterOrder": [ 20224 // "advertiserId" 20225 // ], 20226 // "parameters": { 20227 // "advertiserId": { 20228 // "description": "The ID of the advertiser that owns the channels.", 20229 // "format": "int64", 20230 // "location": "path", 20231 // "pattern": "^[^/]+$", 20232 // "required": true, 20233 // "type": "string" 20234 // }, 20235 // "filter": { 20236 // "description": "Allows filtering by channel fields. Supported syntax: * Filter expressions for channel can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All channels for which the display name contains \"google\": `displayName : \"google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 20237 // "location": "query", 20238 // "type": "string" 20239 // }, 20240 // "orderBy": { 20241 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `channelId` The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `displayName desc`.", 20242 // "location": "query", 20243 // "type": "string" 20244 // }, 20245 // "pageSize": { 20246 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 20247 // "format": "int32", 20248 // "location": "query", 20249 // "type": "integer" 20250 // }, 20251 // "pageToken": { 20252 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListChannels` method. If not specified, the first page of results will be returned.", 20253 // "location": "query", 20254 // "type": "string" 20255 // }, 20256 // "partnerId": { 20257 // "description": "The ID of the partner that owns the channels.", 20258 // "format": "int64", 20259 // "location": "query", 20260 // "type": "string" 20261 // } 20262 // }, 20263 // "path": "v1/advertisers/{+advertiserId}/channels", 20264 // "response": { 20265 // "$ref": "ListChannelsResponse" 20266 // }, 20267 // "scopes": [ 20268 // "https://www.googleapis.com/auth/display-video" 20269 // ] 20270 // } 20271 20272 } 20273 20274 // Pages invokes f for each page of results. 20275 // A non-nil error returned from f will halt the iteration. 20276 // The provided context supersedes any context provided to the Context method. 20277 func (c *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error { 20278 c.ctx_ = ctx 20279 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20280 for { 20281 x, err := c.Do() 20282 if err != nil { 20283 return err 20284 } 20285 if err := f(x); err != nil { 20286 return err 20287 } 20288 if x.NextPageToken == "" { 20289 return nil 20290 } 20291 c.PageToken(x.NextPageToken) 20292 } 20293 } 20294 20295 // method id "displayvideo.advertisers.channels.patch": 20296 20297 type AdvertisersChannelsPatchCall struct { 20298 s *Service 20299 advertiserId int64 20300 channelId int64 20301 channel *Channel 20302 urlParams_ gensupport.URLParams 20303 ctx_ context.Context 20304 header_ http.Header 20305 } 20306 20307 // Patch: Updates a channel. Returns the updated channel if successful. 20308 // 20309 // - advertiserId: The ID of the advertiser that owns the created 20310 // channel. 20311 // - channelId: Output only. The unique ID of the channel. Assigned by 20312 // the system. 20313 func (r *AdvertisersChannelsService) Patch(advertiserId int64, channelId int64, channel *Channel) *AdvertisersChannelsPatchCall { 20314 c := &AdvertisersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20315 c.advertiserId = advertiserId 20316 c.channelId = channelId 20317 c.channel = channel 20318 return c 20319 } 20320 20321 // PartnerId sets the optional parameter "partnerId": The ID of the 20322 // partner that owns the created channel. 20323 func (c *AdvertisersChannelsPatchCall) PartnerId(partnerId int64) *AdvertisersChannelsPatchCall { 20324 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20325 return c 20326 } 20327 20328 // UpdateMask sets the optional parameter "updateMask": Required. The 20329 // mask to control which fields to update. 20330 func (c *AdvertisersChannelsPatchCall) UpdateMask(updateMask string) *AdvertisersChannelsPatchCall { 20331 c.urlParams_.Set("updateMask", updateMask) 20332 return c 20333 } 20334 20335 // Fields allows partial responses to be retrieved. See 20336 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20337 // for more information. 20338 func (c *AdvertisersChannelsPatchCall) Fields(s ...googleapi.Field) *AdvertisersChannelsPatchCall { 20339 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20340 return c 20341 } 20342 20343 // Context sets the context to be used in this call's Do method. Any 20344 // pending HTTP request will be aborted if the provided context is 20345 // canceled. 20346 func (c *AdvertisersChannelsPatchCall) Context(ctx context.Context) *AdvertisersChannelsPatchCall { 20347 c.ctx_ = ctx 20348 return c 20349 } 20350 20351 // Header returns an http.Header that can be modified by the caller to 20352 // add HTTP headers to the request. 20353 func (c *AdvertisersChannelsPatchCall) Header() http.Header { 20354 if c.header_ == nil { 20355 c.header_ = make(http.Header) 20356 } 20357 return c.header_ 20358 } 20359 20360 func (c *AdvertisersChannelsPatchCall) doRequest(alt string) (*http.Response, error) { 20361 reqHeaders := make(http.Header) 20362 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 20363 for k, v := range c.header_ { 20364 reqHeaders[k] = v 20365 } 20366 reqHeaders.Set("User-Agent", c.s.userAgent()) 20367 var body io.Reader = nil 20368 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) 20369 if err != nil { 20370 return nil, err 20371 } 20372 reqHeaders.Set("Content-Type", "application/json") 20373 c.urlParams_.Set("alt", alt) 20374 c.urlParams_.Set("prettyPrint", "false") 20375 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels/{channelId}") 20376 urls += "?" + c.urlParams_.Encode() 20377 req, err := http.NewRequest("PATCH", urls, body) 20378 if err != nil { 20379 return nil, err 20380 } 20381 req.Header = reqHeaders 20382 googleapi.Expand(req.URL, map[string]string{ 20383 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 20384 "channelId": strconv.FormatInt(c.channelId, 10), 20385 }) 20386 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20387 } 20388 20389 // Do executes the "displayvideo.advertisers.channels.patch" call. 20390 // Exactly one of *Channel or error will be non-nil. Any non-2xx status 20391 // code is an error. Response headers are in either 20392 // *Channel.ServerResponse.Header or (if a response was returned at all) 20393 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 20394 // check whether the returned error was because http.StatusNotModified 20395 // was returned. 20396 func (c *AdvertisersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 20397 gensupport.SetOptions(c.urlParams_, opts...) 20398 res, err := c.doRequest("json") 20399 if res != nil && res.StatusCode == http.StatusNotModified { 20400 if res.Body != nil { 20401 res.Body.Close() 20402 } 20403 return nil, gensupport.WrapError(&googleapi.Error{ 20404 Code: res.StatusCode, 20405 Header: res.Header, 20406 }) 20407 } 20408 if err != nil { 20409 return nil, err 20410 } 20411 defer googleapi.CloseBody(res) 20412 if err := googleapi.CheckResponse(res); err != nil { 20413 return nil, gensupport.WrapError(err) 20414 } 20415 ret := &Channel{ 20416 ServerResponse: googleapi.ServerResponse{ 20417 Header: res.Header, 20418 HTTPStatusCode: res.StatusCode, 20419 }, 20420 } 20421 target := &ret 20422 if err := gensupport.DecodeResponse(target, res); err != nil { 20423 return nil, err 20424 } 20425 return ret, nil 20426 // { 20427 // "description": "Updates a channel. Returns the updated channel if successful.", 20428 // "flatPath": "v1/advertisers/{advertisersId}/channels/{channelId}", 20429 // "httpMethod": "PATCH", 20430 // "id": "displayvideo.advertisers.channels.patch", 20431 // "parameterOrder": [ 20432 // "advertiserId", 20433 // "channelId" 20434 // ], 20435 // "parameters": { 20436 // "advertiserId": { 20437 // "description": "The ID of the advertiser that owns the created channel.", 20438 // "format": "int64", 20439 // "location": "path", 20440 // "pattern": "^[^/]+$", 20441 // "required": true, 20442 // "type": "string" 20443 // }, 20444 // "channelId": { 20445 // "description": "Output only. The unique ID of the channel. Assigned by the system.", 20446 // "format": "int64", 20447 // "location": "path", 20448 // "required": true, 20449 // "type": "string" 20450 // }, 20451 // "partnerId": { 20452 // "description": "The ID of the partner that owns the created channel.", 20453 // "format": "int64", 20454 // "location": "query", 20455 // "type": "string" 20456 // }, 20457 // "updateMask": { 20458 // "description": "Required. The mask to control which fields to update.", 20459 // "format": "google-fieldmask", 20460 // "location": "query", 20461 // "type": "string" 20462 // } 20463 // }, 20464 // "path": "v1/advertisers/{+advertiserId}/channels/{channelId}", 20465 // "request": { 20466 // "$ref": "Channel" 20467 // }, 20468 // "response": { 20469 // "$ref": "Channel" 20470 // }, 20471 // "scopes": [ 20472 // "https://www.googleapis.com/auth/display-video" 20473 // ] 20474 // } 20475 20476 } 20477 20478 // method id "displayvideo.advertisers.channels.sites.bulkEdit": 20479 20480 type AdvertisersChannelsSitesBulkEditCall struct { 20481 s *Service 20482 advertiserId int64 20483 channelId int64 20484 bulkeditsitesrequest *BulkEditSitesRequest 20485 urlParams_ gensupport.URLParams 20486 ctx_ context.Context 20487 header_ http.Header 20488 } 20489 20490 // BulkEdit: Bulk edits sites under a single channel. The operation will 20491 // delete the sites provided in BulkEditSitesRequest.deleted_sites and 20492 // then create the sites provided in BulkEditSitesRequest.created_sites. 20493 // 20494 // - advertiserId: The ID of the advertiser that owns the parent 20495 // channel. 20496 // - channelId: The ID of the parent channel to which the sites belong. 20497 func (r *AdvertisersChannelsSitesService) BulkEdit(advertiserId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *AdvertisersChannelsSitesBulkEditCall { 20498 c := &AdvertisersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20499 c.advertiserId = advertiserId 20500 c.channelId = channelId 20501 c.bulkeditsitesrequest = bulkeditsitesrequest 20502 return c 20503 } 20504 20505 // Fields allows partial responses to be retrieved. See 20506 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20507 // for more information. 20508 func (c *AdvertisersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesBulkEditCall { 20509 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20510 return c 20511 } 20512 20513 // Context sets the context to be used in this call's Do method. Any 20514 // pending HTTP request will be aborted if the provided context is 20515 // canceled. 20516 func (c *AdvertisersChannelsSitesBulkEditCall) Context(ctx context.Context) *AdvertisersChannelsSitesBulkEditCall { 20517 c.ctx_ = ctx 20518 return c 20519 } 20520 20521 // Header returns an http.Header that can be modified by the caller to 20522 // add HTTP headers to the request. 20523 func (c *AdvertisersChannelsSitesBulkEditCall) Header() http.Header { 20524 if c.header_ == nil { 20525 c.header_ = make(http.Header) 20526 } 20527 return c.header_ 20528 } 20529 20530 func (c *AdvertisersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) { 20531 reqHeaders := make(http.Header) 20532 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 20533 for k, v := range c.header_ { 20534 reqHeaders[k] = v 20535 } 20536 reqHeaders.Set("User-Agent", c.s.userAgent()) 20537 var body io.Reader = nil 20538 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditsitesrequest) 20539 if err != nil { 20540 return nil, err 20541 } 20542 reqHeaders.Set("Content-Type", "application/json") 20543 c.urlParams_.Set("alt", alt) 20544 c.urlParams_.Set("prettyPrint", "false") 20545 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit") 20546 urls += "?" + c.urlParams_.Encode() 20547 req, err := http.NewRequest("POST", urls, body) 20548 if err != nil { 20549 return nil, err 20550 } 20551 req.Header = reqHeaders 20552 googleapi.Expand(req.URL, map[string]string{ 20553 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 20554 "channelId": strconv.FormatInt(c.channelId, 10), 20555 }) 20556 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20557 } 20558 20559 // Do executes the "displayvideo.advertisers.channels.sites.bulkEdit" call. 20560 // Exactly one of *BulkEditSitesResponse or error will be non-nil. Any 20561 // non-2xx status code is an error. Response headers are in either 20562 // *BulkEditSitesResponse.ServerResponse.Header or (if a response was 20563 // returned at all) in error.(*googleapi.Error).Header. Use 20564 // googleapi.IsNotModified to check whether the returned error was 20565 // because http.StatusNotModified was returned. 20566 func (c *AdvertisersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) { 20567 gensupport.SetOptions(c.urlParams_, opts...) 20568 res, err := c.doRequest("json") 20569 if res != nil && res.StatusCode == http.StatusNotModified { 20570 if res.Body != nil { 20571 res.Body.Close() 20572 } 20573 return nil, gensupport.WrapError(&googleapi.Error{ 20574 Code: res.StatusCode, 20575 Header: res.Header, 20576 }) 20577 } 20578 if err != nil { 20579 return nil, err 20580 } 20581 defer googleapi.CloseBody(res) 20582 if err := googleapi.CheckResponse(res); err != nil { 20583 return nil, gensupport.WrapError(err) 20584 } 20585 ret := &BulkEditSitesResponse{ 20586 ServerResponse: googleapi.ServerResponse{ 20587 Header: res.Header, 20588 HTTPStatusCode: res.StatusCode, 20589 }, 20590 } 20591 target := &ret 20592 if err := gensupport.DecodeResponse(target, res); err != nil { 20593 return nil, err 20594 } 20595 return ret, nil 20596 // { 20597 // "description": "Bulk edits sites under a single channel. The operation will delete the sites provided in BulkEditSitesRequest.deleted_sites and then create the sites provided in BulkEditSitesRequest.created_sites.", 20598 // "flatPath": "v1/advertisers/{advertiserId}/channels/{channelsId}/sites:bulkEdit", 20599 // "httpMethod": "POST", 20600 // "id": "displayvideo.advertisers.channels.sites.bulkEdit", 20601 // "parameterOrder": [ 20602 // "advertiserId", 20603 // "channelId" 20604 // ], 20605 // "parameters": { 20606 // "advertiserId": { 20607 // "description": "The ID of the advertiser that owns the parent channel.", 20608 // "format": "int64", 20609 // "location": "path", 20610 // "required": true, 20611 // "type": "string" 20612 // }, 20613 // "channelId": { 20614 // "description": "Required. The ID of the parent channel to which the sites belong.", 20615 // "format": "int64", 20616 // "location": "path", 20617 // "pattern": "^[^/]+$", 20618 // "required": true, 20619 // "type": "string" 20620 // } 20621 // }, 20622 // "path": "v1/advertisers/{advertiserId}/channels/{+channelId}/sites:bulkEdit", 20623 // "request": { 20624 // "$ref": "BulkEditSitesRequest" 20625 // }, 20626 // "response": { 20627 // "$ref": "BulkEditSitesResponse" 20628 // }, 20629 // "scopes": [ 20630 // "https://www.googleapis.com/auth/display-video" 20631 // ] 20632 // } 20633 20634 } 20635 20636 // method id "displayvideo.advertisers.channels.sites.create": 20637 20638 type AdvertisersChannelsSitesCreateCall struct { 20639 s *Service 20640 advertiserId int64 20641 channelId int64 20642 site *Site 20643 urlParams_ gensupport.URLParams 20644 ctx_ context.Context 20645 header_ http.Header 20646 } 20647 20648 // Create: Creates a site in a channel. 20649 // 20650 // - advertiserId: The ID of the advertiser that owns the parent 20651 // channel. 20652 // - channelId: The ID of the parent channel in which the site will be 20653 // created. 20654 func (r *AdvertisersChannelsSitesService) Create(advertiserId int64, channelId int64, site *Site) *AdvertisersChannelsSitesCreateCall { 20655 c := &AdvertisersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20656 c.advertiserId = advertiserId 20657 c.channelId = channelId 20658 c.site = site 20659 return c 20660 } 20661 20662 // PartnerId sets the optional parameter "partnerId": The ID of the 20663 // partner that owns the parent channel. 20664 func (c *AdvertisersChannelsSitesCreateCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesCreateCall { 20665 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20666 return c 20667 } 20668 20669 // Fields allows partial responses to be retrieved. See 20670 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20671 // for more information. 20672 func (c *AdvertisersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesCreateCall { 20673 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20674 return c 20675 } 20676 20677 // Context sets the context to be used in this call's Do method. Any 20678 // pending HTTP request will be aborted if the provided context is 20679 // canceled. 20680 func (c *AdvertisersChannelsSitesCreateCall) Context(ctx context.Context) *AdvertisersChannelsSitesCreateCall { 20681 c.ctx_ = ctx 20682 return c 20683 } 20684 20685 // Header returns an http.Header that can be modified by the caller to 20686 // add HTTP headers to the request. 20687 func (c *AdvertisersChannelsSitesCreateCall) Header() http.Header { 20688 if c.header_ == nil { 20689 c.header_ = make(http.Header) 20690 } 20691 return c.header_ 20692 } 20693 20694 func (c *AdvertisersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) { 20695 reqHeaders := make(http.Header) 20696 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 20697 for k, v := range c.header_ { 20698 reqHeaders[k] = v 20699 } 20700 reqHeaders.Set("User-Agent", c.s.userAgent()) 20701 var body io.Reader = nil 20702 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site) 20703 if err != nil { 20704 return nil, err 20705 } 20706 reqHeaders.Set("Content-Type", "application/json") 20707 c.urlParams_.Set("alt", alt) 20708 c.urlParams_.Set("prettyPrint", "false") 20709 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/channels/{+channelId}/sites") 20710 urls += "?" + c.urlParams_.Encode() 20711 req, err := http.NewRequest("POST", urls, body) 20712 if err != nil { 20713 return nil, err 20714 } 20715 req.Header = reqHeaders 20716 googleapi.Expand(req.URL, map[string]string{ 20717 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 20718 "channelId": strconv.FormatInt(c.channelId, 10), 20719 }) 20720 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20721 } 20722 20723 // Do executes the "displayvideo.advertisers.channels.sites.create" call. 20724 // Exactly one of *Site or error will be non-nil. Any non-2xx status 20725 // code is an error. Response headers are in either 20726 // *Site.ServerResponse.Header or (if a response was returned at all) in 20727 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 20728 // whether the returned error was because http.StatusNotModified was 20729 // returned. 20730 func (c *AdvertisersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) { 20731 gensupport.SetOptions(c.urlParams_, opts...) 20732 res, err := c.doRequest("json") 20733 if res != nil && res.StatusCode == http.StatusNotModified { 20734 if res.Body != nil { 20735 res.Body.Close() 20736 } 20737 return nil, gensupport.WrapError(&googleapi.Error{ 20738 Code: res.StatusCode, 20739 Header: res.Header, 20740 }) 20741 } 20742 if err != nil { 20743 return nil, err 20744 } 20745 defer googleapi.CloseBody(res) 20746 if err := googleapi.CheckResponse(res); err != nil { 20747 return nil, gensupport.WrapError(err) 20748 } 20749 ret := &Site{ 20750 ServerResponse: googleapi.ServerResponse{ 20751 Header: res.Header, 20752 HTTPStatusCode: res.StatusCode, 20753 }, 20754 } 20755 target := &ret 20756 if err := gensupport.DecodeResponse(target, res); err != nil { 20757 return nil, err 20758 } 20759 return ret, nil 20760 // { 20761 // "description": "Creates a site in a channel.", 20762 // "flatPath": "v1/advertisers/{advertiserId}/channels/{channelsId}/sites", 20763 // "httpMethod": "POST", 20764 // "id": "displayvideo.advertisers.channels.sites.create", 20765 // "parameterOrder": [ 20766 // "advertiserId", 20767 // "channelId" 20768 // ], 20769 // "parameters": { 20770 // "advertiserId": { 20771 // "description": "The ID of the advertiser that owns the parent channel.", 20772 // "format": "int64", 20773 // "location": "path", 20774 // "required": true, 20775 // "type": "string" 20776 // }, 20777 // "channelId": { 20778 // "description": "Required. The ID of the parent channel in which the site will be created.", 20779 // "format": "int64", 20780 // "location": "path", 20781 // "pattern": "^[^/]+$", 20782 // "required": true, 20783 // "type": "string" 20784 // }, 20785 // "partnerId": { 20786 // "description": "The ID of the partner that owns the parent channel.", 20787 // "format": "int64", 20788 // "location": "query", 20789 // "type": "string" 20790 // } 20791 // }, 20792 // "path": "v1/advertisers/{advertiserId}/channels/{+channelId}/sites", 20793 // "request": { 20794 // "$ref": "Site" 20795 // }, 20796 // "response": { 20797 // "$ref": "Site" 20798 // }, 20799 // "scopes": [ 20800 // "https://www.googleapis.com/auth/display-video" 20801 // ] 20802 // } 20803 20804 } 20805 20806 // method id "displayvideo.advertisers.channels.sites.delete": 20807 20808 type AdvertisersChannelsSitesDeleteCall struct { 20809 s *Service 20810 advertiserId int64 20811 channelId int64 20812 urlOrAppId string 20813 urlParams_ gensupport.URLParams 20814 ctx_ context.Context 20815 header_ http.Header 20816 } 20817 20818 // Delete: Deletes a site from a channel. 20819 // 20820 // - advertiserId: The ID of the advertiser that owns the parent 20821 // channel. 20822 // - channelId: The ID of the parent channel to which the site belongs. 20823 // - urlOrAppId: The URL or app ID of the site to delete. 20824 func (r *AdvertisersChannelsSitesService) Delete(advertiserId int64, channelId int64, urlOrAppId string) *AdvertisersChannelsSitesDeleteCall { 20825 c := &AdvertisersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20826 c.advertiserId = advertiserId 20827 c.channelId = channelId 20828 c.urlOrAppId = urlOrAppId 20829 return c 20830 } 20831 20832 // PartnerId sets the optional parameter "partnerId": The ID of the 20833 // partner that owns the parent channel. 20834 func (c *AdvertisersChannelsSitesDeleteCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesDeleteCall { 20835 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20836 return c 20837 } 20838 20839 // Fields allows partial responses to be retrieved. See 20840 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20841 // for more information. 20842 func (c *AdvertisersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesDeleteCall { 20843 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20844 return c 20845 } 20846 20847 // Context sets the context to be used in this call's Do method. Any 20848 // pending HTTP request will be aborted if the provided context is 20849 // canceled. 20850 func (c *AdvertisersChannelsSitesDeleteCall) Context(ctx context.Context) *AdvertisersChannelsSitesDeleteCall { 20851 c.ctx_ = ctx 20852 return c 20853 } 20854 20855 // Header returns an http.Header that can be modified by the caller to 20856 // add HTTP headers to the request. 20857 func (c *AdvertisersChannelsSitesDeleteCall) Header() http.Header { 20858 if c.header_ == nil { 20859 c.header_ = make(http.Header) 20860 } 20861 return c.header_ 20862 } 20863 20864 func (c *AdvertisersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) { 20865 reqHeaders := make(http.Header) 20866 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 20867 for k, v := range c.header_ { 20868 reqHeaders[k] = v 20869 } 20870 reqHeaders.Set("User-Agent", c.s.userAgent()) 20871 var body io.Reader = nil 20872 c.urlParams_.Set("alt", alt) 20873 c.urlParams_.Set("prettyPrint", "false") 20874 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}") 20875 urls += "?" + c.urlParams_.Encode() 20876 req, err := http.NewRequest("DELETE", urls, body) 20877 if err != nil { 20878 return nil, err 20879 } 20880 req.Header = reqHeaders 20881 googleapi.Expand(req.URL, map[string]string{ 20882 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 20883 "channelId": strconv.FormatInt(c.channelId, 10), 20884 "urlOrAppId": c.urlOrAppId, 20885 }) 20886 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20887 } 20888 20889 // Do executes the "displayvideo.advertisers.channels.sites.delete" call. 20890 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 20891 // code is an error. Response headers are in either 20892 // *Empty.ServerResponse.Header or (if a response was returned at all) 20893 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 20894 // check whether the returned error was because http.StatusNotModified 20895 // was returned. 20896 func (c *AdvertisersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 20897 gensupport.SetOptions(c.urlParams_, opts...) 20898 res, err := c.doRequest("json") 20899 if res != nil && res.StatusCode == http.StatusNotModified { 20900 if res.Body != nil { 20901 res.Body.Close() 20902 } 20903 return nil, gensupport.WrapError(&googleapi.Error{ 20904 Code: res.StatusCode, 20905 Header: res.Header, 20906 }) 20907 } 20908 if err != nil { 20909 return nil, err 20910 } 20911 defer googleapi.CloseBody(res) 20912 if err := googleapi.CheckResponse(res); err != nil { 20913 return nil, gensupport.WrapError(err) 20914 } 20915 ret := &Empty{ 20916 ServerResponse: googleapi.ServerResponse{ 20917 Header: res.Header, 20918 HTTPStatusCode: res.StatusCode, 20919 }, 20920 } 20921 target := &ret 20922 if err := gensupport.DecodeResponse(target, res); err != nil { 20923 return nil, err 20924 } 20925 return ret, nil 20926 // { 20927 // "description": "Deletes a site from a channel.", 20928 // "flatPath": "v1/advertisers/{advertiserId}/channels/{channelsId}/sites/{sitesId}", 20929 // "httpMethod": "DELETE", 20930 // "id": "displayvideo.advertisers.channels.sites.delete", 20931 // "parameterOrder": [ 20932 // "advertiserId", 20933 // "channelId", 20934 // "urlOrAppId" 20935 // ], 20936 // "parameters": { 20937 // "advertiserId": { 20938 // "description": "The ID of the advertiser that owns the parent channel.", 20939 // "format": "int64", 20940 // "location": "path", 20941 // "required": true, 20942 // "type": "string" 20943 // }, 20944 // "channelId": { 20945 // "description": "Required. The ID of the parent channel to which the site belongs.", 20946 // "format": "int64", 20947 // "location": "path", 20948 // "pattern": "^[^/]+$", 20949 // "required": true, 20950 // "type": "string" 20951 // }, 20952 // "partnerId": { 20953 // "description": "The ID of the partner that owns the parent channel.", 20954 // "format": "int64", 20955 // "location": "query", 20956 // "type": "string" 20957 // }, 20958 // "urlOrAppId": { 20959 // "description": "Required. The URL or app ID of the site to delete.", 20960 // "location": "path", 20961 // "pattern": "^[^/]+$", 20962 // "required": true, 20963 // "type": "string" 20964 // } 20965 // }, 20966 // "path": "v1/advertisers/{advertiserId}/channels/{+channelId}/sites/{+urlOrAppId}", 20967 // "response": { 20968 // "$ref": "Empty" 20969 // }, 20970 // "scopes": [ 20971 // "https://www.googleapis.com/auth/display-video" 20972 // ] 20973 // } 20974 20975 } 20976 20977 // method id "displayvideo.advertisers.channels.sites.list": 20978 20979 type AdvertisersChannelsSitesListCall struct { 20980 s *Service 20981 advertiserId int64 20982 channelId int64 20983 urlParams_ gensupport.URLParams 20984 ifNoneMatch_ string 20985 ctx_ context.Context 20986 header_ http.Header 20987 } 20988 20989 // List: Lists sites in a channel. 20990 // 20991 // - advertiserId: The ID of the advertiser that owns the parent 20992 // channel. 20993 // - channelId: The ID of the parent channel to which the requested 20994 // sites belong. 20995 func (r *AdvertisersChannelsSitesService) List(advertiserId int64, channelId int64) *AdvertisersChannelsSitesListCall { 20996 c := &AdvertisersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20997 c.advertiserId = advertiserId 20998 c.channelId = channelId 20999 return c 21000 } 21001 21002 // Filter sets the optional parameter "filter": Allows filtering by site 21003 // fields. Supported syntax: * Filter expressions for site retrieval can 21004 // only contain at most one restriction. * A restriction has the form of 21005 // `{field} {operator} {value}`. * All fields must use the `HAS (:)` 21006 // operator. Supported fields: * `urlOrAppId` Examples: * All sites for 21007 // which the URL or app ID contains "google": `urlOrAppId : "google" 21008 // The length of this field should be no more than 500 characters. 21009 // Reference our filter `LIST` requests 21010 // (/display-video/api/guides/how-tos/filters) guide for more 21011 // information. 21012 func (c *AdvertisersChannelsSitesListCall) Filter(filter string) *AdvertisersChannelsSitesListCall { 21013 c.urlParams_.Set("filter", filter) 21014 return c 21015 } 21016 21017 // OrderBy sets the optional parameter "orderBy": Field by which to sort 21018 // the list. Acceptable values are: * `urlOrAppId` (default) The default 21019 // sorting order is ascending. To specify descending order for a field, 21020 // a suffix " desc" should be added to the field name. Example: 21021 // `urlOrAppId desc`. 21022 func (c *AdvertisersChannelsSitesListCall) OrderBy(orderBy string) *AdvertisersChannelsSitesListCall { 21023 c.urlParams_.Set("orderBy", orderBy) 21024 return c 21025 } 21026 21027 // PageSize sets the optional parameter "pageSize": Requested page size. 21028 // Must be between `1` and `10000`. If unspecified will default to 21029 // `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is 21030 // specified. 21031 func (c *AdvertisersChannelsSitesListCall) PageSize(pageSize int64) *AdvertisersChannelsSitesListCall { 21032 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21033 return c 21034 } 21035 21036 // PageToken sets the optional parameter "pageToken": A token 21037 // identifying a page of results the server should return. Typically, 21038 // this is the value of next_page_token returned from the previous call 21039 // to `ListSites` method. If not specified, the first page of results 21040 // will be returned. 21041 func (c *AdvertisersChannelsSitesListCall) PageToken(pageToken string) *AdvertisersChannelsSitesListCall { 21042 c.urlParams_.Set("pageToken", pageToken) 21043 return c 21044 } 21045 21046 // PartnerId sets the optional parameter "partnerId": The ID of the 21047 // partner that owns the parent channel. 21048 func (c *AdvertisersChannelsSitesListCall) PartnerId(partnerId int64) *AdvertisersChannelsSitesListCall { 21049 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 21050 return c 21051 } 21052 21053 // Fields allows partial responses to be retrieved. See 21054 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21055 // for more information. 21056 func (c *AdvertisersChannelsSitesListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesListCall { 21057 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21058 return c 21059 } 21060 21061 // IfNoneMatch sets the optional parameter which makes the operation 21062 // fail if the object's ETag matches the given value. This is useful for 21063 // getting updates only after the object has changed since the last 21064 // request. Use googleapi.IsNotModified to check whether the response 21065 // error from Do is the result of In-None-Match. 21066 func (c *AdvertisersChannelsSitesListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsSitesListCall { 21067 c.ifNoneMatch_ = entityTag 21068 return c 21069 } 21070 21071 // Context sets the context to be used in this call's Do method. Any 21072 // pending HTTP request will be aborted if the provided context is 21073 // canceled. 21074 func (c *AdvertisersChannelsSitesListCall) Context(ctx context.Context) *AdvertisersChannelsSitesListCall { 21075 c.ctx_ = ctx 21076 return c 21077 } 21078 21079 // Header returns an http.Header that can be modified by the caller to 21080 // add HTTP headers to the request. 21081 func (c *AdvertisersChannelsSitesListCall) Header() http.Header { 21082 if c.header_ == nil { 21083 c.header_ = make(http.Header) 21084 } 21085 return c.header_ 21086 } 21087 21088 func (c *AdvertisersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) { 21089 reqHeaders := make(http.Header) 21090 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 21091 for k, v := range c.header_ { 21092 reqHeaders[k] = v 21093 } 21094 reqHeaders.Set("User-Agent", c.s.userAgent()) 21095 if c.ifNoneMatch_ != "" { 21096 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21097 } 21098 var body io.Reader = nil 21099 c.urlParams_.Set("alt", alt) 21100 c.urlParams_.Set("prettyPrint", "false") 21101 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels/{+channelId}/sites") 21102 urls += "?" + c.urlParams_.Encode() 21103 req, err := http.NewRequest("GET", urls, body) 21104 if err != nil { 21105 return nil, err 21106 } 21107 req.Header = reqHeaders 21108 googleapi.Expand(req.URL, map[string]string{ 21109 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 21110 "channelId": strconv.FormatInt(c.channelId, 10), 21111 }) 21112 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21113 } 21114 21115 // Do executes the "displayvideo.advertisers.channels.sites.list" call. 21116 // Exactly one of *ListSitesResponse or error will be non-nil. Any 21117 // non-2xx status code is an error. Response headers are in either 21118 // *ListSitesResponse.ServerResponse.Header or (if a response was 21119 // returned at all) in error.(*googleapi.Error).Header. Use 21120 // googleapi.IsNotModified to check whether the returned error was 21121 // because http.StatusNotModified was returned. 21122 func (c *AdvertisersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) { 21123 gensupport.SetOptions(c.urlParams_, opts...) 21124 res, err := c.doRequest("json") 21125 if res != nil && res.StatusCode == http.StatusNotModified { 21126 if res.Body != nil { 21127 res.Body.Close() 21128 } 21129 return nil, gensupport.WrapError(&googleapi.Error{ 21130 Code: res.StatusCode, 21131 Header: res.Header, 21132 }) 21133 } 21134 if err != nil { 21135 return nil, err 21136 } 21137 defer googleapi.CloseBody(res) 21138 if err := googleapi.CheckResponse(res); err != nil { 21139 return nil, gensupport.WrapError(err) 21140 } 21141 ret := &ListSitesResponse{ 21142 ServerResponse: googleapi.ServerResponse{ 21143 Header: res.Header, 21144 HTTPStatusCode: res.StatusCode, 21145 }, 21146 } 21147 target := &ret 21148 if err := gensupport.DecodeResponse(target, res); err != nil { 21149 return nil, err 21150 } 21151 return ret, nil 21152 // { 21153 // "description": "Lists sites in a channel.", 21154 // "flatPath": "v1/advertisers/{advertisersId}/channels/{channelsId}/sites", 21155 // "httpMethod": "GET", 21156 // "id": "displayvideo.advertisers.channels.sites.list", 21157 // "parameterOrder": [ 21158 // "advertiserId", 21159 // "channelId" 21160 // ], 21161 // "parameters": { 21162 // "advertiserId": { 21163 // "description": "The ID of the advertiser that owns the parent channel.", 21164 // "format": "int64", 21165 // "location": "path", 21166 // "pattern": "^[^/]+$", 21167 // "required": true, 21168 // "type": "string" 21169 // }, 21170 // "channelId": { 21171 // "description": "Required. The ID of the parent channel to which the requested sites belong.", 21172 // "format": "int64", 21173 // "location": "path", 21174 // "pattern": "^[^/]+$", 21175 // "required": true, 21176 // "type": "string" 21177 // }, 21178 // "filter": { 21179 // "description": "Allows filtering by site fields. Supported syntax: * Filter expressions for site retrieval can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID contains \"google\": `urlOrAppId : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 21180 // "location": "query", 21181 // "type": "string" 21182 // }, 21183 // "orderBy": { 21184 // "description": "Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `urlOrAppId desc`.", 21185 // "location": "query", 21186 // "type": "string" 21187 // }, 21188 // "pageSize": { 21189 // "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 21190 // "format": "int32", 21191 // "location": "query", 21192 // "type": "integer" 21193 // }, 21194 // "pageToken": { 21195 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned.", 21196 // "location": "query", 21197 // "type": "string" 21198 // }, 21199 // "partnerId": { 21200 // "description": "The ID of the partner that owns the parent channel.", 21201 // "format": "int64", 21202 // "location": "query", 21203 // "type": "string" 21204 // } 21205 // }, 21206 // "path": "v1/advertisers/{+advertiserId}/channels/{+channelId}/sites", 21207 // "response": { 21208 // "$ref": "ListSitesResponse" 21209 // }, 21210 // "scopes": [ 21211 // "https://www.googleapis.com/auth/display-video" 21212 // ] 21213 // } 21214 21215 } 21216 21217 // Pages invokes f for each page of results. 21218 // A non-nil error returned from f will halt the iteration. 21219 // The provided context supersedes any context provided to the Context method. 21220 func (c *AdvertisersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error { 21221 c.ctx_ = ctx 21222 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21223 for { 21224 x, err := c.Do() 21225 if err != nil { 21226 return err 21227 } 21228 if err := f(x); err != nil { 21229 return err 21230 } 21231 if x.NextPageToken == "" { 21232 return nil 21233 } 21234 c.PageToken(x.NextPageToken) 21235 } 21236 } 21237 21238 // method id "displayvideo.advertisers.channels.sites.replace": 21239 21240 type AdvertisersChannelsSitesReplaceCall struct { 21241 s *Service 21242 advertiserId int64 21243 channelId int64 21244 replacesitesrequest *ReplaceSitesRequest 21245 urlParams_ gensupport.URLParams 21246 ctx_ context.Context 21247 header_ http.Header 21248 } 21249 21250 // Replace: Replaces all of the sites under a single channel. The 21251 // operation will replace the sites under a channel with the sites 21252 // provided in ReplaceSitesRequest.new_sites. 21253 // 21254 // - advertiserId: The ID of the advertiser that owns the parent 21255 // channel. 21256 // - channelId: The ID of the parent channel whose sites will be 21257 // replaced. 21258 func (r *AdvertisersChannelsSitesService) Replace(advertiserId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *AdvertisersChannelsSitesReplaceCall { 21259 c := &AdvertisersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21260 c.advertiserId = advertiserId 21261 c.channelId = channelId 21262 c.replacesitesrequest = replacesitesrequest 21263 return c 21264 } 21265 21266 // Fields allows partial responses to be retrieved. See 21267 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21268 // for more information. 21269 func (c *AdvertisersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *AdvertisersChannelsSitesReplaceCall { 21270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21271 return c 21272 } 21273 21274 // Context sets the context to be used in this call's Do method. Any 21275 // pending HTTP request will be aborted if the provided context is 21276 // canceled. 21277 func (c *AdvertisersChannelsSitesReplaceCall) Context(ctx context.Context) *AdvertisersChannelsSitesReplaceCall { 21278 c.ctx_ = ctx 21279 return c 21280 } 21281 21282 // Header returns an http.Header that can be modified by the caller to 21283 // add HTTP headers to the request. 21284 func (c *AdvertisersChannelsSitesReplaceCall) Header() http.Header { 21285 if c.header_ == nil { 21286 c.header_ = make(http.Header) 21287 } 21288 return c.header_ 21289 } 21290 21291 func (c *AdvertisersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) { 21292 reqHeaders := make(http.Header) 21293 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 21294 for k, v := range c.header_ { 21295 reqHeaders[k] = v 21296 } 21297 reqHeaders.Set("User-Agent", c.s.userAgent()) 21298 var body io.Reader = nil 21299 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacesitesrequest) 21300 if err != nil { 21301 return nil, err 21302 } 21303 reqHeaders.Set("Content-Type", "application/json") 21304 c.urlParams_.Set("alt", alt) 21305 c.urlParams_.Set("prettyPrint", "false") 21306 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/channels/{+channelId}/sites:replace") 21307 urls += "?" + c.urlParams_.Encode() 21308 req, err := http.NewRequest("POST", urls, body) 21309 if err != nil { 21310 return nil, err 21311 } 21312 req.Header = reqHeaders 21313 googleapi.Expand(req.URL, map[string]string{ 21314 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 21315 "channelId": strconv.FormatInt(c.channelId, 10), 21316 }) 21317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21318 } 21319 21320 // Do executes the "displayvideo.advertisers.channels.sites.replace" call. 21321 // Exactly one of *ReplaceSitesResponse or error will be non-nil. Any 21322 // non-2xx status code is an error. Response headers are in either 21323 // *ReplaceSitesResponse.ServerResponse.Header or (if a response was 21324 // returned at all) in error.(*googleapi.Error).Header. Use 21325 // googleapi.IsNotModified to check whether the returned error was 21326 // because http.StatusNotModified was returned. 21327 func (c *AdvertisersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) { 21328 gensupport.SetOptions(c.urlParams_, opts...) 21329 res, err := c.doRequest("json") 21330 if res != nil && res.StatusCode == http.StatusNotModified { 21331 if res.Body != nil { 21332 res.Body.Close() 21333 } 21334 return nil, gensupport.WrapError(&googleapi.Error{ 21335 Code: res.StatusCode, 21336 Header: res.Header, 21337 }) 21338 } 21339 if err != nil { 21340 return nil, err 21341 } 21342 defer googleapi.CloseBody(res) 21343 if err := googleapi.CheckResponse(res); err != nil { 21344 return nil, gensupport.WrapError(err) 21345 } 21346 ret := &ReplaceSitesResponse{ 21347 ServerResponse: googleapi.ServerResponse{ 21348 Header: res.Header, 21349 HTTPStatusCode: res.StatusCode, 21350 }, 21351 } 21352 target := &ret 21353 if err := gensupport.DecodeResponse(target, res); err != nil { 21354 return nil, err 21355 } 21356 return ret, nil 21357 // { 21358 // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", 21359 // "flatPath": "v1/advertisers/{advertiserId}/channels/{channelsId}/sites:replace", 21360 // "httpMethod": "POST", 21361 // "id": "displayvideo.advertisers.channels.sites.replace", 21362 // "parameterOrder": [ 21363 // "advertiserId", 21364 // "channelId" 21365 // ], 21366 // "parameters": { 21367 // "advertiserId": { 21368 // "description": "The ID of the advertiser that owns the parent channel.", 21369 // "format": "int64", 21370 // "location": "path", 21371 // "required": true, 21372 // "type": "string" 21373 // }, 21374 // "channelId": { 21375 // "description": "Required. The ID of the parent channel whose sites will be replaced.", 21376 // "format": "int64", 21377 // "location": "path", 21378 // "pattern": "^[^/]+$", 21379 // "required": true, 21380 // "type": "string" 21381 // } 21382 // }, 21383 // "path": "v1/advertisers/{advertiserId}/channels/{+channelId}/sites:replace", 21384 // "request": { 21385 // "$ref": "ReplaceSitesRequest" 21386 // }, 21387 // "response": { 21388 // "$ref": "ReplaceSitesResponse" 21389 // }, 21390 // "scopes": [ 21391 // "https://www.googleapis.com/auth/display-video" 21392 // ] 21393 // } 21394 21395 } 21396 21397 // method id "displayvideo.advertisers.creatives.create": 21398 21399 type AdvertisersCreativesCreateCall struct { 21400 s *Service 21401 advertiserId int64 21402 creative *Creative 21403 urlParams_ gensupport.URLParams 21404 ctx_ context.Context 21405 header_ http.Header 21406 } 21407 21408 // Create: Creates a new creative. Returns the newly created creative if 21409 // successful. A "Standard" user role 21410 // (//support.google.com/displayvideo/answer/2723011) or greater for the 21411 // parent advertiser or partner is required to make this request. 21412 // 21413 // - advertiserId: Output only. The unique ID of the advertiser the 21414 // creative belongs to. 21415 func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall { 21416 c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21417 c.advertiserId = advertiserId 21418 c.creative = creative 21419 return c 21420 } 21421 21422 // Fields allows partial responses to be retrieved. See 21423 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21424 // for more information. 21425 func (c *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall { 21426 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21427 return c 21428 } 21429 21430 // Context sets the context to be used in this call's Do method. Any 21431 // pending HTTP request will be aborted if the provided context is 21432 // canceled. 21433 func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall { 21434 c.ctx_ = ctx 21435 return c 21436 } 21437 21438 // Header returns an http.Header that can be modified by the caller to 21439 // add HTTP headers to the request. 21440 func (c *AdvertisersCreativesCreateCall) Header() http.Header { 21441 if c.header_ == nil { 21442 c.header_ = make(http.Header) 21443 } 21444 return c.header_ 21445 } 21446 21447 func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) { 21448 reqHeaders := make(http.Header) 21449 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 21450 for k, v := range c.header_ { 21451 reqHeaders[k] = v 21452 } 21453 reqHeaders.Set("User-Agent", c.s.userAgent()) 21454 var body io.Reader = nil 21455 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 21456 if err != nil { 21457 return nil, err 21458 } 21459 reqHeaders.Set("Content-Type", "application/json") 21460 c.urlParams_.Set("alt", alt) 21461 c.urlParams_.Set("prettyPrint", "false") 21462 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives") 21463 urls += "?" + c.urlParams_.Encode() 21464 req, err := http.NewRequest("POST", urls, body) 21465 if err != nil { 21466 return nil, err 21467 } 21468 req.Header = reqHeaders 21469 googleapi.Expand(req.URL, map[string]string{ 21470 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 21471 }) 21472 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21473 } 21474 21475 // Do executes the "displayvideo.advertisers.creatives.create" call. 21476 // Exactly one of *Creative or error will be non-nil. Any non-2xx status 21477 // code is an error. Response headers are in either 21478 // *Creative.ServerResponse.Header or (if a response was returned at 21479 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 21480 // to check whether the returned error was because 21481 // http.StatusNotModified was returned. 21482 func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 21483 gensupport.SetOptions(c.urlParams_, opts...) 21484 res, err := c.doRequest("json") 21485 if res != nil && res.StatusCode == http.StatusNotModified { 21486 if res.Body != nil { 21487 res.Body.Close() 21488 } 21489 return nil, gensupport.WrapError(&googleapi.Error{ 21490 Code: res.StatusCode, 21491 Header: res.Header, 21492 }) 21493 } 21494 if err != nil { 21495 return nil, err 21496 } 21497 defer googleapi.CloseBody(res) 21498 if err := googleapi.CheckResponse(res); err != nil { 21499 return nil, gensupport.WrapError(err) 21500 } 21501 ret := &Creative{ 21502 ServerResponse: googleapi.ServerResponse{ 21503 Header: res.Header, 21504 HTTPStatusCode: res.StatusCode, 21505 }, 21506 } 21507 target := &ret 21508 if err := gensupport.DecodeResponse(target, res); err != nil { 21509 return nil, err 21510 } 21511 return ret, nil 21512 // { 21513 // "description": "Creates a new creative. Returns the newly created creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", 21514 // "flatPath": "v1/advertisers/{advertisersId}/creatives", 21515 // "httpMethod": "POST", 21516 // "id": "displayvideo.advertisers.creatives.create", 21517 // "parameterOrder": [ 21518 // "advertiserId" 21519 // ], 21520 // "parameters": { 21521 // "advertiserId": { 21522 // "description": "Output only. The unique ID of the advertiser the creative belongs to.", 21523 // "format": "int64", 21524 // "location": "path", 21525 // "pattern": "^[^/]+$", 21526 // "required": true, 21527 // "type": "string" 21528 // } 21529 // }, 21530 // "path": "v1/advertisers/{+advertiserId}/creatives", 21531 // "request": { 21532 // "$ref": "Creative" 21533 // }, 21534 // "response": { 21535 // "$ref": "Creative" 21536 // }, 21537 // "scopes": [ 21538 // "https://www.googleapis.com/auth/display-video" 21539 // ] 21540 // } 21541 21542 } 21543 21544 // method id "displayvideo.advertisers.creatives.delete": 21545 21546 type AdvertisersCreativesDeleteCall struct { 21547 s *Service 21548 advertiserId int64 21549 creativeId int64 21550 urlParams_ gensupport.URLParams 21551 ctx_ context.Context 21552 header_ http.Header 21553 } 21554 21555 // Delete: Deletes a creative. Returns error code `NOT_FOUND` if the 21556 // creative does not exist. The creative should be archived first, i.e. 21557 // set entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be 21558 // deleted. A "Standard" user role 21559 // (//support.google.com/displayvideo/answer/2723011) or greater for the 21560 // parent advertiser or partner is required to make this request. 21561 // 21562 // - advertiserId: The ID of the advertiser this creative belongs to. 21563 // - creativeId: The ID of the creative to be deleted. 21564 func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall { 21565 c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21566 c.advertiserId = advertiserId 21567 c.creativeId = creativeId 21568 return c 21569 } 21570 21571 // Fields allows partial responses to be retrieved. See 21572 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21573 // for more information. 21574 func (c *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall { 21575 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21576 return c 21577 } 21578 21579 // Context sets the context to be used in this call's Do method. Any 21580 // pending HTTP request will be aborted if the provided context is 21581 // canceled. 21582 func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall { 21583 c.ctx_ = ctx 21584 return c 21585 } 21586 21587 // Header returns an http.Header that can be modified by the caller to 21588 // add HTTP headers to the request. 21589 func (c *AdvertisersCreativesDeleteCall) Header() http.Header { 21590 if c.header_ == nil { 21591 c.header_ = make(http.Header) 21592 } 21593 return c.header_ 21594 } 21595 21596 func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) { 21597 reqHeaders := make(http.Header) 21598 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 21599 for k, v := range c.header_ { 21600 reqHeaders[k] = v 21601 } 21602 reqHeaders.Set("User-Agent", c.s.userAgent()) 21603 var body io.Reader = nil 21604 c.urlParams_.Set("alt", alt) 21605 c.urlParams_.Set("prettyPrint", "false") 21606 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives/{+creativeId}") 21607 urls += "?" + c.urlParams_.Encode() 21608 req, err := http.NewRequest("DELETE", urls, body) 21609 if err != nil { 21610 return nil, err 21611 } 21612 req.Header = reqHeaders 21613 googleapi.Expand(req.URL, map[string]string{ 21614 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 21615 "creativeId": strconv.FormatInt(c.creativeId, 10), 21616 }) 21617 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21618 } 21619 21620 // Do executes the "displayvideo.advertisers.creatives.delete" call. 21621 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 21622 // code is an error. Response headers are in either 21623 // *Empty.ServerResponse.Header or (if a response was returned at all) 21624 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 21625 // check whether the returned error was because http.StatusNotModified 21626 // was returned. 21627 func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 21628 gensupport.SetOptions(c.urlParams_, opts...) 21629 res, err := c.doRequest("json") 21630 if res != nil && res.StatusCode == http.StatusNotModified { 21631 if res.Body != nil { 21632 res.Body.Close() 21633 } 21634 return nil, gensupport.WrapError(&googleapi.Error{ 21635 Code: res.StatusCode, 21636 Header: res.Header, 21637 }) 21638 } 21639 if err != nil { 21640 return nil, err 21641 } 21642 defer googleapi.CloseBody(res) 21643 if err := googleapi.CheckResponse(res); err != nil { 21644 return nil, gensupport.WrapError(err) 21645 } 21646 ret := &Empty{ 21647 ServerResponse: googleapi.ServerResponse{ 21648 Header: res.Header, 21649 HTTPStatusCode: res.StatusCode, 21650 }, 21651 } 21652 target := &ret 21653 if err := gensupport.DecodeResponse(target, res); err != nil { 21654 return nil, err 21655 } 21656 return ret, nil 21657 // { 21658 // "description": "Deletes a creative. Returns error code `NOT_FOUND` if the creative does not exist. The creative should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, before it can be deleted. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", 21659 // "flatPath": "v1/advertisers/{advertisersId}/creatives/{creativesId}", 21660 // "httpMethod": "DELETE", 21661 // "id": "displayvideo.advertisers.creatives.delete", 21662 // "parameterOrder": [ 21663 // "advertiserId", 21664 // "creativeId" 21665 // ], 21666 // "parameters": { 21667 // "advertiserId": { 21668 // "description": "The ID of the advertiser this creative belongs to.", 21669 // "format": "int64", 21670 // "location": "path", 21671 // "pattern": "^[^/]+$", 21672 // "required": true, 21673 // "type": "string" 21674 // }, 21675 // "creativeId": { 21676 // "description": "The ID of the creative to be deleted.", 21677 // "format": "int64", 21678 // "location": "path", 21679 // "pattern": "^[^/]+$", 21680 // "required": true, 21681 // "type": "string" 21682 // } 21683 // }, 21684 // "path": "v1/advertisers/{+advertiserId}/creatives/{+creativeId}", 21685 // "response": { 21686 // "$ref": "Empty" 21687 // }, 21688 // "scopes": [ 21689 // "https://www.googleapis.com/auth/display-video" 21690 // ] 21691 // } 21692 21693 } 21694 21695 // method id "displayvideo.advertisers.creatives.get": 21696 21697 type AdvertisersCreativesGetCall struct { 21698 s *Service 21699 advertiserId int64 21700 creativeId int64 21701 urlParams_ gensupport.URLParams 21702 ifNoneMatch_ string 21703 ctx_ context.Context 21704 header_ http.Header 21705 } 21706 21707 // Get: Gets a creative. 21708 // 21709 // - advertiserId: The ID of the advertiser this creative belongs to. 21710 // - creativeId: The ID of the creative to fetch. 21711 func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall { 21712 c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21713 c.advertiserId = advertiserId 21714 c.creativeId = creativeId 21715 return c 21716 } 21717 21718 // Fields allows partial responses to be retrieved. See 21719 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21720 // for more information. 21721 func (c *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall { 21722 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21723 return c 21724 } 21725 21726 // IfNoneMatch sets the optional parameter which makes the operation 21727 // fail if the object's ETag matches the given value. This is useful for 21728 // getting updates only after the object has changed since the last 21729 // request. Use googleapi.IsNotModified to check whether the response 21730 // error from Do is the result of In-None-Match. 21731 func (c *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall { 21732 c.ifNoneMatch_ = entityTag 21733 return c 21734 } 21735 21736 // Context sets the context to be used in this call's Do method. Any 21737 // pending HTTP request will be aborted if the provided context is 21738 // canceled. 21739 func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall { 21740 c.ctx_ = ctx 21741 return c 21742 } 21743 21744 // Header returns an http.Header that can be modified by the caller to 21745 // add HTTP headers to the request. 21746 func (c *AdvertisersCreativesGetCall) Header() http.Header { 21747 if c.header_ == nil { 21748 c.header_ = make(http.Header) 21749 } 21750 return c.header_ 21751 } 21752 21753 func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) { 21754 reqHeaders := make(http.Header) 21755 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 21756 for k, v := range c.header_ { 21757 reqHeaders[k] = v 21758 } 21759 reqHeaders.Set("User-Agent", c.s.userAgent()) 21760 if c.ifNoneMatch_ != "" { 21761 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21762 } 21763 var body io.Reader = nil 21764 c.urlParams_.Set("alt", alt) 21765 c.urlParams_.Set("prettyPrint", "false") 21766 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives/{+creativeId}") 21767 urls += "?" + c.urlParams_.Encode() 21768 req, err := http.NewRequest("GET", urls, body) 21769 if err != nil { 21770 return nil, err 21771 } 21772 req.Header = reqHeaders 21773 googleapi.Expand(req.URL, map[string]string{ 21774 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 21775 "creativeId": strconv.FormatInt(c.creativeId, 10), 21776 }) 21777 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21778 } 21779 21780 // Do executes the "displayvideo.advertisers.creatives.get" call. 21781 // Exactly one of *Creative or error will be non-nil. Any non-2xx status 21782 // code is an error. Response headers are in either 21783 // *Creative.ServerResponse.Header or (if a response was returned at 21784 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 21785 // to check whether the returned error was because 21786 // http.StatusNotModified was returned. 21787 func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 21788 gensupport.SetOptions(c.urlParams_, opts...) 21789 res, err := c.doRequest("json") 21790 if res != nil && res.StatusCode == http.StatusNotModified { 21791 if res.Body != nil { 21792 res.Body.Close() 21793 } 21794 return nil, gensupport.WrapError(&googleapi.Error{ 21795 Code: res.StatusCode, 21796 Header: res.Header, 21797 }) 21798 } 21799 if err != nil { 21800 return nil, err 21801 } 21802 defer googleapi.CloseBody(res) 21803 if err := googleapi.CheckResponse(res); err != nil { 21804 return nil, gensupport.WrapError(err) 21805 } 21806 ret := &Creative{ 21807 ServerResponse: googleapi.ServerResponse{ 21808 Header: res.Header, 21809 HTTPStatusCode: res.StatusCode, 21810 }, 21811 } 21812 target := &ret 21813 if err := gensupport.DecodeResponse(target, res); err != nil { 21814 return nil, err 21815 } 21816 return ret, nil 21817 // { 21818 // "description": "Gets a creative.", 21819 // "flatPath": "v1/advertisers/{advertisersId}/creatives/{creativesId}", 21820 // "httpMethod": "GET", 21821 // "id": "displayvideo.advertisers.creatives.get", 21822 // "parameterOrder": [ 21823 // "advertiserId", 21824 // "creativeId" 21825 // ], 21826 // "parameters": { 21827 // "advertiserId": { 21828 // "description": "Required. The ID of the advertiser this creative belongs to.", 21829 // "format": "int64", 21830 // "location": "path", 21831 // "pattern": "^[^/]+$", 21832 // "required": true, 21833 // "type": "string" 21834 // }, 21835 // "creativeId": { 21836 // "description": "Required. The ID of the creative to fetch.", 21837 // "format": "int64", 21838 // "location": "path", 21839 // "pattern": "^[^/]+$", 21840 // "required": true, 21841 // "type": "string" 21842 // } 21843 // }, 21844 // "path": "v1/advertisers/{+advertiserId}/creatives/{+creativeId}", 21845 // "response": { 21846 // "$ref": "Creative" 21847 // }, 21848 // "scopes": [ 21849 // "https://www.googleapis.com/auth/display-video" 21850 // ] 21851 // } 21852 21853 } 21854 21855 // method id "displayvideo.advertisers.creatives.list": 21856 21857 type AdvertisersCreativesListCall struct { 21858 s *Service 21859 advertiserId int64 21860 urlParams_ gensupport.URLParams 21861 ifNoneMatch_ string 21862 ctx_ context.Context 21863 header_ http.Header 21864 } 21865 21866 // List: Lists creatives in an advertiser. The order is defined by the 21867 // order_by parameter. If a filter by entity_status is not specified, 21868 // creatives with `ENTITY_STATUS_ARCHIVED` will not be included in the 21869 // results. 21870 // 21871 // - advertiserId: The ID of the advertiser to list creatives for. 21872 func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall { 21873 c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21874 c.advertiserId = advertiserId 21875 return c 21876 } 21877 21878 // Filter sets the optional parameter "filter": Allows filtering by 21879 // creative fields. Supported syntax: * Filter expressions are made up 21880 // of one or more restrictions. * Restrictions can be combined by `AND` 21881 // or `OR` logical operators. A sequence of restrictions implicitly uses 21882 // `AND`. * A restriction has the form of `{field} {operator} {value}`. 21883 // * The `lineItemIds` field must use the `HAS (:)` operator. * The 21884 // `updateTime` field must use the `GREATER THAN OR EQUAL TO (>=)` or 21885 // `LESS THAN OR EQUAL TO (<=)` operators. * All other fields must use 21886 // the `EQUALS (=)` operator. * For `entityStatus`, `minDuration`, 21887 // `maxDuration`, `updateTime`, and `dynamic` fields, there may be at 21888 // most one restriction. Supported Fields: * `approvalStatus` * 21889 // `creativeId` * `creativeType` * `dimensions` (input in the form of 21890 // `{width}x{height}`) * `dynamic` * `entityStatus` * 21891 // `exchangeReviewStatus` (input in the form of 21892 // `{exchange}-{reviewStatus}`) * `lineItemIds` * `maxDuration` (input 21893 // in the form of `{duration}s`. Only seconds are supported) * 21894 // `minDuration` (input in the form of `{duration}s`. Only seconds are 21895 // supported) * `updateTime` (input in ISO 8601 format, or 21896 // `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative 21897 // resource's field value reflects the last time that a creative has 21898 // been updated, which includes updates made by the system (e.g. 21899 // creative review updates). Examples: * All native creatives: 21900 // `creativeType="CREATIVE_TYPE_NATIVE" * All active creatives with 21901 // 300x400 or 50x100 dimensions: `entityStatus="ENTITY_STATUS_ACTIVE" 21902 // AND (dimensions="300x400" OR dimensions="50x100")` * All dynamic 21903 // creatives that are approved by AdX or AppNexus, with a minimum 21904 // duration of 5 seconds and 200ms: `dynamic="true" AND 21905 // minDuration="5.2s" AND 21906 // (exchangeReviewStatus="EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROV 21907 // ED" OR 21908 // exchangeReviewStatus="EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED")` * 21909 // All video creatives that are associated with line item ID 1 or 2: 21910 // `creativeType="CREATIVE_TYPE_VIDEO" AND (lineItemIds:1 OR 21911 // lineItemIds:2)` * Find creatives by multiple creative IDs: 21912 // `creativeId=1 OR creativeId=2` * All creatives with an update time 21913 // greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): 21914 // `updateTime>="2020-11-04T18:54:47Z" The length of this field should 21915 // be no more than 500 characters. Reference our filter `LIST` requests 21916 // (/display-video/api/guides/how-tos/filters) guide for more 21917 // information. 21918 func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall { 21919 c.urlParams_.Set("filter", filter) 21920 return c 21921 } 21922 21923 // OrderBy sets the optional parameter "orderBy": Field by which to sort 21924 // the list. Acceptable values are: * `creativeId` (default) * 21925 // `createTime` * `mediaDuration` * `dimensions` (sorts by width first, 21926 // then by height) The default sorting order is ascending. To specify 21927 // descending order for a field, a suffix "desc" should be added to the 21928 // field name. Example: `createTime desc`. 21929 func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall { 21930 c.urlParams_.Set("orderBy", orderBy) 21931 return c 21932 } 21933 21934 // PageSize sets the optional parameter "pageSize": Requested page size. 21935 // Must be between `1` and `200`. If unspecified will default to `100`. 21936 // Returns error code `INVALID_ARGUMENT` if an invalid value is 21937 // specified. 21938 func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { 21939 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21940 return c 21941 } 21942 21943 // PageToken sets the optional parameter "pageToken": A token 21944 // identifying a page of results the server should return. Typically, 21945 // this is the value of next_page_token returned from the previous call 21946 // to `ListCreatives` method. If not specified, the first page of 21947 // results will be returned. 21948 func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall { 21949 c.urlParams_.Set("pageToken", pageToken) 21950 return c 21951 } 21952 21953 // Fields allows partial responses to be retrieved. See 21954 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21955 // for more information. 21956 func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall { 21957 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21958 return c 21959 } 21960 21961 // IfNoneMatch sets the optional parameter which makes the operation 21962 // fail if the object's ETag matches the given value. This is useful for 21963 // getting updates only after the object has changed since the last 21964 // request. Use googleapi.IsNotModified to check whether the response 21965 // error from Do is the result of In-None-Match. 21966 func (c *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall { 21967 c.ifNoneMatch_ = entityTag 21968 return c 21969 } 21970 21971 // Context sets the context to be used in this call's Do method. Any 21972 // pending HTTP request will be aborted if the provided context is 21973 // canceled. 21974 func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall { 21975 c.ctx_ = ctx 21976 return c 21977 } 21978 21979 // Header returns an http.Header that can be modified by the caller to 21980 // add HTTP headers to the request. 21981 func (c *AdvertisersCreativesListCall) Header() http.Header { 21982 if c.header_ == nil { 21983 c.header_ = make(http.Header) 21984 } 21985 return c.header_ 21986 } 21987 21988 func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) { 21989 reqHeaders := make(http.Header) 21990 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 21991 for k, v := range c.header_ { 21992 reqHeaders[k] = v 21993 } 21994 reqHeaders.Set("User-Agent", c.s.userAgent()) 21995 if c.ifNoneMatch_ != "" { 21996 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21997 } 21998 var body io.Reader = nil 21999 c.urlParams_.Set("alt", alt) 22000 c.urlParams_.Set("prettyPrint", "false") 22001 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives") 22002 urls += "?" + c.urlParams_.Encode() 22003 req, err := http.NewRequest("GET", urls, body) 22004 if err != nil { 22005 return nil, err 22006 } 22007 req.Header = reqHeaders 22008 googleapi.Expand(req.URL, map[string]string{ 22009 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 22010 }) 22011 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22012 } 22013 22014 // Do executes the "displayvideo.advertisers.creatives.list" call. 22015 // Exactly one of *ListCreativesResponse or error will be non-nil. Any 22016 // non-2xx status code is an error. Response headers are in either 22017 // *ListCreativesResponse.ServerResponse.Header or (if a response was 22018 // returned at all) in error.(*googleapi.Error).Header. Use 22019 // googleapi.IsNotModified to check whether the returned error was 22020 // because http.StatusNotModified was returned. 22021 func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) { 22022 gensupport.SetOptions(c.urlParams_, opts...) 22023 res, err := c.doRequest("json") 22024 if res != nil && res.StatusCode == http.StatusNotModified { 22025 if res.Body != nil { 22026 res.Body.Close() 22027 } 22028 return nil, gensupport.WrapError(&googleapi.Error{ 22029 Code: res.StatusCode, 22030 Header: res.Header, 22031 }) 22032 } 22033 if err != nil { 22034 return nil, err 22035 } 22036 defer googleapi.CloseBody(res) 22037 if err := googleapi.CheckResponse(res); err != nil { 22038 return nil, gensupport.WrapError(err) 22039 } 22040 ret := &ListCreativesResponse{ 22041 ServerResponse: googleapi.ServerResponse{ 22042 Header: res.Header, 22043 HTTPStatusCode: res.StatusCode, 22044 }, 22045 } 22046 target := &ret 22047 if err := gensupport.DecodeResponse(target, res); err != nil { 22048 return nil, err 22049 } 22050 return ret, nil 22051 // { 22052 // "description": "Lists creatives in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, creatives with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 22053 // "flatPath": "v1/advertisers/{advertisersId}/creatives", 22054 // "httpMethod": "GET", 22055 // "id": "displayvideo.advertisers.creatives.list", 22056 // "parameterOrder": [ 22057 // "advertiserId" 22058 // ], 22059 // "parameters": { 22060 // "advertiserId": { 22061 // "description": "Required. The ID of the advertiser to list creatives for.", 22062 // "format": "int64", 22063 // "location": "path", 22064 // "pattern": "^[^/]+$", 22065 // "required": true, 22066 // "type": "string" 22067 // }, 22068 // "filter": { 22069 // "description": "Allows filtering by creative fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `lineItemIds` field must use the `HAS (:)` operator. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. * For `entityStatus`, `minDuration`, `maxDuration`, `updateTime`, and `dynamic` fields, there may be at most one restriction. Supported Fields: * `approvalStatus` * `creativeId` * `creativeType` * `dimensions` (input in the form of `{width}x{height}`) * `dynamic` * `entityStatus` * `exchangeReviewStatus` (input in the form of `{exchange}-{reviewStatus}`) * `lineItemIds` * `maxDuration` (input in the form of `{duration}s`. Only seconds are supported) * `minDuration` (input in the form of `{duration}s`. Only seconds are supported) * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Notes: * For `updateTime`, a creative resource's field value reflects the last time that a creative has been updated, which includes updates made by the system (e.g. creative review updates). Examples: * All native creatives: `creativeType=\"CREATIVE_TYPE_NATIVE\"` * All active creatives with 300x400 or 50x100 dimensions: `entityStatus=\"ENTITY_STATUS_ACTIVE\" AND (dimensions=\"300x400\" OR dimensions=\"50x100\")` * All dynamic creatives that are approved by AdX or AppNexus, with a minimum duration of 5 seconds and 200ms: `dynamic=\"true\" AND minDuration=\"5.2s\" AND (exchangeReviewStatus=\"EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED\" OR exchangeReviewStatus=\"EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED\")` * All video creatives that are associated with line item ID 1 or 2: `creativeType=\"CREATIVE_TYPE_VIDEO\" AND (lineItemIds:1 OR lineItemIds:2)` * Find creatives by multiple creative IDs: `creativeId=1 OR creativeId=2` * All creatives with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 22070 // "location": "query", 22071 // "type": "string" 22072 // }, 22073 // "orderBy": { 22074 // "description": "Field by which to sort the list. Acceptable values are: * `creativeId` (default) * `createTime` * `mediaDuration` * `dimensions` (sorts by width first, then by height) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `createTime desc`.", 22075 // "location": "query", 22076 // "type": "string" 22077 // }, 22078 // "pageSize": { 22079 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 22080 // "format": "int32", 22081 // "location": "query", 22082 // "type": "integer" 22083 // }, 22084 // "pageToken": { 22085 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCreatives` method. If not specified, the first page of results will be returned.", 22086 // "location": "query", 22087 // "type": "string" 22088 // } 22089 // }, 22090 // "path": "v1/advertisers/{+advertiserId}/creatives", 22091 // "response": { 22092 // "$ref": "ListCreativesResponse" 22093 // }, 22094 // "scopes": [ 22095 // "https://www.googleapis.com/auth/display-video" 22096 // ] 22097 // } 22098 22099 } 22100 22101 // Pages invokes f for each page of results. 22102 // A non-nil error returned from f will halt the iteration. 22103 // The provided context supersedes any context provided to the Context method. 22104 func (c *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error { 22105 c.ctx_ = ctx 22106 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22107 for { 22108 x, err := c.Do() 22109 if err != nil { 22110 return err 22111 } 22112 if err := f(x); err != nil { 22113 return err 22114 } 22115 if x.NextPageToken == "" { 22116 return nil 22117 } 22118 c.PageToken(x.NextPageToken) 22119 } 22120 } 22121 22122 // method id "displayvideo.advertisers.creatives.patch": 22123 22124 type AdvertisersCreativesPatchCall struct { 22125 s *Service 22126 advertiserId int64 22127 creativeId int64 22128 creative *Creative 22129 urlParams_ gensupport.URLParams 22130 ctx_ context.Context 22131 header_ http.Header 22132 } 22133 22134 // Patch: Updates an existing creative. Returns the updated creative if 22135 // successful. A "Standard" user role 22136 // (//support.google.com/displayvideo/answer/2723011) or greater for the 22137 // parent advertiser or partner is required to make this request. 22138 // 22139 // - advertiserId: Output only. The unique ID of the advertiser the 22140 // creative belongs to. 22141 // - creativeId: Output only. The unique ID of the creative. Assigned by 22142 // the system. 22143 func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall { 22144 c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22145 c.advertiserId = advertiserId 22146 c.creativeId = creativeId 22147 c.creative = creative 22148 return c 22149 } 22150 22151 // UpdateMask sets the optional parameter "updateMask": Required. The 22152 // mask to control which fields to update. 22153 func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall { 22154 c.urlParams_.Set("updateMask", updateMask) 22155 return c 22156 } 22157 22158 // Fields allows partial responses to be retrieved. See 22159 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22160 // for more information. 22161 func (c *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall { 22162 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22163 return c 22164 } 22165 22166 // Context sets the context to be used in this call's Do method. Any 22167 // pending HTTP request will be aborted if the provided context is 22168 // canceled. 22169 func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall { 22170 c.ctx_ = ctx 22171 return c 22172 } 22173 22174 // Header returns an http.Header that can be modified by the caller to 22175 // add HTTP headers to the request. 22176 func (c *AdvertisersCreativesPatchCall) Header() http.Header { 22177 if c.header_ == nil { 22178 c.header_ = make(http.Header) 22179 } 22180 return c.header_ 22181 } 22182 22183 func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) { 22184 reqHeaders := make(http.Header) 22185 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 22186 for k, v := range c.header_ { 22187 reqHeaders[k] = v 22188 } 22189 reqHeaders.Set("User-Agent", c.s.userAgent()) 22190 var body io.Reader = nil 22191 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 22192 if err != nil { 22193 return nil, err 22194 } 22195 reqHeaders.Set("Content-Type", "application/json") 22196 c.urlParams_.Set("alt", alt) 22197 c.urlParams_.Set("prettyPrint", "false") 22198 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives/{+creativeId}") 22199 urls += "?" + c.urlParams_.Encode() 22200 req, err := http.NewRequest("PATCH", urls, body) 22201 if err != nil { 22202 return nil, err 22203 } 22204 req.Header = reqHeaders 22205 googleapi.Expand(req.URL, map[string]string{ 22206 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 22207 "creativeId": strconv.FormatInt(c.creativeId, 10), 22208 }) 22209 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22210 } 22211 22212 // Do executes the "displayvideo.advertisers.creatives.patch" call. 22213 // Exactly one of *Creative or error will be non-nil. Any non-2xx status 22214 // code is an error. Response headers are in either 22215 // *Creative.ServerResponse.Header or (if a response was returned at 22216 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 22217 // to check whether the returned error was because 22218 // http.StatusNotModified was returned. 22219 func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 22220 gensupport.SetOptions(c.urlParams_, opts...) 22221 res, err := c.doRequest("json") 22222 if res != nil && res.StatusCode == http.StatusNotModified { 22223 if res.Body != nil { 22224 res.Body.Close() 22225 } 22226 return nil, gensupport.WrapError(&googleapi.Error{ 22227 Code: res.StatusCode, 22228 Header: res.Header, 22229 }) 22230 } 22231 if err != nil { 22232 return nil, err 22233 } 22234 defer googleapi.CloseBody(res) 22235 if err := googleapi.CheckResponse(res); err != nil { 22236 return nil, gensupport.WrapError(err) 22237 } 22238 ret := &Creative{ 22239 ServerResponse: googleapi.ServerResponse{ 22240 Header: res.Header, 22241 HTTPStatusCode: res.StatusCode, 22242 }, 22243 } 22244 target := &ret 22245 if err := gensupport.DecodeResponse(target, res); err != nil { 22246 return nil, err 22247 } 22248 return ret, nil 22249 // { 22250 // "description": "Updates an existing creative. Returns the updated creative if successful. A [\"Standard\" user role](//support.google.com/displayvideo/answer/2723011) or greater for the parent advertiser or partner is required to make this request.", 22251 // "flatPath": "v1/advertisers/{advertisersId}/creatives/{creativesId}", 22252 // "httpMethod": "PATCH", 22253 // "id": "displayvideo.advertisers.creatives.patch", 22254 // "parameterOrder": [ 22255 // "advertiserId", 22256 // "creativeId" 22257 // ], 22258 // "parameters": { 22259 // "advertiserId": { 22260 // "description": "Output only. The unique ID of the advertiser the creative belongs to.", 22261 // "format": "int64", 22262 // "location": "path", 22263 // "pattern": "^[^/]+$", 22264 // "required": true, 22265 // "type": "string" 22266 // }, 22267 // "creativeId": { 22268 // "description": "Output only. The unique ID of the creative. Assigned by the system.", 22269 // "format": "int64", 22270 // "location": "path", 22271 // "pattern": "^[^/]+$", 22272 // "required": true, 22273 // "type": "string" 22274 // }, 22275 // "updateMask": { 22276 // "description": "Required. The mask to control which fields to update.", 22277 // "format": "google-fieldmask", 22278 // "location": "query", 22279 // "type": "string" 22280 // } 22281 // }, 22282 // "path": "v1/advertisers/{+advertiserId}/creatives/{+creativeId}", 22283 // "request": { 22284 // "$ref": "Creative" 22285 // }, 22286 // "response": { 22287 // "$ref": "Creative" 22288 // }, 22289 // "scopes": [ 22290 // "https://www.googleapis.com/auth/display-video" 22291 // ] 22292 // } 22293 22294 } 22295 22296 // method id "displayvideo.advertisers.insertionOrders.bulkListInsertionOrderAssignedTargetingOptions": 22297 22298 type AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall struct { 22299 s *Service 22300 advertiserId int64 22301 insertionOrderId int64 22302 urlParams_ gensupport.URLParams 22303 ifNoneMatch_ string 22304 ctx_ context.Context 22305 header_ http.Header 22306 } 22307 22308 // BulkListInsertionOrderAssignedTargetingOptions: Lists assigned 22309 // targeting options of an insertion order across targeting types. 22310 // 22311 // - advertiserId: The ID of the advertiser the insertion order belongs 22312 // to. 22313 // - insertionOrderId: The ID of the insertion order to list assigned 22314 // targeting options for. 22315 func (r *AdvertisersInsertionOrdersService) BulkListInsertionOrderAssignedTargetingOptions(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22316 c := &AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22317 c.advertiserId = advertiserId 22318 c.insertionOrderId = insertionOrderId 22319 return c 22320 } 22321 22322 // Filter sets the optional parameter "filter": Allows filtering by 22323 // assigned targeting option fields. Supported syntax: * Filter 22324 // expressions are made up of one or more restrictions. * Restrictions 22325 // can be combined by the logical operator `OR`. * A restriction has the 22326 // form of `{field} {operator} {value}`. * All fields must use the 22327 // `EQUALS (=)` operator. Supported fields: * `targetingType` * 22328 // `inheritance` Examples: * `AssignedTargetingOption` resources of 22329 // targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or 22330 // `TARGETING_TYPE_CHANNEL`: 22331 // `targetingType="TARGETING_TYPE_PROXIMITY_LOCATION_LIST" OR 22332 // targetingType="TARGETING_TYPE_CHANNEL" * `AssignedTargetingOption` 22333 // resources with inheritance status of `NOT_INHERITED` or 22334 // `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR 22335 // inheritance="INHERITED_FROM_PARTNER" The length of this field should 22336 // be no more than 500 characters. Reference our filter `LIST` requests 22337 // (/display-video/api/guides/how-tos/filters) guide for more 22338 // information. 22339 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22340 c.urlParams_.Set("filter", filter) 22341 return c 22342 } 22343 22344 // OrderBy sets the optional parameter "orderBy": Field by which to sort 22345 // the list. Acceptable values are: * `targetingType` (default) The 22346 // default sorting order is ascending. To specify descending order for a 22347 // field, a suffix "desc" should be added to the field name. Example: 22348 // `targetingType desc`. 22349 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22350 c.urlParams_.Set("orderBy", orderBy) 22351 return c 22352 } 22353 22354 // PageSize sets the optional parameter "pageSize": Requested page size. 22355 // The size must be an integer between `1` and `5000`. If unspecified, 22356 // the default is `5000`. Returns error code `INVALID_ARGUMENT` if an 22357 // invalid value is specified. 22358 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22359 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22360 return c 22361 } 22362 22363 // PageToken sets the optional parameter "pageToken": A token that lets 22364 // the client fetch the next page of results. Typically, this is the 22365 // value of next_page_token returned from the previous call to 22366 // `BulkListInsertionOrderAssignedTargetingOptions` method. If not 22367 // specified, the first page of results will be returned. 22368 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22369 c.urlParams_.Set("pageToken", pageToken) 22370 return c 22371 } 22372 22373 // Fields allows partial responses to be retrieved. See 22374 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22375 // for more information. 22376 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22377 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22378 return c 22379 } 22380 22381 // IfNoneMatch sets the optional parameter which makes the operation 22382 // fail if the object's ETag matches the given value. This is useful for 22383 // getting updates only after the object has changed since the last 22384 // request. Use googleapi.IsNotModified to check whether the response 22385 // error from Do is the result of In-None-Match. 22386 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22387 c.ifNoneMatch_ = entityTag 22388 return c 22389 } 22390 22391 // Context sets the context to be used in this call's Do method. Any 22392 // pending HTTP request will be aborted if the provided context is 22393 // canceled. 22394 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall { 22395 c.ctx_ = ctx 22396 return c 22397 } 22398 22399 // Header returns an http.Header that can be modified by the caller to 22400 // add HTTP headers to the request. 22401 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) Header() http.Header { 22402 if c.header_ == nil { 22403 c.header_ = make(http.Header) 22404 } 22405 return c.header_ 22406 } 22407 22408 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 22409 reqHeaders := make(http.Header) 22410 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 22411 for k, v := range c.header_ { 22412 reqHeaders[k] = v 22413 } 22414 reqHeaders.Set("User-Agent", c.s.userAgent()) 22415 if c.ifNoneMatch_ != "" { 22416 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22417 } 22418 var body io.Reader = nil 22419 c.urlParams_.Set("alt", alt) 22420 c.urlParams_.Set("prettyPrint", "false") 22421 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:bulkListInsertionOrderAssignedTargetingOptions") 22422 urls += "?" + c.urlParams_.Encode() 22423 req, err := http.NewRequest("GET", urls, body) 22424 if err != nil { 22425 return nil, err 22426 } 22427 req.Header = reqHeaders 22428 googleapi.Expand(req.URL, map[string]string{ 22429 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 22430 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 22431 }) 22432 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22433 } 22434 22435 // Do executes the "displayvideo.advertisers.insertionOrders.bulkListInsertionOrderAssignedTargetingOptions" call. 22436 // Exactly one of 22437 // *BulkListInsertionOrderAssignedTargetingOptionsResponse or error will 22438 // be non-nil. Any non-2xx status code is an error. Response headers are 22439 // in either 22440 // *BulkListInsertionOrderAssignedTargetingOptionsResponse.ServerResponse 22441 // .Header or (if a response was returned at all) in 22442 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 22443 // whether the returned error was because http.StatusNotModified was 22444 // returned. 22445 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListInsertionOrderAssignedTargetingOptionsResponse, error) { 22446 gensupport.SetOptions(c.urlParams_, opts...) 22447 res, err := c.doRequest("json") 22448 if res != nil && res.StatusCode == http.StatusNotModified { 22449 if res.Body != nil { 22450 res.Body.Close() 22451 } 22452 return nil, gensupport.WrapError(&googleapi.Error{ 22453 Code: res.StatusCode, 22454 Header: res.Header, 22455 }) 22456 } 22457 if err != nil { 22458 return nil, err 22459 } 22460 defer googleapi.CloseBody(res) 22461 if err := googleapi.CheckResponse(res); err != nil { 22462 return nil, gensupport.WrapError(err) 22463 } 22464 ret := &BulkListInsertionOrderAssignedTargetingOptionsResponse{ 22465 ServerResponse: googleapi.ServerResponse{ 22466 Header: res.Header, 22467 HTTPStatusCode: res.StatusCode, 22468 }, 22469 } 22470 target := &ret 22471 if err := gensupport.DecodeResponse(target, res); err != nil { 22472 return nil, err 22473 } 22474 return ret, nil 22475 // { 22476 // "description": "Lists assigned targeting options of an insertion order across targeting types.", 22477 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}:bulkListInsertionOrderAssignedTargetingOptions", 22478 // "httpMethod": "GET", 22479 // "id": "displayvideo.advertisers.insertionOrders.bulkListInsertionOrderAssignedTargetingOptions", 22480 // "parameterOrder": [ 22481 // "advertiserId", 22482 // "insertionOrderId" 22483 // ], 22484 // "parameters": { 22485 // "advertiserId": { 22486 // "description": "Required. The ID of the advertiser the insertion order belongs to.", 22487 // "format": "int64", 22488 // "location": "path", 22489 // "pattern": "^[^/]+$", 22490 // "required": true, 22491 // "type": "string" 22492 // }, 22493 // "filter": { 22494 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or `TARGETING_TYPE_CHANNEL`: `targetingType=\"TARGETING_TYPE_PROXIMITY_LOCATION_LIST\" OR targetingType=\"TARGETING_TYPE_CHANNEL\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 22495 // "location": "query", 22496 // "type": "string" 22497 // }, 22498 // "insertionOrderId": { 22499 // "description": "Required. The ID of the insertion order to list assigned targeting options for.", 22500 // "format": "int64", 22501 // "location": "path", 22502 // "pattern": "^[^/]+$", 22503 // "required": true, 22504 // "type": "string" 22505 // }, 22506 // "orderBy": { 22507 // "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", 22508 // "location": "query", 22509 // "type": "string" 22510 // }, 22511 // "pageSize": { 22512 // "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 22513 // "format": "int32", 22514 // "location": "query", 22515 // "type": "integer" 22516 // }, 22517 // "pageToken": { 22518 // "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListInsertionOrderAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 22519 // "location": "query", 22520 // "type": "string" 22521 // } 22522 // }, 22523 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}:bulkListInsertionOrderAssignedTargetingOptions", 22524 // "response": { 22525 // "$ref": "BulkListInsertionOrderAssignedTargetingOptionsResponse" 22526 // }, 22527 // "scopes": [ 22528 // "https://www.googleapis.com/auth/display-video" 22529 // ] 22530 // } 22531 22532 } 22533 22534 // Pages invokes f for each page of results. 22535 // A non-nil error returned from f will halt the iteration. 22536 // The provided context supersedes any context provided to the Context method. 22537 func (c *AdvertisersInsertionOrdersBulkListInsertionOrderAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListInsertionOrderAssignedTargetingOptionsResponse) error) error { 22538 c.ctx_ = ctx 22539 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22540 for { 22541 x, err := c.Do() 22542 if err != nil { 22543 return err 22544 } 22545 if err := f(x); err != nil { 22546 return err 22547 } 22548 if x.NextPageToken == "" { 22549 return nil 22550 } 22551 c.PageToken(x.NextPageToken) 22552 } 22553 } 22554 22555 // method id "displayvideo.advertisers.insertionOrders.create": 22556 22557 type AdvertisersInsertionOrdersCreateCall struct { 22558 s *Service 22559 advertiserId int64 22560 insertionorder *InsertionOrder 22561 urlParams_ gensupport.URLParams 22562 ctx_ context.Context 22563 header_ http.Header 22564 } 22565 22566 // Create: Creates a new insertion order. Returns the newly created 22567 // insertion order if successful. 22568 // 22569 // - advertiserId: Output only. The unique ID of the advertiser the 22570 // insertion order belongs to. 22571 func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall { 22572 c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22573 c.advertiserId = advertiserId 22574 c.insertionorder = insertionorder 22575 return c 22576 } 22577 22578 // Fields allows partial responses to be retrieved. See 22579 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22580 // for more information. 22581 func (c *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall { 22582 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22583 return c 22584 } 22585 22586 // Context sets the context to be used in this call's Do method. Any 22587 // pending HTTP request will be aborted if the provided context is 22588 // canceled. 22589 func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall { 22590 c.ctx_ = ctx 22591 return c 22592 } 22593 22594 // Header returns an http.Header that can be modified by the caller to 22595 // add HTTP headers to the request. 22596 func (c *AdvertisersInsertionOrdersCreateCall) Header() http.Header { 22597 if c.header_ == nil { 22598 c.header_ = make(http.Header) 22599 } 22600 return c.header_ 22601 } 22602 22603 func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) { 22604 reqHeaders := make(http.Header) 22605 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 22606 for k, v := range c.header_ { 22607 reqHeaders[k] = v 22608 } 22609 reqHeaders.Set("User-Agent", c.s.userAgent()) 22610 var body io.Reader = nil 22611 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder) 22612 if err != nil { 22613 return nil, err 22614 } 22615 reqHeaders.Set("Content-Type", "application/json") 22616 c.urlParams_.Set("alt", alt) 22617 c.urlParams_.Set("prettyPrint", "false") 22618 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders") 22619 urls += "?" + c.urlParams_.Encode() 22620 req, err := http.NewRequest("POST", urls, body) 22621 if err != nil { 22622 return nil, err 22623 } 22624 req.Header = reqHeaders 22625 googleapi.Expand(req.URL, map[string]string{ 22626 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 22627 }) 22628 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22629 } 22630 22631 // Do executes the "displayvideo.advertisers.insertionOrders.create" call. 22632 // Exactly one of *InsertionOrder or error will be non-nil. Any non-2xx 22633 // status code is an error. Response headers are in either 22634 // *InsertionOrder.ServerResponse.Header or (if a response was returned 22635 // at all) in error.(*googleapi.Error).Header. Use 22636 // googleapi.IsNotModified to check whether the returned error was 22637 // because http.StatusNotModified was returned. 22638 func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { 22639 gensupport.SetOptions(c.urlParams_, opts...) 22640 res, err := c.doRequest("json") 22641 if res != nil && res.StatusCode == http.StatusNotModified { 22642 if res.Body != nil { 22643 res.Body.Close() 22644 } 22645 return nil, gensupport.WrapError(&googleapi.Error{ 22646 Code: res.StatusCode, 22647 Header: res.Header, 22648 }) 22649 } 22650 if err != nil { 22651 return nil, err 22652 } 22653 defer googleapi.CloseBody(res) 22654 if err := googleapi.CheckResponse(res); err != nil { 22655 return nil, gensupport.WrapError(err) 22656 } 22657 ret := &InsertionOrder{ 22658 ServerResponse: googleapi.ServerResponse{ 22659 Header: res.Header, 22660 HTTPStatusCode: res.StatusCode, 22661 }, 22662 } 22663 target := &ret 22664 if err := gensupport.DecodeResponse(target, res); err != nil { 22665 return nil, err 22666 } 22667 return ret, nil 22668 // { 22669 // "description": "Creates a new insertion order. Returns the newly created insertion order if successful.", 22670 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders", 22671 // "httpMethod": "POST", 22672 // "id": "displayvideo.advertisers.insertionOrders.create", 22673 // "parameterOrder": [ 22674 // "advertiserId" 22675 // ], 22676 // "parameters": { 22677 // "advertiserId": { 22678 // "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", 22679 // "format": "int64", 22680 // "location": "path", 22681 // "pattern": "^[^/]+$", 22682 // "required": true, 22683 // "type": "string" 22684 // } 22685 // }, 22686 // "path": "v1/advertisers/{+advertiserId}/insertionOrders", 22687 // "request": { 22688 // "$ref": "InsertionOrder" 22689 // }, 22690 // "response": { 22691 // "$ref": "InsertionOrder" 22692 // }, 22693 // "scopes": [ 22694 // "https://www.googleapis.com/auth/display-video" 22695 // ] 22696 // } 22697 22698 } 22699 22700 // method id "displayvideo.advertisers.insertionOrders.delete": 22701 22702 type AdvertisersInsertionOrdersDeleteCall struct { 22703 s *Service 22704 advertiserId int64 22705 insertionOrderId int64 22706 urlParams_ gensupport.URLParams 22707 ctx_ context.Context 22708 header_ http.Header 22709 } 22710 22711 // Delete: Deletes an insertion order. Returns error code `NOT_FOUND` if 22712 // the insertion order does not exist. The insertion order should be 22713 // archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, 22714 // to be able to delete it. 22715 // 22716 // - advertiserId: The ID of the advertiser this insertion order belongs 22717 // to. 22718 // - insertionOrderId: The ID of the insertion order to delete. 22719 func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall { 22720 c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22721 c.advertiserId = advertiserId 22722 c.insertionOrderId = insertionOrderId 22723 return c 22724 } 22725 22726 // Fields allows partial responses to be retrieved. See 22727 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22728 // for more information. 22729 func (c *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall { 22730 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22731 return c 22732 } 22733 22734 // Context sets the context to be used in this call's Do method. Any 22735 // pending HTTP request will be aborted if the provided context is 22736 // canceled. 22737 func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall { 22738 c.ctx_ = ctx 22739 return c 22740 } 22741 22742 // Header returns an http.Header that can be modified by the caller to 22743 // add HTTP headers to the request. 22744 func (c *AdvertisersInsertionOrdersDeleteCall) Header() http.Header { 22745 if c.header_ == nil { 22746 c.header_ = make(http.Header) 22747 } 22748 return c.header_ 22749 } 22750 22751 func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) { 22752 reqHeaders := make(http.Header) 22753 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 22754 for k, v := range c.header_ { 22755 reqHeaders[k] = v 22756 } 22757 reqHeaders.Set("User-Agent", c.s.userAgent()) 22758 var body io.Reader = nil 22759 c.urlParams_.Set("alt", alt) 22760 c.urlParams_.Set("prettyPrint", "false") 22761 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") 22762 urls += "?" + c.urlParams_.Encode() 22763 req, err := http.NewRequest("DELETE", urls, body) 22764 if err != nil { 22765 return nil, err 22766 } 22767 req.Header = reqHeaders 22768 googleapi.Expand(req.URL, map[string]string{ 22769 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 22770 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 22771 }) 22772 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22773 } 22774 22775 // Do executes the "displayvideo.advertisers.insertionOrders.delete" call. 22776 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 22777 // code is an error. Response headers are in either 22778 // *Empty.ServerResponse.Header or (if a response was returned at all) 22779 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 22780 // check whether the returned error was because http.StatusNotModified 22781 // was returned. 22782 func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 22783 gensupport.SetOptions(c.urlParams_, opts...) 22784 res, err := c.doRequest("json") 22785 if res != nil && res.StatusCode == http.StatusNotModified { 22786 if res.Body != nil { 22787 res.Body.Close() 22788 } 22789 return nil, gensupport.WrapError(&googleapi.Error{ 22790 Code: res.StatusCode, 22791 Header: res.Header, 22792 }) 22793 } 22794 if err != nil { 22795 return nil, err 22796 } 22797 defer googleapi.CloseBody(res) 22798 if err := googleapi.CheckResponse(res); err != nil { 22799 return nil, gensupport.WrapError(err) 22800 } 22801 ret := &Empty{ 22802 ServerResponse: googleapi.ServerResponse{ 22803 Header: res.Header, 22804 HTTPStatusCode: res.StatusCode, 22805 }, 22806 } 22807 target := &ret 22808 if err := gensupport.DecodeResponse(target, res); err != nil { 22809 return nil, err 22810 } 22811 return ret, nil 22812 // { 22813 // "description": "Deletes an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist. The insertion order should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it.", 22814 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", 22815 // "httpMethod": "DELETE", 22816 // "id": "displayvideo.advertisers.insertionOrders.delete", 22817 // "parameterOrder": [ 22818 // "advertiserId", 22819 // "insertionOrderId" 22820 // ], 22821 // "parameters": { 22822 // "advertiserId": { 22823 // "description": "The ID of the advertiser this insertion order belongs to.", 22824 // "format": "int64", 22825 // "location": "path", 22826 // "pattern": "^[^/]+$", 22827 // "required": true, 22828 // "type": "string" 22829 // }, 22830 // "insertionOrderId": { 22831 // "description": "The ID of the insertion order to delete.", 22832 // "format": "int64", 22833 // "location": "path", 22834 // "pattern": "^[^/]+$", 22835 // "required": true, 22836 // "type": "string" 22837 // } 22838 // }, 22839 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", 22840 // "response": { 22841 // "$ref": "Empty" 22842 // }, 22843 // "scopes": [ 22844 // "https://www.googleapis.com/auth/display-video" 22845 // ] 22846 // } 22847 22848 } 22849 22850 // method id "displayvideo.advertisers.insertionOrders.get": 22851 22852 type AdvertisersInsertionOrdersGetCall struct { 22853 s *Service 22854 advertiserId int64 22855 insertionOrderId int64 22856 urlParams_ gensupport.URLParams 22857 ifNoneMatch_ string 22858 ctx_ context.Context 22859 header_ http.Header 22860 } 22861 22862 // Get: Gets an insertion order. Returns error code `NOT_FOUND` if the 22863 // insertion order does not exist. 22864 // 22865 // - advertiserId: The ID of the advertiser this insertion order belongs 22866 // to. 22867 // - insertionOrderId: The ID of the insertion order to fetch. 22868 func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall { 22869 c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22870 c.advertiserId = advertiserId 22871 c.insertionOrderId = insertionOrderId 22872 return c 22873 } 22874 22875 // Fields allows partial responses to be retrieved. See 22876 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22877 // for more information. 22878 func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall { 22879 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22880 return c 22881 } 22882 22883 // IfNoneMatch sets the optional parameter which makes the operation 22884 // fail if the object's ETag matches the given value. This is useful for 22885 // getting updates only after the object has changed since the last 22886 // request. Use googleapi.IsNotModified to check whether the response 22887 // error from Do is the result of In-None-Match. 22888 func (c *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall { 22889 c.ifNoneMatch_ = entityTag 22890 return c 22891 } 22892 22893 // Context sets the context to be used in this call's Do method. Any 22894 // pending HTTP request will be aborted if the provided context is 22895 // canceled. 22896 func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall { 22897 c.ctx_ = ctx 22898 return c 22899 } 22900 22901 // Header returns an http.Header that can be modified by the caller to 22902 // add HTTP headers to the request. 22903 func (c *AdvertisersInsertionOrdersGetCall) Header() http.Header { 22904 if c.header_ == nil { 22905 c.header_ = make(http.Header) 22906 } 22907 return c.header_ 22908 } 22909 22910 func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) { 22911 reqHeaders := make(http.Header) 22912 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 22913 for k, v := range c.header_ { 22914 reqHeaders[k] = v 22915 } 22916 reqHeaders.Set("User-Agent", c.s.userAgent()) 22917 if c.ifNoneMatch_ != "" { 22918 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22919 } 22920 var body io.Reader = nil 22921 c.urlParams_.Set("alt", alt) 22922 c.urlParams_.Set("prettyPrint", "false") 22923 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") 22924 urls += "?" + c.urlParams_.Encode() 22925 req, err := http.NewRequest("GET", urls, body) 22926 if err != nil { 22927 return nil, err 22928 } 22929 req.Header = reqHeaders 22930 googleapi.Expand(req.URL, map[string]string{ 22931 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 22932 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 22933 }) 22934 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22935 } 22936 22937 // Do executes the "displayvideo.advertisers.insertionOrders.get" call. 22938 // Exactly one of *InsertionOrder or error will be non-nil. Any non-2xx 22939 // status code is an error. Response headers are in either 22940 // *InsertionOrder.ServerResponse.Header or (if a response was returned 22941 // at all) in error.(*googleapi.Error).Header. Use 22942 // googleapi.IsNotModified to check whether the returned error was 22943 // because http.StatusNotModified was returned. 22944 func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { 22945 gensupport.SetOptions(c.urlParams_, opts...) 22946 res, err := c.doRequest("json") 22947 if res != nil && res.StatusCode == http.StatusNotModified { 22948 if res.Body != nil { 22949 res.Body.Close() 22950 } 22951 return nil, gensupport.WrapError(&googleapi.Error{ 22952 Code: res.StatusCode, 22953 Header: res.Header, 22954 }) 22955 } 22956 if err != nil { 22957 return nil, err 22958 } 22959 defer googleapi.CloseBody(res) 22960 if err := googleapi.CheckResponse(res); err != nil { 22961 return nil, gensupport.WrapError(err) 22962 } 22963 ret := &InsertionOrder{ 22964 ServerResponse: googleapi.ServerResponse{ 22965 Header: res.Header, 22966 HTTPStatusCode: res.StatusCode, 22967 }, 22968 } 22969 target := &ret 22970 if err := gensupport.DecodeResponse(target, res); err != nil { 22971 return nil, err 22972 } 22973 return ret, nil 22974 // { 22975 // "description": "Gets an insertion order. Returns error code `NOT_FOUND` if the insertion order does not exist.", 22976 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", 22977 // "httpMethod": "GET", 22978 // "id": "displayvideo.advertisers.insertionOrders.get", 22979 // "parameterOrder": [ 22980 // "advertiserId", 22981 // "insertionOrderId" 22982 // ], 22983 // "parameters": { 22984 // "advertiserId": { 22985 // "description": "Required. The ID of the advertiser this insertion order belongs to.", 22986 // "format": "int64", 22987 // "location": "path", 22988 // "pattern": "^[^/]+$", 22989 // "required": true, 22990 // "type": "string" 22991 // }, 22992 // "insertionOrderId": { 22993 // "description": "Required. The ID of the insertion order to fetch.", 22994 // "format": "int64", 22995 // "location": "path", 22996 // "pattern": "^[^/]+$", 22997 // "required": true, 22998 // "type": "string" 22999 // } 23000 // }, 23001 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", 23002 // "response": { 23003 // "$ref": "InsertionOrder" 23004 // }, 23005 // "scopes": [ 23006 // "https://www.googleapis.com/auth/display-video" 23007 // ] 23008 // } 23009 23010 } 23011 23012 // method id "displayvideo.advertisers.insertionOrders.list": 23013 23014 type AdvertisersInsertionOrdersListCall struct { 23015 s *Service 23016 advertiserId int64 23017 urlParams_ gensupport.URLParams 23018 ifNoneMatch_ string 23019 ctx_ context.Context 23020 header_ http.Header 23021 } 23022 23023 // List: Lists insertion orders in an advertiser. The order is defined 23024 // by the order_by parameter. If a filter by entity_status is not 23025 // specified, insertion orders with `ENTITY_STATUS_ARCHIVED` will not be 23026 // included in the results. 23027 // 23028 // - advertiserId: The ID of the advertiser to list insertion orders 23029 // for. 23030 func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall { 23031 c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23032 c.advertiserId = advertiserId 23033 return c 23034 } 23035 23036 // Filter sets the optional parameter "filter": Allows filtering by 23037 // insertion order fields. Supported syntax: * Filter expressions are 23038 // made up of one or more restrictions. * Restrictions can be combined 23039 // by `AND` or `OR` logical operators. A sequence of restrictions 23040 // implicitly uses `AND`. * A restriction has the form of `{field} 23041 // {operator} {value}`. * The `updateTime` field must use the `GREATER 23042 // THAN OR EQUAL TO (>=)` or `LESS THAN OR EQUAL TO (<=)` operators. * 23043 // All other fields must use the `EQUALS (=)` operator. Supported 23044 // fields: * `campaignId` * `displayName` * `entityStatus` * 23045 // `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) 23046 // Examples: * All insertion orders under a campaign: 23047 // `campaignId="1234" * All `ENTITY_STATUS_ACTIVE` or 23048 // `ENTITY_STATUS_PAUSED` insertion orders under an advertiser: 23049 // `(entityStatus="ENTITY_STATUS_ACTIVE" OR 23050 // entityStatus="ENTITY_STATUS_PAUSED")` * All insertion orders with an 23051 // update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 23052 // 8601): `updateTime<="2020-11-04T18:54:47Z" * All insertion orders 23053 // with an update time greater than or equal to 2020-11-04T18:54:47Z 23054 // (format of ISO 8601): `updateTime>="2020-11-04T18:54:47Z" The length 23055 // of this field should be no more than 500 characters. Reference our 23056 // filter `LIST` requests (/display-video/api/guides/how-tos/filters) 23057 // guide for more information. 23058 func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall { 23059 c.urlParams_.Set("filter", filter) 23060 return c 23061 } 23062 23063 // OrderBy sets the optional parameter "orderBy": Field by which to sort 23064 // the list. Acceptable values are: * "displayName" (default) * 23065 // "entityStatus" * "updateTime" The default sorting order is ascending. 23066 // To specify descending order for a field, a suffix "desc" should be 23067 // added to the field name. Example: `displayName desc`. 23068 func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall { 23069 c.urlParams_.Set("orderBy", orderBy) 23070 return c 23071 } 23072 23073 // PageSize sets the optional parameter "pageSize": Requested page size. 23074 // Must be between `1` and `100`. If unspecified will default to `100`. 23075 // Returns error code `INVALID_ARGUMENT` if an invalid value is 23076 // specified. 23077 func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall { 23078 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 23079 return c 23080 } 23081 23082 // PageToken sets the optional parameter "pageToken": A token 23083 // identifying a page of results the server should return. Typically, 23084 // this is the value of next_page_token returned from the previous call 23085 // to `ListInsertionOrders` method. If not specified, the first page of 23086 // results will be returned. 23087 func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall { 23088 c.urlParams_.Set("pageToken", pageToken) 23089 return c 23090 } 23091 23092 // Fields allows partial responses to be retrieved. See 23093 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23094 // for more information. 23095 func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall { 23096 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23097 return c 23098 } 23099 23100 // IfNoneMatch sets the optional parameter which makes the operation 23101 // fail if the object's ETag matches the given value. This is useful for 23102 // getting updates only after the object has changed since the last 23103 // request. Use googleapi.IsNotModified to check whether the response 23104 // error from Do is the result of In-None-Match. 23105 func (c *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall { 23106 c.ifNoneMatch_ = entityTag 23107 return c 23108 } 23109 23110 // Context sets the context to be used in this call's Do method. Any 23111 // pending HTTP request will be aborted if the provided context is 23112 // canceled. 23113 func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall { 23114 c.ctx_ = ctx 23115 return c 23116 } 23117 23118 // Header returns an http.Header that can be modified by the caller to 23119 // add HTTP headers to the request. 23120 func (c *AdvertisersInsertionOrdersListCall) Header() http.Header { 23121 if c.header_ == nil { 23122 c.header_ = make(http.Header) 23123 } 23124 return c.header_ 23125 } 23126 23127 func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) { 23128 reqHeaders := make(http.Header) 23129 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 23130 for k, v := range c.header_ { 23131 reqHeaders[k] = v 23132 } 23133 reqHeaders.Set("User-Agent", c.s.userAgent()) 23134 if c.ifNoneMatch_ != "" { 23135 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23136 } 23137 var body io.Reader = nil 23138 c.urlParams_.Set("alt", alt) 23139 c.urlParams_.Set("prettyPrint", "false") 23140 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders") 23141 urls += "?" + c.urlParams_.Encode() 23142 req, err := http.NewRequest("GET", urls, body) 23143 if err != nil { 23144 return nil, err 23145 } 23146 req.Header = reqHeaders 23147 googleapi.Expand(req.URL, map[string]string{ 23148 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 23149 }) 23150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23151 } 23152 23153 // Do executes the "displayvideo.advertisers.insertionOrders.list" call. 23154 // Exactly one of *ListInsertionOrdersResponse or error will be non-nil. 23155 // Any non-2xx status code is an error. Response headers are in either 23156 // *ListInsertionOrdersResponse.ServerResponse.Header or (if a response 23157 // was returned at all) in error.(*googleapi.Error).Header. Use 23158 // googleapi.IsNotModified to check whether the returned error was 23159 // because http.StatusNotModified was returned. 23160 func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) { 23161 gensupport.SetOptions(c.urlParams_, opts...) 23162 res, err := c.doRequest("json") 23163 if res != nil && res.StatusCode == http.StatusNotModified { 23164 if res.Body != nil { 23165 res.Body.Close() 23166 } 23167 return nil, gensupport.WrapError(&googleapi.Error{ 23168 Code: res.StatusCode, 23169 Header: res.Header, 23170 }) 23171 } 23172 if err != nil { 23173 return nil, err 23174 } 23175 defer googleapi.CloseBody(res) 23176 if err := googleapi.CheckResponse(res); err != nil { 23177 return nil, gensupport.WrapError(err) 23178 } 23179 ret := &ListInsertionOrdersResponse{ 23180 ServerResponse: googleapi.ServerResponse{ 23181 Header: res.Header, 23182 HTTPStatusCode: res.StatusCode, 23183 }, 23184 } 23185 target := &ret 23186 if err := gensupport.DecodeResponse(target, res); err != nil { 23187 return nil, err 23188 } 23189 return ret, nil 23190 // { 23191 // "description": "Lists insertion orders in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, insertion orders with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 23192 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders", 23193 // "httpMethod": "GET", 23194 // "id": "displayvideo.advertisers.insertionOrders.list", 23195 // "parameterOrder": [ 23196 // "advertiserId" 23197 // ], 23198 // "parameters": { 23199 // "advertiserId": { 23200 // "description": "Required. The ID of the advertiser to list insertion orders for.", 23201 // "format": "int64", 23202 // "location": "path", 23203 // "pattern": "^[^/]+$", 23204 // "required": true, 23205 // "type": "string" 23206 // }, 23207 // "filter": { 23208 // "description": "Allows filtering by insertion order fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All insertion orders under a campaign: `campaignId=\"1234\"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\")` * All insertion orders with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All insertion orders with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 23209 // "location": "query", 23210 // "type": "string" 23211 // }, 23212 // "orderBy": { 23213 // "description": "Field by which to sort the list. Acceptable values are: * \"displayName\" (default) * \"entityStatus\" * \"updateTime\" The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 23214 // "location": "query", 23215 // "type": "string" 23216 // }, 23217 // "pageSize": { 23218 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 23219 // "format": "int32", 23220 // "location": "query", 23221 // "type": "integer" 23222 // }, 23223 // "pageToken": { 23224 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrders` method. If not specified, the first page of results will be returned.", 23225 // "location": "query", 23226 // "type": "string" 23227 // } 23228 // }, 23229 // "path": "v1/advertisers/{+advertiserId}/insertionOrders", 23230 // "response": { 23231 // "$ref": "ListInsertionOrdersResponse" 23232 // }, 23233 // "scopes": [ 23234 // "https://www.googleapis.com/auth/display-video" 23235 // ] 23236 // } 23237 23238 } 23239 23240 // Pages invokes f for each page of results. 23241 // A non-nil error returned from f will halt the iteration. 23242 // The provided context supersedes any context provided to the Context method. 23243 func (c *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) error) error { 23244 c.ctx_ = ctx 23245 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23246 for { 23247 x, err := c.Do() 23248 if err != nil { 23249 return err 23250 } 23251 if err := f(x); err != nil { 23252 return err 23253 } 23254 if x.NextPageToken == "" { 23255 return nil 23256 } 23257 c.PageToken(x.NextPageToken) 23258 } 23259 } 23260 23261 // method id "displayvideo.advertisers.insertionOrders.patch": 23262 23263 type AdvertisersInsertionOrdersPatchCall struct { 23264 s *Service 23265 advertiserId int64 23266 insertionOrderId int64 23267 insertionorder *InsertionOrder 23268 urlParams_ gensupport.URLParams 23269 ctx_ context.Context 23270 header_ http.Header 23271 } 23272 23273 // Patch: Updates an existing insertion order. Returns the updated 23274 // insertion order if successful. 23275 // 23276 // - advertiserId: Output only. The unique ID of the advertiser the 23277 // insertion order belongs to. 23278 // - insertionOrderId: Output only. The unique ID of the insertion 23279 // order. Assigned by the system. 23280 func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall { 23281 c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23282 c.advertiserId = advertiserId 23283 c.insertionOrderId = insertionOrderId 23284 c.insertionorder = insertionorder 23285 return c 23286 } 23287 23288 // UpdateMask sets the optional parameter "updateMask": Required. The 23289 // mask to control which fields to update. 23290 func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall { 23291 c.urlParams_.Set("updateMask", updateMask) 23292 return c 23293 } 23294 23295 // Fields allows partial responses to be retrieved. See 23296 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23297 // for more information. 23298 func (c *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall { 23299 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23300 return c 23301 } 23302 23303 // Context sets the context to be used in this call's Do method. Any 23304 // pending HTTP request will be aborted if the provided context is 23305 // canceled. 23306 func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall { 23307 c.ctx_ = ctx 23308 return c 23309 } 23310 23311 // Header returns an http.Header that can be modified by the caller to 23312 // add HTTP headers to the request. 23313 func (c *AdvertisersInsertionOrdersPatchCall) Header() http.Header { 23314 if c.header_ == nil { 23315 c.header_ = make(http.Header) 23316 } 23317 return c.header_ 23318 } 23319 23320 func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) { 23321 reqHeaders := make(http.Header) 23322 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 23323 for k, v := range c.header_ { 23324 reqHeaders[k] = v 23325 } 23326 reqHeaders.Set("User-Agent", c.s.userAgent()) 23327 var body io.Reader = nil 23328 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder) 23329 if err != nil { 23330 return nil, err 23331 } 23332 reqHeaders.Set("Content-Type", "application/json") 23333 c.urlParams_.Set("alt", alt) 23334 c.urlParams_.Set("prettyPrint", "false") 23335 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") 23336 urls += "?" + c.urlParams_.Encode() 23337 req, err := http.NewRequest("PATCH", urls, body) 23338 if err != nil { 23339 return nil, err 23340 } 23341 req.Header = reqHeaders 23342 googleapi.Expand(req.URL, map[string]string{ 23343 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 23344 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 23345 }) 23346 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23347 } 23348 23349 // Do executes the "displayvideo.advertisers.insertionOrders.patch" call. 23350 // Exactly one of *InsertionOrder or error will be non-nil. Any non-2xx 23351 // status code is an error. Response headers are in either 23352 // *InsertionOrder.ServerResponse.Header or (if a response was returned 23353 // at all) in error.(*googleapi.Error).Header. Use 23354 // googleapi.IsNotModified to check whether the returned error was 23355 // because http.StatusNotModified was returned. 23356 func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { 23357 gensupport.SetOptions(c.urlParams_, opts...) 23358 res, err := c.doRequest("json") 23359 if res != nil && res.StatusCode == http.StatusNotModified { 23360 if res.Body != nil { 23361 res.Body.Close() 23362 } 23363 return nil, gensupport.WrapError(&googleapi.Error{ 23364 Code: res.StatusCode, 23365 Header: res.Header, 23366 }) 23367 } 23368 if err != nil { 23369 return nil, err 23370 } 23371 defer googleapi.CloseBody(res) 23372 if err := googleapi.CheckResponse(res); err != nil { 23373 return nil, gensupport.WrapError(err) 23374 } 23375 ret := &InsertionOrder{ 23376 ServerResponse: googleapi.ServerResponse{ 23377 Header: res.Header, 23378 HTTPStatusCode: res.StatusCode, 23379 }, 23380 } 23381 target := &ret 23382 if err := gensupport.DecodeResponse(target, res); err != nil { 23383 return nil, err 23384 } 23385 return ret, nil 23386 // { 23387 // "description": "Updates an existing insertion order. Returns the updated insertion order if successful.", 23388 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", 23389 // "httpMethod": "PATCH", 23390 // "id": "displayvideo.advertisers.insertionOrders.patch", 23391 // "parameterOrder": [ 23392 // "advertiserId", 23393 // "insertionOrderId" 23394 // ], 23395 // "parameters": { 23396 // "advertiserId": { 23397 // "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", 23398 // "format": "int64", 23399 // "location": "path", 23400 // "pattern": "^[^/]+$", 23401 // "required": true, 23402 // "type": "string" 23403 // }, 23404 // "insertionOrderId": { 23405 // "description": "Output only. The unique ID of the insertion order. Assigned by the system.", 23406 // "format": "int64", 23407 // "location": "path", 23408 // "pattern": "^[^/]+$", 23409 // "required": true, 23410 // "type": "string" 23411 // }, 23412 // "updateMask": { 23413 // "description": "Required. The mask to control which fields to update.", 23414 // "format": "google-fieldmask", 23415 // "location": "query", 23416 // "type": "string" 23417 // } 23418 // }, 23419 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", 23420 // "request": { 23421 // "$ref": "InsertionOrder" 23422 // }, 23423 // "response": { 23424 // "$ref": "InsertionOrder" 23425 // }, 23426 // "scopes": [ 23427 // "https://www.googleapis.com/auth/display-video" 23428 // ] 23429 // } 23430 23431 } 23432 23433 // method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get": 23434 23435 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall struct { 23436 s *Service 23437 advertiserId int64 23438 insertionOrderId int64 23439 targetingType string 23440 assignedTargetingOptionId string 23441 urlParams_ gensupport.URLParams 23442 ifNoneMatch_ string 23443 ctx_ context.Context 23444 header_ http.Header 23445 } 23446 23447 // Get: Gets a single targeting option assigned to an insertion order. 23448 // 23449 // - advertiserId: The ID of the advertiser the insertion order belongs 23450 // to. 23451 // - assignedTargetingOptionId: An identifier unique to the targeting 23452 // type in this insertion order that identifies the assigned targeting 23453 // option being requested. 23454 // - insertionOrderId: The ID of the insertion order the assigned 23455 // targeting option belongs to. 23456 // - targetingType: Identifies the type of this assigned targeting 23457 // option. Supported targeting types include: * 23458 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * 23459 // `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * 23460 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * 23461 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 23462 // `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * 23463 // `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * 23464 // `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * 23465 // `TARGETING_TYPE_CONTENT_GENRE` * 23466 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 23467 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 23468 // `TARGETING_TYPE_CONTENT_STREAM_TYPE` * 23469 // `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` 23470 // - `TARGETING_TYPE_DEVICE_TYPE` * 23471 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 23472 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 23473 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 23474 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 23475 // `TARGETING_TYPE_INVENTORY_SOURCE` * 23476 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` 23477 // - `TARGETING_TYPE_LANGUAGE` * 23478 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * 23479 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * 23480 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 23481 // `TARGETING_TYPE_OPERATING_SYSTEM` * 23482 // `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * 23483 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * 23484 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * 23485 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 23486 // `TARGETING_TYPE_SUB_EXCHANGE` * 23487 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * 23488 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 23489 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. 23490 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, insertionOrderId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { 23491 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23492 c.advertiserId = advertiserId 23493 c.insertionOrderId = insertionOrderId 23494 c.targetingType = targetingType 23495 c.assignedTargetingOptionId = assignedTargetingOptionId 23496 return c 23497 } 23498 23499 // Fields allows partial responses to be retrieved. See 23500 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23501 // for more information. 23502 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { 23503 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23504 return c 23505 } 23506 23507 // IfNoneMatch sets the optional parameter which makes the operation 23508 // fail if the object's ETag matches the given value. This is useful for 23509 // getting updates only after the object has changed since the last 23510 // request. Use googleapi.IsNotModified to check whether the response 23511 // error from Do is the result of In-None-Match. 23512 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { 23513 c.ifNoneMatch_ = entityTag 23514 return c 23515 } 23516 23517 // Context sets the context to be used in this call's Do method. Any 23518 // pending HTTP request will be aborted if the provided context is 23519 // canceled. 23520 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall { 23521 c.ctx_ = ctx 23522 return c 23523 } 23524 23525 // Header returns an http.Header that can be modified by the caller to 23526 // add HTTP headers to the request. 23527 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { 23528 if c.header_ == nil { 23529 c.header_ = make(http.Header) 23530 } 23531 return c.header_ 23532 } 23533 23534 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 23535 reqHeaders := make(http.Header) 23536 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 23537 for k, v := range c.header_ { 23538 reqHeaders[k] = v 23539 } 23540 reqHeaders.Set("User-Agent", c.s.userAgent()) 23541 if c.ifNoneMatch_ != "" { 23542 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23543 } 23544 var body io.Reader = nil 23545 c.urlParams_.Set("alt", alt) 23546 c.urlParams_.Set("prettyPrint", "false") 23547 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 23548 urls += "?" + c.urlParams_.Encode() 23549 req, err := http.NewRequest("GET", urls, body) 23550 if err != nil { 23551 return nil, err 23552 } 23553 req.Header = reqHeaders 23554 googleapi.Expand(req.URL, map[string]string{ 23555 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 23556 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 23557 "targetingType": c.targetingType, 23558 "assignedTargetingOptionId": c.assignedTargetingOptionId, 23559 }) 23560 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23561 } 23562 23563 // Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get" call. 23564 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 23565 // non-2xx status code is an error. Response headers are in either 23566 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 23567 // returned at all) in error.(*googleapi.Error).Header. Use 23568 // googleapi.IsNotModified to check whether the returned error was 23569 // because http.StatusNotModified was returned. 23570 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 23571 gensupport.SetOptions(c.urlParams_, opts...) 23572 res, err := c.doRequest("json") 23573 if res != nil && res.StatusCode == http.StatusNotModified { 23574 if res.Body != nil { 23575 res.Body.Close() 23576 } 23577 return nil, gensupport.WrapError(&googleapi.Error{ 23578 Code: res.StatusCode, 23579 Header: res.Header, 23580 }) 23581 } 23582 if err != nil { 23583 return nil, err 23584 } 23585 defer googleapi.CloseBody(res) 23586 if err := googleapi.CheckResponse(res); err != nil { 23587 return nil, gensupport.WrapError(err) 23588 } 23589 ret := &AssignedTargetingOption{ 23590 ServerResponse: googleapi.ServerResponse{ 23591 Header: res.Header, 23592 HTTPStatusCode: res.StatusCode, 23593 }, 23594 } 23595 target := &ret 23596 if err := gensupport.DecodeResponse(target, res); err != nil { 23597 return nil, err 23598 } 23599 return ret, nil 23600 // { 23601 // "description": "Gets a single targeting option assigned to an insertion order.", 23602 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 23603 // "httpMethod": "GET", 23604 // "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.get", 23605 // "parameterOrder": [ 23606 // "advertiserId", 23607 // "insertionOrderId", 23608 // "targetingType", 23609 // "assignedTargetingOptionId" 23610 // ], 23611 // "parameters": { 23612 // "advertiserId": { 23613 // "description": "Required. The ID of the advertiser the insertion order belongs to.", 23614 // "format": "int64", 23615 // "location": "path", 23616 // "pattern": "^[^/]+$", 23617 // "required": true, 23618 // "type": "string" 23619 // }, 23620 // "assignedTargetingOptionId": { 23621 // "description": "Required. An identifier unique to the targeting type in this insertion order that identifies the assigned targeting option being requested.", 23622 // "location": "path", 23623 // "pattern": "^[^/]+$", 23624 // "required": true, 23625 // "type": "string" 23626 // }, 23627 // "insertionOrderId": { 23628 // "description": "Required. The ID of the insertion order the assigned targeting option belongs to.", 23629 // "format": "int64", 23630 // "location": "path", 23631 // "pattern": "^[^/]+$", 23632 // "required": true, 23633 // "type": "string" 23634 // }, 23635 // "targetingType": { 23636 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", 23637 // "enum": [ 23638 // "TARGETING_TYPE_UNSPECIFIED", 23639 // "TARGETING_TYPE_CHANNEL", 23640 // "TARGETING_TYPE_APP_CATEGORY", 23641 // "TARGETING_TYPE_APP", 23642 // "TARGETING_TYPE_URL", 23643 // "TARGETING_TYPE_DAY_AND_TIME", 23644 // "TARGETING_TYPE_AGE_RANGE", 23645 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 23646 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 23647 // "TARGETING_TYPE_GENDER", 23648 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 23649 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 23650 // "TARGETING_TYPE_PARENTAL_STATUS", 23651 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 23652 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 23653 // "TARGETING_TYPE_DEVICE_TYPE", 23654 // "TARGETING_TYPE_AUDIENCE_GROUP", 23655 // "TARGETING_TYPE_BROWSER", 23656 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 23657 // "TARGETING_TYPE_ON_SCREEN_POSITION", 23658 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 23659 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 23660 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 23661 // "TARGETING_TYPE_ENVIRONMENT", 23662 // "TARGETING_TYPE_CARRIER_AND_ISP", 23663 // "TARGETING_TYPE_OPERATING_SYSTEM", 23664 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 23665 // "TARGETING_TYPE_KEYWORD", 23666 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 23667 // "TARGETING_TYPE_VIEWABILITY", 23668 // "TARGETING_TYPE_CATEGORY", 23669 // "TARGETING_TYPE_INVENTORY_SOURCE", 23670 // "TARGETING_TYPE_LANGUAGE", 23671 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 23672 // "TARGETING_TYPE_GEO_REGION", 23673 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 23674 // "TARGETING_TYPE_EXCHANGE", 23675 // "TARGETING_TYPE_SUB_EXCHANGE", 23676 // "TARGETING_TYPE_POI", 23677 // "TARGETING_TYPE_BUSINESS_CHAIN", 23678 // "TARGETING_TYPE_CONTENT_DURATION", 23679 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 23680 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 23681 // "TARGETING_TYPE_OMID", 23682 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 23683 // "TARGETING_TYPE_CONTENT_GENRE" 23684 // ], 23685 // "enumDescriptions": [ 23686 // "Default value when type is not specified or is unknown in this version.", 23687 // "Target a channel (a custom group of related websites or apps).", 23688 // "Target an app category (for example, education or puzzle games).", 23689 // "Target a specific app (for example, Angry Birds).", 23690 // "Target a specific url (for example, quora.com).", 23691 // "Target ads during a chosen time period on a specific day.", 23692 // "Target ads to a specific age range (for example, 18-24).", 23693 // "Target ads to the specified regions on a regional location list.", 23694 // "Target ads to the specified points of interest on a proximity location list.", 23695 // "Target ads to a specific gender (for example, female or male).", 23696 // "Target a specific video player size for video ads.", 23697 // "Target user rewarded content for video ads.", 23698 // "Target ads to a specific parental status (for example, parent or not a parent).", 23699 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 23700 // "Target ads in a specific content outstream position.", 23701 // "Target ads to a specific device type (for example, tablet or connected TV).", 23702 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 23703 // "Target ads to specific web browsers (for example, Chrome).", 23704 // "Target ads to a specific household income range (for example, top 10%).", 23705 // "Target ads in a specific on screen position.", 23706 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 23707 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 23708 // "Filter website content by sensitive categories (for example, adult).", 23709 // "Target ads to a specific environment (for example, web or app).", 23710 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 23711 // "Target ads to a specific operating system (for example, macOS).", 23712 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 23713 // "Target ads to a specific keyword (for example, dog or retriever).", 23714 // "Target ads to a specific negative keyword list.", 23715 // "Target ads to a specific viewability (for example, 80% viewable).", 23716 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 23717 // "Purchase impressions from specific deals and auction packages.", 23718 // "Target ads to a specific language (for example, English or Japanese).", 23719 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 23720 // "Target ads to a specific regional location (for example, a city or state).", 23721 // "Purchase impressions from a group of deals and auction packages.", 23722 // "Purchase impressions from specific exchanges.", 23723 // "Purchase impressions from specific sub-exchanges.", 23724 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 23725 // "Target ads around locations of a business chain within a specific geo region.", 23726 // "Target ads to a specific video content duration.", 23727 // "Target ads to a specific video content stream type.", 23728 // "Target ads to a specific native content position.", 23729 // "Target ads in an Open Measurement enabled inventory.", 23730 // "Target ads to a specific audio content type.", 23731 // "Target ads to a specific content genre." 23732 // ], 23733 // "location": "path", 23734 // "pattern": "^[^/]+$", 23735 // "required": true, 23736 // "type": "string" 23737 // } 23738 // }, 23739 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 23740 // "response": { 23741 // "$ref": "AssignedTargetingOption" 23742 // }, 23743 // "scopes": [ 23744 // "https://www.googleapis.com/auth/display-video" 23745 // ] 23746 // } 23747 23748 } 23749 23750 // method id "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list": 23751 23752 type AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall struct { 23753 s *Service 23754 advertiserId int64 23755 insertionOrderId int64 23756 targetingType string 23757 urlParams_ gensupport.URLParams 23758 ifNoneMatch_ string 23759 ctx_ context.Context 23760 header_ http.Header 23761 } 23762 23763 // List: Lists the targeting options assigned to an insertion order. 23764 // 23765 // - advertiserId: The ID of the advertiser the insertion order belongs 23766 // to. 23767 // - insertionOrderId: The ID of the insertion order to list assigned 23768 // targeting options for. 23769 // - targetingType: Identifies the type of assigned targeting options to 23770 // list. Supported targeting types include: * 23771 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * 23772 // `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * 23773 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * 23774 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 23775 // `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * 23776 // `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * 23777 // `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * 23778 // `TARGETING_TYPE_CONTENT_GENRE` * 23779 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 23780 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 23781 // `TARGETING_TYPE_CONTENT_STREAM_TYPE` * 23782 // `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` 23783 // - `TARGETING_TYPE_DEVICE_TYPE` * 23784 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 23785 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 23786 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 23787 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 23788 // `TARGETING_TYPE_INVENTORY_SOURCE` * 23789 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` 23790 // - `TARGETING_TYPE_LANGUAGE` * 23791 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * 23792 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * 23793 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 23794 // `TARGETING_TYPE_OPERATING_SYSTEM` * 23795 // `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * 23796 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * 23797 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * 23798 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 23799 // `TARGETING_TYPE_SUB_EXCHANGE` * 23800 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * 23801 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 23802 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. 23803 func (r *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, insertionOrderId int64, targetingType string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23804 c := &AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23805 c.advertiserId = advertiserId 23806 c.insertionOrderId = insertionOrderId 23807 c.targetingType = targetingType 23808 return c 23809 } 23810 23811 // Filter sets the optional parameter "filter": Allows filtering by 23812 // assigned targeting option fields. Supported syntax: * Filter 23813 // expressions are made up of one or more restrictions. * Restrictions 23814 // can be combined by the logical operator `OR`. * A restriction has the 23815 // form of `{field} {operator} {value}`. * All fields must use the 23816 // `EQUALS (=)` operator. Supported fields: * 23817 // `assignedTargetingOptionId` * `inheritance` Examples: * 23818 // `AssignedTargetingOption` resources with ID 1 or 2: 23819 // `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * 23820 // `AssignedTargetingOption` resources with inheritance status of 23821 // `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: 23822 // `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER" 23823 // The length of this field should be no more than 500 characters. 23824 // Reference our filter `LIST` requests 23825 // (/display-video/api/guides/how-tos/filters) guide for more 23826 // information. 23827 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23828 c.urlParams_.Set("filter", filter) 23829 return c 23830 } 23831 23832 // OrderBy sets the optional parameter "orderBy": Field by which to sort 23833 // the list. Acceptable values are: * `assignedTargetingOptionId` 23834 // (default) The default sorting order is ascending. To specify 23835 // descending order for a field, a suffix "desc" should be added to the 23836 // field name. Example: `assignedTargetingOptionId desc`. 23837 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23838 c.urlParams_.Set("orderBy", orderBy) 23839 return c 23840 } 23841 23842 // PageSize sets the optional parameter "pageSize": Requested page size. 23843 // Must be between `1` and `5000`. If unspecified will default to `100`. 23844 // Returns error code `INVALID_ARGUMENT` if an invalid value is 23845 // specified. 23846 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23847 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 23848 return c 23849 } 23850 23851 // PageToken sets the optional parameter "pageToken": A token 23852 // identifying a page of results the server should return. Typically, 23853 // this is the value of next_page_token returned from the previous call 23854 // to `ListInsertionOrderAssignedTargetingOptions` method. If not 23855 // specified, the first page of results will be returned. 23856 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23857 c.urlParams_.Set("pageToken", pageToken) 23858 return c 23859 } 23860 23861 // Fields allows partial responses to be retrieved. See 23862 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23863 // for more information. 23864 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23865 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23866 return c 23867 } 23868 23869 // IfNoneMatch sets the optional parameter which makes the operation 23870 // fail if the object's ETag matches the given value. This is useful for 23871 // getting updates only after the object has changed since the last 23872 // request. Use googleapi.IsNotModified to check whether the response 23873 // error from Do is the result of In-None-Match. 23874 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23875 c.ifNoneMatch_ = entityTag 23876 return c 23877 } 23878 23879 // Context sets the context to be used in this call's Do method. Any 23880 // pending HTTP request will be aborted if the provided context is 23881 // canceled. 23882 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall { 23883 c.ctx_ = ctx 23884 return c 23885 } 23886 23887 // Header returns an http.Header that can be modified by the caller to 23888 // add HTTP headers to the request. 23889 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { 23890 if c.header_ == nil { 23891 c.header_ = make(http.Header) 23892 } 23893 return c.header_ 23894 } 23895 23896 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 23897 reqHeaders := make(http.Header) 23898 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 23899 for k, v := range c.header_ { 23900 reqHeaders[k] = v 23901 } 23902 reqHeaders.Set("User-Agent", c.s.userAgent()) 23903 if c.ifNoneMatch_ != "" { 23904 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23905 } 23906 var body io.Reader = nil 23907 c.urlParams_.Set("alt", alt) 23908 c.urlParams_.Set("prettyPrint", "false") 23909 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 23910 urls += "?" + c.urlParams_.Encode() 23911 req, err := http.NewRequest("GET", urls, body) 23912 if err != nil { 23913 return nil, err 23914 } 23915 req.Header = reqHeaders 23916 googleapi.Expand(req.URL, map[string]string{ 23917 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 23918 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 23919 "targetingType": c.targetingType, 23920 }) 23921 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23922 } 23923 23924 // Do executes the "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list" call. 23925 // Exactly one of *ListInsertionOrderAssignedTargetingOptionsResponse or 23926 // error will be non-nil. Any non-2xx status code is an error. Response 23927 // headers are in either 23928 // *ListInsertionOrderAssignedTargetingOptionsResponse.ServerResponse.Hea 23929 // der or (if a response was returned at all) in 23930 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 23931 // whether the returned error was because http.StatusNotModified was 23932 // returned. 23933 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrderAssignedTargetingOptionsResponse, error) { 23934 gensupport.SetOptions(c.urlParams_, opts...) 23935 res, err := c.doRequest("json") 23936 if res != nil && res.StatusCode == http.StatusNotModified { 23937 if res.Body != nil { 23938 res.Body.Close() 23939 } 23940 return nil, gensupport.WrapError(&googleapi.Error{ 23941 Code: res.StatusCode, 23942 Header: res.Header, 23943 }) 23944 } 23945 if err != nil { 23946 return nil, err 23947 } 23948 defer googleapi.CloseBody(res) 23949 if err := googleapi.CheckResponse(res); err != nil { 23950 return nil, gensupport.WrapError(err) 23951 } 23952 ret := &ListInsertionOrderAssignedTargetingOptionsResponse{ 23953 ServerResponse: googleapi.ServerResponse{ 23954 Header: res.Header, 23955 HTTPStatusCode: res.StatusCode, 23956 }, 23957 } 23958 target := &ret 23959 if err := gensupport.DecodeResponse(target, res); err != nil { 23960 return nil, err 23961 } 23962 return ret, nil 23963 // { 23964 // "description": "Lists the targeting options assigned to an insertion order.", 23965 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 23966 // "httpMethod": "GET", 23967 // "id": "displayvideo.advertisers.insertionOrders.targetingTypes.assignedTargetingOptions.list", 23968 // "parameterOrder": [ 23969 // "advertiserId", 23970 // "insertionOrderId", 23971 // "targetingType" 23972 // ], 23973 // "parameters": { 23974 // "advertiserId": { 23975 // "description": "Required. The ID of the advertiser the insertion order belongs to.", 23976 // "format": "int64", 23977 // "location": "path", 23978 // "pattern": "^[^/]+$", 23979 // "required": true, 23980 // "type": "string" 23981 // }, 23982 // "filter": { 23983 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2: `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 23984 // "location": "query", 23985 // "type": "string" 23986 // }, 23987 // "insertionOrderId": { 23988 // "description": "Required. The ID of the insertion order to list assigned targeting options for.", 23989 // "format": "int64", 23990 // "location": "path", 23991 // "pattern": "^[^/]+$", 23992 // "required": true, 23993 // "type": "string" 23994 // }, 23995 // "orderBy": { 23996 // "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", 23997 // "location": "query", 23998 // "type": "string" 23999 // }, 24000 // "pageSize": { 24001 // "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 24002 // "format": "int32", 24003 // "location": "query", 24004 // "type": "integer" 24005 // }, 24006 // "pageToken": { 24007 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInsertionOrderAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 24008 // "location": "query", 24009 // "type": "string" 24010 // }, 24011 // "targetingType": { 24012 // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", 24013 // "enum": [ 24014 // "TARGETING_TYPE_UNSPECIFIED", 24015 // "TARGETING_TYPE_CHANNEL", 24016 // "TARGETING_TYPE_APP_CATEGORY", 24017 // "TARGETING_TYPE_APP", 24018 // "TARGETING_TYPE_URL", 24019 // "TARGETING_TYPE_DAY_AND_TIME", 24020 // "TARGETING_TYPE_AGE_RANGE", 24021 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 24022 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 24023 // "TARGETING_TYPE_GENDER", 24024 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 24025 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 24026 // "TARGETING_TYPE_PARENTAL_STATUS", 24027 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 24028 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 24029 // "TARGETING_TYPE_DEVICE_TYPE", 24030 // "TARGETING_TYPE_AUDIENCE_GROUP", 24031 // "TARGETING_TYPE_BROWSER", 24032 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 24033 // "TARGETING_TYPE_ON_SCREEN_POSITION", 24034 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 24035 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 24036 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 24037 // "TARGETING_TYPE_ENVIRONMENT", 24038 // "TARGETING_TYPE_CARRIER_AND_ISP", 24039 // "TARGETING_TYPE_OPERATING_SYSTEM", 24040 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 24041 // "TARGETING_TYPE_KEYWORD", 24042 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 24043 // "TARGETING_TYPE_VIEWABILITY", 24044 // "TARGETING_TYPE_CATEGORY", 24045 // "TARGETING_TYPE_INVENTORY_SOURCE", 24046 // "TARGETING_TYPE_LANGUAGE", 24047 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 24048 // "TARGETING_TYPE_GEO_REGION", 24049 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 24050 // "TARGETING_TYPE_EXCHANGE", 24051 // "TARGETING_TYPE_SUB_EXCHANGE", 24052 // "TARGETING_TYPE_POI", 24053 // "TARGETING_TYPE_BUSINESS_CHAIN", 24054 // "TARGETING_TYPE_CONTENT_DURATION", 24055 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 24056 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 24057 // "TARGETING_TYPE_OMID", 24058 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 24059 // "TARGETING_TYPE_CONTENT_GENRE" 24060 // ], 24061 // "enumDescriptions": [ 24062 // "Default value when type is not specified or is unknown in this version.", 24063 // "Target a channel (a custom group of related websites or apps).", 24064 // "Target an app category (for example, education or puzzle games).", 24065 // "Target a specific app (for example, Angry Birds).", 24066 // "Target a specific url (for example, quora.com).", 24067 // "Target ads during a chosen time period on a specific day.", 24068 // "Target ads to a specific age range (for example, 18-24).", 24069 // "Target ads to the specified regions on a regional location list.", 24070 // "Target ads to the specified points of interest on a proximity location list.", 24071 // "Target ads to a specific gender (for example, female or male).", 24072 // "Target a specific video player size for video ads.", 24073 // "Target user rewarded content for video ads.", 24074 // "Target ads to a specific parental status (for example, parent or not a parent).", 24075 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 24076 // "Target ads in a specific content outstream position.", 24077 // "Target ads to a specific device type (for example, tablet or connected TV).", 24078 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 24079 // "Target ads to specific web browsers (for example, Chrome).", 24080 // "Target ads to a specific household income range (for example, top 10%).", 24081 // "Target ads in a specific on screen position.", 24082 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 24083 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 24084 // "Filter website content by sensitive categories (for example, adult).", 24085 // "Target ads to a specific environment (for example, web or app).", 24086 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 24087 // "Target ads to a specific operating system (for example, macOS).", 24088 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 24089 // "Target ads to a specific keyword (for example, dog or retriever).", 24090 // "Target ads to a specific negative keyword list.", 24091 // "Target ads to a specific viewability (for example, 80% viewable).", 24092 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 24093 // "Purchase impressions from specific deals and auction packages.", 24094 // "Target ads to a specific language (for example, English or Japanese).", 24095 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 24096 // "Target ads to a specific regional location (for example, a city or state).", 24097 // "Purchase impressions from a group of deals and auction packages.", 24098 // "Purchase impressions from specific exchanges.", 24099 // "Purchase impressions from specific sub-exchanges.", 24100 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 24101 // "Target ads around locations of a business chain within a specific geo region.", 24102 // "Target ads to a specific video content duration.", 24103 // "Target ads to a specific video content stream type.", 24104 // "Target ads to a specific native content position.", 24105 // "Target ads in an Open Measurement enabled inventory.", 24106 // "Target ads to a specific audio content type.", 24107 // "Target ads to a specific content genre." 24108 // ], 24109 // "location": "path", 24110 // "pattern": "^[^/]+$", 24111 // "required": true, 24112 // "type": "string" 24113 // } 24114 // }, 24115 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 24116 // "response": { 24117 // "$ref": "ListInsertionOrderAssignedTargetingOptionsResponse" 24118 // }, 24119 // "scopes": [ 24120 // "https://www.googleapis.com/auth/display-video" 24121 // ] 24122 // } 24123 24124 } 24125 24126 // Pages invokes f for each page of results. 24127 // A non-nil error returned from f will halt the iteration. 24128 // The provided context supersedes any context provided to the Context method. 24129 func (c *AdvertisersInsertionOrdersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListInsertionOrderAssignedTargetingOptionsResponse) error) error { 24130 c.ctx_ = ctx 24131 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 24132 for { 24133 x, err := c.Do() 24134 if err != nil { 24135 return err 24136 } 24137 if err := f(x); err != nil { 24138 return err 24139 } 24140 if x.NextPageToken == "" { 24141 return nil 24142 } 24143 c.PageToken(x.NextPageToken) 24144 } 24145 } 24146 24147 // method id "displayvideo.advertisers.invoices.list": 24148 24149 type AdvertisersInvoicesListCall struct { 24150 s *Service 24151 advertiserId int64 24152 urlParams_ gensupport.URLParams 24153 ifNoneMatch_ string 24154 ctx_ context.Context 24155 header_ http.Header 24156 } 24157 24158 // List: Lists invoices posted for an advertiser in a given month. 24159 // Invoices generated by billing profiles with a "Partner" invoice level 24160 // are not retrievable through this method. 24161 // 24162 // - advertiserId: The ID of the advertiser to list invoices for. 24163 func (r *AdvertisersInvoicesService) List(advertiserId int64) *AdvertisersInvoicesListCall { 24164 c := &AdvertisersInvoicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24165 c.advertiserId = advertiserId 24166 return c 24167 } 24168 24169 // IssueMonth sets the optional parameter "issueMonth": The month to 24170 // list the invoices for. If not set, the request will retrieve invoices 24171 // for the previous month. Must be in the format YYYYMM. 24172 func (c *AdvertisersInvoicesListCall) IssueMonth(issueMonth string) *AdvertisersInvoicesListCall { 24173 c.urlParams_.Set("issueMonth", issueMonth) 24174 return c 24175 } 24176 24177 // LoiSapinInvoiceType sets the optional parameter 24178 // "loiSapinInvoiceType": Select type of invoice to retrieve for Loi 24179 // Sapin advertisers. Only applicable to Loi Sapin advertisers. Will be 24180 // ignored otherwise. 24181 // 24182 // Possible values: 24183 // 24184 // "LOI_SAPIN_INVOICE_TYPE_UNSPECIFIED" - Value is not specified. 24185 // "LOI_SAPIN_INVOICE_TYPE_MEDIA" - Invoices with Media cost. 24186 // "LOI_SAPIN_INVOICE_TYPE_PLATFORM" - Invoices with Platform fee. 24187 func (c *AdvertisersInvoicesListCall) LoiSapinInvoiceType(loiSapinInvoiceType string) *AdvertisersInvoicesListCall { 24188 c.urlParams_.Set("loiSapinInvoiceType", loiSapinInvoiceType) 24189 return c 24190 } 24191 24192 // PageSize sets the optional parameter "pageSize": Requested page size. 24193 // Must be between `1` and `200`. If unspecified will default to `100`. 24194 // Returns error code `INVALID_ARGUMENT` if an invalid value is 24195 // specified. 24196 func (c *AdvertisersInvoicesListCall) PageSize(pageSize int64) *AdvertisersInvoicesListCall { 24197 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 24198 return c 24199 } 24200 24201 // PageToken sets the optional parameter "pageToken": A token 24202 // identifying a page of results the server should return. Typically, 24203 // this is the value of next_page_token returned from the previous call 24204 // to `ListInvoices` method. If not specified, the first page of results 24205 // will be returned. 24206 func (c *AdvertisersInvoicesListCall) PageToken(pageToken string) *AdvertisersInvoicesListCall { 24207 c.urlParams_.Set("pageToken", pageToken) 24208 return c 24209 } 24210 24211 // Fields allows partial responses to be retrieved. See 24212 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24213 // for more information. 24214 func (c *AdvertisersInvoicesListCall) Fields(s ...googleapi.Field) *AdvertisersInvoicesListCall { 24215 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24216 return c 24217 } 24218 24219 // IfNoneMatch sets the optional parameter which makes the operation 24220 // fail if the object's ETag matches the given value. This is useful for 24221 // getting updates only after the object has changed since the last 24222 // request. Use googleapi.IsNotModified to check whether the response 24223 // error from Do is the result of In-None-Match. 24224 func (c *AdvertisersInvoicesListCall) IfNoneMatch(entityTag string) *AdvertisersInvoicesListCall { 24225 c.ifNoneMatch_ = entityTag 24226 return c 24227 } 24228 24229 // Context sets the context to be used in this call's Do method. Any 24230 // pending HTTP request will be aborted if the provided context is 24231 // canceled. 24232 func (c *AdvertisersInvoicesListCall) Context(ctx context.Context) *AdvertisersInvoicesListCall { 24233 c.ctx_ = ctx 24234 return c 24235 } 24236 24237 // Header returns an http.Header that can be modified by the caller to 24238 // add HTTP headers to the request. 24239 func (c *AdvertisersInvoicesListCall) Header() http.Header { 24240 if c.header_ == nil { 24241 c.header_ = make(http.Header) 24242 } 24243 return c.header_ 24244 } 24245 24246 func (c *AdvertisersInvoicesListCall) doRequest(alt string) (*http.Response, error) { 24247 reqHeaders := make(http.Header) 24248 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 24249 for k, v := range c.header_ { 24250 reqHeaders[k] = v 24251 } 24252 reqHeaders.Set("User-Agent", c.s.userAgent()) 24253 if c.ifNoneMatch_ != "" { 24254 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24255 } 24256 var body io.Reader = nil 24257 c.urlParams_.Set("alt", alt) 24258 c.urlParams_.Set("prettyPrint", "false") 24259 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/invoices") 24260 urls += "?" + c.urlParams_.Encode() 24261 req, err := http.NewRequest("GET", urls, body) 24262 if err != nil { 24263 return nil, err 24264 } 24265 req.Header = reqHeaders 24266 googleapi.Expand(req.URL, map[string]string{ 24267 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 24268 }) 24269 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24270 } 24271 24272 // Do executes the "displayvideo.advertisers.invoices.list" call. 24273 // Exactly one of *ListInvoicesResponse or error will be non-nil. Any 24274 // non-2xx status code is an error. Response headers are in either 24275 // *ListInvoicesResponse.ServerResponse.Header or (if a response was 24276 // returned at all) in error.(*googleapi.Error).Header. Use 24277 // googleapi.IsNotModified to check whether the returned error was 24278 // because http.StatusNotModified was returned. 24279 func (c *AdvertisersInvoicesListCall) Do(opts ...googleapi.CallOption) (*ListInvoicesResponse, error) { 24280 gensupport.SetOptions(c.urlParams_, opts...) 24281 res, err := c.doRequest("json") 24282 if res != nil && res.StatusCode == http.StatusNotModified { 24283 if res.Body != nil { 24284 res.Body.Close() 24285 } 24286 return nil, gensupport.WrapError(&googleapi.Error{ 24287 Code: res.StatusCode, 24288 Header: res.Header, 24289 }) 24290 } 24291 if err != nil { 24292 return nil, err 24293 } 24294 defer googleapi.CloseBody(res) 24295 if err := googleapi.CheckResponse(res); err != nil { 24296 return nil, gensupport.WrapError(err) 24297 } 24298 ret := &ListInvoicesResponse{ 24299 ServerResponse: googleapi.ServerResponse{ 24300 Header: res.Header, 24301 HTTPStatusCode: res.StatusCode, 24302 }, 24303 } 24304 target := &ret 24305 if err := gensupport.DecodeResponse(target, res); err != nil { 24306 return nil, err 24307 } 24308 return ret, nil 24309 // { 24310 // "description": "Lists invoices posted for an advertiser in a given month. Invoices generated by billing profiles with a \"Partner\" invoice level are not retrievable through this method.", 24311 // "flatPath": "v1/advertisers/{advertisersId}/invoices", 24312 // "httpMethod": "GET", 24313 // "id": "displayvideo.advertisers.invoices.list", 24314 // "parameterOrder": [ 24315 // "advertiserId" 24316 // ], 24317 // "parameters": { 24318 // "advertiserId": { 24319 // "description": "Required. The ID of the advertiser to list invoices for.", 24320 // "format": "int64", 24321 // "location": "path", 24322 // "pattern": "^[^/]+$", 24323 // "required": true, 24324 // "type": "string" 24325 // }, 24326 // "issueMonth": { 24327 // "description": "The month to list the invoices for. If not set, the request will retrieve invoices for the previous month. Must be in the format YYYYMM.", 24328 // "location": "query", 24329 // "type": "string" 24330 // }, 24331 // "loiSapinInvoiceType": { 24332 // "description": "Select type of invoice to retrieve for Loi Sapin advertisers. Only applicable to Loi Sapin advertisers. Will be ignored otherwise.", 24333 // "enum": [ 24334 // "LOI_SAPIN_INVOICE_TYPE_UNSPECIFIED", 24335 // "LOI_SAPIN_INVOICE_TYPE_MEDIA", 24336 // "LOI_SAPIN_INVOICE_TYPE_PLATFORM" 24337 // ], 24338 // "enumDescriptions": [ 24339 // "Value is not specified.", 24340 // "Invoices with Media cost.", 24341 // "Invoices with Platform fee." 24342 // ], 24343 // "location": "query", 24344 // "type": "string" 24345 // }, 24346 // "pageSize": { 24347 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 24348 // "format": "int32", 24349 // "location": "query", 24350 // "type": "integer" 24351 // }, 24352 // "pageToken": { 24353 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInvoices` method. If not specified, the first page of results will be returned.", 24354 // "location": "query", 24355 // "type": "string" 24356 // } 24357 // }, 24358 // "path": "v1/advertisers/{+advertiserId}/invoices", 24359 // "response": { 24360 // "$ref": "ListInvoicesResponse" 24361 // }, 24362 // "scopes": [ 24363 // "https://www.googleapis.com/auth/display-video", 24364 // "https://www.googleapis.com/auth/display-video-mediaplanning" 24365 // ] 24366 // } 24367 24368 } 24369 24370 // Pages invokes f for each page of results. 24371 // A non-nil error returned from f will halt the iteration. 24372 // The provided context supersedes any context provided to the Context method. 24373 func (c *AdvertisersInvoicesListCall) Pages(ctx context.Context, f func(*ListInvoicesResponse) error) error { 24374 c.ctx_ = ctx 24375 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 24376 for { 24377 x, err := c.Do() 24378 if err != nil { 24379 return err 24380 } 24381 if err := f(x); err != nil { 24382 return err 24383 } 24384 if x.NextPageToken == "" { 24385 return nil 24386 } 24387 c.PageToken(x.NextPageToken) 24388 } 24389 } 24390 24391 // method id "displayvideo.advertisers.invoices.lookupInvoiceCurrency": 24392 24393 type AdvertisersInvoicesLookupInvoiceCurrencyCall struct { 24394 s *Service 24395 advertiserId int64 24396 urlParams_ gensupport.URLParams 24397 ifNoneMatch_ string 24398 ctx_ context.Context 24399 header_ http.Header 24400 } 24401 24402 // LookupInvoiceCurrency: Retrieves the invoice currency used by an 24403 // advertiser in a given month. 24404 // 24405 // - advertiserId: The ID of the advertiser to lookup currency for. 24406 func (r *AdvertisersInvoicesService) LookupInvoiceCurrency(advertiserId int64) *AdvertisersInvoicesLookupInvoiceCurrencyCall { 24407 c := &AdvertisersInvoicesLookupInvoiceCurrencyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24408 c.advertiserId = advertiserId 24409 return c 24410 } 24411 24412 // InvoiceMonth sets the optional parameter "invoiceMonth": Month for 24413 // which the currency is needed. If not set, the request will return 24414 // existing currency settings for the advertiser. Must be in the format 24415 // YYYYMM. 24416 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) InvoiceMonth(invoiceMonth string) *AdvertisersInvoicesLookupInvoiceCurrencyCall { 24417 c.urlParams_.Set("invoiceMonth", invoiceMonth) 24418 return c 24419 } 24420 24421 // Fields allows partial responses to be retrieved. See 24422 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24423 // for more information. 24424 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Fields(s ...googleapi.Field) *AdvertisersInvoicesLookupInvoiceCurrencyCall { 24425 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24426 return c 24427 } 24428 24429 // IfNoneMatch sets the optional parameter which makes the operation 24430 // fail if the object's ETag matches the given value. This is useful for 24431 // getting updates only after the object has changed since the last 24432 // request. Use googleapi.IsNotModified to check whether the response 24433 // error from Do is the result of In-None-Match. 24434 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) IfNoneMatch(entityTag string) *AdvertisersInvoicesLookupInvoiceCurrencyCall { 24435 c.ifNoneMatch_ = entityTag 24436 return c 24437 } 24438 24439 // Context sets the context to be used in this call's Do method. Any 24440 // pending HTTP request will be aborted if the provided context is 24441 // canceled. 24442 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Context(ctx context.Context) *AdvertisersInvoicesLookupInvoiceCurrencyCall { 24443 c.ctx_ = ctx 24444 return c 24445 } 24446 24447 // Header returns an http.Header that can be modified by the caller to 24448 // add HTTP headers to the request. 24449 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Header() http.Header { 24450 if c.header_ == nil { 24451 c.header_ = make(http.Header) 24452 } 24453 return c.header_ 24454 } 24455 24456 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) doRequest(alt string) (*http.Response, error) { 24457 reqHeaders := make(http.Header) 24458 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 24459 for k, v := range c.header_ { 24460 reqHeaders[k] = v 24461 } 24462 reqHeaders.Set("User-Agent", c.s.userAgent()) 24463 if c.ifNoneMatch_ != "" { 24464 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24465 } 24466 var body io.Reader = nil 24467 c.urlParams_.Set("alt", alt) 24468 c.urlParams_.Set("prettyPrint", "false") 24469 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/invoices:lookupInvoiceCurrency") 24470 urls += "?" + c.urlParams_.Encode() 24471 req, err := http.NewRequest("GET", urls, body) 24472 if err != nil { 24473 return nil, err 24474 } 24475 req.Header = reqHeaders 24476 googleapi.Expand(req.URL, map[string]string{ 24477 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 24478 }) 24479 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24480 } 24481 24482 // Do executes the "displayvideo.advertisers.invoices.lookupInvoiceCurrency" call. 24483 // Exactly one of *LookupInvoiceCurrencyResponse or error will be 24484 // non-nil. Any non-2xx status code is an error. Response headers are in 24485 // either *LookupInvoiceCurrencyResponse.ServerResponse.Header or (if a 24486 // response was returned at all) in error.(*googleapi.Error).Header. Use 24487 // googleapi.IsNotModified to check whether the returned error was 24488 // because http.StatusNotModified was returned. 24489 func (c *AdvertisersInvoicesLookupInvoiceCurrencyCall) Do(opts ...googleapi.CallOption) (*LookupInvoiceCurrencyResponse, error) { 24490 gensupport.SetOptions(c.urlParams_, opts...) 24491 res, err := c.doRequest("json") 24492 if res != nil && res.StatusCode == http.StatusNotModified { 24493 if res.Body != nil { 24494 res.Body.Close() 24495 } 24496 return nil, gensupport.WrapError(&googleapi.Error{ 24497 Code: res.StatusCode, 24498 Header: res.Header, 24499 }) 24500 } 24501 if err != nil { 24502 return nil, err 24503 } 24504 defer googleapi.CloseBody(res) 24505 if err := googleapi.CheckResponse(res); err != nil { 24506 return nil, gensupport.WrapError(err) 24507 } 24508 ret := &LookupInvoiceCurrencyResponse{ 24509 ServerResponse: googleapi.ServerResponse{ 24510 Header: res.Header, 24511 HTTPStatusCode: res.StatusCode, 24512 }, 24513 } 24514 target := &ret 24515 if err := gensupport.DecodeResponse(target, res); err != nil { 24516 return nil, err 24517 } 24518 return ret, nil 24519 // { 24520 // "description": "Retrieves the invoice currency used by an advertiser in a given month.", 24521 // "flatPath": "v1/advertisers/{advertisersId}/invoices:lookupInvoiceCurrency", 24522 // "httpMethod": "GET", 24523 // "id": "displayvideo.advertisers.invoices.lookupInvoiceCurrency", 24524 // "parameterOrder": [ 24525 // "advertiserId" 24526 // ], 24527 // "parameters": { 24528 // "advertiserId": { 24529 // "description": "Required. The ID of the advertiser to lookup currency for.", 24530 // "format": "int64", 24531 // "location": "path", 24532 // "pattern": "^[^/]+$", 24533 // "required": true, 24534 // "type": "string" 24535 // }, 24536 // "invoiceMonth": { 24537 // "description": "Month for which the currency is needed. If not set, the request will return existing currency settings for the advertiser. Must be in the format YYYYMM.", 24538 // "location": "query", 24539 // "type": "string" 24540 // } 24541 // }, 24542 // "path": "v1/advertisers/{+advertiserId}/invoices:lookupInvoiceCurrency", 24543 // "response": { 24544 // "$ref": "LookupInvoiceCurrencyResponse" 24545 // }, 24546 // "scopes": [ 24547 // "https://www.googleapis.com/auth/display-video", 24548 // "https://www.googleapis.com/auth/display-video-mediaplanning" 24549 // ] 24550 // } 24551 24552 } 24553 24554 // method id "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions": 24555 24556 type AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall struct { 24557 s *Service 24558 advertiserId int64 24559 lineItemId int64 24560 bulkeditlineitemassignedtargetingoptionsrequest *BulkEditLineItemAssignedTargetingOptionsRequest 24561 urlParams_ gensupport.URLParams 24562 ctx_ context.Context 24563 header_ http.Header 24564 } 24565 24566 // BulkEditLineItemAssignedTargetingOptions: Bulk edits targeting 24567 // options under a single line item. The operation will delete the 24568 // assigned targeting options provided in 24569 // BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and 24570 // then create the assigned targeting options provided in 24571 // BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. 24572 // Requests to this endpoint cannot be made concurrently with the 24573 // following requests updating the same line item: * lineItems.patch * 24574 // assignedTargetingOptions.create * assignedTargetingOptions.delete 24575 // YouTube & Partners line items cannot be created or updated using the 24576 // API. 24577 // 24578 // - advertiserId: The ID of the advertiser the line item belongs to. 24579 // - lineItemId: The ID of the line item the assigned targeting option 24580 // will belong to. 24581 func (r *AdvertisersLineItemsService) BulkEditLineItemAssignedTargetingOptions(advertiserId int64, lineItemId int64, bulkeditlineitemassignedtargetingoptionsrequest *BulkEditLineItemAssignedTargetingOptionsRequest) *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall { 24582 c := &AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24583 c.advertiserId = advertiserId 24584 c.lineItemId = lineItemId 24585 c.bulkeditlineitemassignedtargetingoptionsrequest = bulkeditlineitemassignedtargetingoptionsrequest 24586 return c 24587 } 24588 24589 // Fields allows partial responses to be retrieved. See 24590 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24591 // for more information. 24592 func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall { 24593 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24594 return c 24595 } 24596 24597 // Context sets the context to be used in this call's Do method. Any 24598 // pending HTTP request will be aborted if the provided context is 24599 // canceled. 24600 func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall { 24601 c.ctx_ = ctx 24602 return c 24603 } 24604 24605 // Header returns an http.Header that can be modified by the caller to 24606 // add HTTP headers to the request. 24607 func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Header() http.Header { 24608 if c.header_ == nil { 24609 c.header_ = make(http.Header) 24610 } 24611 return c.header_ 24612 } 24613 24614 func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 24615 reqHeaders := make(http.Header) 24616 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 24617 for k, v := range c.header_ { 24618 reqHeaders[k] = v 24619 } 24620 reqHeaders.Set("User-Agent", c.s.userAgent()) 24621 var body io.Reader = nil 24622 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditlineitemassignedtargetingoptionsrequest) 24623 if err != nil { 24624 return nil, err 24625 } 24626 reqHeaders.Set("Content-Type", "application/json") 24627 c.urlParams_.Set("alt", alt) 24628 c.urlParams_.Set("prettyPrint", "false") 24629 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkEditLineItemAssignedTargetingOptions") 24630 urls += "?" + c.urlParams_.Encode() 24631 req, err := http.NewRequest("POST", urls, body) 24632 if err != nil { 24633 return nil, err 24634 } 24635 req.Header = reqHeaders 24636 googleapi.Expand(req.URL, map[string]string{ 24637 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 24638 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 24639 }) 24640 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24641 } 24642 24643 // Do executes the "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions" call. 24644 // Exactly one of *BulkEditLineItemAssignedTargetingOptionsResponse or 24645 // error will be non-nil. Any non-2xx status code is an error. Response 24646 // headers are in either 24647 // *BulkEditLineItemAssignedTargetingOptionsResponse.ServerResponse.Heade 24648 // r or (if a response was returned at all) in 24649 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 24650 // whether the returned error was because http.StatusNotModified was 24651 // returned. 24652 func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditLineItemAssignedTargetingOptionsResponse, error) { 24653 gensupport.SetOptions(c.urlParams_, opts...) 24654 res, err := c.doRequest("json") 24655 if res != nil && res.StatusCode == http.StatusNotModified { 24656 if res.Body != nil { 24657 res.Body.Close() 24658 } 24659 return nil, gensupport.WrapError(&googleapi.Error{ 24660 Code: res.StatusCode, 24661 Header: res.Header, 24662 }) 24663 } 24664 if err != nil { 24665 return nil, err 24666 } 24667 defer googleapi.CloseBody(res) 24668 if err := googleapi.CheckResponse(res); err != nil { 24669 return nil, gensupport.WrapError(err) 24670 } 24671 ret := &BulkEditLineItemAssignedTargetingOptionsResponse{ 24672 ServerResponse: googleapi.ServerResponse{ 24673 Header: res.Header, 24674 HTTPStatusCode: res.StatusCode, 24675 }, 24676 } 24677 target := &ret 24678 if err := gensupport.DecodeResponse(target, res); err != nil { 24679 return nil, err 24680 } 24681 return ret, nil 24682 // { 24683 // "description": "Bulk edits targeting options under a single line item. The operation will delete the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditLineItemAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.patch * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", 24684 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}:bulkEditLineItemAssignedTargetingOptions", 24685 // "httpMethod": "POST", 24686 // "id": "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions", 24687 // "parameterOrder": [ 24688 // "advertiserId", 24689 // "lineItemId" 24690 // ], 24691 // "parameters": { 24692 // "advertiserId": { 24693 // "description": "Required. The ID of the advertiser the line item belongs to.", 24694 // "format": "int64", 24695 // "location": "path", 24696 // "pattern": "^[^/]+$", 24697 // "required": true, 24698 // "type": "string" 24699 // }, 24700 // "lineItemId": { 24701 // "description": "Required. The ID of the line item the assigned targeting option will belong to.", 24702 // "format": "int64", 24703 // "location": "path", 24704 // "pattern": "^[^/]+$", 24705 // "required": true, 24706 // "type": "string" 24707 // } 24708 // }, 24709 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkEditLineItemAssignedTargetingOptions", 24710 // "request": { 24711 // "$ref": "BulkEditLineItemAssignedTargetingOptionsRequest" 24712 // }, 24713 // "response": { 24714 // "$ref": "BulkEditLineItemAssignedTargetingOptionsResponse" 24715 // }, 24716 // "scopes": [ 24717 // "https://www.googleapis.com/auth/display-video" 24718 // ] 24719 // } 24720 24721 } 24722 24723 // method id "displayvideo.advertisers.lineItems.bulkListLineItemAssignedTargetingOptions": 24724 24725 type AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall struct { 24726 s *Service 24727 advertiserId int64 24728 lineItemId int64 24729 urlParams_ gensupport.URLParams 24730 ifNoneMatch_ string 24731 ctx_ context.Context 24732 header_ http.Header 24733 } 24734 24735 // BulkListLineItemAssignedTargetingOptions: Lists assigned targeting 24736 // options of a line item across targeting types. 24737 // 24738 // - advertiserId: The ID of the advertiser the line item belongs to. 24739 // - lineItemId: The ID of the line item to list assigned targeting 24740 // options for. 24741 func (r *AdvertisersLineItemsService) BulkListLineItemAssignedTargetingOptions(advertiserId int64, lineItemId int64) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24742 c := &AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24743 c.advertiserId = advertiserId 24744 c.lineItemId = lineItemId 24745 return c 24746 } 24747 24748 // Filter sets the optional parameter "filter": Allows filtering by 24749 // assigned targeting option fields. Supported syntax: * Filter 24750 // expressions are made up of one or more restrictions. * Restrictions 24751 // can be combined by the logical operator `OR`. * A restriction has the 24752 // form of `{field} {operator} {value}`. * All fields must use the 24753 // `EQUALS (=)` operator. Supported fields: * `targetingType` * 24754 // `inheritance` Examples: * `AssignedTargetingOption` resources of 24755 // targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or 24756 // `TARGETING_TYPE_CHANNEL`: 24757 // `targetingType="TARGETING_TYPE_PROXIMITY_LOCATION_LIST" OR 24758 // targetingType="TARGETING_TYPE_CHANNEL" * `AssignedTargetingOption` 24759 // resources with inheritance status of `NOT_INHERITED` or 24760 // `INHERITED_FROM_PARTNER`: `inheritance="NOT_INHERITED" OR 24761 // inheritance="INHERITED_FROM_PARTNER" The length of this field should 24762 // be no more than 500 characters. Reference our filter `LIST` requests 24763 // (/display-video/api/guides/how-tos/filters) guide for more 24764 // information. 24765 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24766 c.urlParams_.Set("filter", filter) 24767 return c 24768 } 24769 24770 // OrderBy sets the optional parameter "orderBy": Field by which to sort 24771 // the list. Acceptable values are: * `targetingType` (default) The 24772 // default sorting order is ascending. To specify descending order for a 24773 // field, a suffix "desc" should be added to the field name. Example: 24774 // `targetingType desc`. 24775 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24776 c.urlParams_.Set("orderBy", orderBy) 24777 return c 24778 } 24779 24780 // PageSize sets the optional parameter "pageSize": Requested page size. 24781 // The size must be an integer between `1` and `5000`. If unspecified, 24782 // the default is `5000`. Returns error code `INVALID_ARGUMENT` if an 24783 // invalid value is specified. 24784 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24785 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 24786 return c 24787 } 24788 24789 // PageToken sets the optional parameter "pageToken": A token that lets 24790 // the client fetch the next page of results. Typically, this is the 24791 // value of next_page_token returned from the previous call to 24792 // `BulkListLineItemAssignedTargetingOptions` method. If not specified, 24793 // the first page of results will be returned. 24794 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24795 c.urlParams_.Set("pageToken", pageToken) 24796 return c 24797 } 24798 24799 // Fields allows partial responses to be retrieved. See 24800 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 24801 // for more information. 24802 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24803 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 24804 return c 24805 } 24806 24807 // IfNoneMatch sets the optional parameter which makes the operation 24808 // fail if the object's ETag matches the given value. This is useful for 24809 // getting updates only after the object has changed since the last 24810 // request. Use googleapi.IsNotModified to check whether the response 24811 // error from Do is the result of In-None-Match. 24812 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24813 c.ifNoneMatch_ = entityTag 24814 return c 24815 } 24816 24817 // Context sets the context to be used in this call's Do method. Any 24818 // pending HTTP request will be aborted if the provided context is 24819 // canceled. 24820 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 24821 c.ctx_ = ctx 24822 return c 24823 } 24824 24825 // Header returns an http.Header that can be modified by the caller to 24826 // add HTTP headers to the request. 24827 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Header() http.Header { 24828 if c.header_ == nil { 24829 c.header_ = make(http.Header) 24830 } 24831 return c.header_ 24832 } 24833 24834 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 24835 reqHeaders := make(http.Header) 24836 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 24837 for k, v := range c.header_ { 24838 reqHeaders[k] = v 24839 } 24840 reqHeaders.Set("User-Agent", c.s.userAgent()) 24841 if c.ifNoneMatch_ != "" { 24842 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 24843 } 24844 var body io.Reader = nil 24845 c.urlParams_.Set("alt", alt) 24846 c.urlParams_.Set("prettyPrint", "false") 24847 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkListLineItemAssignedTargetingOptions") 24848 urls += "?" + c.urlParams_.Encode() 24849 req, err := http.NewRequest("GET", urls, body) 24850 if err != nil { 24851 return nil, err 24852 } 24853 req.Header = reqHeaders 24854 googleapi.Expand(req.URL, map[string]string{ 24855 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 24856 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 24857 }) 24858 return gensupport.SendRequest(c.ctx_, c.s.client, req) 24859 } 24860 24861 // Do executes the "displayvideo.advertisers.lineItems.bulkListLineItemAssignedTargetingOptions" call. 24862 // Exactly one of *BulkListLineItemAssignedTargetingOptionsResponse or 24863 // error will be non-nil. Any non-2xx status code is an error. Response 24864 // headers are in either 24865 // *BulkListLineItemAssignedTargetingOptionsResponse.ServerResponse.Heade 24866 // r or (if a response was returned at all) in 24867 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 24868 // whether the returned error was because http.StatusNotModified was 24869 // returned. 24870 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListLineItemAssignedTargetingOptionsResponse, error) { 24871 gensupport.SetOptions(c.urlParams_, opts...) 24872 res, err := c.doRequest("json") 24873 if res != nil && res.StatusCode == http.StatusNotModified { 24874 if res.Body != nil { 24875 res.Body.Close() 24876 } 24877 return nil, gensupport.WrapError(&googleapi.Error{ 24878 Code: res.StatusCode, 24879 Header: res.Header, 24880 }) 24881 } 24882 if err != nil { 24883 return nil, err 24884 } 24885 defer googleapi.CloseBody(res) 24886 if err := googleapi.CheckResponse(res); err != nil { 24887 return nil, gensupport.WrapError(err) 24888 } 24889 ret := &BulkListLineItemAssignedTargetingOptionsResponse{ 24890 ServerResponse: googleapi.ServerResponse{ 24891 Header: res.Header, 24892 HTTPStatusCode: res.StatusCode, 24893 }, 24894 } 24895 target := &ret 24896 if err := gensupport.DecodeResponse(target, res); err != nil { 24897 return nil, err 24898 } 24899 return ret, nil 24900 // { 24901 // "description": "Lists assigned targeting options of a line item across targeting types.", 24902 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}:bulkListLineItemAssignedTargetingOptions", 24903 // "httpMethod": "GET", 24904 // "id": "displayvideo.advertisers.lineItems.bulkListLineItemAssignedTargetingOptions", 24905 // "parameterOrder": [ 24906 // "advertiserId", 24907 // "lineItemId" 24908 // ], 24909 // "parameters": { 24910 // "advertiserId": { 24911 // "description": "Required. The ID of the advertiser the line item belongs to.", 24912 // "format": "int64", 24913 // "location": "path", 24914 // "pattern": "^[^/]+$", 24915 // "required": true, 24916 // "type": "string" 24917 // }, 24918 // "filter": { 24919 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `targetingType` * `inheritance` Examples: * `AssignedTargetingOption` resources of targeting type `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` or `TARGETING_TYPE_CHANNEL`: `targetingType=\"TARGETING_TYPE_PROXIMITY_LOCATION_LIST\" OR targetingType=\"TARGETING_TYPE_CHANNEL\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 24920 // "location": "query", 24921 // "type": "string" 24922 // }, 24923 // "lineItemId": { 24924 // "description": "Required. The ID of the line item to list assigned targeting options for.", 24925 // "format": "int64", 24926 // "location": "path", 24927 // "pattern": "^[^/]+$", 24928 // "required": true, 24929 // "type": "string" 24930 // }, 24931 // "orderBy": { 24932 // "description": "Field by which to sort the list. Acceptable values are: * `targetingType` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingType desc`.", 24933 // "location": "query", 24934 // "type": "string" 24935 // }, 24936 // "pageSize": { 24937 // "description": "Requested page size. The size must be an integer between `1` and `5000`. If unspecified, the default is `5000`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 24938 // "format": "int32", 24939 // "location": "query", 24940 // "type": "integer" 24941 // }, 24942 // "pageToken": { 24943 // "description": "A token that lets the client fetch the next page of results. Typically, this is the value of next_page_token returned from the previous call to `BulkListLineItemAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 24944 // "location": "query", 24945 // "type": "string" 24946 // } 24947 // }, 24948 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkListLineItemAssignedTargetingOptions", 24949 // "response": { 24950 // "$ref": "BulkListLineItemAssignedTargetingOptionsResponse" 24951 // }, 24952 // "scopes": [ 24953 // "https://www.googleapis.com/auth/display-video" 24954 // ] 24955 // } 24956 24957 } 24958 24959 // Pages invokes f for each page of results. 24960 // A non-nil error returned from f will halt the iteration. 24961 // The provided context supersedes any context provided to the Context method. 24962 func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListLineItemAssignedTargetingOptionsResponse) error) error { 24963 c.ctx_ = ctx 24964 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 24965 for { 24966 x, err := c.Do() 24967 if err != nil { 24968 return err 24969 } 24970 if err := f(x); err != nil { 24971 return err 24972 } 24973 if x.NextPageToken == "" { 24974 return nil 24975 } 24976 c.PageToken(x.NextPageToken) 24977 } 24978 } 24979 24980 // method id "displayvideo.advertisers.lineItems.create": 24981 24982 type AdvertisersLineItemsCreateCall struct { 24983 s *Service 24984 advertiserId int64 24985 lineitem *LineItem 24986 urlParams_ gensupport.URLParams 24987 ctx_ context.Context 24988 header_ http.Header 24989 } 24990 24991 // Create: Creates a new line item. Returns the newly created line item 24992 // if successful. YouTube & Partners line items cannot be created or 24993 // updated using the API. 24994 // 24995 // - advertiserId: Output only. The unique ID of the advertiser the line 24996 // item belongs to. 24997 func (r *AdvertisersLineItemsService) Create(advertiserId int64, lineitem *LineItem) *AdvertisersLineItemsCreateCall { 24998 c := &AdvertisersLineItemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 24999 c.advertiserId = advertiserId 25000 c.lineitem = lineitem 25001 return c 25002 } 25003 25004 // Fields allows partial responses to be retrieved. See 25005 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25006 // for more information. 25007 func (c *AdvertisersLineItemsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsCreateCall { 25008 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25009 return c 25010 } 25011 25012 // Context sets the context to be used in this call's Do method. Any 25013 // pending HTTP request will be aborted if the provided context is 25014 // canceled. 25015 func (c *AdvertisersLineItemsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsCreateCall { 25016 c.ctx_ = ctx 25017 return c 25018 } 25019 25020 // Header returns an http.Header that can be modified by the caller to 25021 // add HTTP headers to the request. 25022 func (c *AdvertisersLineItemsCreateCall) Header() http.Header { 25023 if c.header_ == nil { 25024 c.header_ = make(http.Header) 25025 } 25026 return c.header_ 25027 } 25028 25029 func (c *AdvertisersLineItemsCreateCall) doRequest(alt string) (*http.Response, error) { 25030 reqHeaders := make(http.Header) 25031 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 25032 for k, v := range c.header_ { 25033 reqHeaders[k] = v 25034 } 25035 reqHeaders.Set("User-Agent", c.s.userAgent()) 25036 var body io.Reader = nil 25037 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem) 25038 if err != nil { 25039 return nil, err 25040 } 25041 reqHeaders.Set("Content-Type", "application/json") 25042 c.urlParams_.Set("alt", alt) 25043 c.urlParams_.Set("prettyPrint", "false") 25044 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems") 25045 urls += "?" + c.urlParams_.Encode() 25046 req, err := http.NewRequest("POST", urls, body) 25047 if err != nil { 25048 return nil, err 25049 } 25050 req.Header = reqHeaders 25051 googleapi.Expand(req.URL, map[string]string{ 25052 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 25053 }) 25054 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25055 } 25056 25057 // Do executes the "displayvideo.advertisers.lineItems.create" call. 25058 // Exactly one of *LineItem or error will be non-nil. Any non-2xx status 25059 // code is an error. Response headers are in either 25060 // *LineItem.ServerResponse.Header or (if a response was returned at 25061 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 25062 // to check whether the returned error was because 25063 // http.StatusNotModified was returned. 25064 func (c *AdvertisersLineItemsCreateCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 25065 gensupport.SetOptions(c.urlParams_, opts...) 25066 res, err := c.doRequest("json") 25067 if res != nil && res.StatusCode == http.StatusNotModified { 25068 if res.Body != nil { 25069 res.Body.Close() 25070 } 25071 return nil, gensupport.WrapError(&googleapi.Error{ 25072 Code: res.StatusCode, 25073 Header: res.Header, 25074 }) 25075 } 25076 if err != nil { 25077 return nil, err 25078 } 25079 defer googleapi.CloseBody(res) 25080 if err := googleapi.CheckResponse(res); err != nil { 25081 return nil, gensupport.WrapError(err) 25082 } 25083 ret := &LineItem{ 25084 ServerResponse: googleapi.ServerResponse{ 25085 Header: res.Header, 25086 HTTPStatusCode: res.StatusCode, 25087 }, 25088 } 25089 target := &ret 25090 if err := gensupport.DecodeResponse(target, res); err != nil { 25091 return nil, err 25092 } 25093 return ret, nil 25094 // { 25095 // "description": "Creates a new line item. Returns the newly created line item if successful. YouTube \u0026 Partners line items cannot be created or updated using the API.", 25096 // "flatPath": "v1/advertisers/{advertisersId}/lineItems", 25097 // "httpMethod": "POST", 25098 // "id": "displayvideo.advertisers.lineItems.create", 25099 // "parameterOrder": [ 25100 // "advertiserId" 25101 // ], 25102 // "parameters": { 25103 // "advertiserId": { 25104 // "description": "Output only. The unique ID of the advertiser the line item belongs to.", 25105 // "format": "int64", 25106 // "location": "path", 25107 // "pattern": "^[^/]+$", 25108 // "required": true, 25109 // "type": "string" 25110 // } 25111 // }, 25112 // "path": "v1/advertisers/{+advertiserId}/lineItems", 25113 // "request": { 25114 // "$ref": "LineItem" 25115 // }, 25116 // "response": { 25117 // "$ref": "LineItem" 25118 // }, 25119 // "scopes": [ 25120 // "https://www.googleapis.com/auth/display-video" 25121 // ] 25122 // } 25123 25124 } 25125 25126 // method id "displayvideo.advertisers.lineItems.delete": 25127 25128 type AdvertisersLineItemsDeleteCall struct { 25129 s *Service 25130 advertiserId int64 25131 lineItemId int64 25132 urlParams_ gensupport.URLParams 25133 ctx_ context.Context 25134 header_ http.Header 25135 } 25136 25137 // Delete: Deletes a line item. Returns error code `NOT_FOUND` if the 25138 // line item does not exist. The line item should be archived first, 25139 // i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to 25140 // delete it. YouTube & Partners line items cannot be created or updated 25141 // using the API. 25142 // 25143 // - advertiserId: The ID of the advertiser this line item belongs to. 25144 // - lineItemId: The ID of the line item to delete. 25145 func (r *AdvertisersLineItemsService) Delete(advertiserId int64, lineItemId int64) *AdvertisersLineItemsDeleteCall { 25146 c := &AdvertisersLineItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25147 c.advertiserId = advertiserId 25148 c.lineItemId = lineItemId 25149 return c 25150 } 25151 25152 // Fields allows partial responses to be retrieved. See 25153 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25154 // for more information. 25155 func (c *AdvertisersLineItemsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDeleteCall { 25156 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25157 return c 25158 } 25159 25160 // Context sets the context to be used in this call's Do method. Any 25161 // pending HTTP request will be aborted if the provided context is 25162 // canceled. 25163 func (c *AdvertisersLineItemsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsDeleteCall { 25164 c.ctx_ = ctx 25165 return c 25166 } 25167 25168 // Header returns an http.Header that can be modified by the caller to 25169 // add HTTP headers to the request. 25170 func (c *AdvertisersLineItemsDeleteCall) Header() http.Header { 25171 if c.header_ == nil { 25172 c.header_ = make(http.Header) 25173 } 25174 return c.header_ 25175 } 25176 25177 func (c *AdvertisersLineItemsDeleteCall) doRequest(alt string) (*http.Response, error) { 25178 reqHeaders := make(http.Header) 25179 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 25180 for k, v := range c.header_ { 25181 reqHeaders[k] = v 25182 } 25183 reqHeaders.Set("User-Agent", c.s.userAgent()) 25184 var body io.Reader = nil 25185 c.urlParams_.Set("alt", alt) 25186 c.urlParams_.Set("prettyPrint", "false") 25187 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}") 25188 urls += "?" + c.urlParams_.Encode() 25189 req, err := http.NewRequest("DELETE", urls, body) 25190 if err != nil { 25191 return nil, err 25192 } 25193 req.Header = reqHeaders 25194 googleapi.Expand(req.URL, map[string]string{ 25195 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 25196 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 25197 }) 25198 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25199 } 25200 25201 // Do executes the "displayvideo.advertisers.lineItems.delete" call. 25202 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 25203 // code is an error. Response headers are in either 25204 // *Empty.ServerResponse.Header or (if a response was returned at all) 25205 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 25206 // check whether the returned error was because http.StatusNotModified 25207 // was returned. 25208 func (c *AdvertisersLineItemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 25209 gensupport.SetOptions(c.urlParams_, opts...) 25210 res, err := c.doRequest("json") 25211 if res != nil && res.StatusCode == http.StatusNotModified { 25212 if res.Body != nil { 25213 res.Body.Close() 25214 } 25215 return nil, gensupport.WrapError(&googleapi.Error{ 25216 Code: res.StatusCode, 25217 Header: res.Header, 25218 }) 25219 } 25220 if err != nil { 25221 return nil, err 25222 } 25223 defer googleapi.CloseBody(res) 25224 if err := googleapi.CheckResponse(res); err != nil { 25225 return nil, gensupport.WrapError(err) 25226 } 25227 ret := &Empty{ 25228 ServerResponse: googleapi.ServerResponse{ 25229 Header: res.Header, 25230 HTTPStatusCode: res.StatusCode, 25231 }, 25232 } 25233 target := &ret 25234 if err := gensupport.DecodeResponse(target, res); err != nil { 25235 return nil, err 25236 } 25237 return ret, nil 25238 // { 25239 // "description": "Deletes a line item. Returns error code `NOT_FOUND` if the line item does not exist. The line item should be archived first, i.e. set entity_status to `ENTITY_STATUS_ARCHIVED`, to be able to delete it. YouTube \u0026 Partners line items cannot be created or updated using the API.", 25240 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", 25241 // "httpMethod": "DELETE", 25242 // "id": "displayvideo.advertisers.lineItems.delete", 25243 // "parameterOrder": [ 25244 // "advertiserId", 25245 // "lineItemId" 25246 // ], 25247 // "parameters": { 25248 // "advertiserId": { 25249 // "description": "The ID of the advertiser this line item belongs to.", 25250 // "format": "int64", 25251 // "location": "path", 25252 // "pattern": "^[^/]+$", 25253 // "required": true, 25254 // "type": "string" 25255 // }, 25256 // "lineItemId": { 25257 // "description": "The ID of the line item to delete.", 25258 // "format": "int64", 25259 // "location": "path", 25260 // "pattern": "^[^/]+$", 25261 // "required": true, 25262 // "type": "string" 25263 // } 25264 // }, 25265 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}", 25266 // "response": { 25267 // "$ref": "Empty" 25268 // }, 25269 // "scopes": [ 25270 // "https://www.googleapis.com/auth/display-video" 25271 // ] 25272 // } 25273 25274 } 25275 25276 // method id "displayvideo.advertisers.lineItems.generateDefault": 25277 25278 type AdvertisersLineItemsGenerateDefaultCall struct { 25279 s *Service 25280 advertiserId int64 25281 generatedefaultlineitemrequest *GenerateDefaultLineItemRequest 25282 urlParams_ gensupport.URLParams 25283 ctx_ context.Context 25284 header_ http.Header 25285 } 25286 25287 // GenerateDefault: Creates a new line item with settings (including 25288 // targeting) inherited from the insertion order and an 25289 // `ENTITY_STATUS_DRAFT` entity_status. Returns the newly created line 25290 // item if successful. There are default values based on the three 25291 // fields: * The insertion order's insertion_order_type * The insertion 25292 // order's automation_type * The given line_item_type YouTube & Partners 25293 // line items cannot be created or updated using the API. 25294 // 25295 // - advertiserId: The ID of the advertiser this line item belongs to. 25296 func (r *AdvertisersLineItemsService) GenerateDefault(advertiserId int64, generatedefaultlineitemrequest *GenerateDefaultLineItemRequest) *AdvertisersLineItemsGenerateDefaultCall { 25297 c := &AdvertisersLineItemsGenerateDefaultCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25298 c.advertiserId = advertiserId 25299 c.generatedefaultlineitemrequest = generatedefaultlineitemrequest 25300 return c 25301 } 25302 25303 // Fields allows partial responses to be retrieved. See 25304 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25305 // for more information. 25306 func (c *AdvertisersLineItemsGenerateDefaultCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGenerateDefaultCall { 25307 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25308 return c 25309 } 25310 25311 // Context sets the context to be used in this call's Do method. Any 25312 // pending HTTP request will be aborted if the provided context is 25313 // canceled. 25314 func (c *AdvertisersLineItemsGenerateDefaultCall) Context(ctx context.Context) *AdvertisersLineItemsGenerateDefaultCall { 25315 c.ctx_ = ctx 25316 return c 25317 } 25318 25319 // Header returns an http.Header that can be modified by the caller to 25320 // add HTTP headers to the request. 25321 func (c *AdvertisersLineItemsGenerateDefaultCall) Header() http.Header { 25322 if c.header_ == nil { 25323 c.header_ = make(http.Header) 25324 } 25325 return c.header_ 25326 } 25327 25328 func (c *AdvertisersLineItemsGenerateDefaultCall) doRequest(alt string) (*http.Response, error) { 25329 reqHeaders := make(http.Header) 25330 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 25331 for k, v := range c.header_ { 25332 reqHeaders[k] = v 25333 } 25334 reqHeaders.Set("User-Agent", c.s.userAgent()) 25335 var body io.Reader = nil 25336 body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatedefaultlineitemrequest) 25337 if err != nil { 25338 return nil, err 25339 } 25340 reqHeaders.Set("Content-Type", "application/json") 25341 c.urlParams_.Set("alt", alt) 25342 c.urlParams_.Set("prettyPrint", "false") 25343 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems:generateDefault") 25344 urls += "?" + c.urlParams_.Encode() 25345 req, err := http.NewRequest("POST", urls, body) 25346 if err != nil { 25347 return nil, err 25348 } 25349 req.Header = reqHeaders 25350 googleapi.Expand(req.URL, map[string]string{ 25351 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 25352 }) 25353 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25354 } 25355 25356 // Do executes the "displayvideo.advertisers.lineItems.generateDefault" call. 25357 // Exactly one of *LineItem or error will be non-nil. Any non-2xx status 25358 // code is an error. Response headers are in either 25359 // *LineItem.ServerResponse.Header or (if a response was returned at 25360 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 25361 // to check whether the returned error was because 25362 // http.StatusNotModified was returned. 25363 func (c *AdvertisersLineItemsGenerateDefaultCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 25364 gensupport.SetOptions(c.urlParams_, opts...) 25365 res, err := c.doRequest("json") 25366 if res != nil && res.StatusCode == http.StatusNotModified { 25367 if res.Body != nil { 25368 res.Body.Close() 25369 } 25370 return nil, gensupport.WrapError(&googleapi.Error{ 25371 Code: res.StatusCode, 25372 Header: res.Header, 25373 }) 25374 } 25375 if err != nil { 25376 return nil, err 25377 } 25378 defer googleapi.CloseBody(res) 25379 if err := googleapi.CheckResponse(res); err != nil { 25380 return nil, gensupport.WrapError(err) 25381 } 25382 ret := &LineItem{ 25383 ServerResponse: googleapi.ServerResponse{ 25384 Header: res.Header, 25385 HTTPStatusCode: res.StatusCode, 25386 }, 25387 } 25388 target := &ret 25389 if err := gensupport.DecodeResponse(target, res); err != nil { 25390 return nil, err 25391 } 25392 return ret, nil 25393 // { 25394 // "description": "Creates a new line item with settings (including targeting) inherited from the insertion order and an `ENTITY_STATUS_DRAFT` entity_status. Returns the newly created line item if successful. There are default values based on the three fields: * The insertion order's insertion_order_type * The insertion order's automation_type * The given line_item_type YouTube \u0026 Partners line items cannot be created or updated using the API.", 25395 // "flatPath": "v1/advertisers/{advertisersId}/lineItems:generateDefault", 25396 // "httpMethod": "POST", 25397 // "id": "displayvideo.advertisers.lineItems.generateDefault", 25398 // "parameterOrder": [ 25399 // "advertiserId" 25400 // ], 25401 // "parameters": { 25402 // "advertiserId": { 25403 // "description": "Required. The ID of the advertiser this line item belongs to.", 25404 // "format": "int64", 25405 // "location": "path", 25406 // "pattern": "^[^/]+$", 25407 // "required": true, 25408 // "type": "string" 25409 // } 25410 // }, 25411 // "path": "v1/advertisers/{+advertiserId}/lineItems:generateDefault", 25412 // "request": { 25413 // "$ref": "GenerateDefaultLineItemRequest" 25414 // }, 25415 // "response": { 25416 // "$ref": "LineItem" 25417 // }, 25418 // "scopes": [ 25419 // "https://www.googleapis.com/auth/display-video" 25420 // ] 25421 // } 25422 25423 } 25424 25425 // method id "displayvideo.advertisers.lineItems.get": 25426 25427 type AdvertisersLineItemsGetCall struct { 25428 s *Service 25429 advertiserId int64 25430 lineItemId int64 25431 urlParams_ gensupport.URLParams 25432 ifNoneMatch_ string 25433 ctx_ context.Context 25434 header_ http.Header 25435 } 25436 25437 // Get: Gets a line item. 25438 // 25439 // - advertiserId: The ID of the advertiser this line item belongs to. 25440 // - lineItemId: The ID of the line item to fetch. 25441 func (r *AdvertisersLineItemsService) Get(advertiserId int64, lineItemId int64) *AdvertisersLineItemsGetCall { 25442 c := &AdvertisersLineItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25443 c.advertiserId = advertiserId 25444 c.lineItemId = lineItemId 25445 return c 25446 } 25447 25448 // Fields allows partial responses to be retrieved. See 25449 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25450 // for more information. 25451 func (c *AdvertisersLineItemsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGetCall { 25452 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25453 return c 25454 } 25455 25456 // IfNoneMatch sets the optional parameter which makes the operation 25457 // fail if the object's ETag matches the given value. This is useful for 25458 // getting updates only after the object has changed since the last 25459 // request. Use googleapi.IsNotModified to check whether the response 25460 // error from Do is the result of In-None-Match. 25461 func (c *AdvertisersLineItemsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsGetCall { 25462 c.ifNoneMatch_ = entityTag 25463 return c 25464 } 25465 25466 // Context sets the context to be used in this call's Do method. Any 25467 // pending HTTP request will be aborted if the provided context is 25468 // canceled. 25469 func (c *AdvertisersLineItemsGetCall) Context(ctx context.Context) *AdvertisersLineItemsGetCall { 25470 c.ctx_ = ctx 25471 return c 25472 } 25473 25474 // Header returns an http.Header that can be modified by the caller to 25475 // add HTTP headers to the request. 25476 func (c *AdvertisersLineItemsGetCall) Header() http.Header { 25477 if c.header_ == nil { 25478 c.header_ = make(http.Header) 25479 } 25480 return c.header_ 25481 } 25482 25483 func (c *AdvertisersLineItemsGetCall) doRequest(alt string) (*http.Response, error) { 25484 reqHeaders := make(http.Header) 25485 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 25486 for k, v := range c.header_ { 25487 reqHeaders[k] = v 25488 } 25489 reqHeaders.Set("User-Agent", c.s.userAgent()) 25490 if c.ifNoneMatch_ != "" { 25491 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25492 } 25493 var body io.Reader = nil 25494 c.urlParams_.Set("alt", alt) 25495 c.urlParams_.Set("prettyPrint", "false") 25496 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}") 25497 urls += "?" + c.urlParams_.Encode() 25498 req, err := http.NewRequest("GET", urls, body) 25499 if err != nil { 25500 return nil, err 25501 } 25502 req.Header = reqHeaders 25503 googleapi.Expand(req.URL, map[string]string{ 25504 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 25505 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 25506 }) 25507 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25508 } 25509 25510 // Do executes the "displayvideo.advertisers.lineItems.get" call. 25511 // Exactly one of *LineItem or error will be non-nil. Any non-2xx status 25512 // code is an error. Response headers are in either 25513 // *LineItem.ServerResponse.Header or (if a response was returned at 25514 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 25515 // to check whether the returned error was because 25516 // http.StatusNotModified was returned. 25517 func (c *AdvertisersLineItemsGetCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 25518 gensupport.SetOptions(c.urlParams_, opts...) 25519 res, err := c.doRequest("json") 25520 if res != nil && res.StatusCode == http.StatusNotModified { 25521 if res.Body != nil { 25522 res.Body.Close() 25523 } 25524 return nil, gensupport.WrapError(&googleapi.Error{ 25525 Code: res.StatusCode, 25526 Header: res.Header, 25527 }) 25528 } 25529 if err != nil { 25530 return nil, err 25531 } 25532 defer googleapi.CloseBody(res) 25533 if err := googleapi.CheckResponse(res); err != nil { 25534 return nil, gensupport.WrapError(err) 25535 } 25536 ret := &LineItem{ 25537 ServerResponse: googleapi.ServerResponse{ 25538 Header: res.Header, 25539 HTTPStatusCode: res.StatusCode, 25540 }, 25541 } 25542 target := &ret 25543 if err := gensupport.DecodeResponse(target, res); err != nil { 25544 return nil, err 25545 } 25546 return ret, nil 25547 // { 25548 // "description": "Gets a line item.", 25549 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", 25550 // "httpMethod": "GET", 25551 // "id": "displayvideo.advertisers.lineItems.get", 25552 // "parameterOrder": [ 25553 // "advertiserId", 25554 // "lineItemId" 25555 // ], 25556 // "parameters": { 25557 // "advertiserId": { 25558 // "description": "Required. The ID of the advertiser this line item belongs to.", 25559 // "format": "int64", 25560 // "location": "path", 25561 // "pattern": "^[^/]+$", 25562 // "required": true, 25563 // "type": "string" 25564 // }, 25565 // "lineItemId": { 25566 // "description": "Required. The ID of the line item to fetch.", 25567 // "format": "int64", 25568 // "location": "path", 25569 // "pattern": "^[^/]+$", 25570 // "required": true, 25571 // "type": "string" 25572 // } 25573 // }, 25574 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}", 25575 // "response": { 25576 // "$ref": "LineItem" 25577 // }, 25578 // "scopes": [ 25579 // "https://www.googleapis.com/auth/display-video" 25580 // ] 25581 // } 25582 25583 } 25584 25585 // method id "displayvideo.advertisers.lineItems.list": 25586 25587 type AdvertisersLineItemsListCall struct { 25588 s *Service 25589 advertiserId int64 25590 urlParams_ gensupport.URLParams 25591 ifNoneMatch_ string 25592 ctx_ context.Context 25593 header_ http.Header 25594 } 25595 25596 // List: Lists line items in an advertiser. The order is defined by the 25597 // order_by parameter. If a filter by entity_status is not specified, 25598 // line items with `ENTITY_STATUS_ARCHIVED` will not be included in the 25599 // results. 25600 // 25601 // - advertiserId: The ID of the advertiser to list line items for. 25602 func (r *AdvertisersLineItemsService) List(advertiserId int64) *AdvertisersLineItemsListCall { 25603 c := &AdvertisersLineItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25604 c.advertiserId = advertiserId 25605 return c 25606 } 25607 25608 // Filter sets the optional parameter "filter": Allows filtering by line 25609 // item fields. Supported syntax: * Filter expressions are made up of 25610 // one or more restrictions. * Restrictions can be combined by `AND` or 25611 // `OR` logical operators. A sequence of restrictions implicitly uses 25612 // `AND`. * A restriction has the form of `{field} {operator} {value}`. 25613 // * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (>=)` 25614 // or `LESS THAN OR EQUAL TO (<=)` operators. * All other fields must 25615 // use the `EQUALS (=)` operator. Supported fields: * `campaignId` * 25616 // `displayName` * `entityStatus` * `insertionOrderId` * `lineItemId` * 25617 // `lineItemType` * `updateTime` (input in ISO 8601 format, or 25618 // `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All line items under an insertion 25619 // order: `insertionOrderId="1234" * All `ENTITY_STATUS_ACTIVE` or 25620 // `ENTITY_STATUS_PAUSED` and `LINE_ITEM_TYPE_DISPLAY_DEFAULT` line 25621 // items under an advertiser: `(entityStatus="ENTITY_STATUS_ACTIVE" OR 25622 // entityStatus="ENTITY_STATUS_PAUSED") AND 25623 // lineItemType="LINE_ITEM_TYPE_DISPLAY_DEFAULT" * All line items with 25624 // an update time less than or equal to 2020-11-04T18:54:47Z (format of 25625 // ISO 8601): `updateTime<="2020-11-04T18:54:47Z" * All line items with 25626 // an update time greater than or equal to 2020-11-04T18:54:47Z (format 25627 // of ISO 8601): `updateTime>="2020-11-04T18:54:47Z" The length of this 25628 // field should be no more than 500 characters. Reference our filter 25629 // `LIST` requests (/display-video/api/guides/how-tos/filters) guide for 25630 // more information. 25631 func (c *AdvertisersLineItemsListCall) Filter(filter string) *AdvertisersLineItemsListCall { 25632 c.urlParams_.Set("filter", filter) 25633 return c 25634 } 25635 25636 // OrderBy sets the optional parameter "orderBy": Field by which to sort 25637 // the list. Acceptable values are: * `displayName` (default) * 25638 // `entityStatus` * `updateTime` The default sorting order is ascending. 25639 // To specify descending order for a field, a suffix "desc" should be 25640 // added to the field name. Example: `displayName desc`. 25641 func (c *AdvertisersLineItemsListCall) OrderBy(orderBy string) *AdvertisersLineItemsListCall { 25642 c.urlParams_.Set("orderBy", orderBy) 25643 return c 25644 } 25645 25646 // PageSize sets the optional parameter "pageSize": Requested page size. 25647 // Must be between `1` and `200`. If unspecified will default to `100`. 25648 // Returns error code `INVALID_ARGUMENT` if an invalid value is 25649 // specified. 25650 func (c *AdvertisersLineItemsListCall) PageSize(pageSize int64) *AdvertisersLineItemsListCall { 25651 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 25652 return c 25653 } 25654 25655 // PageToken sets the optional parameter "pageToken": A token 25656 // identifying a page of results the server should return. Typically, 25657 // this is the value of next_page_token returned from the previous call 25658 // to `ListLineItems` method. If not specified, the first page of 25659 // results will be returned. 25660 func (c *AdvertisersLineItemsListCall) PageToken(pageToken string) *AdvertisersLineItemsListCall { 25661 c.urlParams_.Set("pageToken", pageToken) 25662 return c 25663 } 25664 25665 // Fields allows partial responses to be retrieved. See 25666 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25667 // for more information. 25668 func (c *AdvertisersLineItemsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsListCall { 25669 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25670 return c 25671 } 25672 25673 // IfNoneMatch sets the optional parameter which makes the operation 25674 // fail if the object's ETag matches the given value. This is useful for 25675 // getting updates only after the object has changed since the last 25676 // request. Use googleapi.IsNotModified to check whether the response 25677 // error from Do is the result of In-None-Match. 25678 func (c *AdvertisersLineItemsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsListCall { 25679 c.ifNoneMatch_ = entityTag 25680 return c 25681 } 25682 25683 // Context sets the context to be used in this call's Do method. Any 25684 // pending HTTP request will be aborted if the provided context is 25685 // canceled. 25686 func (c *AdvertisersLineItemsListCall) Context(ctx context.Context) *AdvertisersLineItemsListCall { 25687 c.ctx_ = ctx 25688 return c 25689 } 25690 25691 // Header returns an http.Header that can be modified by the caller to 25692 // add HTTP headers to the request. 25693 func (c *AdvertisersLineItemsListCall) Header() http.Header { 25694 if c.header_ == nil { 25695 c.header_ = make(http.Header) 25696 } 25697 return c.header_ 25698 } 25699 25700 func (c *AdvertisersLineItemsListCall) doRequest(alt string) (*http.Response, error) { 25701 reqHeaders := make(http.Header) 25702 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 25703 for k, v := range c.header_ { 25704 reqHeaders[k] = v 25705 } 25706 reqHeaders.Set("User-Agent", c.s.userAgent()) 25707 if c.ifNoneMatch_ != "" { 25708 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 25709 } 25710 var body io.Reader = nil 25711 c.urlParams_.Set("alt", alt) 25712 c.urlParams_.Set("prettyPrint", "false") 25713 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems") 25714 urls += "?" + c.urlParams_.Encode() 25715 req, err := http.NewRequest("GET", urls, body) 25716 if err != nil { 25717 return nil, err 25718 } 25719 req.Header = reqHeaders 25720 googleapi.Expand(req.URL, map[string]string{ 25721 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 25722 }) 25723 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25724 } 25725 25726 // Do executes the "displayvideo.advertisers.lineItems.list" call. 25727 // Exactly one of *ListLineItemsResponse or error will be non-nil. Any 25728 // non-2xx status code is an error. Response headers are in either 25729 // *ListLineItemsResponse.ServerResponse.Header or (if a response was 25730 // returned at all) in error.(*googleapi.Error).Header. Use 25731 // googleapi.IsNotModified to check whether the returned error was 25732 // because http.StatusNotModified was returned. 25733 func (c *AdvertisersLineItemsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemsResponse, error) { 25734 gensupport.SetOptions(c.urlParams_, opts...) 25735 res, err := c.doRequest("json") 25736 if res != nil && res.StatusCode == http.StatusNotModified { 25737 if res.Body != nil { 25738 res.Body.Close() 25739 } 25740 return nil, gensupport.WrapError(&googleapi.Error{ 25741 Code: res.StatusCode, 25742 Header: res.Header, 25743 }) 25744 } 25745 if err != nil { 25746 return nil, err 25747 } 25748 defer googleapi.CloseBody(res) 25749 if err := googleapi.CheckResponse(res); err != nil { 25750 return nil, gensupport.WrapError(err) 25751 } 25752 ret := &ListLineItemsResponse{ 25753 ServerResponse: googleapi.ServerResponse{ 25754 Header: res.Header, 25755 HTTPStatusCode: res.StatusCode, 25756 }, 25757 } 25758 target := &ret 25759 if err := gensupport.DecodeResponse(target, res); err != nil { 25760 return nil, err 25761 } 25762 return ret, nil 25763 // { 25764 // "description": "Lists line items in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, line items with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 25765 // "flatPath": "v1/advertisers/{advertisersId}/lineItems", 25766 // "httpMethod": "GET", 25767 // "id": "displayvideo.advertisers.lineItems.list", 25768 // "parameterOrder": [ 25769 // "advertiserId" 25770 // ], 25771 // "parameters": { 25772 // "advertiserId": { 25773 // "description": "Required. The ID of the advertiser to list line items for.", 25774 // "format": "int64", 25775 // "location": "path", 25776 // "pattern": "^[^/]+$", 25777 // "required": true, 25778 // "type": "string" 25779 // }, 25780 // "filter": { 25781 // "description": "Allows filtering by line item fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `updateTime` field must use the `GREATER THAN OR EQUAL TO (\u003e=)` or `LESS THAN OR EQUAL TO (\u003c=)` operators. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `campaignId` * `displayName` * `entityStatus` * `insertionOrderId` * `lineItemId` * `lineItemType` * `updateTime` (input in ISO 8601 format, or `YYYY-MM-DDTHH:MM:SSZ`) Examples: * All line items under an insertion order: `insertionOrderId=\"1234\"` * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` and `LINE_ITEM_TYPE_DISPLAY_DEFAULT` line items under an advertiser: `(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR entityStatus=\"ENTITY_STATUS_PAUSED\") AND lineItemType=\"LINE_ITEM_TYPE_DISPLAY_DEFAULT\"` * All line items with an update time less than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003c=\"2020-11-04T18:54:47Z\"` * All line items with an update time greater than or equal to 2020-11-04T18:54:47Z (format of ISO 8601): `updateTime\u003e=\"2020-11-04T18:54:47Z\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 25782 // "location": "query", 25783 // "type": "string" 25784 // }, 25785 // "orderBy": { 25786 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `entityStatus` * `updateTime` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 25787 // "location": "query", 25788 // "type": "string" 25789 // }, 25790 // "pageSize": { 25791 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 25792 // "format": "int32", 25793 // "location": "query", 25794 // "type": "integer" 25795 // }, 25796 // "pageToken": { 25797 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListLineItems` method. If not specified, the first page of results will be returned.", 25798 // "location": "query", 25799 // "type": "string" 25800 // } 25801 // }, 25802 // "path": "v1/advertisers/{+advertiserId}/lineItems", 25803 // "response": { 25804 // "$ref": "ListLineItemsResponse" 25805 // }, 25806 // "scopes": [ 25807 // "https://www.googleapis.com/auth/display-video" 25808 // ] 25809 // } 25810 25811 } 25812 25813 // Pages invokes f for each page of results. 25814 // A non-nil error returned from f will halt the iteration. 25815 // The provided context supersedes any context provided to the Context method. 25816 func (c *AdvertisersLineItemsListCall) Pages(ctx context.Context, f func(*ListLineItemsResponse) error) error { 25817 c.ctx_ = ctx 25818 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 25819 for { 25820 x, err := c.Do() 25821 if err != nil { 25822 return err 25823 } 25824 if err := f(x); err != nil { 25825 return err 25826 } 25827 if x.NextPageToken == "" { 25828 return nil 25829 } 25830 c.PageToken(x.NextPageToken) 25831 } 25832 } 25833 25834 // method id "displayvideo.advertisers.lineItems.patch": 25835 25836 type AdvertisersLineItemsPatchCall struct { 25837 s *Service 25838 advertiserId int64 25839 lineItemId int64 25840 lineitem *LineItem 25841 urlParams_ gensupport.URLParams 25842 ctx_ context.Context 25843 header_ http.Header 25844 } 25845 25846 // Patch: Updates an existing line item. Returns the updated line item 25847 // if successful. Requests to this endpoint cannot be made concurrently 25848 // with the following requests updating the same line item: * 25849 // BulkEditAssignedTargetingOptions * BulkUpdateLineItems * 25850 // assignedTargetingOptions.create * assignedTargetingOptions.delete 25851 // YouTube & Partners line items cannot be created or updated using the 25852 // API. 25853 // 25854 // - advertiserId: Output only. The unique ID of the advertiser the line 25855 // item belongs to. 25856 // - lineItemId: Output only. The unique ID of the line item. Assigned 25857 // by the system. 25858 func (r *AdvertisersLineItemsService) Patch(advertiserId int64, lineItemId int64, lineitem *LineItem) *AdvertisersLineItemsPatchCall { 25859 c := &AdvertisersLineItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 25860 c.advertiserId = advertiserId 25861 c.lineItemId = lineItemId 25862 c.lineitem = lineitem 25863 return c 25864 } 25865 25866 // UpdateMask sets the optional parameter "updateMask": Required. The 25867 // mask to control which fields to update. 25868 func (c *AdvertisersLineItemsPatchCall) UpdateMask(updateMask string) *AdvertisersLineItemsPatchCall { 25869 c.urlParams_.Set("updateMask", updateMask) 25870 return c 25871 } 25872 25873 // Fields allows partial responses to be retrieved. See 25874 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 25875 // for more information. 25876 func (c *AdvertisersLineItemsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsPatchCall { 25877 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 25878 return c 25879 } 25880 25881 // Context sets the context to be used in this call's Do method. Any 25882 // pending HTTP request will be aborted if the provided context is 25883 // canceled. 25884 func (c *AdvertisersLineItemsPatchCall) Context(ctx context.Context) *AdvertisersLineItemsPatchCall { 25885 c.ctx_ = ctx 25886 return c 25887 } 25888 25889 // Header returns an http.Header that can be modified by the caller to 25890 // add HTTP headers to the request. 25891 func (c *AdvertisersLineItemsPatchCall) Header() http.Header { 25892 if c.header_ == nil { 25893 c.header_ = make(http.Header) 25894 } 25895 return c.header_ 25896 } 25897 25898 func (c *AdvertisersLineItemsPatchCall) doRequest(alt string) (*http.Response, error) { 25899 reqHeaders := make(http.Header) 25900 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 25901 for k, v := range c.header_ { 25902 reqHeaders[k] = v 25903 } 25904 reqHeaders.Set("User-Agent", c.s.userAgent()) 25905 var body io.Reader = nil 25906 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem) 25907 if err != nil { 25908 return nil, err 25909 } 25910 reqHeaders.Set("Content-Type", "application/json") 25911 c.urlParams_.Set("alt", alt) 25912 c.urlParams_.Set("prettyPrint", "false") 25913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}") 25914 urls += "?" + c.urlParams_.Encode() 25915 req, err := http.NewRequest("PATCH", urls, body) 25916 if err != nil { 25917 return nil, err 25918 } 25919 req.Header = reqHeaders 25920 googleapi.Expand(req.URL, map[string]string{ 25921 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 25922 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 25923 }) 25924 return gensupport.SendRequest(c.ctx_, c.s.client, req) 25925 } 25926 25927 // Do executes the "displayvideo.advertisers.lineItems.patch" call. 25928 // Exactly one of *LineItem or error will be non-nil. Any non-2xx status 25929 // code is an error. Response headers are in either 25930 // *LineItem.ServerResponse.Header or (if a response was returned at 25931 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 25932 // to check whether the returned error was because 25933 // http.StatusNotModified was returned. 25934 func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 25935 gensupport.SetOptions(c.urlParams_, opts...) 25936 res, err := c.doRequest("json") 25937 if res != nil && res.StatusCode == http.StatusNotModified { 25938 if res.Body != nil { 25939 res.Body.Close() 25940 } 25941 return nil, gensupport.WrapError(&googleapi.Error{ 25942 Code: res.StatusCode, 25943 Header: res.Header, 25944 }) 25945 } 25946 if err != nil { 25947 return nil, err 25948 } 25949 defer googleapi.CloseBody(res) 25950 if err := googleapi.CheckResponse(res); err != nil { 25951 return nil, gensupport.WrapError(err) 25952 } 25953 ret := &LineItem{ 25954 ServerResponse: googleapi.ServerResponse{ 25955 Header: res.Header, 25956 HTTPStatusCode: res.StatusCode, 25957 }, 25958 } 25959 target := &ret 25960 if err := gensupport.DecodeResponse(target, res); err != nil { 25961 return nil, err 25962 } 25963 return ret, nil 25964 // { 25965 // "description": "Updates an existing line item. Returns the updated line item if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * BulkEditAssignedTargetingOptions * BulkUpdateLineItems * assignedTargetingOptions.create * assignedTargetingOptions.delete YouTube \u0026 Partners line items cannot be created or updated using the API.", 25966 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", 25967 // "httpMethod": "PATCH", 25968 // "id": "displayvideo.advertisers.lineItems.patch", 25969 // "parameterOrder": [ 25970 // "advertiserId", 25971 // "lineItemId" 25972 // ], 25973 // "parameters": { 25974 // "advertiserId": { 25975 // "description": "Output only. The unique ID of the advertiser the line item belongs to.", 25976 // "format": "int64", 25977 // "location": "path", 25978 // "pattern": "^[^/]+$", 25979 // "required": true, 25980 // "type": "string" 25981 // }, 25982 // "lineItemId": { 25983 // "description": "Output only. The unique ID of the line item. Assigned by the system.", 25984 // "format": "int64", 25985 // "location": "path", 25986 // "pattern": "^[^/]+$", 25987 // "required": true, 25988 // "type": "string" 25989 // }, 25990 // "updateMask": { 25991 // "description": "Required. The mask to control which fields to update.", 25992 // "format": "google-fieldmask", 25993 // "location": "query", 25994 // "type": "string" 25995 // } 25996 // }, 25997 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}", 25998 // "request": { 25999 // "$ref": "LineItem" 26000 // }, 26001 // "response": { 26002 // "$ref": "LineItem" 26003 // }, 26004 // "scopes": [ 26005 // "https://www.googleapis.com/auth/display-video" 26006 // ] 26007 // } 26008 26009 } 26010 26011 // method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create": 26012 26013 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall struct { 26014 s *Service 26015 advertiserId int64 26016 lineItemId int64 26017 targetingType string 26018 assignedtargetingoption *AssignedTargetingOption 26019 urlParams_ gensupport.URLParams 26020 ctx_ context.Context 26021 header_ http.Header 26022 } 26023 26024 // Create: Assigns a targeting option to a line item. Returns the 26025 // assigned targeting option if successful. Requests to this endpoint 26026 // cannot be made concurrently with the following requests updating the 26027 // same line item: * lineItems.bulkEditAssignedTargetingOptions * 26028 // lineItems.bulkUpdate * lineItems.patch * 26029 // DeleteLineItemAssignedTargetingOption YouTube & Partners line items 26030 // cannot be created or updated using the API. 26031 // 26032 // - advertiserId: The ID of the advertiser the line item belongs to. 26033 // - lineItemId: The ID of the line item the assigned targeting option 26034 // will belong to. 26035 // - targetingType: Identifies the type of this assigned targeting 26036 // option. Supported targeting types include: * 26037 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * 26038 // `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * 26039 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * 26040 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 26041 // `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * 26042 // `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * 26043 // `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * 26044 // `TARGETING_TYPE_CONTENT_GENRE` * 26045 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 26046 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 26047 // `TARGETING_TYPE_CONTENT_STREAM_TYPE` * 26048 // `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` 26049 // - `TARGETING_TYPE_DEVICE_TYPE` * 26050 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 26051 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 26052 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 26053 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 26054 // `TARGETING_TYPE_INVENTORY_SOURCE` * 26055 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` 26056 // - `TARGETING_TYPE_LANGUAGE` * 26057 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * 26058 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * 26059 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 26060 // `TARGETING_TYPE_OPERATING_SYSTEM` * 26061 // `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * 26062 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * 26063 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * 26064 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 26065 // `TARGETING_TYPE_SUB_EXCHANGE` * 26066 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * 26067 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 26068 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. 26069 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, lineItemId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall { 26070 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26071 c.advertiserId = advertiserId 26072 c.lineItemId = lineItemId 26073 c.targetingType = targetingType 26074 c.assignedtargetingoption = assignedtargetingoption 26075 return c 26076 } 26077 26078 // Fields allows partial responses to be retrieved. See 26079 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26080 // for more information. 26081 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall { 26082 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26083 return c 26084 } 26085 26086 // Context sets the context to be used in this call's Do method. Any 26087 // pending HTTP request will be aborted if the provided context is 26088 // canceled. 26089 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall { 26090 c.ctx_ = ctx 26091 return c 26092 } 26093 26094 // Header returns an http.Header that can be modified by the caller to 26095 // add HTTP headers to the request. 26096 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { 26097 if c.header_ == nil { 26098 c.header_ = make(http.Header) 26099 } 26100 return c.header_ 26101 } 26102 26103 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { 26104 reqHeaders := make(http.Header) 26105 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 26106 for k, v := range c.header_ { 26107 reqHeaders[k] = v 26108 } 26109 reqHeaders.Set("User-Agent", c.s.userAgent()) 26110 var body io.Reader = nil 26111 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption) 26112 if err != nil { 26113 return nil, err 26114 } 26115 reqHeaders.Set("Content-Type", "application/json") 26116 c.urlParams_.Set("alt", alt) 26117 c.urlParams_.Set("prettyPrint", "false") 26118 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 26119 urls += "?" + c.urlParams_.Encode() 26120 req, err := http.NewRequest("POST", urls, body) 26121 if err != nil { 26122 return nil, err 26123 } 26124 req.Header = reqHeaders 26125 googleapi.Expand(req.URL, map[string]string{ 26126 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 26127 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 26128 "targetingType": c.targetingType, 26129 }) 26130 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26131 } 26132 26133 // Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create" call. 26134 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 26135 // non-2xx status code is an error. Response headers are in either 26136 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 26137 // returned at all) in error.(*googleapi.Error).Header. Use 26138 // googleapi.IsNotModified to check whether the returned error was 26139 // because http.StatusNotModified was returned. 26140 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 26141 gensupport.SetOptions(c.urlParams_, opts...) 26142 res, err := c.doRequest("json") 26143 if res != nil && res.StatusCode == http.StatusNotModified { 26144 if res.Body != nil { 26145 res.Body.Close() 26146 } 26147 return nil, gensupport.WrapError(&googleapi.Error{ 26148 Code: res.StatusCode, 26149 Header: res.Header, 26150 }) 26151 } 26152 if err != nil { 26153 return nil, err 26154 } 26155 defer googleapi.CloseBody(res) 26156 if err := googleapi.CheckResponse(res); err != nil { 26157 return nil, gensupport.WrapError(err) 26158 } 26159 ret := &AssignedTargetingOption{ 26160 ServerResponse: googleapi.ServerResponse{ 26161 Header: res.Header, 26162 HTTPStatusCode: res.StatusCode, 26163 }, 26164 } 26165 target := &ret 26166 if err := gensupport.DecodeResponse(target, res); err != nil { 26167 return nil, err 26168 } 26169 return ret, nil 26170 // { 26171 // "description": "Assigns a targeting option to a line item. Returns the assigned targeting option if successful. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * DeleteLineItemAssignedTargetingOption YouTube \u0026 Partners line items cannot be created or updated using the API.", 26172 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 26173 // "httpMethod": "POST", 26174 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create", 26175 // "parameterOrder": [ 26176 // "advertiserId", 26177 // "lineItemId", 26178 // "targetingType" 26179 // ], 26180 // "parameters": { 26181 // "advertiserId": { 26182 // "description": "Required. The ID of the advertiser the line item belongs to.", 26183 // "format": "int64", 26184 // "location": "path", 26185 // "pattern": "^[^/]+$", 26186 // "required": true, 26187 // "type": "string" 26188 // }, 26189 // "lineItemId": { 26190 // "description": "Required. The ID of the line item the assigned targeting option will belong to.", 26191 // "format": "int64", 26192 // "location": "path", 26193 // "pattern": "^[^/]+$", 26194 // "required": true, 26195 // "type": "string" 26196 // }, 26197 // "targetingType": { 26198 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", 26199 // "enum": [ 26200 // "TARGETING_TYPE_UNSPECIFIED", 26201 // "TARGETING_TYPE_CHANNEL", 26202 // "TARGETING_TYPE_APP_CATEGORY", 26203 // "TARGETING_TYPE_APP", 26204 // "TARGETING_TYPE_URL", 26205 // "TARGETING_TYPE_DAY_AND_TIME", 26206 // "TARGETING_TYPE_AGE_RANGE", 26207 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 26208 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 26209 // "TARGETING_TYPE_GENDER", 26210 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 26211 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 26212 // "TARGETING_TYPE_PARENTAL_STATUS", 26213 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 26214 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 26215 // "TARGETING_TYPE_DEVICE_TYPE", 26216 // "TARGETING_TYPE_AUDIENCE_GROUP", 26217 // "TARGETING_TYPE_BROWSER", 26218 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 26219 // "TARGETING_TYPE_ON_SCREEN_POSITION", 26220 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 26221 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 26222 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 26223 // "TARGETING_TYPE_ENVIRONMENT", 26224 // "TARGETING_TYPE_CARRIER_AND_ISP", 26225 // "TARGETING_TYPE_OPERATING_SYSTEM", 26226 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 26227 // "TARGETING_TYPE_KEYWORD", 26228 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 26229 // "TARGETING_TYPE_VIEWABILITY", 26230 // "TARGETING_TYPE_CATEGORY", 26231 // "TARGETING_TYPE_INVENTORY_SOURCE", 26232 // "TARGETING_TYPE_LANGUAGE", 26233 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 26234 // "TARGETING_TYPE_GEO_REGION", 26235 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 26236 // "TARGETING_TYPE_EXCHANGE", 26237 // "TARGETING_TYPE_SUB_EXCHANGE", 26238 // "TARGETING_TYPE_POI", 26239 // "TARGETING_TYPE_BUSINESS_CHAIN", 26240 // "TARGETING_TYPE_CONTENT_DURATION", 26241 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 26242 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 26243 // "TARGETING_TYPE_OMID", 26244 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 26245 // "TARGETING_TYPE_CONTENT_GENRE" 26246 // ], 26247 // "enumDescriptions": [ 26248 // "Default value when type is not specified or is unknown in this version.", 26249 // "Target a channel (a custom group of related websites or apps).", 26250 // "Target an app category (for example, education or puzzle games).", 26251 // "Target a specific app (for example, Angry Birds).", 26252 // "Target a specific url (for example, quora.com).", 26253 // "Target ads during a chosen time period on a specific day.", 26254 // "Target ads to a specific age range (for example, 18-24).", 26255 // "Target ads to the specified regions on a regional location list.", 26256 // "Target ads to the specified points of interest on a proximity location list.", 26257 // "Target ads to a specific gender (for example, female or male).", 26258 // "Target a specific video player size for video ads.", 26259 // "Target user rewarded content for video ads.", 26260 // "Target ads to a specific parental status (for example, parent or not a parent).", 26261 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 26262 // "Target ads in a specific content outstream position.", 26263 // "Target ads to a specific device type (for example, tablet or connected TV).", 26264 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 26265 // "Target ads to specific web browsers (for example, Chrome).", 26266 // "Target ads to a specific household income range (for example, top 10%).", 26267 // "Target ads in a specific on screen position.", 26268 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 26269 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 26270 // "Filter website content by sensitive categories (for example, adult).", 26271 // "Target ads to a specific environment (for example, web or app).", 26272 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 26273 // "Target ads to a specific operating system (for example, macOS).", 26274 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 26275 // "Target ads to a specific keyword (for example, dog or retriever).", 26276 // "Target ads to a specific negative keyword list.", 26277 // "Target ads to a specific viewability (for example, 80% viewable).", 26278 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 26279 // "Purchase impressions from specific deals and auction packages.", 26280 // "Target ads to a specific language (for example, English or Japanese).", 26281 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 26282 // "Target ads to a specific regional location (for example, a city or state).", 26283 // "Purchase impressions from a group of deals and auction packages.", 26284 // "Purchase impressions from specific exchanges.", 26285 // "Purchase impressions from specific sub-exchanges.", 26286 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 26287 // "Target ads around locations of a business chain within a specific geo region.", 26288 // "Target ads to a specific video content duration.", 26289 // "Target ads to a specific video content stream type.", 26290 // "Target ads to a specific native content position.", 26291 // "Target ads in an Open Measurement enabled inventory.", 26292 // "Target ads to a specific audio content type.", 26293 // "Target ads to a specific content genre." 26294 // ], 26295 // "location": "path", 26296 // "pattern": "^[^/]+$", 26297 // "required": true, 26298 // "type": "string" 26299 // } 26300 // }, 26301 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 26302 // "request": { 26303 // "$ref": "AssignedTargetingOption" 26304 // }, 26305 // "response": { 26306 // "$ref": "AssignedTargetingOption" 26307 // }, 26308 // "scopes": [ 26309 // "https://www.googleapis.com/auth/display-video" 26310 // ] 26311 // } 26312 26313 } 26314 26315 // method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete": 26316 26317 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall struct { 26318 s *Service 26319 advertiserId int64 26320 lineItemId int64 26321 targetingType string 26322 assignedTargetingOptionId string 26323 urlParams_ gensupport.URLParams 26324 ctx_ context.Context 26325 header_ http.Header 26326 } 26327 26328 // Delete: Deletes an assigned targeting option from a line item. 26329 // Requests to this endpoint cannot be made concurrently with the 26330 // following requests updating the same line item: * 26331 // lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * 26332 // lineItems.patch * CreateLineItemAssignedTargetingOption YouTube & 26333 // Partners line items cannot be created or updated using the API. 26334 // 26335 // - advertiserId: The ID of the advertiser the line item belongs to. 26336 // - assignedTargetingOptionId: The ID of the assigned targeting option 26337 // to delete. 26338 // - lineItemId: The ID of the line item the assigned targeting option 26339 // belongs to. 26340 // - targetingType: Identifies the type of this assigned targeting 26341 // option. Supported targeting types include: * 26342 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * 26343 // `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * 26344 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * 26345 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 26346 // `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * 26347 // `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * 26348 // `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * 26349 // `TARGETING_TYPE_CONTENT_GENRE` * 26350 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 26351 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 26352 // `TARGETING_TYPE_CONTENT_STREAM_TYPE` * 26353 // `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` 26354 // - `TARGETING_TYPE_DEVICE_TYPE` * 26355 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 26356 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 26357 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 26358 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 26359 // `TARGETING_TYPE_INVENTORY_SOURCE` * 26360 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` 26361 // - `TARGETING_TYPE_LANGUAGE` * 26362 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * 26363 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * 26364 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 26365 // `TARGETING_TYPE_OPERATING_SYSTEM` * 26366 // `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * 26367 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * 26368 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * 26369 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 26370 // `TARGETING_TYPE_SUB_EXCHANGE` * 26371 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * 26372 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 26373 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`. 26374 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall { 26375 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26376 c.advertiserId = advertiserId 26377 c.lineItemId = lineItemId 26378 c.targetingType = targetingType 26379 c.assignedTargetingOptionId = assignedTargetingOptionId 26380 return c 26381 } 26382 26383 // Fields allows partial responses to be retrieved. See 26384 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26385 // for more information. 26386 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall { 26387 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26388 return c 26389 } 26390 26391 // Context sets the context to be used in this call's Do method. Any 26392 // pending HTTP request will be aborted if the provided context is 26393 // canceled. 26394 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall { 26395 c.ctx_ = ctx 26396 return c 26397 } 26398 26399 // Header returns an http.Header that can be modified by the caller to 26400 // add HTTP headers to the request. 26401 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { 26402 if c.header_ == nil { 26403 c.header_ = make(http.Header) 26404 } 26405 return c.header_ 26406 } 26407 26408 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { 26409 reqHeaders := make(http.Header) 26410 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 26411 for k, v := range c.header_ { 26412 reqHeaders[k] = v 26413 } 26414 reqHeaders.Set("User-Agent", c.s.userAgent()) 26415 var body io.Reader = nil 26416 c.urlParams_.Set("alt", alt) 26417 c.urlParams_.Set("prettyPrint", "false") 26418 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 26419 urls += "?" + c.urlParams_.Encode() 26420 req, err := http.NewRequest("DELETE", urls, body) 26421 if err != nil { 26422 return nil, err 26423 } 26424 req.Header = reqHeaders 26425 googleapi.Expand(req.URL, map[string]string{ 26426 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 26427 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 26428 "targetingType": c.targetingType, 26429 "assignedTargetingOptionId": c.assignedTargetingOptionId, 26430 }) 26431 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26432 } 26433 26434 // Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete" call. 26435 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 26436 // code is an error. Response headers are in either 26437 // *Empty.ServerResponse.Header or (if a response was returned at all) 26438 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 26439 // check whether the returned error was because http.StatusNotModified 26440 // was returned. 26441 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 26442 gensupport.SetOptions(c.urlParams_, opts...) 26443 res, err := c.doRequest("json") 26444 if res != nil && res.StatusCode == http.StatusNotModified { 26445 if res.Body != nil { 26446 res.Body.Close() 26447 } 26448 return nil, gensupport.WrapError(&googleapi.Error{ 26449 Code: res.StatusCode, 26450 Header: res.Header, 26451 }) 26452 } 26453 if err != nil { 26454 return nil, err 26455 } 26456 defer googleapi.CloseBody(res) 26457 if err := googleapi.CheckResponse(res); err != nil { 26458 return nil, gensupport.WrapError(err) 26459 } 26460 ret := &Empty{ 26461 ServerResponse: googleapi.ServerResponse{ 26462 Header: res.Header, 26463 HTTPStatusCode: res.StatusCode, 26464 }, 26465 } 26466 target := &ret 26467 if err := gensupport.DecodeResponse(target, res); err != nil { 26468 return nil, err 26469 } 26470 return ret, nil 26471 // { 26472 // "description": "Deletes an assigned targeting option from a line item. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: * lineItems.bulkEditAssignedTargetingOptions * lineItems.bulkUpdate * lineItems.patch * CreateLineItemAssignedTargetingOption YouTube \u0026 Partners line items cannot be created or updated using the API.", 26473 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 26474 // "httpMethod": "DELETE", 26475 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete", 26476 // "parameterOrder": [ 26477 // "advertiserId", 26478 // "lineItemId", 26479 // "targetingType", 26480 // "assignedTargetingOptionId" 26481 // ], 26482 // "parameters": { 26483 // "advertiserId": { 26484 // "description": "Required. The ID of the advertiser the line item belongs to.", 26485 // "format": "int64", 26486 // "location": "path", 26487 // "pattern": "^[^/]+$", 26488 // "required": true, 26489 // "type": "string" 26490 // }, 26491 // "assignedTargetingOptionId": { 26492 // "description": "Required. The ID of the assigned targeting option to delete.", 26493 // "location": "path", 26494 // "pattern": "^[^/]+$", 26495 // "required": true, 26496 // "type": "string" 26497 // }, 26498 // "lineItemId": { 26499 // "description": "Required. The ID of the line item the assigned targeting option belongs to.", 26500 // "format": "int64", 26501 // "location": "path", 26502 // "pattern": "^[^/]+$", 26503 // "required": true, 26504 // "type": "string" 26505 // }, 26506 // "targetingType": { 26507 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY`", 26508 // "enum": [ 26509 // "TARGETING_TYPE_UNSPECIFIED", 26510 // "TARGETING_TYPE_CHANNEL", 26511 // "TARGETING_TYPE_APP_CATEGORY", 26512 // "TARGETING_TYPE_APP", 26513 // "TARGETING_TYPE_URL", 26514 // "TARGETING_TYPE_DAY_AND_TIME", 26515 // "TARGETING_TYPE_AGE_RANGE", 26516 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 26517 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 26518 // "TARGETING_TYPE_GENDER", 26519 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 26520 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 26521 // "TARGETING_TYPE_PARENTAL_STATUS", 26522 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 26523 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 26524 // "TARGETING_TYPE_DEVICE_TYPE", 26525 // "TARGETING_TYPE_AUDIENCE_GROUP", 26526 // "TARGETING_TYPE_BROWSER", 26527 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 26528 // "TARGETING_TYPE_ON_SCREEN_POSITION", 26529 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 26530 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 26531 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 26532 // "TARGETING_TYPE_ENVIRONMENT", 26533 // "TARGETING_TYPE_CARRIER_AND_ISP", 26534 // "TARGETING_TYPE_OPERATING_SYSTEM", 26535 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 26536 // "TARGETING_TYPE_KEYWORD", 26537 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 26538 // "TARGETING_TYPE_VIEWABILITY", 26539 // "TARGETING_TYPE_CATEGORY", 26540 // "TARGETING_TYPE_INVENTORY_SOURCE", 26541 // "TARGETING_TYPE_LANGUAGE", 26542 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 26543 // "TARGETING_TYPE_GEO_REGION", 26544 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 26545 // "TARGETING_TYPE_EXCHANGE", 26546 // "TARGETING_TYPE_SUB_EXCHANGE", 26547 // "TARGETING_TYPE_POI", 26548 // "TARGETING_TYPE_BUSINESS_CHAIN", 26549 // "TARGETING_TYPE_CONTENT_DURATION", 26550 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 26551 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 26552 // "TARGETING_TYPE_OMID", 26553 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 26554 // "TARGETING_TYPE_CONTENT_GENRE" 26555 // ], 26556 // "enumDescriptions": [ 26557 // "Default value when type is not specified or is unknown in this version.", 26558 // "Target a channel (a custom group of related websites or apps).", 26559 // "Target an app category (for example, education or puzzle games).", 26560 // "Target a specific app (for example, Angry Birds).", 26561 // "Target a specific url (for example, quora.com).", 26562 // "Target ads during a chosen time period on a specific day.", 26563 // "Target ads to a specific age range (for example, 18-24).", 26564 // "Target ads to the specified regions on a regional location list.", 26565 // "Target ads to the specified points of interest on a proximity location list.", 26566 // "Target ads to a specific gender (for example, female or male).", 26567 // "Target a specific video player size for video ads.", 26568 // "Target user rewarded content for video ads.", 26569 // "Target ads to a specific parental status (for example, parent or not a parent).", 26570 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 26571 // "Target ads in a specific content outstream position.", 26572 // "Target ads to a specific device type (for example, tablet or connected TV).", 26573 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 26574 // "Target ads to specific web browsers (for example, Chrome).", 26575 // "Target ads to a specific household income range (for example, top 10%).", 26576 // "Target ads in a specific on screen position.", 26577 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 26578 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 26579 // "Filter website content by sensitive categories (for example, adult).", 26580 // "Target ads to a specific environment (for example, web or app).", 26581 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 26582 // "Target ads to a specific operating system (for example, macOS).", 26583 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 26584 // "Target ads to a specific keyword (for example, dog or retriever).", 26585 // "Target ads to a specific negative keyword list.", 26586 // "Target ads to a specific viewability (for example, 80% viewable).", 26587 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 26588 // "Purchase impressions from specific deals and auction packages.", 26589 // "Target ads to a specific language (for example, English or Japanese).", 26590 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 26591 // "Target ads to a specific regional location (for example, a city or state).", 26592 // "Purchase impressions from a group of deals and auction packages.", 26593 // "Purchase impressions from specific exchanges.", 26594 // "Purchase impressions from specific sub-exchanges.", 26595 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 26596 // "Target ads around locations of a business chain within a specific geo region.", 26597 // "Target ads to a specific video content duration.", 26598 // "Target ads to a specific video content stream type.", 26599 // "Target ads to a specific native content position.", 26600 // "Target ads in an Open Measurement enabled inventory.", 26601 // "Target ads to a specific audio content type.", 26602 // "Target ads to a specific content genre." 26603 // ], 26604 // "location": "path", 26605 // "pattern": "^[^/]+$", 26606 // "required": true, 26607 // "type": "string" 26608 // } 26609 // }, 26610 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 26611 // "response": { 26612 // "$ref": "Empty" 26613 // }, 26614 // "scopes": [ 26615 // "https://www.googleapis.com/auth/display-video" 26616 // ] 26617 // } 26618 26619 } 26620 26621 // method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.get": 26622 26623 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall struct { 26624 s *Service 26625 advertiserId int64 26626 lineItemId int64 26627 targetingType string 26628 assignedTargetingOptionId string 26629 urlParams_ gensupport.URLParams 26630 ifNoneMatch_ string 26631 ctx_ context.Context 26632 header_ http.Header 26633 } 26634 26635 // Get: Gets a single targeting option assigned to a line item. 26636 // 26637 // - advertiserId: The ID of the advertiser the line item belongs to. 26638 // - assignedTargetingOptionId: An identifier unique to the targeting 26639 // type in this line item that identifies the assigned targeting 26640 // option being requested. 26641 // - lineItemId: The ID of the line item the assigned targeting option 26642 // belongs to. 26643 // - targetingType: Identifies the type of this assigned targeting 26644 // option. Supported targeting types include: * 26645 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * 26646 // `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * 26647 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * 26648 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 26649 // `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * 26650 // `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * 26651 // `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * 26652 // `TARGETING_TYPE_CONTENT_GENRE` * 26653 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 26654 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 26655 // `TARGETING_TYPE_CONTENT_STREAM_TYPE` * 26656 // `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` 26657 // - `TARGETING_TYPE_DEVICE_TYPE` * 26658 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 26659 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 26660 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 26661 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 26662 // `TARGETING_TYPE_INVENTORY_SOURCE` * 26663 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` 26664 // - `TARGETING_TYPE_LANGUAGE` * 26665 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * 26666 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * 26667 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 26668 // `TARGETING_TYPE_OPERATING_SYSTEM` * 26669 // `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * 26670 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * 26671 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * 26672 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 26673 // `TARGETING_TYPE_SUB_EXCHANGE` * 26674 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * 26675 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 26676 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY` * 26677 // `TARGETING_TYPE_YOUTUBE_CHANNEL` (only for 26678 // `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items) * 26679 // `TARGETING_TYPE_YOUTUBE_VIDEO` (only for 26680 // `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items). 26681 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 26682 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26683 c.advertiserId = advertiserId 26684 c.lineItemId = lineItemId 26685 c.targetingType = targetingType 26686 c.assignedTargetingOptionId = assignedTargetingOptionId 26687 return c 26688 } 26689 26690 // Fields allows partial responses to be retrieved. See 26691 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 26692 // for more information. 26693 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 26694 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 26695 return c 26696 } 26697 26698 // IfNoneMatch sets the optional parameter which makes the operation 26699 // fail if the object's ETag matches the given value. This is useful for 26700 // getting updates only after the object has changed since the last 26701 // request. Use googleapi.IsNotModified to check whether the response 26702 // error from Do is the result of In-None-Match. 26703 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 26704 c.ifNoneMatch_ = entityTag 26705 return c 26706 } 26707 26708 // Context sets the context to be used in this call's Do method. Any 26709 // pending HTTP request will be aborted if the provided context is 26710 // canceled. 26711 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 26712 c.ctx_ = ctx 26713 return c 26714 } 26715 26716 // Header returns an http.Header that can be modified by the caller to 26717 // add HTTP headers to the request. 26718 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { 26719 if c.header_ == nil { 26720 c.header_ = make(http.Header) 26721 } 26722 return c.header_ 26723 } 26724 26725 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 26726 reqHeaders := make(http.Header) 26727 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 26728 for k, v := range c.header_ { 26729 reqHeaders[k] = v 26730 } 26731 reqHeaders.Set("User-Agent", c.s.userAgent()) 26732 if c.ifNoneMatch_ != "" { 26733 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 26734 } 26735 var body io.Reader = nil 26736 c.urlParams_.Set("alt", alt) 26737 c.urlParams_.Set("prettyPrint", "false") 26738 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 26739 urls += "?" + c.urlParams_.Encode() 26740 req, err := http.NewRequest("GET", urls, body) 26741 if err != nil { 26742 return nil, err 26743 } 26744 req.Header = reqHeaders 26745 googleapi.Expand(req.URL, map[string]string{ 26746 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 26747 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 26748 "targetingType": c.targetingType, 26749 "assignedTargetingOptionId": c.assignedTargetingOptionId, 26750 }) 26751 return gensupport.SendRequest(c.ctx_, c.s.client, req) 26752 } 26753 26754 // Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.get" call. 26755 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 26756 // non-2xx status code is an error. Response headers are in either 26757 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 26758 // returned at all) in error.(*googleapi.Error).Header. Use 26759 // googleapi.IsNotModified to check whether the returned error was 26760 // because http.StatusNotModified was returned. 26761 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 26762 gensupport.SetOptions(c.urlParams_, opts...) 26763 res, err := c.doRequest("json") 26764 if res != nil && res.StatusCode == http.StatusNotModified { 26765 if res.Body != nil { 26766 res.Body.Close() 26767 } 26768 return nil, gensupport.WrapError(&googleapi.Error{ 26769 Code: res.StatusCode, 26770 Header: res.Header, 26771 }) 26772 } 26773 if err != nil { 26774 return nil, err 26775 } 26776 defer googleapi.CloseBody(res) 26777 if err := googleapi.CheckResponse(res); err != nil { 26778 return nil, gensupport.WrapError(err) 26779 } 26780 ret := &AssignedTargetingOption{ 26781 ServerResponse: googleapi.ServerResponse{ 26782 Header: res.Header, 26783 HTTPStatusCode: res.StatusCode, 26784 }, 26785 } 26786 target := &ret 26787 if err := gensupport.DecodeResponse(target, res); err != nil { 26788 return nil, err 26789 } 26790 return ret, nil 26791 // { 26792 // "description": "Gets a single targeting option assigned to a line item.", 26793 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 26794 // "httpMethod": "GET", 26795 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.get", 26796 // "parameterOrder": [ 26797 // "advertiserId", 26798 // "lineItemId", 26799 // "targetingType", 26800 // "assignedTargetingOptionId" 26801 // ], 26802 // "parameters": { 26803 // "advertiserId": { 26804 // "description": "Required. The ID of the advertiser the line item belongs to.", 26805 // "format": "int64", 26806 // "location": "path", 26807 // "pattern": "^[^/]+$", 26808 // "required": true, 26809 // "type": "string" 26810 // }, 26811 // "assignedTargetingOptionId": { 26812 // "description": "Required. An identifier unique to the targeting type in this line item that identifies the assigned targeting option being requested.", 26813 // "location": "path", 26814 // "pattern": "^[^/]+$", 26815 // "required": true, 26816 // "type": "string" 26817 // }, 26818 // "lineItemId": { 26819 // "description": "Required. The ID of the line item the assigned targeting option belongs to.", 26820 // "format": "int64", 26821 // "location": "path", 26822 // "pattern": "^[^/]+$", 26823 // "required": true, 26824 // "type": "string" 26825 // }, 26826 // "targetingType": { 26827 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY` * `TARGETING_TYPE_YOUTUBE_CHANNEL` (only for `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items) * `TARGETING_TYPE_YOUTUBE_VIDEO` (only for `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items)", 26828 // "enum": [ 26829 // "TARGETING_TYPE_UNSPECIFIED", 26830 // "TARGETING_TYPE_CHANNEL", 26831 // "TARGETING_TYPE_APP_CATEGORY", 26832 // "TARGETING_TYPE_APP", 26833 // "TARGETING_TYPE_URL", 26834 // "TARGETING_TYPE_DAY_AND_TIME", 26835 // "TARGETING_TYPE_AGE_RANGE", 26836 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 26837 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 26838 // "TARGETING_TYPE_GENDER", 26839 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 26840 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 26841 // "TARGETING_TYPE_PARENTAL_STATUS", 26842 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 26843 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 26844 // "TARGETING_TYPE_DEVICE_TYPE", 26845 // "TARGETING_TYPE_AUDIENCE_GROUP", 26846 // "TARGETING_TYPE_BROWSER", 26847 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 26848 // "TARGETING_TYPE_ON_SCREEN_POSITION", 26849 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 26850 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 26851 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 26852 // "TARGETING_TYPE_ENVIRONMENT", 26853 // "TARGETING_TYPE_CARRIER_AND_ISP", 26854 // "TARGETING_TYPE_OPERATING_SYSTEM", 26855 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 26856 // "TARGETING_TYPE_KEYWORD", 26857 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 26858 // "TARGETING_TYPE_VIEWABILITY", 26859 // "TARGETING_TYPE_CATEGORY", 26860 // "TARGETING_TYPE_INVENTORY_SOURCE", 26861 // "TARGETING_TYPE_LANGUAGE", 26862 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 26863 // "TARGETING_TYPE_GEO_REGION", 26864 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 26865 // "TARGETING_TYPE_EXCHANGE", 26866 // "TARGETING_TYPE_SUB_EXCHANGE", 26867 // "TARGETING_TYPE_POI", 26868 // "TARGETING_TYPE_BUSINESS_CHAIN", 26869 // "TARGETING_TYPE_CONTENT_DURATION", 26870 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 26871 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 26872 // "TARGETING_TYPE_OMID", 26873 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 26874 // "TARGETING_TYPE_CONTENT_GENRE" 26875 // ], 26876 // "enumDescriptions": [ 26877 // "Default value when type is not specified or is unknown in this version.", 26878 // "Target a channel (a custom group of related websites or apps).", 26879 // "Target an app category (for example, education or puzzle games).", 26880 // "Target a specific app (for example, Angry Birds).", 26881 // "Target a specific url (for example, quora.com).", 26882 // "Target ads during a chosen time period on a specific day.", 26883 // "Target ads to a specific age range (for example, 18-24).", 26884 // "Target ads to the specified regions on a regional location list.", 26885 // "Target ads to the specified points of interest on a proximity location list.", 26886 // "Target ads to a specific gender (for example, female or male).", 26887 // "Target a specific video player size for video ads.", 26888 // "Target user rewarded content for video ads.", 26889 // "Target ads to a specific parental status (for example, parent or not a parent).", 26890 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 26891 // "Target ads in a specific content outstream position.", 26892 // "Target ads to a specific device type (for example, tablet or connected TV).", 26893 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 26894 // "Target ads to specific web browsers (for example, Chrome).", 26895 // "Target ads to a specific household income range (for example, top 10%).", 26896 // "Target ads in a specific on screen position.", 26897 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 26898 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 26899 // "Filter website content by sensitive categories (for example, adult).", 26900 // "Target ads to a specific environment (for example, web or app).", 26901 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 26902 // "Target ads to a specific operating system (for example, macOS).", 26903 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 26904 // "Target ads to a specific keyword (for example, dog or retriever).", 26905 // "Target ads to a specific negative keyword list.", 26906 // "Target ads to a specific viewability (for example, 80% viewable).", 26907 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 26908 // "Purchase impressions from specific deals and auction packages.", 26909 // "Target ads to a specific language (for example, English or Japanese).", 26910 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 26911 // "Target ads to a specific regional location (for example, a city or state).", 26912 // "Purchase impressions from a group of deals and auction packages.", 26913 // "Purchase impressions from specific exchanges.", 26914 // "Purchase impressions from specific sub-exchanges.", 26915 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 26916 // "Target ads around locations of a business chain within a specific geo region.", 26917 // "Target ads to a specific video content duration.", 26918 // "Target ads to a specific video content stream type.", 26919 // "Target ads to a specific native content position.", 26920 // "Target ads in an Open Measurement enabled inventory.", 26921 // "Target ads to a specific audio content type.", 26922 // "Target ads to a specific content genre." 26923 // ], 26924 // "location": "path", 26925 // "pattern": "^[^/]+$", 26926 // "required": true, 26927 // "type": "string" 26928 // } 26929 // }, 26930 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 26931 // "response": { 26932 // "$ref": "AssignedTargetingOption" 26933 // }, 26934 // "scopes": [ 26935 // "https://www.googleapis.com/auth/display-video" 26936 // ] 26937 // } 26938 26939 } 26940 26941 // method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.list": 26942 26943 type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall struct { 26944 s *Service 26945 advertiserId int64 26946 lineItemId int64 26947 targetingType string 26948 urlParams_ gensupport.URLParams 26949 ifNoneMatch_ string 26950 ctx_ context.Context 26951 header_ http.Header 26952 } 26953 26954 // List: Lists the targeting options assigned to a line item. 26955 // 26956 // - advertiserId: The ID of the advertiser the line item belongs to. 26957 // - lineItemId: The ID of the line item to list assigned targeting 26958 // options for. 26959 // - targetingType: Identifies the type of assigned targeting options to 26960 // list. Supported targeting types include: * 26961 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * 26962 // `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * 26963 // `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * 26964 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 26965 // `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * 26966 // `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * 26967 // `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * 26968 // `TARGETING_TYPE_CONTENT_GENRE` * 26969 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 26970 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 26971 // `TARGETING_TYPE_CONTENT_STREAM_TYPE` * 26972 // `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` 26973 // - `TARGETING_TYPE_DEVICE_TYPE` * 26974 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 26975 // `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * 26976 // `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * 26977 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 26978 // `TARGETING_TYPE_INVENTORY_SOURCE` * 26979 // `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` 26980 // - `TARGETING_TYPE_LANGUAGE` * 26981 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * 26982 // `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * 26983 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 26984 // `TARGETING_TYPE_OPERATING_SYSTEM` * 26985 // `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * 26986 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * 26987 // `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * 26988 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 26989 // `TARGETING_TYPE_SUB_EXCHANGE` * 26990 // `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * 26991 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 26992 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY` * 26993 // `TARGETING_TYPE_YOUTUBE_CHANNEL` (only for 26994 // `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items) * 26995 // `TARGETING_TYPE_YOUTUBE_VIDEO` (only for 26996 // `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items). 26997 func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, lineItemId int64, targetingType string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 26998 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 26999 c.advertiserId = advertiserId 27000 c.lineItemId = lineItemId 27001 c.targetingType = targetingType 27002 return c 27003 } 27004 27005 // Filter sets the optional parameter "filter": Allows filtering by 27006 // assigned targeting option fields. Supported syntax: * Filter 27007 // expressions are made up of one or more restrictions. * Restrictions 27008 // can be combined by the logical operator `OR`. * A restriction has the 27009 // form of `{field} {operator} {value}`. * All fields must use the 27010 // `EQUALS (=)` operator. Supported fields: * 27011 // `assignedTargetingOptionId` * `inheritance` Examples: * 27012 // `AssignedTargetingOption` resources with ID 1 or 2: 27013 // `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" * 27014 // `AssignedTargetingOption` resources with inheritance status of 27015 // `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: 27016 // `inheritance="NOT_INHERITED" OR inheritance="INHERITED_FROM_PARTNER" 27017 // The length of this field should be no more than 500 characters. 27018 // Reference our filter `LIST` requests 27019 // (/display-video/api/guides/how-tos/filters) guide for more 27020 // information. 27021 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27022 c.urlParams_.Set("filter", filter) 27023 return c 27024 } 27025 27026 // OrderBy sets the optional parameter "orderBy": Field by which to sort 27027 // the list. Acceptable values are: * `assignedTargetingOptionId` 27028 // (default) The default sorting order is ascending. To specify 27029 // descending order for a field, a suffix "desc" should be added to the 27030 // field name. Example: `assignedTargetingOptionId desc`. 27031 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27032 c.urlParams_.Set("orderBy", orderBy) 27033 return c 27034 } 27035 27036 // PageSize sets the optional parameter "pageSize": Requested page size. 27037 // Must be between `1` and `5000`. If unspecified will default to `100`. 27038 // Returns error code `INVALID_ARGUMENT` if an invalid value is 27039 // specified. 27040 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27041 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 27042 return c 27043 } 27044 27045 // PageToken sets the optional parameter "pageToken": A token 27046 // identifying a page of results the server should return. Typically, 27047 // this is the value of next_page_token returned from the previous call 27048 // to `ListLineItemAssignedTargetingOptions` method. If not specified, 27049 // the first page of results will be returned. 27050 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27051 c.urlParams_.Set("pageToken", pageToken) 27052 return c 27053 } 27054 27055 // Fields allows partial responses to be retrieved. See 27056 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 27057 // for more information. 27058 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27059 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 27060 return c 27061 } 27062 27063 // IfNoneMatch sets the optional parameter which makes the operation 27064 // fail if the object's ETag matches the given value. This is useful for 27065 // getting updates only after the object has changed since the last 27066 // request. Use googleapi.IsNotModified to check whether the response 27067 // error from Do is the result of In-None-Match. 27068 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27069 c.ifNoneMatch_ = entityTag 27070 return c 27071 } 27072 27073 // Context sets the context to be used in this call's Do method. Any 27074 // pending HTTP request will be aborted if the provided context is 27075 // canceled. 27076 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 27077 c.ctx_ = ctx 27078 return c 27079 } 27080 27081 // Header returns an http.Header that can be modified by the caller to 27082 // add HTTP headers to the request. 27083 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { 27084 if c.header_ == nil { 27085 c.header_ = make(http.Header) 27086 } 27087 return c.header_ 27088 } 27089 27090 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 27091 reqHeaders := make(http.Header) 27092 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 27093 for k, v := range c.header_ { 27094 reqHeaders[k] = v 27095 } 27096 reqHeaders.Set("User-Agent", c.s.userAgent()) 27097 if c.ifNoneMatch_ != "" { 27098 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 27099 } 27100 var body io.Reader = nil 27101 c.urlParams_.Set("alt", alt) 27102 c.urlParams_.Set("prettyPrint", "false") 27103 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 27104 urls += "?" + c.urlParams_.Encode() 27105 req, err := http.NewRequest("GET", urls, body) 27106 if err != nil { 27107 return nil, err 27108 } 27109 req.Header = reqHeaders 27110 googleapi.Expand(req.URL, map[string]string{ 27111 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 27112 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 27113 "targetingType": c.targetingType, 27114 }) 27115 return gensupport.SendRequest(c.ctx_, c.s.client, req) 27116 } 27117 27118 // Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.list" call. 27119 // Exactly one of *ListLineItemAssignedTargetingOptionsResponse or error 27120 // will be non-nil. Any non-2xx status code is an error. Response 27121 // headers are in either 27122 // *ListLineItemAssignedTargetingOptionsResponse.ServerResponse.Header 27123 // or (if a response was returned at all) in 27124 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 27125 // whether the returned error was because http.StatusNotModified was 27126 // returned. 27127 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemAssignedTargetingOptionsResponse, error) { 27128 gensupport.SetOptions(c.urlParams_, opts...) 27129 res, err := c.doRequest("json") 27130 if res != nil && res.StatusCode == http.StatusNotModified { 27131 if res.Body != nil { 27132 res.Body.Close() 27133 } 27134 return nil, gensupport.WrapError(&googleapi.Error{ 27135 Code: res.StatusCode, 27136 Header: res.Header, 27137 }) 27138 } 27139 if err != nil { 27140 return nil, err 27141 } 27142 defer googleapi.CloseBody(res) 27143 if err := googleapi.CheckResponse(res); err != nil { 27144 return nil, gensupport.WrapError(err) 27145 } 27146 ret := &ListLineItemAssignedTargetingOptionsResponse{ 27147 ServerResponse: googleapi.ServerResponse{ 27148 Header: res.Header, 27149 HTTPStatusCode: res.StatusCode, 27150 }, 27151 } 27152 target := &ret 27153 if err := gensupport.DecodeResponse(target, res); err != nil { 27154 return nil, err 27155 } 27156 return ret, nil 27157 // { 27158 // "description": "Lists the targeting options assigned to a line item.", 27159 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 27160 // "httpMethod": "GET", 27161 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.list", 27162 // "parameterOrder": [ 27163 // "advertiserId", 27164 // "lineItemId", 27165 // "targetingType" 27166 // ], 27167 // "parameters": { 27168 // "advertiserId": { 27169 // "description": "Required. The ID of the advertiser the line item belongs to.", 27170 // "format": "int64", 27171 // "location": "path", 27172 // "pattern": "^[^/]+$", 27173 // "required": true, 27174 // "type": "string" 27175 // }, 27176 // "filter": { 27177 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` * `inheritance` Examples: * `AssignedTargetingOption` resources with ID 1 or 2: `assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"` * `AssignedTargetingOption` resources with inheritance status of `NOT_INHERITED` or `INHERITED_FROM_PARTNER`: `inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 27178 // "location": "query", 27179 // "type": "string" 27180 // }, 27181 // "lineItemId": { 27182 // "description": "Required. The ID of the line item to list assigned targeting options for.", 27183 // "format": "int64", 27184 // "location": "path", 27185 // "pattern": "^[^/]+$", 27186 // "required": true, 27187 // "type": "string" 27188 // }, 27189 // "orderBy": { 27190 // "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", 27191 // "location": "query", 27192 // "type": "string" 27193 // }, 27194 // "pageSize": { 27195 // "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 27196 // "format": "int32", 27197 // "location": "query", 27198 // "type": "integer" 27199 // }, 27200 // "pageToken": { 27201 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListLineItemAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 27202 // "location": "query", 27203 // "type": "string" 27204 // }, 27205 // "targetingType": { 27206 // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types include: * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_APP` * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AUDIENCE_GROUP` * `TARGETING_TYPE_AUDIO_CONTENT_TYPE` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_BUSINESS_CHAIN` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_CONTENT_DURATION` * `TARGETING_TYPE_CONTENT_GENRE` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_STREAM_TYPE` * `TARGETING_TYPE_DAY_AND_TIME` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_INVENTORY_SOURCE` * `TARGETING_TYPE_INVENTORY_SOURCE_GROUP` * `TARGETING_TYPE_KEYWORD` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_PROXIMITY_LOCATION_LIST` * `TARGETING_TYPE_REGIONAL_LOCATION_LIST` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_THIRD_PARTY_VERIFIER` * `TARGETING_TYPE_URL` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_VIEWABILITY` * `TARGETING_TYPE_YOUTUBE_CHANNEL` (only for `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items) * `TARGETING_TYPE_YOUTUBE_VIDEO` (only for `LINE_ITEM_TYPE_YOUTUBE_AND_PARTNERS_VIDEO_SEQUENCE` line items)", 27207 // "enum": [ 27208 // "TARGETING_TYPE_UNSPECIFIED", 27209 // "TARGETING_TYPE_CHANNEL", 27210 // "TARGETING_TYPE_APP_CATEGORY", 27211 // "TARGETING_TYPE_APP", 27212 // "TARGETING_TYPE_URL", 27213 // "TARGETING_TYPE_DAY_AND_TIME", 27214 // "TARGETING_TYPE_AGE_RANGE", 27215 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 27216 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 27217 // "TARGETING_TYPE_GENDER", 27218 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 27219 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 27220 // "TARGETING_TYPE_PARENTAL_STATUS", 27221 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 27222 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 27223 // "TARGETING_TYPE_DEVICE_TYPE", 27224 // "TARGETING_TYPE_AUDIENCE_GROUP", 27225 // "TARGETING_TYPE_BROWSER", 27226 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 27227 // "TARGETING_TYPE_ON_SCREEN_POSITION", 27228 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 27229 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 27230 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 27231 // "TARGETING_TYPE_ENVIRONMENT", 27232 // "TARGETING_TYPE_CARRIER_AND_ISP", 27233 // "TARGETING_TYPE_OPERATING_SYSTEM", 27234 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 27235 // "TARGETING_TYPE_KEYWORD", 27236 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 27237 // "TARGETING_TYPE_VIEWABILITY", 27238 // "TARGETING_TYPE_CATEGORY", 27239 // "TARGETING_TYPE_INVENTORY_SOURCE", 27240 // "TARGETING_TYPE_LANGUAGE", 27241 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 27242 // "TARGETING_TYPE_GEO_REGION", 27243 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 27244 // "TARGETING_TYPE_EXCHANGE", 27245 // "TARGETING_TYPE_SUB_EXCHANGE", 27246 // "TARGETING_TYPE_POI", 27247 // "TARGETING_TYPE_BUSINESS_CHAIN", 27248 // "TARGETING_TYPE_CONTENT_DURATION", 27249 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 27250 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 27251 // "TARGETING_TYPE_OMID", 27252 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 27253 // "TARGETING_TYPE_CONTENT_GENRE" 27254 // ], 27255 // "enumDescriptions": [ 27256 // "Default value when type is not specified or is unknown in this version.", 27257 // "Target a channel (a custom group of related websites or apps).", 27258 // "Target an app category (for example, education or puzzle games).", 27259 // "Target a specific app (for example, Angry Birds).", 27260 // "Target a specific url (for example, quora.com).", 27261 // "Target ads during a chosen time period on a specific day.", 27262 // "Target ads to a specific age range (for example, 18-24).", 27263 // "Target ads to the specified regions on a regional location list.", 27264 // "Target ads to the specified points of interest on a proximity location list.", 27265 // "Target ads to a specific gender (for example, female or male).", 27266 // "Target a specific video player size for video ads.", 27267 // "Target user rewarded content for video ads.", 27268 // "Target ads to a specific parental status (for example, parent or not a parent).", 27269 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 27270 // "Target ads in a specific content outstream position.", 27271 // "Target ads to a specific device type (for example, tablet or connected TV).", 27272 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 27273 // "Target ads to specific web browsers (for example, Chrome).", 27274 // "Target ads to a specific household income range (for example, top 10%).", 27275 // "Target ads in a specific on screen position.", 27276 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 27277 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 27278 // "Filter website content by sensitive categories (for example, adult).", 27279 // "Target ads to a specific environment (for example, web or app).", 27280 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 27281 // "Target ads to a specific operating system (for example, macOS).", 27282 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 27283 // "Target ads to a specific keyword (for example, dog or retriever).", 27284 // "Target ads to a specific negative keyword list.", 27285 // "Target ads to a specific viewability (for example, 80% viewable).", 27286 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 27287 // "Purchase impressions from specific deals and auction packages.", 27288 // "Target ads to a specific language (for example, English or Japanese).", 27289 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 27290 // "Target ads to a specific regional location (for example, a city or state).", 27291 // "Purchase impressions from a group of deals and auction packages.", 27292 // "Purchase impressions from specific exchanges.", 27293 // "Purchase impressions from specific sub-exchanges.", 27294 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 27295 // "Target ads around locations of a business chain within a specific geo region.", 27296 // "Target ads to a specific video content duration.", 27297 // "Target ads to a specific video content stream type.", 27298 // "Target ads to a specific native content position.", 27299 // "Target ads in an Open Measurement enabled inventory.", 27300 // "Target ads to a specific audio content type.", 27301 // "Target ads to a specific content genre." 27302 // ], 27303 // "location": "path", 27304 // "pattern": "^[^/]+$", 27305 // "required": true, 27306 // "type": "string" 27307 // } 27308 // }, 27309 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 27310 // "response": { 27311 // "$ref": "ListLineItemAssignedTargetingOptionsResponse" 27312 // }, 27313 // "scopes": [ 27314 // "https://www.googleapis.com/auth/display-video" 27315 // ] 27316 // } 27317 27318 } 27319 27320 // Pages invokes f for each page of results. 27321 // A non-nil error returned from f will halt the iteration. 27322 // The provided context supersedes any context provided to the Context method. 27323 func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListLineItemAssignedTargetingOptionsResponse) error) error { 27324 c.ctx_ = ctx 27325 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 27326 for { 27327 x, err := c.Do() 27328 if err != nil { 27329 return err 27330 } 27331 if err := f(x); err != nil { 27332 return err 27333 } 27334 if x.NextPageToken == "" { 27335 return nil 27336 } 27337 c.PageToken(x.NextPageToken) 27338 } 27339 } 27340 27341 // method id "displayvideo.advertisers.locationLists.create": 27342 27343 type AdvertisersLocationListsCreateCall struct { 27344 s *Service 27345 advertiserId int64 27346 locationlist *LocationList 27347 urlParams_ gensupport.URLParams 27348 ctx_ context.Context 27349 header_ http.Header 27350 } 27351 27352 // Create: Creates a new location list. Returns the newly created 27353 // location list if successful. 27354 // 27355 // - advertiserId: The ID of the DV360 advertiser to which the location 27356 // list belongs. 27357 func (r *AdvertisersLocationListsService) Create(advertiserId int64, locationlist *LocationList) *AdvertisersLocationListsCreateCall { 27358 c := &AdvertisersLocationListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 27359 c.advertiserId = advertiserId 27360 c.locationlist = locationlist 27361 return c 27362 } 27363 27364 // Fields allows partial responses to be retrieved. See 27365 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 27366 // for more information. 27367 func (c *AdvertisersLocationListsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsCreateCall { 27368 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 27369 return c 27370 } 27371 27372 // Context sets the context to be used in this call's Do method. Any 27373 // pending HTTP request will be aborted if the provided context is 27374 // canceled. 27375 func (c *AdvertisersLocationListsCreateCall) Context(ctx context.Context) *AdvertisersLocationListsCreateCall { 27376 c.ctx_ = ctx 27377 return c 27378 } 27379 27380 // Header returns an http.Header that can be modified by the caller to 27381 // add HTTP headers to the request. 27382 func (c *AdvertisersLocationListsCreateCall) Header() http.Header { 27383 if c.header_ == nil { 27384 c.header_ = make(http.Header) 27385 } 27386 return c.header_ 27387 } 27388 27389 func (c *AdvertisersLocationListsCreateCall) doRequest(alt string) (*http.Response, error) { 27390 reqHeaders := make(http.Header) 27391 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 27392 for k, v := range c.header_ { 27393 reqHeaders[k] = v 27394 } 27395 reqHeaders.Set("User-Agent", c.s.userAgent()) 27396 var body io.Reader = nil 27397 body, err := googleapi.WithoutDataWrapper.JSONReader(c.locationlist) 27398 if err != nil { 27399 return nil, err 27400 } 27401 reqHeaders.Set("Content-Type", "application/json") 27402 c.urlParams_.Set("alt", alt) 27403 c.urlParams_.Set("prettyPrint", "false") 27404 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/locationLists") 27405 urls += "?" + c.urlParams_.Encode() 27406 req, err := http.NewRequest("POST", urls, body) 27407 if err != nil { 27408 return nil, err 27409 } 27410 req.Header = reqHeaders 27411 googleapi.Expand(req.URL, map[string]string{ 27412 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 27413 }) 27414 return gensupport.SendRequest(c.ctx_, c.s.client, req) 27415 } 27416 27417 // Do executes the "displayvideo.advertisers.locationLists.create" call. 27418 // Exactly one of *LocationList or error will be non-nil. Any non-2xx 27419 // status code is an error. Response headers are in either 27420 // *LocationList.ServerResponse.Header or (if a response was returned at 27421 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 27422 // to check whether the returned error was because 27423 // http.StatusNotModified was returned. 27424 func (c *AdvertisersLocationListsCreateCall) Do(opts ...googleapi.CallOption) (*LocationList, error) { 27425 gensupport.SetOptions(c.urlParams_, opts...) 27426 res, err := c.doRequest("json") 27427 if res != nil && res.StatusCode == http.StatusNotModified { 27428 if res.Body != nil { 27429 res.Body.Close() 27430 } 27431 return nil, gensupport.WrapError(&googleapi.Error{ 27432 Code: res.StatusCode, 27433 Header: res.Header, 27434 }) 27435 } 27436 if err != nil { 27437 return nil, err 27438 } 27439 defer googleapi.CloseBody(res) 27440 if err := googleapi.CheckResponse(res); err != nil { 27441 return nil, gensupport.WrapError(err) 27442 } 27443 ret := &LocationList{ 27444 ServerResponse: googleapi.ServerResponse{ 27445 Header: res.Header, 27446 HTTPStatusCode: res.StatusCode, 27447 }, 27448 } 27449 target := &ret 27450 if err := gensupport.DecodeResponse(target, res); err != nil { 27451 return nil, err 27452 } 27453 return ret, nil 27454 // { 27455 // "description": "Creates a new location list. Returns the newly created location list if successful.", 27456 // "flatPath": "v1/advertisers/{advertisersId}/locationLists", 27457 // "httpMethod": "POST", 27458 // "id": "displayvideo.advertisers.locationLists.create", 27459 // "parameterOrder": [ 27460 // "advertiserId" 27461 // ], 27462 // "parameters": { 27463 // "advertiserId": { 27464 // "description": "Required. The ID of the DV360 advertiser to which the location list belongs.", 27465 // "format": "int64", 27466 // "location": "path", 27467 // "pattern": "^[^/]+$", 27468 // "required": true, 27469 // "type": "string" 27470 // } 27471 // }, 27472 // "path": "v1/advertisers/{+advertiserId}/locationLists", 27473 // "request": { 27474 // "$ref": "LocationList" 27475 // }, 27476 // "response": { 27477 // "$ref": "LocationList" 27478 // }, 27479 // "scopes": [ 27480 // "https://www.googleapis.com/auth/display-video" 27481 // ] 27482 // } 27483 27484 } 27485 27486 // method id "displayvideo.advertisers.locationLists.get": 27487 27488 type AdvertisersLocationListsGetCall struct { 27489 s *Service 27490 advertiserId int64 27491 locationListId int64 27492 urlParams_ gensupport.URLParams 27493 ifNoneMatch_ string 27494 ctx_ context.Context 27495 header_ http.Header 27496 } 27497 27498 // Get: Gets a location list. 27499 // 27500 // - advertiserId: The ID of the DV360 advertiser to which the fetched 27501 // location list belongs. 27502 // - locationListId: The ID of the location list to fetch. 27503 func (r *AdvertisersLocationListsService) Get(advertiserId int64, locationListId int64) *AdvertisersLocationListsGetCall { 27504 c := &AdvertisersLocationListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 27505 c.advertiserId = advertiserId 27506 c.locationListId = locationListId 27507 return c 27508 } 27509 27510 // Fields allows partial responses to be retrieved. See 27511 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 27512 // for more information. 27513 func (c *AdvertisersLocationListsGetCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsGetCall { 27514 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 27515 return c 27516 } 27517 27518 // IfNoneMatch sets the optional parameter which makes the operation 27519 // fail if the object's ETag matches the given value. This is useful for 27520 // getting updates only after the object has changed since the last 27521 // request. Use googleapi.IsNotModified to check whether the response 27522 // error from Do is the result of In-None-Match. 27523 func (c *AdvertisersLocationListsGetCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsGetCall { 27524 c.ifNoneMatch_ = entityTag 27525 return c 27526 } 27527 27528 // Context sets the context to be used in this call's Do method. Any 27529 // pending HTTP request will be aborted if the provided context is 27530 // canceled. 27531 func (c *AdvertisersLocationListsGetCall) Context(ctx context.Context) *AdvertisersLocationListsGetCall { 27532 c.ctx_ = ctx 27533 return c 27534 } 27535 27536 // Header returns an http.Header that can be modified by the caller to 27537 // add HTTP headers to the request. 27538 func (c *AdvertisersLocationListsGetCall) Header() http.Header { 27539 if c.header_ == nil { 27540 c.header_ = make(http.Header) 27541 } 27542 return c.header_ 27543 } 27544 27545 func (c *AdvertisersLocationListsGetCall) doRequest(alt string) (*http.Response, error) { 27546 reqHeaders := make(http.Header) 27547 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 27548 for k, v := range c.header_ { 27549 reqHeaders[k] = v 27550 } 27551 reqHeaders.Set("User-Agent", c.s.userAgent()) 27552 if c.ifNoneMatch_ != "" { 27553 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 27554 } 27555 var body io.Reader = nil 27556 c.urlParams_.Set("alt", alt) 27557 c.urlParams_.Set("prettyPrint", "false") 27558 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/locationLists/{+locationListId}") 27559 urls += "?" + c.urlParams_.Encode() 27560 req, err := http.NewRequest("GET", urls, body) 27561 if err != nil { 27562 return nil, err 27563 } 27564 req.Header = reqHeaders 27565 googleapi.Expand(req.URL, map[string]string{ 27566 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 27567 "locationListId": strconv.FormatInt(c.locationListId, 10), 27568 }) 27569 return gensupport.SendRequest(c.ctx_, c.s.client, req) 27570 } 27571 27572 // Do executes the "displayvideo.advertisers.locationLists.get" call. 27573 // Exactly one of *LocationList or error will be non-nil. Any non-2xx 27574 // status code is an error. Response headers are in either 27575 // *LocationList.ServerResponse.Header or (if a response was returned at 27576 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 27577 // to check whether the returned error was because 27578 // http.StatusNotModified was returned. 27579 func (c *AdvertisersLocationListsGetCall) Do(opts ...googleapi.CallOption) (*LocationList, error) { 27580 gensupport.SetOptions(c.urlParams_, opts...) 27581 res, err := c.doRequest("json") 27582 if res != nil && res.StatusCode == http.StatusNotModified { 27583 if res.Body != nil { 27584 res.Body.Close() 27585 } 27586 return nil, gensupport.WrapError(&googleapi.Error{ 27587 Code: res.StatusCode, 27588 Header: res.Header, 27589 }) 27590 } 27591 if err != nil { 27592 return nil, err 27593 } 27594 defer googleapi.CloseBody(res) 27595 if err := googleapi.CheckResponse(res); err != nil { 27596 return nil, gensupport.WrapError(err) 27597 } 27598 ret := &LocationList{ 27599 ServerResponse: googleapi.ServerResponse{ 27600 Header: res.Header, 27601 HTTPStatusCode: res.StatusCode, 27602 }, 27603 } 27604 target := &ret 27605 if err := gensupport.DecodeResponse(target, res); err != nil { 27606 return nil, err 27607 } 27608 return ret, nil 27609 // { 27610 // "description": "Gets a location list.", 27611 // "flatPath": "v1/advertisers/{advertisersId}/locationLists/{locationListsId}", 27612 // "httpMethod": "GET", 27613 // "id": "displayvideo.advertisers.locationLists.get", 27614 // "parameterOrder": [ 27615 // "advertiserId", 27616 // "locationListId" 27617 // ], 27618 // "parameters": { 27619 // "advertiserId": { 27620 // "description": "Required. The ID of the DV360 advertiser to which the fetched location list belongs.", 27621 // "format": "int64", 27622 // "location": "path", 27623 // "pattern": "^[^/]+$", 27624 // "required": true, 27625 // "type": "string" 27626 // }, 27627 // "locationListId": { 27628 // "description": "Required. The ID of the location list to fetch.", 27629 // "format": "int64", 27630 // "location": "path", 27631 // "pattern": "^[^/]+$", 27632 // "required": true, 27633 // "type": "string" 27634 // } 27635 // }, 27636 // "path": "v1/advertisers/{+advertiserId}/locationLists/{+locationListId}", 27637 // "response": { 27638 // "$ref": "LocationList" 27639 // }, 27640 // "scopes": [ 27641 // "https://www.googleapis.com/auth/display-video" 27642 // ] 27643 // } 27644 27645 } 27646 27647 // method id "displayvideo.advertisers.locationLists.list": 27648 27649 type AdvertisersLocationListsListCall struct { 27650 s *Service 27651 advertiserId int64 27652 urlParams_ gensupport.URLParams 27653 ifNoneMatch_ string 27654 ctx_ context.Context 27655 header_ http.Header 27656 } 27657 27658 // List: Lists location lists based on a given advertiser id. 27659 // 27660 // - advertiserId: The ID of the DV360 advertiser to which the fetched 27661 // location lists belong. 27662 func (r *AdvertisersLocationListsService) List(advertiserId int64) *AdvertisersLocationListsListCall { 27663 c := &AdvertisersLocationListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 27664 c.advertiserId = advertiserId 27665 return c 27666 } 27667 27668 // Filter sets the optional parameter "filter": Allows filtering by 27669 // location list fields. Supported syntax: * Filter expressions are made 27670 // up of one or more restrictions. * Restrictions can be combined by 27671 // `AND` or `OR` logical operators. A sequence of restrictions 27672 // implicitly uses `AND`. * A restriction has the form of `{field} 27673 // {operator} {value}`. * All fields must use the `EQUALS (=)` operator. 27674 // Supported fields: * `locationType` Examples: * All regional location 27675 // list: `locationType="TARGETING_LOCATION_TYPE_REGIONAL" * All 27676 // proximity location list: 27677 // `locationType="TARGETING_LOCATION_TYPE_PROXIMITY" The length of this 27678 // field should be no more than 500 characters. Reference our filter 27679 // `LIST` requests (/display-video/api/guides/how-tos/filters) guide for 27680 // more information. 27681 func (c *AdvertisersLocationListsListCall) Filter(filter string) *AdvertisersLocationListsListCall { 27682 c.urlParams_.Set("filter", filter) 27683 return c 27684 } 27685 27686 // OrderBy sets the optional parameter "orderBy": Field by which to sort 27687 // the list. Acceptable values are: * `locationListId` (default) * 27688 // `displayName` The default sorting order is ascending. To specify 27689 // descending order for a field, a suffix "desc" should be added to the 27690 // field name. Example: `displayName desc`. 27691 func (c *AdvertisersLocationListsListCall) OrderBy(orderBy string) *AdvertisersLocationListsListCall { 27692 c.urlParams_.Set("orderBy", orderBy) 27693 return c 27694 } 27695 27696 // PageSize sets the optional parameter "pageSize": Requested page size. 27697 // Must be between `1` and `200`. Defaults to `100` if not set. Returns 27698 // error code `INVALID_ARGUMENT` if an invalid value is specified. 27699 func (c *AdvertisersLocationListsListCall) PageSize(pageSize int64) *AdvertisersLocationListsListCall { 27700 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 27701 return c 27702 } 27703 27704 // PageToken sets the optional parameter "pageToken": A token 27705 // identifying a page of results the server should return. Typically, 27706 // this is the value of next_page_token returned from the previous call 27707 // to `ListLocationLists` method. If not specified, the first page of 27708 // results will be returned. 27709 func (c *AdvertisersLocationListsListCall) PageToken(pageToken string) *AdvertisersLocationListsListCall { 27710 c.urlParams_.Set("pageToken", pageToken) 27711 return c 27712 } 27713 27714 // Fields allows partial responses to be retrieved. See 27715 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 27716 // for more information. 27717 func (c *AdvertisersLocationListsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsListCall { 27718 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 27719 return c 27720 } 27721 27722 // IfNoneMatch sets the optional parameter which makes the operation 27723 // fail if the object's ETag matches the given value. This is useful for 27724 // getting updates only after the object has changed since the last 27725 // request. Use googleapi.IsNotModified to check whether the response 27726 // error from Do is the result of In-None-Match. 27727 func (c *AdvertisersLocationListsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsListCall { 27728 c.ifNoneMatch_ = entityTag 27729 return c 27730 } 27731 27732 // Context sets the context to be used in this call's Do method. Any 27733 // pending HTTP request will be aborted if the provided context is 27734 // canceled. 27735 func (c *AdvertisersLocationListsListCall) Context(ctx context.Context) *AdvertisersLocationListsListCall { 27736 c.ctx_ = ctx 27737 return c 27738 } 27739 27740 // Header returns an http.Header that can be modified by the caller to 27741 // add HTTP headers to the request. 27742 func (c *AdvertisersLocationListsListCall) Header() http.Header { 27743 if c.header_ == nil { 27744 c.header_ = make(http.Header) 27745 } 27746 return c.header_ 27747 } 27748 27749 func (c *AdvertisersLocationListsListCall) doRequest(alt string) (*http.Response, error) { 27750 reqHeaders := make(http.Header) 27751 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 27752 for k, v := range c.header_ { 27753 reqHeaders[k] = v 27754 } 27755 reqHeaders.Set("User-Agent", c.s.userAgent()) 27756 if c.ifNoneMatch_ != "" { 27757 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 27758 } 27759 var body io.Reader = nil 27760 c.urlParams_.Set("alt", alt) 27761 c.urlParams_.Set("prettyPrint", "false") 27762 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/locationLists") 27763 urls += "?" + c.urlParams_.Encode() 27764 req, err := http.NewRequest("GET", urls, body) 27765 if err != nil { 27766 return nil, err 27767 } 27768 req.Header = reqHeaders 27769 googleapi.Expand(req.URL, map[string]string{ 27770 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 27771 }) 27772 return gensupport.SendRequest(c.ctx_, c.s.client, req) 27773 } 27774 27775 // Do executes the "displayvideo.advertisers.locationLists.list" call. 27776 // Exactly one of *ListLocationListsResponse or error will be non-nil. 27777 // Any non-2xx status code is an error. Response headers are in either 27778 // *ListLocationListsResponse.ServerResponse.Header or (if a response 27779 // was returned at all) in error.(*googleapi.Error).Header. Use 27780 // googleapi.IsNotModified to check whether the returned error was 27781 // because http.StatusNotModified was returned. 27782 func (c *AdvertisersLocationListsListCall) Do(opts ...googleapi.CallOption) (*ListLocationListsResponse, error) { 27783 gensupport.SetOptions(c.urlParams_, opts...) 27784 res, err := c.doRequest("json") 27785 if res != nil && res.StatusCode == http.StatusNotModified { 27786 if res.Body != nil { 27787 res.Body.Close() 27788 } 27789 return nil, gensupport.WrapError(&googleapi.Error{ 27790 Code: res.StatusCode, 27791 Header: res.Header, 27792 }) 27793 } 27794 if err != nil { 27795 return nil, err 27796 } 27797 defer googleapi.CloseBody(res) 27798 if err := googleapi.CheckResponse(res); err != nil { 27799 return nil, gensupport.WrapError(err) 27800 } 27801 ret := &ListLocationListsResponse{ 27802 ServerResponse: googleapi.ServerResponse{ 27803 Header: res.Header, 27804 HTTPStatusCode: res.StatusCode, 27805 }, 27806 } 27807 target := &ret 27808 if err := gensupport.DecodeResponse(target, res); err != nil { 27809 return nil, err 27810 } 27811 return ret, nil 27812 // { 27813 // "description": "Lists location lists based on a given advertiser id.", 27814 // "flatPath": "v1/advertisers/{advertisersId}/locationLists", 27815 // "httpMethod": "GET", 27816 // "id": "displayvideo.advertisers.locationLists.list", 27817 // "parameterOrder": [ 27818 // "advertiserId" 27819 // ], 27820 // "parameters": { 27821 // "advertiserId": { 27822 // "description": "Required. The ID of the DV360 advertiser to which the fetched location lists belong.", 27823 // "format": "int64", 27824 // "location": "path", 27825 // "pattern": "^[^/]+$", 27826 // "required": true, 27827 // "type": "string" 27828 // }, 27829 // "filter": { 27830 // "description": "Allows filtering by location list fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `locationType` Examples: * All regional location list: `locationType=\"TARGETING_LOCATION_TYPE_REGIONAL\"` * All proximity location list: `locationType=\"TARGETING_LOCATION_TYPE_PROXIMITY\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 27831 // "location": "query", 27832 // "type": "string" 27833 // }, 27834 // "orderBy": { 27835 // "description": "Field by which to sort the list. Acceptable values are: * `locationListId` (default) * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 27836 // "location": "query", 27837 // "type": "string" 27838 // }, 27839 // "pageSize": { 27840 // "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 27841 // "format": "int32", 27842 // "location": "query", 27843 // "type": "integer" 27844 // }, 27845 // "pageToken": { 27846 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListLocationLists` method. If not specified, the first page of results will be returned.", 27847 // "location": "query", 27848 // "type": "string" 27849 // } 27850 // }, 27851 // "path": "v1/advertisers/{+advertiserId}/locationLists", 27852 // "response": { 27853 // "$ref": "ListLocationListsResponse" 27854 // }, 27855 // "scopes": [ 27856 // "https://www.googleapis.com/auth/display-video" 27857 // ] 27858 // } 27859 27860 } 27861 27862 // Pages invokes f for each page of results. 27863 // A non-nil error returned from f will halt the iteration. 27864 // The provided context supersedes any context provided to the Context method. 27865 func (c *AdvertisersLocationListsListCall) Pages(ctx context.Context, f func(*ListLocationListsResponse) error) error { 27866 c.ctx_ = ctx 27867 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 27868 for { 27869 x, err := c.Do() 27870 if err != nil { 27871 return err 27872 } 27873 if err := f(x); err != nil { 27874 return err 27875 } 27876 if x.NextPageToken == "" { 27877 return nil 27878 } 27879 c.PageToken(x.NextPageToken) 27880 } 27881 } 27882 27883 // method id "displayvideo.advertisers.locationLists.patch": 27884 27885 type AdvertisersLocationListsPatchCall struct { 27886 s *Service 27887 advertiserId int64 27888 locationListId int64 27889 locationlist *LocationList 27890 urlParams_ gensupport.URLParams 27891 ctx_ context.Context 27892 header_ http.Header 27893 } 27894 27895 // Patch: Updates a location list. Returns the updated location list if 27896 // successful. 27897 // 27898 // - advertiserId: The ID of the DV360 advertiser to which the location 27899 // lists belongs. 27900 // - locationListId: Output only. The unique ID of the location list. 27901 // Assigned by the system. 27902 func (r *AdvertisersLocationListsService) Patch(advertiserId int64, locationListId int64, locationlist *LocationList) *AdvertisersLocationListsPatchCall { 27903 c := &AdvertisersLocationListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 27904 c.advertiserId = advertiserId 27905 c.locationListId = locationListId 27906 c.locationlist = locationlist 27907 return c 27908 } 27909 27910 // UpdateMask sets the optional parameter "updateMask": Required. The 27911 // mask to control which fields to update. 27912 func (c *AdvertisersLocationListsPatchCall) UpdateMask(updateMask string) *AdvertisersLocationListsPatchCall { 27913 c.urlParams_.Set("updateMask", updateMask) 27914 return c 27915 } 27916 27917 // Fields allows partial responses to be retrieved. See 27918 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 27919 // for more information. 27920 func (c *AdvertisersLocationListsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsPatchCall { 27921 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 27922 return c 27923 } 27924 27925 // Context sets the context to be used in this call's Do method. Any 27926 // pending HTTP request will be aborted if the provided context is 27927 // canceled. 27928 func (c *AdvertisersLocationListsPatchCall) Context(ctx context.Context) *AdvertisersLocationListsPatchCall { 27929 c.ctx_ = ctx 27930 return c 27931 } 27932 27933 // Header returns an http.Header that can be modified by the caller to 27934 // add HTTP headers to the request. 27935 func (c *AdvertisersLocationListsPatchCall) Header() http.Header { 27936 if c.header_ == nil { 27937 c.header_ = make(http.Header) 27938 } 27939 return c.header_ 27940 } 27941 27942 func (c *AdvertisersLocationListsPatchCall) doRequest(alt string) (*http.Response, error) { 27943 reqHeaders := make(http.Header) 27944 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 27945 for k, v := range c.header_ { 27946 reqHeaders[k] = v 27947 } 27948 reqHeaders.Set("User-Agent", c.s.userAgent()) 27949 var body io.Reader = nil 27950 body, err := googleapi.WithoutDataWrapper.JSONReader(c.locationlist) 27951 if err != nil { 27952 return nil, err 27953 } 27954 reqHeaders.Set("Content-Type", "application/json") 27955 c.urlParams_.Set("alt", alt) 27956 c.urlParams_.Set("prettyPrint", "false") 27957 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/locationLists/{locationListId}") 27958 urls += "?" + c.urlParams_.Encode() 27959 req, err := http.NewRequest("PATCH", urls, body) 27960 if err != nil { 27961 return nil, err 27962 } 27963 req.Header = reqHeaders 27964 googleapi.Expand(req.URL, map[string]string{ 27965 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 27966 "locationListId": strconv.FormatInt(c.locationListId, 10), 27967 }) 27968 return gensupport.SendRequest(c.ctx_, c.s.client, req) 27969 } 27970 27971 // Do executes the "displayvideo.advertisers.locationLists.patch" call. 27972 // Exactly one of *LocationList or error will be non-nil. Any non-2xx 27973 // status code is an error. Response headers are in either 27974 // *LocationList.ServerResponse.Header or (if a response was returned at 27975 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 27976 // to check whether the returned error was because 27977 // http.StatusNotModified was returned. 27978 func (c *AdvertisersLocationListsPatchCall) Do(opts ...googleapi.CallOption) (*LocationList, error) { 27979 gensupport.SetOptions(c.urlParams_, opts...) 27980 res, err := c.doRequest("json") 27981 if res != nil && res.StatusCode == http.StatusNotModified { 27982 if res.Body != nil { 27983 res.Body.Close() 27984 } 27985 return nil, gensupport.WrapError(&googleapi.Error{ 27986 Code: res.StatusCode, 27987 Header: res.Header, 27988 }) 27989 } 27990 if err != nil { 27991 return nil, err 27992 } 27993 defer googleapi.CloseBody(res) 27994 if err := googleapi.CheckResponse(res); err != nil { 27995 return nil, gensupport.WrapError(err) 27996 } 27997 ret := &LocationList{ 27998 ServerResponse: googleapi.ServerResponse{ 27999 Header: res.Header, 28000 HTTPStatusCode: res.StatusCode, 28001 }, 28002 } 28003 target := &ret 28004 if err := gensupport.DecodeResponse(target, res); err != nil { 28005 return nil, err 28006 } 28007 return ret, nil 28008 // { 28009 // "description": "Updates a location list. Returns the updated location list if successful.", 28010 // "flatPath": "v1/advertisers/{advertisersId}/locationLists/{locationListId}", 28011 // "httpMethod": "PATCH", 28012 // "id": "displayvideo.advertisers.locationLists.patch", 28013 // "parameterOrder": [ 28014 // "advertiserId", 28015 // "locationListId" 28016 // ], 28017 // "parameters": { 28018 // "advertiserId": { 28019 // "description": "Required. The ID of the DV360 advertiser to which the location lists belongs.", 28020 // "format": "int64", 28021 // "location": "path", 28022 // "pattern": "^[^/]+$", 28023 // "required": true, 28024 // "type": "string" 28025 // }, 28026 // "locationListId": { 28027 // "description": "Output only. The unique ID of the location list. Assigned by the system.", 28028 // "format": "int64", 28029 // "location": "path", 28030 // "required": true, 28031 // "type": "string" 28032 // }, 28033 // "updateMask": { 28034 // "description": "Required. The mask to control which fields to update.", 28035 // "format": "google-fieldmask", 28036 // "location": "query", 28037 // "type": "string" 28038 // } 28039 // }, 28040 // "path": "v1/advertisers/{+advertiserId}/locationLists/{locationListId}", 28041 // "request": { 28042 // "$ref": "LocationList" 28043 // }, 28044 // "response": { 28045 // "$ref": "LocationList" 28046 // }, 28047 // "scopes": [ 28048 // "https://www.googleapis.com/auth/display-video" 28049 // ] 28050 // } 28051 28052 } 28053 28054 // method id "displayvideo.advertisers.locationLists.assignedLocations.bulkEdit": 28055 28056 type AdvertisersLocationListsAssignedLocationsBulkEditCall struct { 28057 s *Service 28058 advertiserId int64 28059 locationListId int64 28060 bulkeditassignedlocationsrequest *BulkEditAssignedLocationsRequest 28061 urlParams_ gensupport.URLParams 28062 ctx_ context.Context 28063 header_ http.Header 28064 } 28065 28066 // BulkEdit: Bulk edits multiple assignments between locations and a 28067 // single location list. The operation will delete the assigned 28068 // locations provided in deletedAssignedLocations and then create the 28069 // assigned locations provided in createdAssignedLocations. 28070 // 28071 // - advertiserId: The ID of the DV360 advertiser to which the location 28072 // list belongs. 28073 // - locationListId: The ID of the location list to which these 28074 // assignments are assigned. 28075 func (r *AdvertisersLocationListsAssignedLocationsService) BulkEdit(advertiserId int64, locationListId int64, bulkeditassignedlocationsrequest *BulkEditAssignedLocationsRequest) *AdvertisersLocationListsAssignedLocationsBulkEditCall { 28076 c := &AdvertisersLocationListsAssignedLocationsBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 28077 c.advertiserId = advertiserId 28078 c.locationListId = locationListId 28079 c.bulkeditassignedlocationsrequest = bulkeditassignedlocationsrequest 28080 return c 28081 } 28082 28083 // Fields allows partial responses to be retrieved. See 28084 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 28085 // for more information. 28086 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsBulkEditCall { 28087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 28088 return c 28089 } 28090 28091 // Context sets the context to be used in this call's Do method. Any 28092 // pending HTTP request will be aborted if the provided context is 28093 // canceled. 28094 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsBulkEditCall { 28095 c.ctx_ = ctx 28096 return c 28097 } 28098 28099 // Header returns an http.Header that can be modified by the caller to 28100 // add HTTP headers to the request. 28101 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Header() http.Header { 28102 if c.header_ == nil { 28103 c.header_ = make(http.Header) 28104 } 28105 return c.header_ 28106 } 28107 28108 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) doRequest(alt string) (*http.Response, error) { 28109 reqHeaders := make(http.Header) 28110 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 28111 for k, v := range c.header_ { 28112 reqHeaders[k] = v 28113 } 28114 reqHeaders.Set("User-Agent", c.s.userAgent()) 28115 var body io.Reader = nil 28116 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedlocationsrequest) 28117 if err != nil { 28118 return nil, err 28119 } 28120 reqHeaders.Set("Content-Type", "application/json") 28121 c.urlParams_.Set("alt", alt) 28122 c.urlParams_.Set("prettyPrint", "false") 28123 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/locationLists/{+locationListId}/assignedLocations:bulkEdit") 28124 urls += "?" + c.urlParams_.Encode() 28125 req, err := http.NewRequest("POST", urls, body) 28126 if err != nil { 28127 return nil, err 28128 } 28129 req.Header = reqHeaders 28130 googleapi.Expand(req.URL, map[string]string{ 28131 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 28132 "locationListId": strconv.FormatInt(c.locationListId, 10), 28133 }) 28134 return gensupport.SendRequest(c.ctx_, c.s.client, req) 28135 } 28136 28137 // Do executes the "displayvideo.advertisers.locationLists.assignedLocations.bulkEdit" call. 28138 // Exactly one of *BulkEditAssignedLocationsResponse or error will be 28139 // non-nil. Any non-2xx status code is an error. Response headers are in 28140 // either *BulkEditAssignedLocationsResponse.ServerResponse.Header or 28141 // (if a response was returned at all) in 28142 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 28143 // whether the returned error was because http.StatusNotModified was 28144 // returned. 28145 func (c *AdvertisersLocationListsAssignedLocationsBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedLocationsResponse, error) { 28146 gensupport.SetOptions(c.urlParams_, opts...) 28147 res, err := c.doRequest("json") 28148 if res != nil && res.StatusCode == http.StatusNotModified { 28149 if res.Body != nil { 28150 res.Body.Close() 28151 } 28152 return nil, gensupport.WrapError(&googleapi.Error{ 28153 Code: res.StatusCode, 28154 Header: res.Header, 28155 }) 28156 } 28157 if err != nil { 28158 return nil, err 28159 } 28160 defer googleapi.CloseBody(res) 28161 if err := googleapi.CheckResponse(res); err != nil { 28162 return nil, gensupport.WrapError(err) 28163 } 28164 ret := &BulkEditAssignedLocationsResponse{ 28165 ServerResponse: googleapi.ServerResponse{ 28166 Header: res.Header, 28167 HTTPStatusCode: res.StatusCode, 28168 }, 28169 } 28170 target := &ret 28171 if err := gensupport.DecodeResponse(target, res); err != nil { 28172 return nil, err 28173 } 28174 return ret, nil 28175 // { 28176 // "description": "Bulk edits multiple assignments between locations and a single location list. The operation will delete the assigned locations provided in deletedAssignedLocations and then create the assigned locations provided in createdAssignedLocations.", 28177 // "flatPath": "v1/advertisers/{advertiserId}/locationLists/{locationListsId}/assignedLocations:bulkEdit", 28178 // "httpMethod": "POST", 28179 // "id": "displayvideo.advertisers.locationLists.assignedLocations.bulkEdit", 28180 // "parameterOrder": [ 28181 // "advertiserId", 28182 // "locationListId" 28183 // ], 28184 // "parameters": { 28185 // "advertiserId": { 28186 // "description": "Required. The ID of the DV360 advertiser to which the location list belongs.", 28187 // "format": "int64", 28188 // "location": "path", 28189 // "required": true, 28190 // "type": "string" 28191 // }, 28192 // "locationListId": { 28193 // "description": "Required. The ID of the location list to which these assignments are assigned.", 28194 // "format": "int64", 28195 // "location": "path", 28196 // "pattern": "^[^/]+$", 28197 // "required": true, 28198 // "type": "string" 28199 // } 28200 // }, 28201 // "path": "v1/advertisers/{advertiserId}/locationLists/{+locationListId}/assignedLocations:bulkEdit", 28202 // "request": { 28203 // "$ref": "BulkEditAssignedLocationsRequest" 28204 // }, 28205 // "response": { 28206 // "$ref": "BulkEditAssignedLocationsResponse" 28207 // }, 28208 // "scopes": [ 28209 // "https://www.googleapis.com/auth/display-video" 28210 // ] 28211 // } 28212 28213 } 28214 28215 // method id "displayvideo.advertisers.locationLists.assignedLocations.create": 28216 28217 type AdvertisersLocationListsAssignedLocationsCreateCall struct { 28218 s *Service 28219 advertiserId int64 28220 locationListId int64 28221 assignedlocation *AssignedLocation 28222 urlParams_ gensupport.URLParams 28223 ctx_ context.Context 28224 header_ http.Header 28225 } 28226 28227 // Create: Creates an assignment between a location and a location list. 28228 // 28229 // - advertiserId: The ID of the DV360 advertiser to which the location 28230 // list belongs. 28231 // - locationListId: The ID of the location list for which the 28232 // assignment will be created. 28233 func (r *AdvertisersLocationListsAssignedLocationsService) Create(advertiserId int64, locationListId int64, assignedlocation *AssignedLocation) *AdvertisersLocationListsAssignedLocationsCreateCall { 28234 c := &AdvertisersLocationListsAssignedLocationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 28235 c.advertiserId = advertiserId 28236 c.locationListId = locationListId 28237 c.assignedlocation = assignedlocation 28238 return c 28239 } 28240 28241 // Fields allows partial responses to be retrieved. See 28242 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 28243 // for more information. 28244 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsCreateCall { 28245 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 28246 return c 28247 } 28248 28249 // Context sets the context to be used in this call's Do method. Any 28250 // pending HTTP request will be aborted if the provided context is 28251 // canceled. 28252 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsCreateCall { 28253 c.ctx_ = ctx 28254 return c 28255 } 28256 28257 // Header returns an http.Header that can be modified by the caller to 28258 // add HTTP headers to the request. 28259 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Header() http.Header { 28260 if c.header_ == nil { 28261 c.header_ = make(http.Header) 28262 } 28263 return c.header_ 28264 } 28265 28266 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) doRequest(alt string) (*http.Response, error) { 28267 reqHeaders := make(http.Header) 28268 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 28269 for k, v := range c.header_ { 28270 reqHeaders[k] = v 28271 } 28272 reqHeaders.Set("User-Agent", c.s.userAgent()) 28273 var body io.Reader = nil 28274 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedlocation) 28275 if err != nil { 28276 return nil, err 28277 } 28278 reqHeaders.Set("Content-Type", "application/json") 28279 c.urlParams_.Set("alt", alt) 28280 c.urlParams_.Set("prettyPrint", "false") 28281 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations") 28282 urls += "?" + c.urlParams_.Encode() 28283 req, err := http.NewRequest("POST", urls, body) 28284 if err != nil { 28285 return nil, err 28286 } 28287 req.Header = reqHeaders 28288 googleapi.Expand(req.URL, map[string]string{ 28289 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 28290 "locationListId": strconv.FormatInt(c.locationListId, 10), 28291 }) 28292 return gensupport.SendRequest(c.ctx_, c.s.client, req) 28293 } 28294 28295 // Do executes the "displayvideo.advertisers.locationLists.assignedLocations.create" call. 28296 // Exactly one of *AssignedLocation or error will be non-nil. Any 28297 // non-2xx status code is an error. Response headers are in either 28298 // *AssignedLocation.ServerResponse.Header or (if a response was 28299 // returned at all) in error.(*googleapi.Error).Header. Use 28300 // googleapi.IsNotModified to check whether the returned error was 28301 // because http.StatusNotModified was returned. 28302 func (c *AdvertisersLocationListsAssignedLocationsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedLocation, error) { 28303 gensupport.SetOptions(c.urlParams_, opts...) 28304 res, err := c.doRequest("json") 28305 if res != nil && res.StatusCode == http.StatusNotModified { 28306 if res.Body != nil { 28307 res.Body.Close() 28308 } 28309 return nil, gensupport.WrapError(&googleapi.Error{ 28310 Code: res.StatusCode, 28311 Header: res.Header, 28312 }) 28313 } 28314 if err != nil { 28315 return nil, err 28316 } 28317 defer googleapi.CloseBody(res) 28318 if err := googleapi.CheckResponse(res); err != nil { 28319 return nil, gensupport.WrapError(err) 28320 } 28321 ret := &AssignedLocation{ 28322 ServerResponse: googleapi.ServerResponse{ 28323 Header: res.Header, 28324 HTTPStatusCode: res.StatusCode, 28325 }, 28326 } 28327 target := &ret 28328 if err := gensupport.DecodeResponse(target, res); err != nil { 28329 return nil, err 28330 } 28331 return ret, nil 28332 // { 28333 // "description": "Creates an assignment between a location and a location list.", 28334 // "flatPath": "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations", 28335 // "httpMethod": "POST", 28336 // "id": "displayvideo.advertisers.locationLists.assignedLocations.create", 28337 // "parameterOrder": [ 28338 // "advertiserId", 28339 // "locationListId" 28340 // ], 28341 // "parameters": { 28342 // "advertiserId": { 28343 // "description": "Required. The ID of the DV360 advertiser to which the location list belongs.", 28344 // "format": "int64", 28345 // "location": "path", 28346 // "required": true, 28347 // "type": "string" 28348 // }, 28349 // "locationListId": { 28350 // "description": "Required. The ID of the location list for which the assignment will be created.", 28351 // "format": "int64", 28352 // "location": "path", 28353 // "required": true, 28354 // "type": "string" 28355 // } 28356 // }, 28357 // "path": "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations", 28358 // "request": { 28359 // "$ref": "AssignedLocation" 28360 // }, 28361 // "response": { 28362 // "$ref": "AssignedLocation" 28363 // }, 28364 // "scopes": [ 28365 // "https://www.googleapis.com/auth/display-video" 28366 // ] 28367 // } 28368 28369 } 28370 28371 // method id "displayvideo.advertisers.locationLists.assignedLocations.delete": 28372 28373 type AdvertisersLocationListsAssignedLocationsDeleteCall struct { 28374 s *Service 28375 advertiserId int64 28376 locationListId int64 28377 assignedLocationId int64 28378 urlParams_ gensupport.URLParams 28379 ctx_ context.Context 28380 header_ http.Header 28381 } 28382 28383 // Delete: Deletes the assignment between a location and a location 28384 // list. 28385 // 28386 // - advertiserId: The ID of the DV360 advertiser to which the location 28387 // list belongs. 28388 // - assignedLocationId: The ID of the assigned location to delete. 28389 // - locationListId: The ID of the location list to which this 28390 // assignment is assigned. 28391 func (r *AdvertisersLocationListsAssignedLocationsService) Delete(advertiserId int64, locationListId int64, assignedLocationId int64) *AdvertisersLocationListsAssignedLocationsDeleteCall { 28392 c := &AdvertisersLocationListsAssignedLocationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 28393 c.advertiserId = advertiserId 28394 c.locationListId = locationListId 28395 c.assignedLocationId = assignedLocationId 28396 return c 28397 } 28398 28399 // Fields allows partial responses to be retrieved. See 28400 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 28401 // for more information. 28402 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsDeleteCall { 28403 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 28404 return c 28405 } 28406 28407 // Context sets the context to be used in this call's Do method. Any 28408 // pending HTTP request will be aborted if the provided context is 28409 // canceled. 28410 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsDeleteCall { 28411 c.ctx_ = ctx 28412 return c 28413 } 28414 28415 // Header returns an http.Header that can be modified by the caller to 28416 // add HTTP headers to the request. 28417 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Header() http.Header { 28418 if c.header_ == nil { 28419 c.header_ = make(http.Header) 28420 } 28421 return c.header_ 28422 } 28423 28424 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) doRequest(alt string) (*http.Response, error) { 28425 reqHeaders := make(http.Header) 28426 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 28427 for k, v := range c.header_ { 28428 reqHeaders[k] = v 28429 } 28430 reqHeaders.Set("User-Agent", c.s.userAgent()) 28431 var body io.Reader = nil 28432 c.urlParams_.Set("alt", alt) 28433 c.urlParams_.Set("prettyPrint", "false") 28434 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations/{+assignedLocationId}") 28435 urls += "?" + c.urlParams_.Encode() 28436 req, err := http.NewRequest("DELETE", urls, body) 28437 if err != nil { 28438 return nil, err 28439 } 28440 req.Header = reqHeaders 28441 googleapi.Expand(req.URL, map[string]string{ 28442 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 28443 "locationListId": strconv.FormatInt(c.locationListId, 10), 28444 "assignedLocationId": strconv.FormatInt(c.assignedLocationId, 10), 28445 }) 28446 return gensupport.SendRequest(c.ctx_, c.s.client, req) 28447 } 28448 28449 // Do executes the "displayvideo.advertisers.locationLists.assignedLocations.delete" call. 28450 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 28451 // code is an error. Response headers are in either 28452 // *Empty.ServerResponse.Header or (if a response was returned at all) 28453 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 28454 // check whether the returned error was because http.StatusNotModified 28455 // was returned. 28456 func (c *AdvertisersLocationListsAssignedLocationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 28457 gensupport.SetOptions(c.urlParams_, opts...) 28458 res, err := c.doRequest("json") 28459 if res != nil && res.StatusCode == http.StatusNotModified { 28460 if res.Body != nil { 28461 res.Body.Close() 28462 } 28463 return nil, gensupport.WrapError(&googleapi.Error{ 28464 Code: res.StatusCode, 28465 Header: res.Header, 28466 }) 28467 } 28468 if err != nil { 28469 return nil, err 28470 } 28471 defer googleapi.CloseBody(res) 28472 if err := googleapi.CheckResponse(res); err != nil { 28473 return nil, gensupport.WrapError(err) 28474 } 28475 ret := &Empty{ 28476 ServerResponse: googleapi.ServerResponse{ 28477 Header: res.Header, 28478 HTTPStatusCode: res.StatusCode, 28479 }, 28480 } 28481 target := &ret 28482 if err := gensupport.DecodeResponse(target, res); err != nil { 28483 return nil, err 28484 } 28485 return ret, nil 28486 // { 28487 // "description": "Deletes the assignment between a location and a location list.", 28488 // "flatPath": "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations/{assignedLocationsId}", 28489 // "httpMethod": "DELETE", 28490 // "id": "displayvideo.advertisers.locationLists.assignedLocations.delete", 28491 // "parameterOrder": [ 28492 // "advertiserId", 28493 // "locationListId", 28494 // "assignedLocationId" 28495 // ], 28496 // "parameters": { 28497 // "advertiserId": { 28498 // "description": "Required. The ID of the DV360 advertiser to which the location list belongs.", 28499 // "format": "int64", 28500 // "location": "path", 28501 // "required": true, 28502 // "type": "string" 28503 // }, 28504 // "assignedLocationId": { 28505 // "description": "Required. The ID of the assigned location to delete.", 28506 // "format": "int64", 28507 // "location": "path", 28508 // "pattern": "^[^/]+$", 28509 // "required": true, 28510 // "type": "string" 28511 // }, 28512 // "locationListId": { 28513 // "description": "Required. The ID of the location list to which this assignment is assigned.", 28514 // "format": "int64", 28515 // "location": "path", 28516 // "required": true, 28517 // "type": "string" 28518 // } 28519 // }, 28520 // "path": "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations/{+assignedLocationId}", 28521 // "response": { 28522 // "$ref": "Empty" 28523 // }, 28524 // "scopes": [ 28525 // "https://www.googleapis.com/auth/display-video" 28526 // ] 28527 // } 28528 28529 } 28530 28531 // method id "displayvideo.advertisers.locationLists.assignedLocations.list": 28532 28533 type AdvertisersLocationListsAssignedLocationsListCall struct { 28534 s *Service 28535 advertiserId int64 28536 locationListId int64 28537 urlParams_ gensupport.URLParams 28538 ifNoneMatch_ string 28539 ctx_ context.Context 28540 header_ http.Header 28541 } 28542 28543 // List: Lists locations assigned to a location list. 28544 // 28545 // - advertiserId: The ID of the DV360 advertiser to which the location 28546 // list belongs. 28547 // - locationListId: The ID of the location list to which these 28548 // assignments are assigned. 28549 func (r *AdvertisersLocationListsAssignedLocationsService) List(advertiserId int64, locationListId int64) *AdvertisersLocationListsAssignedLocationsListCall { 28550 c := &AdvertisersLocationListsAssignedLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 28551 c.advertiserId = advertiserId 28552 c.locationListId = locationListId 28553 return c 28554 } 28555 28556 // Filter sets the optional parameter "filter": Allows filtering by 28557 // location list assignment fields. Supported syntax: * Filter 28558 // expressions are made up of one or more restrictions. * Restrictions 28559 // can be combined by the `OR` logical operator. * A restriction has the 28560 // form of `{field} {operator} {value}`. * All fields must use the 28561 // `EQUALS (=)` operator. Supported fields: * `assignedLocationId` The 28562 // length of this field should be no more than 500 characters. Reference 28563 // our filter `LIST` requests 28564 // (/display-video/api/guides/how-tos/filters) guide for more 28565 // information. 28566 func (c *AdvertisersLocationListsAssignedLocationsListCall) Filter(filter string) *AdvertisersLocationListsAssignedLocationsListCall { 28567 c.urlParams_.Set("filter", filter) 28568 return c 28569 } 28570 28571 // OrderBy sets the optional parameter "orderBy": Field by which to sort 28572 // the list. Acceptable values are: * `assignedLocationId` (default) The 28573 // default sorting order is ascending. To specify descending order for a 28574 // field, a suffix " desc" should be added to the field name. Example: 28575 // `assignedLocationId desc`. 28576 func (c *AdvertisersLocationListsAssignedLocationsListCall) OrderBy(orderBy string) *AdvertisersLocationListsAssignedLocationsListCall { 28577 c.urlParams_.Set("orderBy", orderBy) 28578 return c 28579 } 28580 28581 // PageSize sets the optional parameter "pageSize": Requested page size. 28582 // Must be between `1` and `200`. If unspecified will default to `100`. 28583 // Returns error code `INVALID_ARGUMENT` if an invalid value is 28584 // specified. 28585 func (c *AdvertisersLocationListsAssignedLocationsListCall) PageSize(pageSize int64) *AdvertisersLocationListsAssignedLocationsListCall { 28586 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 28587 return c 28588 } 28589 28590 // PageToken sets the optional parameter "pageToken": A token 28591 // identifying a page of results the server should return. Typically, 28592 // this is the value of next_page_token returned from the previous call 28593 // to `ListAssignedLocations` method. If not specified, the first page 28594 // of results will be returned. 28595 func (c *AdvertisersLocationListsAssignedLocationsListCall) PageToken(pageToken string) *AdvertisersLocationListsAssignedLocationsListCall { 28596 c.urlParams_.Set("pageToken", pageToken) 28597 return c 28598 } 28599 28600 // Fields allows partial responses to be retrieved. See 28601 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 28602 // for more information. 28603 func (c *AdvertisersLocationListsAssignedLocationsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsAssignedLocationsListCall { 28604 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 28605 return c 28606 } 28607 28608 // IfNoneMatch sets the optional parameter which makes the operation 28609 // fail if the object's ETag matches the given value. This is useful for 28610 // getting updates only after the object has changed since the last 28611 // request. Use googleapi.IsNotModified to check whether the response 28612 // error from Do is the result of In-None-Match. 28613 func (c *AdvertisersLocationListsAssignedLocationsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsAssignedLocationsListCall { 28614 c.ifNoneMatch_ = entityTag 28615 return c 28616 } 28617 28618 // Context sets the context to be used in this call's Do method. Any 28619 // pending HTTP request will be aborted if the provided context is 28620 // canceled. 28621 func (c *AdvertisersLocationListsAssignedLocationsListCall) Context(ctx context.Context) *AdvertisersLocationListsAssignedLocationsListCall { 28622 c.ctx_ = ctx 28623 return c 28624 } 28625 28626 // Header returns an http.Header that can be modified by the caller to 28627 // add HTTP headers to the request. 28628 func (c *AdvertisersLocationListsAssignedLocationsListCall) Header() http.Header { 28629 if c.header_ == nil { 28630 c.header_ = make(http.Header) 28631 } 28632 return c.header_ 28633 } 28634 28635 func (c *AdvertisersLocationListsAssignedLocationsListCall) doRequest(alt string) (*http.Response, error) { 28636 reqHeaders := make(http.Header) 28637 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 28638 for k, v := range c.header_ { 28639 reqHeaders[k] = v 28640 } 28641 reqHeaders.Set("User-Agent", c.s.userAgent()) 28642 if c.ifNoneMatch_ != "" { 28643 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 28644 } 28645 var body io.Reader = nil 28646 c.urlParams_.Set("alt", alt) 28647 c.urlParams_.Set("prettyPrint", "false") 28648 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations") 28649 urls += "?" + c.urlParams_.Encode() 28650 req, err := http.NewRequest("GET", urls, body) 28651 if err != nil { 28652 return nil, err 28653 } 28654 req.Header = reqHeaders 28655 googleapi.Expand(req.URL, map[string]string{ 28656 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 28657 "locationListId": strconv.FormatInt(c.locationListId, 10), 28658 }) 28659 return gensupport.SendRequest(c.ctx_, c.s.client, req) 28660 } 28661 28662 // Do executes the "displayvideo.advertisers.locationLists.assignedLocations.list" call. 28663 // Exactly one of *ListAssignedLocationsResponse or error will be 28664 // non-nil. Any non-2xx status code is an error. Response headers are in 28665 // either *ListAssignedLocationsResponse.ServerResponse.Header or (if a 28666 // response was returned at all) in error.(*googleapi.Error).Header. Use 28667 // googleapi.IsNotModified to check whether the returned error was 28668 // because http.StatusNotModified was returned. 28669 func (c *AdvertisersLocationListsAssignedLocationsListCall) Do(opts ...googleapi.CallOption) (*ListAssignedLocationsResponse, error) { 28670 gensupport.SetOptions(c.urlParams_, opts...) 28671 res, err := c.doRequest("json") 28672 if res != nil && res.StatusCode == http.StatusNotModified { 28673 if res.Body != nil { 28674 res.Body.Close() 28675 } 28676 return nil, gensupport.WrapError(&googleapi.Error{ 28677 Code: res.StatusCode, 28678 Header: res.Header, 28679 }) 28680 } 28681 if err != nil { 28682 return nil, err 28683 } 28684 defer googleapi.CloseBody(res) 28685 if err := googleapi.CheckResponse(res); err != nil { 28686 return nil, gensupport.WrapError(err) 28687 } 28688 ret := &ListAssignedLocationsResponse{ 28689 ServerResponse: googleapi.ServerResponse{ 28690 Header: res.Header, 28691 HTTPStatusCode: res.StatusCode, 28692 }, 28693 } 28694 target := &ret 28695 if err := gensupport.DecodeResponse(target, res); err != nil { 28696 return nil, err 28697 } 28698 return ret, nil 28699 // { 28700 // "description": "Lists locations assigned to a location list.", 28701 // "flatPath": "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations", 28702 // "httpMethod": "GET", 28703 // "id": "displayvideo.advertisers.locationLists.assignedLocations.list", 28704 // "parameterOrder": [ 28705 // "advertiserId", 28706 // "locationListId" 28707 // ], 28708 // "parameters": { 28709 // "advertiserId": { 28710 // "description": "Required. The ID of the DV360 advertiser to which the location list belongs.", 28711 // "format": "int64", 28712 // "location": "path", 28713 // "required": true, 28714 // "type": "string" 28715 // }, 28716 // "filter": { 28717 // "description": "Allows filtering by location list assignment fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedLocationId` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 28718 // "location": "query", 28719 // "type": "string" 28720 // }, 28721 // "locationListId": { 28722 // "description": "Required. The ID of the location list to which these assignments are assigned.", 28723 // "format": "int64", 28724 // "location": "path", 28725 // "required": true, 28726 // "type": "string" 28727 // }, 28728 // "orderBy": { 28729 // "description": "Field by which to sort the list. Acceptable values are: * `assignedLocationId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `assignedLocationId desc`.", 28730 // "location": "query", 28731 // "type": "string" 28732 // }, 28733 // "pageSize": { 28734 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 28735 // "format": "int32", 28736 // "location": "query", 28737 // "type": "integer" 28738 // }, 28739 // "pageToken": { 28740 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListAssignedLocations` method. If not specified, the first page of results will be returned.", 28741 // "location": "query", 28742 // "type": "string" 28743 // } 28744 // }, 28745 // "path": "v1/advertisers/{advertiserId}/locationLists/{locationListId}/assignedLocations", 28746 // "response": { 28747 // "$ref": "ListAssignedLocationsResponse" 28748 // }, 28749 // "scopes": [ 28750 // "https://www.googleapis.com/auth/display-video" 28751 // ] 28752 // } 28753 28754 } 28755 28756 // Pages invokes f for each page of results. 28757 // A non-nil error returned from f will halt the iteration. 28758 // The provided context supersedes any context provided to the Context method. 28759 func (c *AdvertisersLocationListsAssignedLocationsListCall) Pages(ctx context.Context, f func(*ListAssignedLocationsResponse) error) error { 28760 c.ctx_ = ctx 28761 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 28762 for { 28763 x, err := c.Do() 28764 if err != nil { 28765 return err 28766 } 28767 if err := f(x); err != nil { 28768 return err 28769 } 28770 if x.NextPageToken == "" { 28771 return nil 28772 } 28773 c.PageToken(x.NextPageToken) 28774 } 28775 } 28776 28777 // method id "displayvideo.advertisers.manualTriggers.activate": 28778 28779 type AdvertisersManualTriggersActivateCall struct { 28780 s *Service 28781 advertiserId int64 28782 triggerId int64 28783 activatemanualtriggerrequest *ActivateManualTriggerRequest 28784 urlParams_ gensupport.URLParams 28785 ctx_ context.Context 28786 header_ http.Header 28787 } 28788 28789 // Activate: Activates a manual trigger. Each activation of the manual 28790 // trigger must be at least 5 minutes apart, otherwise an error will be 28791 // returned. **Warning:** Line Items using manual triggers no longer 28792 // serve in Display & Video 360. This method will sunset on August 1, 28793 // 2023. Read our feature deprecation announcement 28794 // (/display-video/api/deprecations#features.manual_triggers) for more 28795 // information. 28796 // 28797 // - advertiserId: The ID of the advertiser that the manual trigger 28798 // belongs. 28799 // - triggerId: The ID of the manual trigger to activate. 28800 func (r *AdvertisersManualTriggersService) Activate(advertiserId int64, triggerId int64, activatemanualtriggerrequest *ActivateManualTriggerRequest) *AdvertisersManualTriggersActivateCall { 28801 c := &AdvertisersManualTriggersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 28802 c.advertiserId = advertiserId 28803 c.triggerId = triggerId 28804 c.activatemanualtriggerrequest = activatemanualtriggerrequest 28805 return c 28806 } 28807 28808 // Fields allows partial responses to be retrieved. See 28809 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 28810 // for more information. 28811 func (c *AdvertisersManualTriggersActivateCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersActivateCall { 28812 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 28813 return c 28814 } 28815 28816 // Context sets the context to be used in this call's Do method. Any 28817 // pending HTTP request will be aborted if the provided context is 28818 // canceled. 28819 func (c *AdvertisersManualTriggersActivateCall) Context(ctx context.Context) *AdvertisersManualTriggersActivateCall { 28820 c.ctx_ = ctx 28821 return c 28822 } 28823 28824 // Header returns an http.Header that can be modified by the caller to 28825 // add HTTP headers to the request. 28826 func (c *AdvertisersManualTriggersActivateCall) Header() http.Header { 28827 if c.header_ == nil { 28828 c.header_ = make(http.Header) 28829 } 28830 return c.header_ 28831 } 28832 28833 func (c *AdvertisersManualTriggersActivateCall) doRequest(alt string) (*http.Response, error) { 28834 reqHeaders := make(http.Header) 28835 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 28836 for k, v := range c.header_ { 28837 reqHeaders[k] = v 28838 } 28839 reqHeaders.Set("User-Agent", c.s.userAgent()) 28840 var body io.Reader = nil 28841 body, err := googleapi.WithoutDataWrapper.JSONReader(c.activatemanualtriggerrequest) 28842 if err != nil { 28843 return nil, err 28844 } 28845 reqHeaders.Set("Content-Type", "application/json") 28846 c.urlParams_.Set("alt", alt) 28847 c.urlParams_.Set("prettyPrint", "false") 28848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}:activate") 28849 urls += "?" + c.urlParams_.Encode() 28850 req, err := http.NewRequest("POST", urls, body) 28851 if err != nil { 28852 return nil, err 28853 } 28854 req.Header = reqHeaders 28855 googleapi.Expand(req.URL, map[string]string{ 28856 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 28857 "triggerId": strconv.FormatInt(c.triggerId, 10), 28858 }) 28859 return gensupport.SendRequest(c.ctx_, c.s.client, req) 28860 } 28861 28862 // Do executes the "displayvideo.advertisers.manualTriggers.activate" call. 28863 // Exactly one of *ManualTrigger or error will be non-nil. Any non-2xx 28864 // status code is an error. Response headers are in either 28865 // *ManualTrigger.ServerResponse.Header or (if a response was returned 28866 // at all) in error.(*googleapi.Error).Header. Use 28867 // googleapi.IsNotModified to check whether the returned error was 28868 // because http.StatusNotModified was returned. 28869 func (c *AdvertisersManualTriggersActivateCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) { 28870 gensupport.SetOptions(c.urlParams_, opts...) 28871 res, err := c.doRequest("json") 28872 if res != nil && res.StatusCode == http.StatusNotModified { 28873 if res.Body != nil { 28874 res.Body.Close() 28875 } 28876 return nil, gensupport.WrapError(&googleapi.Error{ 28877 Code: res.StatusCode, 28878 Header: res.Header, 28879 }) 28880 } 28881 if err != nil { 28882 return nil, err 28883 } 28884 defer googleapi.CloseBody(res) 28885 if err := googleapi.CheckResponse(res); err != nil { 28886 return nil, gensupport.WrapError(err) 28887 } 28888 ret := &ManualTrigger{ 28889 ServerResponse: googleapi.ServerResponse{ 28890 Header: res.Header, 28891 HTTPStatusCode: res.StatusCode, 28892 }, 28893 } 28894 target := &ret 28895 if err := gensupport.DecodeResponse(target, res); err != nil { 28896 return nil, err 28897 } 28898 return ret, nil 28899 // { 28900 // "description": "Activates a manual trigger. Each activation of the manual trigger must be at least 5 minutes apart, otherwise an error will be returned. **Warning:** Line Items using manual triggers no longer serve in Display \u0026 Video 360. This method will sunset on August 1, 2023. Read our [feature deprecation announcement](/display-video/api/deprecations#features.manual_triggers) for more information.", 28901 // "flatPath": "v1/advertisers/{advertisersId}/manualTriggers/{manualTriggersId}:activate", 28902 // "httpMethod": "POST", 28903 // "id": "displayvideo.advertisers.manualTriggers.activate", 28904 // "parameterOrder": [ 28905 // "advertiserId", 28906 // "triggerId" 28907 // ], 28908 // "parameters": { 28909 // "advertiserId": { 28910 // "description": "Required. The ID of the advertiser that the manual trigger belongs.", 28911 // "format": "int64", 28912 // "location": "path", 28913 // "pattern": "^[^/]+$", 28914 // "required": true, 28915 // "type": "string" 28916 // }, 28917 // "triggerId": { 28918 // "description": "Required. The ID of the manual trigger to activate.", 28919 // "format": "int64", 28920 // "location": "path", 28921 // "pattern": "^[^/]+$", 28922 // "required": true, 28923 // "type": "string" 28924 // } 28925 // }, 28926 // "path": "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}:activate", 28927 // "request": { 28928 // "$ref": "ActivateManualTriggerRequest" 28929 // }, 28930 // "response": { 28931 // "$ref": "ManualTrigger" 28932 // }, 28933 // "scopes": [ 28934 // "https://www.googleapis.com/auth/display-video" 28935 // ] 28936 // } 28937 28938 } 28939 28940 // method id "displayvideo.advertisers.manualTriggers.create": 28941 28942 type AdvertisersManualTriggersCreateCall struct { 28943 s *Service 28944 advertiserId int64 28945 manualtrigger *ManualTrigger 28946 urlParams_ gensupport.URLParams 28947 ctx_ context.Context 28948 header_ http.Header 28949 } 28950 28951 // Create: Creates a new manual trigger. Returns the newly created 28952 // manual trigger if successful. **Warning:** Line Items using manual 28953 // triggers no longer serve in Display & Video 360. This method will 28954 // sunset on August 1, 2023. Read our feature deprecation announcement 28955 // (/display-video/api/deprecations#features.manual_triggers) for more 28956 // information. 28957 // 28958 // - advertiserId: Immutable. The unique ID of the advertiser that the 28959 // manual trigger belongs to. 28960 func (r *AdvertisersManualTriggersService) Create(advertiserId int64, manualtrigger *ManualTrigger) *AdvertisersManualTriggersCreateCall { 28961 c := &AdvertisersManualTriggersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 28962 c.advertiserId = advertiserId 28963 c.manualtrigger = manualtrigger 28964 return c 28965 } 28966 28967 // Fields allows partial responses to be retrieved. See 28968 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 28969 // for more information. 28970 func (c *AdvertisersManualTriggersCreateCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersCreateCall { 28971 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 28972 return c 28973 } 28974 28975 // Context sets the context to be used in this call's Do method. Any 28976 // pending HTTP request will be aborted if the provided context is 28977 // canceled. 28978 func (c *AdvertisersManualTriggersCreateCall) Context(ctx context.Context) *AdvertisersManualTriggersCreateCall { 28979 c.ctx_ = ctx 28980 return c 28981 } 28982 28983 // Header returns an http.Header that can be modified by the caller to 28984 // add HTTP headers to the request. 28985 func (c *AdvertisersManualTriggersCreateCall) Header() http.Header { 28986 if c.header_ == nil { 28987 c.header_ = make(http.Header) 28988 } 28989 return c.header_ 28990 } 28991 28992 func (c *AdvertisersManualTriggersCreateCall) doRequest(alt string) (*http.Response, error) { 28993 reqHeaders := make(http.Header) 28994 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 28995 for k, v := range c.header_ { 28996 reqHeaders[k] = v 28997 } 28998 reqHeaders.Set("User-Agent", c.s.userAgent()) 28999 var body io.Reader = nil 29000 body, err := googleapi.WithoutDataWrapper.JSONReader(c.manualtrigger) 29001 if err != nil { 29002 return nil, err 29003 } 29004 reqHeaders.Set("Content-Type", "application/json") 29005 c.urlParams_.Set("alt", alt) 29006 c.urlParams_.Set("prettyPrint", "false") 29007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/manualTriggers") 29008 urls += "?" + c.urlParams_.Encode() 29009 req, err := http.NewRequest("POST", urls, body) 29010 if err != nil { 29011 return nil, err 29012 } 29013 req.Header = reqHeaders 29014 googleapi.Expand(req.URL, map[string]string{ 29015 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 29016 }) 29017 return gensupport.SendRequest(c.ctx_, c.s.client, req) 29018 } 29019 29020 // Do executes the "displayvideo.advertisers.manualTriggers.create" call. 29021 // Exactly one of *ManualTrigger or error will be non-nil. Any non-2xx 29022 // status code is an error. Response headers are in either 29023 // *ManualTrigger.ServerResponse.Header or (if a response was returned 29024 // at all) in error.(*googleapi.Error).Header. Use 29025 // googleapi.IsNotModified to check whether the returned error was 29026 // because http.StatusNotModified was returned. 29027 func (c *AdvertisersManualTriggersCreateCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) { 29028 gensupport.SetOptions(c.urlParams_, opts...) 29029 res, err := c.doRequest("json") 29030 if res != nil && res.StatusCode == http.StatusNotModified { 29031 if res.Body != nil { 29032 res.Body.Close() 29033 } 29034 return nil, gensupport.WrapError(&googleapi.Error{ 29035 Code: res.StatusCode, 29036 Header: res.Header, 29037 }) 29038 } 29039 if err != nil { 29040 return nil, err 29041 } 29042 defer googleapi.CloseBody(res) 29043 if err := googleapi.CheckResponse(res); err != nil { 29044 return nil, gensupport.WrapError(err) 29045 } 29046 ret := &ManualTrigger{ 29047 ServerResponse: googleapi.ServerResponse{ 29048 Header: res.Header, 29049 HTTPStatusCode: res.StatusCode, 29050 }, 29051 } 29052 target := &ret 29053 if err := gensupport.DecodeResponse(target, res); err != nil { 29054 return nil, err 29055 } 29056 return ret, nil 29057 // { 29058 // "description": "Creates a new manual trigger. Returns the newly created manual trigger if successful. **Warning:** Line Items using manual triggers no longer serve in Display \u0026 Video 360. This method will sunset on August 1, 2023. Read our [feature deprecation announcement](/display-video/api/deprecations#features.manual_triggers) for more information.", 29059 // "flatPath": "v1/advertisers/{advertisersId}/manualTriggers", 29060 // "httpMethod": "POST", 29061 // "id": "displayvideo.advertisers.manualTriggers.create", 29062 // "parameterOrder": [ 29063 // "advertiserId" 29064 // ], 29065 // "parameters": { 29066 // "advertiserId": { 29067 // "description": "Required. Immutable. The unique ID of the advertiser that the manual trigger belongs to.", 29068 // "format": "int64", 29069 // "location": "path", 29070 // "pattern": "^[^/]+$", 29071 // "required": true, 29072 // "type": "string" 29073 // } 29074 // }, 29075 // "path": "v1/advertisers/{+advertiserId}/manualTriggers", 29076 // "request": { 29077 // "$ref": "ManualTrigger" 29078 // }, 29079 // "response": { 29080 // "$ref": "ManualTrigger" 29081 // }, 29082 // "scopes": [ 29083 // "https://www.googleapis.com/auth/display-video" 29084 // ] 29085 // } 29086 29087 } 29088 29089 // method id "displayvideo.advertisers.manualTriggers.deactivate": 29090 29091 type AdvertisersManualTriggersDeactivateCall struct { 29092 s *Service 29093 advertiserId int64 29094 triggerId int64 29095 deactivatemanualtriggerrequest *DeactivateManualTriggerRequest 29096 urlParams_ gensupport.URLParams 29097 ctx_ context.Context 29098 header_ http.Header 29099 } 29100 29101 // Deactivate: Deactivates a manual trigger. **Warning:** Line Items 29102 // using manual triggers no longer serve in Display & Video 360. This 29103 // method will sunset on August 1, 2023. Read our feature deprecation 29104 // announcement 29105 // (/display-video/api/deprecations#features.manual_triggers) for more 29106 // information. 29107 // 29108 // - advertiserId: The ID of the advertiser that the manual trigger 29109 // belongs. 29110 // - triggerId: The ID of the manual trigger to deactivate. 29111 func (r *AdvertisersManualTriggersService) Deactivate(advertiserId int64, triggerId int64, deactivatemanualtriggerrequest *DeactivateManualTriggerRequest) *AdvertisersManualTriggersDeactivateCall { 29112 c := &AdvertisersManualTriggersDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 29113 c.advertiserId = advertiserId 29114 c.triggerId = triggerId 29115 c.deactivatemanualtriggerrequest = deactivatemanualtriggerrequest 29116 return c 29117 } 29118 29119 // Fields allows partial responses to be retrieved. See 29120 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 29121 // for more information. 29122 func (c *AdvertisersManualTriggersDeactivateCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersDeactivateCall { 29123 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 29124 return c 29125 } 29126 29127 // Context sets the context to be used in this call's Do method. Any 29128 // pending HTTP request will be aborted if the provided context is 29129 // canceled. 29130 func (c *AdvertisersManualTriggersDeactivateCall) Context(ctx context.Context) *AdvertisersManualTriggersDeactivateCall { 29131 c.ctx_ = ctx 29132 return c 29133 } 29134 29135 // Header returns an http.Header that can be modified by the caller to 29136 // add HTTP headers to the request. 29137 func (c *AdvertisersManualTriggersDeactivateCall) Header() http.Header { 29138 if c.header_ == nil { 29139 c.header_ = make(http.Header) 29140 } 29141 return c.header_ 29142 } 29143 29144 func (c *AdvertisersManualTriggersDeactivateCall) doRequest(alt string) (*http.Response, error) { 29145 reqHeaders := make(http.Header) 29146 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 29147 for k, v := range c.header_ { 29148 reqHeaders[k] = v 29149 } 29150 reqHeaders.Set("User-Agent", c.s.userAgent()) 29151 var body io.Reader = nil 29152 body, err := googleapi.WithoutDataWrapper.JSONReader(c.deactivatemanualtriggerrequest) 29153 if err != nil { 29154 return nil, err 29155 } 29156 reqHeaders.Set("Content-Type", "application/json") 29157 c.urlParams_.Set("alt", alt) 29158 c.urlParams_.Set("prettyPrint", "false") 29159 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}:deactivate") 29160 urls += "?" + c.urlParams_.Encode() 29161 req, err := http.NewRequest("POST", urls, body) 29162 if err != nil { 29163 return nil, err 29164 } 29165 req.Header = reqHeaders 29166 googleapi.Expand(req.URL, map[string]string{ 29167 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 29168 "triggerId": strconv.FormatInt(c.triggerId, 10), 29169 }) 29170 return gensupport.SendRequest(c.ctx_, c.s.client, req) 29171 } 29172 29173 // Do executes the "displayvideo.advertisers.manualTriggers.deactivate" call. 29174 // Exactly one of *ManualTrigger or error will be non-nil. Any non-2xx 29175 // status code is an error. Response headers are in either 29176 // *ManualTrigger.ServerResponse.Header or (if a response was returned 29177 // at all) in error.(*googleapi.Error).Header. Use 29178 // googleapi.IsNotModified to check whether the returned error was 29179 // because http.StatusNotModified was returned. 29180 func (c *AdvertisersManualTriggersDeactivateCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) { 29181 gensupport.SetOptions(c.urlParams_, opts...) 29182 res, err := c.doRequest("json") 29183 if res != nil && res.StatusCode == http.StatusNotModified { 29184 if res.Body != nil { 29185 res.Body.Close() 29186 } 29187 return nil, gensupport.WrapError(&googleapi.Error{ 29188 Code: res.StatusCode, 29189 Header: res.Header, 29190 }) 29191 } 29192 if err != nil { 29193 return nil, err 29194 } 29195 defer googleapi.CloseBody(res) 29196 if err := googleapi.CheckResponse(res); err != nil { 29197 return nil, gensupport.WrapError(err) 29198 } 29199 ret := &ManualTrigger{ 29200 ServerResponse: googleapi.ServerResponse{ 29201 Header: res.Header, 29202 HTTPStatusCode: res.StatusCode, 29203 }, 29204 } 29205 target := &ret 29206 if err := gensupport.DecodeResponse(target, res); err != nil { 29207 return nil, err 29208 } 29209 return ret, nil 29210 // { 29211 // "description": "Deactivates a manual trigger. **Warning:** Line Items using manual triggers no longer serve in Display \u0026 Video 360. This method will sunset on August 1, 2023. Read our [feature deprecation announcement](/display-video/api/deprecations#features.manual_triggers) for more information.", 29212 // "flatPath": "v1/advertisers/{advertisersId}/manualTriggers/{manualTriggersId}:deactivate", 29213 // "httpMethod": "POST", 29214 // "id": "displayvideo.advertisers.manualTriggers.deactivate", 29215 // "parameterOrder": [ 29216 // "advertiserId", 29217 // "triggerId" 29218 // ], 29219 // "parameters": { 29220 // "advertiserId": { 29221 // "description": "Required. The ID of the advertiser that the manual trigger belongs.", 29222 // "format": "int64", 29223 // "location": "path", 29224 // "pattern": "^[^/]+$", 29225 // "required": true, 29226 // "type": "string" 29227 // }, 29228 // "triggerId": { 29229 // "description": "Required. The ID of the manual trigger to deactivate.", 29230 // "format": "int64", 29231 // "location": "path", 29232 // "pattern": "^[^/]+$", 29233 // "required": true, 29234 // "type": "string" 29235 // } 29236 // }, 29237 // "path": "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}:deactivate", 29238 // "request": { 29239 // "$ref": "DeactivateManualTriggerRequest" 29240 // }, 29241 // "response": { 29242 // "$ref": "ManualTrigger" 29243 // }, 29244 // "scopes": [ 29245 // "https://www.googleapis.com/auth/display-video" 29246 // ] 29247 // } 29248 29249 } 29250 29251 // method id "displayvideo.advertisers.manualTriggers.get": 29252 29253 type AdvertisersManualTriggersGetCall struct { 29254 s *Service 29255 advertiserId int64 29256 triggerId int64 29257 urlParams_ gensupport.URLParams 29258 ifNoneMatch_ string 29259 ctx_ context.Context 29260 header_ http.Header 29261 } 29262 29263 // Get: Gets a manual trigger. **Warning:** Line Items using manual 29264 // triggers no longer serve in Display & Video 360. This method will 29265 // sunset on August 1, 2023. Read our feature deprecation announcement 29266 // (/display-video/api/deprecations#features.manual_triggers) for more 29267 // information. 29268 // 29269 // - advertiserId: The ID of the advertiser this manual trigger belongs 29270 // to. 29271 // - triggerId: The ID of the manual trigger to fetch. 29272 func (r *AdvertisersManualTriggersService) Get(advertiserId int64, triggerId int64) *AdvertisersManualTriggersGetCall { 29273 c := &AdvertisersManualTriggersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 29274 c.advertiserId = advertiserId 29275 c.triggerId = triggerId 29276 return c 29277 } 29278 29279 // Fields allows partial responses to be retrieved. See 29280 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 29281 // for more information. 29282 func (c *AdvertisersManualTriggersGetCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersGetCall { 29283 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 29284 return c 29285 } 29286 29287 // IfNoneMatch sets the optional parameter which makes the operation 29288 // fail if the object's ETag matches the given value. This is useful for 29289 // getting updates only after the object has changed since the last 29290 // request. Use googleapi.IsNotModified to check whether the response 29291 // error from Do is the result of In-None-Match. 29292 func (c *AdvertisersManualTriggersGetCall) IfNoneMatch(entityTag string) *AdvertisersManualTriggersGetCall { 29293 c.ifNoneMatch_ = entityTag 29294 return c 29295 } 29296 29297 // Context sets the context to be used in this call's Do method. Any 29298 // pending HTTP request will be aborted if the provided context is 29299 // canceled. 29300 func (c *AdvertisersManualTriggersGetCall) Context(ctx context.Context) *AdvertisersManualTriggersGetCall { 29301 c.ctx_ = ctx 29302 return c 29303 } 29304 29305 // Header returns an http.Header that can be modified by the caller to 29306 // add HTTP headers to the request. 29307 func (c *AdvertisersManualTriggersGetCall) Header() http.Header { 29308 if c.header_ == nil { 29309 c.header_ = make(http.Header) 29310 } 29311 return c.header_ 29312 } 29313 29314 func (c *AdvertisersManualTriggersGetCall) doRequest(alt string) (*http.Response, error) { 29315 reqHeaders := make(http.Header) 29316 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 29317 for k, v := range c.header_ { 29318 reqHeaders[k] = v 29319 } 29320 reqHeaders.Set("User-Agent", c.s.userAgent()) 29321 if c.ifNoneMatch_ != "" { 29322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 29323 } 29324 var body io.Reader = nil 29325 c.urlParams_.Set("alt", alt) 29326 c.urlParams_.Set("prettyPrint", "false") 29327 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}") 29328 urls += "?" + c.urlParams_.Encode() 29329 req, err := http.NewRequest("GET", urls, body) 29330 if err != nil { 29331 return nil, err 29332 } 29333 req.Header = reqHeaders 29334 googleapi.Expand(req.URL, map[string]string{ 29335 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 29336 "triggerId": strconv.FormatInt(c.triggerId, 10), 29337 }) 29338 return gensupport.SendRequest(c.ctx_, c.s.client, req) 29339 } 29340 29341 // Do executes the "displayvideo.advertisers.manualTriggers.get" call. 29342 // Exactly one of *ManualTrigger or error will be non-nil. Any non-2xx 29343 // status code is an error. Response headers are in either 29344 // *ManualTrigger.ServerResponse.Header or (if a response was returned 29345 // at all) in error.(*googleapi.Error).Header. Use 29346 // googleapi.IsNotModified to check whether the returned error was 29347 // because http.StatusNotModified was returned. 29348 func (c *AdvertisersManualTriggersGetCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) { 29349 gensupport.SetOptions(c.urlParams_, opts...) 29350 res, err := c.doRequest("json") 29351 if res != nil && res.StatusCode == http.StatusNotModified { 29352 if res.Body != nil { 29353 res.Body.Close() 29354 } 29355 return nil, gensupport.WrapError(&googleapi.Error{ 29356 Code: res.StatusCode, 29357 Header: res.Header, 29358 }) 29359 } 29360 if err != nil { 29361 return nil, err 29362 } 29363 defer googleapi.CloseBody(res) 29364 if err := googleapi.CheckResponse(res); err != nil { 29365 return nil, gensupport.WrapError(err) 29366 } 29367 ret := &ManualTrigger{ 29368 ServerResponse: googleapi.ServerResponse{ 29369 Header: res.Header, 29370 HTTPStatusCode: res.StatusCode, 29371 }, 29372 } 29373 target := &ret 29374 if err := gensupport.DecodeResponse(target, res); err != nil { 29375 return nil, err 29376 } 29377 return ret, nil 29378 // { 29379 // "description": "Gets a manual trigger. **Warning:** Line Items using manual triggers no longer serve in Display \u0026 Video 360. This method will sunset on August 1, 2023. Read our [feature deprecation announcement](/display-video/api/deprecations#features.manual_triggers) for more information.", 29380 // "flatPath": "v1/advertisers/{advertisersId}/manualTriggers/{manualTriggersId}", 29381 // "httpMethod": "GET", 29382 // "id": "displayvideo.advertisers.manualTriggers.get", 29383 // "parameterOrder": [ 29384 // "advertiserId", 29385 // "triggerId" 29386 // ], 29387 // "parameters": { 29388 // "advertiserId": { 29389 // "description": "Required. The ID of the advertiser this manual trigger belongs to.", 29390 // "format": "int64", 29391 // "location": "path", 29392 // "pattern": "^[^/]+$", 29393 // "required": true, 29394 // "type": "string" 29395 // }, 29396 // "triggerId": { 29397 // "description": "Required. The ID of the manual trigger to fetch.", 29398 // "format": "int64", 29399 // "location": "path", 29400 // "pattern": "^[^/]+$", 29401 // "required": true, 29402 // "type": "string" 29403 // } 29404 // }, 29405 // "path": "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}", 29406 // "response": { 29407 // "$ref": "ManualTrigger" 29408 // }, 29409 // "scopes": [ 29410 // "https://www.googleapis.com/auth/display-video" 29411 // ] 29412 // } 29413 29414 } 29415 29416 // method id "displayvideo.advertisers.manualTriggers.list": 29417 29418 type AdvertisersManualTriggersListCall struct { 29419 s *Service 29420 advertiserId int64 29421 urlParams_ gensupport.URLParams 29422 ifNoneMatch_ string 29423 ctx_ context.Context 29424 header_ http.Header 29425 } 29426 29427 // List: Lists manual triggers that are accessible to the current user 29428 // for a given advertiser ID. The order is defined by the order_by 29429 // parameter. A single advertiser_id is required. **Warning:** Line 29430 // Items using manual triggers no longer serve in Display & Video 360. 29431 // This method will sunset on August 1, 2023. Read our feature 29432 // deprecation announcement 29433 // (/display-video/api/deprecations#features.manual_triggers) for more 29434 // information. 29435 // 29436 // - advertiserId: The ID of the advertiser that the fetched manual 29437 // triggers belong to. 29438 func (r *AdvertisersManualTriggersService) List(advertiserId int64) *AdvertisersManualTriggersListCall { 29439 c := &AdvertisersManualTriggersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 29440 c.advertiserId = advertiserId 29441 return c 29442 } 29443 29444 // Filter sets the optional parameter "filter": Allows filtering by 29445 // manual trigger fields. Supported syntax: * Filter expressions are 29446 // made up of one or more restrictions. * Restrictions can be combined 29447 // by `AND` or `OR` logical operators. A sequence of restrictions 29448 // implicitly uses `AND`. * A restriction has the form of `{field} 29449 // {operator} {value}`. * All fields must use the `EQUALS (=)` operator. 29450 // Supported fields: * `displayName` * `state` Examples: * All active 29451 // manual triggers under an advertiser: `state="ACTIVE" The length of 29452 // this field should be no more than 500 characters. Reference our 29453 // filter `LIST` requests (/display-video/api/guides/how-tos/filters) 29454 // guide for more information. 29455 func (c *AdvertisersManualTriggersListCall) Filter(filter string) *AdvertisersManualTriggersListCall { 29456 c.urlParams_.Set("filter", filter) 29457 return c 29458 } 29459 29460 // OrderBy sets the optional parameter "orderBy": Field by which to sort 29461 // the list. Acceptable values are: * `displayName` (default) * `state` 29462 // The default sorting order is ascending. To specify descending order 29463 // for a field, a suffix "desc" should be added to the field name. For 29464 // example, `displayName desc`. 29465 func (c *AdvertisersManualTriggersListCall) OrderBy(orderBy string) *AdvertisersManualTriggersListCall { 29466 c.urlParams_.Set("orderBy", orderBy) 29467 return c 29468 } 29469 29470 // PageSize sets the optional parameter "pageSize": Requested page size. 29471 // Must be between `1` and `200`. If unspecified will default to `100`. 29472 func (c *AdvertisersManualTriggersListCall) PageSize(pageSize int64) *AdvertisersManualTriggersListCall { 29473 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 29474 return c 29475 } 29476 29477 // PageToken sets the optional parameter "pageToken": A token 29478 // identifying a page of results the server should return. Typically, 29479 // this is the value of next_page_token returned from the previous call 29480 // to `ListManualTriggers` method. If not specified, the first page of 29481 // results will be returned. 29482 func (c *AdvertisersManualTriggersListCall) PageToken(pageToken string) *AdvertisersManualTriggersListCall { 29483 c.urlParams_.Set("pageToken", pageToken) 29484 return c 29485 } 29486 29487 // Fields allows partial responses to be retrieved. See 29488 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 29489 // for more information. 29490 func (c *AdvertisersManualTriggersListCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersListCall { 29491 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 29492 return c 29493 } 29494 29495 // IfNoneMatch sets the optional parameter which makes the operation 29496 // fail if the object's ETag matches the given value. This is useful for 29497 // getting updates only after the object has changed since the last 29498 // request. Use googleapi.IsNotModified to check whether the response 29499 // error from Do is the result of In-None-Match. 29500 func (c *AdvertisersManualTriggersListCall) IfNoneMatch(entityTag string) *AdvertisersManualTriggersListCall { 29501 c.ifNoneMatch_ = entityTag 29502 return c 29503 } 29504 29505 // Context sets the context to be used in this call's Do method. Any 29506 // pending HTTP request will be aborted if the provided context is 29507 // canceled. 29508 func (c *AdvertisersManualTriggersListCall) Context(ctx context.Context) *AdvertisersManualTriggersListCall { 29509 c.ctx_ = ctx 29510 return c 29511 } 29512 29513 // Header returns an http.Header that can be modified by the caller to 29514 // add HTTP headers to the request. 29515 func (c *AdvertisersManualTriggersListCall) Header() http.Header { 29516 if c.header_ == nil { 29517 c.header_ = make(http.Header) 29518 } 29519 return c.header_ 29520 } 29521 29522 func (c *AdvertisersManualTriggersListCall) doRequest(alt string) (*http.Response, error) { 29523 reqHeaders := make(http.Header) 29524 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 29525 for k, v := range c.header_ { 29526 reqHeaders[k] = v 29527 } 29528 reqHeaders.Set("User-Agent", c.s.userAgent()) 29529 if c.ifNoneMatch_ != "" { 29530 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 29531 } 29532 var body io.Reader = nil 29533 c.urlParams_.Set("alt", alt) 29534 c.urlParams_.Set("prettyPrint", "false") 29535 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/manualTriggers") 29536 urls += "?" + c.urlParams_.Encode() 29537 req, err := http.NewRequest("GET", urls, body) 29538 if err != nil { 29539 return nil, err 29540 } 29541 req.Header = reqHeaders 29542 googleapi.Expand(req.URL, map[string]string{ 29543 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 29544 }) 29545 return gensupport.SendRequest(c.ctx_, c.s.client, req) 29546 } 29547 29548 // Do executes the "displayvideo.advertisers.manualTriggers.list" call. 29549 // Exactly one of *ListManualTriggersResponse or error will be non-nil. 29550 // Any non-2xx status code is an error. Response headers are in either 29551 // *ListManualTriggersResponse.ServerResponse.Header or (if a response 29552 // was returned at all) in error.(*googleapi.Error).Header. Use 29553 // googleapi.IsNotModified to check whether the returned error was 29554 // because http.StatusNotModified was returned. 29555 func (c *AdvertisersManualTriggersListCall) Do(opts ...googleapi.CallOption) (*ListManualTriggersResponse, error) { 29556 gensupport.SetOptions(c.urlParams_, opts...) 29557 res, err := c.doRequest("json") 29558 if res != nil && res.StatusCode == http.StatusNotModified { 29559 if res.Body != nil { 29560 res.Body.Close() 29561 } 29562 return nil, gensupport.WrapError(&googleapi.Error{ 29563 Code: res.StatusCode, 29564 Header: res.Header, 29565 }) 29566 } 29567 if err != nil { 29568 return nil, err 29569 } 29570 defer googleapi.CloseBody(res) 29571 if err := googleapi.CheckResponse(res); err != nil { 29572 return nil, gensupport.WrapError(err) 29573 } 29574 ret := &ListManualTriggersResponse{ 29575 ServerResponse: googleapi.ServerResponse{ 29576 Header: res.Header, 29577 HTTPStatusCode: res.StatusCode, 29578 }, 29579 } 29580 target := &ret 29581 if err := gensupport.DecodeResponse(target, res); err != nil { 29582 return nil, err 29583 } 29584 return ret, nil 29585 // { 29586 // "description": "Lists manual triggers that are accessible to the current user for a given advertiser ID. The order is defined by the order_by parameter. A single advertiser_id is required. **Warning:** Line Items using manual triggers no longer serve in Display \u0026 Video 360. This method will sunset on August 1, 2023. Read our [feature deprecation announcement](/display-video/api/deprecations#features.manual_triggers) for more information.", 29587 // "flatPath": "v1/advertisers/{advertisersId}/manualTriggers", 29588 // "httpMethod": "GET", 29589 // "id": "displayvideo.advertisers.manualTriggers.list", 29590 // "parameterOrder": [ 29591 // "advertiserId" 29592 // ], 29593 // "parameters": { 29594 // "advertiserId": { 29595 // "description": "Required. The ID of the advertiser that the fetched manual triggers belong to.", 29596 // "format": "int64", 29597 // "location": "path", 29598 // "pattern": "^[^/]+$", 29599 // "required": true, 29600 // "type": "string" 29601 // }, 29602 // "filter": { 29603 // "description": "Allows filtering by manual trigger fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `displayName` * `state` Examples: * All active manual triggers under an advertiser: `state=\"ACTIVE\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 29604 // "location": "query", 29605 // "type": "string" 29606 // }, 29607 // "orderBy": { 29608 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `state` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 29609 // "location": "query", 29610 // "type": "string" 29611 // }, 29612 // "pageSize": { 29613 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 29614 // "format": "int32", 29615 // "location": "query", 29616 // "type": "integer" 29617 // }, 29618 // "pageToken": { 29619 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListManualTriggers` method. If not specified, the first page of results will be returned.", 29620 // "location": "query", 29621 // "type": "string" 29622 // } 29623 // }, 29624 // "path": "v1/advertisers/{+advertiserId}/manualTriggers", 29625 // "response": { 29626 // "$ref": "ListManualTriggersResponse" 29627 // }, 29628 // "scopes": [ 29629 // "https://www.googleapis.com/auth/display-video" 29630 // ] 29631 // } 29632 29633 } 29634 29635 // Pages invokes f for each page of results. 29636 // A non-nil error returned from f will halt the iteration. 29637 // The provided context supersedes any context provided to the Context method. 29638 func (c *AdvertisersManualTriggersListCall) Pages(ctx context.Context, f func(*ListManualTriggersResponse) error) error { 29639 c.ctx_ = ctx 29640 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 29641 for { 29642 x, err := c.Do() 29643 if err != nil { 29644 return err 29645 } 29646 if err := f(x); err != nil { 29647 return err 29648 } 29649 if x.NextPageToken == "" { 29650 return nil 29651 } 29652 c.PageToken(x.NextPageToken) 29653 } 29654 } 29655 29656 // method id "displayvideo.advertisers.manualTriggers.patch": 29657 29658 type AdvertisersManualTriggersPatchCall struct { 29659 s *Service 29660 advertiserId int64 29661 triggerId int64 29662 manualtrigger *ManualTrigger 29663 urlParams_ gensupport.URLParams 29664 ctx_ context.Context 29665 header_ http.Header 29666 } 29667 29668 // Patch: Updates a manual trigger. Returns the updated manual trigger 29669 // if successful. **Warning:** Line Items using manual triggers no 29670 // longer serve in Display & Video 360. This method will sunset on 29671 // August 1, 2023. Read our feature deprecation announcement 29672 // (/display-video/api/deprecations#features.manual_triggers) for more 29673 // information. 29674 // 29675 // - advertiserId: Immutable. The unique ID of the advertiser that the 29676 // manual trigger belongs to. 29677 // - triggerId: Output only. The unique ID of the manual trigger. 29678 func (r *AdvertisersManualTriggersService) Patch(advertiserId int64, triggerId int64, manualtrigger *ManualTrigger) *AdvertisersManualTriggersPatchCall { 29679 c := &AdvertisersManualTriggersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 29680 c.advertiserId = advertiserId 29681 c.triggerId = triggerId 29682 c.manualtrigger = manualtrigger 29683 return c 29684 } 29685 29686 // UpdateMask sets the optional parameter "updateMask": Required. The 29687 // mask to control which fields to update. 29688 func (c *AdvertisersManualTriggersPatchCall) UpdateMask(updateMask string) *AdvertisersManualTriggersPatchCall { 29689 c.urlParams_.Set("updateMask", updateMask) 29690 return c 29691 } 29692 29693 // Fields allows partial responses to be retrieved. See 29694 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 29695 // for more information. 29696 func (c *AdvertisersManualTriggersPatchCall) Fields(s ...googleapi.Field) *AdvertisersManualTriggersPatchCall { 29697 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 29698 return c 29699 } 29700 29701 // Context sets the context to be used in this call's Do method. Any 29702 // pending HTTP request will be aborted if the provided context is 29703 // canceled. 29704 func (c *AdvertisersManualTriggersPatchCall) Context(ctx context.Context) *AdvertisersManualTriggersPatchCall { 29705 c.ctx_ = ctx 29706 return c 29707 } 29708 29709 // Header returns an http.Header that can be modified by the caller to 29710 // add HTTP headers to the request. 29711 func (c *AdvertisersManualTriggersPatchCall) Header() http.Header { 29712 if c.header_ == nil { 29713 c.header_ = make(http.Header) 29714 } 29715 return c.header_ 29716 } 29717 29718 func (c *AdvertisersManualTriggersPatchCall) doRequest(alt string) (*http.Response, error) { 29719 reqHeaders := make(http.Header) 29720 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 29721 for k, v := range c.header_ { 29722 reqHeaders[k] = v 29723 } 29724 reqHeaders.Set("User-Agent", c.s.userAgent()) 29725 var body io.Reader = nil 29726 body, err := googleapi.WithoutDataWrapper.JSONReader(c.manualtrigger) 29727 if err != nil { 29728 return nil, err 29729 } 29730 reqHeaders.Set("Content-Type", "application/json") 29731 c.urlParams_.Set("alt", alt) 29732 c.urlParams_.Set("prettyPrint", "false") 29733 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}") 29734 urls += "?" + c.urlParams_.Encode() 29735 req, err := http.NewRequest("PATCH", urls, body) 29736 if err != nil { 29737 return nil, err 29738 } 29739 req.Header = reqHeaders 29740 googleapi.Expand(req.URL, map[string]string{ 29741 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 29742 "triggerId": strconv.FormatInt(c.triggerId, 10), 29743 }) 29744 return gensupport.SendRequest(c.ctx_, c.s.client, req) 29745 } 29746 29747 // Do executes the "displayvideo.advertisers.manualTriggers.patch" call. 29748 // Exactly one of *ManualTrigger or error will be non-nil. Any non-2xx 29749 // status code is an error. Response headers are in either 29750 // *ManualTrigger.ServerResponse.Header or (if a response was returned 29751 // at all) in error.(*googleapi.Error).Header. Use 29752 // googleapi.IsNotModified to check whether the returned error was 29753 // because http.StatusNotModified was returned. 29754 func (c *AdvertisersManualTriggersPatchCall) Do(opts ...googleapi.CallOption) (*ManualTrigger, error) { 29755 gensupport.SetOptions(c.urlParams_, opts...) 29756 res, err := c.doRequest("json") 29757 if res != nil && res.StatusCode == http.StatusNotModified { 29758 if res.Body != nil { 29759 res.Body.Close() 29760 } 29761 return nil, gensupport.WrapError(&googleapi.Error{ 29762 Code: res.StatusCode, 29763 Header: res.Header, 29764 }) 29765 } 29766 if err != nil { 29767 return nil, err 29768 } 29769 defer googleapi.CloseBody(res) 29770 if err := googleapi.CheckResponse(res); err != nil { 29771 return nil, gensupport.WrapError(err) 29772 } 29773 ret := &ManualTrigger{ 29774 ServerResponse: googleapi.ServerResponse{ 29775 Header: res.Header, 29776 HTTPStatusCode: res.StatusCode, 29777 }, 29778 } 29779 target := &ret 29780 if err := gensupport.DecodeResponse(target, res); err != nil { 29781 return nil, err 29782 } 29783 return ret, nil 29784 // { 29785 // "description": "Updates a manual trigger. Returns the updated manual trigger if successful. **Warning:** Line Items using manual triggers no longer serve in Display \u0026 Video 360. This method will sunset on August 1, 2023. Read our [feature deprecation announcement](/display-video/api/deprecations#features.manual_triggers) for more information.", 29786 // "flatPath": "v1/advertisers/{advertisersId}/manualTriggers/{manualTriggersId}", 29787 // "httpMethod": "PATCH", 29788 // "id": "displayvideo.advertisers.manualTriggers.patch", 29789 // "parameterOrder": [ 29790 // "advertiserId", 29791 // "triggerId" 29792 // ], 29793 // "parameters": { 29794 // "advertiserId": { 29795 // "description": "Required. Immutable. The unique ID of the advertiser that the manual trigger belongs to.", 29796 // "format": "int64", 29797 // "location": "path", 29798 // "pattern": "^[^/]+$", 29799 // "required": true, 29800 // "type": "string" 29801 // }, 29802 // "triggerId": { 29803 // "description": "Output only. The unique ID of the manual trigger.", 29804 // "format": "int64", 29805 // "location": "path", 29806 // "pattern": "^[^/]+$", 29807 // "required": true, 29808 // "type": "string" 29809 // }, 29810 // "updateMask": { 29811 // "description": "Required. The mask to control which fields to update.", 29812 // "format": "google-fieldmask", 29813 // "location": "query", 29814 // "type": "string" 29815 // } 29816 // }, 29817 // "path": "v1/advertisers/{+advertiserId}/manualTriggers/{+triggerId}", 29818 // "request": { 29819 // "$ref": "ManualTrigger" 29820 // }, 29821 // "response": { 29822 // "$ref": "ManualTrigger" 29823 // }, 29824 // "scopes": [ 29825 // "https://www.googleapis.com/auth/display-video" 29826 // ] 29827 // } 29828 29829 } 29830 29831 // method id "displayvideo.advertisers.negativeKeywordLists.create": 29832 29833 type AdvertisersNegativeKeywordListsCreateCall struct { 29834 s *Service 29835 advertiserId int64 29836 negativekeywordlist *NegativeKeywordList 29837 urlParams_ gensupport.URLParams 29838 ctx_ context.Context 29839 header_ http.Header 29840 } 29841 29842 // Create: Creates a new negative keyword list. Returns the newly 29843 // created negative keyword list if successful. 29844 // 29845 // - advertiserId: The ID of the DV360 advertiser to which the negative 29846 // keyword list will belong. 29847 func (r *AdvertisersNegativeKeywordListsService) Create(advertiserId int64, negativekeywordlist *NegativeKeywordList) *AdvertisersNegativeKeywordListsCreateCall { 29848 c := &AdvertisersNegativeKeywordListsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 29849 c.advertiserId = advertiserId 29850 c.negativekeywordlist = negativekeywordlist 29851 return c 29852 } 29853 29854 // Fields allows partial responses to be retrieved. See 29855 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 29856 // for more information. 29857 func (c *AdvertisersNegativeKeywordListsCreateCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsCreateCall { 29858 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 29859 return c 29860 } 29861 29862 // Context sets the context to be used in this call's Do method. Any 29863 // pending HTTP request will be aborted if the provided context is 29864 // canceled. 29865 func (c *AdvertisersNegativeKeywordListsCreateCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsCreateCall { 29866 c.ctx_ = ctx 29867 return c 29868 } 29869 29870 // Header returns an http.Header that can be modified by the caller to 29871 // add HTTP headers to the request. 29872 func (c *AdvertisersNegativeKeywordListsCreateCall) Header() http.Header { 29873 if c.header_ == nil { 29874 c.header_ = make(http.Header) 29875 } 29876 return c.header_ 29877 } 29878 29879 func (c *AdvertisersNegativeKeywordListsCreateCall) doRequest(alt string) (*http.Response, error) { 29880 reqHeaders := make(http.Header) 29881 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 29882 for k, v := range c.header_ { 29883 reqHeaders[k] = v 29884 } 29885 reqHeaders.Set("User-Agent", c.s.userAgent()) 29886 var body io.Reader = nil 29887 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeywordlist) 29888 if err != nil { 29889 return nil, err 29890 } 29891 reqHeaders.Set("Content-Type", "application/json") 29892 c.urlParams_.Set("alt", alt) 29893 c.urlParams_.Set("prettyPrint", "false") 29894 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists") 29895 urls += "?" + c.urlParams_.Encode() 29896 req, err := http.NewRequest("POST", urls, body) 29897 if err != nil { 29898 return nil, err 29899 } 29900 req.Header = reqHeaders 29901 googleapi.Expand(req.URL, map[string]string{ 29902 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 29903 }) 29904 return gensupport.SendRequest(c.ctx_, c.s.client, req) 29905 } 29906 29907 // Do executes the "displayvideo.advertisers.negativeKeywordLists.create" call. 29908 // Exactly one of *NegativeKeywordList or error will be non-nil. Any 29909 // non-2xx status code is an error. Response headers are in either 29910 // *NegativeKeywordList.ServerResponse.Header or (if a response was 29911 // returned at all) in error.(*googleapi.Error).Header. Use 29912 // googleapi.IsNotModified to check whether the returned error was 29913 // because http.StatusNotModified was returned. 29914 func (c *AdvertisersNegativeKeywordListsCreateCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) { 29915 gensupport.SetOptions(c.urlParams_, opts...) 29916 res, err := c.doRequest("json") 29917 if res != nil && res.StatusCode == http.StatusNotModified { 29918 if res.Body != nil { 29919 res.Body.Close() 29920 } 29921 return nil, gensupport.WrapError(&googleapi.Error{ 29922 Code: res.StatusCode, 29923 Header: res.Header, 29924 }) 29925 } 29926 if err != nil { 29927 return nil, err 29928 } 29929 defer googleapi.CloseBody(res) 29930 if err := googleapi.CheckResponse(res); err != nil { 29931 return nil, gensupport.WrapError(err) 29932 } 29933 ret := &NegativeKeywordList{ 29934 ServerResponse: googleapi.ServerResponse{ 29935 Header: res.Header, 29936 HTTPStatusCode: res.StatusCode, 29937 }, 29938 } 29939 target := &ret 29940 if err := gensupport.DecodeResponse(target, res); err != nil { 29941 return nil, err 29942 } 29943 return ret, nil 29944 // { 29945 // "description": "Creates a new negative keyword list. Returns the newly created negative keyword list if successful.", 29946 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists", 29947 // "httpMethod": "POST", 29948 // "id": "displayvideo.advertisers.negativeKeywordLists.create", 29949 // "parameterOrder": [ 29950 // "advertiserId" 29951 // ], 29952 // "parameters": { 29953 // "advertiserId": { 29954 // "description": "Required. The ID of the DV360 advertiser to which the negative keyword list will belong.", 29955 // "format": "int64", 29956 // "location": "path", 29957 // "pattern": "^[^/]+$", 29958 // "required": true, 29959 // "type": "string" 29960 // } 29961 // }, 29962 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists", 29963 // "request": { 29964 // "$ref": "NegativeKeywordList" 29965 // }, 29966 // "response": { 29967 // "$ref": "NegativeKeywordList" 29968 // }, 29969 // "scopes": [ 29970 // "https://www.googleapis.com/auth/display-video" 29971 // ] 29972 // } 29973 29974 } 29975 29976 // method id "displayvideo.advertisers.negativeKeywordLists.delete": 29977 29978 type AdvertisersNegativeKeywordListsDeleteCall struct { 29979 s *Service 29980 advertiserId int64 29981 negativeKeywordListId int64 29982 urlParams_ gensupport.URLParams 29983 ctx_ context.Context 29984 header_ http.Header 29985 } 29986 29987 // Delete: Deletes a negative keyword list given an advertiser ID and a 29988 // negative keyword list ID. 29989 // 29990 // - advertiserId: The ID of the DV360 advertiser to which the negative 29991 // keyword list belongs. 29992 // - negativeKeywordListId: The ID of the negative keyword list to 29993 // delete. 29994 func (r *AdvertisersNegativeKeywordListsService) Delete(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsDeleteCall { 29995 c := &AdvertisersNegativeKeywordListsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 29996 c.advertiserId = advertiserId 29997 c.negativeKeywordListId = negativeKeywordListId 29998 return c 29999 } 30000 30001 // Fields allows partial responses to be retrieved. See 30002 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 30003 // for more information. 30004 func (c *AdvertisersNegativeKeywordListsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsDeleteCall { 30005 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 30006 return c 30007 } 30008 30009 // Context sets the context to be used in this call's Do method. Any 30010 // pending HTTP request will be aborted if the provided context is 30011 // canceled. 30012 func (c *AdvertisersNegativeKeywordListsDeleteCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsDeleteCall { 30013 c.ctx_ = ctx 30014 return c 30015 } 30016 30017 // Header returns an http.Header that can be modified by the caller to 30018 // add HTTP headers to the request. 30019 func (c *AdvertisersNegativeKeywordListsDeleteCall) Header() http.Header { 30020 if c.header_ == nil { 30021 c.header_ = make(http.Header) 30022 } 30023 return c.header_ 30024 } 30025 30026 func (c *AdvertisersNegativeKeywordListsDeleteCall) doRequest(alt string) (*http.Response, error) { 30027 reqHeaders := make(http.Header) 30028 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 30029 for k, v := range c.header_ { 30030 reqHeaders[k] = v 30031 } 30032 reqHeaders.Set("User-Agent", c.s.userAgent()) 30033 var body io.Reader = nil 30034 c.urlParams_.Set("alt", alt) 30035 c.urlParams_.Set("prettyPrint", "false") 30036 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}") 30037 urls += "?" + c.urlParams_.Encode() 30038 req, err := http.NewRequest("DELETE", urls, body) 30039 if err != nil { 30040 return nil, err 30041 } 30042 req.Header = reqHeaders 30043 googleapi.Expand(req.URL, map[string]string{ 30044 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 30045 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 30046 }) 30047 return gensupport.SendRequest(c.ctx_, c.s.client, req) 30048 } 30049 30050 // Do executes the "displayvideo.advertisers.negativeKeywordLists.delete" call. 30051 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 30052 // code is an error. Response headers are in either 30053 // *Empty.ServerResponse.Header or (if a response was returned at all) 30054 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 30055 // check whether the returned error was because http.StatusNotModified 30056 // was returned. 30057 func (c *AdvertisersNegativeKeywordListsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 30058 gensupport.SetOptions(c.urlParams_, opts...) 30059 res, err := c.doRequest("json") 30060 if res != nil && res.StatusCode == http.StatusNotModified { 30061 if res.Body != nil { 30062 res.Body.Close() 30063 } 30064 return nil, gensupport.WrapError(&googleapi.Error{ 30065 Code: res.StatusCode, 30066 Header: res.Header, 30067 }) 30068 } 30069 if err != nil { 30070 return nil, err 30071 } 30072 defer googleapi.CloseBody(res) 30073 if err := googleapi.CheckResponse(res); err != nil { 30074 return nil, gensupport.WrapError(err) 30075 } 30076 ret := &Empty{ 30077 ServerResponse: googleapi.ServerResponse{ 30078 Header: res.Header, 30079 HTTPStatusCode: res.StatusCode, 30080 }, 30081 } 30082 target := &ret 30083 if err := gensupport.DecodeResponse(target, res); err != nil { 30084 return nil, err 30085 } 30086 return ret, nil 30087 // { 30088 // "description": "Deletes a negative keyword list given an advertiser ID and a negative keyword list ID.", 30089 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists/{negativeKeywordListsId}", 30090 // "httpMethod": "DELETE", 30091 // "id": "displayvideo.advertisers.negativeKeywordLists.delete", 30092 // "parameterOrder": [ 30093 // "advertiserId", 30094 // "negativeKeywordListId" 30095 // ], 30096 // "parameters": { 30097 // "advertiserId": { 30098 // "description": "Required. The ID of the DV360 advertiser to which the negative keyword list belongs.", 30099 // "format": "int64", 30100 // "location": "path", 30101 // "pattern": "^[^/]+$", 30102 // "required": true, 30103 // "type": "string" 30104 // }, 30105 // "negativeKeywordListId": { 30106 // "description": "Required. The ID of the negative keyword list to delete.", 30107 // "format": "int64", 30108 // "location": "path", 30109 // "pattern": "^[^/]+$", 30110 // "required": true, 30111 // "type": "string" 30112 // } 30113 // }, 30114 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}", 30115 // "response": { 30116 // "$ref": "Empty" 30117 // }, 30118 // "scopes": [ 30119 // "https://www.googleapis.com/auth/display-video" 30120 // ] 30121 // } 30122 30123 } 30124 30125 // method id "displayvideo.advertisers.negativeKeywordLists.get": 30126 30127 type AdvertisersNegativeKeywordListsGetCall struct { 30128 s *Service 30129 advertiserId int64 30130 negativeKeywordListId int64 30131 urlParams_ gensupport.URLParams 30132 ifNoneMatch_ string 30133 ctx_ context.Context 30134 header_ http.Header 30135 } 30136 30137 // Get: Gets a negative keyword list given an advertiser ID and a 30138 // negative keyword list ID. 30139 // 30140 // - advertiserId: The ID of the DV360 advertiser to which the fetched 30141 // negative keyword list belongs. 30142 // - negativeKeywordListId: The ID of the negative keyword list to 30143 // fetch. 30144 func (r *AdvertisersNegativeKeywordListsService) Get(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsGetCall { 30145 c := &AdvertisersNegativeKeywordListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 30146 c.advertiserId = advertiserId 30147 c.negativeKeywordListId = negativeKeywordListId 30148 return c 30149 } 30150 30151 // Fields allows partial responses to be retrieved. See 30152 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 30153 // for more information. 30154 func (c *AdvertisersNegativeKeywordListsGetCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsGetCall { 30155 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 30156 return c 30157 } 30158 30159 // IfNoneMatch sets the optional parameter which makes the operation 30160 // fail if the object's ETag matches the given value. This is useful for 30161 // getting updates only after the object has changed since the last 30162 // request. Use googleapi.IsNotModified to check whether the response 30163 // error from Do is the result of In-None-Match. 30164 func (c *AdvertisersNegativeKeywordListsGetCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsGetCall { 30165 c.ifNoneMatch_ = entityTag 30166 return c 30167 } 30168 30169 // Context sets the context to be used in this call's Do method. Any 30170 // pending HTTP request will be aborted if the provided context is 30171 // canceled. 30172 func (c *AdvertisersNegativeKeywordListsGetCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsGetCall { 30173 c.ctx_ = ctx 30174 return c 30175 } 30176 30177 // Header returns an http.Header that can be modified by the caller to 30178 // add HTTP headers to the request. 30179 func (c *AdvertisersNegativeKeywordListsGetCall) Header() http.Header { 30180 if c.header_ == nil { 30181 c.header_ = make(http.Header) 30182 } 30183 return c.header_ 30184 } 30185 30186 func (c *AdvertisersNegativeKeywordListsGetCall) doRequest(alt string) (*http.Response, error) { 30187 reqHeaders := make(http.Header) 30188 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 30189 for k, v := range c.header_ { 30190 reqHeaders[k] = v 30191 } 30192 reqHeaders.Set("User-Agent", c.s.userAgent()) 30193 if c.ifNoneMatch_ != "" { 30194 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 30195 } 30196 var body io.Reader = nil 30197 c.urlParams_.Set("alt", alt) 30198 c.urlParams_.Set("prettyPrint", "false") 30199 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}") 30200 urls += "?" + c.urlParams_.Encode() 30201 req, err := http.NewRequest("GET", urls, body) 30202 if err != nil { 30203 return nil, err 30204 } 30205 req.Header = reqHeaders 30206 googleapi.Expand(req.URL, map[string]string{ 30207 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 30208 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 30209 }) 30210 return gensupport.SendRequest(c.ctx_, c.s.client, req) 30211 } 30212 30213 // Do executes the "displayvideo.advertisers.negativeKeywordLists.get" call. 30214 // Exactly one of *NegativeKeywordList or error will be non-nil. Any 30215 // non-2xx status code is an error. Response headers are in either 30216 // *NegativeKeywordList.ServerResponse.Header or (if a response was 30217 // returned at all) in error.(*googleapi.Error).Header. Use 30218 // googleapi.IsNotModified to check whether the returned error was 30219 // because http.StatusNotModified was returned. 30220 func (c *AdvertisersNegativeKeywordListsGetCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) { 30221 gensupport.SetOptions(c.urlParams_, opts...) 30222 res, err := c.doRequest("json") 30223 if res != nil && res.StatusCode == http.StatusNotModified { 30224 if res.Body != nil { 30225 res.Body.Close() 30226 } 30227 return nil, gensupport.WrapError(&googleapi.Error{ 30228 Code: res.StatusCode, 30229 Header: res.Header, 30230 }) 30231 } 30232 if err != nil { 30233 return nil, err 30234 } 30235 defer googleapi.CloseBody(res) 30236 if err := googleapi.CheckResponse(res); err != nil { 30237 return nil, gensupport.WrapError(err) 30238 } 30239 ret := &NegativeKeywordList{ 30240 ServerResponse: googleapi.ServerResponse{ 30241 Header: res.Header, 30242 HTTPStatusCode: res.StatusCode, 30243 }, 30244 } 30245 target := &ret 30246 if err := gensupport.DecodeResponse(target, res); err != nil { 30247 return nil, err 30248 } 30249 return ret, nil 30250 // { 30251 // "description": "Gets a negative keyword list given an advertiser ID and a negative keyword list ID.", 30252 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists/{negativeKeywordListsId}", 30253 // "httpMethod": "GET", 30254 // "id": "displayvideo.advertisers.negativeKeywordLists.get", 30255 // "parameterOrder": [ 30256 // "advertiserId", 30257 // "negativeKeywordListId" 30258 // ], 30259 // "parameters": { 30260 // "advertiserId": { 30261 // "description": "Required. The ID of the DV360 advertiser to which the fetched negative keyword list belongs.", 30262 // "format": "int64", 30263 // "location": "path", 30264 // "pattern": "^[^/]+$", 30265 // "required": true, 30266 // "type": "string" 30267 // }, 30268 // "negativeKeywordListId": { 30269 // "description": "Required. The ID of the negative keyword list to fetch.", 30270 // "format": "int64", 30271 // "location": "path", 30272 // "pattern": "^[^/]+$", 30273 // "required": true, 30274 // "type": "string" 30275 // } 30276 // }, 30277 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}", 30278 // "response": { 30279 // "$ref": "NegativeKeywordList" 30280 // }, 30281 // "scopes": [ 30282 // "https://www.googleapis.com/auth/display-video" 30283 // ] 30284 // } 30285 30286 } 30287 30288 // method id "displayvideo.advertisers.negativeKeywordLists.list": 30289 30290 type AdvertisersNegativeKeywordListsListCall struct { 30291 s *Service 30292 advertiserId int64 30293 urlParams_ gensupport.URLParams 30294 ifNoneMatch_ string 30295 ctx_ context.Context 30296 header_ http.Header 30297 } 30298 30299 // List: Lists negative keyword lists based on a given advertiser id. 30300 // 30301 // - advertiserId: The ID of the DV360 advertiser to which the fetched 30302 // negative keyword lists belong. 30303 func (r *AdvertisersNegativeKeywordListsService) List(advertiserId int64) *AdvertisersNegativeKeywordListsListCall { 30304 c := &AdvertisersNegativeKeywordListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 30305 c.advertiserId = advertiserId 30306 return c 30307 } 30308 30309 // PageSize sets the optional parameter "pageSize": Requested page size. 30310 // Must be between `1` and `200`. Defaults to `100` if not set. Returns 30311 // error code `INVALID_ARGUMENT` if an invalid value is specified. 30312 func (c *AdvertisersNegativeKeywordListsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsListCall { 30313 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 30314 return c 30315 } 30316 30317 // PageToken sets the optional parameter "pageToken": A token 30318 // identifying a page of results the server should return. Typically, 30319 // this is the value of next_page_token returned from the previous call 30320 // to `ListNegativeKeywordLists` method. If not specified, the first 30321 // page of results will be returned. 30322 func (c *AdvertisersNegativeKeywordListsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsListCall { 30323 c.urlParams_.Set("pageToken", pageToken) 30324 return c 30325 } 30326 30327 // Fields allows partial responses to be retrieved. See 30328 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 30329 // for more information. 30330 func (c *AdvertisersNegativeKeywordListsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsListCall { 30331 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 30332 return c 30333 } 30334 30335 // IfNoneMatch sets the optional parameter which makes the operation 30336 // fail if the object's ETag matches the given value. This is useful for 30337 // getting updates only after the object has changed since the last 30338 // request. Use googleapi.IsNotModified to check whether the response 30339 // error from Do is the result of In-None-Match. 30340 func (c *AdvertisersNegativeKeywordListsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsListCall { 30341 c.ifNoneMatch_ = entityTag 30342 return c 30343 } 30344 30345 // Context sets the context to be used in this call's Do method. Any 30346 // pending HTTP request will be aborted if the provided context is 30347 // canceled. 30348 func (c *AdvertisersNegativeKeywordListsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsListCall { 30349 c.ctx_ = ctx 30350 return c 30351 } 30352 30353 // Header returns an http.Header that can be modified by the caller to 30354 // add HTTP headers to the request. 30355 func (c *AdvertisersNegativeKeywordListsListCall) Header() http.Header { 30356 if c.header_ == nil { 30357 c.header_ = make(http.Header) 30358 } 30359 return c.header_ 30360 } 30361 30362 func (c *AdvertisersNegativeKeywordListsListCall) doRequest(alt string) (*http.Response, error) { 30363 reqHeaders := make(http.Header) 30364 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 30365 for k, v := range c.header_ { 30366 reqHeaders[k] = v 30367 } 30368 reqHeaders.Set("User-Agent", c.s.userAgent()) 30369 if c.ifNoneMatch_ != "" { 30370 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 30371 } 30372 var body io.Reader = nil 30373 c.urlParams_.Set("alt", alt) 30374 c.urlParams_.Set("prettyPrint", "false") 30375 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists") 30376 urls += "?" + c.urlParams_.Encode() 30377 req, err := http.NewRequest("GET", urls, body) 30378 if err != nil { 30379 return nil, err 30380 } 30381 req.Header = reqHeaders 30382 googleapi.Expand(req.URL, map[string]string{ 30383 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 30384 }) 30385 return gensupport.SendRequest(c.ctx_, c.s.client, req) 30386 } 30387 30388 // Do executes the "displayvideo.advertisers.negativeKeywordLists.list" call. 30389 // Exactly one of *ListNegativeKeywordListsResponse or error will be 30390 // non-nil. Any non-2xx status code is an error. Response headers are in 30391 // either *ListNegativeKeywordListsResponse.ServerResponse.Header or (if 30392 // a response was returned at all) in error.(*googleapi.Error).Header. 30393 // Use googleapi.IsNotModified to check whether the returned error was 30394 // because http.StatusNotModified was returned. 30395 func (c *AdvertisersNegativeKeywordListsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordListsResponse, error) { 30396 gensupport.SetOptions(c.urlParams_, opts...) 30397 res, err := c.doRequest("json") 30398 if res != nil && res.StatusCode == http.StatusNotModified { 30399 if res.Body != nil { 30400 res.Body.Close() 30401 } 30402 return nil, gensupport.WrapError(&googleapi.Error{ 30403 Code: res.StatusCode, 30404 Header: res.Header, 30405 }) 30406 } 30407 if err != nil { 30408 return nil, err 30409 } 30410 defer googleapi.CloseBody(res) 30411 if err := googleapi.CheckResponse(res); err != nil { 30412 return nil, gensupport.WrapError(err) 30413 } 30414 ret := &ListNegativeKeywordListsResponse{ 30415 ServerResponse: googleapi.ServerResponse{ 30416 Header: res.Header, 30417 HTTPStatusCode: res.StatusCode, 30418 }, 30419 } 30420 target := &ret 30421 if err := gensupport.DecodeResponse(target, res); err != nil { 30422 return nil, err 30423 } 30424 return ret, nil 30425 // { 30426 // "description": "Lists negative keyword lists based on a given advertiser id.", 30427 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists", 30428 // "httpMethod": "GET", 30429 // "id": "displayvideo.advertisers.negativeKeywordLists.list", 30430 // "parameterOrder": [ 30431 // "advertiserId" 30432 // ], 30433 // "parameters": { 30434 // "advertiserId": { 30435 // "description": "Required. The ID of the DV360 advertiser to which the fetched negative keyword lists belong.", 30436 // "format": "int64", 30437 // "location": "path", 30438 // "pattern": "^[^/]+$", 30439 // "required": true, 30440 // "type": "string" 30441 // }, 30442 // "pageSize": { 30443 // "description": "Requested page size. Must be between `1` and `200`. Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 30444 // "format": "int32", 30445 // "location": "query", 30446 // "type": "integer" 30447 // }, 30448 // "pageToken": { 30449 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListNegativeKeywordLists` method. If not specified, the first page of results will be returned.", 30450 // "location": "query", 30451 // "type": "string" 30452 // } 30453 // }, 30454 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists", 30455 // "response": { 30456 // "$ref": "ListNegativeKeywordListsResponse" 30457 // }, 30458 // "scopes": [ 30459 // "https://www.googleapis.com/auth/display-video" 30460 // ] 30461 // } 30462 30463 } 30464 30465 // Pages invokes f for each page of results. 30466 // A non-nil error returned from f will halt the iteration. 30467 // The provided context supersedes any context provided to the Context method. 30468 func (c *AdvertisersNegativeKeywordListsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordListsResponse) error) error { 30469 c.ctx_ = ctx 30470 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 30471 for { 30472 x, err := c.Do() 30473 if err != nil { 30474 return err 30475 } 30476 if err := f(x); err != nil { 30477 return err 30478 } 30479 if x.NextPageToken == "" { 30480 return nil 30481 } 30482 c.PageToken(x.NextPageToken) 30483 } 30484 } 30485 30486 // method id "displayvideo.advertisers.negativeKeywordLists.patch": 30487 30488 type AdvertisersNegativeKeywordListsPatchCall struct { 30489 s *Service 30490 advertiserId int64 30491 negativeKeywordListId int64 30492 negativekeywordlist *NegativeKeywordList 30493 urlParams_ gensupport.URLParams 30494 ctx_ context.Context 30495 header_ http.Header 30496 } 30497 30498 // Patch: Updates a negative keyword list. Returns the updated negative 30499 // keyword list if successful. 30500 // 30501 // - advertiserId: The ID of the DV360 advertiser to which the negative 30502 // keyword list belongs. 30503 // - negativeKeywordListId: Output only. The unique ID of the negative 30504 // keyword list. Assigned by the system. 30505 func (r *AdvertisersNegativeKeywordListsService) Patch(advertiserId int64, negativeKeywordListId int64, negativekeywordlist *NegativeKeywordList) *AdvertisersNegativeKeywordListsPatchCall { 30506 c := &AdvertisersNegativeKeywordListsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 30507 c.advertiserId = advertiserId 30508 c.negativeKeywordListId = negativeKeywordListId 30509 c.negativekeywordlist = negativekeywordlist 30510 return c 30511 } 30512 30513 // UpdateMask sets the optional parameter "updateMask": Required. The 30514 // mask to control which fields to update. 30515 func (c *AdvertisersNegativeKeywordListsPatchCall) UpdateMask(updateMask string) *AdvertisersNegativeKeywordListsPatchCall { 30516 c.urlParams_.Set("updateMask", updateMask) 30517 return c 30518 } 30519 30520 // Fields allows partial responses to be retrieved. See 30521 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 30522 // for more information. 30523 func (c *AdvertisersNegativeKeywordListsPatchCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsPatchCall { 30524 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 30525 return c 30526 } 30527 30528 // Context sets the context to be used in this call's Do method. Any 30529 // pending HTTP request will be aborted if the provided context is 30530 // canceled. 30531 func (c *AdvertisersNegativeKeywordListsPatchCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsPatchCall { 30532 c.ctx_ = ctx 30533 return c 30534 } 30535 30536 // Header returns an http.Header that can be modified by the caller to 30537 // add HTTP headers to the request. 30538 func (c *AdvertisersNegativeKeywordListsPatchCall) Header() http.Header { 30539 if c.header_ == nil { 30540 c.header_ = make(http.Header) 30541 } 30542 return c.header_ 30543 } 30544 30545 func (c *AdvertisersNegativeKeywordListsPatchCall) doRequest(alt string) (*http.Response, error) { 30546 reqHeaders := make(http.Header) 30547 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 30548 for k, v := range c.header_ { 30549 reqHeaders[k] = v 30550 } 30551 reqHeaders.Set("User-Agent", c.s.userAgent()) 30552 var body io.Reader = nil 30553 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeywordlist) 30554 if err != nil { 30555 return nil, err 30556 } 30557 reqHeaders.Set("Content-Type", "application/json") 30558 c.urlParams_.Set("alt", alt) 30559 c.urlParams_.Set("prettyPrint", "false") 30560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists/{negativeKeywordListId}") 30561 urls += "?" + c.urlParams_.Encode() 30562 req, err := http.NewRequest("PATCH", urls, body) 30563 if err != nil { 30564 return nil, err 30565 } 30566 req.Header = reqHeaders 30567 googleapi.Expand(req.URL, map[string]string{ 30568 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 30569 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 30570 }) 30571 return gensupport.SendRequest(c.ctx_, c.s.client, req) 30572 } 30573 30574 // Do executes the "displayvideo.advertisers.negativeKeywordLists.patch" call. 30575 // Exactly one of *NegativeKeywordList or error will be non-nil. Any 30576 // non-2xx status code is an error. Response headers are in either 30577 // *NegativeKeywordList.ServerResponse.Header or (if a response was 30578 // returned at all) in error.(*googleapi.Error).Header. Use 30579 // googleapi.IsNotModified to check whether the returned error was 30580 // because http.StatusNotModified was returned. 30581 func (c *AdvertisersNegativeKeywordListsPatchCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) { 30582 gensupport.SetOptions(c.urlParams_, opts...) 30583 res, err := c.doRequest("json") 30584 if res != nil && res.StatusCode == http.StatusNotModified { 30585 if res.Body != nil { 30586 res.Body.Close() 30587 } 30588 return nil, gensupport.WrapError(&googleapi.Error{ 30589 Code: res.StatusCode, 30590 Header: res.Header, 30591 }) 30592 } 30593 if err != nil { 30594 return nil, err 30595 } 30596 defer googleapi.CloseBody(res) 30597 if err := googleapi.CheckResponse(res); err != nil { 30598 return nil, gensupport.WrapError(err) 30599 } 30600 ret := &NegativeKeywordList{ 30601 ServerResponse: googleapi.ServerResponse{ 30602 Header: res.Header, 30603 HTTPStatusCode: res.StatusCode, 30604 }, 30605 } 30606 target := &ret 30607 if err := gensupport.DecodeResponse(target, res); err != nil { 30608 return nil, err 30609 } 30610 return ret, nil 30611 // { 30612 // "description": "Updates a negative keyword list. Returns the updated negative keyword list if successful.", 30613 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists/{negativeKeywordListId}", 30614 // "httpMethod": "PATCH", 30615 // "id": "displayvideo.advertisers.negativeKeywordLists.patch", 30616 // "parameterOrder": [ 30617 // "advertiserId", 30618 // "negativeKeywordListId" 30619 // ], 30620 // "parameters": { 30621 // "advertiserId": { 30622 // "description": "Required. The ID of the DV360 advertiser to which the negative keyword list belongs.", 30623 // "format": "int64", 30624 // "location": "path", 30625 // "pattern": "^[^/]+$", 30626 // "required": true, 30627 // "type": "string" 30628 // }, 30629 // "negativeKeywordListId": { 30630 // "description": "Output only. The unique ID of the negative keyword list. Assigned by the system.", 30631 // "format": "int64", 30632 // "location": "path", 30633 // "required": true, 30634 // "type": "string" 30635 // }, 30636 // "updateMask": { 30637 // "description": "Required. The mask to control which fields to update.", 30638 // "format": "google-fieldmask", 30639 // "location": "query", 30640 // "type": "string" 30641 // } 30642 // }, 30643 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists/{negativeKeywordListId}", 30644 // "request": { 30645 // "$ref": "NegativeKeywordList" 30646 // }, 30647 // "response": { 30648 // "$ref": "NegativeKeywordList" 30649 // }, 30650 // "scopes": [ 30651 // "https://www.googleapis.com/auth/display-video" 30652 // ] 30653 // } 30654 30655 } 30656 30657 // method id "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.bulkEdit": 30658 30659 type AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall struct { 30660 s *Service 30661 advertiserId int64 30662 negativeKeywordListId int64 30663 bulkeditnegativekeywordsrequest *BulkEditNegativeKeywordsRequest 30664 urlParams_ gensupport.URLParams 30665 ctx_ context.Context 30666 header_ http.Header 30667 } 30668 30669 // BulkEdit: Bulk edits negative keywords in a single negative keyword 30670 // list. The operation will delete the negative keywords provided in 30671 // BulkEditNegativeKeywordsRequest.deleted_negative_keywords and then 30672 // create the negative keywords provided in 30673 // BulkEditNegativeKeywordsRequest.created_negative_keywords. This 30674 // operation is guaranteed to be atomic and will never result in a 30675 // partial success or partial failure. 30676 // 30677 // - advertiserId: The ID of the DV360 advertiser to which the parent 30678 // negative keyword list belongs. 30679 // - negativeKeywordListId: The ID of the parent negative keyword list 30680 // to which the negative keywords belong. 30681 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) BulkEdit(advertiserId int64, negativeKeywordListId int64, bulkeditnegativekeywordsrequest *BulkEditNegativeKeywordsRequest) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall { 30682 c := &AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 30683 c.advertiserId = advertiserId 30684 c.negativeKeywordListId = negativeKeywordListId 30685 c.bulkeditnegativekeywordsrequest = bulkeditnegativekeywordsrequest 30686 return c 30687 } 30688 30689 // Fields allows partial responses to be retrieved. See 30690 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 30691 // for more information. 30692 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall { 30693 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 30694 return c 30695 } 30696 30697 // Context sets the context to be used in this call's Do method. Any 30698 // pending HTTP request will be aborted if the provided context is 30699 // canceled. 30700 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall { 30701 c.ctx_ = ctx 30702 return c 30703 } 30704 30705 // Header returns an http.Header that can be modified by the caller to 30706 // add HTTP headers to the request. 30707 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Header() http.Header { 30708 if c.header_ == nil { 30709 c.header_ = make(http.Header) 30710 } 30711 return c.header_ 30712 } 30713 30714 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) doRequest(alt string) (*http.Response, error) { 30715 reqHeaders := make(http.Header) 30716 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 30717 for k, v := range c.header_ { 30718 reqHeaders[k] = v 30719 } 30720 reqHeaders.Set("User-Agent", c.s.userAgent()) 30721 var body io.Reader = nil 30722 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditnegativekeywordsrequest) 30723 if err != nil { 30724 return nil, err 30725 } 30726 reqHeaders.Set("Content-Type", "application/json") 30727 c.urlParams_.Set("alt", alt) 30728 c.urlParams_.Set("prettyPrint", "false") 30729 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:bulkEdit") 30730 urls += "?" + c.urlParams_.Encode() 30731 req, err := http.NewRequest("POST", urls, body) 30732 if err != nil { 30733 return nil, err 30734 } 30735 req.Header = reqHeaders 30736 googleapi.Expand(req.URL, map[string]string{ 30737 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 30738 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 30739 }) 30740 return gensupport.SendRequest(c.ctx_, c.s.client, req) 30741 } 30742 30743 // Do executes the "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.bulkEdit" call. 30744 // Exactly one of *BulkEditNegativeKeywordsResponse or error will be 30745 // non-nil. Any non-2xx status code is an error. Response headers are in 30746 // either *BulkEditNegativeKeywordsResponse.ServerResponse.Header or (if 30747 // a response was returned at all) in error.(*googleapi.Error).Header. 30748 // Use googleapi.IsNotModified to check whether the returned error was 30749 // because http.StatusNotModified was returned. 30750 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditNegativeKeywordsResponse, error) { 30751 gensupport.SetOptions(c.urlParams_, opts...) 30752 res, err := c.doRequest("json") 30753 if res != nil && res.StatusCode == http.StatusNotModified { 30754 if res.Body != nil { 30755 res.Body.Close() 30756 } 30757 return nil, gensupport.WrapError(&googleapi.Error{ 30758 Code: res.StatusCode, 30759 Header: res.Header, 30760 }) 30761 } 30762 if err != nil { 30763 return nil, err 30764 } 30765 defer googleapi.CloseBody(res) 30766 if err := googleapi.CheckResponse(res); err != nil { 30767 return nil, gensupport.WrapError(err) 30768 } 30769 ret := &BulkEditNegativeKeywordsResponse{ 30770 ServerResponse: googleapi.ServerResponse{ 30771 Header: res.Header, 30772 HTTPStatusCode: res.StatusCode, 30773 }, 30774 } 30775 target := &ret 30776 if err := gensupport.DecodeResponse(target, res); err != nil { 30777 return nil, err 30778 } 30779 return ret, nil 30780 // { 30781 // "description": "Bulk edits negative keywords in a single negative keyword list. The operation will delete the negative keywords provided in BulkEditNegativeKeywordsRequest.deleted_negative_keywords and then create the negative keywords provided in BulkEditNegativeKeywordsRequest.created_negative_keywords. This operation is guaranteed to be atomic and will never result in a partial success or partial failure.", 30782 // "flatPath": "v1/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListsId}/negativeKeywords:bulkEdit", 30783 // "httpMethod": "POST", 30784 // "id": "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.bulkEdit", 30785 // "parameterOrder": [ 30786 // "advertiserId", 30787 // "negativeKeywordListId" 30788 // ], 30789 // "parameters": { 30790 // "advertiserId": { 30791 // "description": "Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs.", 30792 // "format": "int64", 30793 // "location": "path", 30794 // "required": true, 30795 // "type": "string" 30796 // }, 30797 // "negativeKeywordListId": { 30798 // "description": "Required. The ID of the parent negative keyword list to which the negative keywords belong.", 30799 // "format": "int64", 30800 // "location": "path", 30801 // "pattern": "^[^/]+$", 30802 // "required": true, 30803 // "type": "string" 30804 // } 30805 // }, 30806 // "path": "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:bulkEdit", 30807 // "request": { 30808 // "$ref": "BulkEditNegativeKeywordsRequest" 30809 // }, 30810 // "response": { 30811 // "$ref": "BulkEditNegativeKeywordsResponse" 30812 // }, 30813 // "scopes": [ 30814 // "https://www.googleapis.com/auth/display-video" 30815 // ] 30816 // } 30817 30818 } 30819 30820 // method id "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.create": 30821 30822 type AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall struct { 30823 s *Service 30824 advertiserId int64 30825 negativeKeywordListId int64 30826 negativekeyword *NegativeKeyword 30827 urlParams_ gensupport.URLParams 30828 ctx_ context.Context 30829 header_ http.Header 30830 } 30831 30832 // Create: Creates a negative keyword in a negative keyword list. 30833 // 30834 // - advertiserId: The ID of the DV360 advertiser to which the parent 30835 // negative keyword list belongs. 30836 // - negativeKeywordListId: The ID of the parent negative keyword list 30837 // in which the negative keyword will be created. 30838 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Create(advertiserId int64, negativeKeywordListId int64, negativekeyword *NegativeKeyword) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall { 30839 c := &AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 30840 c.advertiserId = advertiserId 30841 c.negativeKeywordListId = negativeKeywordListId 30842 c.negativekeyword = negativekeyword 30843 return c 30844 } 30845 30846 // Fields allows partial responses to be retrieved. See 30847 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 30848 // for more information. 30849 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall { 30850 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 30851 return c 30852 } 30853 30854 // Context sets the context to be used in this call's Do method. Any 30855 // pending HTTP request will be aborted if the provided context is 30856 // canceled. 30857 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall { 30858 c.ctx_ = ctx 30859 return c 30860 } 30861 30862 // Header returns an http.Header that can be modified by the caller to 30863 // add HTTP headers to the request. 30864 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Header() http.Header { 30865 if c.header_ == nil { 30866 c.header_ = make(http.Header) 30867 } 30868 return c.header_ 30869 } 30870 30871 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) doRequest(alt string) (*http.Response, error) { 30872 reqHeaders := make(http.Header) 30873 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 30874 for k, v := range c.header_ { 30875 reqHeaders[k] = v 30876 } 30877 reqHeaders.Set("User-Agent", c.s.userAgent()) 30878 var body io.Reader = nil 30879 body, err := googleapi.WithoutDataWrapper.JSONReader(c.negativekeyword) 30880 if err != nil { 30881 return nil, err 30882 } 30883 reqHeaders.Set("Content-Type", "application/json") 30884 c.urlParams_.Set("alt", alt) 30885 c.urlParams_.Set("prettyPrint", "false") 30886 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords") 30887 urls += "?" + c.urlParams_.Encode() 30888 req, err := http.NewRequest("POST", urls, body) 30889 if err != nil { 30890 return nil, err 30891 } 30892 req.Header = reqHeaders 30893 googleapi.Expand(req.URL, map[string]string{ 30894 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 30895 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 30896 }) 30897 return gensupport.SendRequest(c.ctx_, c.s.client, req) 30898 } 30899 30900 // Do executes the "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.create" call. 30901 // Exactly one of *NegativeKeyword or error will be non-nil. Any non-2xx 30902 // status code is an error. Response headers are in either 30903 // *NegativeKeyword.ServerResponse.Header or (if a response was returned 30904 // at all) in error.(*googleapi.Error).Header. Use 30905 // googleapi.IsNotModified to check whether the returned error was 30906 // because http.StatusNotModified was returned. 30907 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsCreateCall) Do(opts ...googleapi.CallOption) (*NegativeKeyword, error) { 30908 gensupport.SetOptions(c.urlParams_, opts...) 30909 res, err := c.doRequest("json") 30910 if res != nil && res.StatusCode == http.StatusNotModified { 30911 if res.Body != nil { 30912 res.Body.Close() 30913 } 30914 return nil, gensupport.WrapError(&googleapi.Error{ 30915 Code: res.StatusCode, 30916 Header: res.Header, 30917 }) 30918 } 30919 if err != nil { 30920 return nil, err 30921 } 30922 defer googleapi.CloseBody(res) 30923 if err := googleapi.CheckResponse(res); err != nil { 30924 return nil, gensupport.WrapError(err) 30925 } 30926 ret := &NegativeKeyword{ 30927 ServerResponse: googleapi.ServerResponse{ 30928 Header: res.Header, 30929 HTTPStatusCode: res.StatusCode, 30930 }, 30931 } 30932 target := &ret 30933 if err := gensupport.DecodeResponse(target, res); err != nil { 30934 return nil, err 30935 } 30936 return ret, nil 30937 // { 30938 // "description": "Creates a negative keyword in a negative keyword list.", 30939 // "flatPath": "v1/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListsId}/negativeKeywords", 30940 // "httpMethod": "POST", 30941 // "id": "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.create", 30942 // "parameterOrder": [ 30943 // "advertiserId", 30944 // "negativeKeywordListId" 30945 // ], 30946 // "parameters": { 30947 // "advertiserId": { 30948 // "description": "Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs.", 30949 // "format": "int64", 30950 // "location": "path", 30951 // "required": true, 30952 // "type": "string" 30953 // }, 30954 // "negativeKeywordListId": { 30955 // "description": "Required. The ID of the parent negative keyword list in which the negative keyword will be created.", 30956 // "format": "int64", 30957 // "location": "path", 30958 // "pattern": "^[^/]+$", 30959 // "required": true, 30960 // "type": "string" 30961 // } 30962 // }, 30963 // "path": "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords", 30964 // "request": { 30965 // "$ref": "NegativeKeyword" 30966 // }, 30967 // "response": { 30968 // "$ref": "NegativeKeyword" 30969 // }, 30970 // "scopes": [ 30971 // "https://www.googleapis.com/auth/display-video" 30972 // ] 30973 // } 30974 30975 } 30976 30977 // method id "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.delete": 30978 30979 type AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall struct { 30980 s *Service 30981 advertiserId int64 30982 negativeKeywordListId int64 30983 keywordValue string 30984 urlParams_ gensupport.URLParams 30985 ctx_ context.Context 30986 header_ http.Header 30987 } 30988 30989 // Delete: Deletes a negative keyword from a negative keyword list. 30990 // 30991 // - advertiserId: The ID of the DV360 advertiser to which the parent 30992 // negative keyword list belongs. 30993 // - keywordValue: The keyword value of the negative keyword to delete. 30994 // - negativeKeywordListId: The ID of the parent negative keyword list 30995 // to which the negative keyword belongs. 30996 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Delete(advertiserId int64, negativeKeywordListId int64, keywordValue string) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall { 30997 c := &AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 30998 c.advertiserId = advertiserId 30999 c.negativeKeywordListId = negativeKeywordListId 31000 c.keywordValue = keywordValue 31001 return c 31002 } 31003 31004 // Fields allows partial responses to be retrieved. See 31005 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 31006 // for more information. 31007 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall { 31008 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 31009 return c 31010 } 31011 31012 // Context sets the context to be used in this call's Do method. Any 31013 // pending HTTP request will be aborted if the provided context is 31014 // canceled. 31015 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall { 31016 c.ctx_ = ctx 31017 return c 31018 } 31019 31020 // Header returns an http.Header that can be modified by the caller to 31021 // add HTTP headers to the request. 31022 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Header() http.Header { 31023 if c.header_ == nil { 31024 c.header_ = make(http.Header) 31025 } 31026 return c.header_ 31027 } 31028 31029 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) doRequest(alt string) (*http.Response, error) { 31030 reqHeaders := make(http.Header) 31031 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 31032 for k, v := range c.header_ { 31033 reqHeaders[k] = v 31034 } 31035 reqHeaders.Set("User-Agent", c.s.userAgent()) 31036 var body io.Reader = nil 31037 c.urlParams_.Set("alt", alt) 31038 c.urlParams_.Set("prettyPrint", "false") 31039 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords/{+keywordValue}") 31040 urls += "?" + c.urlParams_.Encode() 31041 req, err := http.NewRequest("DELETE", urls, body) 31042 if err != nil { 31043 return nil, err 31044 } 31045 req.Header = reqHeaders 31046 googleapi.Expand(req.URL, map[string]string{ 31047 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 31048 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 31049 "keywordValue": c.keywordValue, 31050 }) 31051 return gensupport.SendRequest(c.ctx_, c.s.client, req) 31052 } 31053 31054 // Do executes the "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.delete" call. 31055 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 31056 // code is an error. Response headers are in either 31057 // *Empty.ServerResponse.Header or (if a response was returned at all) 31058 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 31059 // check whether the returned error was because http.StatusNotModified 31060 // was returned. 31061 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 31062 gensupport.SetOptions(c.urlParams_, opts...) 31063 res, err := c.doRequest("json") 31064 if res != nil && res.StatusCode == http.StatusNotModified { 31065 if res.Body != nil { 31066 res.Body.Close() 31067 } 31068 return nil, gensupport.WrapError(&googleapi.Error{ 31069 Code: res.StatusCode, 31070 Header: res.Header, 31071 }) 31072 } 31073 if err != nil { 31074 return nil, err 31075 } 31076 defer googleapi.CloseBody(res) 31077 if err := googleapi.CheckResponse(res); err != nil { 31078 return nil, gensupport.WrapError(err) 31079 } 31080 ret := &Empty{ 31081 ServerResponse: googleapi.ServerResponse{ 31082 Header: res.Header, 31083 HTTPStatusCode: res.StatusCode, 31084 }, 31085 } 31086 target := &ret 31087 if err := gensupport.DecodeResponse(target, res); err != nil { 31088 return nil, err 31089 } 31090 return ret, nil 31091 // { 31092 // "description": "Deletes a negative keyword from a negative keyword list.", 31093 // "flatPath": "v1/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListsId}/negativeKeywords/{negativeKeywordsId}", 31094 // "httpMethod": "DELETE", 31095 // "id": "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.delete", 31096 // "parameterOrder": [ 31097 // "advertiserId", 31098 // "negativeKeywordListId", 31099 // "keywordValue" 31100 // ], 31101 // "parameters": { 31102 // "advertiserId": { 31103 // "description": "Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs.", 31104 // "format": "int64", 31105 // "location": "path", 31106 // "required": true, 31107 // "type": "string" 31108 // }, 31109 // "keywordValue": { 31110 // "description": "Required. The keyword value of the negative keyword to delete.", 31111 // "location": "path", 31112 // "pattern": "^[^/]+$", 31113 // "required": true, 31114 // "type": "string" 31115 // }, 31116 // "negativeKeywordListId": { 31117 // "description": "Required. The ID of the parent negative keyword list to which the negative keyword belongs.", 31118 // "format": "int64", 31119 // "location": "path", 31120 // "pattern": "^[^/]+$", 31121 // "required": true, 31122 // "type": "string" 31123 // } 31124 // }, 31125 // "path": "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords/{+keywordValue}", 31126 // "response": { 31127 // "$ref": "Empty" 31128 // }, 31129 // "scopes": [ 31130 // "https://www.googleapis.com/auth/display-video" 31131 // ] 31132 // } 31133 31134 } 31135 31136 // method id "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.list": 31137 31138 type AdvertisersNegativeKeywordListsNegativeKeywordsListCall struct { 31139 s *Service 31140 advertiserId int64 31141 negativeKeywordListId int64 31142 urlParams_ gensupport.URLParams 31143 ifNoneMatch_ string 31144 ctx_ context.Context 31145 header_ http.Header 31146 } 31147 31148 // List: Lists negative keywords in a negative keyword list. 31149 // 31150 // - advertiserId: The ID of the DV360 advertiser to which the parent 31151 // negative keyword list belongs. 31152 // - negativeKeywordListId: The ID of the parent negative keyword list 31153 // to which the requested negative keywords belong. 31154 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) List(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31155 c := &AdvertisersNegativeKeywordListsNegativeKeywordsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 31156 c.advertiserId = advertiserId 31157 c.negativeKeywordListId = negativeKeywordListId 31158 return c 31159 } 31160 31161 // Filter sets the optional parameter "filter": Allows filtering by 31162 // negative keyword fields. Supported syntax: * Filter expressions for 31163 // negative keywords can only contain at most one restriction. * A 31164 // restriction has the form of `{field} {operator} {value}`. * All 31165 // fields must use the `HAS (:)` operator. Supported fields: * 31166 // `keywordValue` Examples: * All negative keywords for which the 31167 // keyword value contains "google": `keywordValue : "google" The length 31168 // of this field should be no more than 500 characters. Reference our 31169 // filter `LIST` requests (/display-video/api/guides/how-tos/filters) 31170 // guide for more information. 31171 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Filter(filter string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31172 c.urlParams_.Set("filter", filter) 31173 return c 31174 } 31175 31176 // OrderBy sets the optional parameter "orderBy": Field by which to sort 31177 // the list. Acceptable values are: * `keywordValue` (default) The 31178 // default sorting order is ascending. To specify descending order for a 31179 // field, a suffix " desc" should be added to the field name. Example: 31180 // `keywordValue desc`. 31181 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) OrderBy(orderBy string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31182 c.urlParams_.Set("orderBy", orderBy) 31183 return c 31184 } 31185 31186 // PageSize sets the optional parameter "pageSize": Requested page size. 31187 // Must be between `1` and `1000`. If unspecified will default to `100`. 31188 // Returns error code `INVALID_ARGUMENT` if an invalid value is 31189 // specified. 31190 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31191 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 31192 return c 31193 } 31194 31195 // PageToken sets the optional parameter "pageToken": A token 31196 // identifying a page of results the server should return. Typically, 31197 // this is the value of next_page_token returned from the previous call 31198 // to `ListNegativeKeywords` method. If not specified, the first page of 31199 // results will be returned. 31200 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31201 c.urlParams_.Set("pageToken", pageToken) 31202 return c 31203 } 31204 31205 // Fields allows partial responses to be retrieved. See 31206 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 31207 // for more information. 31208 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31209 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 31210 return c 31211 } 31212 31213 // IfNoneMatch sets the optional parameter which makes the operation 31214 // fail if the object's ETag matches the given value. This is useful for 31215 // getting updates only after the object has changed since the last 31216 // request. Use googleapi.IsNotModified to check whether the response 31217 // error from Do is the result of In-None-Match. 31218 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31219 c.ifNoneMatch_ = entityTag 31220 return c 31221 } 31222 31223 // Context sets the context to be used in this call's Do method. Any 31224 // pending HTTP request will be aborted if the provided context is 31225 // canceled. 31226 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsListCall { 31227 c.ctx_ = ctx 31228 return c 31229 } 31230 31231 // Header returns an http.Header that can be modified by the caller to 31232 // add HTTP headers to the request. 31233 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Header() http.Header { 31234 if c.header_ == nil { 31235 c.header_ = make(http.Header) 31236 } 31237 return c.header_ 31238 } 31239 31240 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) doRequest(alt string) (*http.Response, error) { 31241 reqHeaders := make(http.Header) 31242 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 31243 for k, v := range c.header_ { 31244 reqHeaders[k] = v 31245 } 31246 reqHeaders.Set("User-Agent", c.s.userAgent()) 31247 if c.ifNoneMatch_ != "" { 31248 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 31249 } 31250 var body io.Reader = nil 31251 c.urlParams_.Set("alt", alt) 31252 c.urlParams_.Set("prettyPrint", "false") 31253 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords") 31254 urls += "?" + c.urlParams_.Encode() 31255 req, err := http.NewRequest("GET", urls, body) 31256 if err != nil { 31257 return nil, err 31258 } 31259 req.Header = reqHeaders 31260 googleapi.Expand(req.URL, map[string]string{ 31261 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 31262 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 31263 }) 31264 return gensupport.SendRequest(c.ctx_, c.s.client, req) 31265 } 31266 31267 // Do executes the "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.list" call. 31268 // Exactly one of *ListNegativeKeywordsResponse or error will be 31269 // non-nil. Any non-2xx status code is an error. Response headers are in 31270 // either *ListNegativeKeywordsResponse.ServerResponse.Header or (if a 31271 // response was returned at all) in error.(*googleapi.Error).Header. Use 31272 // googleapi.IsNotModified to check whether the returned error was 31273 // because http.StatusNotModified was returned. 31274 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordsResponse, error) { 31275 gensupport.SetOptions(c.urlParams_, opts...) 31276 res, err := c.doRequest("json") 31277 if res != nil && res.StatusCode == http.StatusNotModified { 31278 if res.Body != nil { 31279 res.Body.Close() 31280 } 31281 return nil, gensupport.WrapError(&googleapi.Error{ 31282 Code: res.StatusCode, 31283 Header: res.Header, 31284 }) 31285 } 31286 if err != nil { 31287 return nil, err 31288 } 31289 defer googleapi.CloseBody(res) 31290 if err := googleapi.CheckResponse(res); err != nil { 31291 return nil, gensupport.WrapError(err) 31292 } 31293 ret := &ListNegativeKeywordsResponse{ 31294 ServerResponse: googleapi.ServerResponse{ 31295 Header: res.Header, 31296 HTTPStatusCode: res.StatusCode, 31297 }, 31298 } 31299 target := &ret 31300 if err := gensupport.DecodeResponse(target, res); err != nil { 31301 return nil, err 31302 } 31303 return ret, nil 31304 // { 31305 // "description": "Lists negative keywords in a negative keyword list.", 31306 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists/{negativeKeywordListsId}/negativeKeywords", 31307 // "httpMethod": "GET", 31308 // "id": "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.list", 31309 // "parameterOrder": [ 31310 // "advertiserId", 31311 // "negativeKeywordListId" 31312 // ], 31313 // "parameters": { 31314 // "advertiserId": { 31315 // "description": "Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs.", 31316 // "format": "int64", 31317 // "location": "path", 31318 // "pattern": "^[^/]+$", 31319 // "required": true, 31320 // "type": "string" 31321 // }, 31322 // "filter": { 31323 // "description": "Allows filtering by negative keyword fields. Supported syntax: * Filter expressions for negative keywords can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `keywordValue` Examples: * All negative keywords for which the keyword value contains \"google\": `keywordValue : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 31324 // "location": "query", 31325 // "type": "string" 31326 // }, 31327 // "negativeKeywordListId": { 31328 // "description": "Required. The ID of the parent negative keyword list to which the requested negative keywords belong.", 31329 // "format": "int64", 31330 // "location": "path", 31331 // "pattern": "^[^/]+$", 31332 // "required": true, 31333 // "type": "string" 31334 // }, 31335 // "orderBy": { 31336 // "description": "Field by which to sort the list. Acceptable values are: * `keywordValue` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `keywordValue desc`.", 31337 // "location": "query", 31338 // "type": "string" 31339 // }, 31340 // "pageSize": { 31341 // "description": "Requested page size. Must be between `1` and `1000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 31342 // "format": "int32", 31343 // "location": "query", 31344 // "type": "integer" 31345 // }, 31346 // "pageToken": { 31347 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListNegativeKeywords` method. If not specified, the first page of results will be returned.", 31348 // "location": "query", 31349 // "type": "string" 31350 // } 31351 // }, 31352 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords", 31353 // "response": { 31354 // "$ref": "ListNegativeKeywordsResponse" 31355 // }, 31356 // "scopes": [ 31357 // "https://www.googleapis.com/auth/display-video" 31358 // ] 31359 // } 31360 31361 } 31362 31363 // Pages invokes f for each page of results. 31364 // A non-nil error returned from f will halt the iteration. 31365 // The provided context supersedes any context provided to the Context method. 31366 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordsResponse) error) error { 31367 c.ctx_ = ctx 31368 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 31369 for { 31370 x, err := c.Do() 31371 if err != nil { 31372 return err 31373 } 31374 if err := f(x); err != nil { 31375 return err 31376 } 31377 if x.NextPageToken == "" { 31378 return nil 31379 } 31380 c.PageToken(x.NextPageToken) 31381 } 31382 } 31383 31384 // method id "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.replace": 31385 31386 type AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall struct { 31387 s *Service 31388 advertiserId int64 31389 negativeKeywordListId int64 31390 replacenegativekeywordsrequest *ReplaceNegativeKeywordsRequest 31391 urlParams_ gensupport.URLParams 31392 ctx_ context.Context 31393 header_ http.Header 31394 } 31395 31396 // Replace: Replaces all negative keywords in a single negative keyword 31397 // list. The operation will replace the keywords in a negative keyword 31398 // list with keywords provided in 31399 // ReplaceNegativeKeywordsRequest.new_negative_keywords. 31400 // 31401 // - advertiserId: The ID of the DV360 advertiser to which the parent 31402 // negative keyword list belongs. 31403 // - negativeKeywordListId: The ID of the parent negative keyword list 31404 // to which the negative keywords belong. 31405 func (r *AdvertisersNegativeKeywordListsNegativeKeywordsService) Replace(advertiserId int64, negativeKeywordListId int64, replacenegativekeywordsrequest *ReplaceNegativeKeywordsRequest) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall { 31406 c := &AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 31407 c.advertiserId = advertiserId 31408 c.negativeKeywordListId = negativeKeywordListId 31409 c.replacenegativekeywordsrequest = replacenegativekeywordsrequest 31410 return c 31411 } 31412 31413 // Fields allows partial responses to be retrieved. See 31414 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 31415 // for more information. 31416 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall { 31417 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 31418 return c 31419 } 31420 31421 // Context sets the context to be used in this call's Do method. Any 31422 // pending HTTP request will be aborted if the provided context is 31423 // canceled. 31424 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall { 31425 c.ctx_ = ctx 31426 return c 31427 } 31428 31429 // Header returns an http.Header that can be modified by the caller to 31430 // add HTTP headers to the request. 31431 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Header() http.Header { 31432 if c.header_ == nil { 31433 c.header_ = make(http.Header) 31434 } 31435 return c.header_ 31436 } 31437 31438 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) doRequest(alt string) (*http.Response, error) { 31439 reqHeaders := make(http.Header) 31440 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 31441 for k, v := range c.header_ { 31442 reqHeaders[k] = v 31443 } 31444 reqHeaders.Set("User-Agent", c.s.userAgent()) 31445 var body io.Reader = nil 31446 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacenegativekeywordsrequest) 31447 if err != nil { 31448 return nil, err 31449 } 31450 reqHeaders.Set("Content-Type", "application/json") 31451 c.urlParams_.Set("alt", alt) 31452 c.urlParams_.Set("prettyPrint", "false") 31453 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace") 31454 urls += "?" + c.urlParams_.Encode() 31455 req, err := http.NewRequest("POST", urls, body) 31456 if err != nil { 31457 return nil, err 31458 } 31459 req.Header = reqHeaders 31460 googleapi.Expand(req.URL, map[string]string{ 31461 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 31462 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 31463 }) 31464 return gensupport.SendRequest(c.ctx_, c.s.client, req) 31465 } 31466 31467 // Do executes the "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.replace" call. 31468 // Exactly one of *ReplaceNegativeKeywordsResponse or error will be 31469 // non-nil. Any non-2xx status code is an error. Response headers are in 31470 // either *ReplaceNegativeKeywordsResponse.ServerResponse.Header or (if 31471 // a response was returned at all) in error.(*googleapi.Error).Header. 31472 // Use googleapi.IsNotModified to check whether the returned error was 31473 // because http.StatusNotModified was returned. 31474 func (c *AdvertisersNegativeKeywordListsNegativeKeywordsReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceNegativeKeywordsResponse, error) { 31475 gensupport.SetOptions(c.urlParams_, opts...) 31476 res, err := c.doRequest("json") 31477 if res != nil && res.StatusCode == http.StatusNotModified { 31478 if res.Body != nil { 31479 res.Body.Close() 31480 } 31481 return nil, gensupport.WrapError(&googleapi.Error{ 31482 Code: res.StatusCode, 31483 Header: res.Header, 31484 }) 31485 } 31486 if err != nil { 31487 return nil, err 31488 } 31489 defer googleapi.CloseBody(res) 31490 if err := googleapi.CheckResponse(res); err != nil { 31491 return nil, gensupport.WrapError(err) 31492 } 31493 ret := &ReplaceNegativeKeywordsResponse{ 31494 ServerResponse: googleapi.ServerResponse{ 31495 Header: res.Header, 31496 HTTPStatusCode: res.StatusCode, 31497 }, 31498 } 31499 target := &ret 31500 if err := gensupport.DecodeResponse(target, res); err != nil { 31501 return nil, err 31502 } 31503 return ret, nil 31504 // { 31505 // "description": "Replaces all negative keywords in a single negative keyword list. The operation will replace the keywords in a negative keyword list with keywords provided in ReplaceNegativeKeywordsRequest.new_negative_keywords.", 31506 // "flatPath": "v1/advertisers/{advertiserId}/negativeKeywordLists/{negativeKeywordListsId}/negativeKeywords:replace", 31507 // "httpMethod": "POST", 31508 // "id": "displayvideo.advertisers.negativeKeywordLists.negativeKeywords.replace", 31509 // "parameterOrder": [ 31510 // "advertiserId", 31511 // "negativeKeywordListId" 31512 // ], 31513 // "parameters": { 31514 // "advertiserId": { 31515 // "description": "Required. The ID of the DV360 advertiser to which the parent negative keyword list belongs.", 31516 // "format": "int64", 31517 // "location": "path", 31518 // "required": true, 31519 // "type": "string" 31520 // }, 31521 // "negativeKeywordListId": { 31522 // "description": "Required. The ID of the parent negative keyword list to which the negative keywords belong.", 31523 // "format": "int64", 31524 // "location": "path", 31525 // "pattern": "^[^/]+$", 31526 // "required": true, 31527 // "type": "string" 31528 // } 31529 // }, 31530 // "path": "v1/advertisers/{advertiserId}/negativeKeywordLists/{+negativeKeywordListId}/negativeKeywords:replace", 31531 // "request": { 31532 // "$ref": "ReplaceNegativeKeywordsRequest" 31533 // }, 31534 // "response": { 31535 // "$ref": "ReplaceNegativeKeywordsResponse" 31536 // }, 31537 // "scopes": [ 31538 // "https://www.googleapis.com/auth/display-video" 31539 // ] 31540 // } 31541 31542 } 31543 31544 // method id "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.create": 31545 31546 type AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall struct { 31547 s *Service 31548 advertiserId int64 31549 targetingType string 31550 assignedtargetingoption *AssignedTargetingOption 31551 urlParams_ gensupport.URLParams 31552 ctx_ context.Context 31553 header_ http.Header 31554 } 31555 31556 // Create: Assigns a targeting option to an advertiser. Returns the 31557 // assigned targeting option if successful. 31558 // 31559 // - advertiserId: The ID of the advertiser. 31560 // - targetingType: Identifies the type of this assigned targeting 31561 // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * 31562 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 31563 // `TARGETING_TYPE_OMID` * 31564 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 31565 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall { 31566 c := &AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 31567 c.advertiserId = advertiserId 31568 c.targetingType = targetingType 31569 c.assignedtargetingoption = assignedtargetingoption 31570 return c 31571 } 31572 31573 // Fields allows partial responses to be retrieved. See 31574 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 31575 // for more information. 31576 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall { 31577 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 31578 return c 31579 } 31580 31581 // Context sets the context to be used in this call's Do method. Any 31582 // pending HTTP request will be aborted if the provided context is 31583 // canceled. 31584 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall { 31585 c.ctx_ = ctx 31586 return c 31587 } 31588 31589 // Header returns an http.Header that can be modified by the caller to 31590 // add HTTP headers to the request. 31591 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { 31592 if c.header_ == nil { 31593 c.header_ = make(http.Header) 31594 } 31595 return c.header_ 31596 } 31597 31598 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { 31599 reqHeaders := make(http.Header) 31600 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 31601 for k, v := range c.header_ { 31602 reqHeaders[k] = v 31603 } 31604 reqHeaders.Set("User-Agent", c.s.userAgent()) 31605 var body io.Reader = nil 31606 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption) 31607 if err != nil { 31608 return nil, err 31609 } 31610 reqHeaders.Set("Content-Type", "application/json") 31611 c.urlParams_.Set("alt", alt) 31612 c.urlParams_.Set("prettyPrint", "false") 31613 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 31614 urls += "?" + c.urlParams_.Encode() 31615 req, err := http.NewRequest("POST", urls, body) 31616 if err != nil { 31617 return nil, err 31618 } 31619 req.Header = reqHeaders 31620 googleapi.Expand(req.URL, map[string]string{ 31621 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 31622 "targetingType": c.targetingType, 31623 }) 31624 return gensupport.SendRequest(c.ctx_, c.s.client, req) 31625 } 31626 31627 // Do executes the "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.create" call. 31628 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 31629 // non-2xx status code is an error. Response headers are in either 31630 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 31631 // returned at all) in error.(*googleapi.Error).Header. Use 31632 // googleapi.IsNotModified to check whether the returned error was 31633 // because http.StatusNotModified was returned. 31634 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 31635 gensupport.SetOptions(c.urlParams_, opts...) 31636 res, err := c.doRequest("json") 31637 if res != nil && res.StatusCode == http.StatusNotModified { 31638 if res.Body != nil { 31639 res.Body.Close() 31640 } 31641 return nil, gensupport.WrapError(&googleapi.Error{ 31642 Code: res.StatusCode, 31643 Header: res.Header, 31644 }) 31645 } 31646 if err != nil { 31647 return nil, err 31648 } 31649 defer googleapi.CloseBody(res) 31650 if err := googleapi.CheckResponse(res); err != nil { 31651 return nil, gensupport.WrapError(err) 31652 } 31653 ret := &AssignedTargetingOption{ 31654 ServerResponse: googleapi.ServerResponse{ 31655 Header: res.Header, 31656 HTTPStatusCode: res.StatusCode, 31657 }, 31658 } 31659 target := &ret 31660 if err := gensupport.DecodeResponse(target, res); err != nil { 31661 return nil, err 31662 } 31663 return ret, nil 31664 // { 31665 // "description": "Assigns a targeting option to an advertiser. Returns the assigned targeting option if successful.", 31666 // "flatPath": "v1/advertisers/{advertisersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 31667 // "httpMethod": "POST", 31668 // "id": "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.create", 31669 // "parameterOrder": [ 31670 // "advertiserId", 31671 // "targetingType" 31672 // ], 31673 // "parameters": { 31674 // "advertiserId": { 31675 // "description": "Required. The ID of the advertiser.", 31676 // "format": "int64", 31677 // "location": "path", 31678 // "pattern": "^[^/]+$", 31679 // "required": true, 31680 // "type": "string" 31681 // }, 31682 // "targetingType": { 31683 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", 31684 // "enum": [ 31685 // "TARGETING_TYPE_UNSPECIFIED", 31686 // "TARGETING_TYPE_CHANNEL", 31687 // "TARGETING_TYPE_APP_CATEGORY", 31688 // "TARGETING_TYPE_APP", 31689 // "TARGETING_TYPE_URL", 31690 // "TARGETING_TYPE_DAY_AND_TIME", 31691 // "TARGETING_TYPE_AGE_RANGE", 31692 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 31693 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 31694 // "TARGETING_TYPE_GENDER", 31695 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 31696 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 31697 // "TARGETING_TYPE_PARENTAL_STATUS", 31698 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 31699 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 31700 // "TARGETING_TYPE_DEVICE_TYPE", 31701 // "TARGETING_TYPE_AUDIENCE_GROUP", 31702 // "TARGETING_TYPE_BROWSER", 31703 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 31704 // "TARGETING_TYPE_ON_SCREEN_POSITION", 31705 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 31706 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 31707 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 31708 // "TARGETING_TYPE_ENVIRONMENT", 31709 // "TARGETING_TYPE_CARRIER_AND_ISP", 31710 // "TARGETING_TYPE_OPERATING_SYSTEM", 31711 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 31712 // "TARGETING_TYPE_KEYWORD", 31713 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 31714 // "TARGETING_TYPE_VIEWABILITY", 31715 // "TARGETING_TYPE_CATEGORY", 31716 // "TARGETING_TYPE_INVENTORY_SOURCE", 31717 // "TARGETING_TYPE_LANGUAGE", 31718 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 31719 // "TARGETING_TYPE_GEO_REGION", 31720 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 31721 // "TARGETING_TYPE_EXCHANGE", 31722 // "TARGETING_TYPE_SUB_EXCHANGE", 31723 // "TARGETING_TYPE_POI", 31724 // "TARGETING_TYPE_BUSINESS_CHAIN", 31725 // "TARGETING_TYPE_CONTENT_DURATION", 31726 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 31727 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 31728 // "TARGETING_TYPE_OMID", 31729 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 31730 // "TARGETING_TYPE_CONTENT_GENRE" 31731 // ], 31732 // "enumDescriptions": [ 31733 // "Default value when type is not specified or is unknown in this version.", 31734 // "Target a channel (a custom group of related websites or apps).", 31735 // "Target an app category (for example, education or puzzle games).", 31736 // "Target a specific app (for example, Angry Birds).", 31737 // "Target a specific url (for example, quora.com).", 31738 // "Target ads during a chosen time period on a specific day.", 31739 // "Target ads to a specific age range (for example, 18-24).", 31740 // "Target ads to the specified regions on a regional location list.", 31741 // "Target ads to the specified points of interest on a proximity location list.", 31742 // "Target ads to a specific gender (for example, female or male).", 31743 // "Target a specific video player size for video ads.", 31744 // "Target user rewarded content for video ads.", 31745 // "Target ads to a specific parental status (for example, parent or not a parent).", 31746 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 31747 // "Target ads in a specific content outstream position.", 31748 // "Target ads to a specific device type (for example, tablet or connected TV).", 31749 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 31750 // "Target ads to specific web browsers (for example, Chrome).", 31751 // "Target ads to a specific household income range (for example, top 10%).", 31752 // "Target ads in a specific on screen position.", 31753 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 31754 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 31755 // "Filter website content by sensitive categories (for example, adult).", 31756 // "Target ads to a specific environment (for example, web or app).", 31757 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 31758 // "Target ads to a specific operating system (for example, macOS).", 31759 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 31760 // "Target ads to a specific keyword (for example, dog or retriever).", 31761 // "Target ads to a specific negative keyword list.", 31762 // "Target ads to a specific viewability (for example, 80% viewable).", 31763 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 31764 // "Purchase impressions from specific deals and auction packages.", 31765 // "Target ads to a specific language (for example, English or Japanese).", 31766 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 31767 // "Target ads to a specific regional location (for example, a city or state).", 31768 // "Purchase impressions from a group of deals and auction packages.", 31769 // "Purchase impressions from specific exchanges.", 31770 // "Purchase impressions from specific sub-exchanges.", 31771 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 31772 // "Target ads around locations of a business chain within a specific geo region.", 31773 // "Target ads to a specific video content duration.", 31774 // "Target ads to a specific video content stream type.", 31775 // "Target ads to a specific native content position.", 31776 // "Target ads in an Open Measurement enabled inventory.", 31777 // "Target ads to a specific audio content type.", 31778 // "Target ads to a specific content genre." 31779 // ], 31780 // "location": "path", 31781 // "pattern": "^[^/]+$", 31782 // "required": true, 31783 // "type": "string" 31784 // } 31785 // }, 31786 // "path": "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 31787 // "request": { 31788 // "$ref": "AssignedTargetingOption" 31789 // }, 31790 // "response": { 31791 // "$ref": "AssignedTargetingOption" 31792 // }, 31793 // "scopes": [ 31794 // "https://www.googleapis.com/auth/display-video" 31795 // ] 31796 // } 31797 31798 } 31799 31800 // method id "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.delete": 31801 31802 type AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall struct { 31803 s *Service 31804 advertiserId int64 31805 targetingType string 31806 assignedTargetingOptionId string 31807 urlParams_ gensupport.URLParams 31808 ctx_ context.Context 31809 header_ http.Header 31810 } 31811 31812 // Delete: Deletes an assigned targeting option from an advertiser. 31813 // 31814 // - advertiserId: The ID of the advertiser. 31815 // - assignedTargetingOptionId: The ID of the assigned targeting option 31816 // to delete. 31817 // - targetingType: Identifies the type of this assigned targeting 31818 // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * 31819 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 31820 // `TARGETING_TYPE_OMID` * 31821 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 31822 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall { 31823 c := &AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 31824 c.advertiserId = advertiserId 31825 c.targetingType = targetingType 31826 c.assignedTargetingOptionId = assignedTargetingOptionId 31827 return c 31828 } 31829 31830 // Fields allows partial responses to be retrieved. See 31831 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 31832 // for more information. 31833 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall { 31834 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 31835 return c 31836 } 31837 31838 // Context sets the context to be used in this call's Do method. Any 31839 // pending HTTP request will be aborted if the provided context is 31840 // canceled. 31841 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall { 31842 c.ctx_ = ctx 31843 return c 31844 } 31845 31846 // Header returns an http.Header that can be modified by the caller to 31847 // add HTTP headers to the request. 31848 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { 31849 if c.header_ == nil { 31850 c.header_ = make(http.Header) 31851 } 31852 return c.header_ 31853 } 31854 31855 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { 31856 reqHeaders := make(http.Header) 31857 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 31858 for k, v := range c.header_ { 31859 reqHeaders[k] = v 31860 } 31861 reqHeaders.Set("User-Agent", c.s.userAgent()) 31862 var body io.Reader = nil 31863 c.urlParams_.Set("alt", alt) 31864 c.urlParams_.Set("prettyPrint", "false") 31865 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 31866 urls += "?" + c.urlParams_.Encode() 31867 req, err := http.NewRequest("DELETE", urls, body) 31868 if err != nil { 31869 return nil, err 31870 } 31871 req.Header = reqHeaders 31872 googleapi.Expand(req.URL, map[string]string{ 31873 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 31874 "targetingType": c.targetingType, 31875 "assignedTargetingOptionId": c.assignedTargetingOptionId, 31876 }) 31877 return gensupport.SendRequest(c.ctx_, c.s.client, req) 31878 } 31879 31880 // Do executes the "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.delete" call. 31881 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 31882 // code is an error. Response headers are in either 31883 // *Empty.ServerResponse.Header or (if a response was returned at all) 31884 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 31885 // check whether the returned error was because http.StatusNotModified 31886 // was returned. 31887 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 31888 gensupport.SetOptions(c.urlParams_, opts...) 31889 res, err := c.doRequest("json") 31890 if res != nil && res.StatusCode == http.StatusNotModified { 31891 if res.Body != nil { 31892 res.Body.Close() 31893 } 31894 return nil, gensupport.WrapError(&googleapi.Error{ 31895 Code: res.StatusCode, 31896 Header: res.Header, 31897 }) 31898 } 31899 if err != nil { 31900 return nil, err 31901 } 31902 defer googleapi.CloseBody(res) 31903 if err := googleapi.CheckResponse(res); err != nil { 31904 return nil, gensupport.WrapError(err) 31905 } 31906 ret := &Empty{ 31907 ServerResponse: googleapi.ServerResponse{ 31908 Header: res.Header, 31909 HTTPStatusCode: res.StatusCode, 31910 }, 31911 } 31912 target := &ret 31913 if err := gensupport.DecodeResponse(target, res); err != nil { 31914 return nil, err 31915 } 31916 return ret, nil 31917 // { 31918 // "description": "Deletes an assigned targeting option from an advertiser.", 31919 // "flatPath": "v1/advertisers/{advertisersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 31920 // "httpMethod": "DELETE", 31921 // "id": "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.delete", 31922 // "parameterOrder": [ 31923 // "advertiserId", 31924 // "targetingType", 31925 // "assignedTargetingOptionId" 31926 // ], 31927 // "parameters": { 31928 // "advertiserId": { 31929 // "description": "Required. The ID of the advertiser.", 31930 // "format": "int64", 31931 // "location": "path", 31932 // "pattern": "^[^/]+$", 31933 // "required": true, 31934 // "type": "string" 31935 // }, 31936 // "assignedTargetingOptionId": { 31937 // "description": "Required. The ID of the assigned targeting option to delete.", 31938 // "location": "path", 31939 // "pattern": "^[^/]+$", 31940 // "required": true, 31941 // "type": "string" 31942 // }, 31943 // "targetingType": { 31944 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`", 31945 // "enum": [ 31946 // "TARGETING_TYPE_UNSPECIFIED", 31947 // "TARGETING_TYPE_CHANNEL", 31948 // "TARGETING_TYPE_APP_CATEGORY", 31949 // "TARGETING_TYPE_APP", 31950 // "TARGETING_TYPE_URL", 31951 // "TARGETING_TYPE_DAY_AND_TIME", 31952 // "TARGETING_TYPE_AGE_RANGE", 31953 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 31954 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 31955 // "TARGETING_TYPE_GENDER", 31956 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 31957 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 31958 // "TARGETING_TYPE_PARENTAL_STATUS", 31959 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 31960 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 31961 // "TARGETING_TYPE_DEVICE_TYPE", 31962 // "TARGETING_TYPE_AUDIENCE_GROUP", 31963 // "TARGETING_TYPE_BROWSER", 31964 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 31965 // "TARGETING_TYPE_ON_SCREEN_POSITION", 31966 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 31967 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 31968 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 31969 // "TARGETING_TYPE_ENVIRONMENT", 31970 // "TARGETING_TYPE_CARRIER_AND_ISP", 31971 // "TARGETING_TYPE_OPERATING_SYSTEM", 31972 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 31973 // "TARGETING_TYPE_KEYWORD", 31974 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 31975 // "TARGETING_TYPE_VIEWABILITY", 31976 // "TARGETING_TYPE_CATEGORY", 31977 // "TARGETING_TYPE_INVENTORY_SOURCE", 31978 // "TARGETING_TYPE_LANGUAGE", 31979 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 31980 // "TARGETING_TYPE_GEO_REGION", 31981 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 31982 // "TARGETING_TYPE_EXCHANGE", 31983 // "TARGETING_TYPE_SUB_EXCHANGE", 31984 // "TARGETING_TYPE_POI", 31985 // "TARGETING_TYPE_BUSINESS_CHAIN", 31986 // "TARGETING_TYPE_CONTENT_DURATION", 31987 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 31988 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 31989 // "TARGETING_TYPE_OMID", 31990 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 31991 // "TARGETING_TYPE_CONTENT_GENRE" 31992 // ], 31993 // "enumDescriptions": [ 31994 // "Default value when type is not specified or is unknown in this version.", 31995 // "Target a channel (a custom group of related websites or apps).", 31996 // "Target an app category (for example, education or puzzle games).", 31997 // "Target a specific app (for example, Angry Birds).", 31998 // "Target a specific url (for example, quora.com).", 31999 // "Target ads during a chosen time period on a specific day.", 32000 // "Target ads to a specific age range (for example, 18-24).", 32001 // "Target ads to the specified regions on a regional location list.", 32002 // "Target ads to the specified points of interest on a proximity location list.", 32003 // "Target ads to a specific gender (for example, female or male).", 32004 // "Target a specific video player size for video ads.", 32005 // "Target user rewarded content for video ads.", 32006 // "Target ads to a specific parental status (for example, parent or not a parent).", 32007 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 32008 // "Target ads in a specific content outstream position.", 32009 // "Target ads to a specific device type (for example, tablet or connected TV).", 32010 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 32011 // "Target ads to specific web browsers (for example, Chrome).", 32012 // "Target ads to a specific household income range (for example, top 10%).", 32013 // "Target ads in a specific on screen position.", 32014 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 32015 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 32016 // "Filter website content by sensitive categories (for example, adult).", 32017 // "Target ads to a specific environment (for example, web or app).", 32018 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 32019 // "Target ads to a specific operating system (for example, macOS).", 32020 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 32021 // "Target ads to a specific keyword (for example, dog or retriever).", 32022 // "Target ads to a specific negative keyword list.", 32023 // "Target ads to a specific viewability (for example, 80% viewable).", 32024 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 32025 // "Purchase impressions from specific deals and auction packages.", 32026 // "Target ads to a specific language (for example, English or Japanese).", 32027 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 32028 // "Target ads to a specific regional location (for example, a city or state).", 32029 // "Purchase impressions from a group of deals and auction packages.", 32030 // "Purchase impressions from specific exchanges.", 32031 // "Purchase impressions from specific sub-exchanges.", 32032 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 32033 // "Target ads around locations of a business chain within a specific geo region.", 32034 // "Target ads to a specific video content duration.", 32035 // "Target ads to a specific video content stream type.", 32036 // "Target ads to a specific native content position.", 32037 // "Target ads in an Open Measurement enabled inventory.", 32038 // "Target ads to a specific audio content type.", 32039 // "Target ads to a specific content genre." 32040 // ], 32041 // "location": "path", 32042 // "pattern": "^[^/]+$", 32043 // "required": true, 32044 // "type": "string" 32045 // } 32046 // }, 32047 // "path": "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 32048 // "response": { 32049 // "$ref": "Empty" 32050 // }, 32051 // "scopes": [ 32052 // "https://www.googleapis.com/auth/display-video" 32053 // ] 32054 // } 32055 32056 } 32057 32058 // method id "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.get": 32059 32060 type AdvertisersTargetingTypesAssignedTargetingOptionsGetCall struct { 32061 s *Service 32062 advertiserId int64 32063 targetingType string 32064 assignedTargetingOptionId string 32065 urlParams_ gensupport.URLParams 32066 ifNoneMatch_ string 32067 ctx_ context.Context 32068 header_ http.Header 32069 } 32070 32071 // Get: Gets a single targeting option assigned to an advertiser. 32072 // 32073 // - advertiserId: The ID of the advertiser. 32074 // - assignedTargetingOptionId: An identifier unique to the targeting 32075 // type in this advertiser that identifies the assigned targeting 32076 // option being requested. 32077 // - targetingType: Identifies the type of this assigned targeting 32078 // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * 32079 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 32080 // `TARGETING_TYPE_OMID` * 32081 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 32082 // `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`. 32083 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall { 32084 c := &AdvertisersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 32085 c.advertiserId = advertiserId 32086 c.targetingType = targetingType 32087 c.assignedTargetingOptionId = assignedTargetingOptionId 32088 return c 32089 } 32090 32091 // Fields allows partial responses to be retrieved. See 32092 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 32093 // for more information. 32094 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall { 32095 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 32096 return c 32097 } 32098 32099 // IfNoneMatch sets the optional parameter which makes the operation 32100 // fail if the object's ETag matches the given value. This is useful for 32101 // getting updates only after the object has changed since the last 32102 // request. Use googleapi.IsNotModified to check whether the response 32103 // error from Do is the result of In-None-Match. 32104 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall { 32105 c.ifNoneMatch_ = entityTag 32106 return c 32107 } 32108 32109 // Context sets the context to be used in this call's Do method. Any 32110 // pending HTTP request will be aborted if the provided context is 32111 // canceled. 32112 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall { 32113 c.ctx_ = ctx 32114 return c 32115 } 32116 32117 // Header returns an http.Header that can be modified by the caller to 32118 // add HTTP headers to the request. 32119 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { 32120 if c.header_ == nil { 32121 c.header_ = make(http.Header) 32122 } 32123 return c.header_ 32124 } 32125 32126 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 32127 reqHeaders := make(http.Header) 32128 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 32129 for k, v := range c.header_ { 32130 reqHeaders[k] = v 32131 } 32132 reqHeaders.Set("User-Agent", c.s.userAgent()) 32133 if c.ifNoneMatch_ != "" { 32134 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 32135 } 32136 var body io.Reader = nil 32137 c.urlParams_.Set("alt", alt) 32138 c.urlParams_.Set("prettyPrint", "false") 32139 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 32140 urls += "?" + c.urlParams_.Encode() 32141 req, err := http.NewRequest("GET", urls, body) 32142 if err != nil { 32143 return nil, err 32144 } 32145 req.Header = reqHeaders 32146 googleapi.Expand(req.URL, map[string]string{ 32147 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 32148 "targetingType": c.targetingType, 32149 "assignedTargetingOptionId": c.assignedTargetingOptionId, 32150 }) 32151 return gensupport.SendRequest(c.ctx_, c.s.client, req) 32152 } 32153 32154 // Do executes the "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.get" call. 32155 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 32156 // non-2xx status code is an error. Response headers are in either 32157 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 32158 // returned at all) in error.(*googleapi.Error).Header. Use 32159 // googleapi.IsNotModified to check whether the returned error was 32160 // because http.StatusNotModified was returned. 32161 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 32162 gensupport.SetOptions(c.urlParams_, opts...) 32163 res, err := c.doRequest("json") 32164 if res != nil && res.StatusCode == http.StatusNotModified { 32165 if res.Body != nil { 32166 res.Body.Close() 32167 } 32168 return nil, gensupport.WrapError(&googleapi.Error{ 32169 Code: res.StatusCode, 32170 Header: res.Header, 32171 }) 32172 } 32173 if err != nil { 32174 return nil, err 32175 } 32176 defer googleapi.CloseBody(res) 32177 if err := googleapi.CheckResponse(res); err != nil { 32178 return nil, gensupport.WrapError(err) 32179 } 32180 ret := &AssignedTargetingOption{ 32181 ServerResponse: googleapi.ServerResponse{ 32182 Header: res.Header, 32183 HTTPStatusCode: res.StatusCode, 32184 }, 32185 } 32186 target := &ret 32187 if err := gensupport.DecodeResponse(target, res); err != nil { 32188 return nil, err 32189 } 32190 return ret, nil 32191 // { 32192 // "description": "Gets a single targeting option assigned to an advertiser.", 32193 // "flatPath": "v1/advertisers/{advertisersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 32194 // "httpMethod": "GET", 32195 // "id": "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.get", 32196 // "parameterOrder": [ 32197 // "advertiserId", 32198 // "targetingType", 32199 // "assignedTargetingOptionId" 32200 // ], 32201 // "parameters": { 32202 // "advertiserId": { 32203 // "description": "Required. The ID of the advertiser.", 32204 // "format": "int64", 32205 // "location": "path", 32206 // "pattern": "^[^/]+$", 32207 // "required": true, 32208 // "type": "string" 32209 // }, 32210 // "assignedTargetingOptionId": { 32211 // "description": "Required. An identifier unique to the targeting type in this advertiser that identifies the assigned targeting option being requested.", 32212 // "location": "path", 32213 // "pattern": "^[^/]+$", 32214 // "required": true, 32215 // "type": "string" 32216 // }, 32217 // "targetingType": { 32218 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", 32219 // "enum": [ 32220 // "TARGETING_TYPE_UNSPECIFIED", 32221 // "TARGETING_TYPE_CHANNEL", 32222 // "TARGETING_TYPE_APP_CATEGORY", 32223 // "TARGETING_TYPE_APP", 32224 // "TARGETING_TYPE_URL", 32225 // "TARGETING_TYPE_DAY_AND_TIME", 32226 // "TARGETING_TYPE_AGE_RANGE", 32227 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 32228 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 32229 // "TARGETING_TYPE_GENDER", 32230 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 32231 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 32232 // "TARGETING_TYPE_PARENTAL_STATUS", 32233 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 32234 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 32235 // "TARGETING_TYPE_DEVICE_TYPE", 32236 // "TARGETING_TYPE_AUDIENCE_GROUP", 32237 // "TARGETING_TYPE_BROWSER", 32238 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 32239 // "TARGETING_TYPE_ON_SCREEN_POSITION", 32240 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 32241 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 32242 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 32243 // "TARGETING_TYPE_ENVIRONMENT", 32244 // "TARGETING_TYPE_CARRIER_AND_ISP", 32245 // "TARGETING_TYPE_OPERATING_SYSTEM", 32246 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 32247 // "TARGETING_TYPE_KEYWORD", 32248 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 32249 // "TARGETING_TYPE_VIEWABILITY", 32250 // "TARGETING_TYPE_CATEGORY", 32251 // "TARGETING_TYPE_INVENTORY_SOURCE", 32252 // "TARGETING_TYPE_LANGUAGE", 32253 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 32254 // "TARGETING_TYPE_GEO_REGION", 32255 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 32256 // "TARGETING_TYPE_EXCHANGE", 32257 // "TARGETING_TYPE_SUB_EXCHANGE", 32258 // "TARGETING_TYPE_POI", 32259 // "TARGETING_TYPE_BUSINESS_CHAIN", 32260 // "TARGETING_TYPE_CONTENT_DURATION", 32261 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 32262 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 32263 // "TARGETING_TYPE_OMID", 32264 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 32265 // "TARGETING_TYPE_CONTENT_GENRE" 32266 // ], 32267 // "enumDescriptions": [ 32268 // "Default value when type is not specified or is unknown in this version.", 32269 // "Target a channel (a custom group of related websites or apps).", 32270 // "Target an app category (for example, education or puzzle games).", 32271 // "Target a specific app (for example, Angry Birds).", 32272 // "Target a specific url (for example, quora.com).", 32273 // "Target ads during a chosen time period on a specific day.", 32274 // "Target ads to a specific age range (for example, 18-24).", 32275 // "Target ads to the specified regions on a regional location list.", 32276 // "Target ads to the specified points of interest on a proximity location list.", 32277 // "Target ads to a specific gender (for example, female or male).", 32278 // "Target a specific video player size for video ads.", 32279 // "Target user rewarded content for video ads.", 32280 // "Target ads to a specific parental status (for example, parent or not a parent).", 32281 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 32282 // "Target ads in a specific content outstream position.", 32283 // "Target ads to a specific device type (for example, tablet or connected TV).", 32284 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 32285 // "Target ads to specific web browsers (for example, Chrome).", 32286 // "Target ads to a specific household income range (for example, top 10%).", 32287 // "Target ads in a specific on screen position.", 32288 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 32289 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 32290 // "Filter website content by sensitive categories (for example, adult).", 32291 // "Target ads to a specific environment (for example, web or app).", 32292 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 32293 // "Target ads to a specific operating system (for example, macOS).", 32294 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 32295 // "Target ads to a specific keyword (for example, dog or retriever).", 32296 // "Target ads to a specific negative keyword list.", 32297 // "Target ads to a specific viewability (for example, 80% viewable).", 32298 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 32299 // "Purchase impressions from specific deals and auction packages.", 32300 // "Target ads to a specific language (for example, English or Japanese).", 32301 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 32302 // "Target ads to a specific regional location (for example, a city or state).", 32303 // "Purchase impressions from a group of deals and auction packages.", 32304 // "Purchase impressions from specific exchanges.", 32305 // "Purchase impressions from specific sub-exchanges.", 32306 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 32307 // "Target ads around locations of a business chain within a specific geo region.", 32308 // "Target ads to a specific video content duration.", 32309 // "Target ads to a specific video content stream type.", 32310 // "Target ads to a specific native content position.", 32311 // "Target ads in an Open Measurement enabled inventory.", 32312 // "Target ads to a specific audio content type.", 32313 // "Target ads to a specific content genre." 32314 // ], 32315 // "location": "path", 32316 // "pattern": "^[^/]+$", 32317 // "required": true, 32318 // "type": "string" 32319 // } 32320 // }, 32321 // "path": "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 32322 // "response": { 32323 // "$ref": "AssignedTargetingOption" 32324 // }, 32325 // "scopes": [ 32326 // "https://www.googleapis.com/auth/display-video" 32327 // ] 32328 // } 32329 32330 } 32331 32332 // method id "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.list": 32333 32334 type AdvertisersTargetingTypesAssignedTargetingOptionsListCall struct { 32335 s *Service 32336 advertiserId int64 32337 targetingType string 32338 urlParams_ gensupport.URLParams 32339 ifNoneMatch_ string 32340 ctx_ context.Context 32341 header_ http.Header 32342 } 32343 32344 // List: Lists the targeting options assigned to an advertiser. 32345 // 32346 // - advertiserId: The ID of the advertiser. 32347 // - targetingType: Identifies the type of assigned targeting options to 32348 // list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * 32349 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 32350 // `TARGETING_TYPE_OMID` * 32351 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 32352 // `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`. 32353 func (r *AdvertisersTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, targetingType string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32354 c := &AdvertisersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 32355 c.advertiserId = advertiserId 32356 c.targetingType = targetingType 32357 return c 32358 } 32359 32360 // Filter sets the optional parameter "filter": Allows filtering by 32361 // assigned targeting option fields. Supported syntax: * Filter 32362 // expressions are made up of one or more restrictions. * Restrictions 32363 // can be combined by the `OR` logical operator. * A restriction has the 32364 // form of `{field} {operator} {value}`. * All fields must use the 32365 // `EQUALS (=)` operator. Supported fields: * 32366 // `assignedTargetingOptionId` Examples: * `AssignedTargetingOption` 32367 // with ID 123456: `assignedTargetingOptionId="123456" The length of 32368 // this field should be no more than 500 characters. Reference our 32369 // filter `LIST` requests (/display-video/api/guides/how-tos/filters) 32370 // guide for more information. 32371 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32372 c.urlParams_.Set("filter", filter) 32373 return c 32374 } 32375 32376 // OrderBy sets the optional parameter "orderBy": Field by which to sort 32377 // the list. Acceptable values are: * `assignedTargetingOptionId` 32378 // (default) The default sorting order is ascending. To specify 32379 // descending order for a field, a suffix "desc" should be added to the 32380 // field name. Example: `assignedTargetingOptionId desc`. 32381 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32382 c.urlParams_.Set("orderBy", orderBy) 32383 return c 32384 } 32385 32386 // PageSize sets the optional parameter "pageSize": Requested page size. 32387 // Must be between `1` and `5000`. If unspecified will default to `100`. 32388 // Returns error code `INVALID_ARGUMENT` if an invalid value is 32389 // specified. 32390 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32391 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 32392 return c 32393 } 32394 32395 // PageToken sets the optional parameter "pageToken": A token 32396 // identifying a page of results the server should return. Typically, 32397 // this is the value of next_page_token returned from the previous call 32398 // to `ListAdvertiserAssignedTargetingOptions` method. If not specified, 32399 // the first page of results will be returned. 32400 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32401 c.urlParams_.Set("pageToken", pageToken) 32402 return c 32403 } 32404 32405 // Fields allows partial responses to be retrieved. See 32406 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 32407 // for more information. 32408 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32409 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 32410 return c 32411 } 32412 32413 // IfNoneMatch sets the optional parameter which makes the operation 32414 // fail if the object's ETag matches the given value. This is useful for 32415 // getting updates only after the object has changed since the last 32416 // request. Use googleapi.IsNotModified to check whether the response 32417 // error from Do is the result of In-None-Match. 32418 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32419 c.ifNoneMatch_ = entityTag 32420 return c 32421 } 32422 32423 // Context sets the context to be used in this call's Do method. Any 32424 // pending HTTP request will be aborted if the provided context is 32425 // canceled. 32426 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersTargetingTypesAssignedTargetingOptionsListCall { 32427 c.ctx_ = ctx 32428 return c 32429 } 32430 32431 // Header returns an http.Header that can be modified by the caller to 32432 // add HTTP headers to the request. 32433 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { 32434 if c.header_ == nil { 32435 c.header_ = make(http.Header) 32436 } 32437 return c.header_ 32438 } 32439 32440 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 32441 reqHeaders := make(http.Header) 32442 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 32443 for k, v := range c.header_ { 32444 reqHeaders[k] = v 32445 } 32446 reqHeaders.Set("User-Agent", c.s.userAgent()) 32447 if c.ifNoneMatch_ != "" { 32448 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 32449 } 32450 var body io.Reader = nil 32451 c.urlParams_.Set("alt", alt) 32452 c.urlParams_.Set("prettyPrint", "false") 32453 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 32454 urls += "?" + c.urlParams_.Encode() 32455 req, err := http.NewRequest("GET", urls, body) 32456 if err != nil { 32457 return nil, err 32458 } 32459 req.Header = reqHeaders 32460 googleapi.Expand(req.URL, map[string]string{ 32461 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 32462 "targetingType": c.targetingType, 32463 }) 32464 return gensupport.SendRequest(c.ctx_, c.s.client, req) 32465 } 32466 32467 // Do executes the "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.list" call. 32468 // Exactly one of *ListAdvertiserAssignedTargetingOptionsResponse or 32469 // error will be non-nil. Any non-2xx status code is an error. Response 32470 // headers are in either 32471 // *ListAdvertiserAssignedTargetingOptionsResponse.ServerResponse.Header 32472 // or (if a response was returned at all) in 32473 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 32474 // whether the returned error was because http.StatusNotModified was 32475 // returned. 32476 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListAdvertiserAssignedTargetingOptionsResponse, error) { 32477 gensupport.SetOptions(c.urlParams_, opts...) 32478 res, err := c.doRequest("json") 32479 if res != nil && res.StatusCode == http.StatusNotModified { 32480 if res.Body != nil { 32481 res.Body.Close() 32482 } 32483 return nil, gensupport.WrapError(&googleapi.Error{ 32484 Code: res.StatusCode, 32485 Header: res.Header, 32486 }) 32487 } 32488 if err != nil { 32489 return nil, err 32490 } 32491 defer googleapi.CloseBody(res) 32492 if err := googleapi.CheckResponse(res); err != nil { 32493 return nil, gensupport.WrapError(err) 32494 } 32495 ret := &ListAdvertiserAssignedTargetingOptionsResponse{ 32496 ServerResponse: googleapi.ServerResponse{ 32497 Header: res.Header, 32498 HTTPStatusCode: res.StatusCode, 32499 }, 32500 } 32501 target := &ret 32502 if err := gensupport.DecodeResponse(target, res); err != nil { 32503 return nil, err 32504 } 32505 return ret, nil 32506 // { 32507 // "description": "Lists the targeting options assigned to an advertiser.", 32508 // "flatPath": "v1/advertisers/{advertisersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 32509 // "httpMethod": "GET", 32510 // "id": "displayvideo.advertisers.targetingTypes.assignedTargetingOptions.list", 32511 // "parameterOrder": [ 32512 // "advertiserId", 32513 // "targetingType" 32514 // ], 32515 // "parameters": { 32516 // "advertiserId": { 32517 // "description": "Required. The ID of the advertiser.", 32518 // "format": "int64", 32519 // "location": "path", 32520 // "pattern": "^[^/]+$", 32521 // "required": true, 32522 // "type": "string" 32523 // }, 32524 // "filter": { 32525 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` Examples: * `AssignedTargetingOption` with ID 123456: `assignedTargetingOptionId=\"123456\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 32526 // "location": "query", 32527 // "type": "string" 32528 // }, 32529 // "orderBy": { 32530 // "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", 32531 // "location": "query", 32532 // "type": "string" 32533 // }, 32534 // "pageSize": { 32535 // "description": "Requested page size. Must be between `1` and `5000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 32536 // "format": "int32", 32537 // "location": "query", 32538 // "type": "integer" 32539 // }, 32540 // "pageToken": { 32541 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListAdvertiserAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 32542 // "location": "query", 32543 // "type": "string" 32544 // }, 32545 // "targetingType": { 32546 // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_OMID` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_YOUTUBE_VIDEO` * `TARGETING_TYPE_YOUTUBE_CHANNEL`", 32547 // "enum": [ 32548 // "TARGETING_TYPE_UNSPECIFIED", 32549 // "TARGETING_TYPE_CHANNEL", 32550 // "TARGETING_TYPE_APP_CATEGORY", 32551 // "TARGETING_TYPE_APP", 32552 // "TARGETING_TYPE_URL", 32553 // "TARGETING_TYPE_DAY_AND_TIME", 32554 // "TARGETING_TYPE_AGE_RANGE", 32555 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 32556 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 32557 // "TARGETING_TYPE_GENDER", 32558 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 32559 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 32560 // "TARGETING_TYPE_PARENTAL_STATUS", 32561 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 32562 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 32563 // "TARGETING_TYPE_DEVICE_TYPE", 32564 // "TARGETING_TYPE_AUDIENCE_GROUP", 32565 // "TARGETING_TYPE_BROWSER", 32566 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 32567 // "TARGETING_TYPE_ON_SCREEN_POSITION", 32568 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 32569 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 32570 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 32571 // "TARGETING_TYPE_ENVIRONMENT", 32572 // "TARGETING_TYPE_CARRIER_AND_ISP", 32573 // "TARGETING_TYPE_OPERATING_SYSTEM", 32574 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 32575 // "TARGETING_TYPE_KEYWORD", 32576 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 32577 // "TARGETING_TYPE_VIEWABILITY", 32578 // "TARGETING_TYPE_CATEGORY", 32579 // "TARGETING_TYPE_INVENTORY_SOURCE", 32580 // "TARGETING_TYPE_LANGUAGE", 32581 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 32582 // "TARGETING_TYPE_GEO_REGION", 32583 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 32584 // "TARGETING_TYPE_EXCHANGE", 32585 // "TARGETING_TYPE_SUB_EXCHANGE", 32586 // "TARGETING_TYPE_POI", 32587 // "TARGETING_TYPE_BUSINESS_CHAIN", 32588 // "TARGETING_TYPE_CONTENT_DURATION", 32589 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 32590 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 32591 // "TARGETING_TYPE_OMID", 32592 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 32593 // "TARGETING_TYPE_CONTENT_GENRE" 32594 // ], 32595 // "enumDescriptions": [ 32596 // "Default value when type is not specified or is unknown in this version.", 32597 // "Target a channel (a custom group of related websites or apps).", 32598 // "Target an app category (for example, education or puzzle games).", 32599 // "Target a specific app (for example, Angry Birds).", 32600 // "Target a specific url (for example, quora.com).", 32601 // "Target ads during a chosen time period on a specific day.", 32602 // "Target ads to a specific age range (for example, 18-24).", 32603 // "Target ads to the specified regions on a regional location list.", 32604 // "Target ads to the specified points of interest on a proximity location list.", 32605 // "Target ads to a specific gender (for example, female or male).", 32606 // "Target a specific video player size for video ads.", 32607 // "Target user rewarded content for video ads.", 32608 // "Target ads to a specific parental status (for example, parent or not a parent).", 32609 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 32610 // "Target ads in a specific content outstream position.", 32611 // "Target ads to a specific device type (for example, tablet or connected TV).", 32612 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 32613 // "Target ads to specific web browsers (for example, Chrome).", 32614 // "Target ads to a specific household income range (for example, top 10%).", 32615 // "Target ads in a specific on screen position.", 32616 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 32617 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 32618 // "Filter website content by sensitive categories (for example, adult).", 32619 // "Target ads to a specific environment (for example, web or app).", 32620 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 32621 // "Target ads to a specific operating system (for example, macOS).", 32622 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 32623 // "Target ads to a specific keyword (for example, dog or retriever).", 32624 // "Target ads to a specific negative keyword list.", 32625 // "Target ads to a specific viewability (for example, 80% viewable).", 32626 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 32627 // "Purchase impressions from specific deals and auction packages.", 32628 // "Target ads to a specific language (for example, English or Japanese).", 32629 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 32630 // "Target ads to a specific regional location (for example, a city or state).", 32631 // "Purchase impressions from a group of deals and auction packages.", 32632 // "Purchase impressions from specific exchanges.", 32633 // "Purchase impressions from specific sub-exchanges.", 32634 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 32635 // "Target ads around locations of a business chain within a specific geo region.", 32636 // "Target ads to a specific video content duration.", 32637 // "Target ads to a specific video content stream type.", 32638 // "Target ads to a specific native content position.", 32639 // "Target ads in an Open Measurement enabled inventory.", 32640 // "Target ads to a specific audio content type.", 32641 // "Target ads to a specific content genre." 32642 // ], 32643 // "location": "path", 32644 // "pattern": "^[^/]+$", 32645 // "required": true, 32646 // "type": "string" 32647 // } 32648 // }, 32649 // "path": "v1/advertisers/{+advertiserId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 32650 // "response": { 32651 // "$ref": "ListAdvertiserAssignedTargetingOptionsResponse" 32652 // }, 32653 // "scopes": [ 32654 // "https://www.googleapis.com/auth/display-video" 32655 // ] 32656 // } 32657 32658 } 32659 32660 // Pages invokes f for each page of results. 32661 // A non-nil error returned from f will halt the iteration. 32662 // The provided context supersedes any context provided to the Context method. 32663 func (c *AdvertisersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListAdvertiserAssignedTargetingOptionsResponse) error) error { 32664 c.ctx_ = ctx 32665 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 32666 for { 32667 x, err := c.Do() 32668 if err != nil { 32669 return err 32670 } 32671 if err := f(x); err != nil { 32672 return err 32673 } 32674 if x.NextPageToken == "" { 32675 return nil 32676 } 32677 c.PageToken(x.NextPageToken) 32678 } 32679 } 32680 32681 // method id "displayvideo.combinedAudiences.get": 32682 32683 type CombinedAudiencesGetCall struct { 32684 s *Service 32685 combinedAudienceId int64 32686 urlParams_ gensupport.URLParams 32687 ifNoneMatch_ string 32688 ctx_ context.Context 32689 header_ http.Header 32690 } 32691 32692 // Get: Gets a combined audience. 32693 // 32694 // - combinedAudienceId: The ID of the combined audience to fetch. 32695 func (r *CombinedAudiencesService) Get(combinedAudienceId int64) *CombinedAudiencesGetCall { 32696 c := &CombinedAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 32697 c.combinedAudienceId = combinedAudienceId 32698 return c 32699 } 32700 32701 // AdvertiserId sets the optional parameter "advertiserId": The ID of 32702 // the advertiser that has access to the fetched combined audience. 32703 func (c *CombinedAudiencesGetCall) AdvertiserId(advertiserId int64) *CombinedAudiencesGetCall { 32704 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 32705 return c 32706 } 32707 32708 // PartnerId sets the optional parameter "partnerId": The ID of the 32709 // partner that has access to the fetched combined audience. 32710 func (c *CombinedAudiencesGetCall) PartnerId(partnerId int64) *CombinedAudiencesGetCall { 32711 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 32712 return c 32713 } 32714 32715 // Fields allows partial responses to be retrieved. See 32716 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 32717 // for more information. 32718 func (c *CombinedAudiencesGetCall) Fields(s ...googleapi.Field) *CombinedAudiencesGetCall { 32719 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 32720 return c 32721 } 32722 32723 // IfNoneMatch sets the optional parameter which makes the operation 32724 // fail if the object's ETag matches the given value. This is useful for 32725 // getting updates only after the object has changed since the last 32726 // request. Use googleapi.IsNotModified to check whether the response 32727 // error from Do is the result of In-None-Match. 32728 func (c *CombinedAudiencesGetCall) IfNoneMatch(entityTag string) *CombinedAudiencesGetCall { 32729 c.ifNoneMatch_ = entityTag 32730 return c 32731 } 32732 32733 // Context sets the context to be used in this call's Do method. Any 32734 // pending HTTP request will be aborted if the provided context is 32735 // canceled. 32736 func (c *CombinedAudiencesGetCall) Context(ctx context.Context) *CombinedAudiencesGetCall { 32737 c.ctx_ = ctx 32738 return c 32739 } 32740 32741 // Header returns an http.Header that can be modified by the caller to 32742 // add HTTP headers to the request. 32743 func (c *CombinedAudiencesGetCall) Header() http.Header { 32744 if c.header_ == nil { 32745 c.header_ = make(http.Header) 32746 } 32747 return c.header_ 32748 } 32749 32750 func (c *CombinedAudiencesGetCall) doRequest(alt string) (*http.Response, error) { 32751 reqHeaders := make(http.Header) 32752 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 32753 for k, v := range c.header_ { 32754 reqHeaders[k] = v 32755 } 32756 reqHeaders.Set("User-Agent", c.s.userAgent()) 32757 if c.ifNoneMatch_ != "" { 32758 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 32759 } 32760 var body io.Reader = nil 32761 c.urlParams_.Set("alt", alt) 32762 c.urlParams_.Set("prettyPrint", "false") 32763 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/combinedAudiences/{+combinedAudienceId}") 32764 urls += "?" + c.urlParams_.Encode() 32765 req, err := http.NewRequest("GET", urls, body) 32766 if err != nil { 32767 return nil, err 32768 } 32769 req.Header = reqHeaders 32770 googleapi.Expand(req.URL, map[string]string{ 32771 "combinedAudienceId": strconv.FormatInt(c.combinedAudienceId, 10), 32772 }) 32773 return gensupport.SendRequest(c.ctx_, c.s.client, req) 32774 } 32775 32776 // Do executes the "displayvideo.combinedAudiences.get" call. 32777 // Exactly one of *CombinedAudience or error will be non-nil. Any 32778 // non-2xx status code is an error. Response headers are in either 32779 // *CombinedAudience.ServerResponse.Header or (if a response was 32780 // returned at all) in error.(*googleapi.Error).Header. Use 32781 // googleapi.IsNotModified to check whether the returned error was 32782 // because http.StatusNotModified was returned. 32783 func (c *CombinedAudiencesGetCall) Do(opts ...googleapi.CallOption) (*CombinedAudience, error) { 32784 gensupport.SetOptions(c.urlParams_, opts...) 32785 res, err := c.doRequest("json") 32786 if res != nil && res.StatusCode == http.StatusNotModified { 32787 if res.Body != nil { 32788 res.Body.Close() 32789 } 32790 return nil, gensupport.WrapError(&googleapi.Error{ 32791 Code: res.StatusCode, 32792 Header: res.Header, 32793 }) 32794 } 32795 if err != nil { 32796 return nil, err 32797 } 32798 defer googleapi.CloseBody(res) 32799 if err := googleapi.CheckResponse(res); err != nil { 32800 return nil, gensupport.WrapError(err) 32801 } 32802 ret := &CombinedAudience{ 32803 ServerResponse: googleapi.ServerResponse{ 32804 Header: res.Header, 32805 HTTPStatusCode: res.StatusCode, 32806 }, 32807 } 32808 target := &ret 32809 if err := gensupport.DecodeResponse(target, res); err != nil { 32810 return nil, err 32811 } 32812 return ret, nil 32813 // { 32814 // "description": "Gets a combined audience.", 32815 // "flatPath": "v1/combinedAudiences/{combinedAudiencesId}", 32816 // "httpMethod": "GET", 32817 // "id": "displayvideo.combinedAudiences.get", 32818 // "parameterOrder": [ 32819 // "combinedAudienceId" 32820 // ], 32821 // "parameters": { 32822 // "advertiserId": { 32823 // "description": "The ID of the advertiser that has access to the fetched combined audience.", 32824 // "format": "int64", 32825 // "location": "query", 32826 // "type": "string" 32827 // }, 32828 // "combinedAudienceId": { 32829 // "description": "Required. The ID of the combined audience to fetch.", 32830 // "format": "int64", 32831 // "location": "path", 32832 // "pattern": "^[^/]+$", 32833 // "required": true, 32834 // "type": "string" 32835 // }, 32836 // "partnerId": { 32837 // "description": "The ID of the partner that has access to the fetched combined audience.", 32838 // "format": "int64", 32839 // "location": "query", 32840 // "type": "string" 32841 // } 32842 // }, 32843 // "path": "v1/combinedAudiences/{+combinedAudienceId}", 32844 // "response": { 32845 // "$ref": "CombinedAudience" 32846 // }, 32847 // "scopes": [ 32848 // "https://www.googleapis.com/auth/display-video" 32849 // ] 32850 // } 32851 32852 } 32853 32854 // method id "displayvideo.combinedAudiences.list": 32855 32856 type CombinedAudiencesListCall struct { 32857 s *Service 32858 urlParams_ gensupport.URLParams 32859 ifNoneMatch_ string 32860 ctx_ context.Context 32861 header_ http.Header 32862 } 32863 32864 // List: Lists combined audiences. The order is defined by the order_by 32865 // parameter. 32866 func (r *CombinedAudiencesService) List() *CombinedAudiencesListCall { 32867 c := &CombinedAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 32868 return c 32869 } 32870 32871 // AdvertiserId sets the optional parameter "advertiserId": The ID of 32872 // the advertiser that has access to the fetched combined audiences. 32873 func (c *CombinedAudiencesListCall) AdvertiserId(advertiserId int64) *CombinedAudiencesListCall { 32874 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 32875 return c 32876 } 32877 32878 // Filter sets the optional parameter "filter": Allows filtering by 32879 // combined audience fields. Supported syntax: * Filter expressions for 32880 // combined audiences can only contain at most one restriction. * A 32881 // restriction has the form of `{field} {operator} {value}`. * All 32882 // fields must use the `HAS (:)` operator. Supported fields: * 32883 // `displayName` Examples: * All combined audiences for which the 32884 // display name contains "Google": `displayName : "Google". The length 32885 // of this field should be no more than 500 characters. Reference our 32886 // filter `LIST` requests (/display-video/api/guides/how-tos/filters) 32887 // guide for more information. 32888 func (c *CombinedAudiencesListCall) Filter(filter string) *CombinedAudiencesListCall { 32889 c.urlParams_.Set("filter", filter) 32890 return c 32891 } 32892 32893 // OrderBy sets the optional parameter "orderBy": Field by which to sort 32894 // the list. Acceptable values are: * `combinedAudienceId` (default) * 32895 // `displayName` The default sorting order is ascending. To specify 32896 // descending order for a field, a suffix "desc" should be added to the 32897 // field name. Example: `displayName desc`. 32898 func (c *CombinedAudiencesListCall) OrderBy(orderBy string) *CombinedAudiencesListCall { 32899 c.urlParams_.Set("orderBy", orderBy) 32900 return c 32901 } 32902 32903 // PageSize sets the optional parameter "pageSize": Requested page size. 32904 // Must be between `1` and `200`. If unspecified will default to `100`. 32905 // Returns error code `INVALID_ARGUMENT` if an invalid value is 32906 // specified. 32907 func (c *CombinedAudiencesListCall) PageSize(pageSize int64) *CombinedAudiencesListCall { 32908 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 32909 return c 32910 } 32911 32912 // PageToken sets the optional parameter "pageToken": A token 32913 // identifying a page of results the server should return. Typically, 32914 // this is the value of next_page_token returned from the previous call 32915 // to `ListCombinedAudiences` method. If not specified, the first page 32916 // of results will be returned. 32917 func (c *CombinedAudiencesListCall) PageToken(pageToken string) *CombinedAudiencesListCall { 32918 c.urlParams_.Set("pageToken", pageToken) 32919 return c 32920 } 32921 32922 // PartnerId sets the optional parameter "partnerId": The ID of the 32923 // partner that has access to the fetched combined audiences. 32924 func (c *CombinedAudiencesListCall) PartnerId(partnerId int64) *CombinedAudiencesListCall { 32925 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 32926 return c 32927 } 32928 32929 // Fields allows partial responses to be retrieved. See 32930 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 32931 // for more information. 32932 func (c *CombinedAudiencesListCall) Fields(s ...googleapi.Field) *CombinedAudiencesListCall { 32933 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 32934 return c 32935 } 32936 32937 // IfNoneMatch sets the optional parameter which makes the operation 32938 // fail if the object's ETag matches the given value. This is useful for 32939 // getting updates only after the object has changed since the last 32940 // request. Use googleapi.IsNotModified to check whether the response 32941 // error from Do is the result of In-None-Match. 32942 func (c *CombinedAudiencesListCall) IfNoneMatch(entityTag string) *CombinedAudiencesListCall { 32943 c.ifNoneMatch_ = entityTag 32944 return c 32945 } 32946 32947 // Context sets the context to be used in this call's Do method. Any 32948 // pending HTTP request will be aborted if the provided context is 32949 // canceled. 32950 func (c *CombinedAudiencesListCall) Context(ctx context.Context) *CombinedAudiencesListCall { 32951 c.ctx_ = ctx 32952 return c 32953 } 32954 32955 // Header returns an http.Header that can be modified by the caller to 32956 // add HTTP headers to the request. 32957 func (c *CombinedAudiencesListCall) Header() http.Header { 32958 if c.header_ == nil { 32959 c.header_ = make(http.Header) 32960 } 32961 return c.header_ 32962 } 32963 32964 func (c *CombinedAudiencesListCall) doRequest(alt string) (*http.Response, error) { 32965 reqHeaders := make(http.Header) 32966 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 32967 for k, v := range c.header_ { 32968 reqHeaders[k] = v 32969 } 32970 reqHeaders.Set("User-Agent", c.s.userAgent()) 32971 if c.ifNoneMatch_ != "" { 32972 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 32973 } 32974 var body io.Reader = nil 32975 c.urlParams_.Set("alt", alt) 32976 c.urlParams_.Set("prettyPrint", "false") 32977 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/combinedAudiences") 32978 urls += "?" + c.urlParams_.Encode() 32979 req, err := http.NewRequest("GET", urls, body) 32980 if err != nil { 32981 return nil, err 32982 } 32983 req.Header = reqHeaders 32984 return gensupport.SendRequest(c.ctx_, c.s.client, req) 32985 } 32986 32987 // Do executes the "displayvideo.combinedAudiences.list" call. 32988 // Exactly one of *ListCombinedAudiencesResponse or error will be 32989 // non-nil. Any non-2xx status code is an error. Response headers are in 32990 // either *ListCombinedAudiencesResponse.ServerResponse.Header or (if a 32991 // response was returned at all) in error.(*googleapi.Error).Header. Use 32992 // googleapi.IsNotModified to check whether the returned error was 32993 // because http.StatusNotModified was returned. 32994 func (c *CombinedAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListCombinedAudiencesResponse, error) { 32995 gensupport.SetOptions(c.urlParams_, opts...) 32996 res, err := c.doRequest("json") 32997 if res != nil && res.StatusCode == http.StatusNotModified { 32998 if res.Body != nil { 32999 res.Body.Close() 33000 } 33001 return nil, gensupport.WrapError(&googleapi.Error{ 33002 Code: res.StatusCode, 33003 Header: res.Header, 33004 }) 33005 } 33006 if err != nil { 33007 return nil, err 33008 } 33009 defer googleapi.CloseBody(res) 33010 if err := googleapi.CheckResponse(res); err != nil { 33011 return nil, gensupport.WrapError(err) 33012 } 33013 ret := &ListCombinedAudiencesResponse{ 33014 ServerResponse: googleapi.ServerResponse{ 33015 Header: res.Header, 33016 HTTPStatusCode: res.StatusCode, 33017 }, 33018 } 33019 target := &ret 33020 if err := gensupport.DecodeResponse(target, res); err != nil { 33021 return nil, err 33022 } 33023 return ret, nil 33024 // { 33025 // "description": "Lists combined audiences. The order is defined by the order_by parameter.", 33026 // "flatPath": "v1/combinedAudiences", 33027 // "httpMethod": "GET", 33028 // "id": "displayvideo.combinedAudiences.list", 33029 // "parameterOrder": [], 33030 // "parameters": { 33031 // "advertiserId": { 33032 // "description": "The ID of the advertiser that has access to the fetched combined audiences.", 33033 // "format": "int64", 33034 // "location": "query", 33035 // "type": "string" 33036 // }, 33037 // "filter": { 33038 // "description": "Allows filtering by combined audience fields. Supported syntax: * Filter expressions for combined audiences can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All combined audiences for which the display name contains \"Google\": `displayName : \"Google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 33039 // "location": "query", 33040 // "type": "string" 33041 // }, 33042 // "orderBy": { 33043 // "description": "Field by which to sort the list. Acceptable values are: * `combinedAudienceId` (default) * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 33044 // "location": "query", 33045 // "type": "string" 33046 // }, 33047 // "pageSize": { 33048 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 33049 // "format": "int32", 33050 // "location": "query", 33051 // "type": "integer" 33052 // }, 33053 // "pageToken": { 33054 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCombinedAudiences` method. If not specified, the first page of results will be returned.", 33055 // "location": "query", 33056 // "type": "string" 33057 // }, 33058 // "partnerId": { 33059 // "description": "The ID of the partner that has access to the fetched combined audiences.", 33060 // "format": "int64", 33061 // "location": "query", 33062 // "type": "string" 33063 // } 33064 // }, 33065 // "path": "v1/combinedAudiences", 33066 // "response": { 33067 // "$ref": "ListCombinedAudiencesResponse" 33068 // }, 33069 // "scopes": [ 33070 // "https://www.googleapis.com/auth/display-video" 33071 // ] 33072 // } 33073 33074 } 33075 33076 // Pages invokes f for each page of results. 33077 // A non-nil error returned from f will halt the iteration. 33078 // The provided context supersedes any context provided to the Context method. 33079 func (c *CombinedAudiencesListCall) Pages(ctx context.Context, f func(*ListCombinedAudiencesResponse) error) error { 33080 c.ctx_ = ctx 33081 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 33082 for { 33083 x, err := c.Do() 33084 if err != nil { 33085 return err 33086 } 33087 if err := f(x); err != nil { 33088 return err 33089 } 33090 if x.NextPageToken == "" { 33091 return nil 33092 } 33093 c.PageToken(x.NextPageToken) 33094 } 33095 } 33096 33097 // method id "displayvideo.customBiddingAlgorithms.create": 33098 33099 type CustomBiddingAlgorithmsCreateCall struct { 33100 s *Service 33101 custombiddingalgorithm *CustomBiddingAlgorithm 33102 urlParams_ gensupport.URLParams 33103 ctx_ context.Context 33104 header_ http.Header 33105 } 33106 33107 // Create: Creates a new custom bidding algorithm. Returns the newly 33108 // created custom bidding algorithm if successful. 33109 func (r *CustomBiddingAlgorithmsService) Create(custombiddingalgorithm *CustomBiddingAlgorithm) *CustomBiddingAlgorithmsCreateCall { 33110 c := &CustomBiddingAlgorithmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 33111 c.custombiddingalgorithm = custombiddingalgorithm 33112 return c 33113 } 33114 33115 // Fields allows partial responses to be retrieved. See 33116 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 33117 // for more information. 33118 func (c *CustomBiddingAlgorithmsCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsCreateCall { 33119 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 33120 return c 33121 } 33122 33123 // Context sets the context to be used in this call's Do method. Any 33124 // pending HTTP request will be aborted if the provided context is 33125 // canceled. 33126 func (c *CustomBiddingAlgorithmsCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsCreateCall { 33127 c.ctx_ = ctx 33128 return c 33129 } 33130 33131 // Header returns an http.Header that can be modified by the caller to 33132 // add HTTP headers to the request. 33133 func (c *CustomBiddingAlgorithmsCreateCall) Header() http.Header { 33134 if c.header_ == nil { 33135 c.header_ = make(http.Header) 33136 } 33137 return c.header_ 33138 } 33139 33140 func (c *CustomBiddingAlgorithmsCreateCall) doRequest(alt string) (*http.Response, error) { 33141 reqHeaders := make(http.Header) 33142 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 33143 for k, v := range c.header_ { 33144 reqHeaders[k] = v 33145 } 33146 reqHeaders.Set("User-Agent", c.s.userAgent()) 33147 var body io.Reader = nil 33148 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithm) 33149 if err != nil { 33150 return nil, err 33151 } 33152 reqHeaders.Set("Content-Type", "application/json") 33153 c.urlParams_.Set("alt", alt) 33154 c.urlParams_.Set("prettyPrint", "false") 33155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms") 33156 urls += "?" + c.urlParams_.Encode() 33157 req, err := http.NewRequest("POST", urls, body) 33158 if err != nil { 33159 return nil, err 33160 } 33161 req.Header = reqHeaders 33162 return gensupport.SendRequest(c.ctx_, c.s.client, req) 33163 } 33164 33165 // Do executes the "displayvideo.customBiddingAlgorithms.create" call. 33166 // Exactly one of *CustomBiddingAlgorithm or error will be non-nil. Any 33167 // non-2xx status code is an error. Response headers are in either 33168 // *CustomBiddingAlgorithm.ServerResponse.Header or (if a response was 33169 // returned at all) in error.(*googleapi.Error).Header. Use 33170 // googleapi.IsNotModified to check whether the returned error was 33171 // because http.StatusNotModified was returned. 33172 func (c *CustomBiddingAlgorithmsCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) { 33173 gensupport.SetOptions(c.urlParams_, opts...) 33174 res, err := c.doRequest("json") 33175 if res != nil && res.StatusCode == http.StatusNotModified { 33176 if res.Body != nil { 33177 res.Body.Close() 33178 } 33179 return nil, gensupport.WrapError(&googleapi.Error{ 33180 Code: res.StatusCode, 33181 Header: res.Header, 33182 }) 33183 } 33184 if err != nil { 33185 return nil, err 33186 } 33187 defer googleapi.CloseBody(res) 33188 if err := googleapi.CheckResponse(res); err != nil { 33189 return nil, gensupport.WrapError(err) 33190 } 33191 ret := &CustomBiddingAlgorithm{ 33192 ServerResponse: googleapi.ServerResponse{ 33193 Header: res.Header, 33194 HTTPStatusCode: res.StatusCode, 33195 }, 33196 } 33197 target := &ret 33198 if err := gensupport.DecodeResponse(target, res); err != nil { 33199 return nil, err 33200 } 33201 return ret, nil 33202 // { 33203 // "description": "Creates a new custom bidding algorithm. Returns the newly created custom bidding algorithm if successful.", 33204 // "flatPath": "v1/customBiddingAlgorithms", 33205 // "httpMethod": "POST", 33206 // "id": "displayvideo.customBiddingAlgorithms.create", 33207 // "parameterOrder": [], 33208 // "parameters": {}, 33209 // "path": "v1/customBiddingAlgorithms", 33210 // "request": { 33211 // "$ref": "CustomBiddingAlgorithm" 33212 // }, 33213 // "response": { 33214 // "$ref": "CustomBiddingAlgorithm" 33215 // }, 33216 // "scopes": [ 33217 // "https://www.googleapis.com/auth/display-video" 33218 // ] 33219 // } 33220 33221 } 33222 33223 // method id "displayvideo.customBiddingAlgorithms.get": 33224 33225 type CustomBiddingAlgorithmsGetCall struct { 33226 s *Service 33227 customBiddingAlgorithmId int64 33228 urlParams_ gensupport.URLParams 33229 ifNoneMatch_ string 33230 ctx_ context.Context 33231 header_ http.Header 33232 } 33233 33234 // Get: Gets a custom bidding algorithm. 33235 // 33236 // - customBiddingAlgorithmId: The ID of the custom bidding algorithm to 33237 // fetch. 33238 func (r *CustomBiddingAlgorithmsService) Get(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsGetCall { 33239 c := &CustomBiddingAlgorithmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 33240 c.customBiddingAlgorithmId = customBiddingAlgorithmId 33241 return c 33242 } 33243 33244 // AdvertiserId sets the optional parameter "advertiserId": The ID of 33245 // the DV360 partner that has access to the custom bidding algorithm. 33246 func (c *CustomBiddingAlgorithmsGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsGetCall { 33247 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 33248 return c 33249 } 33250 33251 // PartnerId sets the optional parameter "partnerId": The ID of the 33252 // DV360 partner that has access to the custom bidding algorithm. 33253 func (c *CustomBiddingAlgorithmsGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsGetCall { 33254 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 33255 return c 33256 } 33257 33258 // Fields allows partial responses to be retrieved. See 33259 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 33260 // for more information. 33261 func (c *CustomBiddingAlgorithmsGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsGetCall { 33262 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 33263 return c 33264 } 33265 33266 // IfNoneMatch sets the optional parameter which makes the operation 33267 // fail if the object's ETag matches the given value. This is useful for 33268 // getting updates only after the object has changed since the last 33269 // request. Use googleapi.IsNotModified to check whether the response 33270 // error from Do is the result of In-None-Match. 33271 func (c *CustomBiddingAlgorithmsGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsGetCall { 33272 c.ifNoneMatch_ = entityTag 33273 return c 33274 } 33275 33276 // Context sets the context to be used in this call's Do method. Any 33277 // pending HTTP request will be aborted if the provided context is 33278 // canceled. 33279 func (c *CustomBiddingAlgorithmsGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsGetCall { 33280 c.ctx_ = ctx 33281 return c 33282 } 33283 33284 // Header returns an http.Header that can be modified by the caller to 33285 // add HTTP headers to the request. 33286 func (c *CustomBiddingAlgorithmsGetCall) Header() http.Header { 33287 if c.header_ == nil { 33288 c.header_ = make(http.Header) 33289 } 33290 return c.header_ 33291 } 33292 33293 func (c *CustomBiddingAlgorithmsGetCall) doRequest(alt string) (*http.Response, error) { 33294 reqHeaders := make(http.Header) 33295 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 33296 for k, v := range c.header_ { 33297 reqHeaders[k] = v 33298 } 33299 reqHeaders.Set("User-Agent", c.s.userAgent()) 33300 if c.ifNoneMatch_ != "" { 33301 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 33302 } 33303 var body io.Reader = nil 33304 c.urlParams_.Set("alt", alt) 33305 c.urlParams_.Set("prettyPrint", "false") 33306 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}") 33307 urls += "?" + c.urlParams_.Encode() 33308 req, err := http.NewRequest("GET", urls, body) 33309 if err != nil { 33310 return nil, err 33311 } 33312 req.Header = reqHeaders 33313 googleapi.Expand(req.URL, map[string]string{ 33314 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10), 33315 }) 33316 return gensupport.SendRequest(c.ctx_, c.s.client, req) 33317 } 33318 33319 // Do executes the "displayvideo.customBiddingAlgorithms.get" call. 33320 // Exactly one of *CustomBiddingAlgorithm or error will be non-nil. Any 33321 // non-2xx status code is an error. Response headers are in either 33322 // *CustomBiddingAlgorithm.ServerResponse.Header or (if a response was 33323 // returned at all) in error.(*googleapi.Error).Header. Use 33324 // googleapi.IsNotModified to check whether the returned error was 33325 // because http.StatusNotModified was returned. 33326 func (c *CustomBiddingAlgorithmsGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) { 33327 gensupport.SetOptions(c.urlParams_, opts...) 33328 res, err := c.doRequest("json") 33329 if res != nil && res.StatusCode == http.StatusNotModified { 33330 if res.Body != nil { 33331 res.Body.Close() 33332 } 33333 return nil, gensupport.WrapError(&googleapi.Error{ 33334 Code: res.StatusCode, 33335 Header: res.Header, 33336 }) 33337 } 33338 if err != nil { 33339 return nil, err 33340 } 33341 defer googleapi.CloseBody(res) 33342 if err := googleapi.CheckResponse(res); err != nil { 33343 return nil, gensupport.WrapError(err) 33344 } 33345 ret := &CustomBiddingAlgorithm{ 33346 ServerResponse: googleapi.ServerResponse{ 33347 Header: res.Header, 33348 HTTPStatusCode: res.StatusCode, 33349 }, 33350 } 33351 target := &ret 33352 if err := gensupport.DecodeResponse(target, res); err != nil { 33353 return nil, err 33354 } 33355 return ret, nil 33356 // { 33357 // "description": "Gets a custom bidding algorithm.", 33358 // "flatPath": "v1/customBiddingAlgorithms/{customBiddingAlgorithmsId}", 33359 // "httpMethod": "GET", 33360 // "id": "displayvideo.customBiddingAlgorithms.get", 33361 // "parameterOrder": [ 33362 // "customBiddingAlgorithmId" 33363 // ], 33364 // "parameters": { 33365 // "advertiserId": { 33366 // "description": "The ID of the DV360 partner that has access to the custom bidding algorithm.", 33367 // "format": "int64", 33368 // "location": "query", 33369 // "type": "string" 33370 // }, 33371 // "customBiddingAlgorithmId": { 33372 // "description": "Required. The ID of the custom bidding algorithm to fetch.", 33373 // "format": "int64", 33374 // "location": "path", 33375 // "pattern": "^[^/]+$", 33376 // "required": true, 33377 // "type": "string" 33378 // }, 33379 // "partnerId": { 33380 // "description": "The ID of the DV360 partner that has access to the custom bidding algorithm.", 33381 // "format": "int64", 33382 // "location": "query", 33383 // "type": "string" 33384 // } 33385 // }, 33386 // "path": "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}", 33387 // "response": { 33388 // "$ref": "CustomBiddingAlgorithm" 33389 // }, 33390 // "scopes": [ 33391 // "https://www.googleapis.com/auth/display-video" 33392 // ] 33393 // } 33394 33395 } 33396 33397 // method id "displayvideo.customBiddingAlgorithms.list": 33398 33399 type CustomBiddingAlgorithmsListCall struct { 33400 s *Service 33401 urlParams_ gensupport.URLParams 33402 ifNoneMatch_ string 33403 ctx_ context.Context 33404 header_ http.Header 33405 } 33406 33407 // List: Lists custom bidding algorithms that are accessible to the 33408 // current user and can be used in bidding stratgies. The order is 33409 // defined by the order_by parameter. 33410 func (r *CustomBiddingAlgorithmsService) List() *CustomBiddingAlgorithmsListCall { 33411 c := &CustomBiddingAlgorithmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 33412 return c 33413 } 33414 33415 // AdvertiserId sets the optional parameter "advertiserId": The ID of 33416 // the DV360 advertiser that has access to the custom bidding algorithm. 33417 func (c *CustomBiddingAlgorithmsListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsListCall { 33418 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 33419 return c 33420 } 33421 33422 // Filter sets the optional parameter "filter": Allows filtering by 33423 // custom bidding algorithm fields. Supported syntax: * Filter 33424 // expressions are made up of one or more restrictions. * Restrictions 33425 // can be combined by `AND`. A sequence of restrictions implicitly uses 33426 // `AND`. * A restriction has the form of `{field} {operator} {value}`. 33427 // * The `customBiddingAlgorithmType` field must use the `EQUALS (=)` 33428 // operator. * The `displayName` field must use the `HAS (:)` operator. 33429 // Supported fields: * `customBiddingAlgorithmType` * `displayName` 33430 // Examples: * All custom bidding algorithms for which the display name 33431 // contains "politics": `displayName:"politics". * All custom bidding 33432 // algorithms for which the type is "SCRIPT_BASED": 33433 // `customBiddingAlgorithmType=SCRIPT_BASED` The length of this field 33434 // should be no more than 500 characters. Reference our filter `LIST` 33435 // requests (/display-video/api/guides/how-tos/filters) guide for more 33436 // information. 33437 func (c *CustomBiddingAlgorithmsListCall) Filter(filter string) *CustomBiddingAlgorithmsListCall { 33438 c.urlParams_.Set("filter", filter) 33439 return c 33440 } 33441 33442 // OrderBy sets the optional parameter "orderBy": Field by which to sort 33443 // the list. Acceptable values are: * `displayName` (default) The 33444 // default sorting order is ascending. To specify descending order for a 33445 // field, a suffix "desc" should be added to the field name. Example: 33446 // `displayName desc`. 33447 func (c *CustomBiddingAlgorithmsListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsListCall { 33448 c.urlParams_.Set("orderBy", orderBy) 33449 return c 33450 } 33451 33452 // PageSize sets the optional parameter "pageSize": Requested page size. 33453 // Must be between `1` and `200`. If unspecified will default to `100`. 33454 // Returns error code `INVALID_ARGUMENT` if an invalid value is 33455 // specified. 33456 func (c *CustomBiddingAlgorithmsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsListCall { 33457 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 33458 return c 33459 } 33460 33461 // PageToken sets the optional parameter "pageToken": A token 33462 // identifying a page of results the server should return. Typically, 33463 // this is the value of next_page_token returned from the previous call 33464 // to `ListCustomBiddingAlgorithms` method. If not specified, the first 33465 // page of results will be returned. 33466 func (c *CustomBiddingAlgorithmsListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsListCall { 33467 c.urlParams_.Set("pageToken", pageToken) 33468 return c 33469 } 33470 33471 // PartnerId sets the optional parameter "partnerId": The ID of the 33472 // DV360 partner that has access to the custom bidding algorithm. 33473 func (c *CustomBiddingAlgorithmsListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsListCall { 33474 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 33475 return c 33476 } 33477 33478 // Fields allows partial responses to be retrieved. See 33479 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 33480 // for more information. 33481 func (c *CustomBiddingAlgorithmsListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsListCall { 33482 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 33483 return c 33484 } 33485 33486 // IfNoneMatch sets the optional parameter which makes the operation 33487 // fail if the object's ETag matches the given value. This is useful for 33488 // getting updates only after the object has changed since the last 33489 // request. Use googleapi.IsNotModified to check whether the response 33490 // error from Do is the result of In-None-Match. 33491 func (c *CustomBiddingAlgorithmsListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsListCall { 33492 c.ifNoneMatch_ = entityTag 33493 return c 33494 } 33495 33496 // Context sets the context to be used in this call's Do method. Any 33497 // pending HTTP request will be aborted if the provided context is 33498 // canceled. 33499 func (c *CustomBiddingAlgorithmsListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsListCall { 33500 c.ctx_ = ctx 33501 return c 33502 } 33503 33504 // Header returns an http.Header that can be modified by the caller to 33505 // add HTTP headers to the request. 33506 func (c *CustomBiddingAlgorithmsListCall) Header() http.Header { 33507 if c.header_ == nil { 33508 c.header_ = make(http.Header) 33509 } 33510 return c.header_ 33511 } 33512 33513 func (c *CustomBiddingAlgorithmsListCall) doRequest(alt string) (*http.Response, error) { 33514 reqHeaders := make(http.Header) 33515 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 33516 for k, v := range c.header_ { 33517 reqHeaders[k] = v 33518 } 33519 reqHeaders.Set("User-Agent", c.s.userAgent()) 33520 if c.ifNoneMatch_ != "" { 33521 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 33522 } 33523 var body io.Reader = nil 33524 c.urlParams_.Set("alt", alt) 33525 c.urlParams_.Set("prettyPrint", "false") 33526 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms") 33527 urls += "?" + c.urlParams_.Encode() 33528 req, err := http.NewRequest("GET", urls, body) 33529 if err != nil { 33530 return nil, err 33531 } 33532 req.Header = reqHeaders 33533 return gensupport.SendRequest(c.ctx_, c.s.client, req) 33534 } 33535 33536 // Do executes the "displayvideo.customBiddingAlgorithms.list" call. 33537 // Exactly one of *ListCustomBiddingAlgorithmsResponse or error will be 33538 // non-nil. Any non-2xx status code is an error. Response headers are in 33539 // either *ListCustomBiddingAlgorithmsResponse.ServerResponse.Header or 33540 // (if a response was returned at all) in 33541 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 33542 // whether the returned error was because http.StatusNotModified was 33543 // returned. 33544 func (c *CustomBiddingAlgorithmsListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingAlgorithmsResponse, error) { 33545 gensupport.SetOptions(c.urlParams_, opts...) 33546 res, err := c.doRequest("json") 33547 if res != nil && res.StatusCode == http.StatusNotModified { 33548 if res.Body != nil { 33549 res.Body.Close() 33550 } 33551 return nil, gensupport.WrapError(&googleapi.Error{ 33552 Code: res.StatusCode, 33553 Header: res.Header, 33554 }) 33555 } 33556 if err != nil { 33557 return nil, err 33558 } 33559 defer googleapi.CloseBody(res) 33560 if err := googleapi.CheckResponse(res); err != nil { 33561 return nil, gensupport.WrapError(err) 33562 } 33563 ret := &ListCustomBiddingAlgorithmsResponse{ 33564 ServerResponse: googleapi.ServerResponse{ 33565 Header: res.Header, 33566 HTTPStatusCode: res.StatusCode, 33567 }, 33568 } 33569 target := &ret 33570 if err := gensupport.DecodeResponse(target, res); err != nil { 33571 return nil, err 33572 } 33573 return ret, nil 33574 // { 33575 // "description": "Lists custom bidding algorithms that are accessible to the current user and can be used in bidding stratgies. The order is defined by the order_by parameter.", 33576 // "flatPath": "v1/customBiddingAlgorithms", 33577 // "httpMethod": "GET", 33578 // "id": "displayvideo.customBiddingAlgorithms.list", 33579 // "parameterOrder": [], 33580 // "parameters": { 33581 // "advertiserId": { 33582 // "description": "The ID of the DV360 advertiser that has access to the custom bidding algorithm.", 33583 // "format": "int64", 33584 // "location": "query", 33585 // "type": "string" 33586 // }, 33587 // "filter": { 33588 // "description": "Allows filtering by custom bidding algorithm fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND`. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `customBiddingAlgorithmType` field must use the `EQUALS (=)` operator. * The `displayName` field must use the `HAS (:)` operator. Supported fields: * `customBiddingAlgorithmType` * `displayName` Examples: * All custom bidding algorithms for which the display name contains \"politics\": `displayName:\"politics\"`. * All custom bidding algorithms for which the type is \"SCRIPT_BASED\": `customBiddingAlgorithmType=SCRIPT_BASED` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 33589 // "location": "query", 33590 // "type": "string" 33591 // }, 33592 // "orderBy": { 33593 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 33594 // "location": "query", 33595 // "type": "string" 33596 // }, 33597 // "pageSize": { 33598 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 33599 // "format": "int32", 33600 // "location": "query", 33601 // "type": "integer" 33602 // }, 33603 // "pageToken": { 33604 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCustomBiddingAlgorithms` method. If not specified, the first page of results will be returned.", 33605 // "location": "query", 33606 // "type": "string" 33607 // }, 33608 // "partnerId": { 33609 // "description": "The ID of the DV360 partner that has access to the custom bidding algorithm.", 33610 // "format": "int64", 33611 // "location": "query", 33612 // "type": "string" 33613 // } 33614 // }, 33615 // "path": "v1/customBiddingAlgorithms", 33616 // "response": { 33617 // "$ref": "ListCustomBiddingAlgorithmsResponse" 33618 // }, 33619 // "scopes": [ 33620 // "https://www.googleapis.com/auth/display-video" 33621 // ] 33622 // } 33623 33624 } 33625 33626 // Pages invokes f for each page of results. 33627 // A non-nil error returned from f will halt the iteration. 33628 // The provided context supersedes any context provided to the Context method. 33629 func (c *CustomBiddingAlgorithmsListCall) Pages(ctx context.Context, f func(*ListCustomBiddingAlgorithmsResponse) error) error { 33630 c.ctx_ = ctx 33631 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 33632 for { 33633 x, err := c.Do() 33634 if err != nil { 33635 return err 33636 } 33637 if err := f(x); err != nil { 33638 return err 33639 } 33640 if x.NextPageToken == "" { 33641 return nil 33642 } 33643 c.PageToken(x.NextPageToken) 33644 } 33645 } 33646 33647 // method id "displayvideo.customBiddingAlgorithms.patch": 33648 33649 type CustomBiddingAlgorithmsPatchCall struct { 33650 s *Service 33651 customBiddingAlgorithmId int64 33652 custombiddingalgorithm *CustomBiddingAlgorithm 33653 urlParams_ gensupport.URLParams 33654 ctx_ context.Context 33655 header_ http.Header 33656 } 33657 33658 // Patch: Updates an existing custom bidding algorithm. Returns the 33659 // updated custom bidding algorithm if successful. 33660 // 33661 // - customBiddingAlgorithmId: Output only. The unique ID of the custom 33662 // bidding algorithm. Assigned by the system. 33663 func (r *CustomBiddingAlgorithmsService) Patch(customBiddingAlgorithmId int64, custombiddingalgorithm *CustomBiddingAlgorithm) *CustomBiddingAlgorithmsPatchCall { 33664 c := &CustomBiddingAlgorithmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 33665 c.customBiddingAlgorithmId = customBiddingAlgorithmId 33666 c.custombiddingalgorithm = custombiddingalgorithm 33667 return c 33668 } 33669 33670 // UpdateMask sets the optional parameter "updateMask": Required. The 33671 // mask to control which fields to update. 33672 func (c *CustomBiddingAlgorithmsPatchCall) UpdateMask(updateMask string) *CustomBiddingAlgorithmsPatchCall { 33673 c.urlParams_.Set("updateMask", updateMask) 33674 return c 33675 } 33676 33677 // Fields allows partial responses to be retrieved. See 33678 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 33679 // for more information. 33680 func (c *CustomBiddingAlgorithmsPatchCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsPatchCall { 33681 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 33682 return c 33683 } 33684 33685 // Context sets the context to be used in this call's Do method. Any 33686 // pending HTTP request will be aborted if the provided context is 33687 // canceled. 33688 func (c *CustomBiddingAlgorithmsPatchCall) Context(ctx context.Context) *CustomBiddingAlgorithmsPatchCall { 33689 c.ctx_ = ctx 33690 return c 33691 } 33692 33693 // Header returns an http.Header that can be modified by the caller to 33694 // add HTTP headers to the request. 33695 func (c *CustomBiddingAlgorithmsPatchCall) Header() http.Header { 33696 if c.header_ == nil { 33697 c.header_ = make(http.Header) 33698 } 33699 return c.header_ 33700 } 33701 33702 func (c *CustomBiddingAlgorithmsPatchCall) doRequest(alt string) (*http.Response, error) { 33703 reqHeaders := make(http.Header) 33704 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 33705 for k, v := range c.header_ { 33706 reqHeaders[k] = v 33707 } 33708 reqHeaders.Set("User-Agent", c.s.userAgent()) 33709 var body io.Reader = nil 33710 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingalgorithm) 33711 if err != nil { 33712 return nil, err 33713 } 33714 reqHeaders.Set("Content-Type", "application/json") 33715 c.urlParams_.Set("alt", alt) 33716 c.urlParams_.Set("prettyPrint", "false") 33717 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}") 33718 urls += "?" + c.urlParams_.Encode() 33719 req, err := http.NewRequest("PATCH", urls, body) 33720 if err != nil { 33721 return nil, err 33722 } 33723 req.Header = reqHeaders 33724 googleapi.Expand(req.URL, map[string]string{ 33725 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10), 33726 }) 33727 return gensupport.SendRequest(c.ctx_, c.s.client, req) 33728 } 33729 33730 // Do executes the "displayvideo.customBiddingAlgorithms.patch" call. 33731 // Exactly one of *CustomBiddingAlgorithm or error will be non-nil. Any 33732 // non-2xx status code is an error. Response headers are in either 33733 // *CustomBiddingAlgorithm.ServerResponse.Header or (if a response was 33734 // returned at all) in error.(*googleapi.Error).Header. Use 33735 // googleapi.IsNotModified to check whether the returned error was 33736 // because http.StatusNotModified was returned. 33737 func (c *CustomBiddingAlgorithmsPatchCall) Do(opts ...googleapi.CallOption) (*CustomBiddingAlgorithm, error) { 33738 gensupport.SetOptions(c.urlParams_, opts...) 33739 res, err := c.doRequest("json") 33740 if res != nil && res.StatusCode == http.StatusNotModified { 33741 if res.Body != nil { 33742 res.Body.Close() 33743 } 33744 return nil, gensupport.WrapError(&googleapi.Error{ 33745 Code: res.StatusCode, 33746 Header: res.Header, 33747 }) 33748 } 33749 if err != nil { 33750 return nil, err 33751 } 33752 defer googleapi.CloseBody(res) 33753 if err := googleapi.CheckResponse(res); err != nil { 33754 return nil, gensupport.WrapError(err) 33755 } 33756 ret := &CustomBiddingAlgorithm{ 33757 ServerResponse: googleapi.ServerResponse{ 33758 Header: res.Header, 33759 HTTPStatusCode: res.StatusCode, 33760 }, 33761 } 33762 target := &ret 33763 if err := gensupport.DecodeResponse(target, res); err != nil { 33764 return nil, err 33765 } 33766 return ret, nil 33767 // { 33768 // "description": "Updates an existing custom bidding algorithm. Returns the updated custom bidding algorithm if successful.", 33769 // "flatPath": "v1/customBiddingAlgorithms/{customBiddingAlgorithmsId}", 33770 // "httpMethod": "PATCH", 33771 // "id": "displayvideo.customBiddingAlgorithms.patch", 33772 // "parameterOrder": [ 33773 // "customBiddingAlgorithmId" 33774 // ], 33775 // "parameters": { 33776 // "customBiddingAlgorithmId": { 33777 // "description": "Output only. The unique ID of the custom bidding algorithm. Assigned by the system.", 33778 // "format": "int64", 33779 // "location": "path", 33780 // "pattern": "^[^/]+$", 33781 // "required": true, 33782 // "type": "string" 33783 // }, 33784 // "updateMask": { 33785 // "description": "Required. The mask to control which fields to update.", 33786 // "format": "google-fieldmask", 33787 // "location": "query", 33788 // "type": "string" 33789 // } 33790 // }, 33791 // "path": "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}", 33792 // "request": { 33793 // "$ref": "CustomBiddingAlgorithm" 33794 // }, 33795 // "response": { 33796 // "$ref": "CustomBiddingAlgorithm" 33797 // }, 33798 // "scopes": [ 33799 // "https://www.googleapis.com/auth/display-video" 33800 // ] 33801 // } 33802 33803 } 33804 33805 // method id "displayvideo.customBiddingAlgorithms.uploadScript": 33806 33807 type CustomBiddingAlgorithmsUploadScriptCall struct { 33808 s *Service 33809 customBiddingAlgorithmId int64 33810 urlParams_ gensupport.URLParams 33811 ifNoneMatch_ string 33812 ctx_ context.Context 33813 header_ http.Header 33814 } 33815 33816 // UploadScript: Creates a custom bidding script reference object for a 33817 // script file. The resulting reference object provides a resource path 33818 // to which the script file should be uploaded. This reference object 33819 // should be included in when creating a new custom bidding script 33820 // object. 33821 // 33822 // - customBiddingAlgorithmId: The ID of the custom bidding algorithm 33823 // owns the script. 33824 func (r *CustomBiddingAlgorithmsService) UploadScript(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsUploadScriptCall { 33825 c := &CustomBiddingAlgorithmsUploadScriptCall{s: r.s, urlParams_: make(gensupport.URLParams)} 33826 c.customBiddingAlgorithmId = customBiddingAlgorithmId 33827 return c 33828 } 33829 33830 // AdvertiserId sets the optional parameter "advertiserId": The ID of 33831 // the advertiser that owns the parent custom bidding algorithm. 33832 func (c *CustomBiddingAlgorithmsUploadScriptCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsUploadScriptCall { 33833 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 33834 return c 33835 } 33836 33837 // PartnerId sets the optional parameter "partnerId": The ID of the 33838 // partner that owns the parent custom bidding algorithm. Only this 33839 // partner will have write access to this custom bidding script. 33840 func (c *CustomBiddingAlgorithmsUploadScriptCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsUploadScriptCall { 33841 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 33842 return c 33843 } 33844 33845 // Fields allows partial responses to be retrieved. See 33846 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 33847 // for more information. 33848 func (c *CustomBiddingAlgorithmsUploadScriptCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsUploadScriptCall { 33849 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 33850 return c 33851 } 33852 33853 // IfNoneMatch sets the optional parameter which makes the operation 33854 // fail if the object's ETag matches the given value. This is useful for 33855 // getting updates only after the object has changed since the last 33856 // request. Use googleapi.IsNotModified to check whether the response 33857 // error from Do is the result of In-None-Match. 33858 func (c *CustomBiddingAlgorithmsUploadScriptCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsUploadScriptCall { 33859 c.ifNoneMatch_ = entityTag 33860 return c 33861 } 33862 33863 // Context sets the context to be used in this call's Do method. Any 33864 // pending HTTP request will be aborted if the provided context is 33865 // canceled. 33866 func (c *CustomBiddingAlgorithmsUploadScriptCall) Context(ctx context.Context) *CustomBiddingAlgorithmsUploadScriptCall { 33867 c.ctx_ = ctx 33868 return c 33869 } 33870 33871 // Header returns an http.Header that can be modified by the caller to 33872 // add HTTP headers to the request. 33873 func (c *CustomBiddingAlgorithmsUploadScriptCall) Header() http.Header { 33874 if c.header_ == nil { 33875 c.header_ = make(http.Header) 33876 } 33877 return c.header_ 33878 } 33879 33880 func (c *CustomBiddingAlgorithmsUploadScriptCall) doRequest(alt string) (*http.Response, error) { 33881 reqHeaders := make(http.Header) 33882 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 33883 for k, v := range c.header_ { 33884 reqHeaders[k] = v 33885 } 33886 reqHeaders.Set("User-Agent", c.s.userAgent()) 33887 if c.ifNoneMatch_ != "" { 33888 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 33889 } 33890 var body io.Reader = nil 33891 c.urlParams_.Set("alt", alt) 33892 c.urlParams_.Set("prettyPrint", "false") 33893 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}:uploadScript") 33894 urls += "?" + c.urlParams_.Encode() 33895 req, err := http.NewRequest("GET", urls, body) 33896 if err != nil { 33897 return nil, err 33898 } 33899 req.Header = reqHeaders 33900 googleapi.Expand(req.URL, map[string]string{ 33901 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10), 33902 }) 33903 return gensupport.SendRequest(c.ctx_, c.s.client, req) 33904 } 33905 33906 // Do executes the "displayvideo.customBiddingAlgorithms.uploadScript" call. 33907 // Exactly one of *CustomBiddingScriptRef or error will be non-nil. Any 33908 // non-2xx status code is an error. Response headers are in either 33909 // *CustomBiddingScriptRef.ServerResponse.Header or (if a response was 33910 // returned at all) in error.(*googleapi.Error).Header. Use 33911 // googleapi.IsNotModified to check whether the returned error was 33912 // because http.StatusNotModified was returned. 33913 func (c *CustomBiddingAlgorithmsUploadScriptCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScriptRef, error) { 33914 gensupport.SetOptions(c.urlParams_, opts...) 33915 res, err := c.doRequest("json") 33916 if res != nil && res.StatusCode == http.StatusNotModified { 33917 if res.Body != nil { 33918 res.Body.Close() 33919 } 33920 return nil, gensupport.WrapError(&googleapi.Error{ 33921 Code: res.StatusCode, 33922 Header: res.Header, 33923 }) 33924 } 33925 if err != nil { 33926 return nil, err 33927 } 33928 defer googleapi.CloseBody(res) 33929 if err := googleapi.CheckResponse(res); err != nil { 33930 return nil, gensupport.WrapError(err) 33931 } 33932 ret := &CustomBiddingScriptRef{ 33933 ServerResponse: googleapi.ServerResponse{ 33934 Header: res.Header, 33935 HTTPStatusCode: res.StatusCode, 33936 }, 33937 } 33938 target := &ret 33939 if err := gensupport.DecodeResponse(target, res); err != nil { 33940 return nil, err 33941 } 33942 return ret, nil 33943 // { 33944 // "description": "Creates a custom bidding script reference object for a script file. The resulting reference object provides a resource path to which the script file should be uploaded. This reference object should be included in when creating a new custom bidding script object.", 33945 // "flatPath": "v1/customBiddingAlgorithms/{customBiddingAlgorithmsId}:uploadScript", 33946 // "httpMethod": "GET", 33947 // "id": "displayvideo.customBiddingAlgorithms.uploadScript", 33948 // "parameterOrder": [ 33949 // "customBiddingAlgorithmId" 33950 // ], 33951 // "parameters": { 33952 // "advertiserId": { 33953 // "description": "The ID of the advertiser that owns the parent custom bidding algorithm.", 33954 // "format": "int64", 33955 // "location": "query", 33956 // "type": "string" 33957 // }, 33958 // "customBiddingAlgorithmId": { 33959 // "description": "Required. The ID of the custom bidding algorithm owns the script.", 33960 // "format": "int64", 33961 // "location": "path", 33962 // "pattern": "^[^/]+$", 33963 // "required": true, 33964 // "type": "string" 33965 // }, 33966 // "partnerId": { 33967 // "description": "The ID of the partner that owns the parent custom bidding algorithm. Only this partner will have write access to this custom bidding script.", 33968 // "format": "int64", 33969 // "location": "query", 33970 // "type": "string" 33971 // } 33972 // }, 33973 // "path": "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}:uploadScript", 33974 // "response": { 33975 // "$ref": "CustomBiddingScriptRef" 33976 // }, 33977 // "scopes": [ 33978 // "https://www.googleapis.com/auth/display-video" 33979 // ] 33980 // } 33981 33982 } 33983 33984 // method id "displayvideo.customBiddingAlgorithms.scripts.create": 33985 33986 type CustomBiddingAlgorithmsScriptsCreateCall struct { 33987 s *Service 33988 customBiddingAlgorithmId int64 33989 custombiddingscript *CustomBiddingScript 33990 urlParams_ gensupport.URLParams 33991 ctx_ context.Context 33992 header_ http.Header 33993 } 33994 33995 // Create: Creates a new custom bidding script. Returns the newly 33996 // created script if successful. 33997 // 33998 // - customBiddingAlgorithmId: The ID of the custom bidding algorithm 33999 // that owns the script. 34000 func (r *CustomBiddingAlgorithmsScriptsService) Create(customBiddingAlgorithmId int64, custombiddingscript *CustomBiddingScript) *CustomBiddingAlgorithmsScriptsCreateCall { 34001 c := &CustomBiddingAlgorithmsScriptsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 34002 c.customBiddingAlgorithmId = customBiddingAlgorithmId 34003 c.custombiddingscript = custombiddingscript 34004 return c 34005 } 34006 34007 // AdvertiserId sets the optional parameter "advertiserId": The ID of 34008 // the advertiser that owns the parent custom bidding algorithm. 34009 func (c *CustomBiddingAlgorithmsScriptsCreateCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsCreateCall { 34010 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 34011 return c 34012 } 34013 34014 // PartnerId sets the optional parameter "partnerId": The ID of the 34015 // partner that owns the parent custom bidding algorithm. Only this 34016 // partner will have write access to this custom bidding script. 34017 func (c *CustomBiddingAlgorithmsScriptsCreateCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsCreateCall { 34018 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 34019 return c 34020 } 34021 34022 // Fields allows partial responses to be retrieved. See 34023 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 34024 // for more information. 34025 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsCreateCall { 34026 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 34027 return c 34028 } 34029 34030 // Context sets the context to be used in this call's Do method. Any 34031 // pending HTTP request will be aborted if the provided context is 34032 // canceled. 34033 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsCreateCall { 34034 c.ctx_ = ctx 34035 return c 34036 } 34037 34038 // Header returns an http.Header that can be modified by the caller to 34039 // add HTTP headers to the request. 34040 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Header() http.Header { 34041 if c.header_ == nil { 34042 c.header_ = make(http.Header) 34043 } 34044 return c.header_ 34045 } 34046 34047 func (c *CustomBiddingAlgorithmsScriptsCreateCall) doRequest(alt string) (*http.Response, error) { 34048 reqHeaders := make(http.Header) 34049 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 34050 for k, v := range c.header_ { 34051 reqHeaders[k] = v 34052 } 34053 reqHeaders.Set("User-Agent", c.s.userAgent()) 34054 var body io.Reader = nil 34055 body, err := googleapi.WithoutDataWrapper.JSONReader(c.custombiddingscript) 34056 if err != nil { 34057 return nil, err 34058 } 34059 reqHeaders.Set("Content-Type", "application/json") 34060 c.urlParams_.Set("alt", alt) 34061 c.urlParams_.Set("prettyPrint", "false") 34062 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts") 34063 urls += "?" + c.urlParams_.Encode() 34064 req, err := http.NewRequest("POST", urls, body) 34065 if err != nil { 34066 return nil, err 34067 } 34068 req.Header = reqHeaders 34069 googleapi.Expand(req.URL, map[string]string{ 34070 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10), 34071 }) 34072 return gensupport.SendRequest(c.ctx_, c.s.client, req) 34073 } 34074 34075 // Do executes the "displayvideo.customBiddingAlgorithms.scripts.create" call. 34076 // Exactly one of *CustomBiddingScript or error will be non-nil. Any 34077 // non-2xx status code is an error. Response headers are in either 34078 // *CustomBiddingScript.ServerResponse.Header or (if a response was 34079 // returned at all) in error.(*googleapi.Error).Header. Use 34080 // googleapi.IsNotModified to check whether the returned error was 34081 // because http.StatusNotModified was returned. 34082 func (c *CustomBiddingAlgorithmsScriptsCreateCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScript, error) { 34083 gensupport.SetOptions(c.urlParams_, opts...) 34084 res, err := c.doRequest("json") 34085 if res != nil && res.StatusCode == http.StatusNotModified { 34086 if res.Body != nil { 34087 res.Body.Close() 34088 } 34089 return nil, gensupport.WrapError(&googleapi.Error{ 34090 Code: res.StatusCode, 34091 Header: res.Header, 34092 }) 34093 } 34094 if err != nil { 34095 return nil, err 34096 } 34097 defer googleapi.CloseBody(res) 34098 if err := googleapi.CheckResponse(res); err != nil { 34099 return nil, gensupport.WrapError(err) 34100 } 34101 ret := &CustomBiddingScript{ 34102 ServerResponse: googleapi.ServerResponse{ 34103 Header: res.Header, 34104 HTTPStatusCode: res.StatusCode, 34105 }, 34106 } 34107 target := &ret 34108 if err := gensupport.DecodeResponse(target, res); err != nil { 34109 return nil, err 34110 } 34111 return ret, nil 34112 // { 34113 // "description": "Creates a new custom bidding script. Returns the newly created script if successful.", 34114 // "flatPath": "v1/customBiddingAlgorithms/{customBiddingAlgorithmsId}/scripts", 34115 // "httpMethod": "POST", 34116 // "id": "displayvideo.customBiddingAlgorithms.scripts.create", 34117 // "parameterOrder": [ 34118 // "customBiddingAlgorithmId" 34119 // ], 34120 // "parameters": { 34121 // "advertiserId": { 34122 // "description": "The ID of the advertiser that owns the parent custom bidding algorithm.", 34123 // "format": "int64", 34124 // "location": "query", 34125 // "type": "string" 34126 // }, 34127 // "customBiddingAlgorithmId": { 34128 // "description": "Required. The ID of the custom bidding algorithm that owns the script.", 34129 // "format": "int64", 34130 // "location": "path", 34131 // "pattern": "^[^/]+$", 34132 // "required": true, 34133 // "type": "string" 34134 // }, 34135 // "partnerId": { 34136 // "description": "The ID of the partner that owns the parent custom bidding algorithm. Only this partner will have write access to this custom bidding script.", 34137 // "format": "int64", 34138 // "location": "query", 34139 // "type": "string" 34140 // } 34141 // }, 34142 // "path": "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts", 34143 // "request": { 34144 // "$ref": "CustomBiddingScript" 34145 // }, 34146 // "response": { 34147 // "$ref": "CustomBiddingScript" 34148 // }, 34149 // "scopes": [ 34150 // "https://www.googleapis.com/auth/display-video" 34151 // ] 34152 // } 34153 34154 } 34155 34156 // method id "displayvideo.customBiddingAlgorithms.scripts.get": 34157 34158 type CustomBiddingAlgorithmsScriptsGetCall struct { 34159 s *Service 34160 customBiddingAlgorithmId int64 34161 customBiddingScriptId int64 34162 urlParams_ gensupport.URLParams 34163 ifNoneMatch_ string 34164 ctx_ context.Context 34165 header_ http.Header 34166 } 34167 34168 // Get: Gets a custom bidding script. 34169 // 34170 // - customBiddingAlgorithmId: The ID of the custom bidding algorithm 34171 // owns the script. 34172 // - customBiddingScriptId: The ID of the custom bidding script to 34173 // fetch. 34174 func (r *CustomBiddingAlgorithmsScriptsService) Get(customBiddingAlgorithmId int64, customBiddingScriptId int64) *CustomBiddingAlgorithmsScriptsGetCall { 34175 c := &CustomBiddingAlgorithmsScriptsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 34176 c.customBiddingAlgorithmId = customBiddingAlgorithmId 34177 c.customBiddingScriptId = customBiddingScriptId 34178 return c 34179 } 34180 34181 // AdvertiserId sets the optional parameter "advertiserId": The ID of 34182 // the advertiser that owns the parent custom bidding algorithm. 34183 func (c *CustomBiddingAlgorithmsScriptsGetCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsGetCall { 34184 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 34185 return c 34186 } 34187 34188 // PartnerId sets the optional parameter "partnerId": The ID of the 34189 // partner that owns the parent custom bidding algorithm. Only this 34190 // partner will have write access to this custom bidding script. 34191 func (c *CustomBiddingAlgorithmsScriptsGetCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsGetCall { 34192 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 34193 return c 34194 } 34195 34196 // Fields allows partial responses to be retrieved. See 34197 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 34198 // for more information. 34199 func (c *CustomBiddingAlgorithmsScriptsGetCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsGetCall { 34200 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 34201 return c 34202 } 34203 34204 // IfNoneMatch sets the optional parameter which makes the operation 34205 // fail if the object's ETag matches the given value. This is useful for 34206 // getting updates only after the object has changed since the last 34207 // request. Use googleapi.IsNotModified to check whether the response 34208 // error from Do is the result of In-None-Match. 34209 func (c *CustomBiddingAlgorithmsScriptsGetCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsScriptsGetCall { 34210 c.ifNoneMatch_ = entityTag 34211 return c 34212 } 34213 34214 // Context sets the context to be used in this call's Do method. Any 34215 // pending HTTP request will be aborted if the provided context is 34216 // canceled. 34217 func (c *CustomBiddingAlgorithmsScriptsGetCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsGetCall { 34218 c.ctx_ = ctx 34219 return c 34220 } 34221 34222 // Header returns an http.Header that can be modified by the caller to 34223 // add HTTP headers to the request. 34224 func (c *CustomBiddingAlgorithmsScriptsGetCall) Header() http.Header { 34225 if c.header_ == nil { 34226 c.header_ = make(http.Header) 34227 } 34228 return c.header_ 34229 } 34230 34231 func (c *CustomBiddingAlgorithmsScriptsGetCall) doRequest(alt string) (*http.Response, error) { 34232 reqHeaders := make(http.Header) 34233 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 34234 for k, v := range c.header_ { 34235 reqHeaders[k] = v 34236 } 34237 reqHeaders.Set("User-Agent", c.s.userAgent()) 34238 if c.ifNoneMatch_ != "" { 34239 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 34240 } 34241 var body io.Reader = nil 34242 c.urlParams_.Set("alt", alt) 34243 c.urlParams_.Set("prettyPrint", "false") 34244 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts/{+customBiddingScriptId}") 34245 urls += "?" + c.urlParams_.Encode() 34246 req, err := http.NewRequest("GET", urls, body) 34247 if err != nil { 34248 return nil, err 34249 } 34250 req.Header = reqHeaders 34251 googleapi.Expand(req.URL, map[string]string{ 34252 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10), 34253 "customBiddingScriptId": strconv.FormatInt(c.customBiddingScriptId, 10), 34254 }) 34255 return gensupport.SendRequest(c.ctx_, c.s.client, req) 34256 } 34257 34258 // Do executes the "displayvideo.customBiddingAlgorithms.scripts.get" call. 34259 // Exactly one of *CustomBiddingScript or error will be non-nil. Any 34260 // non-2xx status code is an error. Response headers are in either 34261 // *CustomBiddingScript.ServerResponse.Header or (if a response was 34262 // returned at all) in error.(*googleapi.Error).Header. Use 34263 // googleapi.IsNotModified to check whether the returned error was 34264 // because http.StatusNotModified was returned. 34265 func (c *CustomBiddingAlgorithmsScriptsGetCall) Do(opts ...googleapi.CallOption) (*CustomBiddingScript, error) { 34266 gensupport.SetOptions(c.urlParams_, opts...) 34267 res, err := c.doRequest("json") 34268 if res != nil && res.StatusCode == http.StatusNotModified { 34269 if res.Body != nil { 34270 res.Body.Close() 34271 } 34272 return nil, gensupport.WrapError(&googleapi.Error{ 34273 Code: res.StatusCode, 34274 Header: res.Header, 34275 }) 34276 } 34277 if err != nil { 34278 return nil, err 34279 } 34280 defer googleapi.CloseBody(res) 34281 if err := googleapi.CheckResponse(res); err != nil { 34282 return nil, gensupport.WrapError(err) 34283 } 34284 ret := &CustomBiddingScript{ 34285 ServerResponse: googleapi.ServerResponse{ 34286 Header: res.Header, 34287 HTTPStatusCode: res.StatusCode, 34288 }, 34289 } 34290 target := &ret 34291 if err := gensupport.DecodeResponse(target, res); err != nil { 34292 return nil, err 34293 } 34294 return ret, nil 34295 // { 34296 // "description": "Gets a custom bidding script.", 34297 // "flatPath": "v1/customBiddingAlgorithms/{customBiddingAlgorithmsId}/scripts/{scriptsId}", 34298 // "httpMethod": "GET", 34299 // "id": "displayvideo.customBiddingAlgorithms.scripts.get", 34300 // "parameterOrder": [ 34301 // "customBiddingAlgorithmId", 34302 // "customBiddingScriptId" 34303 // ], 34304 // "parameters": { 34305 // "advertiserId": { 34306 // "description": "The ID of the advertiser that owns the parent custom bidding algorithm.", 34307 // "format": "int64", 34308 // "location": "query", 34309 // "type": "string" 34310 // }, 34311 // "customBiddingAlgorithmId": { 34312 // "description": "Required. The ID of the custom bidding algorithm owns the script.", 34313 // "format": "int64", 34314 // "location": "path", 34315 // "pattern": "^[^/]+$", 34316 // "required": true, 34317 // "type": "string" 34318 // }, 34319 // "customBiddingScriptId": { 34320 // "description": "Required. The ID of the custom bidding script to fetch.", 34321 // "format": "int64", 34322 // "location": "path", 34323 // "pattern": "^[^/]+$", 34324 // "required": true, 34325 // "type": "string" 34326 // }, 34327 // "partnerId": { 34328 // "description": "The ID of the partner that owns the parent custom bidding algorithm. Only this partner will have write access to this custom bidding script.", 34329 // "format": "int64", 34330 // "location": "query", 34331 // "type": "string" 34332 // } 34333 // }, 34334 // "path": "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts/{+customBiddingScriptId}", 34335 // "response": { 34336 // "$ref": "CustomBiddingScript" 34337 // }, 34338 // "scopes": [ 34339 // "https://www.googleapis.com/auth/display-video" 34340 // ] 34341 // } 34342 34343 } 34344 34345 // method id "displayvideo.customBiddingAlgorithms.scripts.list": 34346 34347 type CustomBiddingAlgorithmsScriptsListCall struct { 34348 s *Service 34349 customBiddingAlgorithmId int64 34350 urlParams_ gensupport.URLParams 34351 ifNoneMatch_ string 34352 ctx_ context.Context 34353 header_ http.Header 34354 } 34355 34356 // List: Lists custom bidding scripts that belong to the given 34357 // algorithm. The order is defined by the order_by parameter. 34358 // 34359 // - customBiddingAlgorithmId: The ID of the custom bidding algorithm 34360 // owns the script. 34361 func (r *CustomBiddingAlgorithmsScriptsService) List(customBiddingAlgorithmId int64) *CustomBiddingAlgorithmsScriptsListCall { 34362 c := &CustomBiddingAlgorithmsScriptsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 34363 c.customBiddingAlgorithmId = customBiddingAlgorithmId 34364 return c 34365 } 34366 34367 // AdvertiserId sets the optional parameter "advertiserId": The ID of 34368 // the advertiser that owns the parent custom bidding algorithm. 34369 func (c *CustomBiddingAlgorithmsScriptsListCall) AdvertiserId(advertiserId int64) *CustomBiddingAlgorithmsScriptsListCall { 34370 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 34371 return c 34372 } 34373 34374 // OrderBy sets the optional parameter "orderBy": Field by which to sort 34375 // the list. Acceptable values are: * `createTime desc` (default) The 34376 // default sorting order is descending. To specify ascending order for a 34377 // field, the suffix "desc" should be removed. Example: `createTime`. 34378 func (c *CustomBiddingAlgorithmsScriptsListCall) OrderBy(orderBy string) *CustomBiddingAlgorithmsScriptsListCall { 34379 c.urlParams_.Set("orderBy", orderBy) 34380 return c 34381 } 34382 34383 // PageSize sets the optional parameter "pageSize": Requested page size. 34384 // Must be between `1` and `200`. If unspecified will default to `100`. 34385 // Returns error code `INVALID_ARGUMENT` if an invalid value is 34386 // specified. 34387 func (c *CustomBiddingAlgorithmsScriptsListCall) PageSize(pageSize int64) *CustomBiddingAlgorithmsScriptsListCall { 34388 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 34389 return c 34390 } 34391 34392 // PageToken sets the optional parameter "pageToken": A token 34393 // identifying a page of results the server should return. Typically, 34394 // this is the value of next_page_token returned from the previous call 34395 // to `ListCustomBiddingScripts` method. If not specified, the first 34396 // page of results will be returned. 34397 func (c *CustomBiddingAlgorithmsScriptsListCall) PageToken(pageToken string) *CustomBiddingAlgorithmsScriptsListCall { 34398 c.urlParams_.Set("pageToken", pageToken) 34399 return c 34400 } 34401 34402 // PartnerId sets the optional parameter "partnerId": The ID of the 34403 // partner that owns the parent custom bidding algorithm. Only this 34404 // partner will have write access to this custom bidding script. 34405 func (c *CustomBiddingAlgorithmsScriptsListCall) PartnerId(partnerId int64) *CustomBiddingAlgorithmsScriptsListCall { 34406 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 34407 return c 34408 } 34409 34410 // Fields allows partial responses to be retrieved. See 34411 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 34412 // for more information. 34413 func (c *CustomBiddingAlgorithmsScriptsListCall) Fields(s ...googleapi.Field) *CustomBiddingAlgorithmsScriptsListCall { 34414 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 34415 return c 34416 } 34417 34418 // IfNoneMatch sets the optional parameter which makes the operation 34419 // fail if the object's ETag matches the given value. This is useful for 34420 // getting updates only after the object has changed since the last 34421 // request. Use googleapi.IsNotModified to check whether the response 34422 // error from Do is the result of In-None-Match. 34423 func (c *CustomBiddingAlgorithmsScriptsListCall) IfNoneMatch(entityTag string) *CustomBiddingAlgorithmsScriptsListCall { 34424 c.ifNoneMatch_ = entityTag 34425 return c 34426 } 34427 34428 // Context sets the context to be used in this call's Do method. Any 34429 // pending HTTP request will be aborted if the provided context is 34430 // canceled. 34431 func (c *CustomBiddingAlgorithmsScriptsListCall) Context(ctx context.Context) *CustomBiddingAlgorithmsScriptsListCall { 34432 c.ctx_ = ctx 34433 return c 34434 } 34435 34436 // Header returns an http.Header that can be modified by the caller to 34437 // add HTTP headers to the request. 34438 func (c *CustomBiddingAlgorithmsScriptsListCall) Header() http.Header { 34439 if c.header_ == nil { 34440 c.header_ = make(http.Header) 34441 } 34442 return c.header_ 34443 } 34444 34445 func (c *CustomBiddingAlgorithmsScriptsListCall) doRequest(alt string) (*http.Response, error) { 34446 reqHeaders := make(http.Header) 34447 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 34448 for k, v := range c.header_ { 34449 reqHeaders[k] = v 34450 } 34451 reqHeaders.Set("User-Agent", c.s.userAgent()) 34452 if c.ifNoneMatch_ != "" { 34453 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 34454 } 34455 var body io.Reader = nil 34456 c.urlParams_.Set("alt", alt) 34457 c.urlParams_.Set("prettyPrint", "false") 34458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts") 34459 urls += "?" + c.urlParams_.Encode() 34460 req, err := http.NewRequest("GET", urls, body) 34461 if err != nil { 34462 return nil, err 34463 } 34464 req.Header = reqHeaders 34465 googleapi.Expand(req.URL, map[string]string{ 34466 "customBiddingAlgorithmId": strconv.FormatInt(c.customBiddingAlgorithmId, 10), 34467 }) 34468 return gensupport.SendRequest(c.ctx_, c.s.client, req) 34469 } 34470 34471 // Do executes the "displayvideo.customBiddingAlgorithms.scripts.list" call. 34472 // Exactly one of *ListCustomBiddingScriptsResponse or error will be 34473 // non-nil. Any non-2xx status code is an error. Response headers are in 34474 // either *ListCustomBiddingScriptsResponse.ServerResponse.Header or (if 34475 // a response was returned at all) in error.(*googleapi.Error).Header. 34476 // Use googleapi.IsNotModified to check whether the returned error was 34477 // because http.StatusNotModified was returned. 34478 func (c *CustomBiddingAlgorithmsScriptsListCall) Do(opts ...googleapi.CallOption) (*ListCustomBiddingScriptsResponse, error) { 34479 gensupport.SetOptions(c.urlParams_, opts...) 34480 res, err := c.doRequest("json") 34481 if res != nil && res.StatusCode == http.StatusNotModified { 34482 if res.Body != nil { 34483 res.Body.Close() 34484 } 34485 return nil, gensupport.WrapError(&googleapi.Error{ 34486 Code: res.StatusCode, 34487 Header: res.Header, 34488 }) 34489 } 34490 if err != nil { 34491 return nil, err 34492 } 34493 defer googleapi.CloseBody(res) 34494 if err := googleapi.CheckResponse(res); err != nil { 34495 return nil, gensupport.WrapError(err) 34496 } 34497 ret := &ListCustomBiddingScriptsResponse{ 34498 ServerResponse: googleapi.ServerResponse{ 34499 Header: res.Header, 34500 HTTPStatusCode: res.StatusCode, 34501 }, 34502 } 34503 target := &ret 34504 if err := gensupport.DecodeResponse(target, res); err != nil { 34505 return nil, err 34506 } 34507 return ret, nil 34508 // { 34509 // "description": "Lists custom bidding scripts that belong to the given algorithm. The order is defined by the order_by parameter.", 34510 // "flatPath": "v1/customBiddingAlgorithms/{customBiddingAlgorithmsId}/scripts", 34511 // "httpMethod": "GET", 34512 // "id": "displayvideo.customBiddingAlgorithms.scripts.list", 34513 // "parameterOrder": [ 34514 // "customBiddingAlgorithmId" 34515 // ], 34516 // "parameters": { 34517 // "advertiserId": { 34518 // "description": "The ID of the advertiser that owns the parent custom bidding algorithm.", 34519 // "format": "int64", 34520 // "location": "query", 34521 // "type": "string" 34522 // }, 34523 // "customBiddingAlgorithmId": { 34524 // "description": "Required. The ID of the custom bidding algorithm owns the script.", 34525 // "format": "int64", 34526 // "location": "path", 34527 // "pattern": "^[^/]+$", 34528 // "required": true, 34529 // "type": "string" 34530 // }, 34531 // "orderBy": { 34532 // "description": "Field by which to sort the list. Acceptable values are: * `createTime desc` (default) The default sorting order is descending. To specify ascending order for a field, the suffix \"desc\" should be removed. Example: `createTime`.", 34533 // "location": "query", 34534 // "type": "string" 34535 // }, 34536 // "pageSize": { 34537 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 34538 // "format": "int32", 34539 // "location": "query", 34540 // "type": "integer" 34541 // }, 34542 // "pageToken": { 34543 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCustomBiddingScripts` method. If not specified, the first page of results will be returned.", 34544 // "location": "query", 34545 // "type": "string" 34546 // }, 34547 // "partnerId": { 34548 // "description": "The ID of the partner that owns the parent custom bidding algorithm. Only this partner will have write access to this custom bidding script.", 34549 // "format": "int64", 34550 // "location": "query", 34551 // "type": "string" 34552 // } 34553 // }, 34554 // "path": "v1/customBiddingAlgorithms/{+customBiddingAlgorithmId}/scripts", 34555 // "response": { 34556 // "$ref": "ListCustomBiddingScriptsResponse" 34557 // }, 34558 // "scopes": [ 34559 // "https://www.googleapis.com/auth/display-video" 34560 // ] 34561 // } 34562 34563 } 34564 34565 // Pages invokes f for each page of results. 34566 // A non-nil error returned from f will halt the iteration. 34567 // The provided context supersedes any context provided to the Context method. 34568 func (c *CustomBiddingAlgorithmsScriptsListCall) Pages(ctx context.Context, f func(*ListCustomBiddingScriptsResponse) error) error { 34569 c.ctx_ = ctx 34570 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 34571 for { 34572 x, err := c.Do() 34573 if err != nil { 34574 return err 34575 } 34576 if err := f(x); err != nil { 34577 return err 34578 } 34579 if x.NextPageToken == "" { 34580 return nil 34581 } 34582 c.PageToken(x.NextPageToken) 34583 } 34584 } 34585 34586 // method id "displayvideo.customLists.get": 34587 34588 type CustomListsGetCall struct { 34589 s *Service 34590 customListId int64 34591 urlParams_ gensupport.URLParams 34592 ifNoneMatch_ string 34593 ctx_ context.Context 34594 header_ http.Header 34595 } 34596 34597 // Get: Gets a custom list. 34598 // 34599 // - customListId: The ID of the custom list to fetch. 34600 func (r *CustomListsService) Get(customListId int64) *CustomListsGetCall { 34601 c := &CustomListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 34602 c.customListId = customListId 34603 return c 34604 } 34605 34606 // AdvertiserId sets the optional parameter "advertiserId": The ID of 34607 // the DV360 advertiser that has access to the fetched custom lists. 34608 func (c *CustomListsGetCall) AdvertiserId(advertiserId int64) *CustomListsGetCall { 34609 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 34610 return c 34611 } 34612 34613 // Fields allows partial responses to be retrieved. See 34614 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 34615 // for more information. 34616 func (c *CustomListsGetCall) Fields(s ...googleapi.Field) *CustomListsGetCall { 34617 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 34618 return c 34619 } 34620 34621 // IfNoneMatch sets the optional parameter which makes the operation 34622 // fail if the object's ETag matches the given value. This is useful for 34623 // getting updates only after the object has changed since the last 34624 // request. Use googleapi.IsNotModified to check whether the response 34625 // error from Do is the result of In-None-Match. 34626 func (c *CustomListsGetCall) IfNoneMatch(entityTag string) *CustomListsGetCall { 34627 c.ifNoneMatch_ = entityTag 34628 return c 34629 } 34630 34631 // Context sets the context to be used in this call's Do method. Any 34632 // pending HTTP request will be aborted if the provided context is 34633 // canceled. 34634 func (c *CustomListsGetCall) Context(ctx context.Context) *CustomListsGetCall { 34635 c.ctx_ = ctx 34636 return c 34637 } 34638 34639 // Header returns an http.Header that can be modified by the caller to 34640 // add HTTP headers to the request. 34641 func (c *CustomListsGetCall) Header() http.Header { 34642 if c.header_ == nil { 34643 c.header_ = make(http.Header) 34644 } 34645 return c.header_ 34646 } 34647 34648 func (c *CustomListsGetCall) doRequest(alt string) (*http.Response, error) { 34649 reqHeaders := make(http.Header) 34650 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 34651 for k, v := range c.header_ { 34652 reqHeaders[k] = v 34653 } 34654 reqHeaders.Set("User-Agent", c.s.userAgent()) 34655 if c.ifNoneMatch_ != "" { 34656 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 34657 } 34658 var body io.Reader = nil 34659 c.urlParams_.Set("alt", alt) 34660 c.urlParams_.Set("prettyPrint", "false") 34661 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customLists/{+customListId}") 34662 urls += "?" + c.urlParams_.Encode() 34663 req, err := http.NewRequest("GET", urls, body) 34664 if err != nil { 34665 return nil, err 34666 } 34667 req.Header = reqHeaders 34668 googleapi.Expand(req.URL, map[string]string{ 34669 "customListId": strconv.FormatInt(c.customListId, 10), 34670 }) 34671 return gensupport.SendRequest(c.ctx_, c.s.client, req) 34672 } 34673 34674 // Do executes the "displayvideo.customLists.get" call. 34675 // Exactly one of *CustomList or error will be non-nil. Any non-2xx 34676 // status code is an error. Response headers are in either 34677 // *CustomList.ServerResponse.Header or (if a response was returned at 34678 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 34679 // to check whether the returned error was because 34680 // http.StatusNotModified was returned. 34681 func (c *CustomListsGetCall) Do(opts ...googleapi.CallOption) (*CustomList, error) { 34682 gensupport.SetOptions(c.urlParams_, opts...) 34683 res, err := c.doRequest("json") 34684 if res != nil && res.StatusCode == http.StatusNotModified { 34685 if res.Body != nil { 34686 res.Body.Close() 34687 } 34688 return nil, gensupport.WrapError(&googleapi.Error{ 34689 Code: res.StatusCode, 34690 Header: res.Header, 34691 }) 34692 } 34693 if err != nil { 34694 return nil, err 34695 } 34696 defer googleapi.CloseBody(res) 34697 if err := googleapi.CheckResponse(res); err != nil { 34698 return nil, gensupport.WrapError(err) 34699 } 34700 ret := &CustomList{ 34701 ServerResponse: googleapi.ServerResponse{ 34702 Header: res.Header, 34703 HTTPStatusCode: res.StatusCode, 34704 }, 34705 } 34706 target := &ret 34707 if err := gensupport.DecodeResponse(target, res); err != nil { 34708 return nil, err 34709 } 34710 return ret, nil 34711 // { 34712 // "description": "Gets a custom list.", 34713 // "flatPath": "v1/customLists/{customListsId}", 34714 // "httpMethod": "GET", 34715 // "id": "displayvideo.customLists.get", 34716 // "parameterOrder": [ 34717 // "customListId" 34718 // ], 34719 // "parameters": { 34720 // "advertiserId": { 34721 // "description": "The ID of the DV360 advertiser that has access to the fetched custom lists.", 34722 // "format": "int64", 34723 // "location": "query", 34724 // "type": "string" 34725 // }, 34726 // "customListId": { 34727 // "description": "Required. The ID of the custom list to fetch.", 34728 // "format": "int64", 34729 // "location": "path", 34730 // "pattern": "^[^/]+$", 34731 // "required": true, 34732 // "type": "string" 34733 // } 34734 // }, 34735 // "path": "v1/customLists/{+customListId}", 34736 // "response": { 34737 // "$ref": "CustomList" 34738 // }, 34739 // "scopes": [ 34740 // "https://www.googleapis.com/auth/display-video" 34741 // ] 34742 // } 34743 34744 } 34745 34746 // method id "displayvideo.customLists.list": 34747 34748 type CustomListsListCall struct { 34749 s *Service 34750 urlParams_ gensupport.URLParams 34751 ifNoneMatch_ string 34752 ctx_ context.Context 34753 header_ http.Header 34754 } 34755 34756 // List: Lists custom lists. The order is defined by the order_by 34757 // parameter. 34758 func (r *CustomListsService) List() *CustomListsListCall { 34759 c := &CustomListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 34760 return c 34761 } 34762 34763 // AdvertiserId sets the optional parameter "advertiserId": The ID of 34764 // the DV360 advertiser that has access to the fetched custom lists. 34765 func (c *CustomListsListCall) AdvertiserId(advertiserId int64) *CustomListsListCall { 34766 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 34767 return c 34768 } 34769 34770 // Filter sets the optional parameter "filter": Allows filtering by 34771 // custom list fields. Supported syntax: * Filter expressions for custom 34772 // lists can only contain at most one restriction. * A restriction has 34773 // the form of `{field} {operator} {value}`. * All fields must use the 34774 // `HAS (:)` operator. Supported fields: * `displayName` Examples: * All 34775 // custom lists for which the display name contains "Google": 34776 // `displayName:"Google". The length of this field should be no more 34777 // than 500 characters. Reference our filter `LIST` requests 34778 // (/display-video/api/guides/how-tos/filters) guide for more 34779 // information. 34780 func (c *CustomListsListCall) Filter(filter string) *CustomListsListCall { 34781 c.urlParams_.Set("filter", filter) 34782 return c 34783 } 34784 34785 // OrderBy sets the optional parameter "orderBy": Field by which to sort 34786 // the list. Acceptable values are: * `customListId` (default) * 34787 // `displayName` The default sorting order is ascending. To specify 34788 // descending order for a field, a suffix "desc" should be added to the 34789 // field name. Example: `displayName desc`. 34790 func (c *CustomListsListCall) OrderBy(orderBy string) *CustomListsListCall { 34791 c.urlParams_.Set("orderBy", orderBy) 34792 return c 34793 } 34794 34795 // PageSize sets the optional parameter "pageSize": Requested page size. 34796 // Must be between `1` and `200`. If unspecified will default to `100`. 34797 // Returns error code `INVALID_ARGUMENT` if an invalid value is 34798 // specified. 34799 func (c *CustomListsListCall) PageSize(pageSize int64) *CustomListsListCall { 34800 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 34801 return c 34802 } 34803 34804 // PageToken sets the optional parameter "pageToken": A token 34805 // identifying a page of results the server should return. Typically, 34806 // this is the value of next_page_token returned from the previous call 34807 // to `ListCustomLists` method. If not specified, the first page of 34808 // results will be returned. 34809 func (c *CustomListsListCall) PageToken(pageToken string) *CustomListsListCall { 34810 c.urlParams_.Set("pageToken", pageToken) 34811 return c 34812 } 34813 34814 // Fields allows partial responses to be retrieved. See 34815 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 34816 // for more information. 34817 func (c *CustomListsListCall) Fields(s ...googleapi.Field) *CustomListsListCall { 34818 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 34819 return c 34820 } 34821 34822 // IfNoneMatch sets the optional parameter which makes the operation 34823 // fail if the object's ETag matches the given value. This is useful for 34824 // getting updates only after the object has changed since the last 34825 // request. Use googleapi.IsNotModified to check whether the response 34826 // error from Do is the result of In-None-Match. 34827 func (c *CustomListsListCall) IfNoneMatch(entityTag string) *CustomListsListCall { 34828 c.ifNoneMatch_ = entityTag 34829 return c 34830 } 34831 34832 // Context sets the context to be used in this call's Do method. Any 34833 // pending HTTP request will be aborted if the provided context is 34834 // canceled. 34835 func (c *CustomListsListCall) Context(ctx context.Context) *CustomListsListCall { 34836 c.ctx_ = ctx 34837 return c 34838 } 34839 34840 // Header returns an http.Header that can be modified by the caller to 34841 // add HTTP headers to the request. 34842 func (c *CustomListsListCall) Header() http.Header { 34843 if c.header_ == nil { 34844 c.header_ = make(http.Header) 34845 } 34846 return c.header_ 34847 } 34848 34849 func (c *CustomListsListCall) doRequest(alt string) (*http.Response, error) { 34850 reqHeaders := make(http.Header) 34851 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 34852 for k, v := range c.header_ { 34853 reqHeaders[k] = v 34854 } 34855 reqHeaders.Set("User-Agent", c.s.userAgent()) 34856 if c.ifNoneMatch_ != "" { 34857 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 34858 } 34859 var body io.Reader = nil 34860 c.urlParams_.Set("alt", alt) 34861 c.urlParams_.Set("prettyPrint", "false") 34862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customLists") 34863 urls += "?" + c.urlParams_.Encode() 34864 req, err := http.NewRequest("GET", urls, body) 34865 if err != nil { 34866 return nil, err 34867 } 34868 req.Header = reqHeaders 34869 return gensupport.SendRequest(c.ctx_, c.s.client, req) 34870 } 34871 34872 // Do executes the "displayvideo.customLists.list" call. 34873 // Exactly one of *ListCustomListsResponse or error will be non-nil. Any 34874 // non-2xx status code is an error. Response headers are in either 34875 // *ListCustomListsResponse.ServerResponse.Header or (if a response was 34876 // returned at all) in error.(*googleapi.Error).Header. Use 34877 // googleapi.IsNotModified to check whether the returned error was 34878 // because http.StatusNotModified was returned. 34879 func (c *CustomListsListCall) Do(opts ...googleapi.CallOption) (*ListCustomListsResponse, error) { 34880 gensupport.SetOptions(c.urlParams_, opts...) 34881 res, err := c.doRequest("json") 34882 if res != nil && res.StatusCode == http.StatusNotModified { 34883 if res.Body != nil { 34884 res.Body.Close() 34885 } 34886 return nil, gensupport.WrapError(&googleapi.Error{ 34887 Code: res.StatusCode, 34888 Header: res.Header, 34889 }) 34890 } 34891 if err != nil { 34892 return nil, err 34893 } 34894 defer googleapi.CloseBody(res) 34895 if err := googleapi.CheckResponse(res); err != nil { 34896 return nil, gensupport.WrapError(err) 34897 } 34898 ret := &ListCustomListsResponse{ 34899 ServerResponse: googleapi.ServerResponse{ 34900 Header: res.Header, 34901 HTTPStatusCode: res.StatusCode, 34902 }, 34903 } 34904 target := &ret 34905 if err := gensupport.DecodeResponse(target, res); err != nil { 34906 return nil, err 34907 } 34908 return ret, nil 34909 // { 34910 // "description": "Lists custom lists. The order is defined by the order_by parameter.", 34911 // "flatPath": "v1/customLists", 34912 // "httpMethod": "GET", 34913 // "id": "displayvideo.customLists.list", 34914 // "parameterOrder": [], 34915 // "parameters": { 34916 // "advertiserId": { 34917 // "description": "The ID of the DV360 advertiser that has access to the fetched custom lists.", 34918 // "format": "int64", 34919 // "location": "query", 34920 // "type": "string" 34921 // }, 34922 // "filter": { 34923 // "description": "Allows filtering by custom list fields. Supported syntax: * Filter expressions for custom lists can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All custom lists for which the display name contains \"Google\": `displayName:\"Google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 34924 // "location": "query", 34925 // "type": "string" 34926 // }, 34927 // "orderBy": { 34928 // "description": "Field by which to sort the list. Acceptable values are: * `customListId` (default) * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 34929 // "location": "query", 34930 // "type": "string" 34931 // }, 34932 // "pageSize": { 34933 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 34934 // "format": "int32", 34935 // "location": "query", 34936 // "type": "integer" 34937 // }, 34938 // "pageToken": { 34939 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListCustomLists` method. If not specified, the first page of results will be returned.", 34940 // "location": "query", 34941 // "type": "string" 34942 // } 34943 // }, 34944 // "path": "v1/customLists", 34945 // "response": { 34946 // "$ref": "ListCustomListsResponse" 34947 // }, 34948 // "scopes": [ 34949 // "https://www.googleapis.com/auth/display-video" 34950 // ] 34951 // } 34952 34953 } 34954 34955 // Pages invokes f for each page of results. 34956 // A non-nil error returned from f will halt the iteration. 34957 // The provided context supersedes any context provided to the Context method. 34958 func (c *CustomListsListCall) Pages(ctx context.Context, f func(*ListCustomListsResponse) error) error { 34959 c.ctx_ = ctx 34960 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 34961 for { 34962 x, err := c.Do() 34963 if err != nil { 34964 return err 34965 } 34966 if err := f(x); err != nil { 34967 return err 34968 } 34969 if x.NextPageToken == "" { 34970 return nil 34971 } 34972 c.PageToken(x.NextPageToken) 34973 } 34974 } 34975 34976 // method id "displayvideo.firstAndThirdPartyAudiences.create": 34977 34978 type FirstAndThirdPartyAudiencesCreateCall struct { 34979 s *Service 34980 firstandthirdpartyaudience *FirstAndThirdPartyAudience 34981 urlParams_ gensupport.URLParams 34982 ctx_ context.Context 34983 header_ http.Header 34984 } 34985 34986 // Create: Creates a FirstAndThirdPartyAudience. Only supported for the 34987 // following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * 34988 // `CUSTOMER_MATCH_DEVICE_ID` 34989 func (r *FirstAndThirdPartyAudiencesService) Create(firstandthirdpartyaudience *FirstAndThirdPartyAudience) *FirstAndThirdPartyAudiencesCreateCall { 34990 c := &FirstAndThirdPartyAudiencesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 34991 c.firstandthirdpartyaudience = firstandthirdpartyaudience 34992 return c 34993 } 34994 34995 // AdvertiserId sets the optional parameter "advertiserId": Required. 34996 // The ID of the advertiser under whom the FirstAndThirdPartyAudience 34997 // will be created. 34998 func (c *FirstAndThirdPartyAudiencesCreateCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesCreateCall { 34999 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 35000 return c 35001 } 35002 35003 // Fields allows partial responses to be retrieved. See 35004 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 35005 // for more information. 35006 func (c *FirstAndThirdPartyAudiencesCreateCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesCreateCall { 35007 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 35008 return c 35009 } 35010 35011 // Context sets the context to be used in this call's Do method. Any 35012 // pending HTTP request will be aborted if the provided context is 35013 // canceled. 35014 func (c *FirstAndThirdPartyAudiencesCreateCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesCreateCall { 35015 c.ctx_ = ctx 35016 return c 35017 } 35018 35019 // Header returns an http.Header that can be modified by the caller to 35020 // add HTTP headers to the request. 35021 func (c *FirstAndThirdPartyAudiencesCreateCall) Header() http.Header { 35022 if c.header_ == nil { 35023 c.header_ = make(http.Header) 35024 } 35025 return c.header_ 35026 } 35027 35028 func (c *FirstAndThirdPartyAudiencesCreateCall) doRequest(alt string) (*http.Response, error) { 35029 reqHeaders := make(http.Header) 35030 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 35031 for k, v := range c.header_ { 35032 reqHeaders[k] = v 35033 } 35034 reqHeaders.Set("User-Agent", c.s.userAgent()) 35035 var body io.Reader = nil 35036 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firstandthirdpartyaudience) 35037 if err != nil { 35038 return nil, err 35039 } 35040 reqHeaders.Set("Content-Type", "application/json") 35041 c.urlParams_.Set("alt", alt) 35042 c.urlParams_.Set("prettyPrint", "false") 35043 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences") 35044 urls += "?" + c.urlParams_.Encode() 35045 req, err := http.NewRequest("POST", urls, body) 35046 if err != nil { 35047 return nil, err 35048 } 35049 req.Header = reqHeaders 35050 return gensupport.SendRequest(c.ctx_, c.s.client, req) 35051 } 35052 35053 // Do executes the "displayvideo.firstAndThirdPartyAudiences.create" call. 35054 // Exactly one of *FirstAndThirdPartyAudience or error will be non-nil. 35055 // Any non-2xx status code is an error. Response headers are in either 35056 // *FirstAndThirdPartyAudience.ServerResponse.Header or (if a response 35057 // was returned at all) in error.(*googleapi.Error).Header. Use 35058 // googleapi.IsNotModified to check whether the returned error was 35059 // because http.StatusNotModified was returned. 35060 func (c *FirstAndThirdPartyAudiencesCreateCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) { 35061 gensupport.SetOptions(c.urlParams_, opts...) 35062 res, err := c.doRequest("json") 35063 if res != nil && res.StatusCode == http.StatusNotModified { 35064 if res.Body != nil { 35065 res.Body.Close() 35066 } 35067 return nil, gensupport.WrapError(&googleapi.Error{ 35068 Code: res.StatusCode, 35069 Header: res.Header, 35070 }) 35071 } 35072 if err != nil { 35073 return nil, err 35074 } 35075 defer googleapi.CloseBody(res) 35076 if err := googleapi.CheckResponse(res); err != nil { 35077 return nil, gensupport.WrapError(err) 35078 } 35079 ret := &FirstAndThirdPartyAudience{ 35080 ServerResponse: googleapi.ServerResponse{ 35081 Header: res.Header, 35082 HTTPStatusCode: res.StatusCode, 35083 }, 35084 } 35085 target := &ret 35086 if err := gensupport.DecodeResponse(target, res); err != nil { 35087 return nil, err 35088 } 35089 return ret, nil 35090 // { 35091 // "description": "Creates a FirstAndThirdPartyAudience. Only supported for the following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * `CUSTOMER_MATCH_DEVICE_ID`", 35092 // "flatPath": "v1/firstAndThirdPartyAudiences", 35093 // "httpMethod": "POST", 35094 // "id": "displayvideo.firstAndThirdPartyAudiences.create", 35095 // "parameterOrder": [], 35096 // "parameters": { 35097 // "advertiserId": { 35098 // "description": "Required. The ID of the advertiser under whom the FirstAndThirdPartyAudience will be created.", 35099 // "format": "int64", 35100 // "location": "query", 35101 // "type": "string" 35102 // } 35103 // }, 35104 // "path": "v1/firstAndThirdPartyAudiences", 35105 // "request": { 35106 // "$ref": "FirstAndThirdPartyAudience" 35107 // }, 35108 // "response": { 35109 // "$ref": "FirstAndThirdPartyAudience" 35110 // }, 35111 // "scopes": [ 35112 // "https://www.googleapis.com/auth/display-video" 35113 // ] 35114 // } 35115 35116 } 35117 35118 // method id "displayvideo.firstAndThirdPartyAudiences.editCustomerMatchMembers": 35119 35120 type FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall struct { 35121 s *Service 35122 firstAndThirdPartyAudienceId int64 35123 editcustomermatchmembersrequest *EditCustomerMatchMembersRequest 35124 urlParams_ gensupport.URLParams 35125 ctx_ context.Context 35126 header_ http.Header 35127 } 35128 35129 // EditCustomerMatchMembers: Updates the member list of a Customer Match 35130 // audience. Only supported for the following audience_type: * 35131 // `CUSTOMER_MATCH_CONTACT_INFO` * `CUSTOMER_MATCH_DEVICE_ID` 35132 // 35133 // - firstAndThirdPartyAudienceId: The ID of the Customer Match 35134 // FirstAndThirdPartyAudience whose members will be edited. 35135 func (r *FirstAndThirdPartyAudiencesService) EditCustomerMatchMembers(firstAndThirdPartyAudienceId int64, editcustomermatchmembersrequest *EditCustomerMatchMembersRequest) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall { 35136 c := &FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall{s: r.s, urlParams_: make(gensupport.URLParams)} 35137 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId 35138 c.editcustomermatchmembersrequest = editcustomermatchmembersrequest 35139 return c 35140 } 35141 35142 // Fields allows partial responses to be retrieved. See 35143 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 35144 // for more information. 35145 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall { 35146 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 35147 return c 35148 } 35149 35150 // Context sets the context to be used in this call's Do method. Any 35151 // pending HTTP request will be aborted if the provided context is 35152 // canceled. 35153 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall { 35154 c.ctx_ = ctx 35155 return c 35156 } 35157 35158 // Header returns an http.Header that can be modified by the caller to 35159 // add HTTP headers to the request. 35160 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Header() http.Header { 35161 if c.header_ == nil { 35162 c.header_ = make(http.Header) 35163 } 35164 return c.header_ 35165 } 35166 35167 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) doRequest(alt string) (*http.Response, error) { 35168 reqHeaders := make(http.Header) 35169 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 35170 for k, v := range c.header_ { 35171 reqHeaders[k] = v 35172 } 35173 reqHeaders.Set("User-Agent", c.s.userAgent()) 35174 var body io.Reader = nil 35175 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editcustomermatchmembersrequest) 35176 if err != nil { 35177 return nil, err 35178 } 35179 reqHeaders.Set("Content-Type", "application/json") 35180 c.urlParams_.Set("alt", alt) 35181 c.urlParams_.Set("prettyPrint", "false") 35182 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}:editCustomerMatchMembers") 35183 urls += "?" + c.urlParams_.Encode() 35184 req, err := http.NewRequest("POST", urls, body) 35185 if err != nil { 35186 return nil, err 35187 } 35188 req.Header = reqHeaders 35189 googleapi.Expand(req.URL, map[string]string{ 35190 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10), 35191 }) 35192 return gensupport.SendRequest(c.ctx_, c.s.client, req) 35193 } 35194 35195 // Do executes the "displayvideo.firstAndThirdPartyAudiences.editCustomerMatchMembers" call. 35196 // Exactly one of *EditCustomerMatchMembersResponse or error will be 35197 // non-nil. Any non-2xx status code is an error. Response headers are in 35198 // either *EditCustomerMatchMembersResponse.ServerResponse.Header or (if 35199 // a response was returned at all) in error.(*googleapi.Error).Header. 35200 // Use googleapi.IsNotModified to check whether the returned error was 35201 // because http.StatusNotModified was returned. 35202 func (c *FirstAndThirdPartyAudiencesEditCustomerMatchMembersCall) Do(opts ...googleapi.CallOption) (*EditCustomerMatchMembersResponse, error) { 35203 gensupport.SetOptions(c.urlParams_, opts...) 35204 res, err := c.doRequest("json") 35205 if res != nil && res.StatusCode == http.StatusNotModified { 35206 if res.Body != nil { 35207 res.Body.Close() 35208 } 35209 return nil, gensupport.WrapError(&googleapi.Error{ 35210 Code: res.StatusCode, 35211 Header: res.Header, 35212 }) 35213 } 35214 if err != nil { 35215 return nil, err 35216 } 35217 defer googleapi.CloseBody(res) 35218 if err := googleapi.CheckResponse(res); err != nil { 35219 return nil, gensupport.WrapError(err) 35220 } 35221 ret := &EditCustomerMatchMembersResponse{ 35222 ServerResponse: googleapi.ServerResponse{ 35223 Header: res.Header, 35224 HTTPStatusCode: res.StatusCode, 35225 }, 35226 } 35227 target := &ret 35228 if err := gensupport.DecodeResponse(target, res); err != nil { 35229 return nil, err 35230 } 35231 return ret, nil 35232 // { 35233 // "description": "Updates the member list of a Customer Match audience. Only supported for the following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * `CUSTOMER_MATCH_DEVICE_ID`", 35234 // "flatPath": "v1/firstAndThirdPartyAudiences/{firstAndThirdPartyAudiencesId}:editCustomerMatchMembers", 35235 // "httpMethod": "POST", 35236 // "id": "displayvideo.firstAndThirdPartyAudiences.editCustomerMatchMembers", 35237 // "parameterOrder": [ 35238 // "firstAndThirdPartyAudienceId" 35239 // ], 35240 // "parameters": { 35241 // "firstAndThirdPartyAudienceId": { 35242 // "description": "Required. The ID of the Customer Match FirstAndThirdPartyAudience whose members will be edited.", 35243 // "format": "int64", 35244 // "location": "path", 35245 // "pattern": "^[^/]+$", 35246 // "required": true, 35247 // "type": "string" 35248 // } 35249 // }, 35250 // "path": "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}:editCustomerMatchMembers", 35251 // "request": { 35252 // "$ref": "EditCustomerMatchMembersRequest" 35253 // }, 35254 // "response": { 35255 // "$ref": "EditCustomerMatchMembersResponse" 35256 // }, 35257 // "scopes": [ 35258 // "https://www.googleapis.com/auth/display-video" 35259 // ] 35260 // } 35261 35262 } 35263 35264 // method id "displayvideo.firstAndThirdPartyAudiences.get": 35265 35266 type FirstAndThirdPartyAudiencesGetCall struct { 35267 s *Service 35268 firstAndThirdPartyAudienceId int64 35269 urlParams_ gensupport.URLParams 35270 ifNoneMatch_ string 35271 ctx_ context.Context 35272 header_ http.Header 35273 } 35274 35275 // Get: Gets a first and third party audience. 35276 // 35277 // - firstAndThirdPartyAudienceId: The ID of the first and third party 35278 // audience to fetch. 35279 func (r *FirstAndThirdPartyAudiencesService) Get(firstAndThirdPartyAudienceId int64) *FirstAndThirdPartyAudiencesGetCall { 35280 c := &FirstAndThirdPartyAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 35281 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId 35282 return c 35283 } 35284 35285 // AdvertiserId sets the optional parameter "advertiserId": The ID of 35286 // the advertiser that has access to the fetched first and third party 35287 // audience. 35288 func (c *FirstAndThirdPartyAudiencesGetCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesGetCall { 35289 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 35290 return c 35291 } 35292 35293 // PartnerId sets the optional parameter "partnerId": The ID of the 35294 // partner that has access to the fetched first and third party 35295 // audience. 35296 func (c *FirstAndThirdPartyAudiencesGetCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesGetCall { 35297 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 35298 return c 35299 } 35300 35301 // Fields allows partial responses to be retrieved. See 35302 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 35303 // for more information. 35304 func (c *FirstAndThirdPartyAudiencesGetCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesGetCall { 35305 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 35306 return c 35307 } 35308 35309 // IfNoneMatch sets the optional parameter which makes the operation 35310 // fail if the object's ETag matches the given value. This is useful for 35311 // getting updates only after the object has changed since the last 35312 // request. Use googleapi.IsNotModified to check whether the response 35313 // error from Do is the result of In-None-Match. 35314 func (c *FirstAndThirdPartyAudiencesGetCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesGetCall { 35315 c.ifNoneMatch_ = entityTag 35316 return c 35317 } 35318 35319 // Context sets the context to be used in this call's Do method. Any 35320 // pending HTTP request will be aborted if the provided context is 35321 // canceled. 35322 func (c *FirstAndThirdPartyAudiencesGetCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesGetCall { 35323 c.ctx_ = ctx 35324 return c 35325 } 35326 35327 // Header returns an http.Header that can be modified by the caller to 35328 // add HTTP headers to the request. 35329 func (c *FirstAndThirdPartyAudiencesGetCall) Header() http.Header { 35330 if c.header_ == nil { 35331 c.header_ = make(http.Header) 35332 } 35333 return c.header_ 35334 } 35335 35336 func (c *FirstAndThirdPartyAudiencesGetCall) doRequest(alt string) (*http.Response, error) { 35337 reqHeaders := make(http.Header) 35338 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 35339 for k, v := range c.header_ { 35340 reqHeaders[k] = v 35341 } 35342 reqHeaders.Set("User-Agent", c.s.userAgent()) 35343 if c.ifNoneMatch_ != "" { 35344 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 35345 } 35346 var body io.Reader = nil 35347 c.urlParams_.Set("alt", alt) 35348 c.urlParams_.Set("prettyPrint", "false") 35349 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}") 35350 urls += "?" + c.urlParams_.Encode() 35351 req, err := http.NewRequest("GET", urls, body) 35352 if err != nil { 35353 return nil, err 35354 } 35355 req.Header = reqHeaders 35356 googleapi.Expand(req.URL, map[string]string{ 35357 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10), 35358 }) 35359 return gensupport.SendRequest(c.ctx_, c.s.client, req) 35360 } 35361 35362 // Do executes the "displayvideo.firstAndThirdPartyAudiences.get" call. 35363 // Exactly one of *FirstAndThirdPartyAudience or error will be non-nil. 35364 // Any non-2xx status code is an error. Response headers are in either 35365 // *FirstAndThirdPartyAudience.ServerResponse.Header or (if a response 35366 // was returned at all) in error.(*googleapi.Error).Header. Use 35367 // googleapi.IsNotModified to check whether the returned error was 35368 // because http.StatusNotModified was returned. 35369 func (c *FirstAndThirdPartyAudiencesGetCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) { 35370 gensupport.SetOptions(c.urlParams_, opts...) 35371 res, err := c.doRequest("json") 35372 if res != nil && res.StatusCode == http.StatusNotModified { 35373 if res.Body != nil { 35374 res.Body.Close() 35375 } 35376 return nil, gensupport.WrapError(&googleapi.Error{ 35377 Code: res.StatusCode, 35378 Header: res.Header, 35379 }) 35380 } 35381 if err != nil { 35382 return nil, err 35383 } 35384 defer googleapi.CloseBody(res) 35385 if err := googleapi.CheckResponse(res); err != nil { 35386 return nil, gensupport.WrapError(err) 35387 } 35388 ret := &FirstAndThirdPartyAudience{ 35389 ServerResponse: googleapi.ServerResponse{ 35390 Header: res.Header, 35391 HTTPStatusCode: res.StatusCode, 35392 }, 35393 } 35394 target := &ret 35395 if err := gensupport.DecodeResponse(target, res); err != nil { 35396 return nil, err 35397 } 35398 return ret, nil 35399 // { 35400 // "description": "Gets a first and third party audience.", 35401 // "flatPath": "v1/firstAndThirdPartyAudiences/{firstAndThirdPartyAudiencesId}", 35402 // "httpMethod": "GET", 35403 // "id": "displayvideo.firstAndThirdPartyAudiences.get", 35404 // "parameterOrder": [ 35405 // "firstAndThirdPartyAudienceId" 35406 // ], 35407 // "parameters": { 35408 // "advertiserId": { 35409 // "description": "The ID of the advertiser that has access to the fetched first and third party audience.", 35410 // "format": "int64", 35411 // "location": "query", 35412 // "type": "string" 35413 // }, 35414 // "firstAndThirdPartyAudienceId": { 35415 // "description": "Required. The ID of the first and third party audience to fetch.", 35416 // "format": "int64", 35417 // "location": "path", 35418 // "pattern": "^[^/]+$", 35419 // "required": true, 35420 // "type": "string" 35421 // }, 35422 // "partnerId": { 35423 // "description": "The ID of the partner that has access to the fetched first and third party audience.", 35424 // "format": "int64", 35425 // "location": "query", 35426 // "type": "string" 35427 // } 35428 // }, 35429 // "path": "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}", 35430 // "response": { 35431 // "$ref": "FirstAndThirdPartyAudience" 35432 // }, 35433 // "scopes": [ 35434 // "https://www.googleapis.com/auth/display-video" 35435 // ] 35436 // } 35437 35438 } 35439 35440 // method id "displayvideo.firstAndThirdPartyAudiences.list": 35441 35442 type FirstAndThirdPartyAudiencesListCall struct { 35443 s *Service 35444 urlParams_ gensupport.URLParams 35445 ifNoneMatch_ string 35446 ctx_ context.Context 35447 header_ http.Header 35448 } 35449 35450 // List: Lists first and third party audiences. The order is defined by 35451 // the order_by parameter. 35452 func (r *FirstAndThirdPartyAudiencesService) List() *FirstAndThirdPartyAudiencesListCall { 35453 c := &FirstAndThirdPartyAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 35454 return c 35455 } 35456 35457 // AdvertiserId sets the optional parameter "advertiserId": The ID of 35458 // the advertiser that has access to the fetched first and third party 35459 // audiences. 35460 func (c *FirstAndThirdPartyAudiencesListCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesListCall { 35461 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 35462 return c 35463 } 35464 35465 // Filter sets the optional parameter "filter": Allows filtering by 35466 // first and third party audience fields. Supported syntax: * Filter 35467 // expressions for first and third party audiences can only contain at 35468 // most one restriction. * A restriction has the form of `{field} 35469 // {operator} {value}`. * All fields must use the `HAS (:)` operator. 35470 // Supported fields: * `displayName` Examples: * All first and third 35471 // party audiences for which the display name contains "Google": 35472 // `displayName:"Google". The length of this field should be no more 35473 // than 500 characters. Reference our filter `LIST` requests 35474 // (/display-video/api/guides/how-tos/filters) guide for more 35475 // information. 35476 func (c *FirstAndThirdPartyAudiencesListCall) Filter(filter string) *FirstAndThirdPartyAudiencesListCall { 35477 c.urlParams_.Set("filter", filter) 35478 return c 35479 } 35480 35481 // OrderBy sets the optional parameter "orderBy": Field by which to sort 35482 // the list. Acceptable values are: * `firstAndThirdPartyAudienceId` 35483 // (default) * `displayName` The default sorting order is ascending. To 35484 // specify descending order for a field, a suffix "desc" should be added 35485 // to the field name. Example: `displayName desc`. 35486 func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndThirdPartyAudiencesListCall { 35487 c.urlParams_.Set("orderBy", orderBy) 35488 return c 35489 } 35490 35491 // PageSize sets the optional parameter "pageSize": Requested page size. 35492 // Must be between `1` and `200`. If unspecified will default to `100`. 35493 // Returns error code `INVALID_ARGUMENT` if an invalid value is 35494 // specified. 35495 func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { 35496 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 35497 return c 35498 } 35499 35500 // PageToken sets the optional parameter "pageToken": A token 35501 // identifying a page of results the server should return. Typically, 35502 // this is the value of next_page_token returned from the previous call 35503 // to `ListFirstAndThirdPartyAudiences` method. If not specified, the 35504 // first page of results will be returned. 35505 func (c *FirstAndThirdPartyAudiencesListCall) PageToken(pageToken string) *FirstAndThirdPartyAudiencesListCall { 35506 c.urlParams_.Set("pageToken", pageToken) 35507 return c 35508 } 35509 35510 // PartnerId sets the optional parameter "partnerId": The ID of the 35511 // partner that has access to the fetched first and third party 35512 // audiences. 35513 func (c *FirstAndThirdPartyAudiencesListCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesListCall { 35514 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 35515 return c 35516 } 35517 35518 // Fields allows partial responses to be retrieved. See 35519 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 35520 // for more information. 35521 func (c *FirstAndThirdPartyAudiencesListCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesListCall { 35522 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 35523 return c 35524 } 35525 35526 // IfNoneMatch sets the optional parameter which makes the operation 35527 // fail if the object's ETag matches the given value. This is useful for 35528 // getting updates only after the object has changed since the last 35529 // request. Use googleapi.IsNotModified to check whether the response 35530 // error from Do is the result of In-None-Match. 35531 func (c *FirstAndThirdPartyAudiencesListCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesListCall { 35532 c.ifNoneMatch_ = entityTag 35533 return c 35534 } 35535 35536 // Context sets the context to be used in this call's Do method. Any 35537 // pending HTTP request will be aborted if the provided context is 35538 // canceled. 35539 func (c *FirstAndThirdPartyAudiencesListCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesListCall { 35540 c.ctx_ = ctx 35541 return c 35542 } 35543 35544 // Header returns an http.Header that can be modified by the caller to 35545 // add HTTP headers to the request. 35546 func (c *FirstAndThirdPartyAudiencesListCall) Header() http.Header { 35547 if c.header_ == nil { 35548 c.header_ = make(http.Header) 35549 } 35550 return c.header_ 35551 } 35552 35553 func (c *FirstAndThirdPartyAudiencesListCall) doRequest(alt string) (*http.Response, error) { 35554 reqHeaders := make(http.Header) 35555 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 35556 for k, v := range c.header_ { 35557 reqHeaders[k] = v 35558 } 35559 reqHeaders.Set("User-Agent", c.s.userAgent()) 35560 if c.ifNoneMatch_ != "" { 35561 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 35562 } 35563 var body io.Reader = nil 35564 c.urlParams_.Set("alt", alt) 35565 c.urlParams_.Set("prettyPrint", "false") 35566 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences") 35567 urls += "?" + c.urlParams_.Encode() 35568 req, err := http.NewRequest("GET", urls, body) 35569 if err != nil { 35570 return nil, err 35571 } 35572 req.Header = reqHeaders 35573 return gensupport.SendRequest(c.ctx_, c.s.client, req) 35574 } 35575 35576 // Do executes the "displayvideo.firstAndThirdPartyAudiences.list" call. 35577 // Exactly one of *ListFirstAndThirdPartyAudiencesResponse or error will 35578 // be non-nil. Any non-2xx status code is an error. Response headers are 35579 // in either 35580 // *ListFirstAndThirdPartyAudiencesResponse.ServerResponse.Header or (if 35581 // a response was returned at all) in error.(*googleapi.Error).Header. 35582 // Use googleapi.IsNotModified to check whether the returned error was 35583 // because http.StatusNotModified was returned. 35584 func (c *FirstAndThirdPartyAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListFirstAndThirdPartyAudiencesResponse, error) { 35585 gensupport.SetOptions(c.urlParams_, opts...) 35586 res, err := c.doRequest("json") 35587 if res != nil && res.StatusCode == http.StatusNotModified { 35588 if res.Body != nil { 35589 res.Body.Close() 35590 } 35591 return nil, gensupport.WrapError(&googleapi.Error{ 35592 Code: res.StatusCode, 35593 Header: res.Header, 35594 }) 35595 } 35596 if err != nil { 35597 return nil, err 35598 } 35599 defer googleapi.CloseBody(res) 35600 if err := googleapi.CheckResponse(res); err != nil { 35601 return nil, gensupport.WrapError(err) 35602 } 35603 ret := &ListFirstAndThirdPartyAudiencesResponse{ 35604 ServerResponse: googleapi.ServerResponse{ 35605 Header: res.Header, 35606 HTTPStatusCode: res.StatusCode, 35607 }, 35608 } 35609 target := &ret 35610 if err := gensupport.DecodeResponse(target, res); err != nil { 35611 return nil, err 35612 } 35613 return ret, nil 35614 // { 35615 // "description": "Lists first and third party audiences. The order is defined by the order_by parameter.", 35616 // "flatPath": "v1/firstAndThirdPartyAudiences", 35617 // "httpMethod": "GET", 35618 // "id": "displayvideo.firstAndThirdPartyAudiences.list", 35619 // "parameterOrder": [], 35620 // "parameters": { 35621 // "advertiserId": { 35622 // "description": "The ID of the advertiser that has access to the fetched first and third party audiences.", 35623 // "format": "int64", 35624 // "location": "query", 35625 // "type": "string" 35626 // }, 35627 // "filter": { 35628 // "description": "Allows filtering by first and third party audience fields. Supported syntax: * Filter expressions for first and third party audiences can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All first and third party audiences for which the display name contains \"Google\": `displayName:\"Google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 35629 // "location": "query", 35630 // "type": "string" 35631 // }, 35632 // "orderBy": { 35633 // "description": "Field by which to sort the list. Acceptable values are: * `firstAndThirdPartyAudienceId` (default) * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 35634 // "location": "query", 35635 // "type": "string" 35636 // }, 35637 // "pageSize": { 35638 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 35639 // "format": "int32", 35640 // "location": "query", 35641 // "type": "integer" 35642 // }, 35643 // "pageToken": { 35644 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListFirstAndThirdPartyAudiences` method. If not specified, the first page of results will be returned.", 35645 // "location": "query", 35646 // "type": "string" 35647 // }, 35648 // "partnerId": { 35649 // "description": "The ID of the partner that has access to the fetched first and third party audiences.", 35650 // "format": "int64", 35651 // "location": "query", 35652 // "type": "string" 35653 // } 35654 // }, 35655 // "path": "v1/firstAndThirdPartyAudiences", 35656 // "response": { 35657 // "$ref": "ListFirstAndThirdPartyAudiencesResponse" 35658 // }, 35659 // "scopes": [ 35660 // "https://www.googleapis.com/auth/display-video" 35661 // ] 35662 // } 35663 35664 } 35665 35666 // Pages invokes f for each page of results. 35667 // A non-nil error returned from f will halt the iteration. 35668 // The provided context supersedes any context provided to the Context method. 35669 func (c *FirstAndThirdPartyAudiencesListCall) Pages(ctx context.Context, f func(*ListFirstAndThirdPartyAudiencesResponse) error) error { 35670 c.ctx_ = ctx 35671 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 35672 for { 35673 x, err := c.Do() 35674 if err != nil { 35675 return err 35676 } 35677 if err := f(x); err != nil { 35678 return err 35679 } 35680 if x.NextPageToken == "" { 35681 return nil 35682 } 35683 c.PageToken(x.NextPageToken) 35684 } 35685 } 35686 35687 // method id "displayvideo.firstAndThirdPartyAudiences.patch": 35688 35689 type FirstAndThirdPartyAudiencesPatchCall struct { 35690 s *Service 35691 firstAndThirdPartyAudienceId int64 35692 firstandthirdpartyaudience *FirstAndThirdPartyAudience 35693 urlParams_ gensupport.URLParams 35694 ctx_ context.Context 35695 header_ http.Header 35696 } 35697 35698 // Patch: Updates an existing FirstAndThirdPartyAudience. Only supported 35699 // for the following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * 35700 // `CUSTOMER_MATCH_DEVICE_ID` 35701 // 35702 // - firstAndThirdPartyAudienceId: Output only. The unique ID of the 35703 // first and third party audience. Assigned by the system. 35704 func (r *FirstAndThirdPartyAudiencesService) Patch(firstAndThirdPartyAudienceId int64, firstandthirdpartyaudience *FirstAndThirdPartyAudience) *FirstAndThirdPartyAudiencesPatchCall { 35705 c := &FirstAndThirdPartyAudiencesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 35706 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId 35707 c.firstandthirdpartyaudience = firstandthirdpartyaudience 35708 return c 35709 } 35710 35711 // AdvertiserId sets the optional parameter "advertiserId": Required. 35712 // The ID of the owner advertiser of the updated 35713 // FirstAndThirdPartyAudience. 35714 func (c *FirstAndThirdPartyAudiencesPatchCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesPatchCall { 35715 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 35716 return c 35717 } 35718 35719 // UpdateMask sets the optional parameter "updateMask": Required. The 35720 // mask to control which fields to update. Updates are only supported 35721 // for the following fields: * `displayName` * `description` * 35722 // `membershipDurationDays` 35723 func (c *FirstAndThirdPartyAudiencesPatchCall) UpdateMask(updateMask string) *FirstAndThirdPartyAudiencesPatchCall { 35724 c.urlParams_.Set("updateMask", updateMask) 35725 return c 35726 } 35727 35728 // Fields allows partial responses to be retrieved. See 35729 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 35730 // for more information. 35731 func (c *FirstAndThirdPartyAudiencesPatchCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesPatchCall { 35732 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 35733 return c 35734 } 35735 35736 // Context sets the context to be used in this call's Do method. Any 35737 // pending HTTP request will be aborted if the provided context is 35738 // canceled. 35739 func (c *FirstAndThirdPartyAudiencesPatchCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesPatchCall { 35740 c.ctx_ = ctx 35741 return c 35742 } 35743 35744 // Header returns an http.Header that can be modified by the caller to 35745 // add HTTP headers to the request. 35746 func (c *FirstAndThirdPartyAudiencesPatchCall) Header() http.Header { 35747 if c.header_ == nil { 35748 c.header_ = make(http.Header) 35749 } 35750 return c.header_ 35751 } 35752 35753 func (c *FirstAndThirdPartyAudiencesPatchCall) doRequest(alt string) (*http.Response, error) { 35754 reqHeaders := make(http.Header) 35755 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 35756 for k, v := range c.header_ { 35757 reqHeaders[k] = v 35758 } 35759 reqHeaders.Set("User-Agent", c.s.userAgent()) 35760 var body io.Reader = nil 35761 body, err := googleapi.WithoutDataWrapper.JSONReader(c.firstandthirdpartyaudience) 35762 if err != nil { 35763 return nil, err 35764 } 35765 reqHeaders.Set("Content-Type", "application/json") 35766 c.urlParams_.Set("alt", alt) 35767 c.urlParams_.Set("prettyPrint", "false") 35768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}") 35769 urls += "?" + c.urlParams_.Encode() 35770 req, err := http.NewRequest("PATCH", urls, body) 35771 if err != nil { 35772 return nil, err 35773 } 35774 req.Header = reqHeaders 35775 googleapi.Expand(req.URL, map[string]string{ 35776 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10), 35777 }) 35778 return gensupport.SendRequest(c.ctx_, c.s.client, req) 35779 } 35780 35781 // Do executes the "displayvideo.firstAndThirdPartyAudiences.patch" call. 35782 // Exactly one of *FirstAndThirdPartyAudience or error will be non-nil. 35783 // Any non-2xx status code is an error. Response headers are in either 35784 // *FirstAndThirdPartyAudience.ServerResponse.Header or (if a response 35785 // was returned at all) in error.(*googleapi.Error).Header. Use 35786 // googleapi.IsNotModified to check whether the returned error was 35787 // because http.StatusNotModified was returned. 35788 func (c *FirstAndThirdPartyAudiencesPatchCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) { 35789 gensupport.SetOptions(c.urlParams_, opts...) 35790 res, err := c.doRequest("json") 35791 if res != nil && res.StatusCode == http.StatusNotModified { 35792 if res.Body != nil { 35793 res.Body.Close() 35794 } 35795 return nil, gensupport.WrapError(&googleapi.Error{ 35796 Code: res.StatusCode, 35797 Header: res.Header, 35798 }) 35799 } 35800 if err != nil { 35801 return nil, err 35802 } 35803 defer googleapi.CloseBody(res) 35804 if err := googleapi.CheckResponse(res); err != nil { 35805 return nil, gensupport.WrapError(err) 35806 } 35807 ret := &FirstAndThirdPartyAudience{ 35808 ServerResponse: googleapi.ServerResponse{ 35809 Header: res.Header, 35810 HTTPStatusCode: res.StatusCode, 35811 }, 35812 } 35813 target := &ret 35814 if err := gensupport.DecodeResponse(target, res); err != nil { 35815 return nil, err 35816 } 35817 return ret, nil 35818 // { 35819 // "description": "Updates an existing FirstAndThirdPartyAudience. Only supported for the following audience_type: * `CUSTOMER_MATCH_CONTACT_INFO` * `CUSTOMER_MATCH_DEVICE_ID`", 35820 // "flatPath": "v1/firstAndThirdPartyAudiences/{firstAndThirdPartyAudiencesId}", 35821 // "httpMethod": "PATCH", 35822 // "id": "displayvideo.firstAndThirdPartyAudiences.patch", 35823 // "parameterOrder": [ 35824 // "firstAndThirdPartyAudienceId" 35825 // ], 35826 // "parameters": { 35827 // "advertiserId": { 35828 // "description": "Required. The ID of the owner advertiser of the updated FirstAndThirdPartyAudience.", 35829 // "format": "int64", 35830 // "location": "query", 35831 // "type": "string" 35832 // }, 35833 // "firstAndThirdPartyAudienceId": { 35834 // "description": "Output only. The unique ID of the first and third party audience. Assigned by the system.", 35835 // "format": "int64", 35836 // "location": "path", 35837 // "pattern": "^[^/]+$", 35838 // "required": true, 35839 // "type": "string" 35840 // }, 35841 // "updateMask": { 35842 // "description": "Required. The mask to control which fields to update. Updates are only supported for the following fields: * `displayName` * `description` * `membershipDurationDays`", 35843 // "format": "google-fieldmask", 35844 // "location": "query", 35845 // "type": "string" 35846 // } 35847 // }, 35848 // "path": "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}", 35849 // "request": { 35850 // "$ref": "FirstAndThirdPartyAudience" 35851 // }, 35852 // "response": { 35853 // "$ref": "FirstAndThirdPartyAudience" 35854 // }, 35855 // "scopes": [ 35856 // "https://www.googleapis.com/auth/display-video" 35857 // ] 35858 // } 35859 35860 } 35861 35862 // method id "displayvideo.floodlightGroups.get": 35863 35864 type FloodlightGroupsGetCall struct { 35865 s *Service 35866 floodlightGroupId int64 35867 urlParams_ gensupport.URLParams 35868 ifNoneMatch_ string 35869 ctx_ context.Context 35870 header_ http.Header 35871 } 35872 35873 // Get: Gets a Floodlight group. 35874 // 35875 // - floodlightGroupId: The ID of the Floodlight group to fetch. 35876 func (r *FloodlightGroupsService) Get(floodlightGroupId int64) *FloodlightGroupsGetCall { 35877 c := &FloodlightGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 35878 c.floodlightGroupId = floodlightGroupId 35879 return c 35880 } 35881 35882 // PartnerId sets the optional parameter "partnerId": Required. The 35883 // partner context by which the Floodlight group is being accessed. 35884 func (c *FloodlightGroupsGetCall) PartnerId(partnerId int64) *FloodlightGroupsGetCall { 35885 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 35886 return c 35887 } 35888 35889 // Fields allows partial responses to be retrieved. See 35890 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 35891 // for more information. 35892 func (c *FloodlightGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightGroupsGetCall { 35893 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 35894 return c 35895 } 35896 35897 // IfNoneMatch sets the optional parameter which makes the operation 35898 // fail if the object's ETag matches the given value. This is useful for 35899 // getting updates only after the object has changed since the last 35900 // request. Use googleapi.IsNotModified to check whether the response 35901 // error from Do is the result of In-None-Match. 35902 func (c *FloodlightGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightGroupsGetCall { 35903 c.ifNoneMatch_ = entityTag 35904 return c 35905 } 35906 35907 // Context sets the context to be used in this call's Do method. Any 35908 // pending HTTP request will be aborted if the provided context is 35909 // canceled. 35910 func (c *FloodlightGroupsGetCall) Context(ctx context.Context) *FloodlightGroupsGetCall { 35911 c.ctx_ = ctx 35912 return c 35913 } 35914 35915 // Header returns an http.Header that can be modified by the caller to 35916 // add HTTP headers to the request. 35917 func (c *FloodlightGroupsGetCall) Header() http.Header { 35918 if c.header_ == nil { 35919 c.header_ = make(http.Header) 35920 } 35921 return c.header_ 35922 } 35923 35924 func (c *FloodlightGroupsGetCall) doRequest(alt string) (*http.Response, error) { 35925 reqHeaders := make(http.Header) 35926 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 35927 for k, v := range c.header_ { 35928 reqHeaders[k] = v 35929 } 35930 reqHeaders.Set("User-Agent", c.s.userAgent()) 35931 if c.ifNoneMatch_ != "" { 35932 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 35933 } 35934 var body io.Reader = nil 35935 c.urlParams_.Set("alt", alt) 35936 c.urlParams_.Set("prettyPrint", "false") 35937 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/floodlightGroups/{+floodlightGroupId}") 35938 urls += "?" + c.urlParams_.Encode() 35939 req, err := http.NewRequest("GET", urls, body) 35940 if err != nil { 35941 return nil, err 35942 } 35943 req.Header = reqHeaders 35944 googleapi.Expand(req.URL, map[string]string{ 35945 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10), 35946 }) 35947 return gensupport.SendRequest(c.ctx_, c.s.client, req) 35948 } 35949 35950 // Do executes the "displayvideo.floodlightGroups.get" call. 35951 // Exactly one of *FloodlightGroup or error will be non-nil. Any non-2xx 35952 // status code is an error. Response headers are in either 35953 // *FloodlightGroup.ServerResponse.Header or (if a response was returned 35954 // at all) in error.(*googleapi.Error).Header. Use 35955 // googleapi.IsNotModified to check whether the returned error was 35956 // because http.StatusNotModified was returned. 35957 func (c *FloodlightGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) { 35958 gensupport.SetOptions(c.urlParams_, opts...) 35959 res, err := c.doRequest("json") 35960 if res != nil && res.StatusCode == http.StatusNotModified { 35961 if res.Body != nil { 35962 res.Body.Close() 35963 } 35964 return nil, gensupport.WrapError(&googleapi.Error{ 35965 Code: res.StatusCode, 35966 Header: res.Header, 35967 }) 35968 } 35969 if err != nil { 35970 return nil, err 35971 } 35972 defer googleapi.CloseBody(res) 35973 if err := googleapi.CheckResponse(res); err != nil { 35974 return nil, gensupport.WrapError(err) 35975 } 35976 ret := &FloodlightGroup{ 35977 ServerResponse: googleapi.ServerResponse{ 35978 Header: res.Header, 35979 HTTPStatusCode: res.StatusCode, 35980 }, 35981 } 35982 target := &ret 35983 if err := gensupport.DecodeResponse(target, res); err != nil { 35984 return nil, err 35985 } 35986 return ret, nil 35987 // { 35988 // "description": "Gets a Floodlight group.", 35989 // "flatPath": "v1/floodlightGroups/{floodlightGroupsId}", 35990 // "httpMethod": "GET", 35991 // "id": "displayvideo.floodlightGroups.get", 35992 // "parameterOrder": [ 35993 // "floodlightGroupId" 35994 // ], 35995 // "parameters": { 35996 // "floodlightGroupId": { 35997 // "description": "Required. The ID of the Floodlight group to fetch.", 35998 // "format": "int64", 35999 // "location": "path", 36000 // "pattern": "^[^/]+$", 36001 // "required": true, 36002 // "type": "string" 36003 // }, 36004 // "partnerId": { 36005 // "description": "Required. The partner context by which the Floodlight group is being accessed.", 36006 // "format": "int64", 36007 // "location": "query", 36008 // "type": "string" 36009 // } 36010 // }, 36011 // "path": "v1/floodlightGroups/{+floodlightGroupId}", 36012 // "response": { 36013 // "$ref": "FloodlightGroup" 36014 // }, 36015 // "scopes": [ 36016 // "https://www.googleapis.com/auth/display-video" 36017 // ] 36018 // } 36019 36020 } 36021 36022 // method id "displayvideo.floodlightGroups.patch": 36023 36024 type FloodlightGroupsPatchCall struct { 36025 s *Service 36026 floodlightGroupId int64 36027 floodlightgroup *FloodlightGroup 36028 urlParams_ gensupport.URLParams 36029 ctx_ context.Context 36030 header_ http.Header 36031 } 36032 36033 // Patch: Updates an existing Floodlight group. Returns the updated 36034 // Floodlight group if successful. 36035 // 36036 // - floodlightGroupId: Output only. The unique ID of the Floodlight 36037 // group. Assigned by the system. 36038 func (r *FloodlightGroupsService) Patch(floodlightGroupId int64, floodlightgroup *FloodlightGroup) *FloodlightGroupsPatchCall { 36039 c := &FloodlightGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 36040 c.floodlightGroupId = floodlightGroupId 36041 c.floodlightgroup = floodlightgroup 36042 return c 36043 } 36044 36045 // PartnerId sets the optional parameter "partnerId": Required. The 36046 // partner context by which the Floodlight group is being accessed. 36047 func (c *FloodlightGroupsPatchCall) PartnerId(partnerId int64) *FloodlightGroupsPatchCall { 36048 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 36049 return c 36050 } 36051 36052 // UpdateMask sets the optional parameter "updateMask": Required. The 36053 // mask to control which fields to update. 36054 func (c *FloodlightGroupsPatchCall) UpdateMask(updateMask string) *FloodlightGroupsPatchCall { 36055 c.urlParams_.Set("updateMask", updateMask) 36056 return c 36057 } 36058 36059 // Fields allows partial responses to be retrieved. See 36060 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 36061 // for more information. 36062 func (c *FloodlightGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightGroupsPatchCall { 36063 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 36064 return c 36065 } 36066 36067 // Context sets the context to be used in this call's Do method. Any 36068 // pending HTTP request will be aborted if the provided context is 36069 // canceled. 36070 func (c *FloodlightGroupsPatchCall) Context(ctx context.Context) *FloodlightGroupsPatchCall { 36071 c.ctx_ = ctx 36072 return c 36073 } 36074 36075 // Header returns an http.Header that can be modified by the caller to 36076 // add HTTP headers to the request. 36077 func (c *FloodlightGroupsPatchCall) Header() http.Header { 36078 if c.header_ == nil { 36079 c.header_ = make(http.Header) 36080 } 36081 return c.header_ 36082 } 36083 36084 func (c *FloodlightGroupsPatchCall) doRequest(alt string) (*http.Response, error) { 36085 reqHeaders := make(http.Header) 36086 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 36087 for k, v := range c.header_ { 36088 reqHeaders[k] = v 36089 } 36090 reqHeaders.Set("User-Agent", c.s.userAgent()) 36091 var body io.Reader = nil 36092 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightgroup) 36093 if err != nil { 36094 return nil, err 36095 } 36096 reqHeaders.Set("Content-Type", "application/json") 36097 c.urlParams_.Set("alt", alt) 36098 c.urlParams_.Set("prettyPrint", "false") 36099 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/floodlightGroups/{floodlightGroupId}") 36100 urls += "?" + c.urlParams_.Encode() 36101 req, err := http.NewRequest("PATCH", urls, body) 36102 if err != nil { 36103 return nil, err 36104 } 36105 req.Header = reqHeaders 36106 googleapi.Expand(req.URL, map[string]string{ 36107 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10), 36108 }) 36109 return gensupport.SendRequest(c.ctx_, c.s.client, req) 36110 } 36111 36112 // Do executes the "displayvideo.floodlightGroups.patch" call. 36113 // Exactly one of *FloodlightGroup or error will be non-nil. Any non-2xx 36114 // status code is an error. Response headers are in either 36115 // *FloodlightGroup.ServerResponse.Header or (if a response was returned 36116 // at all) in error.(*googleapi.Error).Header. Use 36117 // googleapi.IsNotModified to check whether the returned error was 36118 // because http.StatusNotModified was returned. 36119 func (c *FloodlightGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) { 36120 gensupport.SetOptions(c.urlParams_, opts...) 36121 res, err := c.doRequest("json") 36122 if res != nil && res.StatusCode == http.StatusNotModified { 36123 if res.Body != nil { 36124 res.Body.Close() 36125 } 36126 return nil, gensupport.WrapError(&googleapi.Error{ 36127 Code: res.StatusCode, 36128 Header: res.Header, 36129 }) 36130 } 36131 if err != nil { 36132 return nil, err 36133 } 36134 defer googleapi.CloseBody(res) 36135 if err := googleapi.CheckResponse(res); err != nil { 36136 return nil, gensupport.WrapError(err) 36137 } 36138 ret := &FloodlightGroup{ 36139 ServerResponse: googleapi.ServerResponse{ 36140 Header: res.Header, 36141 HTTPStatusCode: res.StatusCode, 36142 }, 36143 } 36144 target := &ret 36145 if err := gensupport.DecodeResponse(target, res); err != nil { 36146 return nil, err 36147 } 36148 return ret, nil 36149 // { 36150 // "description": "Updates an existing Floodlight group. Returns the updated Floodlight group if successful.", 36151 // "flatPath": "v1/floodlightGroups/{floodlightGroupId}", 36152 // "httpMethod": "PATCH", 36153 // "id": "displayvideo.floodlightGroups.patch", 36154 // "parameterOrder": [ 36155 // "floodlightGroupId" 36156 // ], 36157 // "parameters": { 36158 // "floodlightGroupId": { 36159 // "description": "Output only. The unique ID of the Floodlight group. Assigned by the system.", 36160 // "format": "int64", 36161 // "location": "path", 36162 // "required": true, 36163 // "type": "string" 36164 // }, 36165 // "partnerId": { 36166 // "description": "Required. The partner context by which the Floodlight group is being accessed.", 36167 // "format": "int64", 36168 // "location": "query", 36169 // "type": "string" 36170 // }, 36171 // "updateMask": { 36172 // "description": "Required. The mask to control which fields to update.", 36173 // "format": "google-fieldmask", 36174 // "location": "query", 36175 // "type": "string" 36176 // } 36177 // }, 36178 // "path": "v1/floodlightGroups/{floodlightGroupId}", 36179 // "request": { 36180 // "$ref": "FloodlightGroup" 36181 // }, 36182 // "response": { 36183 // "$ref": "FloodlightGroup" 36184 // }, 36185 // "scopes": [ 36186 // "https://www.googleapis.com/auth/display-video" 36187 // ] 36188 // } 36189 36190 } 36191 36192 // method id "displayvideo.googleAudiences.get": 36193 36194 type GoogleAudiencesGetCall struct { 36195 s *Service 36196 googleAudienceId int64 36197 urlParams_ gensupport.URLParams 36198 ifNoneMatch_ string 36199 ctx_ context.Context 36200 header_ http.Header 36201 } 36202 36203 // Get: Gets a Google audience. 36204 // 36205 // - googleAudienceId: The ID of the Google audience to fetch. 36206 func (r *GoogleAudiencesService) Get(googleAudienceId int64) *GoogleAudiencesGetCall { 36207 c := &GoogleAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 36208 c.googleAudienceId = googleAudienceId 36209 return c 36210 } 36211 36212 // AdvertiserId sets the optional parameter "advertiserId": The ID of 36213 // the advertiser that has access to the fetched Google audience. 36214 func (c *GoogleAudiencesGetCall) AdvertiserId(advertiserId int64) *GoogleAudiencesGetCall { 36215 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 36216 return c 36217 } 36218 36219 // PartnerId sets the optional parameter "partnerId": The ID of the 36220 // partner that has access to the fetched Google audience. 36221 func (c *GoogleAudiencesGetCall) PartnerId(partnerId int64) *GoogleAudiencesGetCall { 36222 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 36223 return c 36224 } 36225 36226 // Fields allows partial responses to be retrieved. See 36227 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 36228 // for more information. 36229 func (c *GoogleAudiencesGetCall) Fields(s ...googleapi.Field) *GoogleAudiencesGetCall { 36230 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 36231 return c 36232 } 36233 36234 // IfNoneMatch sets the optional parameter which makes the operation 36235 // fail if the object's ETag matches the given value. This is useful for 36236 // getting updates only after the object has changed since the last 36237 // request. Use googleapi.IsNotModified to check whether the response 36238 // error from Do is the result of In-None-Match. 36239 func (c *GoogleAudiencesGetCall) IfNoneMatch(entityTag string) *GoogleAudiencesGetCall { 36240 c.ifNoneMatch_ = entityTag 36241 return c 36242 } 36243 36244 // Context sets the context to be used in this call's Do method. Any 36245 // pending HTTP request will be aborted if the provided context is 36246 // canceled. 36247 func (c *GoogleAudiencesGetCall) Context(ctx context.Context) *GoogleAudiencesGetCall { 36248 c.ctx_ = ctx 36249 return c 36250 } 36251 36252 // Header returns an http.Header that can be modified by the caller to 36253 // add HTTP headers to the request. 36254 func (c *GoogleAudiencesGetCall) Header() http.Header { 36255 if c.header_ == nil { 36256 c.header_ = make(http.Header) 36257 } 36258 return c.header_ 36259 } 36260 36261 func (c *GoogleAudiencesGetCall) doRequest(alt string) (*http.Response, error) { 36262 reqHeaders := make(http.Header) 36263 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 36264 for k, v := range c.header_ { 36265 reqHeaders[k] = v 36266 } 36267 reqHeaders.Set("User-Agent", c.s.userAgent()) 36268 if c.ifNoneMatch_ != "" { 36269 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 36270 } 36271 var body io.Reader = nil 36272 c.urlParams_.Set("alt", alt) 36273 c.urlParams_.Set("prettyPrint", "false") 36274 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/googleAudiences/{+googleAudienceId}") 36275 urls += "?" + c.urlParams_.Encode() 36276 req, err := http.NewRequest("GET", urls, body) 36277 if err != nil { 36278 return nil, err 36279 } 36280 req.Header = reqHeaders 36281 googleapi.Expand(req.URL, map[string]string{ 36282 "googleAudienceId": strconv.FormatInt(c.googleAudienceId, 10), 36283 }) 36284 return gensupport.SendRequest(c.ctx_, c.s.client, req) 36285 } 36286 36287 // Do executes the "displayvideo.googleAudiences.get" call. 36288 // Exactly one of *GoogleAudience or error will be non-nil. Any non-2xx 36289 // status code is an error. Response headers are in either 36290 // *GoogleAudience.ServerResponse.Header or (if a response was returned 36291 // at all) in error.(*googleapi.Error).Header. Use 36292 // googleapi.IsNotModified to check whether the returned error was 36293 // because http.StatusNotModified was returned. 36294 func (c *GoogleAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAudience, error) { 36295 gensupport.SetOptions(c.urlParams_, opts...) 36296 res, err := c.doRequest("json") 36297 if res != nil && res.StatusCode == http.StatusNotModified { 36298 if res.Body != nil { 36299 res.Body.Close() 36300 } 36301 return nil, gensupport.WrapError(&googleapi.Error{ 36302 Code: res.StatusCode, 36303 Header: res.Header, 36304 }) 36305 } 36306 if err != nil { 36307 return nil, err 36308 } 36309 defer googleapi.CloseBody(res) 36310 if err := googleapi.CheckResponse(res); err != nil { 36311 return nil, gensupport.WrapError(err) 36312 } 36313 ret := &GoogleAudience{ 36314 ServerResponse: googleapi.ServerResponse{ 36315 Header: res.Header, 36316 HTTPStatusCode: res.StatusCode, 36317 }, 36318 } 36319 target := &ret 36320 if err := gensupport.DecodeResponse(target, res); err != nil { 36321 return nil, err 36322 } 36323 return ret, nil 36324 // { 36325 // "description": "Gets a Google audience.", 36326 // "flatPath": "v1/googleAudiences/{googleAudiencesId}", 36327 // "httpMethod": "GET", 36328 // "id": "displayvideo.googleAudiences.get", 36329 // "parameterOrder": [ 36330 // "googleAudienceId" 36331 // ], 36332 // "parameters": { 36333 // "advertiserId": { 36334 // "description": "The ID of the advertiser that has access to the fetched Google audience.", 36335 // "format": "int64", 36336 // "location": "query", 36337 // "type": "string" 36338 // }, 36339 // "googleAudienceId": { 36340 // "description": "Required. The ID of the Google audience to fetch.", 36341 // "format": "int64", 36342 // "location": "path", 36343 // "pattern": "^[^/]+$", 36344 // "required": true, 36345 // "type": "string" 36346 // }, 36347 // "partnerId": { 36348 // "description": "The ID of the partner that has access to the fetched Google audience.", 36349 // "format": "int64", 36350 // "location": "query", 36351 // "type": "string" 36352 // } 36353 // }, 36354 // "path": "v1/googleAudiences/{+googleAudienceId}", 36355 // "response": { 36356 // "$ref": "GoogleAudience" 36357 // }, 36358 // "scopes": [ 36359 // "https://www.googleapis.com/auth/display-video" 36360 // ] 36361 // } 36362 36363 } 36364 36365 // method id "displayvideo.googleAudiences.list": 36366 36367 type GoogleAudiencesListCall struct { 36368 s *Service 36369 urlParams_ gensupport.URLParams 36370 ifNoneMatch_ string 36371 ctx_ context.Context 36372 header_ http.Header 36373 } 36374 36375 // List: Lists Google audiences. The order is defined by the order_by 36376 // parameter. 36377 func (r *GoogleAudiencesService) List() *GoogleAudiencesListCall { 36378 c := &GoogleAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 36379 return c 36380 } 36381 36382 // AdvertiserId sets the optional parameter "advertiserId": The ID of 36383 // the advertiser that has access to the fetched Google audiences. 36384 func (c *GoogleAudiencesListCall) AdvertiserId(advertiserId int64) *GoogleAudiencesListCall { 36385 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 36386 return c 36387 } 36388 36389 // Filter sets the optional parameter "filter": Allows filtering by 36390 // Google audience fields. Supported syntax: * Filter expressions for 36391 // Google audiences can only contain at most one restriction. * A 36392 // restriction has the form of `{field} {operator} {value}`. * All 36393 // fields must use the `HAS (:)` operator. Supported fields: * 36394 // `displayName` Examples: * All Google audiences for which the display 36395 // name contains "Google": `displayName:"Google". The length of this 36396 // field should be no more than 500 characters. Reference our filter 36397 // `LIST` requests (/display-video/api/guides/how-tos/filters) guide for 36398 // more information. 36399 func (c *GoogleAudiencesListCall) Filter(filter string) *GoogleAudiencesListCall { 36400 c.urlParams_.Set("filter", filter) 36401 return c 36402 } 36403 36404 // OrderBy sets the optional parameter "orderBy": Field by which to sort 36405 // the list. Acceptable values are: * `googleAudienceId` (default) * 36406 // `displayName` The default sorting order is ascending. To specify 36407 // descending order for a field, a suffix "desc" should be added to the 36408 // field name. Example: `displayName desc`. 36409 func (c *GoogleAudiencesListCall) OrderBy(orderBy string) *GoogleAudiencesListCall { 36410 c.urlParams_.Set("orderBy", orderBy) 36411 return c 36412 } 36413 36414 // PageSize sets the optional parameter "pageSize": Requested page size. 36415 // Must be between `1` and `200`. If unspecified will default to `100`. 36416 // Returns error code `INVALID_ARGUMENT` if an invalid value is 36417 // specified. 36418 func (c *GoogleAudiencesListCall) PageSize(pageSize int64) *GoogleAudiencesListCall { 36419 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 36420 return c 36421 } 36422 36423 // PageToken sets the optional parameter "pageToken": A token 36424 // identifying a page of results the server should return. Typically, 36425 // this is the value of next_page_token returned from the previous call 36426 // to `ListGoogleAudiences` method. If not specified, the first page of 36427 // results will be returned. 36428 func (c *GoogleAudiencesListCall) PageToken(pageToken string) *GoogleAudiencesListCall { 36429 c.urlParams_.Set("pageToken", pageToken) 36430 return c 36431 } 36432 36433 // PartnerId sets the optional parameter "partnerId": The ID of the 36434 // partner that has access to the fetched Google audiences. 36435 func (c *GoogleAudiencesListCall) PartnerId(partnerId int64) *GoogleAudiencesListCall { 36436 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 36437 return c 36438 } 36439 36440 // Fields allows partial responses to be retrieved. See 36441 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 36442 // for more information. 36443 func (c *GoogleAudiencesListCall) Fields(s ...googleapi.Field) *GoogleAudiencesListCall { 36444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 36445 return c 36446 } 36447 36448 // IfNoneMatch sets the optional parameter which makes the operation 36449 // fail if the object's ETag matches the given value. This is useful for 36450 // getting updates only after the object has changed since the last 36451 // request. Use googleapi.IsNotModified to check whether the response 36452 // error from Do is the result of In-None-Match. 36453 func (c *GoogleAudiencesListCall) IfNoneMatch(entityTag string) *GoogleAudiencesListCall { 36454 c.ifNoneMatch_ = entityTag 36455 return c 36456 } 36457 36458 // Context sets the context to be used in this call's Do method. Any 36459 // pending HTTP request will be aborted if the provided context is 36460 // canceled. 36461 func (c *GoogleAudiencesListCall) Context(ctx context.Context) *GoogleAudiencesListCall { 36462 c.ctx_ = ctx 36463 return c 36464 } 36465 36466 // Header returns an http.Header that can be modified by the caller to 36467 // add HTTP headers to the request. 36468 func (c *GoogleAudiencesListCall) Header() http.Header { 36469 if c.header_ == nil { 36470 c.header_ = make(http.Header) 36471 } 36472 return c.header_ 36473 } 36474 36475 func (c *GoogleAudiencesListCall) doRequest(alt string) (*http.Response, error) { 36476 reqHeaders := make(http.Header) 36477 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 36478 for k, v := range c.header_ { 36479 reqHeaders[k] = v 36480 } 36481 reqHeaders.Set("User-Agent", c.s.userAgent()) 36482 if c.ifNoneMatch_ != "" { 36483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 36484 } 36485 var body io.Reader = nil 36486 c.urlParams_.Set("alt", alt) 36487 c.urlParams_.Set("prettyPrint", "false") 36488 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/googleAudiences") 36489 urls += "?" + c.urlParams_.Encode() 36490 req, err := http.NewRequest("GET", urls, body) 36491 if err != nil { 36492 return nil, err 36493 } 36494 req.Header = reqHeaders 36495 return gensupport.SendRequest(c.ctx_, c.s.client, req) 36496 } 36497 36498 // Do executes the "displayvideo.googleAudiences.list" call. 36499 // Exactly one of *ListGoogleAudiencesResponse or error will be non-nil. 36500 // Any non-2xx status code is an error. Response headers are in either 36501 // *ListGoogleAudiencesResponse.ServerResponse.Header or (if a response 36502 // was returned at all) in error.(*googleapi.Error).Header. Use 36503 // googleapi.IsNotModified to check whether the returned error was 36504 // because http.StatusNotModified was returned. 36505 func (c *GoogleAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleAudiencesResponse, error) { 36506 gensupport.SetOptions(c.urlParams_, opts...) 36507 res, err := c.doRequest("json") 36508 if res != nil && res.StatusCode == http.StatusNotModified { 36509 if res.Body != nil { 36510 res.Body.Close() 36511 } 36512 return nil, gensupport.WrapError(&googleapi.Error{ 36513 Code: res.StatusCode, 36514 Header: res.Header, 36515 }) 36516 } 36517 if err != nil { 36518 return nil, err 36519 } 36520 defer googleapi.CloseBody(res) 36521 if err := googleapi.CheckResponse(res); err != nil { 36522 return nil, gensupport.WrapError(err) 36523 } 36524 ret := &ListGoogleAudiencesResponse{ 36525 ServerResponse: googleapi.ServerResponse{ 36526 Header: res.Header, 36527 HTTPStatusCode: res.StatusCode, 36528 }, 36529 } 36530 target := &ret 36531 if err := gensupport.DecodeResponse(target, res); err != nil { 36532 return nil, err 36533 } 36534 return ret, nil 36535 // { 36536 // "description": "Lists Google audiences. The order is defined by the order_by parameter.", 36537 // "flatPath": "v1/googleAudiences", 36538 // "httpMethod": "GET", 36539 // "id": "displayvideo.googleAudiences.list", 36540 // "parameterOrder": [], 36541 // "parameters": { 36542 // "advertiserId": { 36543 // "description": "The ID of the advertiser that has access to the fetched Google audiences.", 36544 // "format": "int64", 36545 // "location": "query", 36546 // "type": "string" 36547 // }, 36548 // "filter": { 36549 // "description": "Allows filtering by Google audience fields. Supported syntax: * Filter expressions for Google audiences can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All Google audiences for which the display name contains \"Google\": `displayName:\"Google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 36550 // "location": "query", 36551 // "type": "string" 36552 // }, 36553 // "orderBy": { 36554 // "description": "Field by which to sort the list. Acceptable values are: * `googleAudienceId` (default) * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `displayName desc`.", 36555 // "location": "query", 36556 // "type": "string" 36557 // }, 36558 // "pageSize": { 36559 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 36560 // "format": "int32", 36561 // "location": "query", 36562 // "type": "integer" 36563 // }, 36564 // "pageToken": { 36565 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListGoogleAudiences` method. If not specified, the first page of results will be returned.", 36566 // "location": "query", 36567 // "type": "string" 36568 // }, 36569 // "partnerId": { 36570 // "description": "The ID of the partner that has access to the fetched Google audiences.", 36571 // "format": "int64", 36572 // "location": "query", 36573 // "type": "string" 36574 // } 36575 // }, 36576 // "path": "v1/googleAudiences", 36577 // "response": { 36578 // "$ref": "ListGoogleAudiencesResponse" 36579 // }, 36580 // "scopes": [ 36581 // "https://www.googleapis.com/auth/display-video" 36582 // ] 36583 // } 36584 36585 } 36586 36587 // Pages invokes f for each page of results. 36588 // A non-nil error returned from f will halt the iteration. 36589 // The provided context supersedes any context provided to the Context method. 36590 func (c *GoogleAudiencesListCall) Pages(ctx context.Context, f func(*ListGoogleAudiencesResponse) error) error { 36591 c.ctx_ = ctx 36592 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 36593 for { 36594 x, err := c.Do() 36595 if err != nil { 36596 return err 36597 } 36598 if err := f(x); err != nil { 36599 return err 36600 } 36601 if x.NextPageToken == "" { 36602 return nil 36603 } 36604 c.PageToken(x.NextPageToken) 36605 } 36606 } 36607 36608 // method id "displayvideo.guaranteedOrders.create": 36609 36610 type GuaranteedOrdersCreateCall struct { 36611 s *Service 36612 guaranteedorder *GuaranteedOrder 36613 urlParams_ gensupport.URLParams 36614 ctx_ context.Context 36615 header_ http.Header 36616 } 36617 36618 // Create: Creates a new guaranteed order. Returns the newly created 36619 // guaranteed order if successful. 36620 func (r *GuaranteedOrdersService) Create(guaranteedorder *GuaranteedOrder) *GuaranteedOrdersCreateCall { 36621 c := &GuaranteedOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 36622 c.guaranteedorder = guaranteedorder 36623 return c 36624 } 36625 36626 // AdvertiserId sets the optional parameter "advertiserId": The ID of 36627 // the advertiser that the request is being made within. 36628 func (c *GuaranteedOrdersCreateCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersCreateCall { 36629 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 36630 return c 36631 } 36632 36633 // PartnerId sets the optional parameter "partnerId": The ID of the 36634 // partner that the request is being made within. 36635 func (c *GuaranteedOrdersCreateCall) PartnerId(partnerId int64) *GuaranteedOrdersCreateCall { 36636 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 36637 return c 36638 } 36639 36640 // Fields allows partial responses to be retrieved. See 36641 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 36642 // for more information. 36643 func (c *GuaranteedOrdersCreateCall) Fields(s ...googleapi.Field) *GuaranteedOrdersCreateCall { 36644 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 36645 return c 36646 } 36647 36648 // Context sets the context to be used in this call's Do method. Any 36649 // pending HTTP request will be aborted if the provided context is 36650 // canceled. 36651 func (c *GuaranteedOrdersCreateCall) Context(ctx context.Context) *GuaranteedOrdersCreateCall { 36652 c.ctx_ = ctx 36653 return c 36654 } 36655 36656 // Header returns an http.Header that can be modified by the caller to 36657 // add HTTP headers to the request. 36658 func (c *GuaranteedOrdersCreateCall) Header() http.Header { 36659 if c.header_ == nil { 36660 c.header_ = make(http.Header) 36661 } 36662 return c.header_ 36663 } 36664 36665 func (c *GuaranteedOrdersCreateCall) doRequest(alt string) (*http.Response, error) { 36666 reqHeaders := make(http.Header) 36667 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 36668 for k, v := range c.header_ { 36669 reqHeaders[k] = v 36670 } 36671 reqHeaders.Set("User-Agent", c.s.userAgent()) 36672 var body io.Reader = nil 36673 body, err := googleapi.WithoutDataWrapper.JSONReader(c.guaranteedorder) 36674 if err != nil { 36675 return nil, err 36676 } 36677 reqHeaders.Set("Content-Type", "application/json") 36678 c.urlParams_.Set("alt", alt) 36679 c.urlParams_.Set("prettyPrint", "false") 36680 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/guaranteedOrders") 36681 urls += "?" + c.urlParams_.Encode() 36682 req, err := http.NewRequest("POST", urls, body) 36683 if err != nil { 36684 return nil, err 36685 } 36686 req.Header = reqHeaders 36687 return gensupport.SendRequest(c.ctx_, c.s.client, req) 36688 } 36689 36690 // Do executes the "displayvideo.guaranteedOrders.create" call. 36691 // Exactly one of *GuaranteedOrder or error will be non-nil. Any non-2xx 36692 // status code is an error. Response headers are in either 36693 // *GuaranteedOrder.ServerResponse.Header or (if a response was returned 36694 // at all) in error.(*googleapi.Error).Header. Use 36695 // googleapi.IsNotModified to check whether the returned error was 36696 // because http.StatusNotModified was returned. 36697 func (c *GuaranteedOrdersCreateCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) { 36698 gensupport.SetOptions(c.urlParams_, opts...) 36699 res, err := c.doRequest("json") 36700 if res != nil && res.StatusCode == http.StatusNotModified { 36701 if res.Body != nil { 36702 res.Body.Close() 36703 } 36704 return nil, gensupport.WrapError(&googleapi.Error{ 36705 Code: res.StatusCode, 36706 Header: res.Header, 36707 }) 36708 } 36709 if err != nil { 36710 return nil, err 36711 } 36712 defer googleapi.CloseBody(res) 36713 if err := googleapi.CheckResponse(res); err != nil { 36714 return nil, gensupport.WrapError(err) 36715 } 36716 ret := &GuaranteedOrder{ 36717 ServerResponse: googleapi.ServerResponse{ 36718 Header: res.Header, 36719 HTTPStatusCode: res.StatusCode, 36720 }, 36721 } 36722 target := &ret 36723 if err := gensupport.DecodeResponse(target, res); err != nil { 36724 return nil, err 36725 } 36726 return ret, nil 36727 // { 36728 // "description": "Creates a new guaranteed order. Returns the newly created guaranteed order if successful.", 36729 // "flatPath": "v1/guaranteedOrders", 36730 // "httpMethod": "POST", 36731 // "id": "displayvideo.guaranteedOrders.create", 36732 // "parameterOrder": [], 36733 // "parameters": { 36734 // "advertiserId": { 36735 // "description": "The ID of the advertiser that the request is being made within.", 36736 // "format": "int64", 36737 // "location": "query", 36738 // "type": "string" 36739 // }, 36740 // "partnerId": { 36741 // "description": "The ID of the partner that the request is being made within.", 36742 // "format": "int64", 36743 // "location": "query", 36744 // "type": "string" 36745 // } 36746 // }, 36747 // "path": "v1/guaranteedOrders", 36748 // "request": { 36749 // "$ref": "GuaranteedOrder" 36750 // }, 36751 // "response": { 36752 // "$ref": "GuaranteedOrder" 36753 // }, 36754 // "scopes": [ 36755 // "https://www.googleapis.com/auth/display-video" 36756 // ] 36757 // } 36758 36759 } 36760 36761 // method id "displayvideo.guaranteedOrders.editGuaranteedOrderReadAccessors": 36762 36763 type GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall struct { 36764 s *Service 36765 guaranteedOrderId string 36766 editguaranteedorderreadaccessorsrequest *EditGuaranteedOrderReadAccessorsRequest 36767 urlParams_ gensupport.URLParams 36768 ctx_ context.Context 36769 header_ http.Header 36770 } 36771 36772 // EditGuaranteedOrderReadAccessors: Edits read advertisers of a 36773 // guaranteed order. 36774 // 36775 // - guaranteedOrderId: The ID of the guaranteed order to edit. The ID 36776 // is of the format `{exchange}-{legacy_guaranteed_order_id}`. 36777 func (r *GuaranteedOrdersService) EditGuaranteedOrderReadAccessors(guaranteedOrderId string, editguaranteedorderreadaccessorsrequest *EditGuaranteedOrderReadAccessorsRequest) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall { 36778 c := &GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 36779 c.guaranteedOrderId = guaranteedOrderId 36780 c.editguaranteedorderreadaccessorsrequest = editguaranteedorderreadaccessorsrequest 36781 return c 36782 } 36783 36784 // Fields allows partial responses to be retrieved. See 36785 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 36786 // for more information. 36787 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Fields(s ...googleapi.Field) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall { 36788 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 36789 return c 36790 } 36791 36792 // Context sets the context to be used in this call's Do method. Any 36793 // pending HTTP request will be aborted if the provided context is 36794 // canceled. 36795 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Context(ctx context.Context) *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall { 36796 c.ctx_ = ctx 36797 return c 36798 } 36799 36800 // Header returns an http.Header that can be modified by the caller to 36801 // add HTTP headers to the request. 36802 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Header() http.Header { 36803 if c.header_ == nil { 36804 c.header_ = make(http.Header) 36805 } 36806 return c.header_ 36807 } 36808 36809 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) doRequest(alt string) (*http.Response, error) { 36810 reqHeaders := make(http.Header) 36811 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 36812 for k, v := range c.header_ { 36813 reqHeaders[k] = v 36814 } 36815 reqHeaders.Set("User-Agent", c.s.userAgent()) 36816 var body io.Reader = nil 36817 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editguaranteedorderreadaccessorsrequest) 36818 if err != nil { 36819 return nil, err 36820 } 36821 reqHeaders.Set("Content-Type", "application/json") 36822 c.urlParams_.Set("alt", alt) 36823 c.urlParams_.Set("prettyPrint", "false") 36824 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/guaranteedOrders/{+guaranteedOrderId}:editGuaranteedOrderReadAccessors") 36825 urls += "?" + c.urlParams_.Encode() 36826 req, err := http.NewRequest("POST", urls, body) 36827 if err != nil { 36828 return nil, err 36829 } 36830 req.Header = reqHeaders 36831 googleapi.Expand(req.URL, map[string]string{ 36832 "guaranteedOrderId": c.guaranteedOrderId, 36833 }) 36834 return gensupport.SendRequest(c.ctx_, c.s.client, req) 36835 } 36836 36837 // Do executes the "displayvideo.guaranteedOrders.editGuaranteedOrderReadAccessors" call. 36838 // Exactly one of *EditGuaranteedOrderReadAccessorsResponse or error 36839 // will be non-nil. Any non-2xx status code is an error. Response 36840 // headers are in either 36841 // *EditGuaranteedOrderReadAccessorsResponse.ServerResponse.Header or 36842 // (if a response was returned at all) in 36843 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 36844 // whether the returned error was because http.StatusNotModified was 36845 // returned. 36846 func (c *GuaranteedOrdersEditGuaranteedOrderReadAccessorsCall) Do(opts ...googleapi.CallOption) (*EditGuaranteedOrderReadAccessorsResponse, error) { 36847 gensupport.SetOptions(c.urlParams_, opts...) 36848 res, err := c.doRequest("json") 36849 if res != nil && res.StatusCode == http.StatusNotModified { 36850 if res.Body != nil { 36851 res.Body.Close() 36852 } 36853 return nil, gensupport.WrapError(&googleapi.Error{ 36854 Code: res.StatusCode, 36855 Header: res.Header, 36856 }) 36857 } 36858 if err != nil { 36859 return nil, err 36860 } 36861 defer googleapi.CloseBody(res) 36862 if err := googleapi.CheckResponse(res); err != nil { 36863 return nil, gensupport.WrapError(err) 36864 } 36865 ret := &EditGuaranteedOrderReadAccessorsResponse{ 36866 ServerResponse: googleapi.ServerResponse{ 36867 Header: res.Header, 36868 HTTPStatusCode: res.StatusCode, 36869 }, 36870 } 36871 target := &ret 36872 if err := gensupport.DecodeResponse(target, res); err != nil { 36873 return nil, err 36874 } 36875 return ret, nil 36876 // { 36877 // "description": "Edits read advertisers of a guaranteed order.", 36878 // "flatPath": "v1/guaranteedOrders/{guaranteedOrdersId}:editGuaranteedOrderReadAccessors", 36879 // "httpMethod": "POST", 36880 // "id": "displayvideo.guaranteedOrders.editGuaranteedOrderReadAccessors", 36881 // "parameterOrder": [ 36882 // "guaranteedOrderId" 36883 // ], 36884 // "parameters": { 36885 // "guaranteedOrderId": { 36886 // "description": "Required. The ID of the guaranteed order to edit. The ID is of the format `{exchange}-{legacy_guaranteed_order_id}`", 36887 // "location": "path", 36888 // "pattern": "^[^/]+$", 36889 // "required": true, 36890 // "type": "string" 36891 // } 36892 // }, 36893 // "path": "v1/guaranteedOrders/{+guaranteedOrderId}:editGuaranteedOrderReadAccessors", 36894 // "request": { 36895 // "$ref": "EditGuaranteedOrderReadAccessorsRequest" 36896 // }, 36897 // "response": { 36898 // "$ref": "EditGuaranteedOrderReadAccessorsResponse" 36899 // }, 36900 // "scopes": [ 36901 // "https://www.googleapis.com/auth/display-video" 36902 // ] 36903 // } 36904 36905 } 36906 36907 // method id "displayvideo.guaranteedOrders.get": 36908 36909 type GuaranteedOrdersGetCall struct { 36910 s *Service 36911 guaranteedOrderId string 36912 urlParams_ gensupport.URLParams 36913 ifNoneMatch_ string 36914 ctx_ context.Context 36915 header_ http.Header 36916 } 36917 36918 // Get: Gets a guaranteed order. 36919 // 36920 // - guaranteedOrderId: The ID of the guaranteed order to fetch. The ID 36921 // is of the format `{exchange}-{legacy_guaranteed_order_id}`. 36922 func (r *GuaranteedOrdersService) Get(guaranteedOrderId string) *GuaranteedOrdersGetCall { 36923 c := &GuaranteedOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 36924 c.guaranteedOrderId = guaranteedOrderId 36925 return c 36926 } 36927 36928 // AdvertiserId sets the optional parameter "advertiserId": The ID of 36929 // the advertiser that has access to the guaranteed order. 36930 func (c *GuaranteedOrdersGetCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersGetCall { 36931 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 36932 return c 36933 } 36934 36935 // PartnerId sets the optional parameter "partnerId": The ID of the 36936 // partner that has access to the guaranteed order. 36937 func (c *GuaranteedOrdersGetCall) PartnerId(partnerId int64) *GuaranteedOrdersGetCall { 36938 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 36939 return c 36940 } 36941 36942 // Fields allows partial responses to be retrieved. See 36943 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 36944 // for more information. 36945 func (c *GuaranteedOrdersGetCall) Fields(s ...googleapi.Field) *GuaranteedOrdersGetCall { 36946 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 36947 return c 36948 } 36949 36950 // IfNoneMatch sets the optional parameter which makes the operation 36951 // fail if the object's ETag matches the given value. This is useful for 36952 // getting updates only after the object has changed since the last 36953 // request. Use googleapi.IsNotModified to check whether the response 36954 // error from Do is the result of In-None-Match. 36955 func (c *GuaranteedOrdersGetCall) IfNoneMatch(entityTag string) *GuaranteedOrdersGetCall { 36956 c.ifNoneMatch_ = entityTag 36957 return c 36958 } 36959 36960 // Context sets the context to be used in this call's Do method. Any 36961 // pending HTTP request will be aborted if the provided context is 36962 // canceled. 36963 func (c *GuaranteedOrdersGetCall) Context(ctx context.Context) *GuaranteedOrdersGetCall { 36964 c.ctx_ = ctx 36965 return c 36966 } 36967 36968 // Header returns an http.Header that can be modified by the caller to 36969 // add HTTP headers to the request. 36970 func (c *GuaranteedOrdersGetCall) Header() http.Header { 36971 if c.header_ == nil { 36972 c.header_ = make(http.Header) 36973 } 36974 return c.header_ 36975 } 36976 36977 func (c *GuaranteedOrdersGetCall) doRequest(alt string) (*http.Response, error) { 36978 reqHeaders := make(http.Header) 36979 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 36980 for k, v := range c.header_ { 36981 reqHeaders[k] = v 36982 } 36983 reqHeaders.Set("User-Agent", c.s.userAgent()) 36984 if c.ifNoneMatch_ != "" { 36985 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 36986 } 36987 var body io.Reader = nil 36988 c.urlParams_.Set("alt", alt) 36989 c.urlParams_.Set("prettyPrint", "false") 36990 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/guaranteedOrders/{+guaranteedOrderId}") 36991 urls += "?" + c.urlParams_.Encode() 36992 req, err := http.NewRequest("GET", urls, body) 36993 if err != nil { 36994 return nil, err 36995 } 36996 req.Header = reqHeaders 36997 googleapi.Expand(req.URL, map[string]string{ 36998 "guaranteedOrderId": c.guaranteedOrderId, 36999 }) 37000 return gensupport.SendRequest(c.ctx_, c.s.client, req) 37001 } 37002 37003 // Do executes the "displayvideo.guaranteedOrders.get" call. 37004 // Exactly one of *GuaranteedOrder or error will be non-nil. Any non-2xx 37005 // status code is an error. Response headers are in either 37006 // *GuaranteedOrder.ServerResponse.Header or (if a response was returned 37007 // at all) in error.(*googleapi.Error).Header. Use 37008 // googleapi.IsNotModified to check whether the returned error was 37009 // because http.StatusNotModified was returned. 37010 func (c *GuaranteedOrdersGetCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) { 37011 gensupport.SetOptions(c.urlParams_, opts...) 37012 res, err := c.doRequest("json") 37013 if res != nil && res.StatusCode == http.StatusNotModified { 37014 if res.Body != nil { 37015 res.Body.Close() 37016 } 37017 return nil, gensupport.WrapError(&googleapi.Error{ 37018 Code: res.StatusCode, 37019 Header: res.Header, 37020 }) 37021 } 37022 if err != nil { 37023 return nil, err 37024 } 37025 defer googleapi.CloseBody(res) 37026 if err := googleapi.CheckResponse(res); err != nil { 37027 return nil, gensupport.WrapError(err) 37028 } 37029 ret := &GuaranteedOrder{ 37030 ServerResponse: googleapi.ServerResponse{ 37031 Header: res.Header, 37032 HTTPStatusCode: res.StatusCode, 37033 }, 37034 } 37035 target := &ret 37036 if err := gensupport.DecodeResponse(target, res); err != nil { 37037 return nil, err 37038 } 37039 return ret, nil 37040 // { 37041 // "description": "Gets a guaranteed order.", 37042 // "flatPath": "v1/guaranteedOrders/{guaranteedOrdersId}", 37043 // "httpMethod": "GET", 37044 // "id": "displayvideo.guaranteedOrders.get", 37045 // "parameterOrder": [ 37046 // "guaranteedOrderId" 37047 // ], 37048 // "parameters": { 37049 // "advertiserId": { 37050 // "description": "The ID of the advertiser that has access to the guaranteed order.", 37051 // "format": "int64", 37052 // "location": "query", 37053 // "type": "string" 37054 // }, 37055 // "guaranteedOrderId": { 37056 // "description": "Required. The ID of the guaranteed order to fetch. The ID is of the format `{exchange}-{legacy_guaranteed_order_id}`", 37057 // "location": "path", 37058 // "pattern": "^[^/]+$", 37059 // "required": true, 37060 // "type": "string" 37061 // }, 37062 // "partnerId": { 37063 // "description": "The ID of the partner that has access to the guaranteed order.", 37064 // "format": "int64", 37065 // "location": "query", 37066 // "type": "string" 37067 // } 37068 // }, 37069 // "path": "v1/guaranteedOrders/{+guaranteedOrderId}", 37070 // "response": { 37071 // "$ref": "GuaranteedOrder" 37072 // }, 37073 // "scopes": [ 37074 // "https://www.googleapis.com/auth/display-video" 37075 // ] 37076 // } 37077 37078 } 37079 37080 // method id "displayvideo.guaranteedOrders.list": 37081 37082 type GuaranteedOrdersListCall struct { 37083 s *Service 37084 urlParams_ gensupport.URLParams 37085 ifNoneMatch_ string 37086 ctx_ context.Context 37087 header_ http.Header 37088 } 37089 37090 // List: Lists guaranteed orders that are accessible to the current 37091 // user. The order is defined by the order_by parameter. If a filter by 37092 // entity_status is not specified, guaranteed orders with entity status 37093 // `ENTITY_STATUS_ARCHIVED` will not be included in the results. 37094 func (r *GuaranteedOrdersService) List() *GuaranteedOrdersListCall { 37095 c := &GuaranteedOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 37096 return c 37097 } 37098 37099 // AdvertiserId sets the optional parameter "advertiserId": The ID of 37100 // the advertiser that has access to the guaranteed order. 37101 func (c *GuaranteedOrdersListCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersListCall { 37102 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 37103 return c 37104 } 37105 37106 // Filter sets the optional parameter "filter": Allows filtering by 37107 // guaranteed order fields. * Filter expressions are made up of one or 37108 // more restrictions. * Restrictions can be combined by `AND` or `OR` 37109 // logical operators. A sequence of restrictions implicitly uses `AND`. 37110 // * A restriction has the form of `{field} {operator} {value}`. * All 37111 // fields must use the `EQUALS (=)` operator. Supported fields: * 37112 // `guaranteed_order_id` * `exchange` * `display_name` * 37113 // `status.entityStatus` Examples: * All active guaranteed orders: 37114 // `status.entityStatus="ENTITY_STATUS_ACTIVE" * Guaranteed orders 37115 // belonging to Google Ad Manager or Rubicon exchanges: 37116 // `exchange="EXCHANGE_GOOGLE_AD_MANAGER" OR 37117 // exchange="EXCHANGE_RUBICON" The length of this field should be no 37118 // more than 500 characters. Reference our filter `LIST` requests 37119 // (/display-video/api/guides/how-tos/filters) guide for more 37120 // information. 37121 func (c *GuaranteedOrdersListCall) Filter(filter string) *GuaranteedOrdersListCall { 37122 c.urlParams_.Set("filter", filter) 37123 return c 37124 } 37125 37126 // OrderBy sets the optional parameter "orderBy": Field by which to sort 37127 // the list. Acceptable values are: * `displayName` (default) The 37128 // default sorting order is ascending. To specify descending order for a 37129 // field, a suffix "desc" should be added to the field name. For 37130 // example, `displayName desc`. 37131 func (c *GuaranteedOrdersListCall) OrderBy(orderBy string) *GuaranteedOrdersListCall { 37132 c.urlParams_.Set("orderBy", orderBy) 37133 return c 37134 } 37135 37136 // PageSize sets the optional parameter "pageSize": Requested page size. 37137 // Must be between `1` and `200`. If unspecified will default to `100`. 37138 func (c *GuaranteedOrdersListCall) PageSize(pageSize int64) *GuaranteedOrdersListCall { 37139 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 37140 return c 37141 } 37142 37143 // PageToken sets the optional parameter "pageToken": A token 37144 // identifying a page of results the server should return. Typically, 37145 // this is the value of next_page_token returned from the previous call 37146 // to `ListGuaranteedOrders` method. If not specified, the first page of 37147 // results will be returned. 37148 func (c *GuaranteedOrdersListCall) PageToken(pageToken string) *GuaranteedOrdersListCall { 37149 c.urlParams_.Set("pageToken", pageToken) 37150 return c 37151 } 37152 37153 // PartnerId sets the optional parameter "partnerId": The ID of the 37154 // partner that has access to the guaranteed order. 37155 func (c *GuaranteedOrdersListCall) PartnerId(partnerId int64) *GuaranteedOrdersListCall { 37156 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 37157 return c 37158 } 37159 37160 // Fields allows partial responses to be retrieved. See 37161 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 37162 // for more information. 37163 func (c *GuaranteedOrdersListCall) Fields(s ...googleapi.Field) *GuaranteedOrdersListCall { 37164 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 37165 return c 37166 } 37167 37168 // IfNoneMatch sets the optional parameter which makes the operation 37169 // fail if the object's ETag matches the given value. This is useful for 37170 // getting updates only after the object has changed since the last 37171 // request. Use googleapi.IsNotModified to check whether the response 37172 // error from Do is the result of In-None-Match. 37173 func (c *GuaranteedOrdersListCall) IfNoneMatch(entityTag string) *GuaranteedOrdersListCall { 37174 c.ifNoneMatch_ = entityTag 37175 return c 37176 } 37177 37178 // Context sets the context to be used in this call's Do method. Any 37179 // pending HTTP request will be aborted if the provided context is 37180 // canceled. 37181 func (c *GuaranteedOrdersListCall) Context(ctx context.Context) *GuaranteedOrdersListCall { 37182 c.ctx_ = ctx 37183 return c 37184 } 37185 37186 // Header returns an http.Header that can be modified by the caller to 37187 // add HTTP headers to the request. 37188 func (c *GuaranteedOrdersListCall) Header() http.Header { 37189 if c.header_ == nil { 37190 c.header_ = make(http.Header) 37191 } 37192 return c.header_ 37193 } 37194 37195 func (c *GuaranteedOrdersListCall) doRequest(alt string) (*http.Response, error) { 37196 reqHeaders := make(http.Header) 37197 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 37198 for k, v := range c.header_ { 37199 reqHeaders[k] = v 37200 } 37201 reqHeaders.Set("User-Agent", c.s.userAgent()) 37202 if c.ifNoneMatch_ != "" { 37203 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 37204 } 37205 var body io.Reader = nil 37206 c.urlParams_.Set("alt", alt) 37207 c.urlParams_.Set("prettyPrint", "false") 37208 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/guaranteedOrders") 37209 urls += "?" + c.urlParams_.Encode() 37210 req, err := http.NewRequest("GET", urls, body) 37211 if err != nil { 37212 return nil, err 37213 } 37214 req.Header = reqHeaders 37215 return gensupport.SendRequest(c.ctx_, c.s.client, req) 37216 } 37217 37218 // Do executes the "displayvideo.guaranteedOrders.list" call. 37219 // Exactly one of *ListGuaranteedOrdersResponse or error will be 37220 // non-nil. Any non-2xx status code is an error. Response headers are in 37221 // either *ListGuaranteedOrdersResponse.ServerResponse.Header or (if a 37222 // response was returned at all) in error.(*googleapi.Error).Header. Use 37223 // googleapi.IsNotModified to check whether the returned error was 37224 // because http.StatusNotModified was returned. 37225 func (c *GuaranteedOrdersListCall) Do(opts ...googleapi.CallOption) (*ListGuaranteedOrdersResponse, error) { 37226 gensupport.SetOptions(c.urlParams_, opts...) 37227 res, err := c.doRequest("json") 37228 if res != nil && res.StatusCode == http.StatusNotModified { 37229 if res.Body != nil { 37230 res.Body.Close() 37231 } 37232 return nil, gensupport.WrapError(&googleapi.Error{ 37233 Code: res.StatusCode, 37234 Header: res.Header, 37235 }) 37236 } 37237 if err != nil { 37238 return nil, err 37239 } 37240 defer googleapi.CloseBody(res) 37241 if err := googleapi.CheckResponse(res); err != nil { 37242 return nil, gensupport.WrapError(err) 37243 } 37244 ret := &ListGuaranteedOrdersResponse{ 37245 ServerResponse: googleapi.ServerResponse{ 37246 Header: res.Header, 37247 HTTPStatusCode: res.StatusCode, 37248 }, 37249 } 37250 target := &ret 37251 if err := gensupport.DecodeResponse(target, res); err != nil { 37252 return nil, err 37253 } 37254 return ret, nil 37255 // { 37256 // "description": "Lists guaranteed orders that are accessible to the current user. The order is defined by the order_by parameter. If a filter by entity_status is not specified, guaranteed orders with entity status `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 37257 // "flatPath": "v1/guaranteedOrders", 37258 // "httpMethod": "GET", 37259 // "id": "displayvideo.guaranteedOrders.list", 37260 // "parameterOrder": [], 37261 // "parameters": { 37262 // "advertiserId": { 37263 // "description": "The ID of the advertiser that has access to the guaranteed order.", 37264 // "format": "int64", 37265 // "location": "query", 37266 // "type": "string" 37267 // }, 37268 // "filter": { 37269 // "description": "Allows filtering by guaranteed order fields. * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `guaranteed_order_id` * `exchange` * `display_name` * `status.entityStatus` Examples: * All active guaranteed orders: `status.entityStatus=\"ENTITY_STATUS_ACTIVE\"` * Guaranteed orders belonging to Google Ad Manager or Rubicon exchanges: `exchange=\"EXCHANGE_GOOGLE_AD_MANAGER\" OR exchange=\"EXCHANGE_RUBICON\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 37270 // "location": "query", 37271 // "type": "string" 37272 // }, 37273 // "orderBy": { 37274 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 37275 // "location": "query", 37276 // "type": "string" 37277 // }, 37278 // "pageSize": { 37279 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 37280 // "format": "int32", 37281 // "location": "query", 37282 // "type": "integer" 37283 // }, 37284 // "pageToken": { 37285 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListGuaranteedOrders` method. If not specified, the first page of results will be returned.", 37286 // "location": "query", 37287 // "type": "string" 37288 // }, 37289 // "partnerId": { 37290 // "description": "The ID of the partner that has access to the guaranteed order.", 37291 // "format": "int64", 37292 // "location": "query", 37293 // "type": "string" 37294 // } 37295 // }, 37296 // "path": "v1/guaranteedOrders", 37297 // "response": { 37298 // "$ref": "ListGuaranteedOrdersResponse" 37299 // }, 37300 // "scopes": [ 37301 // "https://www.googleapis.com/auth/display-video" 37302 // ] 37303 // } 37304 37305 } 37306 37307 // Pages invokes f for each page of results. 37308 // A non-nil error returned from f will halt the iteration. 37309 // The provided context supersedes any context provided to the Context method. 37310 func (c *GuaranteedOrdersListCall) Pages(ctx context.Context, f func(*ListGuaranteedOrdersResponse) error) error { 37311 c.ctx_ = ctx 37312 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 37313 for { 37314 x, err := c.Do() 37315 if err != nil { 37316 return err 37317 } 37318 if err := f(x); err != nil { 37319 return err 37320 } 37321 if x.NextPageToken == "" { 37322 return nil 37323 } 37324 c.PageToken(x.NextPageToken) 37325 } 37326 } 37327 37328 // method id "displayvideo.guaranteedOrders.patch": 37329 37330 type GuaranteedOrdersPatchCall struct { 37331 s *Service 37332 guaranteedOrderId string 37333 guaranteedorder *GuaranteedOrder 37334 urlParams_ gensupport.URLParams 37335 ctx_ context.Context 37336 header_ http.Header 37337 } 37338 37339 // Patch: Updates an existing guaranteed order. Returns the updated 37340 // guaranteed order if successful. 37341 // 37342 // - guaranteedOrderId: Output only. The unique identifier of the 37343 // guaranteed order. The guaranteed order IDs have the format 37344 // `{exchange}-{legacy_guaranteed_order_id}`. 37345 func (r *GuaranteedOrdersService) Patch(guaranteedOrderId string, guaranteedorder *GuaranteedOrder) *GuaranteedOrdersPatchCall { 37346 c := &GuaranteedOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 37347 c.guaranteedOrderId = guaranteedOrderId 37348 c.guaranteedorder = guaranteedorder 37349 return c 37350 } 37351 37352 // AdvertiserId sets the optional parameter "advertiserId": The ID of 37353 // the advertiser that the request is being made within. 37354 func (c *GuaranteedOrdersPatchCall) AdvertiserId(advertiserId int64) *GuaranteedOrdersPatchCall { 37355 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 37356 return c 37357 } 37358 37359 // PartnerId sets the optional parameter "partnerId": The ID of the 37360 // partner that the request is being made within. 37361 func (c *GuaranteedOrdersPatchCall) PartnerId(partnerId int64) *GuaranteedOrdersPatchCall { 37362 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 37363 return c 37364 } 37365 37366 // UpdateMask sets the optional parameter "updateMask": Required. The 37367 // mask to control which fields to update. 37368 func (c *GuaranteedOrdersPatchCall) UpdateMask(updateMask string) *GuaranteedOrdersPatchCall { 37369 c.urlParams_.Set("updateMask", updateMask) 37370 return c 37371 } 37372 37373 // Fields allows partial responses to be retrieved. See 37374 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 37375 // for more information. 37376 func (c *GuaranteedOrdersPatchCall) Fields(s ...googleapi.Field) *GuaranteedOrdersPatchCall { 37377 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 37378 return c 37379 } 37380 37381 // Context sets the context to be used in this call's Do method. Any 37382 // pending HTTP request will be aborted if the provided context is 37383 // canceled. 37384 func (c *GuaranteedOrdersPatchCall) Context(ctx context.Context) *GuaranteedOrdersPatchCall { 37385 c.ctx_ = ctx 37386 return c 37387 } 37388 37389 // Header returns an http.Header that can be modified by the caller to 37390 // add HTTP headers to the request. 37391 func (c *GuaranteedOrdersPatchCall) Header() http.Header { 37392 if c.header_ == nil { 37393 c.header_ = make(http.Header) 37394 } 37395 return c.header_ 37396 } 37397 37398 func (c *GuaranteedOrdersPatchCall) doRequest(alt string) (*http.Response, error) { 37399 reqHeaders := make(http.Header) 37400 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 37401 for k, v := range c.header_ { 37402 reqHeaders[k] = v 37403 } 37404 reqHeaders.Set("User-Agent", c.s.userAgent()) 37405 var body io.Reader = nil 37406 body, err := googleapi.WithoutDataWrapper.JSONReader(c.guaranteedorder) 37407 if err != nil { 37408 return nil, err 37409 } 37410 reqHeaders.Set("Content-Type", "application/json") 37411 c.urlParams_.Set("alt", alt) 37412 c.urlParams_.Set("prettyPrint", "false") 37413 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/guaranteedOrders/{+guaranteedOrderId}") 37414 urls += "?" + c.urlParams_.Encode() 37415 req, err := http.NewRequest("PATCH", urls, body) 37416 if err != nil { 37417 return nil, err 37418 } 37419 req.Header = reqHeaders 37420 googleapi.Expand(req.URL, map[string]string{ 37421 "guaranteedOrderId": c.guaranteedOrderId, 37422 }) 37423 return gensupport.SendRequest(c.ctx_, c.s.client, req) 37424 } 37425 37426 // Do executes the "displayvideo.guaranteedOrders.patch" call. 37427 // Exactly one of *GuaranteedOrder or error will be non-nil. Any non-2xx 37428 // status code is an error. Response headers are in either 37429 // *GuaranteedOrder.ServerResponse.Header or (if a response was returned 37430 // at all) in error.(*googleapi.Error).Header. Use 37431 // googleapi.IsNotModified to check whether the returned error was 37432 // because http.StatusNotModified was returned. 37433 func (c *GuaranteedOrdersPatchCall) Do(opts ...googleapi.CallOption) (*GuaranteedOrder, error) { 37434 gensupport.SetOptions(c.urlParams_, opts...) 37435 res, err := c.doRequest("json") 37436 if res != nil && res.StatusCode == http.StatusNotModified { 37437 if res.Body != nil { 37438 res.Body.Close() 37439 } 37440 return nil, gensupport.WrapError(&googleapi.Error{ 37441 Code: res.StatusCode, 37442 Header: res.Header, 37443 }) 37444 } 37445 if err != nil { 37446 return nil, err 37447 } 37448 defer googleapi.CloseBody(res) 37449 if err := googleapi.CheckResponse(res); err != nil { 37450 return nil, gensupport.WrapError(err) 37451 } 37452 ret := &GuaranteedOrder{ 37453 ServerResponse: googleapi.ServerResponse{ 37454 Header: res.Header, 37455 HTTPStatusCode: res.StatusCode, 37456 }, 37457 } 37458 target := &ret 37459 if err := gensupport.DecodeResponse(target, res); err != nil { 37460 return nil, err 37461 } 37462 return ret, nil 37463 // { 37464 // "description": "Updates an existing guaranteed order. Returns the updated guaranteed order if successful.", 37465 // "flatPath": "v1/guaranteedOrders/{guaranteedOrdersId}", 37466 // "httpMethod": "PATCH", 37467 // "id": "displayvideo.guaranteedOrders.patch", 37468 // "parameterOrder": [ 37469 // "guaranteedOrderId" 37470 // ], 37471 // "parameters": { 37472 // "advertiserId": { 37473 // "description": "The ID of the advertiser that the request is being made within.", 37474 // "format": "int64", 37475 // "location": "query", 37476 // "type": "string" 37477 // }, 37478 // "guaranteedOrderId": { 37479 // "description": "Output only. The unique identifier of the guaranteed order. The guaranteed order IDs have the format `{exchange}-{legacy_guaranteed_order_id}`.", 37480 // "location": "path", 37481 // "pattern": "^[^/]+$", 37482 // "required": true, 37483 // "type": "string" 37484 // }, 37485 // "partnerId": { 37486 // "description": "The ID of the partner that the request is being made within.", 37487 // "format": "int64", 37488 // "location": "query", 37489 // "type": "string" 37490 // }, 37491 // "updateMask": { 37492 // "description": "Required. The mask to control which fields to update.", 37493 // "format": "google-fieldmask", 37494 // "location": "query", 37495 // "type": "string" 37496 // } 37497 // }, 37498 // "path": "v1/guaranteedOrders/{+guaranteedOrderId}", 37499 // "request": { 37500 // "$ref": "GuaranteedOrder" 37501 // }, 37502 // "response": { 37503 // "$ref": "GuaranteedOrder" 37504 // }, 37505 // "scopes": [ 37506 // "https://www.googleapis.com/auth/display-video" 37507 // ] 37508 // } 37509 37510 } 37511 37512 // method id "displayvideo.inventorySourceGroups.create": 37513 37514 type InventorySourceGroupsCreateCall struct { 37515 s *Service 37516 inventorysourcegroup *InventorySourceGroup 37517 urlParams_ gensupport.URLParams 37518 ctx_ context.Context 37519 header_ http.Header 37520 } 37521 37522 // Create: Creates a new inventory source group. Returns the newly 37523 // created inventory source group if successful. 37524 func (r *InventorySourceGroupsService) Create(inventorysourcegroup *InventorySourceGroup) *InventorySourceGroupsCreateCall { 37525 c := &InventorySourceGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 37526 c.inventorysourcegroup = inventorysourcegroup 37527 return c 37528 } 37529 37530 // AdvertiserId sets the optional parameter "advertiserId": The ID of 37531 // the advertiser that owns the inventory source group. The parent 37532 // partner will not have access to this group. 37533 func (c *InventorySourceGroupsCreateCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsCreateCall { 37534 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 37535 return c 37536 } 37537 37538 // PartnerId sets the optional parameter "partnerId": The ID of the 37539 // partner that owns the inventory source group. Only this partner will 37540 // have write access to this group. Only advertisers to which this group 37541 // is explicitly shared will have read access to this group. 37542 func (c *InventorySourceGroupsCreateCall) PartnerId(partnerId int64) *InventorySourceGroupsCreateCall { 37543 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 37544 return c 37545 } 37546 37547 // Fields allows partial responses to be retrieved. See 37548 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 37549 // for more information. 37550 func (c *InventorySourceGroupsCreateCall) Fields(s ...googleapi.Field) *InventorySourceGroupsCreateCall { 37551 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 37552 return c 37553 } 37554 37555 // Context sets the context to be used in this call's Do method. Any 37556 // pending HTTP request will be aborted if the provided context is 37557 // canceled. 37558 func (c *InventorySourceGroupsCreateCall) Context(ctx context.Context) *InventorySourceGroupsCreateCall { 37559 c.ctx_ = ctx 37560 return c 37561 } 37562 37563 // Header returns an http.Header that can be modified by the caller to 37564 // add HTTP headers to the request. 37565 func (c *InventorySourceGroupsCreateCall) Header() http.Header { 37566 if c.header_ == nil { 37567 c.header_ = make(http.Header) 37568 } 37569 return c.header_ 37570 } 37571 37572 func (c *InventorySourceGroupsCreateCall) doRequest(alt string) (*http.Response, error) { 37573 reqHeaders := make(http.Header) 37574 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 37575 for k, v := range c.header_ { 37576 reqHeaders[k] = v 37577 } 37578 reqHeaders.Set("User-Agent", c.s.userAgent()) 37579 var body io.Reader = nil 37580 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysourcegroup) 37581 if err != nil { 37582 return nil, err 37583 } 37584 reqHeaders.Set("Content-Type", "application/json") 37585 c.urlParams_.Set("alt", alt) 37586 c.urlParams_.Set("prettyPrint", "false") 37587 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups") 37588 urls += "?" + c.urlParams_.Encode() 37589 req, err := http.NewRequest("POST", urls, body) 37590 if err != nil { 37591 return nil, err 37592 } 37593 req.Header = reqHeaders 37594 return gensupport.SendRequest(c.ctx_, c.s.client, req) 37595 } 37596 37597 // Do executes the "displayvideo.inventorySourceGroups.create" call. 37598 // Exactly one of *InventorySourceGroup or error will be non-nil. Any 37599 // non-2xx status code is an error. Response headers are in either 37600 // *InventorySourceGroup.ServerResponse.Header or (if a response was 37601 // returned at all) in error.(*googleapi.Error).Header. Use 37602 // googleapi.IsNotModified to check whether the returned error was 37603 // because http.StatusNotModified was returned. 37604 func (c *InventorySourceGroupsCreateCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) { 37605 gensupport.SetOptions(c.urlParams_, opts...) 37606 res, err := c.doRequest("json") 37607 if res != nil && res.StatusCode == http.StatusNotModified { 37608 if res.Body != nil { 37609 res.Body.Close() 37610 } 37611 return nil, gensupport.WrapError(&googleapi.Error{ 37612 Code: res.StatusCode, 37613 Header: res.Header, 37614 }) 37615 } 37616 if err != nil { 37617 return nil, err 37618 } 37619 defer googleapi.CloseBody(res) 37620 if err := googleapi.CheckResponse(res); err != nil { 37621 return nil, gensupport.WrapError(err) 37622 } 37623 ret := &InventorySourceGroup{ 37624 ServerResponse: googleapi.ServerResponse{ 37625 Header: res.Header, 37626 HTTPStatusCode: res.StatusCode, 37627 }, 37628 } 37629 target := &ret 37630 if err := gensupport.DecodeResponse(target, res); err != nil { 37631 return nil, err 37632 } 37633 return ret, nil 37634 // { 37635 // "description": "Creates a new inventory source group. Returns the newly created inventory source group if successful.", 37636 // "flatPath": "v1/inventorySourceGroups", 37637 // "httpMethod": "POST", 37638 // "id": "displayvideo.inventorySourceGroups.create", 37639 // "parameterOrder": [], 37640 // "parameters": { 37641 // "advertiserId": { 37642 // "description": "The ID of the advertiser that owns the inventory source group. The parent partner will not have access to this group.", 37643 // "format": "int64", 37644 // "location": "query", 37645 // "type": "string" 37646 // }, 37647 // "partnerId": { 37648 // "description": "The ID of the partner that owns the inventory source group. Only this partner will have write access to this group. Only advertisers to which this group is explicitly shared will have read access to this group.", 37649 // "format": "int64", 37650 // "location": "query", 37651 // "type": "string" 37652 // } 37653 // }, 37654 // "path": "v1/inventorySourceGroups", 37655 // "request": { 37656 // "$ref": "InventorySourceGroup" 37657 // }, 37658 // "response": { 37659 // "$ref": "InventorySourceGroup" 37660 // }, 37661 // "scopes": [ 37662 // "https://www.googleapis.com/auth/display-video" 37663 // ] 37664 // } 37665 37666 } 37667 37668 // method id "displayvideo.inventorySourceGroups.delete": 37669 37670 type InventorySourceGroupsDeleteCall struct { 37671 s *Service 37672 inventorySourceGroupId int64 37673 urlParams_ gensupport.URLParams 37674 ctx_ context.Context 37675 header_ http.Header 37676 } 37677 37678 // Delete: Deletes an inventory source group. 37679 // 37680 // - inventorySourceGroupId: The ID of the inventory source group to 37681 // delete. 37682 func (r *InventorySourceGroupsService) Delete(inventorySourceGroupId int64) *InventorySourceGroupsDeleteCall { 37683 c := &InventorySourceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 37684 c.inventorySourceGroupId = inventorySourceGroupId 37685 return c 37686 } 37687 37688 // AdvertiserId sets the optional parameter "advertiserId": The ID of 37689 // the advertiser that owns the inventory source group. The parent 37690 // partner does not have access to this group. 37691 func (c *InventorySourceGroupsDeleteCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsDeleteCall { 37692 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 37693 return c 37694 } 37695 37696 // PartnerId sets the optional parameter "partnerId": The ID of the 37697 // partner that owns the inventory source group. Only this partner has 37698 // write access to this group. 37699 func (c *InventorySourceGroupsDeleteCall) PartnerId(partnerId int64) *InventorySourceGroupsDeleteCall { 37700 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 37701 return c 37702 } 37703 37704 // Fields allows partial responses to be retrieved. See 37705 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 37706 // for more information. 37707 func (c *InventorySourceGroupsDeleteCall) Fields(s ...googleapi.Field) *InventorySourceGroupsDeleteCall { 37708 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 37709 return c 37710 } 37711 37712 // Context sets the context to be used in this call's Do method. Any 37713 // pending HTTP request will be aborted if the provided context is 37714 // canceled. 37715 func (c *InventorySourceGroupsDeleteCall) Context(ctx context.Context) *InventorySourceGroupsDeleteCall { 37716 c.ctx_ = ctx 37717 return c 37718 } 37719 37720 // Header returns an http.Header that can be modified by the caller to 37721 // add HTTP headers to the request. 37722 func (c *InventorySourceGroupsDeleteCall) Header() http.Header { 37723 if c.header_ == nil { 37724 c.header_ = make(http.Header) 37725 } 37726 return c.header_ 37727 } 37728 37729 func (c *InventorySourceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { 37730 reqHeaders := make(http.Header) 37731 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 37732 for k, v := range c.header_ { 37733 reqHeaders[k] = v 37734 } 37735 reqHeaders.Set("User-Agent", c.s.userAgent()) 37736 var body io.Reader = nil 37737 c.urlParams_.Set("alt", alt) 37738 c.urlParams_.Set("prettyPrint", "false") 37739 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}") 37740 urls += "?" + c.urlParams_.Encode() 37741 req, err := http.NewRequest("DELETE", urls, body) 37742 if err != nil { 37743 return nil, err 37744 } 37745 req.Header = reqHeaders 37746 googleapi.Expand(req.URL, map[string]string{ 37747 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 37748 }) 37749 return gensupport.SendRequest(c.ctx_, c.s.client, req) 37750 } 37751 37752 // Do executes the "displayvideo.inventorySourceGroups.delete" call. 37753 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 37754 // code is an error. Response headers are in either 37755 // *Empty.ServerResponse.Header or (if a response was returned at all) 37756 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 37757 // check whether the returned error was because http.StatusNotModified 37758 // was returned. 37759 func (c *InventorySourceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 37760 gensupport.SetOptions(c.urlParams_, opts...) 37761 res, err := c.doRequest("json") 37762 if res != nil && res.StatusCode == http.StatusNotModified { 37763 if res.Body != nil { 37764 res.Body.Close() 37765 } 37766 return nil, gensupport.WrapError(&googleapi.Error{ 37767 Code: res.StatusCode, 37768 Header: res.Header, 37769 }) 37770 } 37771 if err != nil { 37772 return nil, err 37773 } 37774 defer googleapi.CloseBody(res) 37775 if err := googleapi.CheckResponse(res); err != nil { 37776 return nil, gensupport.WrapError(err) 37777 } 37778 ret := &Empty{ 37779 ServerResponse: googleapi.ServerResponse{ 37780 Header: res.Header, 37781 HTTPStatusCode: res.StatusCode, 37782 }, 37783 } 37784 target := &ret 37785 if err := gensupport.DecodeResponse(target, res); err != nil { 37786 return nil, err 37787 } 37788 return ret, nil 37789 // { 37790 // "description": "Deletes an inventory source group.", 37791 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}", 37792 // "httpMethod": "DELETE", 37793 // "id": "displayvideo.inventorySourceGroups.delete", 37794 // "parameterOrder": [ 37795 // "inventorySourceGroupId" 37796 // ], 37797 // "parameters": { 37798 // "advertiserId": { 37799 // "description": "The ID of the advertiser that owns the inventory source group. The parent partner does not have access to this group.", 37800 // "format": "int64", 37801 // "location": "query", 37802 // "type": "string" 37803 // }, 37804 // "inventorySourceGroupId": { 37805 // "description": "Required. The ID of the inventory source group to delete.", 37806 // "format": "int64", 37807 // "location": "path", 37808 // "pattern": "^[^/]+$", 37809 // "required": true, 37810 // "type": "string" 37811 // }, 37812 // "partnerId": { 37813 // "description": "The ID of the partner that owns the inventory source group. Only this partner has write access to this group.", 37814 // "format": "int64", 37815 // "location": "query", 37816 // "type": "string" 37817 // } 37818 // }, 37819 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}", 37820 // "response": { 37821 // "$ref": "Empty" 37822 // }, 37823 // "scopes": [ 37824 // "https://www.googleapis.com/auth/display-video" 37825 // ] 37826 // } 37827 37828 } 37829 37830 // method id "displayvideo.inventorySourceGroups.get": 37831 37832 type InventorySourceGroupsGetCall struct { 37833 s *Service 37834 inventorySourceGroupId int64 37835 urlParams_ gensupport.URLParams 37836 ifNoneMatch_ string 37837 ctx_ context.Context 37838 header_ http.Header 37839 } 37840 37841 // Get: Gets an inventory source group. 37842 // 37843 // - inventorySourceGroupId: The ID of the inventory source group to 37844 // fetch. 37845 func (r *InventorySourceGroupsService) Get(inventorySourceGroupId int64) *InventorySourceGroupsGetCall { 37846 c := &InventorySourceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 37847 c.inventorySourceGroupId = inventorySourceGroupId 37848 return c 37849 } 37850 37851 // AdvertiserId sets the optional parameter "advertiserId": The ID of 37852 // the advertiser that has access to the inventory source group. If an 37853 // inventory source group is partner-owned, only advertisers to which 37854 // the group is explicitly shared can access the group. 37855 func (c *InventorySourceGroupsGetCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsGetCall { 37856 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 37857 return c 37858 } 37859 37860 // PartnerId sets the optional parameter "partnerId": The ID of the 37861 // partner that has access to the inventory source group. A partner 37862 // cannot access an advertiser-owned inventory source group. 37863 func (c *InventorySourceGroupsGetCall) PartnerId(partnerId int64) *InventorySourceGroupsGetCall { 37864 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 37865 return c 37866 } 37867 37868 // Fields allows partial responses to be retrieved. See 37869 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 37870 // for more information. 37871 func (c *InventorySourceGroupsGetCall) Fields(s ...googleapi.Field) *InventorySourceGroupsGetCall { 37872 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 37873 return c 37874 } 37875 37876 // IfNoneMatch sets the optional parameter which makes the operation 37877 // fail if the object's ETag matches the given value. This is useful for 37878 // getting updates only after the object has changed since the last 37879 // request. Use googleapi.IsNotModified to check whether the response 37880 // error from Do is the result of In-None-Match. 37881 func (c *InventorySourceGroupsGetCall) IfNoneMatch(entityTag string) *InventorySourceGroupsGetCall { 37882 c.ifNoneMatch_ = entityTag 37883 return c 37884 } 37885 37886 // Context sets the context to be used in this call's Do method. Any 37887 // pending HTTP request will be aborted if the provided context is 37888 // canceled. 37889 func (c *InventorySourceGroupsGetCall) Context(ctx context.Context) *InventorySourceGroupsGetCall { 37890 c.ctx_ = ctx 37891 return c 37892 } 37893 37894 // Header returns an http.Header that can be modified by the caller to 37895 // add HTTP headers to the request. 37896 func (c *InventorySourceGroupsGetCall) Header() http.Header { 37897 if c.header_ == nil { 37898 c.header_ = make(http.Header) 37899 } 37900 return c.header_ 37901 } 37902 37903 func (c *InventorySourceGroupsGetCall) doRequest(alt string) (*http.Response, error) { 37904 reqHeaders := make(http.Header) 37905 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 37906 for k, v := range c.header_ { 37907 reqHeaders[k] = v 37908 } 37909 reqHeaders.Set("User-Agent", c.s.userAgent()) 37910 if c.ifNoneMatch_ != "" { 37911 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 37912 } 37913 var body io.Reader = nil 37914 c.urlParams_.Set("alt", alt) 37915 c.urlParams_.Set("prettyPrint", "false") 37916 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}") 37917 urls += "?" + c.urlParams_.Encode() 37918 req, err := http.NewRequest("GET", urls, body) 37919 if err != nil { 37920 return nil, err 37921 } 37922 req.Header = reqHeaders 37923 googleapi.Expand(req.URL, map[string]string{ 37924 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 37925 }) 37926 return gensupport.SendRequest(c.ctx_, c.s.client, req) 37927 } 37928 37929 // Do executes the "displayvideo.inventorySourceGroups.get" call. 37930 // Exactly one of *InventorySourceGroup or error will be non-nil. Any 37931 // non-2xx status code is an error. Response headers are in either 37932 // *InventorySourceGroup.ServerResponse.Header or (if a response was 37933 // returned at all) in error.(*googleapi.Error).Header. Use 37934 // googleapi.IsNotModified to check whether the returned error was 37935 // because http.StatusNotModified was returned. 37936 func (c *InventorySourceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) { 37937 gensupport.SetOptions(c.urlParams_, opts...) 37938 res, err := c.doRequest("json") 37939 if res != nil && res.StatusCode == http.StatusNotModified { 37940 if res.Body != nil { 37941 res.Body.Close() 37942 } 37943 return nil, gensupport.WrapError(&googleapi.Error{ 37944 Code: res.StatusCode, 37945 Header: res.Header, 37946 }) 37947 } 37948 if err != nil { 37949 return nil, err 37950 } 37951 defer googleapi.CloseBody(res) 37952 if err := googleapi.CheckResponse(res); err != nil { 37953 return nil, gensupport.WrapError(err) 37954 } 37955 ret := &InventorySourceGroup{ 37956 ServerResponse: googleapi.ServerResponse{ 37957 Header: res.Header, 37958 HTTPStatusCode: res.StatusCode, 37959 }, 37960 } 37961 target := &ret 37962 if err := gensupport.DecodeResponse(target, res); err != nil { 37963 return nil, err 37964 } 37965 return ret, nil 37966 // { 37967 // "description": "Gets an inventory source group.", 37968 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}", 37969 // "httpMethod": "GET", 37970 // "id": "displayvideo.inventorySourceGroups.get", 37971 // "parameterOrder": [ 37972 // "inventorySourceGroupId" 37973 // ], 37974 // "parameters": { 37975 // "advertiserId": { 37976 // "description": "The ID of the advertiser that has access to the inventory source group. If an inventory source group is partner-owned, only advertisers to which the group is explicitly shared can access the group.", 37977 // "format": "int64", 37978 // "location": "query", 37979 // "type": "string" 37980 // }, 37981 // "inventorySourceGroupId": { 37982 // "description": "Required. The ID of the inventory source group to fetch.", 37983 // "format": "int64", 37984 // "location": "path", 37985 // "pattern": "^[^/]+$", 37986 // "required": true, 37987 // "type": "string" 37988 // }, 37989 // "partnerId": { 37990 // "description": "The ID of the partner that has access to the inventory source group. A partner cannot access an advertiser-owned inventory source group.", 37991 // "format": "int64", 37992 // "location": "query", 37993 // "type": "string" 37994 // } 37995 // }, 37996 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}", 37997 // "response": { 37998 // "$ref": "InventorySourceGroup" 37999 // }, 38000 // "scopes": [ 38001 // "https://www.googleapis.com/auth/display-video" 38002 // ] 38003 // } 38004 38005 } 38006 38007 // method id "displayvideo.inventorySourceGroups.list": 38008 38009 type InventorySourceGroupsListCall struct { 38010 s *Service 38011 urlParams_ gensupport.URLParams 38012 ifNoneMatch_ string 38013 ctx_ context.Context 38014 header_ http.Header 38015 } 38016 38017 // List: Lists inventory source groups that are accessible to the 38018 // current user. The order is defined by the order_by parameter. 38019 func (r *InventorySourceGroupsService) List() *InventorySourceGroupsListCall { 38020 c := &InventorySourceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 38021 return c 38022 } 38023 38024 // AdvertiserId sets the optional parameter "advertiserId": The ID of 38025 // the advertiser that has access to the inventory source group. If an 38026 // inventory source group is partner-owned, only advertisers to which 38027 // the group is explicitly shared can access the group. 38028 func (c *InventorySourceGroupsListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsListCall { 38029 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 38030 return c 38031 } 38032 38033 // Filter sets the optional parameter "filter": Allows filtering by 38034 // inventory source group fields. Supported syntax: * Filter expressions 38035 // are made up of one or more restrictions. * Restrictions can be 38036 // combined by the logical operator `OR`. * A restriction has the form 38037 // of `{field} {operator} {value}`. * All fields must use the `EQUALS 38038 // (=)` operator. Supported fields: * `inventorySourceGroupId` The 38039 // length of this field should be no more than 500 characters. Reference 38040 // our filter `LIST` requests 38041 // (/display-video/api/guides/how-tos/filters) guide for more 38042 // information. 38043 func (c *InventorySourceGroupsListCall) Filter(filter string) *InventorySourceGroupsListCall { 38044 c.urlParams_.Set("filter", filter) 38045 return c 38046 } 38047 38048 // OrderBy sets the optional parameter "orderBy": Field by which to sort 38049 // the list. Acceptable values are: * `displayName` (default) * 38050 // `inventorySourceGroupId` The default sorting order is ascending. To 38051 // specify descending order for a field, a suffix "desc" should be added 38052 // to the field name. For example, `displayName desc`. 38053 func (c *InventorySourceGroupsListCall) OrderBy(orderBy string) *InventorySourceGroupsListCall { 38054 c.urlParams_.Set("orderBy", orderBy) 38055 return c 38056 } 38057 38058 // PageSize sets the optional parameter "pageSize": Requested page size. 38059 // Must be between `1` and `200`. If unspecified will default to `100`. 38060 func (c *InventorySourceGroupsListCall) PageSize(pageSize int64) *InventorySourceGroupsListCall { 38061 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 38062 return c 38063 } 38064 38065 // PageToken sets the optional parameter "pageToken": A token 38066 // identifying a page of results the server should return. Typically, 38067 // this is the value of next_page_token returned from the previous call 38068 // to `ListInventorySources` method. If not specified, the first page of 38069 // results will be returned. 38070 func (c *InventorySourceGroupsListCall) PageToken(pageToken string) *InventorySourceGroupsListCall { 38071 c.urlParams_.Set("pageToken", pageToken) 38072 return c 38073 } 38074 38075 // PartnerId sets the optional parameter "partnerId": The ID of the 38076 // partner that has access to the inventory source group. A partner 38077 // cannot access advertiser-owned inventory source groups. 38078 func (c *InventorySourceGroupsListCall) PartnerId(partnerId int64) *InventorySourceGroupsListCall { 38079 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 38080 return c 38081 } 38082 38083 // Fields allows partial responses to be retrieved. See 38084 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 38085 // for more information. 38086 func (c *InventorySourceGroupsListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsListCall { 38087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 38088 return c 38089 } 38090 38091 // IfNoneMatch sets the optional parameter which makes the operation 38092 // fail if the object's ETag matches the given value. This is useful for 38093 // getting updates only after the object has changed since the last 38094 // request. Use googleapi.IsNotModified to check whether the response 38095 // error from Do is the result of In-None-Match. 38096 func (c *InventorySourceGroupsListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsListCall { 38097 c.ifNoneMatch_ = entityTag 38098 return c 38099 } 38100 38101 // Context sets the context to be used in this call's Do method. Any 38102 // pending HTTP request will be aborted if the provided context is 38103 // canceled. 38104 func (c *InventorySourceGroupsListCall) Context(ctx context.Context) *InventorySourceGroupsListCall { 38105 c.ctx_ = ctx 38106 return c 38107 } 38108 38109 // Header returns an http.Header that can be modified by the caller to 38110 // add HTTP headers to the request. 38111 func (c *InventorySourceGroupsListCall) Header() http.Header { 38112 if c.header_ == nil { 38113 c.header_ = make(http.Header) 38114 } 38115 return c.header_ 38116 } 38117 38118 func (c *InventorySourceGroupsListCall) doRequest(alt string) (*http.Response, error) { 38119 reqHeaders := make(http.Header) 38120 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 38121 for k, v := range c.header_ { 38122 reqHeaders[k] = v 38123 } 38124 reqHeaders.Set("User-Agent", c.s.userAgent()) 38125 if c.ifNoneMatch_ != "" { 38126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 38127 } 38128 var body io.Reader = nil 38129 c.urlParams_.Set("alt", alt) 38130 c.urlParams_.Set("prettyPrint", "false") 38131 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups") 38132 urls += "?" + c.urlParams_.Encode() 38133 req, err := http.NewRequest("GET", urls, body) 38134 if err != nil { 38135 return nil, err 38136 } 38137 req.Header = reqHeaders 38138 return gensupport.SendRequest(c.ctx_, c.s.client, req) 38139 } 38140 38141 // Do executes the "displayvideo.inventorySourceGroups.list" call. 38142 // Exactly one of *ListInventorySourceGroupsResponse or error will be 38143 // non-nil. Any non-2xx status code is an error. Response headers are in 38144 // either *ListInventorySourceGroupsResponse.ServerResponse.Header or 38145 // (if a response was returned at all) in 38146 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 38147 // whether the returned error was because http.StatusNotModified was 38148 // returned. 38149 func (c *InventorySourceGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourceGroupsResponse, error) { 38150 gensupport.SetOptions(c.urlParams_, opts...) 38151 res, err := c.doRequest("json") 38152 if res != nil && res.StatusCode == http.StatusNotModified { 38153 if res.Body != nil { 38154 res.Body.Close() 38155 } 38156 return nil, gensupport.WrapError(&googleapi.Error{ 38157 Code: res.StatusCode, 38158 Header: res.Header, 38159 }) 38160 } 38161 if err != nil { 38162 return nil, err 38163 } 38164 defer googleapi.CloseBody(res) 38165 if err := googleapi.CheckResponse(res); err != nil { 38166 return nil, gensupport.WrapError(err) 38167 } 38168 ret := &ListInventorySourceGroupsResponse{ 38169 ServerResponse: googleapi.ServerResponse{ 38170 Header: res.Header, 38171 HTTPStatusCode: res.StatusCode, 38172 }, 38173 } 38174 target := &ret 38175 if err := gensupport.DecodeResponse(target, res); err != nil { 38176 return nil, err 38177 } 38178 return ret, nil 38179 // { 38180 // "description": "Lists inventory source groups that are accessible to the current user. The order is defined by the order_by parameter.", 38181 // "flatPath": "v1/inventorySourceGroups", 38182 // "httpMethod": "GET", 38183 // "id": "displayvideo.inventorySourceGroups.list", 38184 // "parameterOrder": [], 38185 // "parameters": { 38186 // "advertiserId": { 38187 // "description": "The ID of the advertiser that has access to the inventory source group. If an inventory source group is partner-owned, only advertisers to which the group is explicitly shared can access the group.", 38188 // "format": "int64", 38189 // "location": "query", 38190 // "type": "string" 38191 // }, 38192 // "filter": { 38193 // "description": "Allows filtering by inventory source group fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `inventorySourceGroupId` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 38194 // "location": "query", 38195 // "type": "string" 38196 // }, 38197 // "orderBy": { 38198 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `inventorySourceGroupId` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 38199 // "location": "query", 38200 // "type": "string" 38201 // }, 38202 // "pageSize": { 38203 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 38204 // "format": "int32", 38205 // "location": "query", 38206 // "type": "integer" 38207 // }, 38208 // "pageToken": { 38209 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInventorySources` method. If not specified, the first page of results will be returned.", 38210 // "location": "query", 38211 // "type": "string" 38212 // }, 38213 // "partnerId": { 38214 // "description": "The ID of the partner that has access to the inventory source group. A partner cannot access advertiser-owned inventory source groups.", 38215 // "format": "int64", 38216 // "location": "query", 38217 // "type": "string" 38218 // } 38219 // }, 38220 // "path": "v1/inventorySourceGroups", 38221 // "response": { 38222 // "$ref": "ListInventorySourceGroupsResponse" 38223 // }, 38224 // "scopes": [ 38225 // "https://www.googleapis.com/auth/display-video" 38226 // ] 38227 // } 38228 38229 } 38230 38231 // Pages invokes f for each page of results. 38232 // A non-nil error returned from f will halt the iteration. 38233 // The provided context supersedes any context provided to the Context method. 38234 func (c *InventorySourceGroupsListCall) Pages(ctx context.Context, f func(*ListInventorySourceGroupsResponse) error) error { 38235 c.ctx_ = ctx 38236 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 38237 for { 38238 x, err := c.Do() 38239 if err != nil { 38240 return err 38241 } 38242 if err := f(x); err != nil { 38243 return err 38244 } 38245 if x.NextPageToken == "" { 38246 return nil 38247 } 38248 c.PageToken(x.NextPageToken) 38249 } 38250 } 38251 38252 // method id "displayvideo.inventorySourceGroups.patch": 38253 38254 type InventorySourceGroupsPatchCall struct { 38255 s *Service 38256 inventorySourceGroupId int64 38257 inventorysourcegroup *InventorySourceGroup 38258 urlParams_ gensupport.URLParams 38259 ctx_ context.Context 38260 header_ http.Header 38261 } 38262 38263 // Patch: Updates an inventory source group. Returns the updated 38264 // inventory source group if successful. 38265 // 38266 // - inventorySourceGroupId: Output only. The unique ID of the inventory 38267 // source group. Assigned by the system. 38268 func (r *InventorySourceGroupsService) Patch(inventorySourceGroupId int64, inventorysourcegroup *InventorySourceGroup) *InventorySourceGroupsPatchCall { 38269 c := &InventorySourceGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 38270 c.inventorySourceGroupId = inventorySourceGroupId 38271 c.inventorysourcegroup = inventorysourcegroup 38272 return c 38273 } 38274 38275 // AdvertiserId sets the optional parameter "advertiserId": The ID of 38276 // the advertiser that owns the inventory source group. The parent 38277 // partner does not have access to this group. 38278 func (c *InventorySourceGroupsPatchCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsPatchCall { 38279 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 38280 return c 38281 } 38282 38283 // PartnerId sets the optional parameter "partnerId": The ID of the 38284 // partner that owns the inventory source group. Only this partner has 38285 // write access to this group. 38286 func (c *InventorySourceGroupsPatchCall) PartnerId(partnerId int64) *InventorySourceGroupsPatchCall { 38287 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 38288 return c 38289 } 38290 38291 // UpdateMask sets the optional parameter "updateMask": Required. The 38292 // mask to control which fields to update. 38293 func (c *InventorySourceGroupsPatchCall) UpdateMask(updateMask string) *InventorySourceGroupsPatchCall { 38294 c.urlParams_.Set("updateMask", updateMask) 38295 return c 38296 } 38297 38298 // Fields allows partial responses to be retrieved. See 38299 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 38300 // for more information. 38301 func (c *InventorySourceGroupsPatchCall) Fields(s ...googleapi.Field) *InventorySourceGroupsPatchCall { 38302 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 38303 return c 38304 } 38305 38306 // Context sets the context to be used in this call's Do method. Any 38307 // pending HTTP request will be aborted if the provided context is 38308 // canceled. 38309 func (c *InventorySourceGroupsPatchCall) Context(ctx context.Context) *InventorySourceGroupsPatchCall { 38310 c.ctx_ = ctx 38311 return c 38312 } 38313 38314 // Header returns an http.Header that can be modified by the caller to 38315 // add HTTP headers to the request. 38316 func (c *InventorySourceGroupsPatchCall) Header() http.Header { 38317 if c.header_ == nil { 38318 c.header_ = make(http.Header) 38319 } 38320 return c.header_ 38321 } 38322 38323 func (c *InventorySourceGroupsPatchCall) doRequest(alt string) (*http.Response, error) { 38324 reqHeaders := make(http.Header) 38325 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 38326 for k, v := range c.header_ { 38327 reqHeaders[k] = v 38328 } 38329 reqHeaders.Set("User-Agent", c.s.userAgent()) 38330 var body io.Reader = nil 38331 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysourcegroup) 38332 if err != nil { 38333 return nil, err 38334 } 38335 reqHeaders.Set("Content-Type", "application/json") 38336 c.urlParams_.Set("alt", alt) 38337 c.urlParams_.Set("prettyPrint", "false") 38338 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{inventorySourceGroupId}") 38339 urls += "?" + c.urlParams_.Encode() 38340 req, err := http.NewRequest("PATCH", urls, body) 38341 if err != nil { 38342 return nil, err 38343 } 38344 req.Header = reqHeaders 38345 googleapi.Expand(req.URL, map[string]string{ 38346 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 38347 }) 38348 return gensupport.SendRequest(c.ctx_, c.s.client, req) 38349 } 38350 38351 // Do executes the "displayvideo.inventorySourceGroups.patch" call. 38352 // Exactly one of *InventorySourceGroup or error will be non-nil. Any 38353 // non-2xx status code is an error. Response headers are in either 38354 // *InventorySourceGroup.ServerResponse.Header or (if a response was 38355 // returned at all) in error.(*googleapi.Error).Header. Use 38356 // googleapi.IsNotModified to check whether the returned error was 38357 // because http.StatusNotModified was returned. 38358 func (c *InventorySourceGroupsPatchCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) { 38359 gensupport.SetOptions(c.urlParams_, opts...) 38360 res, err := c.doRequest("json") 38361 if res != nil && res.StatusCode == http.StatusNotModified { 38362 if res.Body != nil { 38363 res.Body.Close() 38364 } 38365 return nil, gensupport.WrapError(&googleapi.Error{ 38366 Code: res.StatusCode, 38367 Header: res.Header, 38368 }) 38369 } 38370 if err != nil { 38371 return nil, err 38372 } 38373 defer googleapi.CloseBody(res) 38374 if err := googleapi.CheckResponse(res); err != nil { 38375 return nil, gensupport.WrapError(err) 38376 } 38377 ret := &InventorySourceGroup{ 38378 ServerResponse: googleapi.ServerResponse{ 38379 Header: res.Header, 38380 HTTPStatusCode: res.StatusCode, 38381 }, 38382 } 38383 target := &ret 38384 if err := gensupport.DecodeResponse(target, res); err != nil { 38385 return nil, err 38386 } 38387 return ret, nil 38388 // { 38389 // "description": "Updates an inventory source group. Returns the updated inventory source group if successful.", 38390 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupId}", 38391 // "httpMethod": "PATCH", 38392 // "id": "displayvideo.inventorySourceGroups.patch", 38393 // "parameterOrder": [ 38394 // "inventorySourceGroupId" 38395 // ], 38396 // "parameters": { 38397 // "advertiserId": { 38398 // "description": "The ID of the advertiser that owns the inventory source group. The parent partner does not have access to this group.", 38399 // "format": "int64", 38400 // "location": "query", 38401 // "type": "string" 38402 // }, 38403 // "inventorySourceGroupId": { 38404 // "description": "Output only. The unique ID of the inventory source group. Assigned by the system.", 38405 // "format": "int64", 38406 // "location": "path", 38407 // "required": true, 38408 // "type": "string" 38409 // }, 38410 // "partnerId": { 38411 // "description": "The ID of the partner that owns the inventory source group. Only this partner has write access to this group.", 38412 // "format": "int64", 38413 // "location": "query", 38414 // "type": "string" 38415 // }, 38416 // "updateMask": { 38417 // "description": "Required. The mask to control which fields to update.", 38418 // "format": "google-fieldmask", 38419 // "location": "query", 38420 // "type": "string" 38421 // } 38422 // }, 38423 // "path": "v1/inventorySourceGroups/{inventorySourceGroupId}", 38424 // "request": { 38425 // "$ref": "InventorySourceGroup" 38426 // }, 38427 // "response": { 38428 // "$ref": "InventorySourceGroup" 38429 // }, 38430 // "scopes": [ 38431 // "https://www.googleapis.com/auth/display-video" 38432 // ] 38433 // } 38434 38435 } 38436 38437 // method id "displayvideo.inventorySourceGroups.assignedInventorySources.bulkEdit": 38438 38439 type InventorySourceGroupsAssignedInventorySourcesBulkEditCall struct { 38440 s *Service 38441 inventorySourceGroupId int64 38442 bulkeditassignedinventorysourcesrequest *BulkEditAssignedInventorySourcesRequest 38443 urlParams_ gensupport.URLParams 38444 ctx_ context.Context 38445 header_ http.Header 38446 } 38447 38448 // BulkEdit: Bulk edits multiple assignments between inventory sources 38449 // and a single inventory source group. The operation will delete the 38450 // assigned inventory sources provided in 38451 // BulkEditAssignedInventorySourcesRequest.deleted_assigned_inventory_sou 38452 // rces and then create the assigned inventory sources provided in 38453 // BulkEditAssignedInventorySourcesRequest.created_assigned_inventory_sou 38454 // rces. 38455 // 38456 // - inventorySourceGroupId: The ID of the inventory source group to 38457 // which the assignments are assigned. 38458 func (r *InventorySourceGroupsAssignedInventorySourcesService) BulkEdit(inventorySourceGroupId int64, bulkeditassignedinventorysourcesrequest *BulkEditAssignedInventorySourcesRequest) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall { 38459 c := &InventorySourceGroupsAssignedInventorySourcesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 38460 c.inventorySourceGroupId = inventorySourceGroupId 38461 c.bulkeditassignedinventorysourcesrequest = bulkeditassignedinventorysourcesrequest 38462 return c 38463 } 38464 38465 // Fields allows partial responses to be retrieved. See 38466 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 38467 // for more information. 38468 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall { 38469 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 38470 return c 38471 } 38472 38473 // Context sets the context to be used in this call's Do method. Any 38474 // pending HTTP request will be aborted if the provided context is 38475 // canceled. 38476 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesBulkEditCall { 38477 c.ctx_ = ctx 38478 return c 38479 } 38480 38481 // Header returns an http.Header that can be modified by the caller to 38482 // add HTTP headers to the request. 38483 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Header() http.Header { 38484 if c.header_ == nil { 38485 c.header_ = make(http.Header) 38486 } 38487 return c.header_ 38488 } 38489 38490 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) doRequest(alt string) (*http.Response, error) { 38491 reqHeaders := make(http.Header) 38492 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 38493 for k, v := range c.header_ { 38494 reqHeaders[k] = v 38495 } 38496 reqHeaders.Set("User-Agent", c.s.userAgent()) 38497 var body io.Reader = nil 38498 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassignedinventorysourcesrequest) 38499 if err != nil { 38500 return nil, err 38501 } 38502 reqHeaders.Set("Content-Type", "application/json") 38503 c.urlParams_.Set("alt", alt) 38504 c.urlParams_.Set("prettyPrint", "false") 38505 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources:bulkEdit") 38506 urls += "?" + c.urlParams_.Encode() 38507 req, err := http.NewRequest("POST", urls, body) 38508 if err != nil { 38509 return nil, err 38510 } 38511 req.Header = reqHeaders 38512 googleapi.Expand(req.URL, map[string]string{ 38513 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 38514 }) 38515 return gensupport.SendRequest(c.ctx_, c.s.client, req) 38516 } 38517 38518 // Do executes the "displayvideo.inventorySourceGroups.assignedInventorySources.bulkEdit" call. 38519 // Exactly one of *BulkEditAssignedInventorySourcesResponse or error 38520 // will be non-nil. Any non-2xx status code is an error. Response 38521 // headers are in either 38522 // *BulkEditAssignedInventorySourcesResponse.ServerResponse.Header or 38523 // (if a response was returned at all) in 38524 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 38525 // whether the returned error was because http.StatusNotModified was 38526 // returned. 38527 func (c *InventorySourceGroupsAssignedInventorySourcesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedInventorySourcesResponse, error) { 38528 gensupport.SetOptions(c.urlParams_, opts...) 38529 res, err := c.doRequest("json") 38530 if res != nil && res.StatusCode == http.StatusNotModified { 38531 if res.Body != nil { 38532 res.Body.Close() 38533 } 38534 return nil, gensupport.WrapError(&googleapi.Error{ 38535 Code: res.StatusCode, 38536 Header: res.Header, 38537 }) 38538 } 38539 if err != nil { 38540 return nil, err 38541 } 38542 defer googleapi.CloseBody(res) 38543 if err := googleapi.CheckResponse(res); err != nil { 38544 return nil, gensupport.WrapError(err) 38545 } 38546 ret := &BulkEditAssignedInventorySourcesResponse{ 38547 ServerResponse: googleapi.ServerResponse{ 38548 Header: res.Header, 38549 HTTPStatusCode: res.StatusCode, 38550 }, 38551 } 38552 target := &ret 38553 if err := gensupport.DecodeResponse(target, res); err != nil { 38554 return nil, err 38555 } 38556 return ret, nil 38557 // { 38558 // "description": "Bulk edits multiple assignments between inventory sources and a single inventory source group. The operation will delete the assigned inventory sources provided in BulkEditAssignedInventorySourcesRequest.deleted_assigned_inventory_sources and then create the assigned inventory sources provided in BulkEditAssignedInventorySourcesRequest.created_assigned_inventory_sources.", 38559 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}/assignedInventorySources:bulkEdit", 38560 // "httpMethod": "POST", 38561 // "id": "displayvideo.inventorySourceGroups.assignedInventorySources.bulkEdit", 38562 // "parameterOrder": [ 38563 // "inventorySourceGroupId" 38564 // ], 38565 // "parameters": { 38566 // "inventorySourceGroupId": { 38567 // "description": "Required. The ID of the inventory source group to which the assignments are assigned.", 38568 // "format": "int64", 38569 // "location": "path", 38570 // "pattern": "^[^/]+$", 38571 // "required": true, 38572 // "type": "string" 38573 // } 38574 // }, 38575 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources:bulkEdit", 38576 // "request": { 38577 // "$ref": "BulkEditAssignedInventorySourcesRequest" 38578 // }, 38579 // "response": { 38580 // "$ref": "BulkEditAssignedInventorySourcesResponse" 38581 // }, 38582 // "scopes": [ 38583 // "https://www.googleapis.com/auth/display-video" 38584 // ] 38585 // } 38586 38587 } 38588 38589 // method id "displayvideo.inventorySourceGroups.assignedInventorySources.create": 38590 38591 type InventorySourceGroupsAssignedInventorySourcesCreateCall struct { 38592 s *Service 38593 inventorySourceGroupId int64 38594 assignedinventorysource *AssignedInventorySource 38595 urlParams_ gensupport.URLParams 38596 ctx_ context.Context 38597 header_ http.Header 38598 } 38599 38600 // Create: Creates an assignment between an inventory source and an 38601 // inventory source group. 38602 // 38603 // - inventorySourceGroupId: The ID of the inventory source group to 38604 // which the assignment will be assigned. 38605 func (r *InventorySourceGroupsAssignedInventorySourcesService) Create(inventorySourceGroupId int64, assignedinventorysource *AssignedInventorySource) *InventorySourceGroupsAssignedInventorySourcesCreateCall { 38606 c := &InventorySourceGroupsAssignedInventorySourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 38607 c.inventorySourceGroupId = inventorySourceGroupId 38608 c.assignedinventorysource = assignedinventorysource 38609 return c 38610 } 38611 38612 // AdvertiserId sets the optional parameter "advertiserId": The ID of 38613 // the advertiser that owns the parent inventory source group. The 38614 // parent partner will not have access to this assigned inventory 38615 // source. 38616 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesCreateCall { 38617 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 38618 return c 38619 } 38620 38621 // PartnerId sets the optional parameter "partnerId": The ID of the 38622 // partner that owns the parent inventory source group. Only this 38623 // partner will have write access to this assigned inventory source. 38624 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesCreateCall { 38625 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 38626 return c 38627 } 38628 38629 // Fields allows partial responses to be retrieved. See 38630 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 38631 // for more information. 38632 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesCreateCall { 38633 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 38634 return c 38635 } 38636 38637 // Context sets the context to be used in this call's Do method. Any 38638 // pending HTTP request will be aborted if the provided context is 38639 // canceled. 38640 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesCreateCall { 38641 c.ctx_ = ctx 38642 return c 38643 } 38644 38645 // Header returns an http.Header that can be modified by the caller to 38646 // add HTTP headers to the request. 38647 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Header() http.Header { 38648 if c.header_ == nil { 38649 c.header_ = make(http.Header) 38650 } 38651 return c.header_ 38652 } 38653 38654 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) doRequest(alt string) (*http.Response, error) { 38655 reqHeaders := make(http.Header) 38656 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 38657 for k, v := range c.header_ { 38658 reqHeaders[k] = v 38659 } 38660 reqHeaders.Set("User-Agent", c.s.userAgent()) 38661 var body io.Reader = nil 38662 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedinventorysource) 38663 if err != nil { 38664 return nil, err 38665 } 38666 reqHeaders.Set("Content-Type", "application/json") 38667 c.urlParams_.Set("alt", alt) 38668 c.urlParams_.Set("prettyPrint", "false") 38669 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources") 38670 urls += "?" + c.urlParams_.Encode() 38671 req, err := http.NewRequest("POST", urls, body) 38672 if err != nil { 38673 return nil, err 38674 } 38675 req.Header = reqHeaders 38676 googleapi.Expand(req.URL, map[string]string{ 38677 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 38678 }) 38679 return gensupport.SendRequest(c.ctx_, c.s.client, req) 38680 } 38681 38682 // Do executes the "displayvideo.inventorySourceGroups.assignedInventorySources.create" call. 38683 // Exactly one of *AssignedInventorySource or error will be non-nil. Any 38684 // non-2xx status code is an error. Response headers are in either 38685 // *AssignedInventorySource.ServerResponse.Header or (if a response was 38686 // returned at all) in error.(*googleapi.Error).Header. Use 38687 // googleapi.IsNotModified to check whether the returned error was 38688 // because http.StatusNotModified was returned. 38689 func (c *InventorySourceGroupsAssignedInventorySourcesCreateCall) Do(opts ...googleapi.CallOption) (*AssignedInventorySource, error) { 38690 gensupport.SetOptions(c.urlParams_, opts...) 38691 res, err := c.doRequest("json") 38692 if res != nil && res.StatusCode == http.StatusNotModified { 38693 if res.Body != nil { 38694 res.Body.Close() 38695 } 38696 return nil, gensupport.WrapError(&googleapi.Error{ 38697 Code: res.StatusCode, 38698 Header: res.Header, 38699 }) 38700 } 38701 if err != nil { 38702 return nil, err 38703 } 38704 defer googleapi.CloseBody(res) 38705 if err := googleapi.CheckResponse(res); err != nil { 38706 return nil, gensupport.WrapError(err) 38707 } 38708 ret := &AssignedInventorySource{ 38709 ServerResponse: googleapi.ServerResponse{ 38710 Header: res.Header, 38711 HTTPStatusCode: res.StatusCode, 38712 }, 38713 } 38714 target := &ret 38715 if err := gensupport.DecodeResponse(target, res); err != nil { 38716 return nil, err 38717 } 38718 return ret, nil 38719 // { 38720 // "description": "Creates an assignment between an inventory source and an inventory source group.", 38721 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}/assignedInventorySources", 38722 // "httpMethod": "POST", 38723 // "id": "displayvideo.inventorySourceGroups.assignedInventorySources.create", 38724 // "parameterOrder": [ 38725 // "inventorySourceGroupId" 38726 // ], 38727 // "parameters": { 38728 // "advertiserId": { 38729 // "description": "The ID of the advertiser that owns the parent inventory source group. The parent partner will not have access to this assigned inventory source.", 38730 // "format": "int64", 38731 // "location": "query", 38732 // "type": "string" 38733 // }, 38734 // "inventorySourceGroupId": { 38735 // "description": "Required. The ID of the inventory source group to which the assignment will be assigned.", 38736 // "format": "int64", 38737 // "location": "path", 38738 // "pattern": "^[^/]+$", 38739 // "required": true, 38740 // "type": "string" 38741 // }, 38742 // "partnerId": { 38743 // "description": "The ID of the partner that owns the parent inventory source group. Only this partner will have write access to this assigned inventory source.", 38744 // "format": "int64", 38745 // "location": "query", 38746 // "type": "string" 38747 // } 38748 // }, 38749 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources", 38750 // "request": { 38751 // "$ref": "AssignedInventorySource" 38752 // }, 38753 // "response": { 38754 // "$ref": "AssignedInventorySource" 38755 // }, 38756 // "scopes": [ 38757 // "https://www.googleapis.com/auth/display-video" 38758 // ] 38759 // } 38760 38761 } 38762 38763 // method id "displayvideo.inventorySourceGroups.assignedInventorySources.delete": 38764 38765 type InventorySourceGroupsAssignedInventorySourcesDeleteCall struct { 38766 s *Service 38767 inventorySourceGroupId int64 38768 assignedInventorySourceId int64 38769 urlParams_ gensupport.URLParams 38770 ctx_ context.Context 38771 header_ http.Header 38772 } 38773 38774 // Delete: Deletes the assignment between an inventory source and an 38775 // inventory source group. 38776 // 38777 // - assignedInventorySourceId: The ID of the assigned inventory source 38778 // to delete. 38779 // - inventorySourceGroupId: The ID of the inventory source group to 38780 // which this assignment is assigned. 38781 func (r *InventorySourceGroupsAssignedInventorySourcesService) Delete(inventorySourceGroupId int64, assignedInventorySourceId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall { 38782 c := &InventorySourceGroupsAssignedInventorySourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 38783 c.inventorySourceGroupId = inventorySourceGroupId 38784 c.assignedInventorySourceId = assignedInventorySourceId 38785 return c 38786 } 38787 38788 // AdvertiserId sets the optional parameter "advertiserId": The ID of 38789 // the advertiser that owns the parent inventory source group. The 38790 // parent partner does not have access to this assigned inventory 38791 // source. 38792 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall { 38793 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 38794 return c 38795 } 38796 38797 // PartnerId sets the optional parameter "partnerId": The ID of the 38798 // partner that owns the parent inventory source group. Only this 38799 // partner has write access to this assigned inventory source. 38800 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesDeleteCall { 38801 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 38802 return c 38803 } 38804 38805 // Fields allows partial responses to be retrieved. See 38806 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 38807 // for more information. 38808 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesDeleteCall { 38809 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 38810 return c 38811 } 38812 38813 // Context sets the context to be used in this call's Do method. Any 38814 // pending HTTP request will be aborted if the provided context is 38815 // canceled. 38816 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesDeleteCall { 38817 c.ctx_ = ctx 38818 return c 38819 } 38820 38821 // Header returns an http.Header that can be modified by the caller to 38822 // add HTTP headers to the request. 38823 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Header() http.Header { 38824 if c.header_ == nil { 38825 c.header_ = make(http.Header) 38826 } 38827 return c.header_ 38828 } 38829 38830 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) doRequest(alt string) (*http.Response, error) { 38831 reqHeaders := make(http.Header) 38832 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 38833 for k, v := range c.header_ { 38834 reqHeaders[k] = v 38835 } 38836 reqHeaders.Set("User-Agent", c.s.userAgent()) 38837 var body io.Reader = nil 38838 c.urlParams_.Set("alt", alt) 38839 c.urlParams_.Set("prettyPrint", "false") 38840 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources/{+assignedInventorySourceId}") 38841 urls += "?" + c.urlParams_.Encode() 38842 req, err := http.NewRequest("DELETE", urls, body) 38843 if err != nil { 38844 return nil, err 38845 } 38846 req.Header = reqHeaders 38847 googleapi.Expand(req.URL, map[string]string{ 38848 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 38849 "assignedInventorySourceId": strconv.FormatInt(c.assignedInventorySourceId, 10), 38850 }) 38851 return gensupport.SendRequest(c.ctx_, c.s.client, req) 38852 } 38853 38854 // Do executes the "displayvideo.inventorySourceGroups.assignedInventorySources.delete" call. 38855 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 38856 // code is an error. Response headers are in either 38857 // *Empty.ServerResponse.Header or (if a response was returned at all) 38858 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 38859 // check whether the returned error was because http.StatusNotModified 38860 // was returned. 38861 func (c *InventorySourceGroupsAssignedInventorySourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 38862 gensupport.SetOptions(c.urlParams_, opts...) 38863 res, err := c.doRequest("json") 38864 if res != nil && res.StatusCode == http.StatusNotModified { 38865 if res.Body != nil { 38866 res.Body.Close() 38867 } 38868 return nil, gensupport.WrapError(&googleapi.Error{ 38869 Code: res.StatusCode, 38870 Header: res.Header, 38871 }) 38872 } 38873 if err != nil { 38874 return nil, err 38875 } 38876 defer googleapi.CloseBody(res) 38877 if err := googleapi.CheckResponse(res); err != nil { 38878 return nil, gensupport.WrapError(err) 38879 } 38880 ret := &Empty{ 38881 ServerResponse: googleapi.ServerResponse{ 38882 Header: res.Header, 38883 HTTPStatusCode: res.StatusCode, 38884 }, 38885 } 38886 target := &ret 38887 if err := gensupport.DecodeResponse(target, res); err != nil { 38888 return nil, err 38889 } 38890 return ret, nil 38891 // { 38892 // "description": "Deletes the assignment between an inventory source and an inventory source group.", 38893 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}/assignedInventorySources/{assignedInventorySourcesId}", 38894 // "httpMethod": "DELETE", 38895 // "id": "displayvideo.inventorySourceGroups.assignedInventorySources.delete", 38896 // "parameterOrder": [ 38897 // "inventorySourceGroupId", 38898 // "assignedInventorySourceId" 38899 // ], 38900 // "parameters": { 38901 // "advertiserId": { 38902 // "description": "The ID of the advertiser that owns the parent inventory source group. The parent partner does not have access to this assigned inventory source.", 38903 // "format": "int64", 38904 // "location": "query", 38905 // "type": "string" 38906 // }, 38907 // "assignedInventorySourceId": { 38908 // "description": "Required. The ID of the assigned inventory source to delete.", 38909 // "format": "int64", 38910 // "location": "path", 38911 // "pattern": "^[^/]+$", 38912 // "required": true, 38913 // "type": "string" 38914 // }, 38915 // "inventorySourceGroupId": { 38916 // "description": "Required. The ID of the inventory source group to which this assignment is assigned.", 38917 // "format": "int64", 38918 // "location": "path", 38919 // "pattern": "^[^/]+$", 38920 // "required": true, 38921 // "type": "string" 38922 // }, 38923 // "partnerId": { 38924 // "description": "The ID of the partner that owns the parent inventory source group. Only this partner has write access to this assigned inventory source.", 38925 // "format": "int64", 38926 // "location": "query", 38927 // "type": "string" 38928 // } 38929 // }, 38930 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources/{+assignedInventorySourceId}", 38931 // "response": { 38932 // "$ref": "Empty" 38933 // }, 38934 // "scopes": [ 38935 // "https://www.googleapis.com/auth/display-video" 38936 // ] 38937 // } 38938 38939 } 38940 38941 // method id "displayvideo.inventorySourceGroups.assignedInventorySources.list": 38942 38943 type InventorySourceGroupsAssignedInventorySourcesListCall struct { 38944 s *Service 38945 inventorySourceGroupId int64 38946 urlParams_ gensupport.URLParams 38947 ifNoneMatch_ string 38948 ctx_ context.Context 38949 header_ http.Header 38950 } 38951 38952 // List: Lists inventory sources assigned to an inventory source group. 38953 // 38954 // - inventorySourceGroupId: The ID of the inventory source group to 38955 // which these assignments are assigned. 38956 func (r *InventorySourceGroupsAssignedInventorySourcesService) List(inventorySourceGroupId int64) *InventorySourceGroupsAssignedInventorySourcesListCall { 38957 c := &InventorySourceGroupsAssignedInventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 38958 c.inventorySourceGroupId = inventorySourceGroupId 38959 return c 38960 } 38961 38962 // AdvertiserId sets the optional parameter "advertiserId": The ID of 38963 // the advertiser that has access to the assignment. If the parent 38964 // inventory source group is partner-owned, only advertisers to which 38965 // the parent group is explicitly shared can access the assigned 38966 // inventory source. 38967 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsAssignedInventorySourcesListCall { 38968 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 38969 return c 38970 } 38971 38972 // Filter sets the optional parameter "filter": Allows filtering by 38973 // assigned inventory source fields. Supported syntax: * Filter 38974 // expressions are made up of one or more restrictions. * Restrictions 38975 // can be combined by the `OR` logical operator. * A restriction has the 38976 // form of `{field} {operator} {value}`. * All fields must use the 38977 // `EQUALS (=)` operator. Supported fields: * 38978 // `assignedInventorySourceId` The length of this field should be no 38979 // more than 500 characters. Reference our filter `LIST` requests 38980 // (/display-video/api/guides/how-tos/filters) guide for more 38981 // information. 38982 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Filter(filter string) *InventorySourceGroupsAssignedInventorySourcesListCall { 38983 c.urlParams_.Set("filter", filter) 38984 return c 38985 } 38986 38987 // OrderBy sets the optional parameter "orderBy": Field by which to sort 38988 // the list. Acceptable values are: * `assignedInventorySourceId` 38989 // (default) The default sorting order is ascending. To specify 38990 // descending order for a field, a suffix " desc" should be added to the 38991 // field name. Example: `assignedInventorySourceId desc`. 38992 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) OrderBy(orderBy string) *InventorySourceGroupsAssignedInventorySourcesListCall { 38993 c.urlParams_.Set("orderBy", orderBy) 38994 return c 38995 } 38996 38997 // PageSize sets the optional parameter "pageSize": Requested page size. 38998 // Must be between `1` and `100`. If unspecified will default to `100`. 38999 // Returns error code `INVALID_ARGUMENT` if an invalid value is 39000 // specified. 39001 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PageSize(pageSize int64) *InventorySourceGroupsAssignedInventorySourcesListCall { 39002 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 39003 return c 39004 } 39005 39006 // PageToken sets the optional parameter "pageToken": A token 39007 // identifying a page of results the server should return. Typically, 39008 // this is the value of next_page_token returned from the previous call 39009 // to `ListAssignedInventorySources` method. If not specified, the first 39010 // page of results will be returned. 39011 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PageToken(pageToken string) *InventorySourceGroupsAssignedInventorySourcesListCall { 39012 c.urlParams_.Set("pageToken", pageToken) 39013 return c 39014 } 39015 39016 // PartnerId sets the optional parameter "partnerId": The ID of the 39017 // partner that has access to the assignment. If the parent inventory 39018 // source group is advertiser-owned, the assignment cannot be accessed 39019 // via a partner. 39020 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) PartnerId(partnerId int64) *InventorySourceGroupsAssignedInventorySourcesListCall { 39021 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 39022 return c 39023 } 39024 39025 // Fields allows partial responses to be retrieved. See 39026 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 39027 // for more information. 39028 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsAssignedInventorySourcesListCall { 39029 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 39030 return c 39031 } 39032 39033 // IfNoneMatch sets the optional parameter which makes the operation 39034 // fail if the object's ETag matches the given value. This is useful for 39035 // getting updates only after the object has changed since the last 39036 // request. Use googleapi.IsNotModified to check whether the response 39037 // error from Do is the result of In-None-Match. 39038 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsAssignedInventorySourcesListCall { 39039 c.ifNoneMatch_ = entityTag 39040 return c 39041 } 39042 39043 // Context sets the context to be used in this call's Do method. Any 39044 // pending HTTP request will be aborted if the provided context is 39045 // canceled. 39046 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Context(ctx context.Context) *InventorySourceGroupsAssignedInventorySourcesListCall { 39047 c.ctx_ = ctx 39048 return c 39049 } 39050 39051 // Header returns an http.Header that can be modified by the caller to 39052 // add HTTP headers to the request. 39053 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Header() http.Header { 39054 if c.header_ == nil { 39055 c.header_ = make(http.Header) 39056 } 39057 return c.header_ 39058 } 39059 39060 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) doRequest(alt string) (*http.Response, error) { 39061 reqHeaders := make(http.Header) 39062 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 39063 for k, v := range c.header_ { 39064 reqHeaders[k] = v 39065 } 39066 reqHeaders.Set("User-Agent", c.s.userAgent()) 39067 if c.ifNoneMatch_ != "" { 39068 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 39069 } 39070 var body io.Reader = nil 39071 c.urlParams_.Set("alt", alt) 39072 c.urlParams_.Set("prettyPrint", "false") 39073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources") 39074 urls += "?" + c.urlParams_.Encode() 39075 req, err := http.NewRequest("GET", urls, body) 39076 if err != nil { 39077 return nil, err 39078 } 39079 req.Header = reqHeaders 39080 googleapi.Expand(req.URL, map[string]string{ 39081 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 39082 }) 39083 return gensupport.SendRequest(c.ctx_, c.s.client, req) 39084 } 39085 39086 // Do executes the "displayvideo.inventorySourceGroups.assignedInventorySources.list" call. 39087 // Exactly one of *ListAssignedInventorySourcesResponse or error will be 39088 // non-nil. Any non-2xx status code is an error. Response headers are in 39089 // either *ListAssignedInventorySourcesResponse.ServerResponse.Header or 39090 // (if a response was returned at all) in 39091 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 39092 // whether the returned error was because http.StatusNotModified was 39093 // returned. 39094 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListAssignedInventorySourcesResponse, error) { 39095 gensupport.SetOptions(c.urlParams_, opts...) 39096 res, err := c.doRequest("json") 39097 if res != nil && res.StatusCode == http.StatusNotModified { 39098 if res.Body != nil { 39099 res.Body.Close() 39100 } 39101 return nil, gensupport.WrapError(&googleapi.Error{ 39102 Code: res.StatusCode, 39103 Header: res.Header, 39104 }) 39105 } 39106 if err != nil { 39107 return nil, err 39108 } 39109 defer googleapi.CloseBody(res) 39110 if err := googleapi.CheckResponse(res); err != nil { 39111 return nil, gensupport.WrapError(err) 39112 } 39113 ret := &ListAssignedInventorySourcesResponse{ 39114 ServerResponse: googleapi.ServerResponse{ 39115 Header: res.Header, 39116 HTTPStatusCode: res.StatusCode, 39117 }, 39118 } 39119 target := &ret 39120 if err := gensupport.DecodeResponse(target, res); err != nil { 39121 return nil, err 39122 } 39123 return ret, nil 39124 // { 39125 // "description": "Lists inventory sources assigned to an inventory source group.", 39126 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}/assignedInventorySources", 39127 // "httpMethod": "GET", 39128 // "id": "displayvideo.inventorySourceGroups.assignedInventorySources.list", 39129 // "parameterOrder": [ 39130 // "inventorySourceGroupId" 39131 // ], 39132 // "parameters": { 39133 // "advertiserId": { 39134 // "description": "The ID of the advertiser that has access to the assignment. If the parent inventory source group is partner-owned, only advertisers to which the parent group is explicitly shared can access the assigned inventory source.", 39135 // "format": "int64", 39136 // "location": "query", 39137 // "type": "string" 39138 // }, 39139 // "filter": { 39140 // "description": "Allows filtering by assigned inventory source fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the `OR` logical operator. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedInventorySourceId` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 39141 // "location": "query", 39142 // "type": "string" 39143 // }, 39144 // "inventorySourceGroupId": { 39145 // "description": "Required. The ID of the inventory source group to which these assignments are assigned.", 39146 // "format": "int64", 39147 // "location": "path", 39148 // "pattern": "^[^/]+$", 39149 // "required": true, 39150 // "type": "string" 39151 // }, 39152 // "orderBy": { 39153 // "description": "Field by which to sort the list. Acceptable values are: * `assignedInventorySourceId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `assignedInventorySourceId desc`.", 39154 // "location": "query", 39155 // "type": "string" 39156 // }, 39157 // "pageSize": { 39158 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 39159 // "format": "int32", 39160 // "location": "query", 39161 // "type": "integer" 39162 // }, 39163 // "pageToken": { 39164 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListAssignedInventorySources` method. If not specified, the first page of results will be returned.", 39165 // "location": "query", 39166 // "type": "string" 39167 // }, 39168 // "partnerId": { 39169 // "description": "The ID of the partner that has access to the assignment. If the parent inventory source group is advertiser-owned, the assignment cannot be accessed via a partner.", 39170 // "format": "int64", 39171 // "location": "query", 39172 // "type": "string" 39173 // } 39174 // }, 39175 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}/assignedInventorySources", 39176 // "response": { 39177 // "$ref": "ListAssignedInventorySourcesResponse" 39178 // }, 39179 // "scopes": [ 39180 // "https://www.googleapis.com/auth/display-video" 39181 // ] 39182 // } 39183 39184 } 39185 39186 // Pages invokes f for each page of results. 39187 // A non-nil error returned from f will halt the iteration. 39188 // The provided context supersedes any context provided to the Context method. 39189 func (c *InventorySourceGroupsAssignedInventorySourcesListCall) Pages(ctx context.Context, f func(*ListAssignedInventorySourcesResponse) error) error { 39190 c.ctx_ = ctx 39191 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 39192 for { 39193 x, err := c.Do() 39194 if err != nil { 39195 return err 39196 } 39197 if err := f(x); err != nil { 39198 return err 39199 } 39200 if x.NextPageToken == "" { 39201 return nil 39202 } 39203 c.PageToken(x.NextPageToken) 39204 } 39205 } 39206 39207 // method id "displayvideo.inventorySources.create": 39208 39209 type InventorySourcesCreateCall struct { 39210 s *Service 39211 inventorysource *InventorySource 39212 urlParams_ gensupport.URLParams 39213 ctx_ context.Context 39214 header_ http.Header 39215 } 39216 39217 // Create: Creates a new inventory source. Returns the newly created 39218 // inventory source if successful. 39219 func (r *InventorySourcesService) Create(inventorysource *InventorySource) *InventorySourcesCreateCall { 39220 c := &InventorySourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 39221 c.inventorysource = inventorysource 39222 return c 39223 } 39224 39225 // AdvertiserId sets the optional parameter "advertiserId": The ID of 39226 // the advertiser that the request is being made within. 39227 func (c *InventorySourcesCreateCall) AdvertiserId(advertiserId int64) *InventorySourcesCreateCall { 39228 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 39229 return c 39230 } 39231 39232 // PartnerId sets the optional parameter "partnerId": The ID of the 39233 // partner that the request is being made within. 39234 func (c *InventorySourcesCreateCall) PartnerId(partnerId int64) *InventorySourcesCreateCall { 39235 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 39236 return c 39237 } 39238 39239 // Fields allows partial responses to be retrieved. See 39240 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 39241 // for more information. 39242 func (c *InventorySourcesCreateCall) Fields(s ...googleapi.Field) *InventorySourcesCreateCall { 39243 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 39244 return c 39245 } 39246 39247 // Context sets the context to be used in this call's Do method. Any 39248 // pending HTTP request will be aborted if the provided context is 39249 // canceled. 39250 func (c *InventorySourcesCreateCall) Context(ctx context.Context) *InventorySourcesCreateCall { 39251 c.ctx_ = ctx 39252 return c 39253 } 39254 39255 // Header returns an http.Header that can be modified by the caller to 39256 // add HTTP headers to the request. 39257 func (c *InventorySourcesCreateCall) Header() http.Header { 39258 if c.header_ == nil { 39259 c.header_ = make(http.Header) 39260 } 39261 return c.header_ 39262 } 39263 39264 func (c *InventorySourcesCreateCall) doRequest(alt string) (*http.Response, error) { 39265 reqHeaders := make(http.Header) 39266 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 39267 for k, v := range c.header_ { 39268 reqHeaders[k] = v 39269 } 39270 reqHeaders.Set("User-Agent", c.s.userAgent()) 39271 var body io.Reader = nil 39272 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysource) 39273 if err != nil { 39274 return nil, err 39275 } 39276 reqHeaders.Set("Content-Type", "application/json") 39277 c.urlParams_.Set("alt", alt) 39278 c.urlParams_.Set("prettyPrint", "false") 39279 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources") 39280 urls += "?" + c.urlParams_.Encode() 39281 req, err := http.NewRequest("POST", urls, body) 39282 if err != nil { 39283 return nil, err 39284 } 39285 req.Header = reqHeaders 39286 return gensupport.SendRequest(c.ctx_, c.s.client, req) 39287 } 39288 39289 // Do executes the "displayvideo.inventorySources.create" call. 39290 // Exactly one of *InventorySource or error will be non-nil. Any non-2xx 39291 // status code is an error. Response headers are in either 39292 // *InventorySource.ServerResponse.Header or (if a response was returned 39293 // at all) in error.(*googleapi.Error).Header. Use 39294 // googleapi.IsNotModified to check whether the returned error was 39295 // because http.StatusNotModified was returned. 39296 func (c *InventorySourcesCreateCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) { 39297 gensupport.SetOptions(c.urlParams_, opts...) 39298 res, err := c.doRequest("json") 39299 if res != nil && res.StatusCode == http.StatusNotModified { 39300 if res.Body != nil { 39301 res.Body.Close() 39302 } 39303 return nil, gensupport.WrapError(&googleapi.Error{ 39304 Code: res.StatusCode, 39305 Header: res.Header, 39306 }) 39307 } 39308 if err != nil { 39309 return nil, err 39310 } 39311 defer googleapi.CloseBody(res) 39312 if err := googleapi.CheckResponse(res); err != nil { 39313 return nil, gensupport.WrapError(err) 39314 } 39315 ret := &InventorySource{ 39316 ServerResponse: googleapi.ServerResponse{ 39317 Header: res.Header, 39318 HTTPStatusCode: res.StatusCode, 39319 }, 39320 } 39321 target := &ret 39322 if err := gensupport.DecodeResponse(target, res); err != nil { 39323 return nil, err 39324 } 39325 return ret, nil 39326 // { 39327 // "description": "Creates a new inventory source. Returns the newly created inventory source if successful.", 39328 // "flatPath": "v1/inventorySources", 39329 // "httpMethod": "POST", 39330 // "id": "displayvideo.inventorySources.create", 39331 // "parameterOrder": [], 39332 // "parameters": { 39333 // "advertiserId": { 39334 // "description": "The ID of the advertiser that the request is being made within.", 39335 // "format": "int64", 39336 // "location": "query", 39337 // "type": "string" 39338 // }, 39339 // "partnerId": { 39340 // "description": "The ID of the partner that the request is being made within.", 39341 // "format": "int64", 39342 // "location": "query", 39343 // "type": "string" 39344 // } 39345 // }, 39346 // "path": "v1/inventorySources", 39347 // "request": { 39348 // "$ref": "InventorySource" 39349 // }, 39350 // "response": { 39351 // "$ref": "InventorySource" 39352 // }, 39353 // "scopes": [ 39354 // "https://www.googleapis.com/auth/display-video" 39355 // ] 39356 // } 39357 39358 } 39359 39360 // method id "displayvideo.inventorySources.editInventorySourceReadWriteAccessors": 39361 39362 type InventorySourcesEditInventorySourceReadWriteAccessorsCall struct { 39363 s *Service 39364 inventorySourceId int64 39365 editinventorysourcereadwriteaccessorsrequest *EditInventorySourceReadWriteAccessorsRequest 39366 urlParams_ gensupport.URLParams 39367 ctx_ context.Context 39368 header_ http.Header 39369 } 39370 39371 // EditInventorySourceReadWriteAccessors: Edits read/write accessors of 39372 // an inventory source. Returns the updated read_write_accessors for the 39373 // inventory source. 39374 // 39375 // - inventorySourceId: The ID of inventory source to update. 39376 func (r *InventorySourcesService) EditInventorySourceReadWriteAccessors(inventorySourceId int64, editinventorysourcereadwriteaccessorsrequest *EditInventorySourceReadWriteAccessorsRequest) *InventorySourcesEditInventorySourceReadWriteAccessorsCall { 39377 c := &InventorySourcesEditInventorySourceReadWriteAccessorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 39378 c.inventorySourceId = inventorySourceId 39379 c.editinventorysourcereadwriteaccessorsrequest = editinventorysourcereadwriteaccessorsrequest 39380 return c 39381 } 39382 39383 // Fields allows partial responses to be retrieved. See 39384 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 39385 // for more information. 39386 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Fields(s ...googleapi.Field) *InventorySourcesEditInventorySourceReadWriteAccessorsCall { 39387 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 39388 return c 39389 } 39390 39391 // Context sets the context to be used in this call's Do method. Any 39392 // pending HTTP request will be aborted if the provided context is 39393 // canceled. 39394 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Context(ctx context.Context) *InventorySourcesEditInventorySourceReadWriteAccessorsCall { 39395 c.ctx_ = ctx 39396 return c 39397 } 39398 39399 // Header returns an http.Header that can be modified by the caller to 39400 // add HTTP headers to the request. 39401 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Header() http.Header { 39402 if c.header_ == nil { 39403 c.header_ = make(http.Header) 39404 } 39405 return c.header_ 39406 } 39407 39408 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) doRequest(alt string) (*http.Response, error) { 39409 reqHeaders := make(http.Header) 39410 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 39411 for k, v := range c.header_ { 39412 reqHeaders[k] = v 39413 } 39414 reqHeaders.Set("User-Agent", c.s.userAgent()) 39415 var body io.Reader = nil 39416 body, err := googleapi.WithoutDataWrapper.JSONReader(c.editinventorysourcereadwriteaccessorsrequest) 39417 if err != nil { 39418 return nil, err 39419 } 39420 reqHeaders.Set("Content-Type", "application/json") 39421 c.urlParams_.Set("alt", alt) 39422 c.urlParams_.Set("prettyPrint", "false") 39423 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources/{+inventorySourceId}:editInventorySourceReadWriteAccessors") 39424 urls += "?" + c.urlParams_.Encode() 39425 req, err := http.NewRequest("POST", urls, body) 39426 if err != nil { 39427 return nil, err 39428 } 39429 req.Header = reqHeaders 39430 googleapi.Expand(req.URL, map[string]string{ 39431 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10), 39432 }) 39433 return gensupport.SendRequest(c.ctx_, c.s.client, req) 39434 } 39435 39436 // Do executes the "displayvideo.inventorySources.editInventorySourceReadWriteAccessors" call. 39437 // Exactly one of *InventorySourceAccessors or error will be non-nil. 39438 // Any non-2xx status code is an error. Response headers are in either 39439 // *InventorySourceAccessors.ServerResponse.Header or (if a response was 39440 // returned at all) in error.(*googleapi.Error).Header. Use 39441 // googleapi.IsNotModified to check whether the returned error was 39442 // because http.StatusNotModified was returned. 39443 func (c *InventorySourcesEditInventorySourceReadWriteAccessorsCall) Do(opts ...googleapi.CallOption) (*InventorySourceAccessors, error) { 39444 gensupport.SetOptions(c.urlParams_, opts...) 39445 res, err := c.doRequest("json") 39446 if res != nil && res.StatusCode == http.StatusNotModified { 39447 if res.Body != nil { 39448 res.Body.Close() 39449 } 39450 return nil, gensupport.WrapError(&googleapi.Error{ 39451 Code: res.StatusCode, 39452 Header: res.Header, 39453 }) 39454 } 39455 if err != nil { 39456 return nil, err 39457 } 39458 defer googleapi.CloseBody(res) 39459 if err := googleapi.CheckResponse(res); err != nil { 39460 return nil, gensupport.WrapError(err) 39461 } 39462 ret := &InventorySourceAccessors{ 39463 ServerResponse: googleapi.ServerResponse{ 39464 Header: res.Header, 39465 HTTPStatusCode: res.StatusCode, 39466 }, 39467 } 39468 target := &ret 39469 if err := gensupport.DecodeResponse(target, res); err != nil { 39470 return nil, err 39471 } 39472 return ret, nil 39473 // { 39474 // "description": "Edits read/write accessors of an inventory source. Returns the updated read_write_accessors for the inventory source.", 39475 // "flatPath": "v1/inventorySources/{inventorySourcesId}:editInventorySourceReadWriteAccessors", 39476 // "httpMethod": "POST", 39477 // "id": "displayvideo.inventorySources.editInventorySourceReadWriteAccessors", 39478 // "parameterOrder": [ 39479 // "inventorySourceId" 39480 // ], 39481 // "parameters": { 39482 // "inventorySourceId": { 39483 // "description": "Required. The ID of inventory source to update.", 39484 // "format": "int64", 39485 // "location": "path", 39486 // "pattern": "^[^/]+$", 39487 // "required": true, 39488 // "type": "string" 39489 // } 39490 // }, 39491 // "path": "v1/inventorySources/{+inventorySourceId}:editInventorySourceReadWriteAccessors", 39492 // "request": { 39493 // "$ref": "EditInventorySourceReadWriteAccessorsRequest" 39494 // }, 39495 // "response": { 39496 // "$ref": "InventorySourceAccessors" 39497 // }, 39498 // "scopes": [ 39499 // "https://www.googleapis.com/auth/display-video" 39500 // ] 39501 // } 39502 39503 } 39504 39505 // method id "displayvideo.inventorySources.get": 39506 39507 type InventorySourcesGetCall struct { 39508 s *Service 39509 inventorySourceId int64 39510 urlParams_ gensupport.URLParams 39511 ifNoneMatch_ string 39512 ctx_ context.Context 39513 header_ http.Header 39514 } 39515 39516 // Get: Gets an inventory source. 39517 // 39518 // - inventorySourceId: The ID of the inventory source to fetch. 39519 func (r *InventorySourcesService) Get(inventorySourceId int64) *InventorySourcesGetCall { 39520 c := &InventorySourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 39521 c.inventorySourceId = inventorySourceId 39522 return c 39523 } 39524 39525 // PartnerId sets the optional parameter "partnerId": Required. The ID 39526 // of the DV360 partner to which the fetched inventory source is 39527 // permissioned. 39528 func (c *InventorySourcesGetCall) PartnerId(partnerId int64) *InventorySourcesGetCall { 39529 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 39530 return c 39531 } 39532 39533 // Fields allows partial responses to be retrieved. See 39534 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 39535 // for more information. 39536 func (c *InventorySourcesGetCall) Fields(s ...googleapi.Field) *InventorySourcesGetCall { 39537 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 39538 return c 39539 } 39540 39541 // IfNoneMatch sets the optional parameter which makes the operation 39542 // fail if the object's ETag matches the given value. This is useful for 39543 // getting updates only after the object has changed since the last 39544 // request. Use googleapi.IsNotModified to check whether the response 39545 // error from Do is the result of In-None-Match. 39546 func (c *InventorySourcesGetCall) IfNoneMatch(entityTag string) *InventorySourcesGetCall { 39547 c.ifNoneMatch_ = entityTag 39548 return c 39549 } 39550 39551 // Context sets the context to be used in this call's Do method. Any 39552 // pending HTTP request will be aborted if the provided context is 39553 // canceled. 39554 func (c *InventorySourcesGetCall) Context(ctx context.Context) *InventorySourcesGetCall { 39555 c.ctx_ = ctx 39556 return c 39557 } 39558 39559 // Header returns an http.Header that can be modified by the caller to 39560 // add HTTP headers to the request. 39561 func (c *InventorySourcesGetCall) Header() http.Header { 39562 if c.header_ == nil { 39563 c.header_ = make(http.Header) 39564 } 39565 return c.header_ 39566 } 39567 39568 func (c *InventorySourcesGetCall) doRequest(alt string) (*http.Response, error) { 39569 reqHeaders := make(http.Header) 39570 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 39571 for k, v := range c.header_ { 39572 reqHeaders[k] = v 39573 } 39574 reqHeaders.Set("User-Agent", c.s.userAgent()) 39575 if c.ifNoneMatch_ != "" { 39576 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 39577 } 39578 var body io.Reader = nil 39579 c.urlParams_.Set("alt", alt) 39580 c.urlParams_.Set("prettyPrint", "false") 39581 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources/{+inventorySourceId}") 39582 urls += "?" + c.urlParams_.Encode() 39583 req, err := http.NewRequest("GET", urls, body) 39584 if err != nil { 39585 return nil, err 39586 } 39587 req.Header = reqHeaders 39588 googleapi.Expand(req.URL, map[string]string{ 39589 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10), 39590 }) 39591 return gensupport.SendRequest(c.ctx_, c.s.client, req) 39592 } 39593 39594 // Do executes the "displayvideo.inventorySources.get" call. 39595 // Exactly one of *InventorySource or error will be non-nil. Any non-2xx 39596 // status code is an error. Response headers are in either 39597 // *InventorySource.ServerResponse.Header or (if a response was returned 39598 // at all) in error.(*googleapi.Error).Header. Use 39599 // googleapi.IsNotModified to check whether the returned error was 39600 // because http.StatusNotModified was returned. 39601 func (c *InventorySourcesGetCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) { 39602 gensupport.SetOptions(c.urlParams_, opts...) 39603 res, err := c.doRequest("json") 39604 if res != nil && res.StatusCode == http.StatusNotModified { 39605 if res.Body != nil { 39606 res.Body.Close() 39607 } 39608 return nil, gensupport.WrapError(&googleapi.Error{ 39609 Code: res.StatusCode, 39610 Header: res.Header, 39611 }) 39612 } 39613 if err != nil { 39614 return nil, err 39615 } 39616 defer googleapi.CloseBody(res) 39617 if err := googleapi.CheckResponse(res); err != nil { 39618 return nil, gensupport.WrapError(err) 39619 } 39620 ret := &InventorySource{ 39621 ServerResponse: googleapi.ServerResponse{ 39622 Header: res.Header, 39623 HTTPStatusCode: res.StatusCode, 39624 }, 39625 } 39626 target := &ret 39627 if err := gensupport.DecodeResponse(target, res); err != nil { 39628 return nil, err 39629 } 39630 return ret, nil 39631 // { 39632 // "description": "Gets an inventory source.", 39633 // "flatPath": "v1/inventorySources/{inventorySourcesId}", 39634 // "httpMethod": "GET", 39635 // "id": "displayvideo.inventorySources.get", 39636 // "parameterOrder": [ 39637 // "inventorySourceId" 39638 // ], 39639 // "parameters": { 39640 // "inventorySourceId": { 39641 // "description": "Required. The ID of the inventory source to fetch.", 39642 // "format": "int64", 39643 // "location": "path", 39644 // "pattern": "^[^/]+$", 39645 // "required": true, 39646 // "type": "string" 39647 // }, 39648 // "partnerId": { 39649 // "description": "Required. The ID of the DV360 partner to which the fetched inventory source is permissioned.", 39650 // "format": "int64", 39651 // "location": "query", 39652 // "type": "string" 39653 // } 39654 // }, 39655 // "path": "v1/inventorySources/{+inventorySourceId}", 39656 // "response": { 39657 // "$ref": "InventorySource" 39658 // }, 39659 // "scopes": [ 39660 // "https://www.googleapis.com/auth/display-video" 39661 // ] 39662 // } 39663 39664 } 39665 39666 // method id "displayvideo.inventorySources.list": 39667 39668 type InventorySourcesListCall struct { 39669 s *Service 39670 urlParams_ gensupport.URLParams 39671 ifNoneMatch_ string 39672 ctx_ context.Context 39673 header_ http.Header 39674 } 39675 39676 // List: Lists inventory sources that are accessible to the current 39677 // user. The order is defined by the order_by parameter. If a filter by 39678 // entity_status is not specified, inventory sources with entity status 39679 // `ENTITY_STATUS_ARCHIVED` will not be included in the results. 39680 func (r *InventorySourcesService) List() *InventorySourcesListCall { 39681 c := &InventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 39682 return c 39683 } 39684 39685 // AdvertiserId sets the optional parameter "advertiserId": The ID of 39686 // the advertiser that has access to the inventory source. 39687 func (c *InventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourcesListCall { 39688 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 39689 return c 39690 } 39691 39692 // Filter sets the optional parameter "filter": Allows filtering by 39693 // inventory source fields. Supported syntax: * Filter expressions are 39694 // made up of one or more restrictions. * Restrictions can be combined 39695 // by `AND` or `OR` logical operators. A sequence of restrictions 39696 // implicitly uses `AND`. * A restriction has the form of `{field} 39697 // {operator} {value}`. * All fields must use the `EQUALS (=)` operator. 39698 // Supported fields: * `status.entityStatus` * `commitment` * 39699 // `deliveryMethod` * `rateDetails.rateType` * `exchange` Examples: * 39700 // All active inventory sources: 39701 // `status.entityStatus="ENTITY_STATUS_ACTIVE" * Inventory sources 39702 // belonging to Google Ad Manager or Rubicon exchanges: 39703 // `exchange="EXCHANGE_GOOGLE_AD_MANAGER" OR 39704 // exchange="EXCHANGE_RUBICON" The length of this field should be no 39705 // more than 500 characters. Reference our filter `LIST` requests 39706 // (/display-video/api/guides/how-tos/filters) guide for more 39707 // information. 39708 func (c *InventorySourcesListCall) Filter(filter string) *InventorySourcesListCall { 39709 c.urlParams_.Set("filter", filter) 39710 return c 39711 } 39712 39713 // OrderBy sets the optional parameter "orderBy": Field by which to sort 39714 // the list. Acceptable values are: * `displayName` (default) The 39715 // default sorting order is ascending. To specify descending order for a 39716 // field, a suffix "desc" should be added to the field name. For 39717 // example, `displayName desc`. 39718 func (c *InventorySourcesListCall) OrderBy(orderBy string) *InventorySourcesListCall { 39719 c.urlParams_.Set("orderBy", orderBy) 39720 return c 39721 } 39722 39723 // PageSize sets the optional parameter "pageSize": Requested page size. 39724 // Must be between `1` and `200`. If unspecified will default to `100`. 39725 func (c *InventorySourcesListCall) PageSize(pageSize int64) *InventorySourcesListCall { 39726 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 39727 return c 39728 } 39729 39730 // PageToken sets the optional parameter "pageToken": A token 39731 // identifying a page of results the server should return. Typically, 39732 // this is the value of next_page_token returned from the previous call 39733 // to `ListInventorySources` method. If not specified, the first page of 39734 // results will be returned. 39735 func (c *InventorySourcesListCall) PageToken(pageToken string) *InventorySourcesListCall { 39736 c.urlParams_.Set("pageToken", pageToken) 39737 return c 39738 } 39739 39740 // PartnerId sets the optional parameter "partnerId": The ID of the 39741 // partner that has access to the inventory source. 39742 func (c *InventorySourcesListCall) PartnerId(partnerId int64) *InventorySourcesListCall { 39743 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 39744 return c 39745 } 39746 39747 // Fields allows partial responses to be retrieved. See 39748 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 39749 // for more information. 39750 func (c *InventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourcesListCall { 39751 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 39752 return c 39753 } 39754 39755 // IfNoneMatch sets the optional parameter which makes the operation 39756 // fail if the object's ETag matches the given value. This is useful for 39757 // getting updates only after the object has changed since the last 39758 // request. Use googleapi.IsNotModified to check whether the response 39759 // error from Do is the result of In-None-Match. 39760 func (c *InventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourcesListCall { 39761 c.ifNoneMatch_ = entityTag 39762 return c 39763 } 39764 39765 // Context sets the context to be used in this call's Do method. Any 39766 // pending HTTP request will be aborted if the provided context is 39767 // canceled. 39768 func (c *InventorySourcesListCall) Context(ctx context.Context) *InventorySourcesListCall { 39769 c.ctx_ = ctx 39770 return c 39771 } 39772 39773 // Header returns an http.Header that can be modified by the caller to 39774 // add HTTP headers to the request. 39775 func (c *InventorySourcesListCall) Header() http.Header { 39776 if c.header_ == nil { 39777 c.header_ = make(http.Header) 39778 } 39779 return c.header_ 39780 } 39781 39782 func (c *InventorySourcesListCall) doRequest(alt string) (*http.Response, error) { 39783 reqHeaders := make(http.Header) 39784 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 39785 for k, v := range c.header_ { 39786 reqHeaders[k] = v 39787 } 39788 reqHeaders.Set("User-Agent", c.s.userAgent()) 39789 if c.ifNoneMatch_ != "" { 39790 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 39791 } 39792 var body io.Reader = nil 39793 c.urlParams_.Set("alt", alt) 39794 c.urlParams_.Set("prettyPrint", "false") 39795 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources") 39796 urls += "?" + c.urlParams_.Encode() 39797 req, err := http.NewRequest("GET", urls, body) 39798 if err != nil { 39799 return nil, err 39800 } 39801 req.Header = reqHeaders 39802 return gensupport.SendRequest(c.ctx_, c.s.client, req) 39803 } 39804 39805 // Do executes the "displayvideo.inventorySources.list" call. 39806 // Exactly one of *ListInventorySourcesResponse or error will be 39807 // non-nil. Any non-2xx status code is an error. Response headers are in 39808 // either *ListInventorySourcesResponse.ServerResponse.Header or (if a 39809 // response was returned at all) in error.(*googleapi.Error).Header. Use 39810 // googleapi.IsNotModified to check whether the returned error was 39811 // because http.StatusNotModified was returned. 39812 func (c *InventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourcesResponse, error) { 39813 gensupport.SetOptions(c.urlParams_, opts...) 39814 res, err := c.doRequest("json") 39815 if res != nil && res.StatusCode == http.StatusNotModified { 39816 if res.Body != nil { 39817 res.Body.Close() 39818 } 39819 return nil, gensupport.WrapError(&googleapi.Error{ 39820 Code: res.StatusCode, 39821 Header: res.Header, 39822 }) 39823 } 39824 if err != nil { 39825 return nil, err 39826 } 39827 defer googleapi.CloseBody(res) 39828 if err := googleapi.CheckResponse(res); err != nil { 39829 return nil, gensupport.WrapError(err) 39830 } 39831 ret := &ListInventorySourcesResponse{ 39832 ServerResponse: googleapi.ServerResponse{ 39833 Header: res.Header, 39834 HTTPStatusCode: res.StatusCode, 39835 }, 39836 } 39837 target := &ret 39838 if err := gensupport.DecodeResponse(target, res); err != nil { 39839 return nil, err 39840 } 39841 return ret, nil 39842 // { 39843 // "description": "Lists inventory sources that are accessible to the current user. The order is defined by the order_by parameter. If a filter by entity_status is not specified, inventory sources with entity status `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 39844 // "flatPath": "v1/inventorySources", 39845 // "httpMethod": "GET", 39846 // "id": "displayvideo.inventorySources.list", 39847 // "parameterOrder": [], 39848 // "parameters": { 39849 // "advertiserId": { 39850 // "description": "The ID of the advertiser that has access to the inventory source.", 39851 // "format": "int64", 39852 // "location": "query", 39853 // "type": "string" 39854 // }, 39855 // "filter": { 39856 // "description": "Allows filtering by inventory source fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `status.entityStatus` * `commitment` * `deliveryMethod` * `rateDetails.rateType` * `exchange` Examples: * All active inventory sources: `status.entityStatus=\"ENTITY_STATUS_ACTIVE\"` * Inventory sources belonging to Google Ad Manager or Rubicon exchanges: `exchange=\"EXCHANGE_GOOGLE_AD_MANAGER\" OR exchange=\"EXCHANGE_RUBICON\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 39857 // "location": "query", 39858 // "type": "string" 39859 // }, 39860 // "orderBy": { 39861 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 39862 // "location": "query", 39863 // "type": "string" 39864 // }, 39865 // "pageSize": { 39866 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 39867 // "format": "int32", 39868 // "location": "query", 39869 // "type": "integer" 39870 // }, 39871 // "pageToken": { 39872 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListInventorySources` method. If not specified, the first page of results will be returned.", 39873 // "location": "query", 39874 // "type": "string" 39875 // }, 39876 // "partnerId": { 39877 // "description": "The ID of the partner that has access to the inventory source.", 39878 // "format": "int64", 39879 // "location": "query", 39880 // "type": "string" 39881 // } 39882 // }, 39883 // "path": "v1/inventorySources", 39884 // "response": { 39885 // "$ref": "ListInventorySourcesResponse" 39886 // }, 39887 // "scopes": [ 39888 // "https://www.googleapis.com/auth/display-video" 39889 // ] 39890 // } 39891 39892 } 39893 39894 // Pages invokes f for each page of results. 39895 // A non-nil error returned from f will halt the iteration. 39896 // The provided context supersedes any context provided to the Context method. 39897 func (c *InventorySourcesListCall) Pages(ctx context.Context, f func(*ListInventorySourcesResponse) error) error { 39898 c.ctx_ = ctx 39899 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 39900 for { 39901 x, err := c.Do() 39902 if err != nil { 39903 return err 39904 } 39905 if err := f(x); err != nil { 39906 return err 39907 } 39908 if x.NextPageToken == "" { 39909 return nil 39910 } 39911 c.PageToken(x.NextPageToken) 39912 } 39913 } 39914 39915 // method id "displayvideo.inventorySources.patch": 39916 39917 type InventorySourcesPatchCall struct { 39918 s *Service 39919 inventorySourceId int64 39920 inventorysource *InventorySource 39921 urlParams_ gensupport.URLParams 39922 ctx_ context.Context 39923 header_ http.Header 39924 } 39925 39926 // Patch: Updates an existing inventory source. Returns the updated 39927 // inventory source if successful. 39928 // 39929 // - inventorySourceId: Output only. The unique ID of the inventory 39930 // source. Assigned by the system. 39931 func (r *InventorySourcesService) Patch(inventorySourceId int64, inventorysource *InventorySource) *InventorySourcesPatchCall { 39932 c := &InventorySourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 39933 c.inventorySourceId = inventorySourceId 39934 c.inventorysource = inventorysource 39935 return c 39936 } 39937 39938 // AdvertiserId sets the optional parameter "advertiserId": The ID of 39939 // the advertiser that the request is being made within. 39940 func (c *InventorySourcesPatchCall) AdvertiserId(advertiserId int64) *InventorySourcesPatchCall { 39941 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 39942 return c 39943 } 39944 39945 // PartnerId sets the optional parameter "partnerId": The ID of the 39946 // partner that the request is being made within. 39947 func (c *InventorySourcesPatchCall) PartnerId(partnerId int64) *InventorySourcesPatchCall { 39948 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 39949 return c 39950 } 39951 39952 // UpdateMask sets the optional parameter "updateMask": Required. The 39953 // mask to control which fields to update. 39954 func (c *InventorySourcesPatchCall) UpdateMask(updateMask string) *InventorySourcesPatchCall { 39955 c.urlParams_.Set("updateMask", updateMask) 39956 return c 39957 } 39958 39959 // Fields allows partial responses to be retrieved. See 39960 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 39961 // for more information. 39962 func (c *InventorySourcesPatchCall) Fields(s ...googleapi.Field) *InventorySourcesPatchCall { 39963 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 39964 return c 39965 } 39966 39967 // Context sets the context to be used in this call's Do method. Any 39968 // pending HTTP request will be aborted if the provided context is 39969 // canceled. 39970 func (c *InventorySourcesPatchCall) Context(ctx context.Context) *InventorySourcesPatchCall { 39971 c.ctx_ = ctx 39972 return c 39973 } 39974 39975 // Header returns an http.Header that can be modified by the caller to 39976 // add HTTP headers to the request. 39977 func (c *InventorySourcesPatchCall) Header() http.Header { 39978 if c.header_ == nil { 39979 c.header_ = make(http.Header) 39980 } 39981 return c.header_ 39982 } 39983 39984 func (c *InventorySourcesPatchCall) doRequest(alt string) (*http.Response, error) { 39985 reqHeaders := make(http.Header) 39986 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 39987 for k, v := range c.header_ { 39988 reqHeaders[k] = v 39989 } 39990 reqHeaders.Set("User-Agent", c.s.userAgent()) 39991 var body io.Reader = nil 39992 body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysource) 39993 if err != nil { 39994 return nil, err 39995 } 39996 reqHeaders.Set("Content-Type", "application/json") 39997 c.urlParams_.Set("alt", alt) 39998 c.urlParams_.Set("prettyPrint", "false") 39999 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources/{+inventorySourceId}") 40000 urls += "?" + c.urlParams_.Encode() 40001 req, err := http.NewRequest("PATCH", urls, body) 40002 if err != nil { 40003 return nil, err 40004 } 40005 req.Header = reqHeaders 40006 googleapi.Expand(req.URL, map[string]string{ 40007 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10), 40008 }) 40009 return gensupport.SendRequest(c.ctx_, c.s.client, req) 40010 } 40011 40012 // Do executes the "displayvideo.inventorySources.patch" call. 40013 // Exactly one of *InventorySource or error will be non-nil. Any non-2xx 40014 // status code is an error. Response headers are in either 40015 // *InventorySource.ServerResponse.Header or (if a response was returned 40016 // at all) in error.(*googleapi.Error).Header. Use 40017 // googleapi.IsNotModified to check whether the returned error was 40018 // because http.StatusNotModified was returned. 40019 func (c *InventorySourcesPatchCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) { 40020 gensupport.SetOptions(c.urlParams_, opts...) 40021 res, err := c.doRequest("json") 40022 if res != nil && res.StatusCode == http.StatusNotModified { 40023 if res.Body != nil { 40024 res.Body.Close() 40025 } 40026 return nil, gensupport.WrapError(&googleapi.Error{ 40027 Code: res.StatusCode, 40028 Header: res.Header, 40029 }) 40030 } 40031 if err != nil { 40032 return nil, err 40033 } 40034 defer googleapi.CloseBody(res) 40035 if err := googleapi.CheckResponse(res); err != nil { 40036 return nil, gensupport.WrapError(err) 40037 } 40038 ret := &InventorySource{ 40039 ServerResponse: googleapi.ServerResponse{ 40040 Header: res.Header, 40041 HTTPStatusCode: res.StatusCode, 40042 }, 40043 } 40044 target := &ret 40045 if err := gensupport.DecodeResponse(target, res); err != nil { 40046 return nil, err 40047 } 40048 return ret, nil 40049 // { 40050 // "description": "Updates an existing inventory source. Returns the updated inventory source if successful.", 40051 // "flatPath": "v1/inventorySources/{inventorySourcesId}", 40052 // "httpMethod": "PATCH", 40053 // "id": "displayvideo.inventorySources.patch", 40054 // "parameterOrder": [ 40055 // "inventorySourceId" 40056 // ], 40057 // "parameters": { 40058 // "advertiserId": { 40059 // "description": "The ID of the advertiser that the request is being made within.", 40060 // "format": "int64", 40061 // "location": "query", 40062 // "type": "string" 40063 // }, 40064 // "inventorySourceId": { 40065 // "description": "Output only. The unique ID of the inventory source. Assigned by the system.", 40066 // "format": "int64", 40067 // "location": "path", 40068 // "pattern": "^[^/]+$", 40069 // "required": true, 40070 // "type": "string" 40071 // }, 40072 // "partnerId": { 40073 // "description": "The ID of the partner that the request is being made within.", 40074 // "format": "int64", 40075 // "location": "query", 40076 // "type": "string" 40077 // }, 40078 // "updateMask": { 40079 // "description": "Required. The mask to control which fields to update.", 40080 // "format": "google-fieldmask", 40081 // "location": "query", 40082 // "type": "string" 40083 // } 40084 // }, 40085 // "path": "v1/inventorySources/{+inventorySourceId}", 40086 // "request": { 40087 // "$ref": "InventorySource" 40088 // }, 40089 // "response": { 40090 // "$ref": "InventorySource" 40091 // }, 40092 // "scopes": [ 40093 // "https://www.googleapis.com/auth/display-video" 40094 // ] 40095 // } 40096 40097 } 40098 40099 // method id "displayvideo.media.download": 40100 40101 type MediaDownloadCall struct { 40102 s *Service 40103 resourceName string 40104 urlParams_ gensupport.URLParams 40105 ifNoneMatch_ string 40106 ctx_ context.Context 40107 header_ http.Header 40108 } 40109 40110 // Download: Downloads media. Download is supported on the URI 40111 // `/download/{resource_name=**}?alt=media.` **Note**: Download requests 40112 // will not be successful without including `alt=media` query string. 40113 // 40114 // - resourceName: Name of the media that is being downloaded. See 40115 // ReadRequest.resource_name. 40116 func (r *MediaService) Download(resourceName string) *MediaDownloadCall { 40117 c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 40118 c.resourceName = resourceName 40119 return c 40120 } 40121 40122 // Fields allows partial responses to be retrieved. See 40123 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 40124 // for more information. 40125 func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall { 40126 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 40127 return c 40128 } 40129 40130 // IfNoneMatch sets the optional parameter which makes the operation 40131 // fail if the object's ETag matches the given value. This is useful for 40132 // getting updates only after the object has changed since the last 40133 // request. Use googleapi.IsNotModified to check whether the response 40134 // error from Do is the result of In-None-Match. 40135 func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall { 40136 c.ifNoneMatch_ = entityTag 40137 return c 40138 } 40139 40140 // Context sets the context to be used in this call's Do and Download 40141 // methods. Any pending HTTP request will be aborted if the provided 40142 // context is canceled. 40143 func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall { 40144 c.ctx_ = ctx 40145 return c 40146 } 40147 40148 // Header returns an http.Header that can be modified by the caller to 40149 // add HTTP headers to the request. 40150 func (c *MediaDownloadCall) Header() http.Header { 40151 if c.header_ == nil { 40152 c.header_ = make(http.Header) 40153 } 40154 return c.header_ 40155 } 40156 40157 func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) { 40158 reqHeaders := make(http.Header) 40159 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 40160 for k, v := range c.header_ { 40161 reqHeaders[k] = v 40162 } 40163 reqHeaders.Set("User-Agent", c.s.userAgent()) 40164 if c.ifNoneMatch_ != "" { 40165 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 40166 } 40167 var body io.Reader = nil 40168 c.urlParams_.Set("alt", alt) 40169 c.urlParams_.Set("prettyPrint", "false") 40170 urls := googleapi.ResolveRelative(c.s.BasePath, "download/{+resourceName}") 40171 urls += "?" + c.urlParams_.Encode() 40172 req, err := http.NewRequest("GET", urls, body) 40173 if err != nil { 40174 return nil, err 40175 } 40176 req.Header = reqHeaders 40177 googleapi.Expand(req.URL, map[string]string{ 40178 "resourceName": c.resourceName, 40179 }) 40180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 40181 } 40182 40183 // Download fetches the API endpoint's "media" value, instead of the normal 40184 // API response value. If the returned error is nil, the Response is guaranteed to 40185 // have a 2xx status code. Callers must close the Response.Body as usual. 40186 func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { 40187 gensupport.SetOptions(c.urlParams_, opts...) 40188 res, err := c.doRequest("media") 40189 if err != nil { 40190 return nil, err 40191 } 40192 if err := googleapi.CheckResponse(res); err != nil { 40193 res.Body.Close() 40194 return nil, gensupport.WrapError(err) 40195 } 40196 return res, nil 40197 } 40198 40199 // Do executes the "displayvideo.media.download" call. 40200 // Exactly one of *GoogleBytestreamMedia or error will be non-nil. Any 40201 // non-2xx status code is an error. Response headers are in either 40202 // *GoogleBytestreamMedia.ServerResponse.Header or (if a response was 40203 // returned at all) in error.(*googleapi.Error).Header. Use 40204 // googleapi.IsNotModified to check whether the returned error was 40205 // because http.StatusNotModified was returned. 40206 func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) { 40207 gensupport.SetOptions(c.urlParams_, opts...) 40208 res, err := c.doRequest("json") 40209 if res != nil && res.StatusCode == http.StatusNotModified { 40210 if res.Body != nil { 40211 res.Body.Close() 40212 } 40213 return nil, gensupport.WrapError(&googleapi.Error{ 40214 Code: res.StatusCode, 40215 Header: res.Header, 40216 }) 40217 } 40218 if err != nil { 40219 return nil, err 40220 } 40221 defer googleapi.CloseBody(res) 40222 if err := googleapi.CheckResponse(res); err != nil { 40223 return nil, gensupport.WrapError(err) 40224 } 40225 ret := &GoogleBytestreamMedia{ 40226 ServerResponse: googleapi.ServerResponse{ 40227 Header: res.Header, 40228 HTTPStatusCode: res.StatusCode, 40229 }, 40230 } 40231 target := &ret 40232 if err := gensupport.DecodeResponse(target, res); err != nil { 40233 return nil, err 40234 } 40235 return ret, nil 40236 // { 40237 // "description": "Downloads media. Download is supported on the URI `/download/{resource_name=**}?alt=media.` **Note**: Download requests will not be successful without including `alt=media` query string.", 40238 // "flatPath": "download/{downloadId}", 40239 // "httpMethod": "GET", 40240 // "id": "displayvideo.media.download", 40241 // "parameterOrder": [ 40242 // "resourceName" 40243 // ], 40244 // "parameters": { 40245 // "resourceName": { 40246 // "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.", 40247 // "location": "path", 40248 // "pattern": "^.*$", 40249 // "required": true, 40250 // "type": "string" 40251 // } 40252 // }, 40253 // "path": "download/{+resourceName}", 40254 // "response": { 40255 // "$ref": "GoogleBytestreamMedia" 40256 // }, 40257 // "scopes": [ 40258 // "https://www.googleapis.com/auth/display-video", 40259 // "https://www.googleapis.com/auth/doubleclickbidmanager" 40260 // ], 40261 // "supportsMediaDownload": true 40262 // } 40263 40264 } 40265 40266 // method id "displayvideo.media.upload": 40267 40268 type MediaUploadCall struct { 40269 s *Service 40270 resourceName string 40271 googlebytestreammedia *GoogleBytestreamMedia 40272 urlParams_ gensupport.URLParams 40273 mediaInfo_ *gensupport.MediaInfo 40274 ctx_ context.Context 40275 header_ http.Header 40276 } 40277 40278 // Upload: Uploads media. Upload is supported on the URI 40279 // `/upload/media/{resource_name=**}?upload_type=media.` **Note**: 40280 // Upload requests will not be successful without including 40281 // `upload_type=media` query string. 40282 // 40283 // - resourceName: Name of the media that is being downloaded. See 40284 // ReadRequest.resource_name. 40285 func (r *MediaService) Upload(resourceName string, googlebytestreammedia *GoogleBytestreamMedia) *MediaUploadCall { 40286 c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 40287 c.resourceName = resourceName 40288 c.googlebytestreammedia = googlebytestreammedia 40289 return c 40290 } 40291 40292 // Media specifies the media to upload in one or more chunks. The chunk 40293 // size may be controlled by supplying a MediaOption generated by 40294 // googleapi.ChunkSize. The chunk size defaults to 40295 // googleapi.DefaultUploadChunkSize.The Content-Type header used in the 40296 // upload request will be determined by sniffing the contents of r, 40297 // unless a MediaOption generated by googleapi.ContentType is 40298 // supplied. 40299 // At most one of Media and ResumableMedia may be set. 40300 func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { 40301 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) 40302 return c 40303 } 40304 40305 // ResumableMedia specifies the media to upload in chunks and can be 40306 // canceled with ctx. 40307 // 40308 // Deprecated: use Media instead. 40309 // 40310 // At most one of Media and ResumableMedia may be set. mediaType 40311 // identifies the MIME media type of the upload, such as "image/png". If 40312 // mediaType is "", it will be auto-detected. The provided ctx will 40313 // supersede any context previously provided to the Context method. 40314 func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { 40315 c.ctx_ = ctx 40316 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) 40317 return c 40318 } 40319 40320 // ProgressUpdater provides a callback function that will be called 40321 // after every chunk. It should be a low-latency function in order to 40322 // not slow down the upload operation. This should only be called when 40323 // using ResumableMedia (as opposed to Media). 40324 func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { 40325 c.mediaInfo_.SetProgressUpdater(pu) 40326 return c 40327 } 40328 40329 // Fields allows partial responses to be retrieved. See 40330 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 40331 // for more information. 40332 func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { 40333 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 40334 return c 40335 } 40336 40337 // Context sets the context to be used in this call's Do method. Any 40338 // pending HTTP request will be aborted if the provided context is 40339 // canceled. 40340 // This context will supersede any context previously provided to the 40341 // ResumableMedia method. 40342 func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { 40343 c.ctx_ = ctx 40344 return c 40345 } 40346 40347 // Header returns an http.Header that can be modified by the caller to 40348 // add HTTP headers to the request. 40349 func (c *MediaUploadCall) Header() http.Header { 40350 if c.header_ == nil { 40351 c.header_ = make(http.Header) 40352 } 40353 return c.header_ 40354 } 40355 40356 func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { 40357 reqHeaders := make(http.Header) 40358 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 40359 for k, v := range c.header_ { 40360 reqHeaders[k] = v 40361 } 40362 reqHeaders.Set("User-Agent", c.s.userAgent()) 40363 var body io.Reader = nil 40364 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlebytestreammedia) 40365 if err != nil { 40366 return nil, err 40367 } 40368 reqHeaders.Set("Content-Type", "application/json") 40369 c.urlParams_.Set("alt", alt) 40370 c.urlParams_.Set("prettyPrint", "false") 40371 urls := googleapi.ResolveRelative(c.s.BasePath, "media/{+resourceName}") 40372 if c.mediaInfo_ != nil { 40373 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/media/{+resourceName}") 40374 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) 40375 } 40376 if body == nil { 40377 body = new(bytes.Buffer) 40378 reqHeaders.Set("Content-Type", "application/json") 40379 } 40380 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) 40381 defer cleanup() 40382 urls += "?" + c.urlParams_.Encode() 40383 req, err := http.NewRequest("POST", urls, body) 40384 if err != nil { 40385 return nil, err 40386 } 40387 req.Header = reqHeaders 40388 req.GetBody = getBody 40389 googleapi.Expand(req.URL, map[string]string{ 40390 "resourceName": c.resourceName, 40391 }) 40392 return gensupport.SendRequest(c.ctx_, c.s.client, req) 40393 } 40394 40395 // Do executes the "displayvideo.media.upload" call. 40396 // Exactly one of *GoogleBytestreamMedia or error will be non-nil. Any 40397 // non-2xx status code is an error. Response headers are in either 40398 // *GoogleBytestreamMedia.ServerResponse.Header or (if a response was 40399 // returned at all) in error.(*googleapi.Error).Header. Use 40400 // googleapi.IsNotModified to check whether the returned error was 40401 // because http.StatusNotModified was returned. 40402 func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) { 40403 gensupport.SetOptions(c.urlParams_, opts...) 40404 res, err := c.doRequest("json") 40405 if res != nil && res.StatusCode == http.StatusNotModified { 40406 if res.Body != nil { 40407 res.Body.Close() 40408 } 40409 return nil, gensupport.WrapError(&googleapi.Error{ 40410 Code: res.StatusCode, 40411 Header: res.Header, 40412 }) 40413 } 40414 if err != nil { 40415 return nil, err 40416 } 40417 defer googleapi.CloseBody(res) 40418 if err := googleapi.CheckResponse(res); err != nil { 40419 return nil, gensupport.WrapError(err) 40420 } 40421 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) 40422 if rx != nil { 40423 rx.Client = c.s.client 40424 rx.UserAgent = c.s.userAgent() 40425 ctx := c.ctx_ 40426 if ctx == nil { 40427 ctx = context.TODO() 40428 } 40429 res, err = rx.Upload(ctx) 40430 if err != nil { 40431 return nil, err 40432 } 40433 defer res.Body.Close() 40434 if err := googleapi.CheckResponse(res); err != nil { 40435 return nil, gensupport.WrapError(err) 40436 } 40437 } 40438 ret := &GoogleBytestreamMedia{ 40439 ServerResponse: googleapi.ServerResponse{ 40440 Header: res.Header, 40441 HTTPStatusCode: res.StatusCode, 40442 }, 40443 } 40444 target := &ret 40445 if err := gensupport.DecodeResponse(target, res); err != nil { 40446 return nil, err 40447 } 40448 return ret, nil 40449 // { 40450 // "description": "Uploads media. Upload is supported on the URI `/upload/media/{resource_name=**}?upload_type=media.` **Note**: Upload requests will not be successful without including `upload_type=media` query string.", 40451 // "flatPath": "media/{mediaId}", 40452 // "httpMethod": "POST", 40453 // "id": "displayvideo.media.upload", 40454 // "mediaUpload": { 40455 // "accept": [ 40456 // "*/*" 40457 // ], 40458 // "protocols": { 40459 // "simple": { 40460 // "multipart": true, 40461 // "path": "/upload/media/{+resourceName}" 40462 // } 40463 // } 40464 // }, 40465 // "parameterOrder": [ 40466 // "resourceName" 40467 // ], 40468 // "parameters": { 40469 // "resourceName": { 40470 // "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.", 40471 // "location": "path", 40472 // "pattern": "^.*$", 40473 // "required": true, 40474 // "type": "string" 40475 // } 40476 // }, 40477 // "path": "media/{+resourceName}", 40478 // "request": { 40479 // "$ref": "GoogleBytestreamMedia" 40480 // }, 40481 // "response": { 40482 // "$ref": "GoogleBytestreamMedia" 40483 // }, 40484 // "scopes": [ 40485 // "https://www.googleapis.com/auth/display-video", 40486 // "https://www.googleapis.com/auth/doubleclickbidmanager" 40487 // ], 40488 // "supportsMediaUpload": true 40489 // } 40490 40491 } 40492 40493 // method id "displayvideo.partners.bulkEditPartnerAssignedTargetingOptions": 40494 40495 type PartnersBulkEditPartnerAssignedTargetingOptionsCall struct { 40496 s *Service 40497 partnerId int64 40498 bulkeditpartnerassignedtargetingoptionsrequest *BulkEditPartnerAssignedTargetingOptionsRequest 40499 urlParams_ gensupport.URLParams 40500 ctx_ context.Context 40501 header_ http.Header 40502 } 40503 40504 // BulkEditPartnerAssignedTargetingOptions: Bulk edits targeting options 40505 // under a single partner. The operation will delete the assigned 40506 // targeting options provided in 40507 // BulkEditPartnerAssignedTargetingOptionsRequest.deleteRequests and 40508 // then create the assigned targeting options provided in 40509 // BulkEditPartnerAssignedTargetingOptionsRequest.createRequests . 40510 // 40511 // - partnerId: The ID of the partner. 40512 func (r *PartnersService) BulkEditPartnerAssignedTargetingOptions(partnerId int64, bulkeditpartnerassignedtargetingoptionsrequest *BulkEditPartnerAssignedTargetingOptionsRequest) *PartnersBulkEditPartnerAssignedTargetingOptionsCall { 40513 c := &PartnersBulkEditPartnerAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 40514 c.partnerId = partnerId 40515 c.bulkeditpartnerassignedtargetingoptionsrequest = bulkeditpartnerassignedtargetingoptionsrequest 40516 return c 40517 } 40518 40519 // Fields allows partial responses to be retrieved. See 40520 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 40521 // for more information. 40522 func (c *PartnersBulkEditPartnerAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *PartnersBulkEditPartnerAssignedTargetingOptionsCall { 40523 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 40524 return c 40525 } 40526 40527 // Context sets the context to be used in this call's Do method. Any 40528 // pending HTTP request will be aborted if the provided context is 40529 // canceled. 40530 func (c *PartnersBulkEditPartnerAssignedTargetingOptionsCall) Context(ctx context.Context) *PartnersBulkEditPartnerAssignedTargetingOptionsCall { 40531 c.ctx_ = ctx 40532 return c 40533 } 40534 40535 // Header returns an http.Header that can be modified by the caller to 40536 // add HTTP headers to the request. 40537 func (c *PartnersBulkEditPartnerAssignedTargetingOptionsCall) Header() http.Header { 40538 if c.header_ == nil { 40539 c.header_ = make(http.Header) 40540 } 40541 return c.header_ 40542 } 40543 40544 func (c *PartnersBulkEditPartnerAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 40545 reqHeaders := make(http.Header) 40546 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 40547 for k, v := range c.header_ { 40548 reqHeaders[k] = v 40549 } 40550 reqHeaders.Set("User-Agent", c.s.userAgent()) 40551 var body io.Reader = nil 40552 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditpartnerassignedtargetingoptionsrequest) 40553 if err != nil { 40554 return nil, err 40555 } 40556 reqHeaders.Set("Content-Type", "application/json") 40557 c.urlParams_.Set("alt", alt) 40558 c.urlParams_.Set("prettyPrint", "false") 40559 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}:bulkEditPartnerAssignedTargetingOptions") 40560 urls += "?" + c.urlParams_.Encode() 40561 req, err := http.NewRequest("POST", urls, body) 40562 if err != nil { 40563 return nil, err 40564 } 40565 req.Header = reqHeaders 40566 googleapi.Expand(req.URL, map[string]string{ 40567 "partnerId": strconv.FormatInt(c.partnerId, 10), 40568 }) 40569 return gensupport.SendRequest(c.ctx_, c.s.client, req) 40570 } 40571 40572 // Do executes the "displayvideo.partners.bulkEditPartnerAssignedTargetingOptions" call. 40573 // Exactly one of *BulkEditPartnerAssignedTargetingOptionsResponse or 40574 // error will be non-nil. Any non-2xx status code is an error. Response 40575 // headers are in either 40576 // *BulkEditPartnerAssignedTargetingOptionsResponse.ServerResponse.Header 40577 // 40578 // or (if a response was returned at all) in 40579 // 40580 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 40581 // whether the returned error was because http.StatusNotModified was 40582 // returned. 40583 func (c *PartnersBulkEditPartnerAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditPartnerAssignedTargetingOptionsResponse, error) { 40584 gensupport.SetOptions(c.urlParams_, opts...) 40585 res, err := c.doRequest("json") 40586 if res != nil && res.StatusCode == http.StatusNotModified { 40587 if res.Body != nil { 40588 res.Body.Close() 40589 } 40590 return nil, gensupport.WrapError(&googleapi.Error{ 40591 Code: res.StatusCode, 40592 Header: res.Header, 40593 }) 40594 } 40595 if err != nil { 40596 return nil, err 40597 } 40598 defer googleapi.CloseBody(res) 40599 if err := googleapi.CheckResponse(res); err != nil { 40600 return nil, gensupport.WrapError(err) 40601 } 40602 ret := &BulkEditPartnerAssignedTargetingOptionsResponse{ 40603 ServerResponse: googleapi.ServerResponse{ 40604 Header: res.Header, 40605 HTTPStatusCode: res.StatusCode, 40606 }, 40607 } 40608 target := &ret 40609 if err := gensupport.DecodeResponse(target, res); err != nil { 40610 return nil, err 40611 } 40612 return ret, nil 40613 // { 40614 // "description": "Bulk edits targeting options under a single partner. The operation will delete the assigned targeting options provided in BulkEditPartnerAssignedTargetingOptionsRequest.deleteRequests and then create the assigned targeting options provided in BulkEditPartnerAssignedTargetingOptionsRequest.createRequests .", 40615 // "flatPath": "v1/partners/{partnersId}:bulkEditPartnerAssignedTargetingOptions", 40616 // "httpMethod": "POST", 40617 // "id": "displayvideo.partners.bulkEditPartnerAssignedTargetingOptions", 40618 // "parameterOrder": [ 40619 // "partnerId" 40620 // ], 40621 // "parameters": { 40622 // "partnerId": { 40623 // "description": "Required. The ID of the partner.", 40624 // "format": "int64", 40625 // "location": "path", 40626 // "pattern": "^[^/]+$", 40627 // "required": true, 40628 // "type": "string" 40629 // } 40630 // }, 40631 // "path": "v1/partners/{+partnerId}:bulkEditPartnerAssignedTargetingOptions", 40632 // "request": { 40633 // "$ref": "BulkEditPartnerAssignedTargetingOptionsRequest" 40634 // }, 40635 // "response": { 40636 // "$ref": "BulkEditPartnerAssignedTargetingOptionsResponse" 40637 // }, 40638 // "scopes": [ 40639 // "https://www.googleapis.com/auth/display-video" 40640 // ] 40641 // } 40642 40643 } 40644 40645 // method id "displayvideo.partners.get": 40646 40647 type PartnersGetCall struct { 40648 s *Service 40649 partnerId int64 40650 urlParams_ gensupport.URLParams 40651 ifNoneMatch_ string 40652 ctx_ context.Context 40653 header_ http.Header 40654 } 40655 40656 // Get: Gets a partner. 40657 // 40658 // - partnerId: The ID of the partner to fetch. 40659 func (r *PartnersService) Get(partnerId int64) *PartnersGetCall { 40660 c := &PartnersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 40661 c.partnerId = partnerId 40662 return c 40663 } 40664 40665 // Fields allows partial responses to be retrieved. See 40666 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 40667 // for more information. 40668 func (c *PartnersGetCall) Fields(s ...googleapi.Field) *PartnersGetCall { 40669 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 40670 return c 40671 } 40672 40673 // IfNoneMatch sets the optional parameter which makes the operation 40674 // fail if the object's ETag matches the given value. This is useful for 40675 // getting updates only after the object has changed since the last 40676 // request. Use googleapi.IsNotModified to check whether the response 40677 // error from Do is the result of In-None-Match. 40678 func (c *PartnersGetCall) IfNoneMatch(entityTag string) *PartnersGetCall { 40679 c.ifNoneMatch_ = entityTag 40680 return c 40681 } 40682 40683 // Context sets the context to be used in this call's Do method. Any 40684 // pending HTTP request will be aborted if the provided context is 40685 // canceled. 40686 func (c *PartnersGetCall) Context(ctx context.Context) *PartnersGetCall { 40687 c.ctx_ = ctx 40688 return c 40689 } 40690 40691 // Header returns an http.Header that can be modified by the caller to 40692 // add HTTP headers to the request. 40693 func (c *PartnersGetCall) Header() http.Header { 40694 if c.header_ == nil { 40695 c.header_ = make(http.Header) 40696 } 40697 return c.header_ 40698 } 40699 40700 func (c *PartnersGetCall) doRequest(alt string) (*http.Response, error) { 40701 reqHeaders := make(http.Header) 40702 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 40703 for k, v := range c.header_ { 40704 reqHeaders[k] = v 40705 } 40706 reqHeaders.Set("User-Agent", c.s.userAgent()) 40707 if c.ifNoneMatch_ != "" { 40708 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 40709 } 40710 var body io.Reader = nil 40711 c.urlParams_.Set("alt", alt) 40712 c.urlParams_.Set("prettyPrint", "false") 40713 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}") 40714 urls += "?" + c.urlParams_.Encode() 40715 req, err := http.NewRequest("GET", urls, body) 40716 if err != nil { 40717 return nil, err 40718 } 40719 req.Header = reqHeaders 40720 googleapi.Expand(req.URL, map[string]string{ 40721 "partnerId": strconv.FormatInt(c.partnerId, 10), 40722 }) 40723 return gensupport.SendRequest(c.ctx_, c.s.client, req) 40724 } 40725 40726 // Do executes the "displayvideo.partners.get" call. 40727 // Exactly one of *Partner or error will be non-nil. Any non-2xx status 40728 // code is an error. Response headers are in either 40729 // *Partner.ServerResponse.Header or (if a response was returned at all) 40730 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 40731 // check whether the returned error was because http.StatusNotModified 40732 // was returned. 40733 func (c *PartnersGetCall) Do(opts ...googleapi.CallOption) (*Partner, error) { 40734 gensupport.SetOptions(c.urlParams_, opts...) 40735 res, err := c.doRequest("json") 40736 if res != nil && res.StatusCode == http.StatusNotModified { 40737 if res.Body != nil { 40738 res.Body.Close() 40739 } 40740 return nil, gensupport.WrapError(&googleapi.Error{ 40741 Code: res.StatusCode, 40742 Header: res.Header, 40743 }) 40744 } 40745 if err != nil { 40746 return nil, err 40747 } 40748 defer googleapi.CloseBody(res) 40749 if err := googleapi.CheckResponse(res); err != nil { 40750 return nil, gensupport.WrapError(err) 40751 } 40752 ret := &Partner{ 40753 ServerResponse: googleapi.ServerResponse{ 40754 Header: res.Header, 40755 HTTPStatusCode: res.StatusCode, 40756 }, 40757 } 40758 target := &ret 40759 if err := gensupport.DecodeResponse(target, res); err != nil { 40760 return nil, err 40761 } 40762 return ret, nil 40763 // { 40764 // "description": "Gets a partner.", 40765 // "flatPath": "v1/partners/{partnersId}", 40766 // "httpMethod": "GET", 40767 // "id": "displayvideo.partners.get", 40768 // "parameterOrder": [ 40769 // "partnerId" 40770 // ], 40771 // "parameters": { 40772 // "partnerId": { 40773 // "description": "Required. The ID of the partner to fetch.", 40774 // "format": "int64", 40775 // "location": "path", 40776 // "pattern": "^[^/]+$", 40777 // "required": true, 40778 // "type": "string" 40779 // } 40780 // }, 40781 // "path": "v1/partners/{+partnerId}", 40782 // "response": { 40783 // "$ref": "Partner" 40784 // }, 40785 // "scopes": [ 40786 // "https://www.googleapis.com/auth/display-video" 40787 // ] 40788 // } 40789 40790 } 40791 40792 // method id "displayvideo.partners.list": 40793 40794 type PartnersListCall struct { 40795 s *Service 40796 urlParams_ gensupport.URLParams 40797 ifNoneMatch_ string 40798 ctx_ context.Context 40799 header_ http.Header 40800 } 40801 40802 // List: Lists partners that are accessible to the current user. The 40803 // order is defined by the order_by parameter. 40804 func (r *PartnersService) List() *PartnersListCall { 40805 c := &PartnersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 40806 return c 40807 } 40808 40809 // Filter sets the optional parameter "filter": Allows filtering by 40810 // partner fields. Supported syntax: * Filter expressions are made up of 40811 // one or more restrictions. * Restrictions can be combined by `AND` or 40812 // `OR` logical operators. A sequence of restrictions implicitly uses 40813 // `AND`. * A restriction has the form of `{field} {operator} {value}`. 40814 // * All fields must use the `EQUALS (=)` operator. Supported fields: * 40815 // `entityStatus` Examples: * All active partners: 40816 // `entityStatus="ENTITY_STATUS_ACTIVE" The length of this field should 40817 // be no more than 500 characters. Reference our filter `LIST` requests 40818 // (/display-video/api/guides/how-tos/filters) guide for more 40819 // information. 40820 func (c *PartnersListCall) Filter(filter string) *PartnersListCall { 40821 c.urlParams_.Set("filter", filter) 40822 return c 40823 } 40824 40825 // OrderBy sets the optional parameter "orderBy": Field by which to sort 40826 // the list. Acceptable values are: * `displayName` The default sorting 40827 // order is ascending. To specify descending order for a field, a suffix 40828 // "desc" should be added to the field name. For example, `displayName 40829 // desc`. 40830 func (c *PartnersListCall) OrderBy(orderBy string) *PartnersListCall { 40831 c.urlParams_.Set("orderBy", orderBy) 40832 return c 40833 } 40834 40835 // PageSize sets the optional parameter "pageSize": Requested page size. 40836 // Must be between `1` and `200`. If unspecified will default to `100`. 40837 func (c *PartnersListCall) PageSize(pageSize int64) *PartnersListCall { 40838 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 40839 return c 40840 } 40841 40842 // PageToken sets the optional parameter "pageToken": A token 40843 // identifying a page of results the server should return. Typically, 40844 // this is the value of next_page_token returned from the previous call 40845 // to `ListPartners` method. If not specified, the first page of results 40846 // will be returned. 40847 func (c *PartnersListCall) PageToken(pageToken string) *PartnersListCall { 40848 c.urlParams_.Set("pageToken", pageToken) 40849 return c 40850 } 40851 40852 // Fields allows partial responses to be retrieved. See 40853 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 40854 // for more information. 40855 func (c *PartnersListCall) Fields(s ...googleapi.Field) *PartnersListCall { 40856 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 40857 return c 40858 } 40859 40860 // IfNoneMatch sets the optional parameter which makes the operation 40861 // fail if the object's ETag matches the given value. This is useful for 40862 // getting updates only after the object has changed since the last 40863 // request. Use googleapi.IsNotModified to check whether the response 40864 // error from Do is the result of In-None-Match. 40865 func (c *PartnersListCall) IfNoneMatch(entityTag string) *PartnersListCall { 40866 c.ifNoneMatch_ = entityTag 40867 return c 40868 } 40869 40870 // Context sets the context to be used in this call's Do method. Any 40871 // pending HTTP request will be aborted if the provided context is 40872 // canceled. 40873 func (c *PartnersListCall) Context(ctx context.Context) *PartnersListCall { 40874 c.ctx_ = ctx 40875 return c 40876 } 40877 40878 // Header returns an http.Header that can be modified by the caller to 40879 // add HTTP headers to the request. 40880 func (c *PartnersListCall) Header() http.Header { 40881 if c.header_ == nil { 40882 c.header_ = make(http.Header) 40883 } 40884 return c.header_ 40885 } 40886 40887 func (c *PartnersListCall) doRequest(alt string) (*http.Response, error) { 40888 reqHeaders := make(http.Header) 40889 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 40890 for k, v := range c.header_ { 40891 reqHeaders[k] = v 40892 } 40893 reqHeaders.Set("User-Agent", c.s.userAgent()) 40894 if c.ifNoneMatch_ != "" { 40895 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 40896 } 40897 var body io.Reader = nil 40898 c.urlParams_.Set("alt", alt) 40899 c.urlParams_.Set("prettyPrint", "false") 40900 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners") 40901 urls += "?" + c.urlParams_.Encode() 40902 req, err := http.NewRequest("GET", urls, body) 40903 if err != nil { 40904 return nil, err 40905 } 40906 req.Header = reqHeaders 40907 return gensupport.SendRequest(c.ctx_, c.s.client, req) 40908 } 40909 40910 // Do executes the "displayvideo.partners.list" call. 40911 // Exactly one of *ListPartnersResponse or error will be non-nil. Any 40912 // non-2xx status code is an error. Response headers are in either 40913 // *ListPartnersResponse.ServerResponse.Header or (if a response was 40914 // returned at all) in error.(*googleapi.Error).Header. Use 40915 // googleapi.IsNotModified to check whether the returned error was 40916 // because http.StatusNotModified was returned. 40917 func (c *PartnersListCall) Do(opts ...googleapi.CallOption) (*ListPartnersResponse, error) { 40918 gensupport.SetOptions(c.urlParams_, opts...) 40919 res, err := c.doRequest("json") 40920 if res != nil && res.StatusCode == http.StatusNotModified { 40921 if res.Body != nil { 40922 res.Body.Close() 40923 } 40924 return nil, gensupport.WrapError(&googleapi.Error{ 40925 Code: res.StatusCode, 40926 Header: res.Header, 40927 }) 40928 } 40929 if err != nil { 40930 return nil, err 40931 } 40932 defer googleapi.CloseBody(res) 40933 if err := googleapi.CheckResponse(res); err != nil { 40934 return nil, gensupport.WrapError(err) 40935 } 40936 ret := &ListPartnersResponse{ 40937 ServerResponse: googleapi.ServerResponse{ 40938 Header: res.Header, 40939 HTTPStatusCode: res.StatusCode, 40940 }, 40941 } 40942 target := &ret 40943 if err := gensupport.DecodeResponse(target, res); err != nil { 40944 return nil, err 40945 } 40946 return ret, nil 40947 // { 40948 // "description": "Lists partners that are accessible to the current user. The order is defined by the order_by parameter.", 40949 // "flatPath": "v1/partners", 40950 // "httpMethod": "GET", 40951 // "id": "displayvideo.partners.list", 40952 // "parameterOrder": [], 40953 // "parameters": { 40954 // "filter": { 40955 // "description": "Allows filtering by partner fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `AND` or `OR` logical operators. A sequence of restrictions implicitly uses `AND`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `entityStatus` Examples: * All active partners: `entityStatus=\"ENTITY_STATUS_ACTIVE\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 40956 // "location": "query", 40957 // "type": "string" 40958 // }, 40959 // "orderBy": { 40960 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 40961 // "location": "query", 40962 // "type": "string" 40963 // }, 40964 // "pageSize": { 40965 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 40966 // "format": "int32", 40967 // "location": "query", 40968 // "type": "integer" 40969 // }, 40970 // "pageToken": { 40971 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListPartners` method. If not specified, the first page of results will be returned.", 40972 // "location": "query", 40973 // "type": "string" 40974 // } 40975 // }, 40976 // "path": "v1/partners", 40977 // "response": { 40978 // "$ref": "ListPartnersResponse" 40979 // }, 40980 // "scopes": [ 40981 // "https://www.googleapis.com/auth/display-video" 40982 // ] 40983 // } 40984 40985 } 40986 40987 // Pages invokes f for each page of results. 40988 // A non-nil error returned from f will halt the iteration. 40989 // The provided context supersedes any context provided to the Context method. 40990 func (c *PartnersListCall) Pages(ctx context.Context, f func(*ListPartnersResponse) error) error { 40991 c.ctx_ = ctx 40992 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 40993 for { 40994 x, err := c.Do() 40995 if err != nil { 40996 return err 40997 } 40998 if err := f(x); err != nil { 40999 return err 41000 } 41001 if x.NextPageToken == "" { 41002 return nil 41003 } 41004 c.PageToken(x.NextPageToken) 41005 } 41006 } 41007 41008 // method id "displayvideo.partners.channels.create": 41009 41010 type PartnersChannelsCreateCall struct { 41011 s *Service 41012 partnerId int64 41013 channel *Channel 41014 urlParams_ gensupport.URLParams 41015 ctx_ context.Context 41016 header_ http.Header 41017 } 41018 41019 // Create: Creates a new channel. Returns the newly created channel if 41020 // successful. 41021 // 41022 // - partnerId: The ID of the partner that owns the created channel. 41023 func (r *PartnersChannelsService) Create(partnerId int64, channel *Channel) *PartnersChannelsCreateCall { 41024 c := &PartnersChannelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 41025 c.partnerId = partnerId 41026 c.channel = channel 41027 return c 41028 } 41029 41030 // AdvertiserId sets the optional parameter "advertiserId": The ID of 41031 // the advertiser that owns the created channel. 41032 func (c *PartnersChannelsCreateCall) AdvertiserId(advertiserId int64) *PartnersChannelsCreateCall { 41033 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 41034 return c 41035 } 41036 41037 // Fields allows partial responses to be retrieved. See 41038 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 41039 // for more information. 41040 func (c *PartnersChannelsCreateCall) Fields(s ...googleapi.Field) *PartnersChannelsCreateCall { 41041 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 41042 return c 41043 } 41044 41045 // Context sets the context to be used in this call's Do method. Any 41046 // pending HTTP request will be aborted if the provided context is 41047 // canceled. 41048 func (c *PartnersChannelsCreateCall) Context(ctx context.Context) *PartnersChannelsCreateCall { 41049 c.ctx_ = ctx 41050 return c 41051 } 41052 41053 // Header returns an http.Header that can be modified by the caller to 41054 // add HTTP headers to the request. 41055 func (c *PartnersChannelsCreateCall) Header() http.Header { 41056 if c.header_ == nil { 41057 c.header_ = make(http.Header) 41058 } 41059 return c.header_ 41060 } 41061 41062 func (c *PartnersChannelsCreateCall) doRequest(alt string) (*http.Response, error) { 41063 reqHeaders := make(http.Header) 41064 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 41065 for k, v := range c.header_ { 41066 reqHeaders[k] = v 41067 } 41068 reqHeaders.Set("User-Agent", c.s.userAgent()) 41069 var body io.Reader = nil 41070 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) 41071 if err != nil { 41072 return nil, err 41073 } 41074 reqHeaders.Set("Content-Type", "application/json") 41075 c.urlParams_.Set("alt", alt) 41076 c.urlParams_.Set("prettyPrint", "false") 41077 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels") 41078 urls += "?" + c.urlParams_.Encode() 41079 req, err := http.NewRequest("POST", urls, body) 41080 if err != nil { 41081 return nil, err 41082 } 41083 req.Header = reqHeaders 41084 googleapi.Expand(req.URL, map[string]string{ 41085 "partnerId": strconv.FormatInt(c.partnerId, 10), 41086 }) 41087 return gensupport.SendRequest(c.ctx_, c.s.client, req) 41088 } 41089 41090 // Do executes the "displayvideo.partners.channels.create" call. 41091 // Exactly one of *Channel or error will be non-nil. Any non-2xx status 41092 // code is an error. Response headers are in either 41093 // *Channel.ServerResponse.Header or (if a response was returned at all) 41094 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 41095 // check whether the returned error was because http.StatusNotModified 41096 // was returned. 41097 func (c *PartnersChannelsCreateCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 41098 gensupport.SetOptions(c.urlParams_, opts...) 41099 res, err := c.doRequest("json") 41100 if res != nil && res.StatusCode == http.StatusNotModified { 41101 if res.Body != nil { 41102 res.Body.Close() 41103 } 41104 return nil, gensupport.WrapError(&googleapi.Error{ 41105 Code: res.StatusCode, 41106 Header: res.Header, 41107 }) 41108 } 41109 if err != nil { 41110 return nil, err 41111 } 41112 defer googleapi.CloseBody(res) 41113 if err := googleapi.CheckResponse(res); err != nil { 41114 return nil, gensupport.WrapError(err) 41115 } 41116 ret := &Channel{ 41117 ServerResponse: googleapi.ServerResponse{ 41118 Header: res.Header, 41119 HTTPStatusCode: res.StatusCode, 41120 }, 41121 } 41122 target := &ret 41123 if err := gensupport.DecodeResponse(target, res); err != nil { 41124 return nil, err 41125 } 41126 return ret, nil 41127 // { 41128 // "description": "Creates a new channel. Returns the newly created channel if successful.", 41129 // "flatPath": "v1/partners/{partnersId}/channels", 41130 // "httpMethod": "POST", 41131 // "id": "displayvideo.partners.channels.create", 41132 // "parameterOrder": [ 41133 // "partnerId" 41134 // ], 41135 // "parameters": { 41136 // "advertiserId": { 41137 // "description": "The ID of the advertiser that owns the created channel.", 41138 // "format": "int64", 41139 // "location": "query", 41140 // "type": "string" 41141 // }, 41142 // "partnerId": { 41143 // "description": "The ID of the partner that owns the created channel.", 41144 // "format": "int64", 41145 // "location": "path", 41146 // "pattern": "^[^/]+$", 41147 // "required": true, 41148 // "type": "string" 41149 // } 41150 // }, 41151 // "path": "v1/partners/{+partnerId}/channels", 41152 // "request": { 41153 // "$ref": "Channel" 41154 // }, 41155 // "response": { 41156 // "$ref": "Channel" 41157 // }, 41158 // "scopes": [ 41159 // "https://www.googleapis.com/auth/display-video" 41160 // ] 41161 // } 41162 41163 } 41164 41165 // method id "displayvideo.partners.channels.get": 41166 41167 type PartnersChannelsGetCall struct { 41168 s *Service 41169 partnerId int64 41170 channelId int64 41171 urlParams_ gensupport.URLParams 41172 ifNoneMatch_ string 41173 ctx_ context.Context 41174 header_ http.Header 41175 } 41176 41177 // Get: Gets a channel for a partner or advertiser. 41178 // 41179 // - channelId: The ID of the channel to fetch. 41180 // - partnerId: The ID of the partner that owns the fetched channel. 41181 func (r *PartnersChannelsService) Get(partnerId int64, channelId int64) *PartnersChannelsGetCall { 41182 c := &PartnersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 41183 c.partnerId = partnerId 41184 c.channelId = channelId 41185 return c 41186 } 41187 41188 // AdvertiserId sets the optional parameter "advertiserId": The ID of 41189 // the advertiser that owns the fetched channel. 41190 func (c *PartnersChannelsGetCall) AdvertiserId(advertiserId int64) *PartnersChannelsGetCall { 41191 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 41192 return c 41193 } 41194 41195 // Fields allows partial responses to be retrieved. See 41196 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 41197 // for more information. 41198 func (c *PartnersChannelsGetCall) Fields(s ...googleapi.Field) *PartnersChannelsGetCall { 41199 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 41200 return c 41201 } 41202 41203 // IfNoneMatch sets the optional parameter which makes the operation 41204 // fail if the object's ETag matches the given value. This is useful for 41205 // getting updates only after the object has changed since the last 41206 // request. Use googleapi.IsNotModified to check whether the response 41207 // error from Do is the result of In-None-Match. 41208 func (c *PartnersChannelsGetCall) IfNoneMatch(entityTag string) *PartnersChannelsGetCall { 41209 c.ifNoneMatch_ = entityTag 41210 return c 41211 } 41212 41213 // Context sets the context to be used in this call's Do method. Any 41214 // pending HTTP request will be aborted if the provided context is 41215 // canceled. 41216 func (c *PartnersChannelsGetCall) Context(ctx context.Context) *PartnersChannelsGetCall { 41217 c.ctx_ = ctx 41218 return c 41219 } 41220 41221 // Header returns an http.Header that can be modified by the caller to 41222 // add HTTP headers to the request. 41223 func (c *PartnersChannelsGetCall) Header() http.Header { 41224 if c.header_ == nil { 41225 c.header_ = make(http.Header) 41226 } 41227 return c.header_ 41228 } 41229 41230 func (c *PartnersChannelsGetCall) doRequest(alt string) (*http.Response, error) { 41231 reqHeaders := make(http.Header) 41232 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 41233 for k, v := range c.header_ { 41234 reqHeaders[k] = v 41235 } 41236 reqHeaders.Set("User-Agent", c.s.userAgent()) 41237 if c.ifNoneMatch_ != "" { 41238 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 41239 } 41240 var body io.Reader = nil 41241 c.urlParams_.Set("alt", alt) 41242 c.urlParams_.Set("prettyPrint", "false") 41243 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels/{+channelId}") 41244 urls += "?" + c.urlParams_.Encode() 41245 req, err := http.NewRequest("GET", urls, body) 41246 if err != nil { 41247 return nil, err 41248 } 41249 req.Header = reqHeaders 41250 googleapi.Expand(req.URL, map[string]string{ 41251 "partnerId": strconv.FormatInt(c.partnerId, 10), 41252 "channelId": strconv.FormatInt(c.channelId, 10), 41253 }) 41254 return gensupport.SendRequest(c.ctx_, c.s.client, req) 41255 } 41256 41257 // Do executes the "displayvideo.partners.channels.get" call. 41258 // Exactly one of *Channel or error will be non-nil. Any non-2xx status 41259 // code is an error. Response headers are in either 41260 // *Channel.ServerResponse.Header or (if a response was returned at all) 41261 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 41262 // check whether the returned error was because http.StatusNotModified 41263 // was returned. 41264 func (c *PartnersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 41265 gensupport.SetOptions(c.urlParams_, opts...) 41266 res, err := c.doRequest("json") 41267 if res != nil && res.StatusCode == http.StatusNotModified { 41268 if res.Body != nil { 41269 res.Body.Close() 41270 } 41271 return nil, gensupport.WrapError(&googleapi.Error{ 41272 Code: res.StatusCode, 41273 Header: res.Header, 41274 }) 41275 } 41276 if err != nil { 41277 return nil, err 41278 } 41279 defer googleapi.CloseBody(res) 41280 if err := googleapi.CheckResponse(res); err != nil { 41281 return nil, gensupport.WrapError(err) 41282 } 41283 ret := &Channel{ 41284 ServerResponse: googleapi.ServerResponse{ 41285 Header: res.Header, 41286 HTTPStatusCode: res.StatusCode, 41287 }, 41288 } 41289 target := &ret 41290 if err := gensupport.DecodeResponse(target, res); err != nil { 41291 return nil, err 41292 } 41293 return ret, nil 41294 // { 41295 // "description": "Gets a channel for a partner or advertiser.", 41296 // "flatPath": "v1/partners/{partnersId}/channels/{channelsId}", 41297 // "httpMethod": "GET", 41298 // "id": "displayvideo.partners.channels.get", 41299 // "parameterOrder": [ 41300 // "partnerId", 41301 // "channelId" 41302 // ], 41303 // "parameters": { 41304 // "advertiserId": { 41305 // "description": "The ID of the advertiser that owns the fetched channel.", 41306 // "format": "int64", 41307 // "location": "query", 41308 // "type": "string" 41309 // }, 41310 // "channelId": { 41311 // "description": "Required. The ID of the channel to fetch.", 41312 // "format": "int64", 41313 // "location": "path", 41314 // "pattern": "^[^/]+$", 41315 // "required": true, 41316 // "type": "string" 41317 // }, 41318 // "partnerId": { 41319 // "description": "The ID of the partner that owns the fetched channel.", 41320 // "format": "int64", 41321 // "location": "path", 41322 // "pattern": "^[^/]+$", 41323 // "required": true, 41324 // "type": "string" 41325 // } 41326 // }, 41327 // "path": "v1/partners/{+partnerId}/channels/{+channelId}", 41328 // "response": { 41329 // "$ref": "Channel" 41330 // }, 41331 // "scopes": [ 41332 // "https://www.googleapis.com/auth/display-video" 41333 // ] 41334 // } 41335 41336 } 41337 41338 // method id "displayvideo.partners.channels.list": 41339 41340 type PartnersChannelsListCall struct { 41341 s *Service 41342 partnerId int64 41343 urlParams_ gensupport.URLParams 41344 ifNoneMatch_ string 41345 ctx_ context.Context 41346 header_ http.Header 41347 } 41348 41349 // List: Lists channels for a partner or advertiser. 41350 // 41351 // - partnerId: The ID of the partner that owns the channels. 41352 func (r *PartnersChannelsService) List(partnerId int64) *PartnersChannelsListCall { 41353 c := &PartnersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 41354 c.partnerId = partnerId 41355 return c 41356 } 41357 41358 // AdvertiserId sets the optional parameter "advertiserId": The ID of 41359 // the advertiser that owns the channels. 41360 func (c *PartnersChannelsListCall) AdvertiserId(advertiserId int64) *PartnersChannelsListCall { 41361 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 41362 return c 41363 } 41364 41365 // Filter sets the optional parameter "filter": Allows filtering by 41366 // channel fields. Supported syntax: * Filter expressions for channel 41367 // can only contain at most one restriction. * A restriction has the 41368 // form of `{field} {operator} {value}`. * All fields must use the `HAS 41369 // (:)` operator. Supported fields: * `displayName` Examples: * All 41370 // channels for which the display name contains "google": `displayName : 41371 // "google". The length of this field should be no more than 500 41372 // characters. Reference our filter `LIST` requests 41373 // (/display-video/api/guides/how-tos/filters) guide for more 41374 // information. 41375 func (c *PartnersChannelsListCall) Filter(filter string) *PartnersChannelsListCall { 41376 c.urlParams_.Set("filter", filter) 41377 return c 41378 } 41379 41380 // OrderBy sets the optional parameter "orderBy": Field by which to sort 41381 // the list. Acceptable values are: * `displayName` (default) * 41382 // `channelId` The default sorting order is ascending. To specify 41383 // descending order for a field, a suffix " desc" should be added to the 41384 // field name. Example: `displayName desc`. 41385 func (c *PartnersChannelsListCall) OrderBy(orderBy string) *PartnersChannelsListCall { 41386 c.urlParams_.Set("orderBy", orderBy) 41387 return c 41388 } 41389 41390 // PageSize sets the optional parameter "pageSize": Requested page size. 41391 // Must be between `1` and `200`. If unspecified will default to `100`. 41392 // Returns error code `INVALID_ARGUMENT` if an invalid value is 41393 // specified. 41394 func (c *PartnersChannelsListCall) PageSize(pageSize int64) *PartnersChannelsListCall { 41395 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 41396 return c 41397 } 41398 41399 // PageToken sets the optional parameter "pageToken": A token 41400 // identifying a page of results the server should return. Typically, 41401 // this is the value of next_page_token returned from the previous call 41402 // to `ListChannels` method. If not specified, the first page of results 41403 // will be returned. 41404 func (c *PartnersChannelsListCall) PageToken(pageToken string) *PartnersChannelsListCall { 41405 c.urlParams_.Set("pageToken", pageToken) 41406 return c 41407 } 41408 41409 // Fields allows partial responses to be retrieved. See 41410 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 41411 // for more information. 41412 func (c *PartnersChannelsListCall) Fields(s ...googleapi.Field) *PartnersChannelsListCall { 41413 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 41414 return c 41415 } 41416 41417 // IfNoneMatch sets the optional parameter which makes the operation 41418 // fail if the object's ETag matches the given value. This is useful for 41419 // getting updates only after the object has changed since the last 41420 // request. Use googleapi.IsNotModified to check whether the response 41421 // error from Do is the result of In-None-Match. 41422 func (c *PartnersChannelsListCall) IfNoneMatch(entityTag string) *PartnersChannelsListCall { 41423 c.ifNoneMatch_ = entityTag 41424 return c 41425 } 41426 41427 // Context sets the context to be used in this call's Do method. Any 41428 // pending HTTP request will be aborted if the provided context is 41429 // canceled. 41430 func (c *PartnersChannelsListCall) Context(ctx context.Context) *PartnersChannelsListCall { 41431 c.ctx_ = ctx 41432 return c 41433 } 41434 41435 // Header returns an http.Header that can be modified by the caller to 41436 // add HTTP headers to the request. 41437 func (c *PartnersChannelsListCall) Header() http.Header { 41438 if c.header_ == nil { 41439 c.header_ = make(http.Header) 41440 } 41441 return c.header_ 41442 } 41443 41444 func (c *PartnersChannelsListCall) doRequest(alt string) (*http.Response, error) { 41445 reqHeaders := make(http.Header) 41446 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 41447 for k, v := range c.header_ { 41448 reqHeaders[k] = v 41449 } 41450 reqHeaders.Set("User-Agent", c.s.userAgent()) 41451 if c.ifNoneMatch_ != "" { 41452 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 41453 } 41454 var body io.Reader = nil 41455 c.urlParams_.Set("alt", alt) 41456 c.urlParams_.Set("prettyPrint", "false") 41457 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels") 41458 urls += "?" + c.urlParams_.Encode() 41459 req, err := http.NewRequest("GET", urls, body) 41460 if err != nil { 41461 return nil, err 41462 } 41463 req.Header = reqHeaders 41464 googleapi.Expand(req.URL, map[string]string{ 41465 "partnerId": strconv.FormatInt(c.partnerId, 10), 41466 }) 41467 return gensupport.SendRequest(c.ctx_, c.s.client, req) 41468 } 41469 41470 // Do executes the "displayvideo.partners.channels.list" call. 41471 // Exactly one of *ListChannelsResponse or error will be non-nil. Any 41472 // non-2xx status code is an error. Response headers are in either 41473 // *ListChannelsResponse.ServerResponse.Header or (if a response was 41474 // returned at all) in error.(*googleapi.Error).Header. Use 41475 // googleapi.IsNotModified to check whether the returned error was 41476 // because http.StatusNotModified was returned. 41477 func (c *PartnersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { 41478 gensupport.SetOptions(c.urlParams_, opts...) 41479 res, err := c.doRequest("json") 41480 if res != nil && res.StatusCode == http.StatusNotModified { 41481 if res.Body != nil { 41482 res.Body.Close() 41483 } 41484 return nil, gensupport.WrapError(&googleapi.Error{ 41485 Code: res.StatusCode, 41486 Header: res.Header, 41487 }) 41488 } 41489 if err != nil { 41490 return nil, err 41491 } 41492 defer googleapi.CloseBody(res) 41493 if err := googleapi.CheckResponse(res); err != nil { 41494 return nil, gensupport.WrapError(err) 41495 } 41496 ret := &ListChannelsResponse{ 41497 ServerResponse: googleapi.ServerResponse{ 41498 Header: res.Header, 41499 HTTPStatusCode: res.StatusCode, 41500 }, 41501 } 41502 target := &ret 41503 if err := gensupport.DecodeResponse(target, res); err != nil { 41504 return nil, err 41505 } 41506 return ret, nil 41507 // { 41508 // "description": "Lists channels for a partner or advertiser.", 41509 // "flatPath": "v1/partners/{partnersId}/channels", 41510 // "httpMethod": "GET", 41511 // "id": "displayvideo.partners.channels.list", 41512 // "parameterOrder": [ 41513 // "partnerId" 41514 // ], 41515 // "parameters": { 41516 // "advertiserId": { 41517 // "description": "The ID of the advertiser that owns the channels.", 41518 // "format": "int64", 41519 // "location": "query", 41520 // "type": "string" 41521 // }, 41522 // "filter": { 41523 // "description": "Allows filtering by channel fields. Supported syntax: * Filter expressions for channel can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `displayName` Examples: * All channels for which the display name contains \"google\": `displayName : \"google\"`. The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 41524 // "location": "query", 41525 // "type": "string" 41526 // }, 41527 // "orderBy": { 41528 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) * `channelId` The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `displayName desc`.", 41529 // "location": "query", 41530 // "type": "string" 41531 // }, 41532 // "pageSize": { 41533 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 41534 // "format": "int32", 41535 // "location": "query", 41536 // "type": "integer" 41537 // }, 41538 // "pageToken": { 41539 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListChannels` method. If not specified, the first page of results will be returned.", 41540 // "location": "query", 41541 // "type": "string" 41542 // }, 41543 // "partnerId": { 41544 // "description": "The ID of the partner that owns the channels.", 41545 // "format": "int64", 41546 // "location": "path", 41547 // "pattern": "^[^/]+$", 41548 // "required": true, 41549 // "type": "string" 41550 // } 41551 // }, 41552 // "path": "v1/partners/{+partnerId}/channels", 41553 // "response": { 41554 // "$ref": "ListChannelsResponse" 41555 // }, 41556 // "scopes": [ 41557 // "https://www.googleapis.com/auth/display-video" 41558 // ] 41559 // } 41560 41561 } 41562 41563 // Pages invokes f for each page of results. 41564 // A non-nil error returned from f will halt the iteration. 41565 // The provided context supersedes any context provided to the Context method. 41566 func (c *PartnersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error { 41567 c.ctx_ = ctx 41568 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 41569 for { 41570 x, err := c.Do() 41571 if err != nil { 41572 return err 41573 } 41574 if err := f(x); err != nil { 41575 return err 41576 } 41577 if x.NextPageToken == "" { 41578 return nil 41579 } 41580 c.PageToken(x.NextPageToken) 41581 } 41582 } 41583 41584 // method id "displayvideo.partners.channels.patch": 41585 41586 type PartnersChannelsPatchCall struct { 41587 s *Service 41588 partnerId int64 41589 channelId int64 41590 channel *Channel 41591 urlParams_ gensupport.URLParams 41592 ctx_ context.Context 41593 header_ http.Header 41594 } 41595 41596 // Patch: Updates a channel. Returns the updated channel if successful. 41597 // 41598 // - channelId: Output only. The unique ID of the channel. Assigned by 41599 // the system. 41600 // - partnerId: The ID of the partner that owns the created channel. 41601 func (r *PartnersChannelsService) Patch(partnerId int64, channelId int64, channel *Channel) *PartnersChannelsPatchCall { 41602 c := &PartnersChannelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 41603 c.partnerId = partnerId 41604 c.channelId = channelId 41605 c.channel = channel 41606 return c 41607 } 41608 41609 // AdvertiserId sets the optional parameter "advertiserId": The ID of 41610 // the advertiser that owns the created channel. 41611 func (c *PartnersChannelsPatchCall) AdvertiserId(advertiserId int64) *PartnersChannelsPatchCall { 41612 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 41613 return c 41614 } 41615 41616 // UpdateMask sets the optional parameter "updateMask": Required. The 41617 // mask to control which fields to update. 41618 func (c *PartnersChannelsPatchCall) UpdateMask(updateMask string) *PartnersChannelsPatchCall { 41619 c.urlParams_.Set("updateMask", updateMask) 41620 return c 41621 } 41622 41623 // Fields allows partial responses to be retrieved. See 41624 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 41625 // for more information. 41626 func (c *PartnersChannelsPatchCall) Fields(s ...googleapi.Field) *PartnersChannelsPatchCall { 41627 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 41628 return c 41629 } 41630 41631 // Context sets the context to be used in this call's Do method. Any 41632 // pending HTTP request will be aborted if the provided context is 41633 // canceled. 41634 func (c *PartnersChannelsPatchCall) Context(ctx context.Context) *PartnersChannelsPatchCall { 41635 c.ctx_ = ctx 41636 return c 41637 } 41638 41639 // Header returns an http.Header that can be modified by the caller to 41640 // add HTTP headers to the request. 41641 func (c *PartnersChannelsPatchCall) Header() http.Header { 41642 if c.header_ == nil { 41643 c.header_ = make(http.Header) 41644 } 41645 return c.header_ 41646 } 41647 41648 func (c *PartnersChannelsPatchCall) doRequest(alt string) (*http.Response, error) { 41649 reqHeaders := make(http.Header) 41650 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 41651 for k, v := range c.header_ { 41652 reqHeaders[k] = v 41653 } 41654 reqHeaders.Set("User-Agent", c.s.userAgent()) 41655 var body io.Reader = nil 41656 body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel) 41657 if err != nil { 41658 return nil, err 41659 } 41660 reqHeaders.Set("Content-Type", "application/json") 41661 c.urlParams_.Set("alt", alt) 41662 c.urlParams_.Set("prettyPrint", "false") 41663 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels/{channelId}") 41664 urls += "?" + c.urlParams_.Encode() 41665 req, err := http.NewRequest("PATCH", urls, body) 41666 if err != nil { 41667 return nil, err 41668 } 41669 req.Header = reqHeaders 41670 googleapi.Expand(req.URL, map[string]string{ 41671 "partnerId": strconv.FormatInt(c.partnerId, 10), 41672 "channelId": strconv.FormatInt(c.channelId, 10), 41673 }) 41674 return gensupport.SendRequest(c.ctx_, c.s.client, req) 41675 } 41676 41677 // Do executes the "displayvideo.partners.channels.patch" call. 41678 // Exactly one of *Channel or error will be non-nil. Any non-2xx status 41679 // code is an error. Response headers are in either 41680 // *Channel.ServerResponse.Header or (if a response was returned at all) 41681 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 41682 // check whether the returned error was because http.StatusNotModified 41683 // was returned. 41684 func (c *PartnersChannelsPatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 41685 gensupport.SetOptions(c.urlParams_, opts...) 41686 res, err := c.doRequest("json") 41687 if res != nil && res.StatusCode == http.StatusNotModified { 41688 if res.Body != nil { 41689 res.Body.Close() 41690 } 41691 return nil, gensupport.WrapError(&googleapi.Error{ 41692 Code: res.StatusCode, 41693 Header: res.Header, 41694 }) 41695 } 41696 if err != nil { 41697 return nil, err 41698 } 41699 defer googleapi.CloseBody(res) 41700 if err := googleapi.CheckResponse(res); err != nil { 41701 return nil, gensupport.WrapError(err) 41702 } 41703 ret := &Channel{ 41704 ServerResponse: googleapi.ServerResponse{ 41705 Header: res.Header, 41706 HTTPStatusCode: res.StatusCode, 41707 }, 41708 } 41709 target := &ret 41710 if err := gensupport.DecodeResponse(target, res); err != nil { 41711 return nil, err 41712 } 41713 return ret, nil 41714 // { 41715 // "description": "Updates a channel. Returns the updated channel if successful.", 41716 // "flatPath": "v1/partners/{partnersId}/channels/{channelId}", 41717 // "httpMethod": "PATCH", 41718 // "id": "displayvideo.partners.channels.patch", 41719 // "parameterOrder": [ 41720 // "partnerId", 41721 // "channelId" 41722 // ], 41723 // "parameters": { 41724 // "advertiserId": { 41725 // "description": "The ID of the advertiser that owns the created channel.", 41726 // "format": "int64", 41727 // "location": "query", 41728 // "type": "string" 41729 // }, 41730 // "channelId": { 41731 // "description": "Output only. The unique ID of the channel. Assigned by the system.", 41732 // "format": "int64", 41733 // "location": "path", 41734 // "required": true, 41735 // "type": "string" 41736 // }, 41737 // "partnerId": { 41738 // "description": "The ID of the partner that owns the created channel.", 41739 // "format": "int64", 41740 // "location": "path", 41741 // "pattern": "^[^/]+$", 41742 // "required": true, 41743 // "type": "string" 41744 // }, 41745 // "updateMask": { 41746 // "description": "Required. The mask to control which fields to update.", 41747 // "format": "google-fieldmask", 41748 // "location": "query", 41749 // "type": "string" 41750 // } 41751 // }, 41752 // "path": "v1/partners/{+partnerId}/channels/{channelId}", 41753 // "request": { 41754 // "$ref": "Channel" 41755 // }, 41756 // "response": { 41757 // "$ref": "Channel" 41758 // }, 41759 // "scopes": [ 41760 // "https://www.googleapis.com/auth/display-video" 41761 // ] 41762 // } 41763 41764 } 41765 41766 // method id "displayvideo.partners.channels.sites.bulkEdit": 41767 41768 type PartnersChannelsSitesBulkEditCall struct { 41769 s *Service 41770 partnerId int64 41771 channelId int64 41772 bulkeditsitesrequest *BulkEditSitesRequest 41773 urlParams_ gensupport.URLParams 41774 ctx_ context.Context 41775 header_ http.Header 41776 } 41777 41778 // BulkEdit: Bulk edits sites under a single channel. The operation will 41779 // delete the sites provided in BulkEditSitesRequest.deleted_sites and 41780 // then create the sites provided in BulkEditSitesRequest.created_sites. 41781 // 41782 // - channelId: The ID of the parent channel to which the sites belong. 41783 // - partnerId: The ID of the partner that owns the parent channel. 41784 func (r *PartnersChannelsSitesService) BulkEdit(partnerId int64, channelId int64, bulkeditsitesrequest *BulkEditSitesRequest) *PartnersChannelsSitesBulkEditCall { 41785 c := &PartnersChannelsSitesBulkEditCall{s: r.s, urlParams_: make(gensupport.URLParams)} 41786 c.partnerId = partnerId 41787 c.channelId = channelId 41788 c.bulkeditsitesrequest = bulkeditsitesrequest 41789 return c 41790 } 41791 41792 // Fields allows partial responses to be retrieved. See 41793 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 41794 // for more information. 41795 func (c *PartnersChannelsSitesBulkEditCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesBulkEditCall { 41796 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 41797 return c 41798 } 41799 41800 // Context sets the context to be used in this call's Do method. Any 41801 // pending HTTP request will be aborted if the provided context is 41802 // canceled. 41803 func (c *PartnersChannelsSitesBulkEditCall) Context(ctx context.Context) *PartnersChannelsSitesBulkEditCall { 41804 c.ctx_ = ctx 41805 return c 41806 } 41807 41808 // Header returns an http.Header that can be modified by the caller to 41809 // add HTTP headers to the request. 41810 func (c *PartnersChannelsSitesBulkEditCall) Header() http.Header { 41811 if c.header_ == nil { 41812 c.header_ = make(http.Header) 41813 } 41814 return c.header_ 41815 } 41816 41817 func (c *PartnersChannelsSitesBulkEditCall) doRequest(alt string) (*http.Response, error) { 41818 reqHeaders := make(http.Header) 41819 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 41820 for k, v := range c.header_ { 41821 reqHeaders[k] = v 41822 } 41823 reqHeaders.Set("User-Agent", c.s.userAgent()) 41824 var body io.Reader = nil 41825 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditsitesrequest) 41826 if err != nil { 41827 return nil, err 41828 } 41829 reqHeaders.Set("Content-Type", "application/json") 41830 c.urlParams_.Set("alt", alt) 41831 c.urlParams_.Set("prettyPrint", "false") 41832 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{partnerId}/channels/{+channelId}/sites:bulkEdit") 41833 urls += "?" + c.urlParams_.Encode() 41834 req, err := http.NewRequest("POST", urls, body) 41835 if err != nil { 41836 return nil, err 41837 } 41838 req.Header = reqHeaders 41839 googleapi.Expand(req.URL, map[string]string{ 41840 "partnerId": strconv.FormatInt(c.partnerId, 10), 41841 "channelId": strconv.FormatInt(c.channelId, 10), 41842 }) 41843 return gensupport.SendRequest(c.ctx_, c.s.client, req) 41844 } 41845 41846 // Do executes the "displayvideo.partners.channels.sites.bulkEdit" call. 41847 // Exactly one of *BulkEditSitesResponse or error will be non-nil. Any 41848 // non-2xx status code is an error. Response headers are in either 41849 // *BulkEditSitesResponse.ServerResponse.Header or (if a response was 41850 // returned at all) in error.(*googleapi.Error).Header. Use 41851 // googleapi.IsNotModified to check whether the returned error was 41852 // because http.StatusNotModified was returned. 41853 func (c *PartnersChannelsSitesBulkEditCall) Do(opts ...googleapi.CallOption) (*BulkEditSitesResponse, error) { 41854 gensupport.SetOptions(c.urlParams_, opts...) 41855 res, err := c.doRequest("json") 41856 if res != nil && res.StatusCode == http.StatusNotModified { 41857 if res.Body != nil { 41858 res.Body.Close() 41859 } 41860 return nil, gensupport.WrapError(&googleapi.Error{ 41861 Code: res.StatusCode, 41862 Header: res.Header, 41863 }) 41864 } 41865 if err != nil { 41866 return nil, err 41867 } 41868 defer googleapi.CloseBody(res) 41869 if err := googleapi.CheckResponse(res); err != nil { 41870 return nil, gensupport.WrapError(err) 41871 } 41872 ret := &BulkEditSitesResponse{ 41873 ServerResponse: googleapi.ServerResponse{ 41874 Header: res.Header, 41875 HTTPStatusCode: res.StatusCode, 41876 }, 41877 } 41878 target := &ret 41879 if err := gensupport.DecodeResponse(target, res); err != nil { 41880 return nil, err 41881 } 41882 return ret, nil 41883 // { 41884 // "description": "Bulk edits sites under a single channel. The operation will delete the sites provided in BulkEditSitesRequest.deleted_sites and then create the sites provided in BulkEditSitesRequest.created_sites.", 41885 // "flatPath": "v1/partners/{partnerId}/channels/{channelsId}/sites:bulkEdit", 41886 // "httpMethod": "POST", 41887 // "id": "displayvideo.partners.channels.sites.bulkEdit", 41888 // "parameterOrder": [ 41889 // "partnerId", 41890 // "channelId" 41891 // ], 41892 // "parameters": { 41893 // "channelId": { 41894 // "description": "Required. The ID of the parent channel to which the sites belong.", 41895 // "format": "int64", 41896 // "location": "path", 41897 // "pattern": "^[^/]+$", 41898 // "required": true, 41899 // "type": "string" 41900 // }, 41901 // "partnerId": { 41902 // "description": "The ID of the partner that owns the parent channel.", 41903 // "format": "int64", 41904 // "location": "path", 41905 // "required": true, 41906 // "type": "string" 41907 // } 41908 // }, 41909 // "path": "v1/partners/{partnerId}/channels/{+channelId}/sites:bulkEdit", 41910 // "request": { 41911 // "$ref": "BulkEditSitesRequest" 41912 // }, 41913 // "response": { 41914 // "$ref": "BulkEditSitesResponse" 41915 // }, 41916 // "scopes": [ 41917 // "https://www.googleapis.com/auth/display-video" 41918 // ] 41919 // } 41920 41921 } 41922 41923 // method id "displayvideo.partners.channels.sites.create": 41924 41925 type PartnersChannelsSitesCreateCall struct { 41926 s *Service 41927 partnerId int64 41928 channelId int64 41929 site *Site 41930 urlParams_ gensupport.URLParams 41931 ctx_ context.Context 41932 header_ http.Header 41933 } 41934 41935 // Create: Creates a site in a channel. 41936 // 41937 // - channelId: The ID of the parent channel in which the site will be 41938 // created. 41939 // - partnerId: The ID of the partner that owns the parent channel. 41940 func (r *PartnersChannelsSitesService) Create(partnerId int64, channelId int64, site *Site) *PartnersChannelsSitesCreateCall { 41941 c := &PartnersChannelsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 41942 c.partnerId = partnerId 41943 c.channelId = channelId 41944 c.site = site 41945 return c 41946 } 41947 41948 // AdvertiserId sets the optional parameter "advertiserId": The ID of 41949 // the advertiser that owns the parent channel. 41950 func (c *PartnersChannelsSitesCreateCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesCreateCall { 41951 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 41952 return c 41953 } 41954 41955 // Fields allows partial responses to be retrieved. See 41956 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 41957 // for more information. 41958 func (c *PartnersChannelsSitesCreateCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesCreateCall { 41959 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 41960 return c 41961 } 41962 41963 // Context sets the context to be used in this call's Do method. Any 41964 // pending HTTP request will be aborted if the provided context is 41965 // canceled. 41966 func (c *PartnersChannelsSitesCreateCall) Context(ctx context.Context) *PartnersChannelsSitesCreateCall { 41967 c.ctx_ = ctx 41968 return c 41969 } 41970 41971 // Header returns an http.Header that can be modified by the caller to 41972 // add HTTP headers to the request. 41973 func (c *PartnersChannelsSitesCreateCall) Header() http.Header { 41974 if c.header_ == nil { 41975 c.header_ = make(http.Header) 41976 } 41977 return c.header_ 41978 } 41979 41980 func (c *PartnersChannelsSitesCreateCall) doRequest(alt string) (*http.Response, error) { 41981 reqHeaders := make(http.Header) 41982 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 41983 for k, v := range c.header_ { 41984 reqHeaders[k] = v 41985 } 41986 reqHeaders.Set("User-Agent", c.s.userAgent()) 41987 var body io.Reader = nil 41988 body, err := googleapi.WithoutDataWrapper.JSONReader(c.site) 41989 if err != nil { 41990 return nil, err 41991 } 41992 reqHeaders.Set("Content-Type", "application/json") 41993 c.urlParams_.Set("alt", alt) 41994 c.urlParams_.Set("prettyPrint", "false") 41995 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{partnerId}/channels/{+channelId}/sites") 41996 urls += "?" + c.urlParams_.Encode() 41997 req, err := http.NewRequest("POST", urls, body) 41998 if err != nil { 41999 return nil, err 42000 } 42001 req.Header = reqHeaders 42002 googleapi.Expand(req.URL, map[string]string{ 42003 "partnerId": strconv.FormatInt(c.partnerId, 10), 42004 "channelId": strconv.FormatInt(c.channelId, 10), 42005 }) 42006 return gensupport.SendRequest(c.ctx_, c.s.client, req) 42007 } 42008 42009 // Do executes the "displayvideo.partners.channels.sites.create" call. 42010 // Exactly one of *Site or error will be non-nil. Any non-2xx status 42011 // code is an error. Response headers are in either 42012 // *Site.ServerResponse.Header or (if a response was returned at all) in 42013 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 42014 // whether the returned error was because http.StatusNotModified was 42015 // returned. 42016 func (c *PartnersChannelsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, error) { 42017 gensupport.SetOptions(c.urlParams_, opts...) 42018 res, err := c.doRequest("json") 42019 if res != nil && res.StatusCode == http.StatusNotModified { 42020 if res.Body != nil { 42021 res.Body.Close() 42022 } 42023 return nil, gensupport.WrapError(&googleapi.Error{ 42024 Code: res.StatusCode, 42025 Header: res.Header, 42026 }) 42027 } 42028 if err != nil { 42029 return nil, err 42030 } 42031 defer googleapi.CloseBody(res) 42032 if err := googleapi.CheckResponse(res); err != nil { 42033 return nil, gensupport.WrapError(err) 42034 } 42035 ret := &Site{ 42036 ServerResponse: googleapi.ServerResponse{ 42037 Header: res.Header, 42038 HTTPStatusCode: res.StatusCode, 42039 }, 42040 } 42041 target := &ret 42042 if err := gensupport.DecodeResponse(target, res); err != nil { 42043 return nil, err 42044 } 42045 return ret, nil 42046 // { 42047 // "description": "Creates a site in a channel.", 42048 // "flatPath": "v1/partners/{partnerId}/channels/{channelsId}/sites", 42049 // "httpMethod": "POST", 42050 // "id": "displayvideo.partners.channels.sites.create", 42051 // "parameterOrder": [ 42052 // "partnerId", 42053 // "channelId" 42054 // ], 42055 // "parameters": { 42056 // "advertiserId": { 42057 // "description": "The ID of the advertiser that owns the parent channel.", 42058 // "format": "int64", 42059 // "location": "query", 42060 // "type": "string" 42061 // }, 42062 // "channelId": { 42063 // "description": "Required. The ID of the parent channel in which the site will be created.", 42064 // "format": "int64", 42065 // "location": "path", 42066 // "pattern": "^[^/]+$", 42067 // "required": true, 42068 // "type": "string" 42069 // }, 42070 // "partnerId": { 42071 // "description": "The ID of the partner that owns the parent channel.", 42072 // "format": "int64", 42073 // "location": "path", 42074 // "required": true, 42075 // "type": "string" 42076 // } 42077 // }, 42078 // "path": "v1/partners/{partnerId}/channels/{+channelId}/sites", 42079 // "request": { 42080 // "$ref": "Site" 42081 // }, 42082 // "response": { 42083 // "$ref": "Site" 42084 // }, 42085 // "scopes": [ 42086 // "https://www.googleapis.com/auth/display-video" 42087 // ] 42088 // } 42089 42090 } 42091 42092 // method id "displayvideo.partners.channels.sites.delete": 42093 42094 type PartnersChannelsSitesDeleteCall struct { 42095 s *Service 42096 partnerId int64 42097 channelId int64 42098 urlOrAppId string 42099 urlParams_ gensupport.URLParams 42100 ctx_ context.Context 42101 header_ http.Header 42102 } 42103 42104 // Delete: Deletes a site from a channel. 42105 // 42106 // - channelId: The ID of the parent channel to which the site belongs. 42107 // - partnerId: The ID of the partner that owns the parent channel. 42108 // - urlOrAppId: The URL or app ID of the site to delete. 42109 func (r *PartnersChannelsSitesService) Delete(partnerId int64, channelId int64, urlOrAppId string) *PartnersChannelsSitesDeleteCall { 42110 c := &PartnersChannelsSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 42111 c.partnerId = partnerId 42112 c.channelId = channelId 42113 c.urlOrAppId = urlOrAppId 42114 return c 42115 } 42116 42117 // AdvertiserId sets the optional parameter "advertiserId": The ID of 42118 // the advertiser that owns the parent channel. 42119 func (c *PartnersChannelsSitesDeleteCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesDeleteCall { 42120 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 42121 return c 42122 } 42123 42124 // Fields allows partial responses to be retrieved. See 42125 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 42126 // for more information. 42127 func (c *PartnersChannelsSitesDeleteCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesDeleteCall { 42128 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 42129 return c 42130 } 42131 42132 // Context sets the context to be used in this call's Do method. Any 42133 // pending HTTP request will be aborted if the provided context is 42134 // canceled. 42135 func (c *PartnersChannelsSitesDeleteCall) Context(ctx context.Context) *PartnersChannelsSitesDeleteCall { 42136 c.ctx_ = ctx 42137 return c 42138 } 42139 42140 // Header returns an http.Header that can be modified by the caller to 42141 // add HTTP headers to the request. 42142 func (c *PartnersChannelsSitesDeleteCall) Header() http.Header { 42143 if c.header_ == nil { 42144 c.header_ = make(http.Header) 42145 } 42146 return c.header_ 42147 } 42148 42149 func (c *PartnersChannelsSitesDeleteCall) doRequest(alt string) (*http.Response, error) { 42150 reqHeaders := make(http.Header) 42151 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 42152 for k, v := range c.header_ { 42153 reqHeaders[k] = v 42154 } 42155 reqHeaders.Set("User-Agent", c.s.userAgent()) 42156 var body io.Reader = nil 42157 c.urlParams_.Set("alt", alt) 42158 c.urlParams_.Set("prettyPrint", "false") 42159 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{partnerId}/channels/{+channelId}/sites/{+urlOrAppId}") 42160 urls += "?" + c.urlParams_.Encode() 42161 req, err := http.NewRequest("DELETE", urls, body) 42162 if err != nil { 42163 return nil, err 42164 } 42165 req.Header = reqHeaders 42166 googleapi.Expand(req.URL, map[string]string{ 42167 "partnerId": strconv.FormatInt(c.partnerId, 10), 42168 "channelId": strconv.FormatInt(c.channelId, 10), 42169 "urlOrAppId": c.urlOrAppId, 42170 }) 42171 return gensupport.SendRequest(c.ctx_, c.s.client, req) 42172 } 42173 42174 // Do executes the "displayvideo.partners.channels.sites.delete" call. 42175 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 42176 // code is an error. Response headers are in either 42177 // *Empty.ServerResponse.Header or (if a response was returned at all) 42178 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 42179 // check whether the returned error was because http.StatusNotModified 42180 // was returned. 42181 func (c *PartnersChannelsSitesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 42182 gensupport.SetOptions(c.urlParams_, opts...) 42183 res, err := c.doRequest("json") 42184 if res != nil && res.StatusCode == http.StatusNotModified { 42185 if res.Body != nil { 42186 res.Body.Close() 42187 } 42188 return nil, gensupport.WrapError(&googleapi.Error{ 42189 Code: res.StatusCode, 42190 Header: res.Header, 42191 }) 42192 } 42193 if err != nil { 42194 return nil, err 42195 } 42196 defer googleapi.CloseBody(res) 42197 if err := googleapi.CheckResponse(res); err != nil { 42198 return nil, gensupport.WrapError(err) 42199 } 42200 ret := &Empty{ 42201 ServerResponse: googleapi.ServerResponse{ 42202 Header: res.Header, 42203 HTTPStatusCode: res.StatusCode, 42204 }, 42205 } 42206 target := &ret 42207 if err := gensupport.DecodeResponse(target, res); err != nil { 42208 return nil, err 42209 } 42210 return ret, nil 42211 // { 42212 // "description": "Deletes a site from a channel.", 42213 // "flatPath": "v1/partners/{partnerId}/channels/{channelsId}/sites/{sitesId}", 42214 // "httpMethod": "DELETE", 42215 // "id": "displayvideo.partners.channels.sites.delete", 42216 // "parameterOrder": [ 42217 // "partnerId", 42218 // "channelId", 42219 // "urlOrAppId" 42220 // ], 42221 // "parameters": { 42222 // "advertiserId": { 42223 // "description": "The ID of the advertiser that owns the parent channel.", 42224 // "format": "int64", 42225 // "location": "query", 42226 // "type": "string" 42227 // }, 42228 // "channelId": { 42229 // "description": "Required. The ID of the parent channel to which the site belongs.", 42230 // "format": "int64", 42231 // "location": "path", 42232 // "pattern": "^[^/]+$", 42233 // "required": true, 42234 // "type": "string" 42235 // }, 42236 // "partnerId": { 42237 // "description": "The ID of the partner that owns the parent channel.", 42238 // "format": "int64", 42239 // "location": "path", 42240 // "required": true, 42241 // "type": "string" 42242 // }, 42243 // "urlOrAppId": { 42244 // "description": "Required. The URL or app ID of the site to delete.", 42245 // "location": "path", 42246 // "pattern": "^[^/]+$", 42247 // "required": true, 42248 // "type": "string" 42249 // } 42250 // }, 42251 // "path": "v1/partners/{partnerId}/channels/{+channelId}/sites/{+urlOrAppId}", 42252 // "response": { 42253 // "$ref": "Empty" 42254 // }, 42255 // "scopes": [ 42256 // "https://www.googleapis.com/auth/display-video" 42257 // ] 42258 // } 42259 42260 } 42261 42262 // method id "displayvideo.partners.channels.sites.list": 42263 42264 type PartnersChannelsSitesListCall struct { 42265 s *Service 42266 partnerId int64 42267 channelId int64 42268 urlParams_ gensupport.URLParams 42269 ifNoneMatch_ string 42270 ctx_ context.Context 42271 header_ http.Header 42272 } 42273 42274 // List: Lists sites in a channel. 42275 // 42276 // - channelId: The ID of the parent channel to which the requested 42277 // sites belong. 42278 // - partnerId: The ID of the partner that owns the parent channel. 42279 func (r *PartnersChannelsSitesService) List(partnerId int64, channelId int64) *PartnersChannelsSitesListCall { 42280 c := &PartnersChannelsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 42281 c.partnerId = partnerId 42282 c.channelId = channelId 42283 return c 42284 } 42285 42286 // AdvertiserId sets the optional parameter "advertiserId": The ID of 42287 // the advertiser that owns the parent channel. 42288 func (c *PartnersChannelsSitesListCall) AdvertiserId(advertiserId int64) *PartnersChannelsSitesListCall { 42289 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 42290 return c 42291 } 42292 42293 // Filter sets the optional parameter "filter": Allows filtering by site 42294 // fields. Supported syntax: * Filter expressions for site retrieval can 42295 // only contain at most one restriction. * A restriction has the form of 42296 // `{field} {operator} {value}`. * All fields must use the `HAS (:)` 42297 // operator. Supported fields: * `urlOrAppId` Examples: * All sites for 42298 // which the URL or app ID contains "google": `urlOrAppId : "google" 42299 // The length of this field should be no more than 500 characters. 42300 // Reference our filter `LIST` requests 42301 // (/display-video/api/guides/how-tos/filters) guide for more 42302 // information. 42303 func (c *PartnersChannelsSitesListCall) Filter(filter string) *PartnersChannelsSitesListCall { 42304 c.urlParams_.Set("filter", filter) 42305 return c 42306 } 42307 42308 // OrderBy sets the optional parameter "orderBy": Field by which to sort 42309 // the list. Acceptable values are: * `urlOrAppId` (default) The default 42310 // sorting order is ascending. To specify descending order for a field, 42311 // a suffix " desc" should be added to the field name. Example: 42312 // `urlOrAppId desc`. 42313 func (c *PartnersChannelsSitesListCall) OrderBy(orderBy string) *PartnersChannelsSitesListCall { 42314 c.urlParams_.Set("orderBy", orderBy) 42315 return c 42316 } 42317 42318 // PageSize sets the optional parameter "pageSize": Requested page size. 42319 // Must be between `1` and `10000`. If unspecified will default to 42320 // `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is 42321 // specified. 42322 func (c *PartnersChannelsSitesListCall) PageSize(pageSize int64) *PartnersChannelsSitesListCall { 42323 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 42324 return c 42325 } 42326 42327 // PageToken sets the optional parameter "pageToken": A token 42328 // identifying a page of results the server should return. Typically, 42329 // this is the value of next_page_token returned from the previous call 42330 // to `ListSites` method. If not specified, the first page of results 42331 // will be returned. 42332 func (c *PartnersChannelsSitesListCall) PageToken(pageToken string) *PartnersChannelsSitesListCall { 42333 c.urlParams_.Set("pageToken", pageToken) 42334 return c 42335 } 42336 42337 // Fields allows partial responses to be retrieved. See 42338 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 42339 // for more information. 42340 func (c *PartnersChannelsSitesListCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesListCall { 42341 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 42342 return c 42343 } 42344 42345 // IfNoneMatch sets the optional parameter which makes the operation 42346 // fail if the object's ETag matches the given value. This is useful for 42347 // getting updates only after the object has changed since the last 42348 // request. Use googleapi.IsNotModified to check whether the response 42349 // error from Do is the result of In-None-Match. 42350 func (c *PartnersChannelsSitesListCall) IfNoneMatch(entityTag string) *PartnersChannelsSitesListCall { 42351 c.ifNoneMatch_ = entityTag 42352 return c 42353 } 42354 42355 // Context sets the context to be used in this call's Do method. Any 42356 // pending HTTP request will be aborted if the provided context is 42357 // canceled. 42358 func (c *PartnersChannelsSitesListCall) Context(ctx context.Context) *PartnersChannelsSitesListCall { 42359 c.ctx_ = ctx 42360 return c 42361 } 42362 42363 // Header returns an http.Header that can be modified by the caller to 42364 // add HTTP headers to the request. 42365 func (c *PartnersChannelsSitesListCall) Header() http.Header { 42366 if c.header_ == nil { 42367 c.header_ = make(http.Header) 42368 } 42369 return c.header_ 42370 } 42371 42372 func (c *PartnersChannelsSitesListCall) doRequest(alt string) (*http.Response, error) { 42373 reqHeaders := make(http.Header) 42374 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 42375 for k, v := range c.header_ { 42376 reqHeaders[k] = v 42377 } 42378 reqHeaders.Set("User-Agent", c.s.userAgent()) 42379 if c.ifNoneMatch_ != "" { 42380 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 42381 } 42382 var body io.Reader = nil 42383 c.urlParams_.Set("alt", alt) 42384 c.urlParams_.Set("prettyPrint", "false") 42385 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels/{+channelId}/sites") 42386 urls += "?" + c.urlParams_.Encode() 42387 req, err := http.NewRequest("GET", urls, body) 42388 if err != nil { 42389 return nil, err 42390 } 42391 req.Header = reqHeaders 42392 googleapi.Expand(req.URL, map[string]string{ 42393 "partnerId": strconv.FormatInt(c.partnerId, 10), 42394 "channelId": strconv.FormatInt(c.channelId, 10), 42395 }) 42396 return gensupport.SendRequest(c.ctx_, c.s.client, req) 42397 } 42398 42399 // Do executes the "displayvideo.partners.channels.sites.list" call. 42400 // Exactly one of *ListSitesResponse or error will be non-nil. Any 42401 // non-2xx status code is an error. Response headers are in either 42402 // *ListSitesResponse.ServerResponse.Header or (if a response was 42403 // returned at all) in error.(*googleapi.Error).Header. Use 42404 // googleapi.IsNotModified to check whether the returned error was 42405 // because http.StatusNotModified was returned. 42406 func (c *PartnersChannelsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, error) { 42407 gensupport.SetOptions(c.urlParams_, opts...) 42408 res, err := c.doRequest("json") 42409 if res != nil && res.StatusCode == http.StatusNotModified { 42410 if res.Body != nil { 42411 res.Body.Close() 42412 } 42413 return nil, gensupport.WrapError(&googleapi.Error{ 42414 Code: res.StatusCode, 42415 Header: res.Header, 42416 }) 42417 } 42418 if err != nil { 42419 return nil, err 42420 } 42421 defer googleapi.CloseBody(res) 42422 if err := googleapi.CheckResponse(res); err != nil { 42423 return nil, gensupport.WrapError(err) 42424 } 42425 ret := &ListSitesResponse{ 42426 ServerResponse: googleapi.ServerResponse{ 42427 Header: res.Header, 42428 HTTPStatusCode: res.StatusCode, 42429 }, 42430 } 42431 target := &ret 42432 if err := gensupport.DecodeResponse(target, res); err != nil { 42433 return nil, err 42434 } 42435 return ret, nil 42436 // { 42437 // "description": "Lists sites in a channel.", 42438 // "flatPath": "v1/partners/{partnersId}/channels/{channelsId}/sites", 42439 // "httpMethod": "GET", 42440 // "id": "displayvideo.partners.channels.sites.list", 42441 // "parameterOrder": [ 42442 // "partnerId", 42443 // "channelId" 42444 // ], 42445 // "parameters": { 42446 // "advertiserId": { 42447 // "description": "The ID of the advertiser that owns the parent channel.", 42448 // "format": "int64", 42449 // "location": "query", 42450 // "type": "string" 42451 // }, 42452 // "channelId": { 42453 // "description": "Required. The ID of the parent channel to which the requested sites belong.", 42454 // "format": "int64", 42455 // "location": "path", 42456 // "pattern": "^[^/]+$", 42457 // "required": true, 42458 // "type": "string" 42459 // }, 42460 // "filter": { 42461 // "description": "Allows filtering by site fields. Supported syntax: * Filter expressions for site retrieval can only contain at most one restriction. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `HAS (:)` operator. Supported fields: * `urlOrAppId` Examples: * All sites for which the URL or app ID contains \"google\": `urlOrAppId : \"google\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 42462 // "location": "query", 42463 // "type": "string" 42464 // }, 42465 // "orderBy": { 42466 // "description": "Field by which to sort the list. Acceptable values are: * `urlOrAppId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be added to the field name. Example: `urlOrAppId desc`.", 42467 // "location": "query", 42468 // "type": "string" 42469 // }, 42470 // "pageSize": { 42471 // "description": "Requested page size. Must be between `1` and `10000`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 42472 // "format": "int32", 42473 // "location": "query", 42474 // "type": "integer" 42475 // }, 42476 // "pageToken": { 42477 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListSites` method. If not specified, the first page of results will be returned.", 42478 // "location": "query", 42479 // "type": "string" 42480 // }, 42481 // "partnerId": { 42482 // "description": "The ID of the partner that owns the parent channel.", 42483 // "format": "int64", 42484 // "location": "path", 42485 // "pattern": "^[^/]+$", 42486 // "required": true, 42487 // "type": "string" 42488 // } 42489 // }, 42490 // "path": "v1/partners/{+partnerId}/channels/{+channelId}/sites", 42491 // "response": { 42492 // "$ref": "ListSitesResponse" 42493 // }, 42494 // "scopes": [ 42495 // "https://www.googleapis.com/auth/display-video" 42496 // ] 42497 // } 42498 42499 } 42500 42501 // Pages invokes f for each page of results. 42502 // A non-nil error returned from f will halt the iteration. 42503 // The provided context supersedes any context provided to the Context method. 42504 func (c *PartnersChannelsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) error) error { 42505 c.ctx_ = ctx 42506 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 42507 for { 42508 x, err := c.Do() 42509 if err != nil { 42510 return err 42511 } 42512 if err := f(x); err != nil { 42513 return err 42514 } 42515 if x.NextPageToken == "" { 42516 return nil 42517 } 42518 c.PageToken(x.NextPageToken) 42519 } 42520 } 42521 42522 // method id "displayvideo.partners.channels.sites.replace": 42523 42524 type PartnersChannelsSitesReplaceCall struct { 42525 s *Service 42526 partnerId int64 42527 channelId int64 42528 replacesitesrequest *ReplaceSitesRequest 42529 urlParams_ gensupport.URLParams 42530 ctx_ context.Context 42531 header_ http.Header 42532 } 42533 42534 // Replace: Replaces all of the sites under a single channel. The 42535 // operation will replace the sites under a channel with the sites 42536 // provided in ReplaceSitesRequest.new_sites. 42537 // 42538 // - channelId: The ID of the parent channel whose sites will be 42539 // replaced. 42540 // - partnerId: The ID of the partner that owns the parent channel. 42541 func (r *PartnersChannelsSitesService) Replace(partnerId int64, channelId int64, replacesitesrequest *ReplaceSitesRequest) *PartnersChannelsSitesReplaceCall { 42542 c := &PartnersChannelsSitesReplaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} 42543 c.partnerId = partnerId 42544 c.channelId = channelId 42545 c.replacesitesrequest = replacesitesrequest 42546 return c 42547 } 42548 42549 // Fields allows partial responses to be retrieved. See 42550 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 42551 // for more information. 42552 func (c *PartnersChannelsSitesReplaceCall) Fields(s ...googleapi.Field) *PartnersChannelsSitesReplaceCall { 42553 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 42554 return c 42555 } 42556 42557 // Context sets the context to be used in this call's Do method. Any 42558 // pending HTTP request will be aborted if the provided context is 42559 // canceled. 42560 func (c *PartnersChannelsSitesReplaceCall) Context(ctx context.Context) *PartnersChannelsSitesReplaceCall { 42561 c.ctx_ = ctx 42562 return c 42563 } 42564 42565 // Header returns an http.Header that can be modified by the caller to 42566 // add HTTP headers to the request. 42567 func (c *PartnersChannelsSitesReplaceCall) Header() http.Header { 42568 if c.header_ == nil { 42569 c.header_ = make(http.Header) 42570 } 42571 return c.header_ 42572 } 42573 42574 func (c *PartnersChannelsSitesReplaceCall) doRequest(alt string) (*http.Response, error) { 42575 reqHeaders := make(http.Header) 42576 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 42577 for k, v := range c.header_ { 42578 reqHeaders[k] = v 42579 } 42580 reqHeaders.Set("User-Agent", c.s.userAgent()) 42581 var body io.Reader = nil 42582 body, err := googleapi.WithoutDataWrapper.JSONReader(c.replacesitesrequest) 42583 if err != nil { 42584 return nil, err 42585 } 42586 reqHeaders.Set("Content-Type", "application/json") 42587 c.urlParams_.Set("alt", alt) 42588 c.urlParams_.Set("prettyPrint", "false") 42589 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{partnerId}/channels/{+channelId}/sites:replace") 42590 urls += "?" + c.urlParams_.Encode() 42591 req, err := http.NewRequest("POST", urls, body) 42592 if err != nil { 42593 return nil, err 42594 } 42595 req.Header = reqHeaders 42596 googleapi.Expand(req.URL, map[string]string{ 42597 "partnerId": strconv.FormatInt(c.partnerId, 10), 42598 "channelId": strconv.FormatInt(c.channelId, 10), 42599 }) 42600 return gensupport.SendRequest(c.ctx_, c.s.client, req) 42601 } 42602 42603 // Do executes the "displayvideo.partners.channels.sites.replace" call. 42604 // Exactly one of *ReplaceSitesResponse or error will be non-nil. Any 42605 // non-2xx status code is an error. Response headers are in either 42606 // *ReplaceSitesResponse.ServerResponse.Header or (if a response was 42607 // returned at all) in error.(*googleapi.Error).Header. Use 42608 // googleapi.IsNotModified to check whether the returned error was 42609 // because http.StatusNotModified was returned. 42610 func (c *PartnersChannelsSitesReplaceCall) Do(opts ...googleapi.CallOption) (*ReplaceSitesResponse, error) { 42611 gensupport.SetOptions(c.urlParams_, opts...) 42612 res, err := c.doRequest("json") 42613 if res != nil && res.StatusCode == http.StatusNotModified { 42614 if res.Body != nil { 42615 res.Body.Close() 42616 } 42617 return nil, gensupport.WrapError(&googleapi.Error{ 42618 Code: res.StatusCode, 42619 Header: res.Header, 42620 }) 42621 } 42622 if err != nil { 42623 return nil, err 42624 } 42625 defer googleapi.CloseBody(res) 42626 if err := googleapi.CheckResponse(res); err != nil { 42627 return nil, gensupport.WrapError(err) 42628 } 42629 ret := &ReplaceSitesResponse{ 42630 ServerResponse: googleapi.ServerResponse{ 42631 Header: res.Header, 42632 HTTPStatusCode: res.StatusCode, 42633 }, 42634 } 42635 target := &ret 42636 if err := gensupport.DecodeResponse(target, res); err != nil { 42637 return nil, err 42638 } 42639 return ret, nil 42640 // { 42641 // "description": "Replaces all of the sites under a single channel. The operation will replace the sites under a channel with the sites provided in ReplaceSitesRequest.new_sites.", 42642 // "flatPath": "v1/partners/{partnerId}/channels/{channelsId}/sites:replace", 42643 // "httpMethod": "POST", 42644 // "id": "displayvideo.partners.channels.sites.replace", 42645 // "parameterOrder": [ 42646 // "partnerId", 42647 // "channelId" 42648 // ], 42649 // "parameters": { 42650 // "channelId": { 42651 // "description": "Required. The ID of the parent channel whose sites will be replaced.", 42652 // "format": "int64", 42653 // "location": "path", 42654 // "pattern": "^[^/]+$", 42655 // "required": true, 42656 // "type": "string" 42657 // }, 42658 // "partnerId": { 42659 // "description": "The ID of the partner that owns the parent channel.", 42660 // "format": "int64", 42661 // "location": "path", 42662 // "required": true, 42663 // "type": "string" 42664 // } 42665 // }, 42666 // "path": "v1/partners/{partnerId}/channels/{+channelId}/sites:replace", 42667 // "request": { 42668 // "$ref": "ReplaceSitesRequest" 42669 // }, 42670 // "response": { 42671 // "$ref": "ReplaceSitesResponse" 42672 // }, 42673 // "scopes": [ 42674 // "https://www.googleapis.com/auth/display-video" 42675 // ] 42676 // } 42677 42678 } 42679 42680 // method id "displayvideo.partners.targetingTypes.assignedTargetingOptions.create": 42681 42682 type PartnersTargetingTypesAssignedTargetingOptionsCreateCall struct { 42683 s *Service 42684 partnerId int64 42685 targetingType string 42686 assignedtargetingoption *AssignedTargetingOption 42687 urlParams_ gensupport.URLParams 42688 ctx_ context.Context 42689 header_ http.Header 42690 } 42691 42692 // Create: Assigns a targeting option to a partner. Returns the assigned 42693 // targeting option if successful. 42694 // 42695 // - partnerId: The ID of the partner. 42696 // - targetingType: Identifies the type of this assigned targeting 42697 // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL`. 42698 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Create(partnerId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall { 42699 c := &PartnersTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 42700 c.partnerId = partnerId 42701 c.targetingType = targetingType 42702 c.assignedtargetingoption = assignedtargetingoption 42703 return c 42704 } 42705 42706 // Fields allows partial responses to be retrieved. See 42707 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 42708 // for more information. 42709 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall { 42710 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 42711 return c 42712 } 42713 42714 // Context sets the context to be used in this call's Do method. Any 42715 // pending HTTP request will be aborted if the provided context is 42716 // canceled. 42717 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsCreateCall { 42718 c.ctx_ = ctx 42719 return c 42720 } 42721 42722 // Header returns an http.Header that can be modified by the caller to 42723 // add HTTP headers to the request. 42724 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { 42725 if c.header_ == nil { 42726 c.header_ = make(http.Header) 42727 } 42728 return c.header_ 42729 } 42730 42731 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { 42732 reqHeaders := make(http.Header) 42733 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 42734 for k, v := range c.header_ { 42735 reqHeaders[k] = v 42736 } 42737 reqHeaders.Set("User-Agent", c.s.userAgent()) 42738 var body io.Reader = nil 42739 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption) 42740 if err != nil { 42741 return nil, err 42742 } 42743 reqHeaders.Set("Content-Type", "application/json") 42744 c.urlParams_.Set("alt", alt) 42745 c.urlParams_.Set("prettyPrint", "false") 42746 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 42747 urls += "?" + c.urlParams_.Encode() 42748 req, err := http.NewRequest("POST", urls, body) 42749 if err != nil { 42750 return nil, err 42751 } 42752 req.Header = reqHeaders 42753 googleapi.Expand(req.URL, map[string]string{ 42754 "partnerId": strconv.FormatInt(c.partnerId, 10), 42755 "targetingType": c.targetingType, 42756 }) 42757 return gensupport.SendRequest(c.ctx_, c.s.client, req) 42758 } 42759 42760 // Do executes the "displayvideo.partners.targetingTypes.assignedTargetingOptions.create" call. 42761 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 42762 // non-2xx status code is an error. Response headers are in either 42763 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 42764 // returned at all) in error.(*googleapi.Error).Header. Use 42765 // googleapi.IsNotModified to check whether the returned error was 42766 // because http.StatusNotModified was returned. 42767 func (c *PartnersTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 42768 gensupport.SetOptions(c.urlParams_, opts...) 42769 res, err := c.doRequest("json") 42770 if res != nil && res.StatusCode == http.StatusNotModified { 42771 if res.Body != nil { 42772 res.Body.Close() 42773 } 42774 return nil, gensupport.WrapError(&googleapi.Error{ 42775 Code: res.StatusCode, 42776 Header: res.Header, 42777 }) 42778 } 42779 if err != nil { 42780 return nil, err 42781 } 42782 defer googleapi.CloseBody(res) 42783 if err := googleapi.CheckResponse(res); err != nil { 42784 return nil, gensupport.WrapError(err) 42785 } 42786 ret := &AssignedTargetingOption{ 42787 ServerResponse: googleapi.ServerResponse{ 42788 Header: res.Header, 42789 HTTPStatusCode: res.StatusCode, 42790 }, 42791 } 42792 target := &ret 42793 if err := gensupport.DecodeResponse(target, res); err != nil { 42794 return nil, err 42795 } 42796 return ret, nil 42797 // { 42798 // "description": "Assigns a targeting option to a partner. Returns the assigned targeting option if successful.", 42799 // "flatPath": "v1/partners/{partnersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 42800 // "httpMethod": "POST", 42801 // "id": "displayvideo.partners.targetingTypes.assignedTargetingOptions.create", 42802 // "parameterOrder": [ 42803 // "partnerId", 42804 // "targetingType" 42805 // ], 42806 // "parameters": { 42807 // "partnerId": { 42808 // "description": "Required. The ID of the partner.", 42809 // "format": "int64", 42810 // "location": "path", 42811 // "pattern": "^[^/]+$", 42812 // "required": true, 42813 // "type": "string" 42814 // }, 42815 // "targetingType": { 42816 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL`", 42817 // "enum": [ 42818 // "TARGETING_TYPE_UNSPECIFIED", 42819 // "TARGETING_TYPE_CHANNEL", 42820 // "TARGETING_TYPE_APP_CATEGORY", 42821 // "TARGETING_TYPE_APP", 42822 // "TARGETING_TYPE_URL", 42823 // "TARGETING_TYPE_DAY_AND_TIME", 42824 // "TARGETING_TYPE_AGE_RANGE", 42825 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 42826 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 42827 // "TARGETING_TYPE_GENDER", 42828 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 42829 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 42830 // "TARGETING_TYPE_PARENTAL_STATUS", 42831 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 42832 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 42833 // "TARGETING_TYPE_DEVICE_TYPE", 42834 // "TARGETING_TYPE_AUDIENCE_GROUP", 42835 // "TARGETING_TYPE_BROWSER", 42836 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 42837 // "TARGETING_TYPE_ON_SCREEN_POSITION", 42838 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 42839 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 42840 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 42841 // "TARGETING_TYPE_ENVIRONMENT", 42842 // "TARGETING_TYPE_CARRIER_AND_ISP", 42843 // "TARGETING_TYPE_OPERATING_SYSTEM", 42844 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 42845 // "TARGETING_TYPE_KEYWORD", 42846 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 42847 // "TARGETING_TYPE_VIEWABILITY", 42848 // "TARGETING_TYPE_CATEGORY", 42849 // "TARGETING_TYPE_INVENTORY_SOURCE", 42850 // "TARGETING_TYPE_LANGUAGE", 42851 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 42852 // "TARGETING_TYPE_GEO_REGION", 42853 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 42854 // "TARGETING_TYPE_EXCHANGE", 42855 // "TARGETING_TYPE_SUB_EXCHANGE", 42856 // "TARGETING_TYPE_POI", 42857 // "TARGETING_TYPE_BUSINESS_CHAIN", 42858 // "TARGETING_TYPE_CONTENT_DURATION", 42859 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 42860 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 42861 // "TARGETING_TYPE_OMID", 42862 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 42863 // "TARGETING_TYPE_CONTENT_GENRE" 42864 // ], 42865 // "enumDescriptions": [ 42866 // "Default value when type is not specified or is unknown in this version.", 42867 // "Target a channel (a custom group of related websites or apps).", 42868 // "Target an app category (for example, education or puzzle games).", 42869 // "Target a specific app (for example, Angry Birds).", 42870 // "Target a specific url (for example, quora.com).", 42871 // "Target ads during a chosen time period on a specific day.", 42872 // "Target ads to a specific age range (for example, 18-24).", 42873 // "Target ads to the specified regions on a regional location list.", 42874 // "Target ads to the specified points of interest on a proximity location list.", 42875 // "Target ads to a specific gender (for example, female or male).", 42876 // "Target a specific video player size for video ads.", 42877 // "Target user rewarded content for video ads.", 42878 // "Target ads to a specific parental status (for example, parent or not a parent).", 42879 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 42880 // "Target ads in a specific content outstream position.", 42881 // "Target ads to a specific device type (for example, tablet or connected TV).", 42882 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 42883 // "Target ads to specific web browsers (for example, Chrome).", 42884 // "Target ads to a specific household income range (for example, top 10%).", 42885 // "Target ads in a specific on screen position.", 42886 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 42887 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 42888 // "Filter website content by sensitive categories (for example, adult).", 42889 // "Target ads to a specific environment (for example, web or app).", 42890 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 42891 // "Target ads to a specific operating system (for example, macOS).", 42892 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 42893 // "Target ads to a specific keyword (for example, dog or retriever).", 42894 // "Target ads to a specific negative keyword list.", 42895 // "Target ads to a specific viewability (for example, 80% viewable).", 42896 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 42897 // "Purchase impressions from specific deals and auction packages.", 42898 // "Target ads to a specific language (for example, English or Japanese).", 42899 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 42900 // "Target ads to a specific regional location (for example, a city or state).", 42901 // "Purchase impressions from a group of deals and auction packages.", 42902 // "Purchase impressions from specific exchanges.", 42903 // "Purchase impressions from specific sub-exchanges.", 42904 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 42905 // "Target ads around locations of a business chain within a specific geo region.", 42906 // "Target ads to a specific video content duration.", 42907 // "Target ads to a specific video content stream type.", 42908 // "Target ads to a specific native content position.", 42909 // "Target ads in an Open Measurement enabled inventory.", 42910 // "Target ads to a specific audio content type.", 42911 // "Target ads to a specific content genre." 42912 // ], 42913 // "location": "path", 42914 // "pattern": "^[^/]+$", 42915 // "required": true, 42916 // "type": "string" 42917 // } 42918 // }, 42919 // "path": "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 42920 // "request": { 42921 // "$ref": "AssignedTargetingOption" 42922 // }, 42923 // "response": { 42924 // "$ref": "AssignedTargetingOption" 42925 // }, 42926 // "scopes": [ 42927 // "https://www.googleapis.com/auth/display-video" 42928 // ] 42929 // } 42930 42931 } 42932 42933 // method id "displayvideo.partners.targetingTypes.assignedTargetingOptions.delete": 42934 42935 type PartnersTargetingTypesAssignedTargetingOptionsDeleteCall struct { 42936 s *Service 42937 partnerId int64 42938 targetingType string 42939 assignedTargetingOptionId string 42940 urlParams_ gensupport.URLParams 42941 ctx_ context.Context 42942 header_ http.Header 42943 } 42944 42945 // Delete: Deletes an assigned targeting option from a partner. 42946 // 42947 // - assignedTargetingOptionId: The ID of the assigned targeting option 42948 // to delete. 42949 // - partnerId: The ID of the partner. 42950 // - targetingType: Identifies the type of this assigned targeting 42951 // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL`. 42952 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Delete(partnerId int64, targetingType string, assignedTargetingOptionId string) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall { 42953 c := &PartnersTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 42954 c.partnerId = partnerId 42955 c.targetingType = targetingType 42956 c.assignedTargetingOptionId = assignedTargetingOptionId 42957 return c 42958 } 42959 42960 // Fields allows partial responses to be retrieved. See 42961 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 42962 // for more information. 42963 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall { 42964 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 42965 return c 42966 } 42967 42968 // Context sets the context to be used in this call's Do method. Any 42969 // pending HTTP request will be aborted if the provided context is 42970 // canceled. 42971 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall { 42972 c.ctx_ = ctx 42973 return c 42974 } 42975 42976 // Header returns an http.Header that can be modified by the caller to 42977 // add HTTP headers to the request. 42978 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { 42979 if c.header_ == nil { 42980 c.header_ = make(http.Header) 42981 } 42982 return c.header_ 42983 } 42984 42985 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { 42986 reqHeaders := make(http.Header) 42987 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 42988 for k, v := range c.header_ { 42989 reqHeaders[k] = v 42990 } 42991 reqHeaders.Set("User-Agent", c.s.userAgent()) 42992 var body io.Reader = nil 42993 c.urlParams_.Set("alt", alt) 42994 c.urlParams_.Set("prettyPrint", "false") 42995 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 42996 urls += "?" + c.urlParams_.Encode() 42997 req, err := http.NewRequest("DELETE", urls, body) 42998 if err != nil { 42999 return nil, err 43000 } 43001 req.Header = reqHeaders 43002 googleapi.Expand(req.URL, map[string]string{ 43003 "partnerId": strconv.FormatInt(c.partnerId, 10), 43004 "targetingType": c.targetingType, 43005 "assignedTargetingOptionId": c.assignedTargetingOptionId, 43006 }) 43007 return gensupport.SendRequest(c.ctx_, c.s.client, req) 43008 } 43009 43010 // Do executes the "displayvideo.partners.targetingTypes.assignedTargetingOptions.delete" call. 43011 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 43012 // code is an error. Response headers are in either 43013 // *Empty.ServerResponse.Header or (if a response was returned at all) 43014 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 43015 // check whether the returned error was because http.StatusNotModified 43016 // was returned. 43017 func (c *PartnersTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 43018 gensupport.SetOptions(c.urlParams_, opts...) 43019 res, err := c.doRequest("json") 43020 if res != nil && res.StatusCode == http.StatusNotModified { 43021 if res.Body != nil { 43022 res.Body.Close() 43023 } 43024 return nil, gensupport.WrapError(&googleapi.Error{ 43025 Code: res.StatusCode, 43026 Header: res.Header, 43027 }) 43028 } 43029 if err != nil { 43030 return nil, err 43031 } 43032 defer googleapi.CloseBody(res) 43033 if err := googleapi.CheckResponse(res); err != nil { 43034 return nil, gensupport.WrapError(err) 43035 } 43036 ret := &Empty{ 43037 ServerResponse: googleapi.ServerResponse{ 43038 Header: res.Header, 43039 HTTPStatusCode: res.StatusCode, 43040 }, 43041 } 43042 target := &ret 43043 if err := gensupport.DecodeResponse(target, res); err != nil { 43044 return nil, err 43045 } 43046 return ret, nil 43047 // { 43048 // "description": "Deletes an assigned targeting option from a partner.", 43049 // "flatPath": "v1/partners/{partnersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 43050 // "httpMethod": "DELETE", 43051 // "id": "displayvideo.partners.targetingTypes.assignedTargetingOptions.delete", 43052 // "parameterOrder": [ 43053 // "partnerId", 43054 // "targetingType", 43055 // "assignedTargetingOptionId" 43056 // ], 43057 // "parameters": { 43058 // "assignedTargetingOptionId": { 43059 // "description": "Required. The ID of the assigned targeting option to delete.", 43060 // "location": "path", 43061 // "pattern": "^[^/]+$", 43062 // "required": true, 43063 // "type": "string" 43064 // }, 43065 // "partnerId": { 43066 // "description": "Required. The ID of the partner.", 43067 // "format": "int64", 43068 // "location": "path", 43069 // "pattern": "^[^/]+$", 43070 // "required": true, 43071 // "type": "string" 43072 // }, 43073 // "targetingType": { 43074 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL`", 43075 // "enum": [ 43076 // "TARGETING_TYPE_UNSPECIFIED", 43077 // "TARGETING_TYPE_CHANNEL", 43078 // "TARGETING_TYPE_APP_CATEGORY", 43079 // "TARGETING_TYPE_APP", 43080 // "TARGETING_TYPE_URL", 43081 // "TARGETING_TYPE_DAY_AND_TIME", 43082 // "TARGETING_TYPE_AGE_RANGE", 43083 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 43084 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 43085 // "TARGETING_TYPE_GENDER", 43086 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 43087 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 43088 // "TARGETING_TYPE_PARENTAL_STATUS", 43089 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 43090 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 43091 // "TARGETING_TYPE_DEVICE_TYPE", 43092 // "TARGETING_TYPE_AUDIENCE_GROUP", 43093 // "TARGETING_TYPE_BROWSER", 43094 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 43095 // "TARGETING_TYPE_ON_SCREEN_POSITION", 43096 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 43097 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 43098 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 43099 // "TARGETING_TYPE_ENVIRONMENT", 43100 // "TARGETING_TYPE_CARRIER_AND_ISP", 43101 // "TARGETING_TYPE_OPERATING_SYSTEM", 43102 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 43103 // "TARGETING_TYPE_KEYWORD", 43104 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 43105 // "TARGETING_TYPE_VIEWABILITY", 43106 // "TARGETING_TYPE_CATEGORY", 43107 // "TARGETING_TYPE_INVENTORY_SOURCE", 43108 // "TARGETING_TYPE_LANGUAGE", 43109 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 43110 // "TARGETING_TYPE_GEO_REGION", 43111 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 43112 // "TARGETING_TYPE_EXCHANGE", 43113 // "TARGETING_TYPE_SUB_EXCHANGE", 43114 // "TARGETING_TYPE_POI", 43115 // "TARGETING_TYPE_BUSINESS_CHAIN", 43116 // "TARGETING_TYPE_CONTENT_DURATION", 43117 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 43118 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 43119 // "TARGETING_TYPE_OMID", 43120 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 43121 // "TARGETING_TYPE_CONTENT_GENRE" 43122 // ], 43123 // "enumDescriptions": [ 43124 // "Default value when type is not specified or is unknown in this version.", 43125 // "Target a channel (a custom group of related websites or apps).", 43126 // "Target an app category (for example, education or puzzle games).", 43127 // "Target a specific app (for example, Angry Birds).", 43128 // "Target a specific url (for example, quora.com).", 43129 // "Target ads during a chosen time period on a specific day.", 43130 // "Target ads to a specific age range (for example, 18-24).", 43131 // "Target ads to the specified regions on a regional location list.", 43132 // "Target ads to the specified points of interest on a proximity location list.", 43133 // "Target ads to a specific gender (for example, female or male).", 43134 // "Target a specific video player size for video ads.", 43135 // "Target user rewarded content for video ads.", 43136 // "Target ads to a specific parental status (for example, parent or not a parent).", 43137 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 43138 // "Target ads in a specific content outstream position.", 43139 // "Target ads to a specific device type (for example, tablet or connected TV).", 43140 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 43141 // "Target ads to specific web browsers (for example, Chrome).", 43142 // "Target ads to a specific household income range (for example, top 10%).", 43143 // "Target ads in a specific on screen position.", 43144 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 43145 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 43146 // "Filter website content by sensitive categories (for example, adult).", 43147 // "Target ads to a specific environment (for example, web or app).", 43148 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 43149 // "Target ads to a specific operating system (for example, macOS).", 43150 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 43151 // "Target ads to a specific keyword (for example, dog or retriever).", 43152 // "Target ads to a specific negative keyword list.", 43153 // "Target ads to a specific viewability (for example, 80% viewable).", 43154 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 43155 // "Purchase impressions from specific deals and auction packages.", 43156 // "Target ads to a specific language (for example, English or Japanese).", 43157 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 43158 // "Target ads to a specific regional location (for example, a city or state).", 43159 // "Purchase impressions from a group of deals and auction packages.", 43160 // "Purchase impressions from specific exchanges.", 43161 // "Purchase impressions from specific sub-exchanges.", 43162 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 43163 // "Target ads around locations of a business chain within a specific geo region.", 43164 // "Target ads to a specific video content duration.", 43165 // "Target ads to a specific video content stream type.", 43166 // "Target ads to a specific native content position.", 43167 // "Target ads in an Open Measurement enabled inventory.", 43168 // "Target ads to a specific audio content type.", 43169 // "Target ads to a specific content genre." 43170 // ], 43171 // "location": "path", 43172 // "pattern": "^[^/]+$", 43173 // "required": true, 43174 // "type": "string" 43175 // } 43176 // }, 43177 // "path": "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 43178 // "response": { 43179 // "$ref": "Empty" 43180 // }, 43181 // "scopes": [ 43182 // "https://www.googleapis.com/auth/display-video" 43183 // ] 43184 // } 43185 43186 } 43187 43188 // method id "displayvideo.partners.targetingTypes.assignedTargetingOptions.get": 43189 43190 type PartnersTargetingTypesAssignedTargetingOptionsGetCall struct { 43191 s *Service 43192 partnerId int64 43193 targetingType string 43194 assignedTargetingOptionId string 43195 urlParams_ gensupport.URLParams 43196 ifNoneMatch_ string 43197 ctx_ context.Context 43198 header_ http.Header 43199 } 43200 43201 // Get: Gets a single targeting option assigned to a partner. 43202 // 43203 // - assignedTargetingOptionId: An identifier unique to the targeting 43204 // type in this partner that identifies the assigned targeting option 43205 // being requested. 43206 // - partnerId: The ID of the partner. 43207 // - targetingType: Identifies the type of this assigned targeting 43208 // option. Supported targeting types: * `TARGETING_TYPE_CHANNEL`. 43209 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) Get(partnerId int64, targetingType string, assignedTargetingOptionId string) *PartnersTargetingTypesAssignedTargetingOptionsGetCall { 43210 c := &PartnersTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 43211 c.partnerId = partnerId 43212 c.targetingType = targetingType 43213 c.assignedTargetingOptionId = assignedTargetingOptionId 43214 return c 43215 } 43216 43217 // Fields allows partial responses to be retrieved. See 43218 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 43219 // for more information. 43220 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsGetCall { 43221 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 43222 return c 43223 } 43224 43225 // IfNoneMatch sets the optional parameter which makes the operation 43226 // fail if the object's ETag matches the given value. This is useful for 43227 // getting updates only after the object has changed since the last 43228 // request. Use googleapi.IsNotModified to check whether the response 43229 // error from Do is the result of In-None-Match. 43230 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *PartnersTargetingTypesAssignedTargetingOptionsGetCall { 43231 c.ifNoneMatch_ = entityTag 43232 return c 43233 } 43234 43235 // Context sets the context to be used in this call's Do method. Any 43236 // pending HTTP request will be aborted if the provided context is 43237 // canceled. 43238 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsGetCall { 43239 c.ctx_ = ctx 43240 return c 43241 } 43242 43243 // Header returns an http.Header that can be modified by the caller to 43244 // add HTTP headers to the request. 43245 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { 43246 if c.header_ == nil { 43247 c.header_ = make(http.Header) 43248 } 43249 return c.header_ 43250 } 43251 43252 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 43253 reqHeaders := make(http.Header) 43254 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 43255 for k, v := range c.header_ { 43256 reqHeaders[k] = v 43257 } 43258 reqHeaders.Set("User-Agent", c.s.userAgent()) 43259 if c.ifNoneMatch_ != "" { 43260 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 43261 } 43262 var body io.Reader = nil 43263 c.urlParams_.Set("alt", alt) 43264 c.urlParams_.Set("prettyPrint", "false") 43265 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 43266 urls += "?" + c.urlParams_.Encode() 43267 req, err := http.NewRequest("GET", urls, body) 43268 if err != nil { 43269 return nil, err 43270 } 43271 req.Header = reqHeaders 43272 googleapi.Expand(req.URL, map[string]string{ 43273 "partnerId": strconv.FormatInt(c.partnerId, 10), 43274 "targetingType": c.targetingType, 43275 "assignedTargetingOptionId": c.assignedTargetingOptionId, 43276 }) 43277 return gensupport.SendRequest(c.ctx_, c.s.client, req) 43278 } 43279 43280 // Do executes the "displayvideo.partners.targetingTypes.assignedTargetingOptions.get" call. 43281 // Exactly one of *AssignedTargetingOption or error will be non-nil. Any 43282 // non-2xx status code is an error. Response headers are in either 43283 // *AssignedTargetingOption.ServerResponse.Header or (if a response was 43284 // returned at all) in error.(*googleapi.Error).Header. Use 43285 // googleapi.IsNotModified to check whether the returned error was 43286 // because http.StatusNotModified was returned. 43287 func (c *PartnersTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 43288 gensupport.SetOptions(c.urlParams_, opts...) 43289 res, err := c.doRequest("json") 43290 if res != nil && res.StatusCode == http.StatusNotModified { 43291 if res.Body != nil { 43292 res.Body.Close() 43293 } 43294 return nil, gensupport.WrapError(&googleapi.Error{ 43295 Code: res.StatusCode, 43296 Header: res.Header, 43297 }) 43298 } 43299 if err != nil { 43300 return nil, err 43301 } 43302 defer googleapi.CloseBody(res) 43303 if err := googleapi.CheckResponse(res); err != nil { 43304 return nil, gensupport.WrapError(err) 43305 } 43306 ret := &AssignedTargetingOption{ 43307 ServerResponse: googleapi.ServerResponse{ 43308 Header: res.Header, 43309 HTTPStatusCode: res.StatusCode, 43310 }, 43311 } 43312 target := &ret 43313 if err := gensupport.DecodeResponse(target, res); err != nil { 43314 return nil, err 43315 } 43316 return ret, nil 43317 // { 43318 // "description": "Gets a single targeting option assigned to a partner.", 43319 // "flatPath": "v1/partners/{partnersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 43320 // "httpMethod": "GET", 43321 // "id": "displayvideo.partners.targetingTypes.assignedTargetingOptions.get", 43322 // "parameterOrder": [ 43323 // "partnerId", 43324 // "targetingType", 43325 // "assignedTargetingOptionId" 43326 // ], 43327 // "parameters": { 43328 // "assignedTargetingOptionId": { 43329 // "description": "Required. An identifier unique to the targeting type in this partner that identifies the assigned targeting option being requested.", 43330 // "location": "path", 43331 // "pattern": "^[^/]+$", 43332 // "required": true, 43333 // "type": "string" 43334 // }, 43335 // "partnerId": { 43336 // "description": "Required. The ID of the partner.", 43337 // "format": "int64", 43338 // "location": "path", 43339 // "pattern": "^[^/]+$", 43340 // "required": true, 43341 // "type": "string" 43342 // }, 43343 // "targetingType": { 43344 // "description": "Required. Identifies the type of this assigned targeting option. Supported targeting types: * `TARGETING_TYPE_CHANNEL`", 43345 // "enum": [ 43346 // "TARGETING_TYPE_UNSPECIFIED", 43347 // "TARGETING_TYPE_CHANNEL", 43348 // "TARGETING_TYPE_APP_CATEGORY", 43349 // "TARGETING_TYPE_APP", 43350 // "TARGETING_TYPE_URL", 43351 // "TARGETING_TYPE_DAY_AND_TIME", 43352 // "TARGETING_TYPE_AGE_RANGE", 43353 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 43354 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 43355 // "TARGETING_TYPE_GENDER", 43356 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 43357 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 43358 // "TARGETING_TYPE_PARENTAL_STATUS", 43359 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 43360 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 43361 // "TARGETING_TYPE_DEVICE_TYPE", 43362 // "TARGETING_TYPE_AUDIENCE_GROUP", 43363 // "TARGETING_TYPE_BROWSER", 43364 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 43365 // "TARGETING_TYPE_ON_SCREEN_POSITION", 43366 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 43367 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 43368 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 43369 // "TARGETING_TYPE_ENVIRONMENT", 43370 // "TARGETING_TYPE_CARRIER_AND_ISP", 43371 // "TARGETING_TYPE_OPERATING_SYSTEM", 43372 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 43373 // "TARGETING_TYPE_KEYWORD", 43374 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 43375 // "TARGETING_TYPE_VIEWABILITY", 43376 // "TARGETING_TYPE_CATEGORY", 43377 // "TARGETING_TYPE_INVENTORY_SOURCE", 43378 // "TARGETING_TYPE_LANGUAGE", 43379 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 43380 // "TARGETING_TYPE_GEO_REGION", 43381 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 43382 // "TARGETING_TYPE_EXCHANGE", 43383 // "TARGETING_TYPE_SUB_EXCHANGE", 43384 // "TARGETING_TYPE_POI", 43385 // "TARGETING_TYPE_BUSINESS_CHAIN", 43386 // "TARGETING_TYPE_CONTENT_DURATION", 43387 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 43388 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 43389 // "TARGETING_TYPE_OMID", 43390 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 43391 // "TARGETING_TYPE_CONTENT_GENRE" 43392 // ], 43393 // "enumDescriptions": [ 43394 // "Default value when type is not specified or is unknown in this version.", 43395 // "Target a channel (a custom group of related websites or apps).", 43396 // "Target an app category (for example, education or puzzle games).", 43397 // "Target a specific app (for example, Angry Birds).", 43398 // "Target a specific url (for example, quora.com).", 43399 // "Target ads during a chosen time period on a specific day.", 43400 // "Target ads to a specific age range (for example, 18-24).", 43401 // "Target ads to the specified regions on a regional location list.", 43402 // "Target ads to the specified points of interest on a proximity location list.", 43403 // "Target ads to a specific gender (for example, female or male).", 43404 // "Target a specific video player size for video ads.", 43405 // "Target user rewarded content for video ads.", 43406 // "Target ads to a specific parental status (for example, parent or not a parent).", 43407 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 43408 // "Target ads in a specific content outstream position.", 43409 // "Target ads to a specific device type (for example, tablet or connected TV).", 43410 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 43411 // "Target ads to specific web browsers (for example, Chrome).", 43412 // "Target ads to a specific household income range (for example, top 10%).", 43413 // "Target ads in a specific on screen position.", 43414 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 43415 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 43416 // "Filter website content by sensitive categories (for example, adult).", 43417 // "Target ads to a specific environment (for example, web or app).", 43418 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 43419 // "Target ads to a specific operating system (for example, macOS).", 43420 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 43421 // "Target ads to a specific keyword (for example, dog or retriever).", 43422 // "Target ads to a specific negative keyword list.", 43423 // "Target ads to a specific viewability (for example, 80% viewable).", 43424 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 43425 // "Purchase impressions from specific deals and auction packages.", 43426 // "Target ads to a specific language (for example, English or Japanese).", 43427 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 43428 // "Target ads to a specific regional location (for example, a city or state).", 43429 // "Purchase impressions from a group of deals and auction packages.", 43430 // "Purchase impressions from specific exchanges.", 43431 // "Purchase impressions from specific sub-exchanges.", 43432 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 43433 // "Target ads around locations of a business chain within a specific geo region.", 43434 // "Target ads to a specific video content duration.", 43435 // "Target ads to a specific video content stream type.", 43436 // "Target ads to a specific native content position.", 43437 // "Target ads in an Open Measurement enabled inventory.", 43438 // "Target ads to a specific audio content type.", 43439 // "Target ads to a specific content genre." 43440 // ], 43441 // "location": "path", 43442 // "pattern": "^[^/]+$", 43443 // "required": true, 43444 // "type": "string" 43445 // } 43446 // }, 43447 // "path": "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 43448 // "response": { 43449 // "$ref": "AssignedTargetingOption" 43450 // }, 43451 // "scopes": [ 43452 // "https://www.googleapis.com/auth/display-video" 43453 // ] 43454 // } 43455 43456 } 43457 43458 // method id "displayvideo.partners.targetingTypes.assignedTargetingOptions.list": 43459 43460 type PartnersTargetingTypesAssignedTargetingOptionsListCall struct { 43461 s *Service 43462 partnerId int64 43463 targetingType string 43464 urlParams_ gensupport.URLParams 43465 ifNoneMatch_ string 43466 ctx_ context.Context 43467 header_ http.Header 43468 } 43469 43470 // List: Lists the targeting options assigned to a partner. 43471 // 43472 // - partnerId: The ID of the partner. 43473 // - targetingType: Identifies the type of assigned targeting options to 43474 // list. Supported targeting types: * `TARGETING_TYPE_CHANNEL`. 43475 func (r *PartnersTargetingTypesAssignedTargetingOptionsService) List(partnerId int64, targetingType string) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43476 c := &PartnersTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 43477 c.partnerId = partnerId 43478 c.targetingType = targetingType 43479 return c 43480 } 43481 43482 // Filter sets the optional parameter "filter": Allows filtering by 43483 // assigned targeting option fields. Supported syntax: * Filter 43484 // expressions are made up of one or more restrictions. * Restrictions 43485 // can be combined by the logical operator `OR`. * A restriction has the 43486 // form of `{field} {operator} {value}`. * All fields must use the 43487 // `EQUALS (=)` operator. Supported fields: * 43488 // `assignedTargetingOptionId` Examples: * `AssignedTargetingOption` 43489 // resource with ID 123456: `assignedTargetingOptionId="123456" The 43490 // length of this field should be no more than 500 characters. Reference 43491 // our filter `LIST` requests 43492 // (/display-video/api/guides/how-tos/filters) guide for more 43493 // information. 43494 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43495 c.urlParams_.Set("filter", filter) 43496 return c 43497 } 43498 43499 // OrderBy sets the optional parameter "orderBy": Field by which to sort 43500 // the list. Acceptable values are: * `assignedTargetingOptionId` 43501 // (default) The default sorting order is ascending. To specify 43502 // descending order for a field, a suffix "desc" should be added to the 43503 // field name. Example: `assignedTargetingOptionId desc`. 43504 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43505 c.urlParams_.Set("orderBy", orderBy) 43506 return c 43507 } 43508 43509 // PageSize sets the optional parameter "pageSize": Requested page size. 43510 // Must be between `1` and `200`. If unspecified will default to `100`. 43511 // Returns error code `INVALID_ARGUMENT` if an invalid value is 43512 // specified. 43513 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43514 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 43515 return c 43516 } 43517 43518 // PageToken sets the optional parameter "pageToken": A token 43519 // identifying a page of results the server should return. Typically, 43520 // this is the value of next_page_token returned from the previous call 43521 // to `ListPartnerAssignedTargetingOptions` method. If not specified, 43522 // the first page of results will be returned. 43523 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43524 c.urlParams_.Set("pageToken", pageToken) 43525 return c 43526 } 43527 43528 // Fields allows partial responses to be retrieved. See 43529 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 43530 // for more information. 43531 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43532 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 43533 return c 43534 } 43535 43536 // IfNoneMatch sets the optional parameter which makes the operation 43537 // fail if the object's ETag matches the given value. This is useful for 43538 // getting updates only after the object has changed since the last 43539 // request. Use googleapi.IsNotModified to check whether the response 43540 // error from Do is the result of In-None-Match. 43541 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43542 c.ifNoneMatch_ = entityTag 43543 return c 43544 } 43545 43546 // Context sets the context to be used in this call's Do method. Any 43547 // pending HTTP request will be aborted if the provided context is 43548 // canceled. 43549 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *PartnersTargetingTypesAssignedTargetingOptionsListCall { 43550 c.ctx_ = ctx 43551 return c 43552 } 43553 43554 // Header returns an http.Header that can be modified by the caller to 43555 // add HTTP headers to the request. 43556 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { 43557 if c.header_ == nil { 43558 c.header_ = make(http.Header) 43559 } 43560 return c.header_ 43561 } 43562 43563 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 43564 reqHeaders := make(http.Header) 43565 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 43566 for k, v := range c.header_ { 43567 reqHeaders[k] = v 43568 } 43569 reqHeaders.Set("User-Agent", c.s.userAgent()) 43570 if c.ifNoneMatch_ != "" { 43571 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 43572 } 43573 var body io.Reader = nil 43574 c.urlParams_.Set("alt", alt) 43575 c.urlParams_.Set("prettyPrint", "false") 43576 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 43577 urls += "?" + c.urlParams_.Encode() 43578 req, err := http.NewRequest("GET", urls, body) 43579 if err != nil { 43580 return nil, err 43581 } 43582 req.Header = reqHeaders 43583 googleapi.Expand(req.URL, map[string]string{ 43584 "partnerId": strconv.FormatInt(c.partnerId, 10), 43585 "targetingType": c.targetingType, 43586 }) 43587 return gensupport.SendRequest(c.ctx_, c.s.client, req) 43588 } 43589 43590 // Do executes the "displayvideo.partners.targetingTypes.assignedTargetingOptions.list" call. 43591 // Exactly one of *ListPartnerAssignedTargetingOptionsResponse or error 43592 // will be non-nil. Any non-2xx status code is an error. Response 43593 // headers are in either 43594 // *ListPartnerAssignedTargetingOptionsResponse.ServerResponse.Header or 43595 // (if a response was returned at all) in 43596 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 43597 // whether the returned error was because http.StatusNotModified was 43598 // returned. 43599 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListPartnerAssignedTargetingOptionsResponse, error) { 43600 gensupport.SetOptions(c.urlParams_, opts...) 43601 res, err := c.doRequest("json") 43602 if res != nil && res.StatusCode == http.StatusNotModified { 43603 if res.Body != nil { 43604 res.Body.Close() 43605 } 43606 return nil, gensupport.WrapError(&googleapi.Error{ 43607 Code: res.StatusCode, 43608 Header: res.Header, 43609 }) 43610 } 43611 if err != nil { 43612 return nil, err 43613 } 43614 defer googleapi.CloseBody(res) 43615 if err := googleapi.CheckResponse(res); err != nil { 43616 return nil, gensupport.WrapError(err) 43617 } 43618 ret := &ListPartnerAssignedTargetingOptionsResponse{ 43619 ServerResponse: googleapi.ServerResponse{ 43620 Header: res.Header, 43621 HTTPStatusCode: res.StatusCode, 43622 }, 43623 } 43624 target := &ret 43625 if err := gensupport.DecodeResponse(target, res); err != nil { 43626 return nil, err 43627 } 43628 return ret, nil 43629 // { 43630 // "description": "Lists the targeting options assigned to a partner.", 43631 // "flatPath": "v1/partners/{partnersId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 43632 // "httpMethod": "GET", 43633 // "id": "displayvideo.partners.targetingTypes.assignedTargetingOptions.list", 43634 // "parameterOrder": [ 43635 // "partnerId", 43636 // "targetingType" 43637 // ], 43638 // "parameters": { 43639 // "filter": { 43640 // "description": "Allows filtering by assigned targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `OR`. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `assignedTargetingOptionId` Examples: * `AssignedTargetingOption` resource with ID 123456: `assignedTargetingOptionId=\"123456\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 43641 // "location": "query", 43642 // "type": "string" 43643 // }, 43644 // "orderBy": { 43645 // "description": "Field by which to sort the list. Acceptable values are: * `assignedTargetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `assignedTargetingOptionId desc`.", 43646 // "location": "query", 43647 // "type": "string" 43648 // }, 43649 // "pageSize": { 43650 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 43651 // "format": "int32", 43652 // "location": "query", 43653 // "type": "integer" 43654 // }, 43655 // "pageToken": { 43656 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListPartnerAssignedTargetingOptions` method. If not specified, the first page of results will be returned.", 43657 // "location": "query", 43658 // "type": "string" 43659 // }, 43660 // "partnerId": { 43661 // "description": "Required. The ID of the partner.", 43662 // "format": "int64", 43663 // "location": "path", 43664 // "pattern": "^[^/]+$", 43665 // "required": true, 43666 // "type": "string" 43667 // }, 43668 // "targetingType": { 43669 // "description": "Required. Identifies the type of assigned targeting options to list. Supported targeting types: * `TARGETING_TYPE_CHANNEL`", 43670 // "enum": [ 43671 // "TARGETING_TYPE_UNSPECIFIED", 43672 // "TARGETING_TYPE_CHANNEL", 43673 // "TARGETING_TYPE_APP_CATEGORY", 43674 // "TARGETING_TYPE_APP", 43675 // "TARGETING_TYPE_URL", 43676 // "TARGETING_TYPE_DAY_AND_TIME", 43677 // "TARGETING_TYPE_AGE_RANGE", 43678 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 43679 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 43680 // "TARGETING_TYPE_GENDER", 43681 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 43682 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 43683 // "TARGETING_TYPE_PARENTAL_STATUS", 43684 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 43685 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 43686 // "TARGETING_TYPE_DEVICE_TYPE", 43687 // "TARGETING_TYPE_AUDIENCE_GROUP", 43688 // "TARGETING_TYPE_BROWSER", 43689 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 43690 // "TARGETING_TYPE_ON_SCREEN_POSITION", 43691 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 43692 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 43693 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 43694 // "TARGETING_TYPE_ENVIRONMENT", 43695 // "TARGETING_TYPE_CARRIER_AND_ISP", 43696 // "TARGETING_TYPE_OPERATING_SYSTEM", 43697 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 43698 // "TARGETING_TYPE_KEYWORD", 43699 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 43700 // "TARGETING_TYPE_VIEWABILITY", 43701 // "TARGETING_TYPE_CATEGORY", 43702 // "TARGETING_TYPE_INVENTORY_SOURCE", 43703 // "TARGETING_TYPE_LANGUAGE", 43704 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 43705 // "TARGETING_TYPE_GEO_REGION", 43706 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 43707 // "TARGETING_TYPE_EXCHANGE", 43708 // "TARGETING_TYPE_SUB_EXCHANGE", 43709 // "TARGETING_TYPE_POI", 43710 // "TARGETING_TYPE_BUSINESS_CHAIN", 43711 // "TARGETING_TYPE_CONTENT_DURATION", 43712 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 43713 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 43714 // "TARGETING_TYPE_OMID", 43715 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 43716 // "TARGETING_TYPE_CONTENT_GENRE" 43717 // ], 43718 // "enumDescriptions": [ 43719 // "Default value when type is not specified or is unknown in this version.", 43720 // "Target a channel (a custom group of related websites or apps).", 43721 // "Target an app category (for example, education or puzzle games).", 43722 // "Target a specific app (for example, Angry Birds).", 43723 // "Target a specific url (for example, quora.com).", 43724 // "Target ads during a chosen time period on a specific day.", 43725 // "Target ads to a specific age range (for example, 18-24).", 43726 // "Target ads to the specified regions on a regional location list.", 43727 // "Target ads to the specified points of interest on a proximity location list.", 43728 // "Target ads to a specific gender (for example, female or male).", 43729 // "Target a specific video player size for video ads.", 43730 // "Target user rewarded content for video ads.", 43731 // "Target ads to a specific parental status (for example, parent or not a parent).", 43732 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 43733 // "Target ads in a specific content outstream position.", 43734 // "Target ads to a specific device type (for example, tablet or connected TV).", 43735 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 43736 // "Target ads to specific web browsers (for example, Chrome).", 43737 // "Target ads to a specific household income range (for example, top 10%).", 43738 // "Target ads in a specific on screen position.", 43739 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 43740 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 43741 // "Filter website content by sensitive categories (for example, adult).", 43742 // "Target ads to a specific environment (for example, web or app).", 43743 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 43744 // "Target ads to a specific operating system (for example, macOS).", 43745 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 43746 // "Target ads to a specific keyword (for example, dog or retriever).", 43747 // "Target ads to a specific negative keyword list.", 43748 // "Target ads to a specific viewability (for example, 80% viewable).", 43749 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 43750 // "Purchase impressions from specific deals and auction packages.", 43751 // "Target ads to a specific language (for example, English or Japanese).", 43752 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 43753 // "Target ads to a specific regional location (for example, a city or state).", 43754 // "Purchase impressions from a group of deals and auction packages.", 43755 // "Purchase impressions from specific exchanges.", 43756 // "Purchase impressions from specific sub-exchanges.", 43757 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 43758 // "Target ads around locations of a business chain within a specific geo region.", 43759 // "Target ads to a specific video content duration.", 43760 // "Target ads to a specific video content stream type.", 43761 // "Target ads to a specific native content position.", 43762 // "Target ads in an Open Measurement enabled inventory.", 43763 // "Target ads to a specific audio content type.", 43764 // "Target ads to a specific content genre." 43765 // ], 43766 // "location": "path", 43767 // "pattern": "^[^/]+$", 43768 // "required": true, 43769 // "type": "string" 43770 // } 43771 // }, 43772 // "path": "v1/partners/{+partnerId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 43773 // "response": { 43774 // "$ref": "ListPartnerAssignedTargetingOptionsResponse" 43775 // }, 43776 // "scopes": [ 43777 // "https://www.googleapis.com/auth/display-video" 43778 // ] 43779 // } 43780 43781 } 43782 43783 // Pages invokes f for each page of results. 43784 // A non-nil error returned from f will halt the iteration. 43785 // The provided context supersedes any context provided to the Context method. 43786 func (c *PartnersTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListPartnerAssignedTargetingOptionsResponse) error) error { 43787 c.ctx_ = ctx 43788 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 43789 for { 43790 x, err := c.Do() 43791 if err != nil { 43792 return err 43793 } 43794 if err := f(x); err != nil { 43795 return err 43796 } 43797 if x.NextPageToken == "" { 43798 return nil 43799 } 43800 c.PageToken(x.NextPageToken) 43801 } 43802 } 43803 43804 // method id "displayvideo.sdfdownloadtasks.create": 43805 43806 type SdfdownloadtasksCreateCall struct { 43807 s *Service 43808 createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest 43809 urlParams_ gensupport.URLParams 43810 ctx_ context.Context 43811 header_ http.Header 43812 } 43813 43814 // Create: Creates an SDF Download Task. Returns an Operation. An SDF 43815 // Download Task is a long-running, asynchronous operation. The metadata 43816 // type of this operation is SdfDownloadTaskMetadata. If the request is 43817 // successful, the response type of the operation is SdfDownloadTask. 43818 // The response will not include the download files, which must be 43819 // retrieved with media.download. The state of operation can be 43820 // retrieved with sdfdownloadtask.operations.get. Any errors can be 43821 // found in the error.message. Note that error.details is expected to be 43822 // empty. 43823 func (r *SdfdownloadtasksService) Create(createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest) *SdfdownloadtasksCreateCall { 43824 c := &SdfdownloadtasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 43825 c.createsdfdownloadtaskrequest = createsdfdownloadtaskrequest 43826 return c 43827 } 43828 43829 // Fields allows partial responses to be retrieved. See 43830 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 43831 // for more information. 43832 func (c *SdfdownloadtasksCreateCall) Fields(s ...googleapi.Field) *SdfdownloadtasksCreateCall { 43833 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 43834 return c 43835 } 43836 43837 // Context sets the context to be used in this call's Do method. Any 43838 // pending HTTP request will be aborted if the provided context is 43839 // canceled. 43840 func (c *SdfdownloadtasksCreateCall) Context(ctx context.Context) *SdfdownloadtasksCreateCall { 43841 c.ctx_ = ctx 43842 return c 43843 } 43844 43845 // Header returns an http.Header that can be modified by the caller to 43846 // add HTTP headers to the request. 43847 func (c *SdfdownloadtasksCreateCall) Header() http.Header { 43848 if c.header_ == nil { 43849 c.header_ = make(http.Header) 43850 } 43851 return c.header_ 43852 } 43853 43854 func (c *SdfdownloadtasksCreateCall) doRequest(alt string) (*http.Response, error) { 43855 reqHeaders := make(http.Header) 43856 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 43857 for k, v := range c.header_ { 43858 reqHeaders[k] = v 43859 } 43860 reqHeaders.Set("User-Agent", c.s.userAgent()) 43861 var body io.Reader = nil 43862 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createsdfdownloadtaskrequest) 43863 if err != nil { 43864 return nil, err 43865 } 43866 reqHeaders.Set("Content-Type", "application/json") 43867 c.urlParams_.Set("alt", alt) 43868 c.urlParams_.Set("prettyPrint", "false") 43869 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/sdfdownloadtasks") 43870 urls += "?" + c.urlParams_.Encode() 43871 req, err := http.NewRequest("POST", urls, body) 43872 if err != nil { 43873 return nil, err 43874 } 43875 req.Header = reqHeaders 43876 return gensupport.SendRequest(c.ctx_, c.s.client, req) 43877 } 43878 43879 // Do executes the "displayvideo.sdfdownloadtasks.create" call. 43880 // Exactly one of *Operation or error will be non-nil. Any non-2xx 43881 // status code is an error. Response headers are in either 43882 // *Operation.ServerResponse.Header or (if a response was returned at 43883 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 43884 // to check whether the returned error was because 43885 // http.StatusNotModified was returned. 43886 func (c *SdfdownloadtasksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 43887 gensupport.SetOptions(c.urlParams_, opts...) 43888 res, err := c.doRequest("json") 43889 if res != nil && res.StatusCode == http.StatusNotModified { 43890 if res.Body != nil { 43891 res.Body.Close() 43892 } 43893 return nil, gensupport.WrapError(&googleapi.Error{ 43894 Code: res.StatusCode, 43895 Header: res.Header, 43896 }) 43897 } 43898 if err != nil { 43899 return nil, err 43900 } 43901 defer googleapi.CloseBody(res) 43902 if err := googleapi.CheckResponse(res); err != nil { 43903 return nil, gensupport.WrapError(err) 43904 } 43905 ret := &Operation{ 43906 ServerResponse: googleapi.ServerResponse{ 43907 Header: res.Header, 43908 HTTPStatusCode: res.StatusCode, 43909 }, 43910 } 43911 target := &ret 43912 if err := gensupport.DecodeResponse(target, res); err != nil { 43913 return nil, err 43914 } 43915 return ret, nil 43916 // { 43917 // "description": "Creates an SDF Download Task. Returns an Operation. An SDF Download Task is a long-running, asynchronous operation. The metadata type of this operation is SdfDownloadTaskMetadata. If the request is successful, the response type of the operation is SdfDownloadTask. The response will not include the download files, which must be retrieved with media.download. The state of operation can be retrieved with sdfdownloadtask.operations.get. Any errors can be found in the error.message. Note that error.details is expected to be empty.", 43918 // "flatPath": "v1/sdfdownloadtasks", 43919 // "httpMethod": "POST", 43920 // "id": "displayvideo.sdfdownloadtasks.create", 43921 // "parameterOrder": [], 43922 // "parameters": {}, 43923 // "path": "v1/sdfdownloadtasks", 43924 // "request": { 43925 // "$ref": "CreateSdfDownloadTaskRequest" 43926 // }, 43927 // "response": { 43928 // "$ref": "Operation" 43929 // }, 43930 // "scopes": [ 43931 // "https://www.googleapis.com/auth/display-video" 43932 // ] 43933 // } 43934 43935 } 43936 43937 // method id "displayvideo.sdfdownloadtasks.operations.get": 43938 43939 type SdfdownloadtasksOperationsGetCall struct { 43940 s *Service 43941 name string 43942 urlParams_ gensupport.URLParams 43943 ifNoneMatch_ string 43944 ctx_ context.Context 43945 header_ http.Header 43946 } 43947 43948 // Get: Gets the latest state of an asynchronous SDF download task 43949 // operation. Clients should poll this method at intervals of 30 43950 // seconds. 43951 // 43952 // - name: The name of the operation resource. 43953 func (r *SdfdownloadtasksOperationsService) Get(name string) *SdfdownloadtasksOperationsGetCall { 43954 c := &SdfdownloadtasksOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 43955 c.name = name 43956 return c 43957 } 43958 43959 // Fields allows partial responses to be retrieved. See 43960 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 43961 // for more information. 43962 func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall { 43963 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 43964 return c 43965 } 43966 43967 // IfNoneMatch sets the optional parameter which makes the operation 43968 // fail if the object's ETag matches the given value. This is useful for 43969 // getting updates only after the object has changed since the last 43970 // request. Use googleapi.IsNotModified to check whether the response 43971 // error from Do is the result of In-None-Match. 43972 func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall { 43973 c.ifNoneMatch_ = entityTag 43974 return c 43975 } 43976 43977 // Context sets the context to be used in this call's Do method. Any 43978 // pending HTTP request will be aborted if the provided context is 43979 // canceled. 43980 func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall { 43981 c.ctx_ = ctx 43982 return c 43983 } 43984 43985 // Header returns an http.Header that can be modified by the caller to 43986 // add HTTP headers to the request. 43987 func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header { 43988 if c.header_ == nil { 43989 c.header_ = make(http.Header) 43990 } 43991 return c.header_ 43992 } 43993 43994 func (c *SdfdownloadtasksOperationsGetCall) doRequest(alt string) (*http.Response, error) { 43995 reqHeaders := make(http.Header) 43996 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 43997 for k, v := range c.header_ { 43998 reqHeaders[k] = v 43999 } 44000 reqHeaders.Set("User-Agent", c.s.userAgent()) 44001 if c.ifNoneMatch_ != "" { 44002 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 44003 } 44004 var body io.Reader = nil 44005 c.urlParams_.Set("alt", alt) 44006 c.urlParams_.Set("prettyPrint", "false") 44007 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 44008 urls += "?" + c.urlParams_.Encode() 44009 req, err := http.NewRequest("GET", urls, body) 44010 if err != nil { 44011 return nil, err 44012 } 44013 req.Header = reqHeaders 44014 googleapi.Expand(req.URL, map[string]string{ 44015 "name": c.name, 44016 }) 44017 return gensupport.SendRequest(c.ctx_, c.s.client, req) 44018 } 44019 44020 // Do executes the "displayvideo.sdfdownloadtasks.operations.get" call. 44021 // Exactly one of *Operation or error will be non-nil. Any non-2xx 44022 // status code is an error. Response headers are in either 44023 // *Operation.ServerResponse.Header or (if a response was returned at 44024 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 44025 // to check whether the returned error was because 44026 // http.StatusNotModified was returned. 44027 func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 44028 gensupport.SetOptions(c.urlParams_, opts...) 44029 res, err := c.doRequest("json") 44030 if res != nil && res.StatusCode == http.StatusNotModified { 44031 if res.Body != nil { 44032 res.Body.Close() 44033 } 44034 return nil, gensupport.WrapError(&googleapi.Error{ 44035 Code: res.StatusCode, 44036 Header: res.Header, 44037 }) 44038 } 44039 if err != nil { 44040 return nil, err 44041 } 44042 defer googleapi.CloseBody(res) 44043 if err := googleapi.CheckResponse(res); err != nil { 44044 return nil, gensupport.WrapError(err) 44045 } 44046 ret := &Operation{ 44047 ServerResponse: googleapi.ServerResponse{ 44048 Header: res.Header, 44049 HTTPStatusCode: res.StatusCode, 44050 }, 44051 } 44052 target := &ret 44053 if err := gensupport.DecodeResponse(target, res); err != nil { 44054 return nil, err 44055 } 44056 return ret, nil 44057 // { 44058 // "description": "Gets the latest state of an asynchronous SDF download task operation. Clients should poll this method at intervals of 30 seconds.", 44059 // "flatPath": "v1/sdfdownloadtasks/operations/{operationsId}", 44060 // "httpMethod": "GET", 44061 // "id": "displayvideo.sdfdownloadtasks.operations.get", 44062 // "parameterOrder": [ 44063 // "name" 44064 // ], 44065 // "parameters": { 44066 // "name": { 44067 // "description": "The name of the operation resource.", 44068 // "location": "path", 44069 // "pattern": "^sdfdownloadtasks/operations/[^/]+$", 44070 // "required": true, 44071 // "type": "string" 44072 // } 44073 // }, 44074 // "path": "v1/{+name}", 44075 // "response": { 44076 // "$ref": "Operation" 44077 // }, 44078 // "scopes": [ 44079 // "https://www.googleapis.com/auth/display-video", 44080 // "https://www.googleapis.com/auth/doubleclickbidmanager" 44081 // ] 44082 // } 44083 44084 } 44085 44086 // method id "displayvideo.targetingTypes.targetingOptions.get": 44087 44088 type TargetingTypesTargetingOptionsGetCall struct { 44089 s *Service 44090 targetingType string 44091 targetingOptionId string 44092 urlParams_ gensupport.URLParams 44093 ifNoneMatch_ string 44094 ctx_ context.Context 44095 header_ http.Header 44096 } 44097 44098 // Get: Gets a single targeting option. 44099 // 44100 // - targetingOptionId: The ID of the of targeting option to retrieve. 44101 // - targetingType: The type of targeting option to retrieve. Accepted 44102 // values are: * `TARGETING_TYPE_APP_CATEGORY` * 44103 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_GENDER` * 44104 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * 44105 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 44106 // `TARGETING_TYPE_PARENTAL_STATUS` * 44107 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 44108 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 44109 // `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_BROWSER` * 44110 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 44111 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 44112 // `TARGETING_TYPE_CARRIER_AND_ISP` * 44113 // `TARGETING_TYPE_OPERATING_SYSTEM` * 44114 // `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_ENVIRONMENT` * 44115 // `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_VIEWABILITY` * 44116 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 44117 // `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_GEO_REGION` * 44118 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 44119 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 44120 // `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_SUB_EXCHANGE` * 44121 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_OMID`. 44122 func (r *TargetingTypesTargetingOptionsService) Get(targetingType string, targetingOptionId string) *TargetingTypesTargetingOptionsGetCall { 44123 c := &TargetingTypesTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 44124 c.targetingType = targetingType 44125 c.targetingOptionId = targetingOptionId 44126 return c 44127 } 44128 44129 // AdvertiserId sets the optional parameter "advertiserId": Required. 44130 // The Advertiser this request is being made in the context of. 44131 func (c *TargetingTypesTargetingOptionsGetCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsGetCall { 44132 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 44133 return c 44134 } 44135 44136 // Fields allows partial responses to be retrieved. See 44137 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 44138 // for more information. 44139 func (c *TargetingTypesTargetingOptionsGetCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsGetCall { 44140 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 44141 return c 44142 } 44143 44144 // IfNoneMatch sets the optional parameter which makes the operation 44145 // fail if the object's ETag matches the given value. This is useful for 44146 // getting updates only after the object has changed since the last 44147 // request. Use googleapi.IsNotModified to check whether the response 44148 // error from Do is the result of In-None-Match. 44149 func (c *TargetingTypesTargetingOptionsGetCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsGetCall { 44150 c.ifNoneMatch_ = entityTag 44151 return c 44152 } 44153 44154 // Context sets the context to be used in this call's Do method. Any 44155 // pending HTTP request will be aborted if the provided context is 44156 // canceled. 44157 func (c *TargetingTypesTargetingOptionsGetCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsGetCall { 44158 c.ctx_ = ctx 44159 return c 44160 } 44161 44162 // Header returns an http.Header that can be modified by the caller to 44163 // add HTTP headers to the request. 44164 func (c *TargetingTypesTargetingOptionsGetCall) Header() http.Header { 44165 if c.header_ == nil { 44166 c.header_ = make(http.Header) 44167 } 44168 return c.header_ 44169 } 44170 44171 func (c *TargetingTypesTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 44172 reqHeaders := make(http.Header) 44173 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 44174 for k, v := range c.header_ { 44175 reqHeaders[k] = v 44176 } 44177 reqHeaders.Set("User-Agent", c.s.userAgent()) 44178 if c.ifNoneMatch_ != "" { 44179 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 44180 } 44181 var body io.Reader = nil 44182 c.urlParams_.Set("alt", alt) 44183 c.urlParams_.Set("prettyPrint", "false") 44184 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/targetingTypes/{+targetingType}/targetingOptions/{+targetingOptionId}") 44185 urls += "?" + c.urlParams_.Encode() 44186 req, err := http.NewRequest("GET", urls, body) 44187 if err != nil { 44188 return nil, err 44189 } 44190 req.Header = reqHeaders 44191 googleapi.Expand(req.URL, map[string]string{ 44192 "targetingType": c.targetingType, 44193 "targetingOptionId": c.targetingOptionId, 44194 }) 44195 return gensupport.SendRequest(c.ctx_, c.s.client, req) 44196 } 44197 44198 // Do executes the "displayvideo.targetingTypes.targetingOptions.get" call. 44199 // Exactly one of *TargetingOption or error will be non-nil. Any non-2xx 44200 // status code is an error. Response headers are in either 44201 // *TargetingOption.ServerResponse.Header or (if a response was returned 44202 // at all) in error.(*googleapi.Error).Header. Use 44203 // googleapi.IsNotModified to check whether the returned error was 44204 // because http.StatusNotModified was returned. 44205 func (c *TargetingTypesTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*TargetingOption, error) { 44206 gensupport.SetOptions(c.urlParams_, opts...) 44207 res, err := c.doRequest("json") 44208 if res != nil && res.StatusCode == http.StatusNotModified { 44209 if res.Body != nil { 44210 res.Body.Close() 44211 } 44212 return nil, gensupport.WrapError(&googleapi.Error{ 44213 Code: res.StatusCode, 44214 Header: res.Header, 44215 }) 44216 } 44217 if err != nil { 44218 return nil, err 44219 } 44220 defer googleapi.CloseBody(res) 44221 if err := googleapi.CheckResponse(res); err != nil { 44222 return nil, gensupport.WrapError(err) 44223 } 44224 ret := &TargetingOption{ 44225 ServerResponse: googleapi.ServerResponse{ 44226 Header: res.Header, 44227 HTTPStatusCode: res.StatusCode, 44228 }, 44229 } 44230 target := &ret 44231 if err := gensupport.DecodeResponse(target, res); err != nil { 44232 return nil, err 44233 } 44234 return ret, nil 44235 // { 44236 // "description": "Gets a single targeting option.", 44237 // "flatPath": "v1/targetingTypes/{targetingTypesId}/targetingOptions/{targetingOptionsId}", 44238 // "httpMethod": "GET", 44239 // "id": "displayvideo.targetingTypes.targetingOptions.get", 44240 // "parameterOrder": [ 44241 // "targetingType", 44242 // "targetingOptionId" 44243 // ], 44244 // "parameters": { 44245 // "advertiserId": { 44246 // "description": "Required. The Advertiser this request is being made in the context of.", 44247 // "format": "int64", 44248 // "location": "query", 44249 // "type": "string" 44250 // }, 44251 // "targetingOptionId": { 44252 // "description": "Required. The ID of the of targeting option to retrieve.", 44253 // "location": "path", 44254 // "pattern": "^[^/]+$", 44255 // "required": true, 44256 // "type": "string" 44257 // }, 44258 // "targetingType": { 44259 // "description": "Required. The type of targeting option to retrieve. Accepted values are: * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_VIEWABILITY` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_OMID`", 44260 // "enum": [ 44261 // "TARGETING_TYPE_UNSPECIFIED", 44262 // "TARGETING_TYPE_CHANNEL", 44263 // "TARGETING_TYPE_APP_CATEGORY", 44264 // "TARGETING_TYPE_APP", 44265 // "TARGETING_TYPE_URL", 44266 // "TARGETING_TYPE_DAY_AND_TIME", 44267 // "TARGETING_TYPE_AGE_RANGE", 44268 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 44269 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 44270 // "TARGETING_TYPE_GENDER", 44271 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 44272 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 44273 // "TARGETING_TYPE_PARENTAL_STATUS", 44274 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 44275 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 44276 // "TARGETING_TYPE_DEVICE_TYPE", 44277 // "TARGETING_TYPE_AUDIENCE_GROUP", 44278 // "TARGETING_TYPE_BROWSER", 44279 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 44280 // "TARGETING_TYPE_ON_SCREEN_POSITION", 44281 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 44282 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 44283 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 44284 // "TARGETING_TYPE_ENVIRONMENT", 44285 // "TARGETING_TYPE_CARRIER_AND_ISP", 44286 // "TARGETING_TYPE_OPERATING_SYSTEM", 44287 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 44288 // "TARGETING_TYPE_KEYWORD", 44289 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 44290 // "TARGETING_TYPE_VIEWABILITY", 44291 // "TARGETING_TYPE_CATEGORY", 44292 // "TARGETING_TYPE_INVENTORY_SOURCE", 44293 // "TARGETING_TYPE_LANGUAGE", 44294 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 44295 // "TARGETING_TYPE_GEO_REGION", 44296 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 44297 // "TARGETING_TYPE_EXCHANGE", 44298 // "TARGETING_TYPE_SUB_EXCHANGE", 44299 // "TARGETING_TYPE_POI", 44300 // "TARGETING_TYPE_BUSINESS_CHAIN", 44301 // "TARGETING_TYPE_CONTENT_DURATION", 44302 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 44303 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 44304 // "TARGETING_TYPE_OMID", 44305 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 44306 // "TARGETING_TYPE_CONTENT_GENRE" 44307 // ], 44308 // "enumDescriptions": [ 44309 // "Default value when type is not specified or is unknown in this version.", 44310 // "Target a channel (a custom group of related websites or apps).", 44311 // "Target an app category (for example, education or puzzle games).", 44312 // "Target a specific app (for example, Angry Birds).", 44313 // "Target a specific url (for example, quora.com).", 44314 // "Target ads during a chosen time period on a specific day.", 44315 // "Target ads to a specific age range (for example, 18-24).", 44316 // "Target ads to the specified regions on a regional location list.", 44317 // "Target ads to the specified points of interest on a proximity location list.", 44318 // "Target ads to a specific gender (for example, female or male).", 44319 // "Target a specific video player size for video ads.", 44320 // "Target user rewarded content for video ads.", 44321 // "Target ads to a specific parental status (for example, parent or not a parent).", 44322 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 44323 // "Target ads in a specific content outstream position.", 44324 // "Target ads to a specific device type (for example, tablet or connected TV).", 44325 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 44326 // "Target ads to specific web browsers (for example, Chrome).", 44327 // "Target ads to a specific household income range (for example, top 10%).", 44328 // "Target ads in a specific on screen position.", 44329 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 44330 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 44331 // "Filter website content by sensitive categories (for example, adult).", 44332 // "Target ads to a specific environment (for example, web or app).", 44333 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 44334 // "Target ads to a specific operating system (for example, macOS).", 44335 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 44336 // "Target ads to a specific keyword (for example, dog or retriever).", 44337 // "Target ads to a specific negative keyword list.", 44338 // "Target ads to a specific viewability (for example, 80% viewable).", 44339 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 44340 // "Purchase impressions from specific deals and auction packages.", 44341 // "Target ads to a specific language (for example, English or Japanese).", 44342 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 44343 // "Target ads to a specific regional location (for example, a city or state).", 44344 // "Purchase impressions from a group of deals and auction packages.", 44345 // "Purchase impressions from specific exchanges.", 44346 // "Purchase impressions from specific sub-exchanges.", 44347 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 44348 // "Target ads around locations of a business chain within a specific geo region.", 44349 // "Target ads to a specific video content duration.", 44350 // "Target ads to a specific video content stream type.", 44351 // "Target ads to a specific native content position.", 44352 // "Target ads in an Open Measurement enabled inventory.", 44353 // "Target ads to a specific audio content type.", 44354 // "Target ads to a specific content genre." 44355 // ], 44356 // "location": "path", 44357 // "pattern": "^[^/]+$", 44358 // "required": true, 44359 // "type": "string" 44360 // } 44361 // }, 44362 // "path": "v1/targetingTypes/{+targetingType}/targetingOptions/{+targetingOptionId}", 44363 // "response": { 44364 // "$ref": "TargetingOption" 44365 // }, 44366 // "scopes": [ 44367 // "https://www.googleapis.com/auth/display-video" 44368 // ] 44369 // } 44370 44371 } 44372 44373 // method id "displayvideo.targetingTypes.targetingOptions.list": 44374 44375 type TargetingTypesTargetingOptionsListCall struct { 44376 s *Service 44377 targetingType string 44378 urlParams_ gensupport.URLParams 44379 ifNoneMatch_ string 44380 ctx_ context.Context 44381 header_ http.Header 44382 } 44383 44384 // List: Lists targeting options of a given type. 44385 // 44386 // - targetingType: The type of targeting option to be listed. Accepted 44387 // values are: * `TARGETING_TYPE_APP_CATEGORY` * 44388 // `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_GENDER` * 44389 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * 44390 // `TARGETING_TYPE_USER_REWARDED_CONTENT` * 44391 // `TARGETING_TYPE_PARENTAL_STATUS` * 44392 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * 44393 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * 44394 // `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_BROWSER` * 44395 // `TARGETING_TYPE_HOUSEHOLD_INCOME` * 44396 // `TARGETING_TYPE_ON_SCREEN_POSITION` * 44397 // `TARGETING_TYPE_CARRIER_AND_ISP` * 44398 // `TARGETING_TYPE_OPERATING_SYSTEM` * 44399 // `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_ENVIRONMENT` * 44400 // `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_VIEWABILITY` * 44401 // `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * 44402 // `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_GEO_REGION` * 44403 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * 44404 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * 44405 // `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_SUB_EXCHANGE` * 44406 // `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_OMID`. 44407 func (r *TargetingTypesTargetingOptionsService) List(targetingType string) *TargetingTypesTargetingOptionsListCall { 44408 c := &TargetingTypesTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 44409 c.targetingType = targetingType 44410 return c 44411 } 44412 44413 // AdvertiserId sets the optional parameter "advertiserId": Required. 44414 // The Advertiser this request is being made in the context of. 44415 func (c *TargetingTypesTargetingOptionsListCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsListCall { 44416 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 44417 return c 44418 } 44419 44420 // Filter sets the optional parameter "filter": Allows filtering by 44421 // targeting option fields. Supported syntax: * Filter expressions are 44422 // made up of one or more restrictions. * Restrictions can be combined 44423 // by `OR` logical operators. * A restriction has the form of `{field} 44424 // {operator} {value}`. * All fields must use the `EQUALS (=)` operator. 44425 // Supported fields: * `carrierAndIspDetails.type` * 44426 // `geoRegionDetails.geoRegionType` * `targetingOptionId` Examples: * 44427 // All `GEO REGION` targeting options that belong to sub type 44428 // `GEO_REGION_TYPE_COUNTRY` or `GEO_REGION_TYPE_STATE`: 44429 // `geoRegionDetails.geoRegionType="GEO_REGION_TYPE_COUNTRY" OR 44430 // geoRegionDetails.geoRegionType="GEO_REGION_TYPE_STATE" * All 44431 // `CARRIER AND ISP` targeting options that belong to sub type 44432 // `CARRIER_AND_ISP_TYPE_CARRIER`: 44433 // `carrierAndIspDetails.type="CARRIER_AND_ISP_TYPE_CARRIER" The length 44434 // of this field should be no more than 500 characters. Reference our 44435 // filter `LIST` requests (/display-video/api/guides/how-tos/filters) 44436 // guide for more information. 44437 func (c *TargetingTypesTargetingOptionsListCall) Filter(filter string) *TargetingTypesTargetingOptionsListCall { 44438 c.urlParams_.Set("filter", filter) 44439 return c 44440 } 44441 44442 // OrderBy sets the optional parameter "orderBy": Field by which to sort 44443 // the list. Acceptable values are: * `targetingOptionId` (default) The 44444 // default sorting order is ascending. To specify descending order for a 44445 // field, a suffix "desc" should be added to the field name. Example: 44446 // `targetingOptionId desc`. 44447 func (c *TargetingTypesTargetingOptionsListCall) OrderBy(orderBy string) *TargetingTypesTargetingOptionsListCall { 44448 c.urlParams_.Set("orderBy", orderBy) 44449 return c 44450 } 44451 44452 // PageSize sets the optional parameter "pageSize": Requested page size. 44453 // Must be between `1` and `200`. If unspecified will default to `100`. 44454 // Returns error code `INVALID_ARGUMENT` if an invalid value is 44455 // specified. 44456 func (c *TargetingTypesTargetingOptionsListCall) PageSize(pageSize int64) *TargetingTypesTargetingOptionsListCall { 44457 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 44458 return c 44459 } 44460 44461 // PageToken sets the optional parameter "pageToken": A token 44462 // identifying a page of results the server should return. Typically, 44463 // this is the value of next_page_token returned from the previous call 44464 // to `ListTargetingOptions` method. If not specified, the first page of 44465 // results will be returned. 44466 func (c *TargetingTypesTargetingOptionsListCall) PageToken(pageToken string) *TargetingTypesTargetingOptionsListCall { 44467 c.urlParams_.Set("pageToken", pageToken) 44468 return c 44469 } 44470 44471 // Fields allows partial responses to be retrieved. See 44472 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 44473 // for more information. 44474 func (c *TargetingTypesTargetingOptionsListCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsListCall { 44475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 44476 return c 44477 } 44478 44479 // IfNoneMatch sets the optional parameter which makes the operation 44480 // fail if the object's ETag matches the given value. This is useful for 44481 // getting updates only after the object has changed since the last 44482 // request. Use googleapi.IsNotModified to check whether the response 44483 // error from Do is the result of In-None-Match. 44484 func (c *TargetingTypesTargetingOptionsListCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsListCall { 44485 c.ifNoneMatch_ = entityTag 44486 return c 44487 } 44488 44489 // Context sets the context to be used in this call's Do method. Any 44490 // pending HTTP request will be aborted if the provided context is 44491 // canceled. 44492 func (c *TargetingTypesTargetingOptionsListCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsListCall { 44493 c.ctx_ = ctx 44494 return c 44495 } 44496 44497 // Header returns an http.Header that can be modified by the caller to 44498 // add HTTP headers to the request. 44499 func (c *TargetingTypesTargetingOptionsListCall) Header() http.Header { 44500 if c.header_ == nil { 44501 c.header_ = make(http.Header) 44502 } 44503 return c.header_ 44504 } 44505 44506 func (c *TargetingTypesTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 44507 reqHeaders := make(http.Header) 44508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 44509 for k, v := range c.header_ { 44510 reqHeaders[k] = v 44511 } 44512 reqHeaders.Set("User-Agent", c.s.userAgent()) 44513 if c.ifNoneMatch_ != "" { 44514 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 44515 } 44516 var body io.Reader = nil 44517 c.urlParams_.Set("alt", alt) 44518 c.urlParams_.Set("prettyPrint", "false") 44519 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/targetingTypes/{+targetingType}/targetingOptions") 44520 urls += "?" + c.urlParams_.Encode() 44521 req, err := http.NewRequest("GET", urls, body) 44522 if err != nil { 44523 return nil, err 44524 } 44525 req.Header = reqHeaders 44526 googleapi.Expand(req.URL, map[string]string{ 44527 "targetingType": c.targetingType, 44528 }) 44529 return gensupport.SendRequest(c.ctx_, c.s.client, req) 44530 } 44531 44532 // Do executes the "displayvideo.targetingTypes.targetingOptions.list" call. 44533 // Exactly one of *ListTargetingOptionsResponse or error will be 44534 // non-nil. Any non-2xx status code is an error. Response headers are in 44535 // either *ListTargetingOptionsResponse.ServerResponse.Header or (if a 44536 // response was returned at all) in error.(*googleapi.Error).Header. Use 44537 // googleapi.IsNotModified to check whether the returned error was 44538 // because http.StatusNotModified was returned. 44539 func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListTargetingOptionsResponse, error) { 44540 gensupport.SetOptions(c.urlParams_, opts...) 44541 res, err := c.doRequest("json") 44542 if res != nil && res.StatusCode == http.StatusNotModified { 44543 if res.Body != nil { 44544 res.Body.Close() 44545 } 44546 return nil, gensupport.WrapError(&googleapi.Error{ 44547 Code: res.StatusCode, 44548 Header: res.Header, 44549 }) 44550 } 44551 if err != nil { 44552 return nil, err 44553 } 44554 defer googleapi.CloseBody(res) 44555 if err := googleapi.CheckResponse(res); err != nil { 44556 return nil, gensupport.WrapError(err) 44557 } 44558 ret := &ListTargetingOptionsResponse{ 44559 ServerResponse: googleapi.ServerResponse{ 44560 Header: res.Header, 44561 HTTPStatusCode: res.StatusCode, 44562 }, 44563 } 44564 target := &ret 44565 if err := gensupport.DecodeResponse(target, res); err != nil { 44566 return nil, err 44567 } 44568 return ret, nil 44569 // { 44570 // "description": "Lists targeting options of a given type.", 44571 // "flatPath": "v1/targetingTypes/{targetingTypesId}/targetingOptions", 44572 // "httpMethod": "GET", 44573 // "id": "displayvideo.targetingTypes.targetingOptions.list", 44574 // "parameterOrder": [ 44575 // "targetingType" 44576 // ], 44577 // "parameters": { 44578 // "advertiserId": { 44579 // "description": "Required. The Advertiser this request is being made in the context of.", 44580 // "format": "int64", 44581 // "location": "query", 44582 // "type": "string" 44583 // }, 44584 // "filter": { 44585 // "description": "Allows filtering by targeting option fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by `OR` logical operators. * A restriction has the form of `{field} {operator} {value}`. * All fields must use the `EQUALS (=)` operator. Supported fields: * `carrierAndIspDetails.type` * `geoRegionDetails.geoRegionType` * `targetingOptionId` Examples: * All `GEO REGION` targeting options that belong to sub type `GEO_REGION_TYPE_COUNTRY` or `GEO_REGION_TYPE_STATE`: `geoRegionDetails.geoRegionType=\"GEO_REGION_TYPE_COUNTRY\" OR geoRegionDetails.geoRegionType=\"GEO_REGION_TYPE_STATE\"` * All `CARRIER AND ISP` targeting options that belong to sub type `CARRIER_AND_ISP_TYPE_CARRIER`: `carrierAndIspDetails.type=\"CARRIER_AND_ISP_TYPE_CARRIER\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 44586 // "location": "query", 44587 // "type": "string" 44588 // }, 44589 // "orderBy": { 44590 // "description": "Field by which to sort the list. Acceptable values are: * `targetingOptionId` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. Example: `targetingOptionId desc`.", 44591 // "location": "query", 44592 // "type": "string" 44593 // }, 44594 // "pageSize": { 44595 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", 44596 // "format": "int32", 44597 // "location": "query", 44598 // "type": "integer" 44599 // }, 44600 // "pageToken": { 44601 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListTargetingOptions` method. If not specified, the first page of results will be returned.", 44602 // "location": "query", 44603 // "type": "string" 44604 // }, 44605 // "targetingType": { 44606 // "description": "Required. The type of targeting option to be listed. Accepted values are: * `TARGETING_TYPE_APP_CATEGORY` * `TARGETING_TYPE_AGE_RANGE` * `TARGETING_TYPE_GENDER` * `TARGETING_TYPE_VIDEO_PLAYER_SIZE` * `TARGETING_TYPE_USER_REWARDED_CONTENT` * `TARGETING_TYPE_PARENTAL_STATUS` * `TARGETING_TYPE_CONTENT_INSTREAM_POSITION` * `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION` * `TARGETING_TYPE_DEVICE_TYPE` * `TARGETING_TYPE_BROWSER` * `TARGETING_TYPE_HOUSEHOLD_INCOME` * `TARGETING_TYPE_ON_SCREEN_POSITION` * `TARGETING_TYPE_CARRIER_AND_ISP` * `TARGETING_TYPE_OPERATING_SYSTEM` * `TARGETING_TYPE_DEVICE_MAKE_MODEL` * `TARGETING_TYPE_ENVIRONMENT` * `TARGETING_TYPE_CATEGORY` * `TARGETING_TYPE_VIEWABILITY` * `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS` * `TARGETING_TYPE_LANGUAGE` * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION` * `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION` * `TARGETING_TYPE_EXCHANGE` * `TARGETING_TYPE_SUB_EXCHANGE` * `TARGETING_TYPE_NATIVE_CONTENT_POSITION` * `TARGETING_TYPE_OMID`", 44607 // "enum": [ 44608 // "TARGETING_TYPE_UNSPECIFIED", 44609 // "TARGETING_TYPE_CHANNEL", 44610 // "TARGETING_TYPE_APP_CATEGORY", 44611 // "TARGETING_TYPE_APP", 44612 // "TARGETING_TYPE_URL", 44613 // "TARGETING_TYPE_DAY_AND_TIME", 44614 // "TARGETING_TYPE_AGE_RANGE", 44615 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 44616 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 44617 // "TARGETING_TYPE_GENDER", 44618 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 44619 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 44620 // "TARGETING_TYPE_PARENTAL_STATUS", 44621 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 44622 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 44623 // "TARGETING_TYPE_DEVICE_TYPE", 44624 // "TARGETING_TYPE_AUDIENCE_GROUP", 44625 // "TARGETING_TYPE_BROWSER", 44626 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 44627 // "TARGETING_TYPE_ON_SCREEN_POSITION", 44628 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 44629 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 44630 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 44631 // "TARGETING_TYPE_ENVIRONMENT", 44632 // "TARGETING_TYPE_CARRIER_AND_ISP", 44633 // "TARGETING_TYPE_OPERATING_SYSTEM", 44634 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 44635 // "TARGETING_TYPE_KEYWORD", 44636 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 44637 // "TARGETING_TYPE_VIEWABILITY", 44638 // "TARGETING_TYPE_CATEGORY", 44639 // "TARGETING_TYPE_INVENTORY_SOURCE", 44640 // "TARGETING_TYPE_LANGUAGE", 44641 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 44642 // "TARGETING_TYPE_GEO_REGION", 44643 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 44644 // "TARGETING_TYPE_EXCHANGE", 44645 // "TARGETING_TYPE_SUB_EXCHANGE", 44646 // "TARGETING_TYPE_POI", 44647 // "TARGETING_TYPE_BUSINESS_CHAIN", 44648 // "TARGETING_TYPE_CONTENT_DURATION", 44649 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 44650 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 44651 // "TARGETING_TYPE_OMID", 44652 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 44653 // "TARGETING_TYPE_CONTENT_GENRE" 44654 // ], 44655 // "enumDescriptions": [ 44656 // "Default value when type is not specified or is unknown in this version.", 44657 // "Target a channel (a custom group of related websites or apps).", 44658 // "Target an app category (for example, education or puzzle games).", 44659 // "Target a specific app (for example, Angry Birds).", 44660 // "Target a specific url (for example, quora.com).", 44661 // "Target ads during a chosen time period on a specific day.", 44662 // "Target ads to a specific age range (for example, 18-24).", 44663 // "Target ads to the specified regions on a regional location list.", 44664 // "Target ads to the specified points of interest on a proximity location list.", 44665 // "Target ads to a specific gender (for example, female or male).", 44666 // "Target a specific video player size for video ads.", 44667 // "Target user rewarded content for video ads.", 44668 // "Target ads to a specific parental status (for example, parent or not a parent).", 44669 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 44670 // "Target ads in a specific content outstream position.", 44671 // "Target ads to a specific device type (for example, tablet or connected TV).", 44672 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 44673 // "Target ads to specific web browsers (for example, Chrome).", 44674 // "Target ads to a specific household income range (for example, top 10%).", 44675 // "Target ads in a specific on screen position.", 44676 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 44677 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 44678 // "Filter website content by sensitive categories (for example, adult).", 44679 // "Target ads to a specific environment (for example, web or app).", 44680 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 44681 // "Target ads to a specific operating system (for example, macOS).", 44682 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 44683 // "Target ads to a specific keyword (for example, dog or retriever).", 44684 // "Target ads to a specific negative keyword list.", 44685 // "Target ads to a specific viewability (for example, 80% viewable).", 44686 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 44687 // "Purchase impressions from specific deals and auction packages.", 44688 // "Target ads to a specific language (for example, English or Japanese).", 44689 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 44690 // "Target ads to a specific regional location (for example, a city or state).", 44691 // "Purchase impressions from a group of deals and auction packages.", 44692 // "Purchase impressions from specific exchanges.", 44693 // "Purchase impressions from specific sub-exchanges.", 44694 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 44695 // "Target ads around locations of a business chain within a specific geo region.", 44696 // "Target ads to a specific video content duration.", 44697 // "Target ads to a specific video content stream type.", 44698 // "Target ads to a specific native content position.", 44699 // "Target ads in an Open Measurement enabled inventory.", 44700 // "Target ads to a specific audio content type.", 44701 // "Target ads to a specific content genre." 44702 // ], 44703 // "location": "path", 44704 // "pattern": "^[^/]+$", 44705 // "required": true, 44706 // "type": "string" 44707 // } 44708 // }, 44709 // "path": "v1/targetingTypes/{+targetingType}/targetingOptions", 44710 // "response": { 44711 // "$ref": "ListTargetingOptionsResponse" 44712 // }, 44713 // "scopes": [ 44714 // "https://www.googleapis.com/auth/display-video" 44715 // ] 44716 // } 44717 44718 } 44719 44720 // Pages invokes f for each page of results. 44721 // A non-nil error returned from f will halt the iteration. 44722 // The provided context supersedes any context provided to the Context method. 44723 func (c *TargetingTypesTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListTargetingOptionsResponse) error) error { 44724 c.ctx_ = ctx 44725 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 44726 for { 44727 x, err := c.Do() 44728 if err != nil { 44729 return err 44730 } 44731 if err := f(x); err != nil { 44732 return err 44733 } 44734 if x.NextPageToken == "" { 44735 return nil 44736 } 44737 c.PageToken(x.NextPageToken) 44738 } 44739 } 44740 44741 // method id "displayvideo.targetingTypes.targetingOptions.search": 44742 44743 type TargetingTypesTargetingOptionsSearchCall struct { 44744 s *Service 44745 targetingType string 44746 searchtargetingoptionsrequest *SearchTargetingOptionsRequest 44747 urlParams_ gensupport.URLParams 44748 ctx_ context.Context 44749 header_ http.Header 44750 } 44751 44752 // Search: Searches for targeting options of a given type based on the 44753 // given search terms. 44754 // 44755 // - targetingType: The type of targeting options to retrieve. Accepted 44756 // values are: * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_POI` * 44757 // `TARGETING_TYPE_BUSINESS_CHAIN`. 44758 func (r *TargetingTypesTargetingOptionsService) Search(targetingType string, searchtargetingoptionsrequest *SearchTargetingOptionsRequest) *TargetingTypesTargetingOptionsSearchCall { 44759 c := &TargetingTypesTargetingOptionsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 44760 c.targetingType = targetingType 44761 c.searchtargetingoptionsrequest = searchtargetingoptionsrequest 44762 return c 44763 } 44764 44765 // Fields allows partial responses to be retrieved. See 44766 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 44767 // for more information. 44768 func (c *TargetingTypesTargetingOptionsSearchCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsSearchCall { 44769 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 44770 return c 44771 } 44772 44773 // Context sets the context to be used in this call's Do method. Any 44774 // pending HTTP request will be aborted if the provided context is 44775 // canceled. 44776 func (c *TargetingTypesTargetingOptionsSearchCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsSearchCall { 44777 c.ctx_ = ctx 44778 return c 44779 } 44780 44781 // Header returns an http.Header that can be modified by the caller to 44782 // add HTTP headers to the request. 44783 func (c *TargetingTypesTargetingOptionsSearchCall) Header() http.Header { 44784 if c.header_ == nil { 44785 c.header_ = make(http.Header) 44786 } 44787 return c.header_ 44788 } 44789 44790 func (c *TargetingTypesTargetingOptionsSearchCall) doRequest(alt string) (*http.Response, error) { 44791 reqHeaders := make(http.Header) 44792 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 44793 for k, v := range c.header_ { 44794 reqHeaders[k] = v 44795 } 44796 reqHeaders.Set("User-Agent", c.s.userAgent()) 44797 var body io.Reader = nil 44798 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchtargetingoptionsrequest) 44799 if err != nil { 44800 return nil, err 44801 } 44802 reqHeaders.Set("Content-Type", "application/json") 44803 c.urlParams_.Set("alt", alt) 44804 c.urlParams_.Set("prettyPrint", "false") 44805 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/targetingTypes/{+targetingType}/targetingOptions:search") 44806 urls += "?" + c.urlParams_.Encode() 44807 req, err := http.NewRequest("POST", urls, body) 44808 if err != nil { 44809 return nil, err 44810 } 44811 req.Header = reqHeaders 44812 googleapi.Expand(req.URL, map[string]string{ 44813 "targetingType": c.targetingType, 44814 }) 44815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 44816 } 44817 44818 // Do executes the "displayvideo.targetingTypes.targetingOptions.search" call. 44819 // Exactly one of *SearchTargetingOptionsResponse or error will be 44820 // non-nil. Any non-2xx status code is an error. Response headers are in 44821 // either *SearchTargetingOptionsResponse.ServerResponse.Header or (if a 44822 // response was returned at all) in error.(*googleapi.Error).Header. Use 44823 // googleapi.IsNotModified to check whether the returned error was 44824 // because http.StatusNotModified was returned. 44825 func (c *TargetingTypesTargetingOptionsSearchCall) Do(opts ...googleapi.CallOption) (*SearchTargetingOptionsResponse, error) { 44826 gensupport.SetOptions(c.urlParams_, opts...) 44827 res, err := c.doRequest("json") 44828 if res != nil && res.StatusCode == http.StatusNotModified { 44829 if res.Body != nil { 44830 res.Body.Close() 44831 } 44832 return nil, gensupport.WrapError(&googleapi.Error{ 44833 Code: res.StatusCode, 44834 Header: res.Header, 44835 }) 44836 } 44837 if err != nil { 44838 return nil, err 44839 } 44840 defer googleapi.CloseBody(res) 44841 if err := googleapi.CheckResponse(res); err != nil { 44842 return nil, gensupport.WrapError(err) 44843 } 44844 ret := &SearchTargetingOptionsResponse{ 44845 ServerResponse: googleapi.ServerResponse{ 44846 Header: res.Header, 44847 HTTPStatusCode: res.StatusCode, 44848 }, 44849 } 44850 target := &ret 44851 if err := gensupport.DecodeResponse(target, res); err != nil { 44852 return nil, err 44853 } 44854 return ret, nil 44855 // { 44856 // "description": "Searches for targeting options of a given type based on the given search terms.", 44857 // "flatPath": "v1/targetingTypes/{targetingTypesId}/targetingOptions:search", 44858 // "httpMethod": "POST", 44859 // "id": "displayvideo.targetingTypes.targetingOptions.search", 44860 // "parameterOrder": [ 44861 // "targetingType" 44862 // ], 44863 // "parameters": { 44864 // "targetingType": { 44865 // "description": "Required. The type of targeting options to retrieve. Accepted values are: * `TARGETING_TYPE_GEO_REGION` * `TARGETING_TYPE_POI` * `TARGETING_TYPE_BUSINESS_CHAIN`", 44866 // "enum": [ 44867 // "TARGETING_TYPE_UNSPECIFIED", 44868 // "TARGETING_TYPE_CHANNEL", 44869 // "TARGETING_TYPE_APP_CATEGORY", 44870 // "TARGETING_TYPE_APP", 44871 // "TARGETING_TYPE_URL", 44872 // "TARGETING_TYPE_DAY_AND_TIME", 44873 // "TARGETING_TYPE_AGE_RANGE", 44874 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 44875 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 44876 // "TARGETING_TYPE_GENDER", 44877 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 44878 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 44879 // "TARGETING_TYPE_PARENTAL_STATUS", 44880 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 44881 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 44882 // "TARGETING_TYPE_DEVICE_TYPE", 44883 // "TARGETING_TYPE_AUDIENCE_GROUP", 44884 // "TARGETING_TYPE_BROWSER", 44885 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 44886 // "TARGETING_TYPE_ON_SCREEN_POSITION", 44887 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 44888 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 44889 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 44890 // "TARGETING_TYPE_ENVIRONMENT", 44891 // "TARGETING_TYPE_CARRIER_AND_ISP", 44892 // "TARGETING_TYPE_OPERATING_SYSTEM", 44893 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 44894 // "TARGETING_TYPE_KEYWORD", 44895 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 44896 // "TARGETING_TYPE_VIEWABILITY", 44897 // "TARGETING_TYPE_CATEGORY", 44898 // "TARGETING_TYPE_INVENTORY_SOURCE", 44899 // "TARGETING_TYPE_LANGUAGE", 44900 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 44901 // "TARGETING_TYPE_GEO_REGION", 44902 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 44903 // "TARGETING_TYPE_EXCHANGE", 44904 // "TARGETING_TYPE_SUB_EXCHANGE", 44905 // "TARGETING_TYPE_POI", 44906 // "TARGETING_TYPE_BUSINESS_CHAIN", 44907 // "TARGETING_TYPE_CONTENT_DURATION", 44908 // "TARGETING_TYPE_CONTENT_STREAM_TYPE", 44909 // "TARGETING_TYPE_NATIVE_CONTENT_POSITION", 44910 // "TARGETING_TYPE_OMID", 44911 // "TARGETING_TYPE_AUDIO_CONTENT_TYPE", 44912 // "TARGETING_TYPE_CONTENT_GENRE" 44913 // ], 44914 // "enumDescriptions": [ 44915 // "Default value when type is not specified or is unknown in this version.", 44916 // "Target a channel (a custom group of related websites or apps).", 44917 // "Target an app category (for example, education or puzzle games).", 44918 // "Target a specific app (for example, Angry Birds).", 44919 // "Target a specific url (for example, quora.com).", 44920 // "Target ads during a chosen time period on a specific day.", 44921 // "Target ads to a specific age range (for example, 18-24).", 44922 // "Target ads to the specified regions on a regional location list.", 44923 // "Target ads to the specified points of interest on a proximity location list.", 44924 // "Target ads to a specific gender (for example, female or male).", 44925 // "Target a specific video player size for video ads.", 44926 // "Target user rewarded content for video ads.", 44927 // "Target ads to a specific parental status (for example, parent or not a parent).", 44928 // "Target video or audio ads in a specific content instream position (for example, pre-roll, mid-roll, or post-roll).", 44929 // "Target ads in a specific content outstream position.", 44930 // "Target ads to a specific device type (for example, tablet or connected TV).", 44931 // "Target ads to an audience or groups of audiences. Singleton field, at most one can exist on a single Lineitem at a time.", 44932 // "Target ads to specific web browsers (for example, Chrome).", 44933 // "Target ads to a specific household income range (for example, top 10%).", 44934 // "Target ads in a specific on screen position.", 44935 // "Filter web sites through third party verification (for example, IAS or DoubleVerify).", 44936 // "Filter web sites by specific digital content label ratings (for example, DL-MA: suitable only for mature audiences).", 44937 // "Filter website content by sensitive categories (for example, adult).", 44938 // "Target ads to a specific environment (for example, web or app).", 44939 // "Target ads to a specific network carrier or internet service provider (ISP) (for example, Comcast or Orange).", 44940 // "Target ads to a specific operating system (for example, macOS).", 44941 // "Target ads to a specific device make or model (for example, Roku or Samsung).", 44942 // "Target ads to a specific keyword (for example, dog or retriever).", 44943 // "Target ads to a specific negative keyword list.", 44944 // "Target ads to a specific viewability (for example, 80% viewable).", 44945 // "Target ads to a specific content category (for example, arts \u0026 entertainment).", 44946 // "Purchase impressions from specific deals and auction packages.", 44947 // "Target ads to a specific language (for example, English or Japanese).", 44948 // "Target ads to ads.txt authorized sellers. If no targeting option of this type is assigned, the resource uses the \"Authorized Direct Sellers and Resellers\" option by default.", 44949 // "Target ads to a specific regional location (for example, a city or state).", 44950 // "Purchase impressions from a group of deals and auction packages.", 44951 // "Purchase impressions from specific exchanges.", 44952 // "Purchase impressions from specific sub-exchanges.", 44953 // "Target ads around a specific point of interest, such as a notable building, a street address, or latitude/longitude coordinates.", 44954 // "Target ads around locations of a business chain within a specific geo region.", 44955 // "Target ads to a specific video content duration.", 44956 // "Target ads to a specific video content stream type.", 44957 // "Target ads to a specific native content position.", 44958 // "Target ads in an Open Measurement enabled inventory.", 44959 // "Target ads to a specific audio content type.", 44960 // "Target ads to a specific content genre." 44961 // ], 44962 // "location": "path", 44963 // "pattern": "^[^/]+$", 44964 // "required": true, 44965 // "type": "string" 44966 // } 44967 // }, 44968 // "path": "v1/targetingTypes/{+targetingType}/targetingOptions:search", 44969 // "request": { 44970 // "$ref": "SearchTargetingOptionsRequest" 44971 // }, 44972 // "response": { 44973 // "$ref": "SearchTargetingOptionsResponse" 44974 // }, 44975 // "scopes": [ 44976 // "https://www.googleapis.com/auth/display-video" 44977 // ] 44978 // } 44979 44980 } 44981 44982 // Pages invokes f for each page of results. 44983 // A non-nil error returned from f will halt the iteration. 44984 // The provided context supersedes any context provided to the Context method. 44985 func (c *TargetingTypesTargetingOptionsSearchCall) Pages(ctx context.Context, f func(*SearchTargetingOptionsResponse) error) error { 44986 c.ctx_ = ctx 44987 defer func(pt string) { c.searchtargetingoptionsrequest.PageToken = pt }(c.searchtargetingoptionsrequest.PageToken) // reset paging to original point 44988 for { 44989 x, err := c.Do() 44990 if err != nil { 44991 return err 44992 } 44993 if err := f(x); err != nil { 44994 return err 44995 } 44996 if x.NextPageToken == "" { 44997 return nil 44998 } 44999 c.searchtargetingoptionsrequest.PageToken = x.NextPageToken 45000 } 45001 } 45002 45003 // method id "displayvideo.users.bulkEditAssignedUserRoles": 45004 45005 type UsersBulkEditAssignedUserRolesCall struct { 45006 s *Service 45007 userId int64 45008 bulkeditassigneduserrolesrequest *BulkEditAssignedUserRolesRequest 45009 urlParams_ gensupport.URLParams 45010 ctx_ context.Context 45011 header_ http.Header 45012 } 45013 45014 // BulkEditAssignedUserRoles: Bulk edits user roles for a user. The 45015 // operation will delete the assigned user roles provided in 45016 // BulkEditAssignedUserRolesRequest.deletedAssignedUserRoles and then 45017 // assign the user roles provided in 45018 // BulkEditAssignedUserRolesRequest.createdAssignedUserRoles. This 45019 // method has unique authentication requirements. Read the prerequisites 45020 // in our Managing Users guide 45021 // (/display-video/api/guides/users/overview#prerequisites) before using 45022 // this method. The "Try this method" feature does not work for this 45023 // method. 45024 // 45025 // - userId: The ID of the user to which the assigned user roles belong. 45026 func (r *UsersService) BulkEditAssignedUserRoles(userId int64, bulkeditassigneduserrolesrequest *BulkEditAssignedUserRolesRequest) *UsersBulkEditAssignedUserRolesCall { 45027 c := &UsersBulkEditAssignedUserRolesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 45028 c.userId = userId 45029 c.bulkeditassigneduserrolesrequest = bulkeditassigneduserrolesrequest 45030 return c 45031 } 45032 45033 // Fields allows partial responses to be retrieved. See 45034 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 45035 // for more information. 45036 func (c *UsersBulkEditAssignedUserRolesCall) Fields(s ...googleapi.Field) *UsersBulkEditAssignedUserRolesCall { 45037 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 45038 return c 45039 } 45040 45041 // Context sets the context to be used in this call's Do method. Any 45042 // pending HTTP request will be aborted if the provided context is 45043 // canceled. 45044 func (c *UsersBulkEditAssignedUserRolesCall) Context(ctx context.Context) *UsersBulkEditAssignedUserRolesCall { 45045 c.ctx_ = ctx 45046 return c 45047 } 45048 45049 // Header returns an http.Header that can be modified by the caller to 45050 // add HTTP headers to the request. 45051 func (c *UsersBulkEditAssignedUserRolesCall) Header() http.Header { 45052 if c.header_ == nil { 45053 c.header_ = make(http.Header) 45054 } 45055 return c.header_ 45056 } 45057 45058 func (c *UsersBulkEditAssignedUserRolesCall) doRequest(alt string) (*http.Response, error) { 45059 reqHeaders := make(http.Header) 45060 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 45061 for k, v := range c.header_ { 45062 reqHeaders[k] = v 45063 } 45064 reqHeaders.Set("User-Agent", c.s.userAgent()) 45065 var body io.Reader = nil 45066 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditassigneduserrolesrequest) 45067 if err != nil { 45068 return nil, err 45069 } 45070 reqHeaders.Set("Content-Type", "application/json") 45071 c.urlParams_.Set("alt", alt) 45072 c.urlParams_.Set("prettyPrint", "false") 45073 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/users/{+userId}:bulkEditAssignedUserRoles") 45074 urls += "?" + c.urlParams_.Encode() 45075 req, err := http.NewRequest("POST", urls, body) 45076 if err != nil { 45077 return nil, err 45078 } 45079 req.Header = reqHeaders 45080 googleapi.Expand(req.URL, map[string]string{ 45081 "userId": strconv.FormatInt(c.userId, 10), 45082 }) 45083 return gensupport.SendRequest(c.ctx_, c.s.client, req) 45084 } 45085 45086 // Do executes the "displayvideo.users.bulkEditAssignedUserRoles" call. 45087 // Exactly one of *BulkEditAssignedUserRolesResponse or error will be 45088 // non-nil. Any non-2xx status code is an error. Response headers are in 45089 // either *BulkEditAssignedUserRolesResponse.ServerResponse.Header or 45090 // (if a response was returned at all) in 45091 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 45092 // whether the returned error was because http.StatusNotModified was 45093 // returned. 45094 func (c *UsersBulkEditAssignedUserRolesCall) Do(opts ...googleapi.CallOption) (*BulkEditAssignedUserRolesResponse, error) { 45095 gensupport.SetOptions(c.urlParams_, opts...) 45096 res, err := c.doRequest("json") 45097 if res != nil && res.StatusCode == http.StatusNotModified { 45098 if res.Body != nil { 45099 res.Body.Close() 45100 } 45101 return nil, gensupport.WrapError(&googleapi.Error{ 45102 Code: res.StatusCode, 45103 Header: res.Header, 45104 }) 45105 } 45106 if err != nil { 45107 return nil, err 45108 } 45109 defer googleapi.CloseBody(res) 45110 if err := googleapi.CheckResponse(res); err != nil { 45111 return nil, gensupport.WrapError(err) 45112 } 45113 ret := &BulkEditAssignedUserRolesResponse{ 45114 ServerResponse: googleapi.ServerResponse{ 45115 Header: res.Header, 45116 HTTPStatusCode: res.StatusCode, 45117 }, 45118 } 45119 target := &ret 45120 if err := gensupport.DecodeResponse(target, res); err != nil { 45121 return nil, err 45122 } 45123 return ret, nil 45124 // { 45125 // "description": "Bulk edits user roles for a user. The operation will delete the assigned user roles provided in BulkEditAssignedUserRolesRequest.deletedAssignedUserRoles and then assign the user roles provided in BulkEditAssignedUserRolesRequest.createdAssignedUserRoles. This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method. The \"Try this method\" feature does not work for this method.", 45126 // "flatPath": "v1/users/{usersId}:bulkEditAssignedUserRoles", 45127 // "httpMethod": "POST", 45128 // "id": "displayvideo.users.bulkEditAssignedUserRoles", 45129 // "parameterOrder": [ 45130 // "userId" 45131 // ], 45132 // "parameters": { 45133 // "userId": { 45134 // "description": "Required. The ID of the user to which the assigned user roles belong.", 45135 // "format": "int64", 45136 // "location": "path", 45137 // "pattern": "^[^/]+$", 45138 // "required": true, 45139 // "type": "string" 45140 // } 45141 // }, 45142 // "path": "v1/users/{+userId}:bulkEditAssignedUserRoles", 45143 // "request": { 45144 // "$ref": "BulkEditAssignedUserRolesRequest" 45145 // }, 45146 // "response": { 45147 // "$ref": "BulkEditAssignedUserRolesResponse" 45148 // }, 45149 // "scopes": [ 45150 // "https://www.googleapis.com/auth/display-video-user-management" 45151 // ] 45152 // } 45153 45154 } 45155 45156 // method id "displayvideo.users.create": 45157 45158 type UsersCreateCall struct { 45159 s *Service 45160 user *User 45161 urlParams_ gensupport.URLParams 45162 ctx_ context.Context 45163 header_ http.Header 45164 } 45165 45166 // Create: Creates a new user. Returns the newly created user if 45167 // successful. This method has unique authentication requirements. Read 45168 // the prerequisites in our Managing Users guide 45169 // (/display-video/api/guides/users/overview#prerequisites) before using 45170 // this method. The "Try this method" feature does not work for this 45171 // method. 45172 func (r *UsersService) Create(user *User) *UsersCreateCall { 45173 c := &UsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 45174 c.user = user 45175 return c 45176 } 45177 45178 // Fields allows partial responses to be retrieved. See 45179 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 45180 // for more information. 45181 func (c *UsersCreateCall) Fields(s ...googleapi.Field) *UsersCreateCall { 45182 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 45183 return c 45184 } 45185 45186 // Context sets the context to be used in this call's Do method. Any 45187 // pending HTTP request will be aborted if the provided context is 45188 // canceled. 45189 func (c *UsersCreateCall) Context(ctx context.Context) *UsersCreateCall { 45190 c.ctx_ = ctx 45191 return c 45192 } 45193 45194 // Header returns an http.Header that can be modified by the caller to 45195 // add HTTP headers to the request. 45196 func (c *UsersCreateCall) Header() http.Header { 45197 if c.header_ == nil { 45198 c.header_ = make(http.Header) 45199 } 45200 return c.header_ 45201 } 45202 45203 func (c *UsersCreateCall) doRequest(alt string) (*http.Response, error) { 45204 reqHeaders := make(http.Header) 45205 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 45206 for k, v := range c.header_ { 45207 reqHeaders[k] = v 45208 } 45209 reqHeaders.Set("User-Agent", c.s.userAgent()) 45210 var body io.Reader = nil 45211 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) 45212 if err != nil { 45213 return nil, err 45214 } 45215 reqHeaders.Set("Content-Type", "application/json") 45216 c.urlParams_.Set("alt", alt) 45217 c.urlParams_.Set("prettyPrint", "false") 45218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/users") 45219 urls += "?" + c.urlParams_.Encode() 45220 req, err := http.NewRequest("POST", urls, body) 45221 if err != nil { 45222 return nil, err 45223 } 45224 req.Header = reqHeaders 45225 return gensupport.SendRequest(c.ctx_, c.s.client, req) 45226 } 45227 45228 // Do executes the "displayvideo.users.create" call. 45229 // Exactly one of *User or error will be non-nil. Any non-2xx status 45230 // code is an error. Response headers are in either 45231 // *User.ServerResponse.Header or (if a response was returned at all) in 45232 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 45233 // whether the returned error was because http.StatusNotModified was 45234 // returned. 45235 func (c *UsersCreateCall) Do(opts ...googleapi.CallOption) (*User, error) { 45236 gensupport.SetOptions(c.urlParams_, opts...) 45237 res, err := c.doRequest("json") 45238 if res != nil && res.StatusCode == http.StatusNotModified { 45239 if res.Body != nil { 45240 res.Body.Close() 45241 } 45242 return nil, gensupport.WrapError(&googleapi.Error{ 45243 Code: res.StatusCode, 45244 Header: res.Header, 45245 }) 45246 } 45247 if err != nil { 45248 return nil, err 45249 } 45250 defer googleapi.CloseBody(res) 45251 if err := googleapi.CheckResponse(res); err != nil { 45252 return nil, gensupport.WrapError(err) 45253 } 45254 ret := &User{ 45255 ServerResponse: googleapi.ServerResponse{ 45256 Header: res.Header, 45257 HTTPStatusCode: res.StatusCode, 45258 }, 45259 } 45260 target := &ret 45261 if err := gensupport.DecodeResponse(target, res); err != nil { 45262 return nil, err 45263 } 45264 return ret, nil 45265 // { 45266 // "description": "Creates a new user. Returns the newly created user if successful. This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method. The \"Try this method\" feature does not work for this method.", 45267 // "flatPath": "v1/users", 45268 // "httpMethod": "POST", 45269 // "id": "displayvideo.users.create", 45270 // "parameterOrder": [], 45271 // "parameters": {}, 45272 // "path": "v1/users", 45273 // "request": { 45274 // "$ref": "User" 45275 // }, 45276 // "response": { 45277 // "$ref": "User" 45278 // }, 45279 // "scopes": [ 45280 // "https://www.googleapis.com/auth/display-video-user-management" 45281 // ] 45282 // } 45283 45284 } 45285 45286 // method id "displayvideo.users.delete": 45287 45288 type UsersDeleteCall struct { 45289 s *Service 45290 userId int64 45291 urlParams_ gensupport.URLParams 45292 ctx_ context.Context 45293 header_ http.Header 45294 } 45295 45296 // Delete: Deletes a user. This method has unique authentication 45297 // requirements. Read the prerequisites in our Managing Users guide 45298 // (/display-video/api/guides/users/overview#prerequisites) before using 45299 // this method. The "Try this method" feature does not work for this 45300 // method. 45301 // 45302 // - userId: The ID of the user to delete. 45303 func (r *UsersService) Delete(userId int64) *UsersDeleteCall { 45304 c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 45305 c.userId = userId 45306 return c 45307 } 45308 45309 // Fields allows partial responses to be retrieved. See 45310 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 45311 // for more information. 45312 func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall { 45313 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 45314 return c 45315 } 45316 45317 // Context sets the context to be used in this call's Do method. Any 45318 // pending HTTP request will be aborted if the provided context is 45319 // canceled. 45320 func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall { 45321 c.ctx_ = ctx 45322 return c 45323 } 45324 45325 // Header returns an http.Header that can be modified by the caller to 45326 // add HTTP headers to the request. 45327 func (c *UsersDeleteCall) Header() http.Header { 45328 if c.header_ == nil { 45329 c.header_ = make(http.Header) 45330 } 45331 return c.header_ 45332 } 45333 45334 func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) { 45335 reqHeaders := make(http.Header) 45336 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 45337 for k, v := range c.header_ { 45338 reqHeaders[k] = v 45339 } 45340 reqHeaders.Set("User-Agent", c.s.userAgent()) 45341 var body io.Reader = nil 45342 c.urlParams_.Set("alt", alt) 45343 c.urlParams_.Set("prettyPrint", "false") 45344 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/users/{+userId}") 45345 urls += "?" + c.urlParams_.Encode() 45346 req, err := http.NewRequest("DELETE", urls, body) 45347 if err != nil { 45348 return nil, err 45349 } 45350 req.Header = reqHeaders 45351 googleapi.Expand(req.URL, map[string]string{ 45352 "userId": strconv.FormatInt(c.userId, 10), 45353 }) 45354 return gensupport.SendRequest(c.ctx_, c.s.client, req) 45355 } 45356 45357 // Do executes the "displayvideo.users.delete" call. 45358 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 45359 // code is an error. Response headers are in either 45360 // *Empty.ServerResponse.Header or (if a response was returned at all) 45361 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 45362 // check whether the returned error was because http.StatusNotModified 45363 // was returned. 45364 func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 45365 gensupport.SetOptions(c.urlParams_, opts...) 45366 res, err := c.doRequest("json") 45367 if res != nil && res.StatusCode == http.StatusNotModified { 45368 if res.Body != nil { 45369 res.Body.Close() 45370 } 45371 return nil, gensupport.WrapError(&googleapi.Error{ 45372 Code: res.StatusCode, 45373 Header: res.Header, 45374 }) 45375 } 45376 if err != nil { 45377 return nil, err 45378 } 45379 defer googleapi.CloseBody(res) 45380 if err := googleapi.CheckResponse(res); err != nil { 45381 return nil, gensupport.WrapError(err) 45382 } 45383 ret := &Empty{ 45384 ServerResponse: googleapi.ServerResponse{ 45385 Header: res.Header, 45386 HTTPStatusCode: res.StatusCode, 45387 }, 45388 } 45389 target := &ret 45390 if err := gensupport.DecodeResponse(target, res); err != nil { 45391 return nil, err 45392 } 45393 return ret, nil 45394 // { 45395 // "description": "Deletes a user. This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method. The \"Try this method\" feature does not work for this method.", 45396 // "flatPath": "v1/users/{usersId}", 45397 // "httpMethod": "DELETE", 45398 // "id": "displayvideo.users.delete", 45399 // "parameterOrder": [ 45400 // "userId" 45401 // ], 45402 // "parameters": { 45403 // "userId": { 45404 // "description": "Required. The ID of the user to delete.", 45405 // "format": "int64", 45406 // "location": "path", 45407 // "pattern": "^[^/]+$", 45408 // "required": true, 45409 // "type": "string" 45410 // } 45411 // }, 45412 // "path": "v1/users/{+userId}", 45413 // "response": { 45414 // "$ref": "Empty" 45415 // }, 45416 // "scopes": [ 45417 // "https://www.googleapis.com/auth/display-video-user-management" 45418 // ] 45419 // } 45420 45421 } 45422 45423 // method id "displayvideo.users.get": 45424 45425 type UsersGetCall struct { 45426 s *Service 45427 userId int64 45428 urlParams_ gensupport.URLParams 45429 ifNoneMatch_ string 45430 ctx_ context.Context 45431 header_ http.Header 45432 } 45433 45434 // Get: Gets a user. This method has unique authentication requirements. 45435 // Read the prerequisites in our Managing Users guide 45436 // (/display-video/api/guides/users/overview#prerequisites) before using 45437 // this method. The "Try this method" feature does not work for this 45438 // method. 45439 // 45440 // - userId: The ID of the user to fetch. 45441 func (r *UsersService) Get(userId int64) *UsersGetCall { 45442 c := &UsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 45443 c.userId = userId 45444 return c 45445 } 45446 45447 // Fields allows partial responses to be retrieved. See 45448 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 45449 // for more information. 45450 func (c *UsersGetCall) Fields(s ...googleapi.Field) *UsersGetCall { 45451 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 45452 return c 45453 } 45454 45455 // IfNoneMatch sets the optional parameter which makes the operation 45456 // fail if the object's ETag matches the given value. This is useful for 45457 // getting updates only after the object has changed since the last 45458 // request. Use googleapi.IsNotModified to check whether the response 45459 // error from Do is the result of In-None-Match. 45460 func (c *UsersGetCall) IfNoneMatch(entityTag string) *UsersGetCall { 45461 c.ifNoneMatch_ = entityTag 45462 return c 45463 } 45464 45465 // Context sets the context to be used in this call's Do method. Any 45466 // pending HTTP request will be aborted if the provided context is 45467 // canceled. 45468 func (c *UsersGetCall) Context(ctx context.Context) *UsersGetCall { 45469 c.ctx_ = ctx 45470 return c 45471 } 45472 45473 // Header returns an http.Header that can be modified by the caller to 45474 // add HTTP headers to the request. 45475 func (c *UsersGetCall) Header() http.Header { 45476 if c.header_ == nil { 45477 c.header_ = make(http.Header) 45478 } 45479 return c.header_ 45480 } 45481 45482 func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) { 45483 reqHeaders := make(http.Header) 45484 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 45485 for k, v := range c.header_ { 45486 reqHeaders[k] = v 45487 } 45488 reqHeaders.Set("User-Agent", c.s.userAgent()) 45489 if c.ifNoneMatch_ != "" { 45490 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 45491 } 45492 var body io.Reader = nil 45493 c.urlParams_.Set("alt", alt) 45494 c.urlParams_.Set("prettyPrint", "false") 45495 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/users/{+userId}") 45496 urls += "?" + c.urlParams_.Encode() 45497 req, err := http.NewRequest("GET", urls, body) 45498 if err != nil { 45499 return nil, err 45500 } 45501 req.Header = reqHeaders 45502 googleapi.Expand(req.URL, map[string]string{ 45503 "userId": strconv.FormatInt(c.userId, 10), 45504 }) 45505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 45506 } 45507 45508 // Do executes the "displayvideo.users.get" call. 45509 // Exactly one of *User or error will be non-nil. Any non-2xx status 45510 // code is an error. Response headers are in either 45511 // *User.ServerResponse.Header or (if a response was returned at all) in 45512 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 45513 // whether the returned error was because http.StatusNotModified was 45514 // returned. 45515 func (c *UsersGetCall) Do(opts ...googleapi.CallOption) (*User, error) { 45516 gensupport.SetOptions(c.urlParams_, opts...) 45517 res, err := c.doRequest("json") 45518 if res != nil && res.StatusCode == http.StatusNotModified { 45519 if res.Body != nil { 45520 res.Body.Close() 45521 } 45522 return nil, gensupport.WrapError(&googleapi.Error{ 45523 Code: res.StatusCode, 45524 Header: res.Header, 45525 }) 45526 } 45527 if err != nil { 45528 return nil, err 45529 } 45530 defer googleapi.CloseBody(res) 45531 if err := googleapi.CheckResponse(res); err != nil { 45532 return nil, gensupport.WrapError(err) 45533 } 45534 ret := &User{ 45535 ServerResponse: googleapi.ServerResponse{ 45536 Header: res.Header, 45537 HTTPStatusCode: res.StatusCode, 45538 }, 45539 } 45540 target := &ret 45541 if err := gensupport.DecodeResponse(target, res); err != nil { 45542 return nil, err 45543 } 45544 return ret, nil 45545 // { 45546 // "description": "Gets a user. This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method. The \"Try this method\" feature does not work for this method.", 45547 // "flatPath": "v1/users/{usersId}", 45548 // "httpMethod": "GET", 45549 // "id": "displayvideo.users.get", 45550 // "parameterOrder": [ 45551 // "userId" 45552 // ], 45553 // "parameters": { 45554 // "userId": { 45555 // "description": "Required. The ID of the user to fetch.", 45556 // "format": "int64", 45557 // "location": "path", 45558 // "pattern": "^[^/]+$", 45559 // "required": true, 45560 // "type": "string" 45561 // } 45562 // }, 45563 // "path": "v1/users/{+userId}", 45564 // "response": { 45565 // "$ref": "User" 45566 // }, 45567 // "scopes": [ 45568 // "https://www.googleapis.com/auth/display-video-user-management" 45569 // ] 45570 // } 45571 45572 } 45573 45574 // method id "displayvideo.users.list": 45575 45576 type UsersListCall struct { 45577 s *Service 45578 urlParams_ gensupport.URLParams 45579 ifNoneMatch_ string 45580 ctx_ context.Context 45581 header_ http.Header 45582 } 45583 45584 // List: Lists users that are accessible to the current user. If two 45585 // users have user roles on the same partner or advertiser, they can 45586 // access each other. This method has unique authentication 45587 // requirements. Read the prerequisites in our Managing Users guide 45588 // (/display-video/api/guides/users/overview#prerequisites) before using 45589 // this method. The "Try this method" feature does not work for this 45590 // method. 45591 func (r *UsersService) List() *UsersListCall { 45592 c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 45593 return c 45594 } 45595 45596 // Filter sets the optional parameter "filter": Allows filtering by user 45597 // fields. Supported syntax: * Filter expressions are made up of one or 45598 // more restrictions. * Restrictions can be combined by the logical 45599 // operator `AND`. * A restriction has the form of `{field} {operator} 45600 // {value}`. * The `budget.budget_segments.date_range.end_date` field 45601 // must use the `LESS THAN (<)` operator. * The `displayName and `email` 45602 // field must use the `HAS (:)` operator. * All other fields must use 45603 // the `EQUALS (=)` operator. Supported fields: * 45604 // `assignedUserRole.advertiserId` * `assignedUserRole.entityType` * 45605 // This is synthetic field of `AssignedUserRole` used for filtering. 45606 // Identifies the type of entity to which the user role is assigned. 45607 // Valid values are `Partner` and `Advertiser`. * 45608 // `assignedUserRole.parentPartnerId` * This is a synthetic field of 45609 // `AssignedUserRole` used for filtering. Identifies the parent partner 45610 // of the entity to which the user role is assigned. * 45611 // `assignedUserRole.partnerId` * `assignedUserRole.userRole` * 45612 // `displayName` * `email` Examples: * The user with `displayName` 45613 // containing "foo": `displayName:"foo" * The user with `email` 45614 // containing "bar": `email:"bar" * All users with standard user roles: 45615 // `assignedUserRole.userRole="STANDARD" * All users with user roles 45616 // for partner 123: `assignedUserRole.partnerId="123" * All users with 45617 // user roles for advertiser 123: `assignedUserRole.advertiserId="123" 45618 // * All users with partner level user roles: `entityType="PARTNER" * 45619 // All users with user roles for partner 123 and advertisers under 45620 // partner 123: `parentPartnerId="123" The length of this field should 45621 // be no more than 500 characters. Reference our filter `LIST` requests 45622 // (/display-video/api/guides/how-tos/filters) guide for more 45623 // information. 45624 func (c *UsersListCall) Filter(filter string) *UsersListCall { 45625 c.urlParams_.Set("filter", filter) 45626 return c 45627 } 45628 45629 // OrderBy sets the optional parameter "orderBy": Field by which to sort 45630 // the list. Acceptable values are: * `displayName` (default) The 45631 // default sorting order is ascending. To specify descending order for a 45632 // field, a suffix "desc" should be added to the field name. For 45633 // example, `displayName desc`. 45634 func (c *UsersListCall) OrderBy(orderBy string) *UsersListCall { 45635 c.urlParams_.Set("orderBy", orderBy) 45636 return c 45637 } 45638 45639 // PageSize sets the optional parameter "pageSize": Requested page size. 45640 // Must be between `1` and `200`. If unspecified will default to `100`. 45641 func (c *UsersListCall) PageSize(pageSize int64) *UsersListCall { 45642 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 45643 return c 45644 } 45645 45646 // PageToken sets the optional parameter "pageToken": A token 45647 // identifying a page of results the server should return. Typically, 45648 // this is the value of next_page_token returned from the previous call 45649 // to `ListUsers` method. If not specified, the first page of results 45650 // will be returned. 45651 func (c *UsersListCall) PageToken(pageToken string) *UsersListCall { 45652 c.urlParams_.Set("pageToken", pageToken) 45653 return c 45654 } 45655 45656 // Fields allows partial responses to be retrieved. See 45657 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 45658 // for more information. 45659 func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall { 45660 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 45661 return c 45662 } 45663 45664 // IfNoneMatch sets the optional parameter which makes the operation 45665 // fail if the object's ETag matches the given value. This is useful for 45666 // getting updates only after the object has changed since the last 45667 // request. Use googleapi.IsNotModified to check whether the response 45668 // error from Do is the result of In-None-Match. 45669 func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall { 45670 c.ifNoneMatch_ = entityTag 45671 return c 45672 } 45673 45674 // Context sets the context to be used in this call's Do method. Any 45675 // pending HTTP request will be aborted if the provided context is 45676 // canceled. 45677 func (c *UsersListCall) Context(ctx context.Context) *UsersListCall { 45678 c.ctx_ = ctx 45679 return c 45680 } 45681 45682 // Header returns an http.Header that can be modified by the caller to 45683 // add HTTP headers to the request. 45684 func (c *UsersListCall) Header() http.Header { 45685 if c.header_ == nil { 45686 c.header_ = make(http.Header) 45687 } 45688 return c.header_ 45689 } 45690 45691 func (c *UsersListCall) doRequest(alt string) (*http.Response, error) { 45692 reqHeaders := make(http.Header) 45693 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 45694 for k, v := range c.header_ { 45695 reqHeaders[k] = v 45696 } 45697 reqHeaders.Set("User-Agent", c.s.userAgent()) 45698 if c.ifNoneMatch_ != "" { 45699 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 45700 } 45701 var body io.Reader = nil 45702 c.urlParams_.Set("alt", alt) 45703 c.urlParams_.Set("prettyPrint", "false") 45704 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/users") 45705 urls += "?" + c.urlParams_.Encode() 45706 req, err := http.NewRequest("GET", urls, body) 45707 if err != nil { 45708 return nil, err 45709 } 45710 req.Header = reqHeaders 45711 return gensupport.SendRequest(c.ctx_, c.s.client, req) 45712 } 45713 45714 // Do executes the "displayvideo.users.list" call. 45715 // Exactly one of *ListUsersResponse or error will be non-nil. Any 45716 // non-2xx status code is an error. Response headers are in either 45717 // *ListUsersResponse.ServerResponse.Header or (if a response was 45718 // returned at all) in error.(*googleapi.Error).Header. Use 45719 // googleapi.IsNotModified to check whether the returned error was 45720 // because http.StatusNotModified was returned. 45721 func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*ListUsersResponse, error) { 45722 gensupport.SetOptions(c.urlParams_, opts...) 45723 res, err := c.doRequest("json") 45724 if res != nil && res.StatusCode == http.StatusNotModified { 45725 if res.Body != nil { 45726 res.Body.Close() 45727 } 45728 return nil, gensupport.WrapError(&googleapi.Error{ 45729 Code: res.StatusCode, 45730 Header: res.Header, 45731 }) 45732 } 45733 if err != nil { 45734 return nil, err 45735 } 45736 defer googleapi.CloseBody(res) 45737 if err := googleapi.CheckResponse(res); err != nil { 45738 return nil, gensupport.WrapError(err) 45739 } 45740 ret := &ListUsersResponse{ 45741 ServerResponse: googleapi.ServerResponse{ 45742 Header: res.Header, 45743 HTTPStatusCode: res.StatusCode, 45744 }, 45745 } 45746 target := &ret 45747 if err := gensupport.DecodeResponse(target, res); err != nil { 45748 return nil, err 45749 } 45750 return ret, nil 45751 // { 45752 // "description": "Lists users that are accessible to the current user. If two users have user roles on the same partner or advertiser, they can access each other. This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method. The \"Try this method\" feature does not work for this method.", 45753 // "flatPath": "v1/users", 45754 // "httpMethod": "GET", 45755 // "id": "displayvideo.users.list", 45756 // "parameterOrder": [], 45757 // "parameters": { 45758 // "filter": { 45759 // "description": "Allows filtering by user fields. Supported syntax: * Filter expressions are made up of one or more restrictions. * Restrictions can be combined by the logical operator `AND`. * A restriction has the form of `{field} {operator} {value}`. * The `budget.budget_segments.date_range.end_date` field must use the `LESS THAN (\u003c)` operator. * The `displayName and `email` field must use the `HAS (:)` operator. * All other fields must use the `EQUALS (=)` operator. Supported fields: * `assignedUserRole.advertiserId` * `assignedUserRole.entityType` * This is synthetic field of `AssignedUserRole` used for filtering. Identifies the type of entity to which the user role is assigned. Valid values are `Partner` and `Advertiser`. * `assignedUserRole.parentPartnerId` * This is a synthetic field of `AssignedUserRole` used for filtering. Identifies the parent partner of the entity to which the user role is assigned. * `assignedUserRole.partnerId` * `assignedUserRole.userRole` * `displayName` * `email` Examples: * The user with `displayName` containing \"foo\": `displayName:\"foo\"` * The user with `email` containing \"bar\": `email:\"bar\"` * All users with standard user roles: `assignedUserRole.userRole=\"STANDARD\"` * All users with user roles for partner 123: `assignedUserRole.partnerId=\"123\"` * All users with user roles for advertiser 123: `assignedUserRole.advertiserId=\"123\"` * All users with partner level user roles: `entityType=\"PARTNER\"` * All users with user roles for partner 123 and advertisers under partner 123: `parentPartnerId=\"123\"` The length of this field should be no more than 500 characters. Reference our [filter `LIST` requests](/display-video/api/guides/how-tos/filters) guide for more information.", 45760 // "location": "query", 45761 // "type": "string" 45762 // }, 45763 // "orderBy": { 45764 // "description": "Field by which to sort the list. Acceptable values are: * `displayName` (default) The default sorting order is ascending. To specify descending order for a field, a suffix \"desc\" should be added to the field name. For example, `displayName desc`.", 45765 // "location": "query", 45766 // "type": "string" 45767 // }, 45768 // "pageSize": { 45769 // "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`.", 45770 // "format": "int32", 45771 // "location": "query", 45772 // "type": "integer" 45773 // }, 45774 // "pageToken": { 45775 // "description": "A token identifying a page of results the server should return. Typically, this is the value of next_page_token returned from the previous call to `ListUsers` method. If not specified, the first page of results will be returned.", 45776 // "location": "query", 45777 // "type": "string" 45778 // } 45779 // }, 45780 // "path": "v1/users", 45781 // "response": { 45782 // "$ref": "ListUsersResponse" 45783 // }, 45784 // "scopes": [ 45785 // "https://www.googleapis.com/auth/display-video-user-management" 45786 // ] 45787 // } 45788 45789 } 45790 45791 // Pages invokes f for each page of results. 45792 // A non-nil error returned from f will halt the iteration. 45793 // The provided context supersedes any context provided to the Context method. 45794 func (c *UsersListCall) Pages(ctx context.Context, f func(*ListUsersResponse) error) error { 45795 c.ctx_ = ctx 45796 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 45797 for { 45798 x, err := c.Do() 45799 if err != nil { 45800 return err 45801 } 45802 if err := f(x); err != nil { 45803 return err 45804 } 45805 if x.NextPageToken == "" { 45806 return nil 45807 } 45808 c.PageToken(x.NextPageToken) 45809 } 45810 } 45811 45812 // method id "displayvideo.users.patch": 45813 45814 type UsersPatchCall struct { 45815 s *Service 45816 userId int64 45817 user *User 45818 urlParams_ gensupport.URLParams 45819 ctx_ context.Context 45820 header_ http.Header 45821 } 45822 45823 // Patch: Updates an existing user. Returns the updated user if 45824 // successful. This method has unique authentication requirements. Read 45825 // the prerequisites in our Managing Users guide 45826 // (/display-video/api/guides/users/overview#prerequisites) before using 45827 // this method. The "Try this method" feature does not work for this 45828 // method. 45829 // 45830 // - userId: Output only. The unique ID of the user. Assigned by the 45831 // system. 45832 func (r *UsersService) Patch(userId int64, user *User) *UsersPatchCall { 45833 c := &UsersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 45834 c.userId = userId 45835 c.user = user 45836 return c 45837 } 45838 45839 // UpdateMask sets the optional parameter "updateMask": Required. The 45840 // mask to control which fields to update. 45841 func (c *UsersPatchCall) UpdateMask(updateMask string) *UsersPatchCall { 45842 c.urlParams_.Set("updateMask", updateMask) 45843 return c 45844 } 45845 45846 // Fields allows partial responses to be retrieved. See 45847 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 45848 // for more information. 45849 func (c *UsersPatchCall) Fields(s ...googleapi.Field) *UsersPatchCall { 45850 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 45851 return c 45852 } 45853 45854 // Context sets the context to be used in this call's Do method. Any 45855 // pending HTTP request will be aborted if the provided context is 45856 // canceled. 45857 func (c *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall { 45858 c.ctx_ = ctx 45859 return c 45860 } 45861 45862 // Header returns an http.Header that can be modified by the caller to 45863 // add HTTP headers to the request. 45864 func (c *UsersPatchCall) Header() http.Header { 45865 if c.header_ == nil { 45866 c.header_ = make(http.Header) 45867 } 45868 return c.header_ 45869 } 45870 45871 func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) { 45872 reqHeaders := make(http.Header) 45873 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 45874 for k, v := range c.header_ { 45875 reqHeaders[k] = v 45876 } 45877 reqHeaders.Set("User-Agent", c.s.userAgent()) 45878 var body io.Reader = nil 45879 body, err := googleapi.WithoutDataWrapper.JSONReader(c.user) 45880 if err != nil { 45881 return nil, err 45882 } 45883 reqHeaders.Set("Content-Type", "application/json") 45884 c.urlParams_.Set("alt", alt) 45885 c.urlParams_.Set("prettyPrint", "false") 45886 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/users/{+userId}") 45887 urls += "?" + c.urlParams_.Encode() 45888 req, err := http.NewRequest("PATCH", urls, body) 45889 if err != nil { 45890 return nil, err 45891 } 45892 req.Header = reqHeaders 45893 googleapi.Expand(req.URL, map[string]string{ 45894 "userId": strconv.FormatInt(c.userId, 10), 45895 }) 45896 return gensupport.SendRequest(c.ctx_, c.s.client, req) 45897 } 45898 45899 // Do executes the "displayvideo.users.patch" call. 45900 // Exactly one of *User or error will be non-nil. Any non-2xx status 45901 // code is an error. Response headers are in either 45902 // *User.ServerResponse.Header or (if a response was returned at all) in 45903 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 45904 // whether the returned error was because http.StatusNotModified was 45905 // returned. 45906 func (c *UsersPatchCall) Do(opts ...googleapi.CallOption) (*User, error) { 45907 gensupport.SetOptions(c.urlParams_, opts...) 45908 res, err := c.doRequest("json") 45909 if res != nil && res.StatusCode == http.StatusNotModified { 45910 if res.Body != nil { 45911 res.Body.Close() 45912 } 45913 return nil, gensupport.WrapError(&googleapi.Error{ 45914 Code: res.StatusCode, 45915 Header: res.Header, 45916 }) 45917 } 45918 if err != nil { 45919 return nil, err 45920 } 45921 defer googleapi.CloseBody(res) 45922 if err := googleapi.CheckResponse(res); err != nil { 45923 return nil, gensupport.WrapError(err) 45924 } 45925 ret := &User{ 45926 ServerResponse: googleapi.ServerResponse{ 45927 Header: res.Header, 45928 HTTPStatusCode: res.StatusCode, 45929 }, 45930 } 45931 target := &ret 45932 if err := gensupport.DecodeResponse(target, res); err != nil { 45933 return nil, err 45934 } 45935 return ret, nil 45936 // { 45937 // "description": "Updates an existing user. Returns the updated user if successful. This method has unique authentication requirements. Read the prerequisites in our [Managing Users guide](/display-video/api/guides/users/overview#prerequisites) before using this method. The \"Try this method\" feature does not work for this method.", 45938 // "flatPath": "v1/users/{usersId}", 45939 // "httpMethod": "PATCH", 45940 // "id": "displayvideo.users.patch", 45941 // "parameterOrder": [ 45942 // "userId" 45943 // ], 45944 // "parameters": { 45945 // "updateMask": { 45946 // "description": "Required. The mask to control which fields to update.", 45947 // "format": "google-fieldmask", 45948 // "location": "query", 45949 // "type": "string" 45950 // }, 45951 // "userId": { 45952 // "description": "Output only. The unique ID of the user. Assigned by the system.", 45953 // "format": "int64", 45954 // "location": "path", 45955 // "pattern": "^[^/]+$", 45956 // "required": true, 45957 // "type": "string" 45958 // } 45959 // }, 45960 // "path": "v1/users/{+userId}", 45961 // "request": { 45962 // "$ref": "User" 45963 // }, 45964 // "response": { 45965 // "$ref": "User" 45966 // }, 45967 // "scopes": [ 45968 // "https://www.googleapis.com/auth/display-video-user-management" 45969 // ] 45970 // } 45971 45972 } 45973