1// Copyright 2020 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package displayvideo provides access to the Display & Video 360 API. 8// 9// For product documentation, see: https://developers.google.com/display-video/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/displayvideo/v1" 16// ... 17// ctx := context.Background() 18// displayvideoService, err := displayvideo.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// displayvideoService, err := displayvideo.NewService(ctx, option.WithScopes(displayvideo.DoubleclickbidmanagerScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// displayvideoService, err := displayvideo.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// displayvideoService, err := displayvideo.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package displayvideo // import "google.golang.org/api/displayvideo/v1" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "displayvideo:v1" 79const apiName = "displayvideo" 80const apiVersion = "v1" 81const basePath = "https://displayvideo.googleapis.com/" 82 83// OAuth2 scopes used by this API. 84const ( 85 // Create, see, edit, and permanently delete your Display & Video 360 86 // entities and reports 87 DisplayVideoScope = "https://www.googleapis.com/auth/display-video" 88 89 // View and manage your reports in DoubleClick Bid Manager 90 DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager" 91) 92 93// NewService creates a new Service. 94func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 95 scopesOption := option.WithScopes( 96 "https://www.googleapis.com/auth/display-video", 97 "https://www.googleapis.com/auth/doubleclickbidmanager", 98 ) 99 // NOTE: prepend, so we don't override user-specified scopes. 100 opts = append([]option.ClientOption{scopesOption}, opts...) 101 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 102 client, endpoint, err := htransport.NewClient(ctx, opts...) 103 if err != nil { 104 return nil, err 105 } 106 s, err := New(client) 107 if err != nil { 108 return nil, err 109 } 110 if endpoint != "" { 111 s.BasePath = endpoint 112 } 113 return s, nil 114} 115 116// New creates a new Service. It uses the provided http.Client for requests. 117// 118// Deprecated: please use NewService instead. 119// To provide a custom HTTP client, use option.WithHTTPClient. 120// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 121func New(client *http.Client) (*Service, error) { 122 if client == nil { 123 return nil, errors.New("client is nil") 124 } 125 s := &Service{client: client, BasePath: basePath} 126 s.Advertisers = NewAdvertisersService(s) 127 s.CombinedAudiences = NewCombinedAudiencesService(s) 128 s.CustomLists = NewCustomListsService(s) 129 s.FirstAndThirdPartyAudiences = NewFirstAndThirdPartyAudiencesService(s) 130 s.FloodlightGroups = NewFloodlightGroupsService(s) 131 s.GoogleAudiences = NewGoogleAudiencesService(s) 132 s.InventorySourceGroups = NewInventorySourceGroupsService(s) 133 s.InventorySources = NewInventorySourcesService(s) 134 s.Media = NewMediaService(s) 135 s.Partners = NewPartnersService(s) 136 s.Sdfdownloadtasks = NewSdfdownloadtasksService(s) 137 s.TargetingTypes = NewTargetingTypesService(s) 138 return s, nil 139} 140 141type Service struct { 142 client *http.Client 143 BasePath string // API endpoint base URL 144 UserAgent string // optional additional User-Agent fragment 145 146 Advertisers *AdvertisersService 147 148 CombinedAudiences *CombinedAudiencesService 149 150 CustomLists *CustomListsService 151 152 FirstAndThirdPartyAudiences *FirstAndThirdPartyAudiencesService 153 154 FloodlightGroups *FloodlightGroupsService 155 156 GoogleAudiences *GoogleAudiencesService 157 158 InventorySourceGroups *InventorySourceGroupsService 159 160 InventorySources *InventorySourcesService 161 162 Media *MediaService 163 164 Partners *PartnersService 165 166 Sdfdownloadtasks *SdfdownloadtasksService 167 168 TargetingTypes *TargetingTypesService 169} 170 171func (s *Service) userAgent() string { 172 if s.UserAgent == "" { 173 return googleapi.UserAgent 174 } 175 return googleapi.UserAgent + " " + s.UserAgent 176} 177 178func NewAdvertisersService(s *Service) *AdvertisersService { 179 rs := &AdvertisersService{s: s} 180 rs.Assets = NewAdvertisersAssetsService(s) 181 rs.Campaigns = NewAdvertisersCampaignsService(s) 182 rs.Channels = NewAdvertisersChannelsService(s) 183 rs.Creatives = NewAdvertisersCreativesService(s) 184 rs.InsertionOrders = NewAdvertisersInsertionOrdersService(s) 185 rs.LineItems = NewAdvertisersLineItemsService(s) 186 rs.LocationLists = NewAdvertisersLocationListsService(s) 187 rs.NegativeKeywordLists = NewAdvertisersNegativeKeywordListsService(s) 188 return rs 189} 190 191type AdvertisersService struct { 192 s *Service 193 194 Assets *AdvertisersAssetsService 195 196 Campaigns *AdvertisersCampaignsService 197 198 Channels *AdvertisersChannelsService 199 200 Creatives *AdvertisersCreativesService 201 202 InsertionOrders *AdvertisersInsertionOrdersService 203 204 LineItems *AdvertisersLineItemsService 205 206 LocationLists *AdvertisersLocationListsService 207 208 NegativeKeywordLists *AdvertisersNegativeKeywordListsService 209} 210 211func NewAdvertisersAssetsService(s *Service) *AdvertisersAssetsService { 212 rs := &AdvertisersAssetsService{s: s} 213 return rs 214} 215 216type AdvertisersAssetsService struct { 217 s *Service 218} 219 220func NewAdvertisersCampaignsService(s *Service) *AdvertisersCampaignsService { 221 rs := &AdvertisersCampaignsService{s: s} 222 return rs 223} 224 225type AdvertisersCampaignsService struct { 226 s *Service 227} 228 229func NewAdvertisersChannelsService(s *Service) *AdvertisersChannelsService { 230 rs := &AdvertisersChannelsService{s: s} 231 return rs 232} 233 234type AdvertisersChannelsService struct { 235 s *Service 236} 237 238func NewAdvertisersCreativesService(s *Service) *AdvertisersCreativesService { 239 rs := &AdvertisersCreativesService{s: s} 240 return rs 241} 242 243type AdvertisersCreativesService struct { 244 s *Service 245} 246 247func NewAdvertisersInsertionOrdersService(s *Service) *AdvertisersInsertionOrdersService { 248 rs := &AdvertisersInsertionOrdersService{s: s} 249 return rs 250} 251 252type AdvertisersInsertionOrdersService struct { 253 s *Service 254} 255 256func NewAdvertisersLineItemsService(s *Service) *AdvertisersLineItemsService { 257 rs := &AdvertisersLineItemsService{s: s} 258 rs.TargetingTypes = NewAdvertisersLineItemsTargetingTypesService(s) 259 return rs 260} 261 262type AdvertisersLineItemsService struct { 263 s *Service 264 265 TargetingTypes *AdvertisersLineItemsTargetingTypesService 266} 267 268func NewAdvertisersLineItemsTargetingTypesService(s *Service) *AdvertisersLineItemsTargetingTypesService { 269 rs := &AdvertisersLineItemsTargetingTypesService{s: s} 270 rs.AssignedTargetingOptions = NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s) 271 return rs 272} 273 274type AdvertisersLineItemsTargetingTypesService struct { 275 s *Service 276 277 AssignedTargetingOptions *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService 278} 279 280func NewAdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService(s *Service) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService { 281 rs := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService{s: s} 282 return rs 283} 284 285type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService struct { 286 s *Service 287} 288 289func NewAdvertisersLocationListsService(s *Service) *AdvertisersLocationListsService { 290 rs := &AdvertisersLocationListsService{s: s} 291 return rs 292} 293 294type AdvertisersLocationListsService struct { 295 s *Service 296} 297 298func NewAdvertisersNegativeKeywordListsService(s *Service) *AdvertisersNegativeKeywordListsService { 299 rs := &AdvertisersNegativeKeywordListsService{s: s} 300 return rs 301} 302 303type AdvertisersNegativeKeywordListsService struct { 304 s *Service 305} 306 307func NewCombinedAudiencesService(s *Service) *CombinedAudiencesService { 308 rs := &CombinedAudiencesService{s: s} 309 return rs 310} 311 312type CombinedAudiencesService struct { 313 s *Service 314} 315 316func NewCustomListsService(s *Service) *CustomListsService { 317 rs := &CustomListsService{s: s} 318 return rs 319} 320 321type CustomListsService struct { 322 s *Service 323} 324 325func NewFirstAndThirdPartyAudiencesService(s *Service) *FirstAndThirdPartyAudiencesService { 326 rs := &FirstAndThirdPartyAudiencesService{s: s} 327 return rs 328} 329 330type FirstAndThirdPartyAudiencesService struct { 331 s *Service 332} 333 334func NewFloodlightGroupsService(s *Service) *FloodlightGroupsService { 335 rs := &FloodlightGroupsService{s: s} 336 return rs 337} 338 339type FloodlightGroupsService struct { 340 s *Service 341} 342 343func NewGoogleAudiencesService(s *Service) *GoogleAudiencesService { 344 rs := &GoogleAudiencesService{s: s} 345 return rs 346} 347 348type GoogleAudiencesService struct { 349 s *Service 350} 351 352func NewInventorySourceGroupsService(s *Service) *InventorySourceGroupsService { 353 rs := &InventorySourceGroupsService{s: s} 354 return rs 355} 356 357type InventorySourceGroupsService struct { 358 s *Service 359} 360 361func NewInventorySourcesService(s *Service) *InventorySourcesService { 362 rs := &InventorySourcesService{s: s} 363 return rs 364} 365 366type InventorySourcesService struct { 367 s *Service 368} 369 370func NewMediaService(s *Service) *MediaService { 371 rs := &MediaService{s: s} 372 return rs 373} 374 375type MediaService struct { 376 s *Service 377} 378 379func NewPartnersService(s *Service) *PartnersService { 380 rs := &PartnersService{s: s} 381 rs.Channels = NewPartnersChannelsService(s) 382 return rs 383} 384 385type PartnersService struct { 386 s *Service 387 388 Channels *PartnersChannelsService 389} 390 391func NewPartnersChannelsService(s *Service) *PartnersChannelsService { 392 rs := &PartnersChannelsService{s: s} 393 return rs 394} 395 396type PartnersChannelsService struct { 397 s *Service 398} 399 400func NewSdfdownloadtasksService(s *Service) *SdfdownloadtasksService { 401 rs := &SdfdownloadtasksService{s: s} 402 rs.Operations = NewSdfdownloadtasksOperationsService(s) 403 return rs 404} 405 406type SdfdownloadtasksService struct { 407 s *Service 408 409 Operations *SdfdownloadtasksOperationsService 410} 411 412func NewSdfdownloadtasksOperationsService(s *Service) *SdfdownloadtasksOperationsService { 413 rs := &SdfdownloadtasksOperationsService{s: s} 414 return rs 415} 416 417type SdfdownloadtasksOperationsService struct { 418 s *Service 419} 420 421func NewTargetingTypesService(s *Service) *TargetingTypesService { 422 rs := &TargetingTypesService{s: s} 423 rs.TargetingOptions = NewTargetingTypesTargetingOptionsService(s) 424 return rs 425} 426 427type TargetingTypesService struct { 428 s *Service 429 430 TargetingOptions *TargetingTypesTargetingOptionsService 431} 432 433func NewTargetingTypesTargetingOptionsService(s *Service) *TargetingTypesTargetingOptionsService { 434 rs := &TargetingTypesTargetingOptionsService{s: s} 435 return rs 436} 437 438type TargetingTypesTargetingOptionsService struct { 439 s *Service 440} 441 442// ActiveViewVideoViewabilityMetricConfig: Configuration for custom 443// Active View video viewability metrics. 444type ActiveViewVideoViewabilityMetricConfig struct { 445 // DisplayName: Required. The display name of the custom metric. 446 DisplayName string `json:"displayName,omitempty"` 447 448 // MinimumDuration: The minimum visible video duration required (in 449 // seconds) in order for an 450 // impression to be recorded. 451 // 452 // You must specify 453 // minimum_duration, 454 // minimum_quartile 455 // or both. If both are specified, an impression meets the metric 456 // criteria if 457 // either requirement is met (whichever happens first). 458 // 459 // Possible values: 460 // "VIDEO_DURATION_UNSPECIFIED" - Value is not specified or is unknown 461 // in this version. 462 // "VIDEO_DURATION_SECONDS_NONE" - No duration value. 463 // "VIDEO_DURATION_SECONDS_0" - 0 seconds. 464 // "VIDEO_DURATION_SECONDS_1" - 1 second. 465 // "VIDEO_DURATION_SECONDS_2" - 2 seconds. 466 // "VIDEO_DURATION_SECONDS_3" - 3 seconds. 467 // "VIDEO_DURATION_SECONDS_4" - 4 seconds. 468 // "VIDEO_DURATION_SECONDS_5" - 5 seconds. 469 // "VIDEO_DURATION_SECONDS_6" - 6 seconds. 470 // "VIDEO_DURATION_SECONDS_7" - 7 seconds. 471 // "VIDEO_DURATION_SECONDS_8" - 8 seconds. 472 // "VIDEO_DURATION_SECONDS_9" - 9 seconds. 473 // "VIDEO_DURATION_SECONDS_10" - 10 seconds. 474 // "VIDEO_DURATION_SECONDS_11" - 11 seconds. 475 // "VIDEO_DURATION_SECONDS_12" - 12 seconds. 476 // "VIDEO_DURATION_SECONDS_13" - 13 seconds. 477 // "VIDEO_DURATION_SECONDS_14" - 14 seconds. 478 // "VIDEO_DURATION_SECONDS_15" - 15 seconds. 479 // "VIDEO_DURATION_SECONDS_30" - 30 seconds. 480 // "VIDEO_DURATION_SECONDS_45" - 45 seconds. 481 // "VIDEO_DURATION_SECONDS_60" - 60 seconds. 482 MinimumDuration string `json:"minimumDuration,omitempty"` 483 484 // MinimumQuartile: The minimum visible video duration required, based 485 // on the video quartiles, 486 // in order for an impression to be recorded. 487 // 488 // You must specify 489 // minimum_duration, 490 // minimum_quartile 491 // or both. If both are specified, an impression meets the metric 492 // criteria if 493 // either requirement is met (whichever happens first). 494 // 495 // Possible values: 496 // "VIDEO_DURATION_QUARTILE_UNSPECIFIED" - Value is not specified or 497 // is unknown in this version. 498 // "VIDEO_DURATION_QUARTILE_NONE" - No quartile value. 499 // "VIDEO_DURATION_QUARTILE_FIRST" - First quartile. 500 // "VIDEO_DURATION_QUARTILE_SECOND" - Second quartile (midpoint). 501 // "VIDEO_DURATION_QUARTILE_THIRD" - Third quartile. 502 // "VIDEO_DURATION_QUARTILE_FOURTH" - Fourth quartile (completion). 503 MinimumQuartile string `json:"minimumQuartile,omitempty"` 504 505 // MinimumViewability: Required. The minimum percentage of the video 506 // ad's pixels visible on the screen in 507 // order for an impression to be recorded. 508 // 509 // Possible values: 510 // "VIEWABILITY_PERCENT_UNSPECIFIED" - Value is not specified or is 511 // unknown in this version. 512 // "VIEWABILITY_PERCENT_0" - 0% viewable. 513 // "VIEWABILITY_PERCENT_25" - 25% viewable. 514 // "VIEWABILITY_PERCENT_50" - 50% viewable. 515 // "VIEWABILITY_PERCENT_75" - 75% viewable. 516 // "VIEWABILITY_PERCENT_100" - 100% viewable. 517 MinimumViewability string `json:"minimumViewability,omitempty"` 518 519 // MinimumVolume: Required. The minimum percentage of the video ad's 520 // volume required in order for an 521 // impression to be recorded. 522 // 523 // Possible values: 524 // "VIDEO_VOLUME_PERCENT_UNSPECIFIED" - Value is not specified or is 525 // unknown in this version. 526 // "VIDEO_VOLUME_PERCENT_0" - 0% volume. 527 // "VIDEO_VOLUME_PERCENT_10" - 10% volume. 528 MinimumVolume string `json:"minimumVolume,omitempty"` 529 530 // ForceSendFields is a list of field names (e.g. "DisplayName") to 531 // unconditionally include in API requests. By default, fields with 532 // empty values are omitted from API requests. However, any non-pointer, 533 // non-interface field appearing in ForceSendFields will be sent to the 534 // server regardless of whether the field is empty or not. This may be 535 // used to include empty fields in Patch requests. 536 ForceSendFields []string `json:"-"` 537 538 // NullFields is a list of field names (e.g. "DisplayName") to include 539 // in API requests with the JSON null value. By default, fields with 540 // empty values are omitted from API requests. However, any field with 541 // an empty value appearing in NullFields will be sent to the server as 542 // null. It is an error if a field in this list has a non-empty value. 543 // This may be used to include null fields in Patch requests. 544 NullFields []string `json:"-"` 545} 546 547func (s *ActiveViewVideoViewabilityMetricConfig) MarshalJSON() ([]byte, error) { 548 type NoMethod ActiveViewVideoViewabilityMetricConfig 549 raw := NoMethod(*s) 550 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 551} 552 553// Adloox: Details of Adloox settings. 554type Adloox struct { 555 // ExcludedAdlooxCategories: Adloox's brand safety settings. 556 // 557 // Possible values: 558 // "ADLOOX_UNSPECIFIED" - This enum is only a placeholder and it 559 // doesn't specify any Adloox option. 560 // "ADULT_CONTENT_HARD" - Adult content (hard). 561 // "ADULT_CONTENT_SOFT" - Adult content (soft). 562 // "ILLEGAL_CONTENT" - Illegal content. 563 // "BORDERLINE_CONTENT" - Borderline content. 564 // "DISCRIMINATORY_CONTENT" - Discriminatory content. 565 // "VIOLENT_CONTENT_WEAPONS" - Violent content & weapons. 566 // "LOW_VIEWABILITY_DOMAINS" - Low viewability domains. 567 // "FRAUD" - Fraud. 568 ExcludedAdlooxCategories []string `json:"excludedAdlooxCategories,omitempty"` 569 570 // ForceSendFields is a list of field names (e.g. 571 // "ExcludedAdlooxCategories") to unconditionally include in API 572 // requests. By default, fields with empty values are omitted from API 573 // requests. However, any non-pointer, non-interface field appearing in 574 // ForceSendFields will be sent to the server regardless of whether the 575 // field is empty or not. This may be used to include empty fields in 576 // Patch requests. 577 ForceSendFields []string `json:"-"` 578 579 // NullFields is a list of field names (e.g. "ExcludedAdlooxCategories") 580 // to include in API requests with the JSON null value. By default, 581 // fields with empty values are omitted from API requests. However, any 582 // field with an empty value appearing in NullFields will be sent to the 583 // server as null. It is an error if a field in this list has a 584 // non-empty value. This may be used to include null fields in Patch 585 // requests. 586 NullFields []string `json:"-"` 587} 588 589func (s *Adloox) MarshalJSON() ([]byte, error) { 590 type NoMethod Adloox 591 raw := NoMethod(*s) 592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 593} 594 595// Advertiser: A single advertiser in Display & Video 360 (DV360). 596type Advertiser struct { 597 // AdServerConfig: Required. Immutable. Ad server related settings of 598 // the advertiser. 599 AdServerConfig *AdvertiserAdServerConfig `json:"adServerConfig,omitempty"` 600 601 // AdvertiserId: Output only. The unique ID of the advertiser. Assigned 602 // by the system. 603 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 604 605 // CreativeConfig: Required. Creative related settings of the 606 // advertiser. 607 CreativeConfig *AdvertiserCreativeConfig `json:"creativeConfig,omitempty"` 608 609 // DataAccessConfig: Settings that control how advertiser data may be 610 // accessed. 611 DataAccessConfig *AdvertiserDataAccessConfig `json:"dataAccessConfig,omitempty"` 612 613 // DisplayName: Required. The display name of the advertiser. 614 // 615 // Must be UTF-8 encoded with a maximum size of 240 bytes. 616 DisplayName string `json:"displayName,omitempty"` 617 618 // EntityStatus: Required. Controls whether or not insertion orders and 619 // line items of the 620 // advertiser can spend their budgets and bid on inventory. 621 // 622 // * Accepted values are `ENTITY_STATUS_ACTIVE` 623 // and 624 // `ENTITY_STATUS_SCHEDULED_FOR_DELETION`. 625 // * If set to 626 // `ENTITY_STATUS_SCHEDULED_FOR_DELETION`, the advertiser will be 627 // deleted 30 628 // days from when it was first scheduled for deletion. 629 // 630 // Possible values: 631 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 632 // specified or is unknown in this version. 633 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 634 // budget. 635 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 636 // budget spending are disabled. An 637 // entity can be deleted after archived. Deleted entities cannot be 638 // retrieved. 639 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 640 // budget spending are disabled. 641 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 642 // the entity. 643 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 644 // for deletion. 645 EntityStatus string `json:"entityStatus,omitempty"` 646 647 // GeneralConfig: Required. General settings of the advertiser. 648 GeneralConfig *AdvertiserGeneralConfig `json:"generalConfig,omitempty"` 649 650 // IntegrationDetails: Integration details of the advertiser. 651 // Only integrationCode is currently 652 // applicable to advertiser. Other fields of IntegrationDetails are 653 // not 654 // supported and will be ignored if provided. 655 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"` 656 657 // Name: Output only. The resource name of the advertiser. 658 Name string `json:"name,omitempty"` 659 660 // PartnerId: Required. Immutable. The unique ID of the partner that the 661 // advertiser belongs to. 662 PartnerId int64 `json:"partnerId,omitempty,string"` 663 664 // UpdateTime: Output only. The timestamp when the advertiser was last 665 // updated. Assigned by the system. 666 UpdateTime string `json:"updateTime,omitempty"` 667 668 // ServerResponse contains the HTTP response code and headers from the 669 // server. 670 googleapi.ServerResponse `json:"-"` 671 672 // ForceSendFields is a list of field names (e.g. "AdServerConfig") to 673 // unconditionally include in API requests. By default, fields with 674 // empty values are omitted from API requests. However, any non-pointer, 675 // non-interface field appearing in ForceSendFields will be sent to the 676 // server regardless of whether the field is empty or not. This may be 677 // used to include empty fields in Patch requests. 678 ForceSendFields []string `json:"-"` 679 680 // NullFields is a list of field names (e.g. "AdServerConfig") to 681 // include in API requests with the JSON null value. By default, fields 682 // with empty values are omitted from API requests. However, any field 683 // with an empty value appearing in NullFields will be sent to the 684 // server as null. It is an error if a field in this list has a 685 // non-empty value. This may be used to include null fields in Patch 686 // requests. 687 NullFields []string `json:"-"` 688} 689 690func (s *Advertiser) MarshalJSON() ([]byte, error) { 691 type NoMethod Advertiser 692 raw := NoMethod(*s) 693 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 694} 695 696// AdvertiserAdServerConfig: Ad server related settings of an 697// advertiser. 698type AdvertiserAdServerConfig struct { 699 // CmHybridConfig: The configuration for advertisers that use both 700 // Campaign Manager (CM) and 701 // third-party ad servers. 702 CmHybridConfig *CmHybridConfig `json:"cmHybridConfig,omitempty"` 703 704 // ThirdPartyOnlyConfig: The configuration for advertisers that use 705 // third-party ad servers 706 // only. 707 ThirdPartyOnlyConfig *ThirdPartyOnlyConfig `json:"thirdPartyOnlyConfig,omitempty"` 708 709 // ForceSendFields is a list of field names (e.g. "CmHybridConfig") to 710 // unconditionally include in API requests. By default, fields with 711 // empty values are omitted from API requests. However, any non-pointer, 712 // non-interface field appearing in ForceSendFields will be sent to the 713 // server regardless of whether the field is empty or not. This may be 714 // used to include empty fields in Patch requests. 715 ForceSendFields []string `json:"-"` 716 717 // NullFields is a list of field names (e.g. "CmHybridConfig") to 718 // include in API requests with the JSON null value. By default, fields 719 // with empty values are omitted from API requests. However, any field 720 // with an empty value appearing in NullFields will be sent to the 721 // server as null. It is an error if a field in this list has a 722 // non-empty value. This may be used to include null fields in Patch 723 // requests. 724 NullFields []string `json:"-"` 725} 726 727func (s *AdvertiserAdServerConfig) MarshalJSON() ([]byte, error) { 728 type NoMethod AdvertiserAdServerConfig 729 raw := NoMethod(*s) 730 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 731} 732 733// AdvertiserCreativeConfig: Creatives related settings of an 734// advertiser. 735type AdvertiserCreativeConfig struct { 736 // DynamicCreativeEnabled: Whether or not the advertiser is enabled for 737 // dynamic creatives. 738 DynamicCreativeEnabled bool `json:"dynamicCreativeEnabled,omitempty"` 739 740 // IasClientId: An ID for configuring campaign monitoring provided by 741 // Integral Ad Service 742 // (IAS). The DV360 system will append an IAS "Campaign Monitor" 743 // tag 744 // containing this ID to the creative tag. 745 IasClientId int64 `json:"iasClientId,omitempty,string"` 746 747 // ObaComplianceDisabled: Whether or not to use DV360's Online 748 // Behavioral Advertising (OBA) 749 // compliance. 750 // 751 // Warning: Changing OBA settings may cause the audit status of your 752 // creatives 753 // to be reset by some ad exchanges, making them ineligible to serve 754 // until 755 // they are re-approved. 756 ObaComplianceDisabled bool `json:"obaComplianceDisabled,omitempty"` 757 758 // VideoCreativeDataSharingAuthorized: By setting this field to `true`, 759 // you, on behalf of your company, 760 // authorize Google to use video creatives associated with this Display 761 // & 762 // Video 360 advertiser to provide reporting and features related to 763 // the 764 // advertiser's television campaigns. 765 // 766 // Applicable only when the advertiser has a 767 // CM hybrid ad server 768 // configuration. 769 VideoCreativeDataSharingAuthorized bool `json:"videoCreativeDataSharingAuthorized,omitempty"` 770 771 // ForceSendFields is a list of field names (e.g. 772 // "DynamicCreativeEnabled") to unconditionally include in API requests. 773 // By default, fields with empty values are omitted from API requests. 774 // However, any non-pointer, non-interface field appearing in 775 // ForceSendFields will be sent to the server regardless of whether the 776 // field is empty or not. This may be used to include empty fields in 777 // Patch requests. 778 ForceSendFields []string `json:"-"` 779 780 // NullFields is a list of field names (e.g. "DynamicCreativeEnabled") 781 // to include in API requests with the JSON null value. By default, 782 // fields with empty values are omitted from API requests. However, any 783 // field with an empty value appearing in NullFields will be sent to the 784 // server as null. It is an error if a field in this list has a 785 // non-empty value. This may be used to include null fields in Patch 786 // requests. 787 NullFields []string `json:"-"` 788} 789 790func (s *AdvertiserCreativeConfig) MarshalJSON() ([]byte, error) { 791 type NoMethod AdvertiserCreativeConfig 792 raw := NoMethod(*s) 793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 794} 795 796// AdvertiserDataAccessConfig: Settings that control how advertiser 797// related data may be accessed. 798type AdvertiserDataAccessConfig struct { 799 // SdfConfig: Structured Data Files (SDF) settings for the 800 // advertiser. 801 // 802 // If not specified, the SDF settings of the parent partner are used. 803 SdfConfig *AdvertiserSdfConfig `json:"sdfConfig,omitempty"` 804 805 // ForceSendFields is a list of field names (e.g. "SdfConfig") to 806 // unconditionally include in API requests. By default, fields with 807 // empty values are omitted from API requests. However, any non-pointer, 808 // non-interface field appearing in ForceSendFields will be sent to the 809 // server regardless of whether the field is empty or not. This may be 810 // used to include empty fields in Patch requests. 811 ForceSendFields []string `json:"-"` 812 813 // NullFields is a list of field names (e.g. "SdfConfig") to include in 814 // API requests with the JSON null value. By default, fields with empty 815 // values are omitted from API requests. However, any field with an 816 // empty value appearing in NullFields will be sent to the server as 817 // null. It is an error if a field in this list has a non-empty value. 818 // This may be used to include null fields in Patch requests. 819 NullFields []string `json:"-"` 820} 821 822func (s *AdvertiserDataAccessConfig) MarshalJSON() ([]byte, error) { 823 type NoMethod AdvertiserDataAccessConfig 824 raw := NoMethod(*s) 825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 826} 827 828// AdvertiserGeneralConfig: General settings of an advertiser. 829type AdvertiserGeneralConfig struct { 830 // CurrencyCode: Required. Immutable. Advertiser's currency in ISO 4217 831 // format. 832 // 833 // Accepted codes and the currencies they represent are: 834 // 835 // Currency Code : Currency Name 836 // 837 // * `ARS` : Argentine Peso 838 // * `AUD` : Australian Dollar 839 // * `BRL` : Brazilian Real 840 // * `CAD` : Canadian Dollar 841 // * `CHF` : Swiss Franc 842 // * `CLP` : Chilean Peso 843 // * `CNY` : Chinese Yuan 844 // * `COP` : Colombian Peso 845 // * `CZK` : Czech Koruna 846 // * `DKK` : Danish Krone 847 // * `EGP` : Egyption Pound 848 // * `EUR` : Euro 849 // * `GBP` : British Pound 850 // * `HKD` : Hong Kong Dollar 851 // * `HUF` : Hungarian Forint 852 // * `IDR` : Indonesian Rupiah 853 // * `ILS` : Israeli Shekel 854 // * `INR` : Indian Rupee 855 // * `JPY` : Japanese Yen 856 // * `KRW` : South Korean Won 857 // * `MXN` : Mexican Pesos 858 // * `MYR` : Malaysian Ringgit 859 // * `NGN` : Nigerian Naira 860 // * `NOK` : Norwegian Krone 861 // * `NZD` : New Zealand Dollar 862 // * `PEN` : Peruvian Nuevo Sol 863 // * `PLN` : Polish Zloty 864 // * `RON` : New Romanian Leu 865 // * `RUB` : Russian Ruble 866 // * `SEK` : Swedish Krona 867 // * `TRY` : Turkish Lira 868 // * `TWD` : New Taiwan Dollar 869 // * `USD` : US Dollar 870 // * `ZAR` : South African Rand 871 CurrencyCode string `json:"currencyCode,omitempty"` 872 873 // DomainUrl: Required. The domain URL of the advertiser's primary 874 // website. 875 // The system will send this information to publishers that require 876 // website 877 // URL to associate a campaign with an advertiser. 878 // 879 // Provide a URL with no path or query string, beginning with `http:` 880 // or 881 // `https:`. 882 // For example, http://www.example.com 883 DomainUrl string `json:"domainUrl,omitempty"` 884 885 // TimeZone: Output only. The standard TZ database name of the 886 // advertiser's time zone. 887 // For example, `America/New_York`. 888 // 889 // See more 890 // at: 891 // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 892 // 893 // For CM hybrid advertisers, the time zone is the same as that of 894 // the 895 // associated CM account; for third-party only advertisers, the time 896 // zone is 897 // the same as that of the parent partner. 898 TimeZone string `json:"timeZone,omitempty"` 899 900 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 901 // unconditionally include in API requests. By default, fields with 902 // empty values are omitted from API requests. However, any non-pointer, 903 // non-interface field appearing in ForceSendFields will be sent to the 904 // server regardless of whether the field is empty or not. This may be 905 // used to include empty fields in Patch requests. 906 ForceSendFields []string `json:"-"` 907 908 // NullFields is a list of field names (e.g. "CurrencyCode") to include 909 // in API requests with the JSON null value. By default, fields with 910 // empty values are omitted from API requests. However, any field with 911 // an empty value appearing in NullFields will be sent to the server as 912 // null. It is an error if a field in this list has a non-empty value. 913 // This may be used to include null fields in Patch requests. 914 NullFields []string `json:"-"` 915} 916 917func (s *AdvertiserGeneralConfig) MarshalJSON() ([]byte, error) { 918 type NoMethod AdvertiserGeneralConfig 919 raw := NoMethod(*s) 920 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 921} 922 923// AdvertiserSdfConfig: Structured Data Files (SDF) settings of an 924// advertiser. 925type AdvertiserSdfConfig struct { 926 // OverridePartnerSdfConfig: Whether or not this advertiser overrides 927 // the SDF configuration of its 928 // parent partner. 929 // 930 // By default, an advertiser inherits the SDF configuration from the 931 // parent 932 // partner. To override the partner configuration, set this field to 933 // `true` 934 // and provide the new configuration in 935 // sdfConfig. 936 OverridePartnerSdfConfig bool `json:"overridePartnerSdfConfig,omitempty"` 937 938 // SdfConfig: The SDF configuration for the advertiser. 939 // 940 // * Required when 941 // overridePartnerSdfConfig 942 // is `true`. 943 // * Output only when 944 // overridePartnerSdfConfig 945 // is `false`. 946 SdfConfig *SdfConfig `json:"sdfConfig,omitempty"` 947 948 // ForceSendFields is a list of field names (e.g. 949 // "OverridePartnerSdfConfig") to unconditionally include in API 950 // requests. By default, fields with empty values are omitted from API 951 // requests. However, any non-pointer, non-interface field appearing in 952 // ForceSendFields will be sent to the server regardless of whether the 953 // field is empty or not. This may be used to include empty fields in 954 // Patch requests. 955 ForceSendFields []string `json:"-"` 956 957 // NullFields is a list of field names (e.g. "OverridePartnerSdfConfig") 958 // to include in API requests with the JSON null value. By default, 959 // fields with empty values are omitted from API requests. However, any 960 // field with an empty value appearing in NullFields will be sent to the 961 // server as null. It is an error if a field in this list has a 962 // non-empty value. This may be used to include null fields in Patch 963 // requests. 964 NullFields []string `json:"-"` 965} 966 967func (s *AdvertiserSdfConfig) MarshalJSON() ([]byte, error) { 968 type NoMethod AdvertiserSdfConfig 969 raw := NoMethod(*s) 970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 971} 972 973// AgeRangeAssignedTargetingOptionDetails: Represents a targetable age 974// range. This will be populated in the details 975// field of an AssignedTargetingOption when 976// targeting_type is 977// `TARGETING_TYPE_AGE_RANGE`. 978type AgeRangeAssignedTargetingOptionDetails struct { 979 // AgeRange: Output only. The age range of an audience. We only support 980 // targeting a continuous age 981 // range of an audience. Thus, the age range represented in this field 982 // can be 983 // 1) targeted solely, or, 2) part of a larger continuous age range. The 984 // reach 985 // of a continuous age range targeting can be expanded by also targeting 986 // an 987 // audience of an unknown age. 988 // 989 // Possible values: 990 // "AGE_RANGE_UNSPECIFIED" - Default value when age range is not 991 // specified in this version. This enum is 992 // a placeholder for default value and does not represent a real age 993 // range 994 // option. 995 // "AGE_RANGE_18_24" - The age range of the audience is 18 to 24. 996 // "AGE_RANGE_25_34" - The age range of the audience is 25 to 34. 997 // "AGE_RANGE_35_44" - The age range of the audience is 35 to 44. 998 // "AGE_RANGE_45_54" - The age range of the audience is 45 to 54. 999 // "AGE_RANGE_55_64" - The age range of the audience is 55 to 64. 1000 // "AGE_RANGE_65_PLUS" - The age range of the audience is 65 and up. 1001 // "AGE_RANGE_UNKNOWN" - The age range of the audience is unknown. 1002 AgeRange string `json:"ageRange,omitempty"` 1003 1004 // TargetingOptionId: Required. The targeting_option_id of 1005 // a 1006 // TargetingOption of type `TARGETING_TYPE_AGE_RANGE`. 1007 TargetingOptionId string `json:"targetingOptionId,omitempty"` 1008 1009 // ForceSendFields is a list of field names (e.g. "AgeRange") to 1010 // unconditionally include in API requests. By default, fields with 1011 // empty values are omitted from API requests. However, any non-pointer, 1012 // non-interface field appearing in ForceSendFields will be sent to the 1013 // server regardless of whether the field is empty or not. This may be 1014 // used to include empty fields in Patch requests. 1015 ForceSendFields []string `json:"-"` 1016 1017 // NullFields is a list of field names (e.g. "AgeRange") to include in 1018 // API requests with the JSON null value. By default, fields with empty 1019 // values are omitted from API requests. However, any field with an 1020 // empty value appearing in NullFields will be sent to the server as 1021 // null. It is an error if a field in this list has a non-empty value. 1022 // This may be used to include null fields in Patch requests. 1023 NullFields []string `json:"-"` 1024} 1025 1026func (s *AgeRangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1027 type NoMethod AgeRangeAssignedTargetingOptionDetails 1028 raw := NoMethod(*s) 1029 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1030} 1031 1032// AgeRangeTargetingOptionDetails: Represents a targetable age range. 1033// This will be populated in the 1034// age_range_details field when 1035// targeting_type is 1036// `TARGETING_TYPE_AGE_RANGE`. 1037type AgeRangeTargetingOptionDetails struct { 1038 // AgeRange: Output only. The age range of an audience. 1039 // 1040 // Possible values: 1041 // "AGE_RANGE_UNSPECIFIED" - Default value when age range is not 1042 // specified in this version. This enum is 1043 // a placeholder for default value and does not represent a real age 1044 // range 1045 // option. 1046 // "AGE_RANGE_18_24" - The age range of the audience is 18 to 24. 1047 // "AGE_RANGE_25_34" - The age range of the audience is 25 to 34. 1048 // "AGE_RANGE_35_44" - The age range of the audience is 35 to 44. 1049 // "AGE_RANGE_45_54" - The age range of the audience is 45 to 54. 1050 // "AGE_RANGE_55_64" - The age range of the audience is 55 to 64. 1051 // "AGE_RANGE_65_PLUS" - The age range of the audience is 65 and up. 1052 // "AGE_RANGE_UNKNOWN" - The age range of the audience is unknown. 1053 AgeRange string `json:"ageRange,omitempty"` 1054 1055 // ForceSendFields is a list of field names (e.g. "AgeRange") to 1056 // unconditionally include in API requests. By default, fields with 1057 // empty values are omitted from API requests. However, any non-pointer, 1058 // non-interface field appearing in ForceSendFields will be sent to the 1059 // server regardless of whether the field is empty or not. This may be 1060 // used to include empty fields in Patch requests. 1061 ForceSendFields []string `json:"-"` 1062 1063 // NullFields is a list of field names (e.g. "AgeRange") to include in 1064 // API requests with the JSON null value. By default, fields with empty 1065 // values are omitted from API requests. However, any field with an 1066 // empty value appearing in NullFields will be sent to the server as 1067 // null. It is an error if a field in this list has a non-empty value. 1068 // This may be used to include null fields in Patch requests. 1069 NullFields []string `json:"-"` 1070} 1071 1072func (s *AgeRangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1073 type NoMethod AgeRangeTargetingOptionDetails 1074 raw := NoMethod(*s) 1075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1076} 1077 1078// AppAssignedTargetingOptionDetails: Details for assigned app targeting 1079// option. This will be populated in the 1080// details field of an AssignedTargetingOption when 1081// targeting_type is 1082// `TARGETING_TYPE_APP`. 1083type AppAssignedTargetingOptionDetails struct { 1084 // AppId: Required. The ID of the app. 1085 // 1086 // Android's Play store app uses bundle ID, for 1087 // example 1088 // `com.google.android.gm`. Apple's App store app ID uses 9 digit 1089 // string, for 1090 // example `422689480`. 1091 AppId string `json:"appId,omitempty"` 1092 1093 // DisplayName: Output only. The display name of the app. 1094 DisplayName string `json:"displayName,omitempty"` 1095 1096 // Negative: Indicates if this option is being negatively targeted. 1097 Negative bool `json:"negative,omitempty"` 1098 1099 // ForceSendFields is a list of field names (e.g. "AppId") to 1100 // unconditionally include in API requests. By default, fields with 1101 // empty values are omitted from API requests. However, any non-pointer, 1102 // non-interface field appearing in ForceSendFields will be sent to the 1103 // server regardless of whether the field is empty or not. This may be 1104 // used to include empty fields in Patch requests. 1105 ForceSendFields []string `json:"-"` 1106 1107 // NullFields is a list of field names (e.g. "AppId") to include in API 1108 // requests with the JSON null value. By default, fields with empty 1109 // values are omitted from API requests. However, any field with an 1110 // empty value appearing in NullFields will be sent to the server as 1111 // null. It is an error if a field in this list has a non-empty value. 1112 // This may be used to include null fields in Patch requests. 1113 NullFields []string `json:"-"` 1114} 1115 1116func (s *AppAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1117 type NoMethod AppAssignedTargetingOptionDetails 1118 raw := NoMethod(*s) 1119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1120} 1121 1122// AppCategoryAssignedTargetingOptionDetails: Details for assigned app 1123// category targeting option. This will be 1124// populated in the 1125// app_category_details field of 1126// an AssignedTargetingOption when 1127// targeting_type 1128// is `TARGETING_TYPE_APP_CATEGORY`. 1129type AppCategoryAssignedTargetingOptionDetails struct { 1130 // DisplayName: Output only. The display name of the app category. 1131 DisplayName string `json:"displayName,omitempty"` 1132 1133 // Negative: Indicates if this option is being negatively targeted. 1134 Negative bool `json:"negative,omitempty"` 1135 1136 // TargetingOptionId: Required. The targeting_option_id field 1137 // when 1138 // targeting_type is 1139 // `TARGETING_TYPE_APP_CATEGORY`. 1140 TargetingOptionId string `json:"targetingOptionId,omitempty"` 1141 1142 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1143 // unconditionally include in API requests. By default, fields with 1144 // empty values are omitted from API requests. However, any non-pointer, 1145 // non-interface field appearing in ForceSendFields will be sent to the 1146 // server regardless of whether the field is empty or not. This may be 1147 // used to include empty fields in Patch requests. 1148 ForceSendFields []string `json:"-"` 1149 1150 // NullFields is a list of field names (e.g. "DisplayName") to include 1151 // in API requests with the JSON null value. By default, fields with 1152 // empty values are omitted from API requests. However, any field with 1153 // an empty value appearing in NullFields will be sent to the server as 1154 // null. It is an error if a field in this list has a non-empty value. 1155 // This may be used to include null fields in Patch requests. 1156 NullFields []string `json:"-"` 1157} 1158 1159func (s *AppCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1160 type NoMethod AppCategoryAssignedTargetingOptionDetails 1161 raw := NoMethod(*s) 1162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1163} 1164 1165// AppCategoryTargetingOptionDetails: Represents a targetable collection 1166// of apps. A collection lets you target 1167// dynamic groups of related apps that are maintained by the platform, 1168// for 1169// example `All Apps/Google Play/Games`. This will be populated in 1170// the 1171// app_category_details field when 1172// targeting_type is 1173// `TARGETING_TYPE_APP_CATEGORY`. 1174type AppCategoryTargetingOptionDetails struct { 1175 // DisplayName: Output only. The name of the app collection. 1176 DisplayName string `json:"displayName,omitempty"` 1177 1178 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1179 // unconditionally include in API requests. By default, fields with 1180 // empty values are omitted from API requests. However, any non-pointer, 1181 // non-interface field appearing in ForceSendFields will be sent to the 1182 // server regardless of whether the field is empty or not. This may be 1183 // used to include empty fields in Patch requests. 1184 ForceSendFields []string `json:"-"` 1185 1186 // NullFields is a list of field names (e.g. "DisplayName") to include 1187 // in API requests with the JSON null value. By default, fields with 1188 // empty values are omitted from API requests. However, any field with 1189 // an empty value appearing in NullFields will be sent to the server as 1190 // null. It is an error if a field in this list has a non-empty value. 1191 // This may be used to include null fields in Patch requests. 1192 NullFields []string `json:"-"` 1193} 1194 1195func (s *AppCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1196 type NoMethod AppCategoryTargetingOptionDetails 1197 raw := NoMethod(*s) 1198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1199} 1200 1201// Asset: A single asset. 1202type Asset struct { 1203 // Content: The asset content. 1204 // For uploaded assets, the content is the serving path. 1205 Content string `json:"content,omitempty"` 1206 1207 // MediaId: Media ID of the uploaded asset. This is a unique identifier 1208 // for the asset. 1209 // This ID can be passed to other API calls, e.g. 1210 // CreateCreative to associate 1211 // the asset with a creative. 1212 MediaId int64 `json:"mediaId,omitempty,string"` 1213 1214 // ForceSendFields is a list of field names (e.g. "Content") to 1215 // unconditionally include in API requests. By default, fields with 1216 // empty values are omitted from API requests. However, any non-pointer, 1217 // non-interface field appearing in ForceSendFields will be sent to the 1218 // server regardless of whether the field is empty or not. This may be 1219 // used to include empty fields in Patch requests. 1220 ForceSendFields []string `json:"-"` 1221 1222 // NullFields is a list of field names (e.g. "Content") to include in 1223 // API requests with the JSON null value. By default, fields with empty 1224 // values are omitted from API requests. However, any field with an 1225 // empty value appearing in NullFields will be sent to the server as 1226 // null. It is an error if a field in this list has a non-empty value. 1227 // This may be used to include null fields in Patch requests. 1228 NullFields []string `json:"-"` 1229} 1230 1231func (s *Asset) MarshalJSON() ([]byte, error) { 1232 type NoMethod Asset 1233 raw := NoMethod(*s) 1234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1235} 1236 1237// AssetAssociation: Asset association for the creative. 1238type AssetAssociation struct { 1239 // Asset: The associated asset. 1240 Asset *Asset `json:"asset,omitempty"` 1241 1242 // Role: The role of this asset for the creative. 1243 // 1244 // Possible values: 1245 // "ASSET_ROLE_UNSPECIFIED" - Asset role is not specified or is 1246 // unknown in this version. 1247 // "ASSET_ROLE_MAIN" - The asset is the main asset of the creative. 1248 // "ASSET_ROLE_BACKUP" - The asset is a backup asset of the creative. 1249 // "ASSET_ROLE_POLITE_LOAD" - The asset is a polite load asset of the 1250 // creative. 1251 // "ASSET_ROLE_HEADLINE" - Headline of a native creative. 1252 // 1253 // The content must be UTF-8 encoded with a length of no more 1254 // than 25 characters. 1255 // 1256 // This role is only supported in following 1257 // creative_type: 1258 // 1259 // * `CREATIVE_TYPE_NATIVE` 1260 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1261 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1262 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1263 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1264 // "ASSET_ROLE_LONG_HEADLINE" - Long headline of a native 1265 // creative. 1266 // 1267 // The content must be UTF-8 encoded with a length of no more 1268 // than 50 characters. 1269 // 1270 // This role is only supported in following 1271 // creative_type: 1272 // 1273 // * `CREATIVE_TYPE_NATIVE` 1274 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1275 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1276 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1277 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1278 // "ASSET_ROLE_BODY" - Body text of a native creative. 1279 // 1280 // The content must be UTF-8 encoded with a length of no more 1281 // than 90 characters. 1282 // 1283 // This role is only supported in following 1284 // creative_type: 1285 // 1286 // * `CREATIVE_TYPE_NATIVE` 1287 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1288 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1289 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1290 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1291 // "ASSET_ROLE_LONG_BODY" - Long body text of a native creative. 1292 // 1293 // The content must be UTF-8 encoded with a length of no more 1294 // than 150 characters. 1295 // 1296 // This role is only supported in following 1297 // creative_type: 1298 // 1299 // * `CREATIVE_TYPE_NATIVE` 1300 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1301 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1302 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1303 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1304 // "ASSET_ROLE_CAPTION_URL" - A short, friendly version of the landing 1305 // page URL to show in the creative. 1306 // This URL gives people an idea of where they'll arrive after they 1307 // click on 1308 // the creative. 1309 // 1310 // The content must be UTF-8 encoded with a length of no more 1311 // than 30 characters. 1312 // 1313 // For example, if the landing page URL is 1314 // 'http://www.example.com/page', 1315 // the caption URL can be 'example.com'. 1316 // The protocol (http://) is optional, but the URL can't contain spaces 1317 // or 1318 // special characters. 1319 // 1320 // This role is only supported in following 1321 // creative_type: 1322 // 1323 // * `CREATIVE_TYPE_NATIVE` 1324 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1325 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1326 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1327 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1328 // "ASSET_ROLE_CALL_TO_ACTION" - The text to use on the call-to-action 1329 // button of a native creative. 1330 // 1331 // The content must be UTF-8 encoded with a length of no more 1332 // than 15 characters. 1333 // 1334 // This role is only supported in following 1335 // creative_type: 1336 // 1337 // * `CREATIVE_TYPE_NATIVE` 1338 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1339 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1340 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1341 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1342 // "ASSET_ROLE_ADVERTISER_NAME" - The text that identifies the 1343 // advertiser or brand name. 1344 // 1345 // The content must be UTF-8 encoded with a length of no more 1346 // than 25 characters. 1347 // 1348 // This role is only supported in following 1349 // creative_type: 1350 // 1351 // * `CREATIVE_TYPE_NATIVE` 1352 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1353 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1354 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1355 // * `CREATIVE_TYPE_NATIVE_VIDEO` 1356 // "ASSET_ROLE_PRICE" - The purchase price of your app in the Google 1357 // play store or iOS app store 1358 // (for example, $5.99). 1359 // 1360 // Note that this value is not automatically synced with the actual 1361 // value 1362 // listed in the store. It will always be the one provided when save 1363 // the 1364 // creative. 1365 // 1366 // The content must be UTF-8 encoded with a length of no more 1367 // than 15 characters. 1368 // 1369 // This role is only supported in following 1370 // creative_type: 1371 // 1372 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1373 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1374 // "ASSET_ROLE_ANDROID_APP_ID" - The ID of an Android app in the 1375 // Google play store. 1376 // 1377 // You can find this ID in the App’s Google Play Store URL after 1378 // ‘id’. For 1379 // example, 1380 // in 1381 // https://play.google.com/store/apps/details?id=com.company.appname 1382 // the 1383 // identifier is com.company.appname. 1384 // 1385 // This role is only supported in following 1386 // creative_type: 1387 // 1388 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1389 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1390 // "ASSET_ROLE_IOS_APP_ID" - The ID of an iOS app in the Apple app 1391 // store. 1392 // 1393 // This ID number can be found in the Apple App Store URL as the string 1394 // of 1395 // numbers directly after "id". For example, 1396 // in 1397 // https://apps.apple.com/us/app/gmail-email-by-google/id422689480 the 1398 // ID is 1399 // 422689480. 1400 // 1401 // This role is only supported in following 1402 // creative_type: 1403 // 1404 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1405 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1406 // "ASSET_ROLE_RATING" - The rating of an app in the Google play store 1407 // or iOS app store. 1408 // 1409 // Note that this value is not automatically synced with the actual 1410 // rating 1411 // in the store. It will always be the one provided when save the 1412 // creative. 1413 // 1414 // This role is only supported in following 1415 // creative_type: 1416 // 1417 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1418 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1419 // "ASSET_ROLE_ICON" - The icon of a creative. 1420 // 1421 // This role is only supported and required in 1422 // following 1423 // creative_type: 1424 // 1425 // * `CREATIVE_TYPE_NATIVE` 1426 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 1427 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 1428 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 1429 // "ASSET_ROLE_COVER_IMAGE" - The cover image of a native video 1430 // creative. 1431 // 1432 // This role is only supported and required in 1433 // following 1434 // creative_type: 1435 // 1436 // * `CREATIVE_TYPE_VIDEO` 1437 Role string `json:"role,omitempty"` 1438 1439 // ForceSendFields is a list of field names (e.g. "Asset") to 1440 // unconditionally include in API requests. By default, fields with 1441 // empty values are omitted from API requests. However, any non-pointer, 1442 // non-interface field appearing in ForceSendFields will be sent to the 1443 // server regardless of whether the field is empty or not. This may be 1444 // used to include empty fields in Patch requests. 1445 ForceSendFields []string `json:"-"` 1446 1447 // NullFields is a list of field names (e.g. "Asset") to include in API 1448 // requests with the JSON null value. By default, fields with empty 1449 // values are omitted from API requests. However, any field with an 1450 // empty value appearing in NullFields will be sent to the server as 1451 // null. It is an error if a field in this list has a non-empty value. 1452 // This may be used to include null fields in Patch requests. 1453 NullFields []string `json:"-"` 1454} 1455 1456func (s *AssetAssociation) MarshalJSON() ([]byte, error) { 1457 type NoMethod AssetAssociation 1458 raw := NoMethod(*s) 1459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1460} 1461 1462// AssignedTargetingOption: A single assigned targeting option, which 1463// defines the state of a targeting 1464// option for an entity with targeting settings, such as a Line Item 1465// or 1466// Insertion Order. 1467type AssignedTargetingOption struct { 1468 // AgeRangeDetails: Age range details. This field will be populated when 1469 // the 1470 // TargetingType is `TARGETING_TYPE_AGE_RANGE`. 1471 AgeRangeDetails *AgeRangeAssignedTargetingOptionDetails `json:"ageRangeDetails,omitempty"` 1472 1473 // AppCategoryDetails: App category details. This field will be 1474 // populated when the 1475 // TargetingType is `TARGETING_TYPE_APP_CATEGORY`. 1476 AppCategoryDetails *AppCategoryAssignedTargetingOptionDetails `json:"appCategoryDetails,omitempty"` 1477 1478 // AppDetails: App details. This field will be populated when 1479 // the 1480 // TargetingType is `TARGETING_TYPE_APP`. 1481 AppDetails *AppAssignedTargetingOptionDetails `json:"appDetails,omitempty"` 1482 1483 // AssignedTargetingOptionId: Output only. The unique ID of the assigned 1484 // targeting option. The ID is only unique 1485 // within a given line item and targeting type. It may be reused in 1486 // other 1487 // contexts. 1488 AssignedTargetingOptionId string `json:"assignedTargetingOptionId,omitempty"` 1489 1490 // AudienceGroupDetails: Audience targeting details. This field will be 1491 // populated when the 1492 // TargetingType is `TARGETING_TYPE_AUDIENCE_GROUP`. 1493 // You can only target one audience group option per line item. 1494 AudienceGroupDetails *AudienceGroupAssignedTargetingOptionDetails `json:"audienceGroupDetails,omitempty"` 1495 1496 // AuthorizedSellerStatusDetails: Authorized seller status details. This 1497 // field will be populated when the 1498 // TargetingType is `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. 1499 // 1500 // You can only target one authorized seller status option per line 1501 // item. 1502 // 1503 // If a line item doesn't have an authorized seller status option, 1504 // all 1505 // authorized sellers indicated as DIRECT or RESELLER in the ads.txt 1506 // file 1507 // are targeted by default. 1508 AuthorizedSellerStatusDetails *AuthorizedSellerStatusAssignedTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"` 1509 1510 // BrowserDetails: Browser details. This field will be populated when 1511 // the 1512 // TargetingType is `TARGETING_TYPE_BROWSER`. 1513 BrowserDetails *BrowserAssignedTargetingOptionDetails `json:"browserDetails,omitempty"` 1514 1515 // CarrierAndIspDetails: Carrier and ISP details. This field will be 1516 // populated when the 1517 // TargetingType is `TARGETING_TYPE_CARRIER_AND_ISP`. 1518 CarrierAndIspDetails *CarrierAndIspAssignedTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"` 1519 1520 // CategoryDetails: Category details. This field will be populated when 1521 // the TargetingType is 1522 // `TARGETING_TYPE_CATEGORY`. 1523 // 1524 // Targeting a category will also target its subcategories. If a 1525 // category is 1526 // excluded from targeting and a subcategory is included, the exclusion 1527 // will 1528 // take precedence. 1529 CategoryDetails *CategoryAssignedTargetingOptionDetails `json:"categoryDetails,omitempty"` 1530 1531 // ChannelDetails: Channel details. This field will be populated when 1532 // the 1533 // TargetingType is `TARGETING_TYPE_CHANNEL`. 1534 ChannelDetails *ChannelAssignedTargetingOptionDetails `json:"channelDetails,omitempty"` 1535 1536 // ContentInstreamPositionDetails: Content instream position details. 1537 // This field will be populated when the 1538 // TargetingType is `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 1539 ContentInstreamPositionDetails *ContentInstreamPositionAssignedTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"` 1540 1541 // ContentOutstreamPositionDetails: Content outstream position details. 1542 // This field will be populated when the 1543 // TargetingType is `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 1544 ContentOutstreamPositionDetails *ContentOutstreamPositionAssignedTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"` 1545 1546 // DayAndTimeDetails: Day and time details. This field will be populated 1547 // when the 1548 // TargetingType is `TARGETING_TYPE_DAY_AND_TIME`. 1549 DayAndTimeDetails *DayAndTimeAssignedTargetingOptionDetails `json:"dayAndTimeDetails,omitempty"` 1550 1551 // DeviceMakeModelDetails: Device make and model details. This field 1552 // will be populated when the 1553 // TargetingType is `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 1554 DeviceMakeModelDetails *DeviceMakeModelAssignedTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"` 1555 1556 // DeviceTypeDetails: Device Type details. This field will be populated 1557 // when the 1558 // TargetingType is 1559 // `TARGETING_TYPE_DEVICE_TYPE`. 1560 DeviceTypeDetails *DeviceTypeAssignedTargetingOptionDetails `json:"deviceTypeDetails,omitempty"` 1561 1562 // DigitalContentLabelExclusionDetails: Digital content label details. 1563 // This field will be populated when the 1564 // TargetingType is 1565 // `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION`. 1566 // 1567 // Digital content labels are targeting exclusions. Advertiser level 1568 // digital 1569 // content label exclusions, if set, are always applied in serving 1570 // (even 1571 // though they aren't visible in line item settings). Line item settings 1572 // can 1573 // exclude content labels in addition to advertiser exclusions, but 1574 // can't 1575 // override them. A line item won't serve if all the digital content 1576 // labels 1577 // are excluded. 1578 DigitalContentLabelExclusionDetails *DigitalContentLabelAssignedTargetingOptionDetails `json:"digitalContentLabelExclusionDetails,omitempty"` 1579 1580 // EnvironmentDetails: Environment details. This field will be populated 1581 // when the 1582 // TargetingType is `TARGETING_TYPE_ENVIRONMENT`. 1583 EnvironmentDetails *EnvironmentAssignedTargetingOptionDetails `json:"environmentDetails,omitempty"` 1584 1585 // ExchangeDetails: Exchange details. This field will be populated when 1586 // the 1587 // TargetingType is `TARGETING_TYPE_EXCHANGE`. 1588 ExchangeDetails *ExchangeAssignedTargetingOptionDetails `json:"exchangeDetails,omitempty"` 1589 1590 // GenderDetails: Gender details. This field will be populated when 1591 // the 1592 // TargetingType is `TARGETING_TYPE_GENDER`. 1593 GenderDetails *GenderAssignedTargetingOptionDetails `json:"genderDetails,omitempty"` 1594 1595 // GeoRegionDetails: Geographic region details. This field will be 1596 // populated when the 1597 // TargetingType is `TARGETING_TYPE_GEO_REGION`. 1598 GeoRegionDetails *GeoRegionAssignedTargetingOptionDetails `json:"geoRegionDetails,omitempty"` 1599 1600 // HouseholdIncomeDetails: Household income details. This field will be 1601 // populated when the 1602 // TargetingType is `TARGETING_TYPE_HOUSEHOLD_INCOME`. 1603 HouseholdIncomeDetails *HouseholdIncomeAssignedTargetingOptionDetails `json:"householdIncomeDetails,omitempty"` 1604 1605 // Inheritance: Output only. The inheritance status of the assigned 1606 // targeting option. 1607 // 1608 // Possible values: 1609 // "INHERITANCE_UNSPECIFIED" - The inheritance is unspecified or 1610 // unknown. 1611 // "NOT_INHERITED" - The assigned targeting option is not inherited 1612 // from higher level entity. 1613 // "INHERITED_FROM_PARTNER" - The assigned targeting option is 1614 // inherited from partner targeting 1615 // settings. 1616 // "INHERITED_FROM_ADVERTISER" - The assigned targeting option is 1617 // inherited from advertiser targeting 1618 // settings. 1619 Inheritance string `json:"inheritance,omitempty"` 1620 1621 // InventorySourceDetails: Inventory source details. This field will be 1622 // populated when the 1623 // TargetingType is `TARGETING_TYPE_INVENTORY_SOURCE`. 1624 InventorySourceDetails *InventorySourceAssignedTargetingOptionDetails `json:"inventorySourceDetails,omitempty"` 1625 1626 // InventorySourceGroupDetails: Inventory source group details. This 1627 // field will be populated when the 1628 // TargetingType is `TARGETING_TYPE_INVENTORY_SOURCE_GROUP`. 1629 InventorySourceGroupDetails *InventorySourceGroupAssignedTargetingOptionDetails `json:"inventorySourceGroupDetails,omitempty"` 1630 1631 // KeywordDetails: Keyword details. This field will be populated when 1632 // the TargetingType is 1633 // `TARGETING_TYPE_KEYWORD`. 1634 // 1635 // A maximum of 5000 direct negative keywords can be assigned to a 1636 // line item. No limit on number of positive keywords that can be 1637 // assigned. 1638 KeywordDetails *KeywordAssignedTargetingOptionDetails `json:"keywordDetails,omitempty"` 1639 1640 // LanguageDetails: Language details. This field will be populated when 1641 // the TargetingType is 1642 // `TARGETING_TYPE_LANGUAGE`. 1643 LanguageDetails *LanguageAssignedTargetingOptionDetails `json:"languageDetails,omitempty"` 1644 1645 // Name: Output only. The resource name for this assigned targeting 1646 // option. 1647 Name string `json:"name,omitempty"` 1648 1649 // NegativeKeywordListDetails: Keyword details. This field will be 1650 // populated when the 1651 // TargetingType is `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST`. 1652 // 1653 // A maximum of 4 negative keyword lists can be assigned to a line item. 1654 NegativeKeywordListDetails *NegativeKeywordListAssignedTargetingOptionDetails `json:"negativeKeywordListDetails,omitempty"` 1655 1656 // OnScreenPositionDetails: On screen position details. This field will 1657 // be populated when the 1658 // TargetingType is `TARGETING_TYPE_ON_SCREEN_POSITION`. 1659 OnScreenPositionDetails *OnScreenPositionAssignedTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"` 1660 1661 // OperatingSystemDetails: Operating system details. This field will be 1662 // populated when the 1663 // TargetingType is `TARGETING_TYPE_OPERATING_SYSTEM`. 1664 OperatingSystemDetails *OperatingSystemAssignedTargetingOptionDetails `json:"operatingSystemDetails,omitempty"` 1665 1666 // ParentalStatusDetails: Parental status details. This field will be 1667 // populated when the 1668 // TargetingType is `TARGETING_TYPE_PARENTAL_STATUS`. 1669 ParentalStatusDetails *ParentalStatusAssignedTargetingOptionDetails `json:"parentalStatusDetails,omitempty"` 1670 1671 // ProximityLocationListDetails: Proximity location list details. This 1672 // field will be populated when the 1673 // TargetingType is 1674 // `TARGETING_TYPE_PROXIMITY_LOCATION_LIST`. 1675 ProximityLocationListDetails *ProximityLocationListAssignedTargetingOptionDetails `json:"proximityLocationListDetails,omitempty"` 1676 1677 // RegionalLocationListDetails: Regional location list details. This 1678 // field will be populated when the 1679 // TargetingType is `TARGETING_TYPE_REGIONAL_LOCATION_LIST`. 1680 RegionalLocationListDetails *RegionalLocationListAssignedTargetingOptionDetails `json:"regionalLocationListDetails,omitempty"` 1681 1682 // SensitiveCategoryExclusionDetails: Sensitive category details. This 1683 // field will be populated when the 1684 // TargetingType is 1685 // `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 1686 // 1687 // Sensitive categories are targeting exclusions. Advertiser level 1688 // sensitive 1689 // category exclusions, if set, are always applied in serving (even 1690 // though 1691 // they aren't visible in line item settings). Line item settings 1692 // can 1693 // exclude sensitive categories in addition to advertiser exclusions, 1694 // but 1695 // can't override them. 1696 SensitiveCategoryExclusionDetails *SensitiveCategoryAssignedTargetingOptionDetails `json:"sensitiveCategoryExclusionDetails,omitempty"` 1697 1698 // SubExchangeDetails: Sub-exchange details. This field will be 1699 // populated when the 1700 // TargetingType is `TARGETING_TYPE_SUB_EXCHANGE`. 1701 SubExchangeDetails *SubExchangeAssignedTargetingOptionDetails `json:"subExchangeDetails,omitempty"` 1702 1703 // TargetingType: Output only. Identifies the type of this assigned 1704 // targeting option. 1705 // 1706 // Possible values: 1707 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 1708 // specified or is unknown in this version. 1709 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 1710 // related websites or apps). 1711 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 1712 // example, education or puzzle games). 1713 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 1714 // Birds). 1715 // "TARGETING_TYPE_URL" - Target a specific url (for example, 1716 // quora.com). 1717 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 1718 // period on a specific day. 1719 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 1720 // (for example, 18-24). 1721 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 1722 // specified regions on a regional location list. 1723 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 1724 // specified points of interest on a proximity location 1725 // list. 1726 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 1727 // example, female or male). 1728 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 1729 // size for video ads. 1730 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 1731 // content for video ads. 1732 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 1733 // parental status (for example, parent or not a 1734 // parent). 1735 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 1736 // ads in a specific content instream position (for 1737 // example, pre-roll, mid-roll, or post-roll). 1738 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 1739 // specific content outstream position. 1740 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 1741 // (for example, tablet or connected TV). 1742 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 1743 // groups of audiences. 1744 // Singleton field, at most one can exist on a single Lineitem at a 1745 // time. 1746 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 1747 // example, Chrome). 1748 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 1749 // household income range (for example, top 10%). 1750 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 1751 // screen position. 1752 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 1753 // third party verification (for example, IAS or 1754 // DoubleVerify). 1755 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 1756 // by specific digital content label ratings (for example, 1757 // DL-MA: suitable only for mature audiences). 1758 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 1759 // content by sensitive categories (for example, adult). 1760 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 1761 // (for example, web or app). 1762 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 1763 // carrier or internet service provider 1764 // (ISP) (for example, Comcast or Orange). 1765 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 1766 // operating system (for example, macOS). 1767 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 1768 // device make or model (for example, Roku or 1769 // Samsung). 1770 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 1771 // example, dog or retriever). 1772 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 1773 // negative keyword list. 1774 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 1775 // (for example, 80% viewable). 1776 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 1777 // category (for example, arts & 1778 // entertainment). 1779 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 1780 // specific deals and auction packages. 1781 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 1782 // example, English or Japanese). 1783 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 1784 // authorized sellers. 1785 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 1786 // location (for example, a city or state). 1787 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 1788 // a group of deals and auction packages. 1789 // "TARGETING_TYPE_PROXIMITY_LOCATION" - Target ads to business 1790 // chains, individual points of interests (POIs), 1791 // street addresses, and latitude/longitude coordinates. 1792 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 1793 // exchanges. 1794 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 1795 // sub-exchanges. 1796 TargetingType string `json:"targetingType,omitempty"` 1797 1798 // ThirdPartyVerifierDetails: Third party verification details. This 1799 // field will be populated when the 1800 // TargetingType is `TARGETING_TYPE_THIRD_PARTY_VERIFIER`. 1801 ThirdPartyVerifierDetails *ThirdPartyVerifierAssignedTargetingOptionDetails `json:"thirdPartyVerifierDetails,omitempty"` 1802 1803 // UrlDetails: URL details. This field will be populated when 1804 // the 1805 // TargetingType is `TARGETING_TYPE_URL`. 1806 UrlDetails *UrlAssignedTargetingOptionDetails `json:"urlDetails,omitempty"` 1807 1808 // UserRewardedContentDetails: User rewarded content details. This field 1809 // will be populated when the 1810 // TargetingType is 1811 // `TARGETING_TYPE_USER_REWARDED_CONTENT`. 1812 UserRewardedContentDetails *UserRewardedContentAssignedTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"` 1813 1814 // VideoPlayerSizeDetails: Video player size details. This field will be 1815 // populated when the 1816 // TargetingType is `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 1817 VideoPlayerSizeDetails *VideoPlayerSizeAssignedTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"` 1818 1819 // ViewabilityDetails: Viewability details. This field will be populated 1820 // when the TargetingType 1821 // is `TARGETING_TYPE_VIEWABILITY`. 1822 // 1823 // You can only target one viewability option per line item. 1824 ViewabilityDetails *ViewabilityAssignedTargetingOptionDetails `json:"viewabilityDetails,omitempty"` 1825 1826 // ServerResponse contains the HTTP response code and headers from the 1827 // server. 1828 googleapi.ServerResponse `json:"-"` 1829 1830 // ForceSendFields is a list of field names (e.g. "AgeRangeDetails") to 1831 // unconditionally include in API requests. By default, fields with 1832 // empty values are omitted from API requests. However, any non-pointer, 1833 // non-interface field appearing in ForceSendFields will be sent to the 1834 // server regardless of whether the field is empty or not. This may be 1835 // used to include empty fields in Patch requests. 1836 ForceSendFields []string `json:"-"` 1837 1838 // NullFields is a list of field names (e.g. "AgeRangeDetails") to 1839 // include in API requests with the JSON null value. By default, fields 1840 // with empty values are omitted from API requests. However, any field 1841 // with an empty value appearing in NullFields will be sent to the 1842 // server as null. It is an error if a field in this list has a 1843 // non-empty value. This may be used to include null fields in Patch 1844 // requests. 1845 NullFields []string `json:"-"` 1846} 1847 1848func (s *AssignedTargetingOption) MarshalJSON() ([]byte, error) { 1849 type NoMethod AssignedTargetingOption 1850 raw := NoMethod(*s) 1851 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1852} 1853 1854// AudienceGroupAssignedTargetingOptionDetails: Assigned audience group 1855// targeting option details. This will be populated in 1856// the details field of an AssignedTargetingOption when 1857// targeting_type is 1858// `TARGETING_TYPE_AUDIENCE_GROUP`. 1859// The relation between each group is UNION, except 1860// for 1861// excluded_first_and_third_party_audience_group 1862// and 1863// excluded_google_audience_group, of which COMPLEMENT is UNION'ed with 1864// other 1865// groups. 1866type AudienceGroupAssignedTargetingOptionDetails struct { 1867 // ExcludedFirstAndThirdPartyAudienceGroup: The first and third party 1868 // audience ids and recencies of the excluded 1869 // first and third party audience group. Used for negative targeting. 1870 // Its 1871 // COMPLEMENT is used to UNION other audience groups. 1872 ExcludedFirstAndThirdPartyAudienceGroup *FirstAndThirdPartyAudienceGroup `json:"excludedFirstAndThirdPartyAudienceGroup,omitempty"` 1873 1874 // ExcludedGoogleAudienceGroup: The Google audience ids of the excluded 1875 // Google audience group. 1876 // Used for negative targeting. It's COMPLEMENT is used to UNION 1877 // other 1878 // audience groups. 1879 // Only contains Affinity, In-market and Installed-apps type Google 1880 // audiences. 1881 // All items are logically ‘OR’ of each other. 1882 ExcludedGoogleAudienceGroup *GoogleAudienceGroup `json:"excludedGoogleAudienceGroup,omitempty"` 1883 1884 // IncludedCombinedAudienceGroup: The combined audience ids of the 1885 // included combined audience group. 1886 // Contains combined audience ids only. 1887 IncludedCombinedAudienceGroup *CombinedAudienceGroup `json:"includedCombinedAudienceGroup,omitempty"` 1888 1889 // IncludedCustomListGroup: The custom list ids of the included custom 1890 // list group. 1891 // Contains custom list ids only. 1892 IncludedCustomListGroup *CustomListGroup `json:"includedCustomListGroup,omitempty"` 1893 1894 // IncludedFirstAndThirdPartyAudienceGroups: The first and third party 1895 // audience ids and recencies of included first 1896 // and third party audience groups. Each first and third party audience 1897 // group 1898 // contains first and third party audience ids only. 1899 // The relation between each first and third party audience group 1900 // is 1901 // INTERSECTION, and the result is UNION'ed with other audience 1902 // groups. 1903 // Repeated groups with same settings will be ignored. 1904 IncludedFirstAndThirdPartyAudienceGroups []*FirstAndThirdPartyAudienceGroup `json:"includedFirstAndThirdPartyAudienceGroups,omitempty"` 1905 1906 // IncludedGoogleAudienceGroup: The Google audience ids of the included 1907 // Google audience group. 1908 // Contains Google audience ids only. 1909 IncludedGoogleAudienceGroup *GoogleAudienceGroup `json:"includedGoogleAudienceGroup,omitempty"` 1910 1911 // ForceSendFields is a list of field names (e.g. 1912 // "ExcludedFirstAndThirdPartyAudienceGroup") to unconditionally include 1913 // in API requests. By default, fields with empty values are omitted 1914 // from API requests. However, any non-pointer, non-interface field 1915 // appearing in ForceSendFields will be sent to the server regardless of 1916 // whether the field is empty or not. This may be used to include empty 1917 // fields in Patch requests. 1918 ForceSendFields []string `json:"-"` 1919 1920 // NullFields is a list of field names (e.g. 1921 // "ExcludedFirstAndThirdPartyAudienceGroup") to include in API requests 1922 // with the JSON null value. By default, fields with empty values are 1923 // omitted from API requests. However, any field with an empty value 1924 // appearing in NullFields will be sent to the server as null. It is an 1925 // error if a field in this list has a non-empty value. This may be used 1926 // to include null fields in Patch requests. 1927 NullFields []string `json:"-"` 1928} 1929 1930func (s *AudienceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 1931 type NoMethod AudienceGroupAssignedTargetingOptionDetails 1932 raw := NoMethod(*s) 1933 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1934} 1935 1936// AudioVideoOffset: The length an audio or a video has been played. 1937type AudioVideoOffset struct { 1938 // Percentage: The offset in percentage of the audio or video duration. 1939 Percentage int64 `json:"percentage,omitempty,string"` 1940 1941 // Seconds: The offset in seconds from the start of the audio or video. 1942 Seconds int64 `json:"seconds,omitempty,string"` 1943 1944 // ForceSendFields is a list of field names (e.g. "Percentage") to 1945 // unconditionally include in API requests. By default, fields with 1946 // empty values are omitted from API requests. However, any non-pointer, 1947 // non-interface field appearing in ForceSendFields will be sent to the 1948 // server regardless of whether the field is empty or not. This may be 1949 // used to include empty fields in Patch requests. 1950 ForceSendFields []string `json:"-"` 1951 1952 // NullFields is a list of field names (e.g. "Percentage") to include in 1953 // API requests with the JSON null value. By default, fields with empty 1954 // values are omitted from API requests. However, any field with an 1955 // empty value appearing in NullFields will be sent to the server as 1956 // null. It is an error if a field in this list has a non-empty value. 1957 // This may be used to include null fields in Patch requests. 1958 NullFields []string `json:"-"` 1959} 1960 1961func (s *AudioVideoOffset) MarshalJSON() ([]byte, error) { 1962 type NoMethod AudioVideoOffset 1963 raw := NoMethod(*s) 1964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1965} 1966 1967// AuthorizedSellerStatusAssignedTargetingOptionDetails: Represents an 1968// assigned authorized seller status. This will be populated in 1969// the details field of an AssignedTargetingOption when 1970// targeting_type is 1971// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. 1972type AuthorizedSellerStatusAssignedTargetingOptionDetails struct { 1973 // AuthorizedSellerStatus: Output only. The authorized seller status to 1974 // target. 1975 // 1976 // Possible values: 1977 // "AUTHORIZED_SELLER_STATUS_UNSPECIFIED" - Default value when 1978 // authorized seller status is not specified in this 1979 // version. This enum is a placeholder for default value and does 1980 // not 1981 // represent a real authorized seller status option. 1982 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_DIRECT_SELLERS_ONLY" - Only 1983 // authorized sellers that directly own the inventory being monetized, 1984 // as 1985 // indicated by a DIRECT declaration in the ads.txt file. 1986 // 1987 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_AND_NON_PARTICIPATING_PUBLISHERS" 1988 // - All authorized sellers, including publishers that have not posted 1989 // an 1990 // ads.txt file. Display & Video 360 automatically disallows 1991 // unauthorized 1992 // sellers. 1993 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"` 1994 1995 // TargetingOptionId: Required. The targeting_option_id of 1996 // a 1997 // TargetingOption of type `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. 1998 TargetingOptionId string `json:"targetingOptionId,omitempty"` 1999 2000 // ForceSendFields is a list of field names (e.g. 2001 // "AuthorizedSellerStatus") to unconditionally include in API requests. 2002 // By default, fields with empty values are omitted from API requests. 2003 // However, any non-pointer, non-interface field appearing in 2004 // ForceSendFields will be sent to the server regardless of whether the 2005 // field is empty or not. This may be used to include empty fields in 2006 // Patch requests. 2007 ForceSendFields []string `json:"-"` 2008 2009 // NullFields is a list of field names (e.g. "AuthorizedSellerStatus") 2010 // to include in API requests with the JSON null value. By default, 2011 // fields with empty values are omitted from API requests. However, any 2012 // field with an empty value appearing in NullFields will be sent to the 2013 // server as null. It is an error if a field in this list has a 2014 // non-empty value. This may be used to include null fields in Patch 2015 // requests. 2016 NullFields []string `json:"-"` 2017} 2018 2019func (s *AuthorizedSellerStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2020 type NoMethod AuthorizedSellerStatusAssignedTargetingOptionDetails 2021 raw := NoMethod(*s) 2022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2023} 2024 2025// AuthorizedSellerStatusTargetingOptionDetails: Represents a targetable 2026// authorized seller status. This will be populated 2027// in 2028// the 2029// authorized_seller_status_details 2030// field when targeting_type 2031// is 2032// `TARGETING_TYPE_AUTHORIZED_SELLER_STATUS`. 2033type AuthorizedSellerStatusTargetingOptionDetails struct { 2034 // AuthorizedSellerStatus: Output only. The authorized seller status. 2035 // 2036 // Possible values: 2037 // "AUTHORIZED_SELLER_STATUS_UNSPECIFIED" - Default value when 2038 // authorized seller status is not specified in this 2039 // version. This enum is a placeholder for default value and does 2040 // not 2041 // represent a real authorized seller status option. 2042 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_DIRECT_SELLERS_ONLY" - Only 2043 // authorized sellers that directly own the inventory being monetized, 2044 // as 2045 // indicated by a DIRECT declaration in the ads.txt file. 2046 // 2047 // "AUTHORIZED_SELLER_STATUS_AUTHORIZED_AND_NON_PARTICIPATING_PUBLISHERS" 2048 // - All authorized sellers, including publishers that have not posted 2049 // an 2050 // ads.txt file. Display & Video 360 automatically disallows 2051 // unauthorized 2052 // sellers. 2053 AuthorizedSellerStatus string `json:"authorizedSellerStatus,omitempty"` 2054 2055 // ForceSendFields is a list of field names (e.g. 2056 // "AuthorizedSellerStatus") to unconditionally include in API requests. 2057 // By default, fields with empty values are omitted from API requests. 2058 // However, any non-pointer, non-interface field appearing in 2059 // ForceSendFields will be sent to the server regardless of whether the 2060 // field is empty or not. This may be used to include empty fields in 2061 // Patch requests. 2062 ForceSendFields []string `json:"-"` 2063 2064 // NullFields is a list of field names (e.g. "AuthorizedSellerStatus") 2065 // to include in API requests with the JSON null value. By default, 2066 // fields with empty values are omitted from API requests. However, any 2067 // field with an empty value appearing in NullFields will be sent to the 2068 // server as null. It is an error if a field in this list has a 2069 // non-empty value. This may be used to include null fields in Patch 2070 // requests. 2071 NullFields []string `json:"-"` 2072} 2073 2074func (s *AuthorizedSellerStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2075 type NoMethod AuthorizedSellerStatusTargetingOptionDetails 2076 raw := NoMethod(*s) 2077 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2078} 2079 2080// BiddingStrategy: Settings that control the bid strategy. 2081// Bid strategy determines the bid price. 2082type BiddingStrategy struct { 2083 // FixedBid: A strategy that uses a fixed bid price. 2084 FixedBid *FixedBidStrategy `json:"fixedBid,omitempty"` 2085 2086 // MaximizeSpendAutoBid: A strategy that automatically adjusts the bid 2087 // to optimize to your 2088 // performance goal while spending the full budget. 2089 // 2090 // At insertion order level, the 2091 // markup_type of line items 2092 // cannot be set to `PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM`. In 2093 // addition, 2094 // when 2095 // performance_goal_type 2096 // is one of: 2097 // 2098 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA` 2099 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC` 2100 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED` , 2101 // 2102 // the line_item_type 2103 // of the insertion order line items must be either: 2104 // 2105 // * `LINE_ITEM_TYPE_DISPLAY_DEFAULT` 2106 // * `LINE_ITEM_TYPE_VIDEO_DEFAULT` , 2107 // 2108 // and when 2109 // performance_goal_type 2110 // is either: 2111 // 2112 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA` 2113 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN` 2114 // 2115 // the line_item_type 2116 // of the insertion order line items must be 2117 // `LINE_ITEM_TYPE_VIDEO_DEFAULT`. 2118 MaximizeSpendAutoBid *MaximizeSpendBidStrategy `json:"maximizeSpendAutoBid,omitempty"` 2119 2120 // PerformanceGoalAutoBid: A strategy that automatically adjusts the bid 2121 // to meet or beat a specified 2122 // performance goal. It is to be used only for a line item entity. 2123 PerformanceGoalAutoBid *PerformanceGoalBidStrategy `json:"performanceGoalAutoBid,omitempty"` 2124 2125 // ForceSendFields is a list of field names (e.g. "FixedBid") to 2126 // unconditionally include in API requests. By default, fields with 2127 // empty values are omitted from API requests. However, any non-pointer, 2128 // non-interface field appearing in ForceSendFields will be sent to the 2129 // server regardless of whether the field is empty or not. This may be 2130 // used to include empty fields in Patch requests. 2131 ForceSendFields []string `json:"-"` 2132 2133 // NullFields is a list of field names (e.g. "FixedBid") to include in 2134 // API requests with the JSON null value. By default, fields with empty 2135 // values are omitted from API requests. However, any field with an 2136 // empty value appearing in NullFields will be sent to the server as 2137 // null. It is an error if a field in this list has a non-empty value. 2138 // This may be used to include null fields in Patch requests. 2139 NullFields []string `json:"-"` 2140} 2141 2142func (s *BiddingStrategy) MarshalJSON() ([]byte, error) { 2143 type NoMethod BiddingStrategy 2144 raw := NoMethod(*s) 2145 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2146} 2147 2148// BrowserAssignedTargetingOptionDetails: Details for assigned browser 2149// targeting option. This will be populated in 2150// the details field of an AssignedTargetingOption when 2151// targeting_type is 2152// `TARGETING_TYPE_BROWSER`. 2153type BrowserAssignedTargetingOptionDetails struct { 2154 // DisplayName: Output only. The display name of the browser. 2155 DisplayName string `json:"displayName,omitempty"` 2156 2157 // Negative: Indicates if this option is being negatively targeted. All 2158 // assigned browser 2159 // targeting options on the same line item must have the same value for 2160 // this 2161 // field. 2162 Negative bool `json:"negative,omitempty"` 2163 2164 // TargetingOptionId: Required. The targeting_option_id of 2165 // a 2166 // TargetingOption of type `TARGETING_TYPE_BROWSER`. 2167 TargetingOptionId string `json:"targetingOptionId,omitempty"` 2168 2169 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2170 // unconditionally include in API requests. By default, fields with 2171 // empty values are omitted from API requests. However, any non-pointer, 2172 // non-interface field appearing in ForceSendFields will be sent to the 2173 // server regardless of whether the field is empty or not. This may be 2174 // used to include empty fields in Patch requests. 2175 ForceSendFields []string `json:"-"` 2176 2177 // NullFields is a list of field names (e.g. "DisplayName") to include 2178 // in API requests with the JSON null value. By default, fields with 2179 // empty values are omitted from API requests. However, any field with 2180 // an empty value appearing in NullFields will be sent to the server as 2181 // null. It is an error if a field in this list has a non-empty value. 2182 // This may be used to include null fields in Patch requests. 2183 NullFields []string `json:"-"` 2184} 2185 2186func (s *BrowserAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2187 type NoMethod BrowserAssignedTargetingOptionDetails 2188 raw := NoMethod(*s) 2189 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2190} 2191 2192// BrowserTargetingOptionDetails: Represents a targetable browser. This 2193// will be populated in the 2194// browser_details field when 2195// targeting_type is 2196// `TARGETING_TYPE_BROWSER`. 2197type BrowserTargetingOptionDetails struct { 2198 // DisplayName: Output only. The display name of the browser. 2199 DisplayName string `json:"displayName,omitempty"` 2200 2201 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2202 // unconditionally include in API requests. By default, fields with 2203 // empty values are omitted from API requests. However, any non-pointer, 2204 // non-interface field appearing in ForceSendFields will be sent to the 2205 // server regardless of whether the field is empty or not. This may be 2206 // used to include empty fields in Patch requests. 2207 ForceSendFields []string `json:"-"` 2208 2209 // NullFields is a list of field names (e.g. "DisplayName") to include 2210 // in API requests with the JSON null value. By default, fields with 2211 // empty values are omitted from API requests. However, any field with 2212 // an empty value appearing in NullFields will be sent to the server as 2213 // null. It is an error if a field in this list has a non-empty value. 2214 // This may be used to include null fields in Patch requests. 2215 NullFields []string `json:"-"` 2216} 2217 2218func (s *BrowserTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2219 type NoMethod BrowserTargetingOptionDetails 2220 raw := NoMethod(*s) 2221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2222} 2223 2224// BulkEditLineItemAssignedTargetingOptionsRequest: Request message 2225// for 2226// BulkEditLineItemAssignedTargetingOptions. 2227type BulkEditLineItemAssignedTargetingOptionsRequest struct { 2228 // CreateRequests: The assigned targeting options to create in batch, 2229 // specified as a list of 2230 // `CreateAssignedTargetingOptionsRequest`. 2231 CreateRequests []*CreateAssignedTargetingOptionsRequest `json:"createRequests,omitempty"` 2232 2233 // DeleteRequests: The assigned targeting options to delete in batch, 2234 // specified as a list of 2235 // `DeleteAssignedTargetingOptionsRequest`. 2236 DeleteRequests []*DeleteAssignedTargetingOptionsRequest `json:"deleteRequests,omitempty"` 2237 2238 // ForceSendFields is a list of field names (e.g. "CreateRequests") to 2239 // unconditionally include in API requests. By default, fields with 2240 // empty values are omitted from API requests. However, any non-pointer, 2241 // non-interface field appearing in ForceSendFields will be sent to the 2242 // server regardless of whether the field is empty or not. This may be 2243 // used to include empty fields in Patch requests. 2244 ForceSendFields []string `json:"-"` 2245 2246 // NullFields is a list of field names (e.g. "CreateRequests") to 2247 // include in API requests with the JSON null value. By default, fields 2248 // with empty values are omitted from API requests. However, any field 2249 // with an empty value appearing in NullFields will be sent to the 2250 // server as null. It is an error if a field in this list has a 2251 // non-empty value. This may be used to include null fields in Patch 2252 // requests. 2253 NullFields []string `json:"-"` 2254} 2255 2256func (s *BulkEditLineItemAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 2257 type NoMethod BulkEditLineItemAssignedTargetingOptionsRequest 2258 raw := NoMethod(*s) 2259 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2260} 2261 2262type BulkEditLineItemAssignedTargetingOptionsResponse struct { 2263 // CreatedAssignedTargetingOptions: The list of assigned targeting 2264 // options that have been successfully created. 2265 // 2266 // This list will be absent if empty. 2267 CreatedAssignedTargetingOptions []*AssignedTargetingOption `json:"createdAssignedTargetingOptions,omitempty"` 2268 2269 // ServerResponse contains the HTTP response code and headers from the 2270 // server. 2271 googleapi.ServerResponse `json:"-"` 2272 2273 // ForceSendFields is a list of field names (e.g. 2274 // "CreatedAssignedTargetingOptions") to unconditionally include in API 2275 // requests. By default, fields with empty values are omitted from API 2276 // requests. However, any non-pointer, non-interface field appearing in 2277 // ForceSendFields will be sent to the server regardless of whether the 2278 // field is empty or not. This may be used to include empty fields in 2279 // Patch requests. 2280 ForceSendFields []string `json:"-"` 2281 2282 // NullFields is a list of field names (e.g. 2283 // "CreatedAssignedTargetingOptions") to include in API requests with 2284 // the JSON null value. By default, fields with empty values are omitted 2285 // from API requests. However, any field with an empty value appearing 2286 // in NullFields will be sent to the server as null. It is an error if a 2287 // field in this list has a non-empty value. This may be used to include 2288 // null fields in Patch requests. 2289 NullFields []string `json:"-"` 2290} 2291 2292func (s *BulkEditLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 2293 type NoMethod BulkEditLineItemAssignedTargetingOptionsResponse 2294 raw := NoMethod(*s) 2295 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2296} 2297 2298type BulkListLineItemAssignedTargetingOptionsResponse struct { 2299 // AssignedTargetingOptions: The list of assigned targeting 2300 // options. 2301 // 2302 // This list will be absent if empty. 2303 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 2304 2305 // NextPageToken: A token identifying the next page of results. This 2306 // value should be 2307 // specified as the 2308 // pageToken in 2309 // a subsequent BulkListLineItemAssignedTargetingOptionsRequest to 2310 // fetch 2311 // the next page of results. This token will be absent if there are no 2312 // more 2313 // assigned_targeting_options 2314 // to return. 2315 NextPageToken string `json:"nextPageToken,omitempty"` 2316 2317 // ServerResponse contains the HTTP response code and headers from the 2318 // server. 2319 googleapi.ServerResponse `json:"-"` 2320 2321 // ForceSendFields is a list of field names (e.g. 2322 // "AssignedTargetingOptions") to unconditionally include in API 2323 // requests. By default, fields with empty values are omitted from API 2324 // requests. However, any non-pointer, non-interface field appearing in 2325 // ForceSendFields will be sent to the server regardless of whether the 2326 // field is empty or not. This may be used to include empty fields in 2327 // Patch requests. 2328 ForceSendFields []string `json:"-"` 2329 2330 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 2331 // to include in API requests with the JSON null value. By default, 2332 // fields with empty values are omitted from API requests. However, any 2333 // field with an empty value appearing in NullFields will be sent to the 2334 // server as null. It is an error if a field in this list has a 2335 // non-empty value. This may be used to include null fields in Patch 2336 // requests. 2337 NullFields []string `json:"-"` 2338} 2339 2340func (s *BulkListLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 2341 type NoMethod BulkListLineItemAssignedTargetingOptionsResponse 2342 raw := NoMethod(*s) 2343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2344} 2345 2346// Campaign: A single campaign. 2347type Campaign struct { 2348 // AdvertiserId: Output only. The unique ID of the advertiser the 2349 // campaign belongs to. 2350 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 2351 2352 // CampaignFlight: Required. The planned spend and duration of the 2353 // campaign. 2354 CampaignFlight *CampaignFlight `json:"campaignFlight,omitempty"` 2355 2356 // CampaignGoal: Required. The goal of the campaign. 2357 CampaignGoal *CampaignGoal `json:"campaignGoal,omitempty"` 2358 2359 // CampaignId: Output only. The unique ID of the campaign. Assigned by 2360 // the system. 2361 CampaignId int64 `json:"campaignId,omitempty,string"` 2362 2363 // DisplayName: Required. The display name of the campaign. 2364 // 2365 // Must be UTF-8 encoded with a maximum size of 240 bytes. 2366 DisplayName string `json:"displayName,omitempty"` 2367 2368 // EntityStatus: Required. Controls whether or not the insertion orders 2369 // under this campaign 2370 // can spend their budgets and bid on inventory. 2371 // 2372 // * Accepted values are `ENTITY_STATUS_ACTIVE`, 2373 // `ENTITY_STATUS_ARCHIVED`, and 2374 // `ENTITY_STATUS_PAUSED`. 2375 // * For 2376 // CreateCampaign method, 2377 // `ENTITY_STATUS_ARCHIVED` is not allowed. 2378 // 2379 // Possible values: 2380 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 2381 // specified or is unknown in this version. 2382 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 2383 // budget. 2384 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 2385 // budget spending are disabled. An 2386 // entity can be deleted after archived. Deleted entities cannot be 2387 // retrieved. 2388 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 2389 // budget spending are disabled. 2390 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 2391 // the entity. 2392 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 2393 // for deletion. 2394 EntityStatus string `json:"entityStatus,omitempty"` 2395 2396 // FrequencyCap: Required. The frequency cap setting of the campaign. 2397 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"` 2398 2399 // Name: Output only. The resource name of the campaign. 2400 Name string `json:"name,omitempty"` 2401 2402 // UpdateTime: Output only. The timestamp when the campaign was last 2403 // updated. Assigned by the system. 2404 UpdateTime string `json:"updateTime,omitempty"` 2405 2406 // ServerResponse contains the HTTP response code and headers from the 2407 // server. 2408 googleapi.ServerResponse `json:"-"` 2409 2410 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 2411 // unconditionally include in API requests. By default, fields with 2412 // empty values are omitted from API requests. However, any non-pointer, 2413 // non-interface field appearing in ForceSendFields will be sent to the 2414 // server regardless of whether the field is empty or not. This may be 2415 // used to include empty fields in Patch requests. 2416 ForceSendFields []string `json:"-"` 2417 2418 // NullFields is a list of field names (e.g. "AdvertiserId") to include 2419 // in API requests with the JSON null value. By default, fields with 2420 // empty values are omitted from API requests. However, any field with 2421 // an empty value appearing in NullFields will be sent to the server as 2422 // null. It is an error if a field in this list has a non-empty value. 2423 // This may be used to include null fields in Patch requests. 2424 NullFields []string `json:"-"` 2425} 2426 2427func (s *Campaign) MarshalJSON() ([]byte, error) { 2428 type NoMethod Campaign 2429 raw := NoMethod(*s) 2430 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2431} 2432 2433// CampaignFlight: Settings that track the planned spend and duration of 2434// a campaign. 2435type CampaignFlight struct { 2436 // PlannedDates: Required. The dates that the campaign is expected to 2437 // run. They are resolved 2438 // relative to the parent advertiser's time zone. 2439 // 2440 // * The dates specified here will not affect serving. They are used 2441 // to 2442 // generate alerts and warnings. For example, if the flight date of any 2443 // child 2444 // insertion order is outside the range of these dates, the user 2445 // interface 2446 // will show a warning. 2447 // * `start_date` is required and must be the current date or later. 2448 // * `end_date` is optional. If specified, it must be the `start_date` 2449 // or 2450 // later. 2451 // * Any specified date must be before the year 2037. 2452 PlannedDates *DateRange `json:"plannedDates,omitempty"` 2453 2454 // PlannedSpendAmountMicros: The amount the campaign is expected to 2455 // spend for its given 2456 // planned_dates. This will not limit serving, 2457 // but will be used for tracking spend in the DV360 UI. 2458 // 2459 // The amount is in micros. Must be greater than or equal to 0. For 2460 // example, 2461 // 500000000 represents 500 standard units of the currency. 2462 PlannedSpendAmountMicros int64 `json:"plannedSpendAmountMicros,omitempty,string"` 2463 2464 // ForceSendFields is a list of field names (e.g. "PlannedDates") to 2465 // unconditionally include in API requests. By default, fields with 2466 // empty values are omitted from API requests. However, any non-pointer, 2467 // non-interface field appearing in ForceSendFields will be sent to the 2468 // server regardless of whether the field is empty or not. This may be 2469 // used to include empty fields in Patch requests. 2470 ForceSendFields []string `json:"-"` 2471 2472 // NullFields is a list of field names (e.g. "PlannedDates") to include 2473 // in API requests with the JSON null value. By default, fields with 2474 // empty values are omitted from API requests. However, any field with 2475 // an empty value appearing in NullFields will be sent to the server as 2476 // null. It is an error if a field in this list has a non-empty value. 2477 // This may be used to include null fields in Patch requests. 2478 NullFields []string `json:"-"` 2479} 2480 2481func (s *CampaignFlight) MarshalJSON() ([]byte, error) { 2482 type NoMethod CampaignFlight 2483 raw := NoMethod(*s) 2484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2485} 2486 2487// CampaignGoal: Settings that control the goal of a campaign. 2488type CampaignGoal struct { 2489 // CampaignGoalType: Required. The type of the campaign goal. 2490 // 2491 // Possible values: 2492 // "CAMPAIGN_GOAL_TYPE_UNSPECIFIED" - Goal value is not specified or 2493 // unknown in this version. 2494 // "CAMPAIGN_GOAL_TYPE_APP_INSTALL" - Drive app installs or 2495 // engagements. 2496 // "CAMPAIGN_GOAL_TYPE_BRAND_AWARENESS" - Raise awareness of a brand 2497 // or product. 2498 // "CAMPAIGN_GOAL_TYPE_OFFLINE_ACTION" - Drive offline or in-store 2499 // sales. 2500 // "CAMPAIGN_GOAL_TYPE_ONLINE_ACTION" - Drive online action or visits. 2501 CampaignGoalType string `json:"campaignGoalType,omitempty"` 2502 2503 // PerformanceGoal: Required. The performance goal of the 2504 // campaign. 2505 // 2506 // Acceptable values for 2507 // performance_goal_type are: 2508 // 2509 // * `PERFORMANCE_GOAL_TYPE_CPM` 2510 // * `PERFORMANCE_GOAL_TYPE_CPC` 2511 // * `PERFORMANCE_GOAL_TYPE_CPA` 2512 // * `PERFORMANCE_GOAL_TYPE_CPIAVC` 2513 // * `PERFORMANCE_GOAL_TYPE_CTR` 2514 // * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` 2515 // * `PERFORMANCE_GOAL_TYPE_OTHER` 2516 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"` 2517 2518 // ForceSendFields is a list of field names (e.g. "CampaignGoalType") to 2519 // unconditionally include in API requests. By default, fields with 2520 // empty values are omitted from API requests. However, any non-pointer, 2521 // non-interface field appearing in ForceSendFields will be sent to the 2522 // server regardless of whether the field is empty or not. This may be 2523 // used to include empty fields in Patch requests. 2524 ForceSendFields []string `json:"-"` 2525 2526 // NullFields is a list of field names (e.g. "CampaignGoalType") to 2527 // include in API requests with the JSON null value. By default, fields 2528 // with empty values are omitted from API requests. However, any field 2529 // with an empty value appearing in NullFields will be sent to the 2530 // server as null. It is an error if a field in this list has a 2531 // non-empty value. This may be used to include null fields in Patch 2532 // requests. 2533 NullFields []string `json:"-"` 2534} 2535 2536func (s *CampaignGoal) MarshalJSON() ([]byte, error) { 2537 type NoMethod CampaignGoal 2538 raw := NoMethod(*s) 2539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2540} 2541 2542// CarrierAndIspAssignedTargetingOptionDetails: Details for assigned 2543// carrier and ISP targeting option. This will be populated 2544// in the details field of an AssignedTargetingOption 2545// when 2546// targeting_type is 2547// `TARGETING_TYPE_CARRIER_AND_ISP`. 2548type CarrierAndIspAssignedTargetingOptionDetails struct { 2549 // DisplayName: Output only. The display name of the carrier or ISP. 2550 DisplayName string `json:"displayName,omitempty"` 2551 2552 // Negative: Indicates if this option is being negatively targeted. All 2553 // assigned carrier 2554 // and ISP targeting options on the same line item must have the same 2555 // value 2556 // for this field. 2557 Negative bool `json:"negative,omitempty"` 2558 2559 // TargetingOptionId: Required. The targeting_option_id of 2560 // a 2561 // TargetingOption of type `TARGETING_TYPE_CARRIER_AND_ISP`. 2562 TargetingOptionId string `json:"targetingOptionId,omitempty"` 2563 2564 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2565 // unconditionally include in API requests. By default, fields with 2566 // empty values are omitted from API requests. However, any non-pointer, 2567 // non-interface field appearing in ForceSendFields will be sent to the 2568 // server regardless of whether the field is empty or not. This may be 2569 // used to include empty fields in Patch requests. 2570 ForceSendFields []string `json:"-"` 2571 2572 // NullFields is a list of field names (e.g. "DisplayName") to include 2573 // in API requests with the JSON null value. By default, fields with 2574 // empty values are omitted from API requests. However, any field with 2575 // an empty value appearing in NullFields will be sent to the server as 2576 // null. It is an error if a field in this list has a non-empty value. 2577 // This may be used to include null fields in Patch requests. 2578 NullFields []string `json:"-"` 2579} 2580 2581func (s *CarrierAndIspAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2582 type NoMethod CarrierAndIspAssignedTargetingOptionDetails 2583 raw := NoMethod(*s) 2584 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2585} 2586 2587// CarrierAndIspTargetingOptionDetails: Represents a targetable carrier 2588// or ISP. This will be populated in the 2589// carrier_and_isp_details field of 2590// a TargetingOption when 2591// targeting_type is 2592// `TARGETING_TYPE_CARRIER_AND_ISP`. 2593type CarrierAndIspTargetingOptionDetails struct { 2594 // DisplayName: Output only. The display name of the carrier or ISP. 2595 DisplayName string `json:"displayName,omitempty"` 2596 2597 // Type: Output only. The type indicating if it's carrier or ISP. 2598 // 2599 // Possible values: 2600 // "CARRIER_AND_ISP_TYPE_UNSPECIFIED" - Default value when type is not 2601 // specified or is unknown in this version. 2602 // "CARRIER_AND_ISP_TYPE_ISP" - Indicates this targeting resource 2603 // refers to an ISP. 2604 // "CARRIER_AND_ISP_TYPE_CARRIER" - Indicates this targeting resource 2605 // refers to a mobile carrier. 2606 Type string `json:"type,omitempty"` 2607 2608 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2609 // unconditionally include in API requests. By default, fields with 2610 // empty values are omitted from API requests. However, any non-pointer, 2611 // non-interface field appearing in ForceSendFields will be sent to the 2612 // server regardless of whether the field is empty or not. This may be 2613 // used to include empty fields in Patch requests. 2614 ForceSendFields []string `json:"-"` 2615 2616 // NullFields is a list of field names (e.g. "DisplayName") to include 2617 // in API requests with the JSON null value. By default, fields with 2618 // empty values are omitted from API requests. However, any field with 2619 // an empty value appearing in NullFields will be sent to the server as 2620 // null. It is an error if a field in this list has a non-empty value. 2621 // This may be used to include null fields in Patch requests. 2622 NullFields []string `json:"-"` 2623} 2624 2625func (s *CarrierAndIspTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2626 type NoMethod CarrierAndIspTargetingOptionDetails 2627 raw := NoMethod(*s) 2628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2629} 2630 2631// CategoryAssignedTargetingOptionDetails: Assigned category targeting 2632// option details. This will be populated in the 2633// category_details field when 2634// targeting_type is 2635// `TARGETING_TYPE_CATEGORY`. 2636type CategoryAssignedTargetingOptionDetails struct { 2637 // DisplayName: Output only. The display name of the category. 2638 DisplayName string `json:"displayName,omitempty"` 2639 2640 // Negative: Indicates if this option is being negatively targeted. 2641 Negative bool `json:"negative,omitempty"` 2642 2643 // TargetingOptionId: Required. The targeting_option_id field 2644 // when 2645 // targeting_type is 2646 // `TARGETING_TYPE_CATEGORY`. 2647 TargetingOptionId string `json:"targetingOptionId,omitempty"` 2648 2649 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2650 // unconditionally include in API requests. By default, fields with 2651 // empty values are omitted from API requests. However, any non-pointer, 2652 // non-interface field appearing in ForceSendFields will be sent to the 2653 // server regardless of whether the field is empty or not. This may be 2654 // used to include empty fields in Patch requests. 2655 ForceSendFields []string `json:"-"` 2656 2657 // NullFields is a list of field names (e.g. "DisplayName") to include 2658 // in API requests with the JSON null value. By default, fields with 2659 // empty values are omitted from API requests. However, any field with 2660 // an empty value appearing in NullFields will be sent to the server as 2661 // null. It is an error if a field in this list has a non-empty value. 2662 // This may be used to include null fields in Patch requests. 2663 NullFields []string `json:"-"` 2664} 2665 2666func (s *CategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2667 type NoMethod CategoryAssignedTargetingOptionDetails 2668 raw := NoMethod(*s) 2669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2670} 2671 2672// CategoryTargetingOptionDetails: Represents a targetable category. 2673// This will be populated in the 2674// category_details field of a 2675// TargetingOption when targeting_type is 2676// `TARGETING_TYPE_CATEGORY`. 2677type CategoryTargetingOptionDetails struct { 2678 // DisplayName: Output only. The display name of the category. 2679 DisplayName string `json:"displayName,omitempty"` 2680 2681 // ForceSendFields is a list of field names (e.g. "DisplayName") to 2682 // unconditionally include in API requests. By default, fields with 2683 // empty values are omitted from API requests. However, any non-pointer, 2684 // non-interface field appearing in ForceSendFields will be sent to the 2685 // server regardless of whether the field is empty or not. This may be 2686 // used to include empty fields in Patch requests. 2687 ForceSendFields []string `json:"-"` 2688 2689 // NullFields is a list of field names (e.g. "DisplayName") to include 2690 // in API requests with the JSON null value. By default, fields with 2691 // empty values are omitted from API requests. However, any field with 2692 // an empty value appearing in NullFields will be sent to the server as 2693 // null. It is an error if a field in this list has a non-empty value. 2694 // This may be used to include null fields in Patch requests. 2695 NullFields []string `json:"-"` 2696} 2697 2698func (s *CategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2699 type NoMethod CategoryTargetingOptionDetails 2700 raw := NoMethod(*s) 2701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2702} 2703 2704// Channel: A single channel. Channels are custom groups of related 2705// websites and apps. 2706type Channel struct { 2707 // AdvertiserId: The ID of the advertiser that owns the channel. 2708 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 2709 2710 // ChannelId: Output only. The unique ID of the channel. Assigned by the 2711 // system. 2712 ChannelId int64 `json:"channelId,omitempty,string"` 2713 2714 // DisplayName: Required. The display name of the channel. 2715 // Must be UTF-8 encoded with a maximum length of 240 bytes. 2716 DisplayName string `json:"displayName,omitempty"` 2717 2718 // Name: Output only. The resource name of the channel. 2719 Name string `json:"name,omitempty"` 2720 2721 // PartnerId: The ID of the partner that owns the channel. 2722 PartnerId int64 `json:"partnerId,omitempty,string"` 2723 2724 // ServerResponse contains the HTTP response code and headers from the 2725 // server. 2726 googleapi.ServerResponse `json:"-"` 2727 2728 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 2729 // unconditionally include in API requests. By default, fields with 2730 // empty values are omitted from API requests. However, any non-pointer, 2731 // non-interface field appearing in ForceSendFields will be sent to the 2732 // server regardless of whether the field is empty or not. This may be 2733 // used to include empty fields in Patch requests. 2734 ForceSendFields []string `json:"-"` 2735 2736 // NullFields is a list of field names (e.g. "AdvertiserId") to include 2737 // in API requests with the JSON null value. By default, fields with 2738 // empty values are omitted from API requests. However, any field with 2739 // an empty value appearing in NullFields will be sent to the server as 2740 // null. It is an error if a field in this list has a non-empty value. 2741 // This may be used to include null fields in Patch requests. 2742 NullFields []string `json:"-"` 2743} 2744 2745func (s *Channel) MarshalJSON() ([]byte, error) { 2746 type NoMethod Channel 2747 raw := NoMethod(*s) 2748 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2749} 2750 2751// ChannelAssignedTargetingOptionDetails: Details for assigned channel 2752// targeting option. This will be populated in 2753// the details field of an AssignedTargetingOption when 2754// targeting_type is 2755// `TARGETING_TYPE_CHANNEL`. 2756type ChannelAssignedTargetingOptionDetails struct { 2757 // ChannelId: Required. ID of the channel. Should refer to the channel 2758 // ID 2759 // field on a 2760 // [Partner-owned channel](partners.channels#Channel.FIELDS.channel_id) 2761 // or 2762 // [advertiser-owned 2763 // channel](advertisers.channels#Channel.FIELDS.channel_id) 2764 // resource. 2765 ChannelId int64 `json:"channelId,omitempty,string"` 2766 2767 // Negative: Indicates if this option is being negatively targeted. For 2768 // advertiser 2769 // level assigned targeting option, this field must be true. 2770 Negative bool `json:"negative,omitempty"` 2771 2772 // ForceSendFields is a list of field names (e.g. "ChannelId") to 2773 // unconditionally include in API requests. By default, fields with 2774 // empty values are omitted from API requests. However, any non-pointer, 2775 // non-interface field appearing in ForceSendFields will be sent to the 2776 // server regardless of whether the field is empty or not. This may be 2777 // used to include empty fields in Patch requests. 2778 ForceSendFields []string `json:"-"` 2779 2780 // NullFields is a list of field names (e.g. "ChannelId") to include in 2781 // API requests with the JSON null value. By default, fields with empty 2782 // values are omitted from API requests. However, any field with an 2783 // empty value appearing in NullFields will be sent to the server as 2784 // null. It is an error if a field in this list has a non-empty value. 2785 // This may be used to include null fields in Patch requests. 2786 NullFields []string `json:"-"` 2787} 2788 2789func (s *ChannelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 2790 type NoMethod ChannelAssignedTargetingOptionDetails 2791 raw := NoMethod(*s) 2792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2793} 2794 2795// CmHybridConfig: Settings for advertisers that use both Campaign 2796// Manager (CM) and third-party 2797// ad servers. 2798type CmHybridConfig struct { 2799 // CmAccountId: Required. Immutable. Account ID of the CM Floodlight 2800 // configuration linked with the DV360 2801 // advertiser. 2802 CmAccountId int64 `json:"cmAccountId,omitempty,string"` 2803 2804 // CmFloodlightConfigId: Required. Immutable. ID of the CM Floodlight 2805 // configuration linked with the DV360 advertiser. 2806 CmFloodlightConfigId int64 `json:"cmFloodlightConfigId,omitempty,string"` 2807 2808 // CmFloodlightLinkingAuthorized: Required. Immutable. By setting this 2809 // field to `true`, you, on behalf of your company, 2810 // authorize the sharing of information from the given 2811 // Floodlight 2812 // configuration to this Display & Video 360 advertiser. 2813 CmFloodlightLinkingAuthorized bool `json:"cmFloodlightLinkingAuthorized,omitempty"` 2814 2815 // CmSyncableSiteIds: A list of CM sites whose placements will be synced 2816 // to DV360 as creatives. 2817 // 2818 // If absent or empty in 2819 // CreateAdvertiser method, the system 2820 // will automatically create a CM site. 2821 // 2822 // Removing sites from this list may cause DV360 creatives synced from 2823 // CM to 2824 // be deleted. At least one site must be specified. 2825 CmSyncableSiteIds googleapi.Int64s `json:"cmSyncableSiteIds,omitempty"` 2826 2827 // Dv360ToCmCostReportingEnabled: Whether or not to report DV360 cost to 2828 // CM. 2829 Dv360ToCmCostReportingEnabled bool `json:"dv360ToCmCostReportingEnabled,omitempty"` 2830 2831 // Dv360ToCmDataSharingEnabled: Whether or not to include DV360 data in 2832 // CM data transfer reports. 2833 Dv360ToCmDataSharingEnabled bool `json:"dv360ToCmDataSharingEnabled,omitempty"` 2834 2835 // ForceSendFields is a list of field names (e.g. "CmAccountId") to 2836 // unconditionally include in API requests. By default, fields with 2837 // empty values are omitted from API requests. However, any non-pointer, 2838 // non-interface field appearing in ForceSendFields will be sent to the 2839 // server regardless of whether the field is empty or not. This may be 2840 // used to include empty fields in Patch requests. 2841 ForceSendFields []string `json:"-"` 2842 2843 // NullFields is a list of field names (e.g. "CmAccountId") to include 2844 // in API requests with the JSON null value. By default, fields with 2845 // empty values are omitted from API requests. However, any field with 2846 // an empty value appearing in NullFields will be sent to the server as 2847 // null. It is an error if a field in this list has a non-empty value. 2848 // This may be used to include null fields in Patch requests. 2849 NullFields []string `json:"-"` 2850} 2851 2852func (s *CmHybridConfig) MarshalJSON() ([]byte, error) { 2853 type NoMethod CmHybridConfig 2854 raw := NoMethod(*s) 2855 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2856} 2857 2858// CmTrackingAd: A Campaign Manager tracking ad. 2859type CmTrackingAd struct { 2860 // CmAdId: The ad ID of the campaign manager tracking Ad. 2861 CmAdId int64 `json:"cmAdId,omitempty,string"` 2862 2863 // CmCreativeId: The creative ID of the campaign manager tracking Ad. 2864 CmCreativeId int64 `json:"cmCreativeId,omitempty,string"` 2865 2866 // CmPlacementId: The placement ID of the campaign manager tracking Ad. 2867 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"` 2868 2869 // ForceSendFields is a list of field names (e.g. "CmAdId") to 2870 // unconditionally include in API requests. By default, fields with 2871 // empty values are omitted from API requests. However, any non-pointer, 2872 // non-interface field appearing in ForceSendFields will be sent to the 2873 // server regardless of whether the field is empty or not. This may be 2874 // used to include empty fields in Patch requests. 2875 ForceSendFields []string `json:"-"` 2876 2877 // NullFields is a list of field names (e.g. "CmAdId") to include in API 2878 // requests with the JSON null value. By default, fields with empty 2879 // values are omitted from API requests. However, any field with an 2880 // empty value appearing in NullFields will be sent to the server as 2881 // null. It is an error if a field in this list has a non-empty value. 2882 // This may be used to include null fields in Patch requests. 2883 NullFields []string `json:"-"` 2884} 2885 2886func (s *CmTrackingAd) MarshalJSON() ([]byte, error) { 2887 type NoMethod CmTrackingAd 2888 raw := NoMethod(*s) 2889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2890} 2891 2892// CombinedAudience: Describes a combined audience resource. 2893type CombinedAudience struct { 2894 // CombinedAudienceId: Output only. The unique ID of the combined 2895 // audience. Assigned by the system. 2896 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"` 2897 2898 // DisplayName: Output only. The display name of the combined 2899 // audience. 2900 // . 2901 DisplayName string `json:"displayName,omitempty"` 2902 2903 // Name: Output only. The resource name of the combined audience. 2904 Name string `json:"name,omitempty"` 2905 2906 // ServerResponse contains the HTTP response code and headers from the 2907 // server. 2908 googleapi.ServerResponse `json:"-"` 2909 2910 // ForceSendFields is a list of field names (e.g. "CombinedAudienceId") 2911 // to unconditionally include in API requests. By default, fields with 2912 // empty values are omitted from API requests. However, any non-pointer, 2913 // non-interface field appearing in ForceSendFields will be sent to the 2914 // server regardless of whether the field is empty or not. This may be 2915 // used to include empty fields in Patch requests. 2916 ForceSendFields []string `json:"-"` 2917 2918 // NullFields is a list of field names (e.g. "CombinedAudienceId") to 2919 // include in API requests with the JSON null value. By default, fields 2920 // with empty values are omitted from API requests. However, any field 2921 // with an empty value appearing in NullFields will be sent to the 2922 // server as null. It is an error if a field in this list has a 2923 // non-empty value. This may be used to include null fields in Patch 2924 // requests. 2925 NullFields []string `json:"-"` 2926} 2927 2928func (s *CombinedAudience) MarshalJSON() ([]byte, error) { 2929 type NoMethod CombinedAudience 2930 raw := NoMethod(*s) 2931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2932} 2933 2934// CombinedAudienceGroup: Details of combined audience group. 2935// All combined audience targeting settings are logically ‘OR’ of 2936// each other. 2937type CombinedAudienceGroup struct { 2938 // Settings: Required. All combined audience targeting settings in 2939 // combined audience group. 2940 // Repeated settings with same id will be ignored. 2941 // The number of combined audience settings should be no more than five, 2942 // error 2943 // will be thrown otherwise. 2944 Settings []*CombinedAudienceTargetingSetting `json:"settings,omitempty"` 2945 2946 // ForceSendFields is a list of field names (e.g. "Settings") to 2947 // unconditionally include in API requests. By default, fields with 2948 // empty values are omitted from API requests. However, any non-pointer, 2949 // non-interface field appearing in ForceSendFields will be sent to the 2950 // server regardless of whether the field is empty or not. This may be 2951 // used to include empty fields in Patch requests. 2952 ForceSendFields []string `json:"-"` 2953 2954 // NullFields is a list of field names (e.g. "Settings") to include in 2955 // API requests with the JSON null value. By default, fields with empty 2956 // values are omitted from API requests. However, any field with an 2957 // empty value appearing in NullFields will be sent to the server as 2958 // null. It is an error if a field in this list has a non-empty value. 2959 // This may be used to include null fields in Patch requests. 2960 NullFields []string `json:"-"` 2961} 2962 2963func (s *CombinedAudienceGroup) MarshalJSON() ([]byte, error) { 2964 type NoMethod CombinedAudienceGroup 2965 raw := NoMethod(*s) 2966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2967} 2968 2969// CombinedAudienceTargetingSetting: Details of combined audience 2970// targeting setting. 2971type CombinedAudienceTargetingSetting struct { 2972 // CombinedAudienceId: Required. Combined audience id of combined 2973 // audience targeting setting. 2974 // This id is combined_audience_id. 2975 CombinedAudienceId int64 `json:"combinedAudienceId,omitempty,string"` 2976 2977 // ForceSendFields is a list of field names (e.g. "CombinedAudienceId") 2978 // to unconditionally include in API requests. By default, fields with 2979 // empty values are omitted from API requests. However, any non-pointer, 2980 // non-interface field appearing in ForceSendFields will be sent to the 2981 // server regardless of whether the field is empty or not. This may be 2982 // used to include empty fields in Patch requests. 2983 ForceSendFields []string `json:"-"` 2984 2985 // NullFields is a list of field names (e.g. "CombinedAudienceId") to 2986 // include in API requests with the JSON null value. By default, fields 2987 // with empty values are omitted from API requests. However, any field 2988 // with an empty value appearing in NullFields will be sent to the 2989 // server as null. It is an error if a field in this list has a 2990 // non-empty value. This may be used to include null fields in Patch 2991 // requests. 2992 NullFields []string `json:"-"` 2993} 2994 2995func (s *CombinedAudienceTargetingSetting) MarshalJSON() ([]byte, error) { 2996 type NoMethod CombinedAudienceTargetingSetting 2997 raw := NoMethod(*s) 2998 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2999} 3000 3001// ContentInstreamPositionAssignedTargetingOptionDetails: Assigned 3002// content instream position targeting option details. This will 3003// be 3004// populated in the 3005// content_instream_position_details 3006// field when 3007// targeting_type is 3008// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 3009type ContentInstreamPositionAssignedTargetingOptionDetails struct { 3010 // ContentInstreamPosition: Output only. The content instream position 3011 // for video or audio ads. 3012 // 3013 // Possible values: 3014 // "CONTENT_INSTREAM_POSITION_UNSPECIFIED" - Content instream position 3015 // is not specified in this version. This enum is a 3016 // place holder for a default value and does not represent a real in 3017 // stream ad 3018 // position. 3019 // "CONTENT_INSTREAM_POSITION_PRE_ROLL" - Ads that play before 3020 // streaming content. 3021 // "CONTENT_INSTREAM_POSITION_MID_ROLL" - Ads that play between the 3022 // beginning and end of streaming content. 3023 // "CONTENT_INSTREAM_POSITION_POST_ROLL" - Ads that play at the end of 3024 // streaming content. 3025 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"` 3026 3027 // TargetingOptionId: Required. The targeting_option_id field 3028 // when 3029 // targeting_type is 3030 // `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 3031 TargetingOptionId string `json:"targetingOptionId,omitempty"` 3032 3033 // ForceSendFields is a list of field names (e.g. 3034 // "ContentInstreamPosition") to unconditionally include in API 3035 // requests. By default, fields with empty values are omitted from API 3036 // requests. However, any non-pointer, non-interface field appearing in 3037 // ForceSendFields will be sent to the server regardless of whether the 3038 // field is empty or not. This may be used to include empty fields in 3039 // Patch requests. 3040 ForceSendFields []string `json:"-"` 3041 3042 // NullFields is a list of field names (e.g. "ContentInstreamPosition") 3043 // to include in API requests with the JSON null value. By default, 3044 // fields with empty values are omitted from API requests. However, any 3045 // field with an empty value appearing in NullFields will be sent to the 3046 // server as null. It is an error if a field in this list has a 3047 // non-empty value. This may be used to include null fields in Patch 3048 // requests. 3049 NullFields []string `json:"-"` 3050} 3051 3052func (s *ContentInstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3053 type NoMethod ContentInstreamPositionAssignedTargetingOptionDetails 3054 raw := NoMethod(*s) 3055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3056} 3057 3058// ContentInstreamPositionTargetingOptionDetails: Represents a 3059// targetable content instream position, which could be used by 3060// video and audio ads. This will be populated in 3061// the 3062// content_instream_position_details 3063// field when targeting_type 3064// is 3065// `TARGETING_TYPE_CONTENT_INSTREAM_POSITION`. 3066type ContentInstreamPositionTargetingOptionDetails struct { 3067 // ContentInstreamPosition: Output only. The content instream position. 3068 // 3069 // Possible values: 3070 // "CONTENT_INSTREAM_POSITION_UNSPECIFIED" - Content instream position 3071 // is not specified in this version. This enum is a 3072 // place holder for a default value and does not represent a real in 3073 // stream ad 3074 // position. 3075 // "CONTENT_INSTREAM_POSITION_PRE_ROLL" - Ads that play before 3076 // streaming content. 3077 // "CONTENT_INSTREAM_POSITION_MID_ROLL" - Ads that play between the 3078 // beginning and end of streaming content. 3079 // "CONTENT_INSTREAM_POSITION_POST_ROLL" - Ads that play at the end of 3080 // streaming content. 3081 ContentInstreamPosition string `json:"contentInstreamPosition,omitempty"` 3082 3083 // ForceSendFields is a list of field names (e.g. 3084 // "ContentInstreamPosition") to unconditionally include in API 3085 // requests. By default, fields with empty values are omitted from API 3086 // requests. However, any non-pointer, non-interface field appearing in 3087 // ForceSendFields will be sent to the server regardless of whether the 3088 // field is empty or not. This may be used to include empty fields in 3089 // Patch requests. 3090 ForceSendFields []string `json:"-"` 3091 3092 // NullFields is a list of field names (e.g. "ContentInstreamPosition") 3093 // to include in API requests with the JSON null value. By default, 3094 // fields with empty values are omitted from API requests. However, any 3095 // field with an empty value appearing in NullFields will be sent to the 3096 // server as null. It is an error if a field in this list has a 3097 // non-empty value. This may be used to include null fields in Patch 3098 // requests. 3099 NullFields []string `json:"-"` 3100} 3101 3102func (s *ContentInstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3103 type NoMethod ContentInstreamPositionTargetingOptionDetails 3104 raw := NoMethod(*s) 3105 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3106} 3107 3108// ContentOutstreamPositionAssignedTargetingOptionDetails: Assigned 3109// content outstream position targeting option details. This will 3110// be 3111// populated in the 3112// content_outstream_position_details 3113// field when 3114// targeting_type is 3115// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 3116type ContentOutstreamPositionAssignedTargetingOptionDetails struct { 3117 // ContentOutstreamPosition: Output only. The content outstream 3118 // position. 3119 // 3120 // Possible values: 3121 // "CONTENT_OUTSTREAM_POSITION_UNSPECIFIED" - Content outstream 3122 // position is not specified in this version. This enum is a 3123 // place holder for a default value and does not represent a real 3124 // content 3125 // outstream position. 3126 // "CONTENT_OUTSTREAM_POSITION_UNKNOWN" - The ad position is unknown 3127 // in the content outstream. 3128 // "CONTENT_OUTSTREAM_POSITION_IN_ARTICLE" - Ads that appear between 3129 // the paragraphs of your pages. 3130 // "CONTENT_OUTSTREAM_POSITION_IN_BANNER" - Ads that display on the 3131 // top and the sides of a page. 3132 // "CONTENT_OUTSTREAM_POSITION_IN_FEED" - Ads that appear in a 3133 // scrollable stream of content. A feed is typically 3134 // editorial (e.g. a list of articles or news) or listings (e.g. a list 3135 // of 3136 // products or services). 3137 // "CONTENT_OUTSTREAM_POSITION_INTERSTITIAL" - Ads shown before or 3138 // between content loads. 3139 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"` 3140 3141 // TargetingOptionId: Required. The targeting_option_id field 3142 // when 3143 // targeting_type is 3144 // `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 3145 TargetingOptionId string `json:"targetingOptionId,omitempty"` 3146 3147 // ForceSendFields is a list of field names (e.g. 3148 // "ContentOutstreamPosition") to unconditionally include in API 3149 // requests. By default, fields with empty values are omitted from API 3150 // requests. However, any non-pointer, non-interface field appearing in 3151 // ForceSendFields will be sent to the server regardless of whether the 3152 // field is empty or not. This may be used to include empty fields in 3153 // Patch requests. 3154 ForceSendFields []string `json:"-"` 3155 3156 // NullFields is a list of field names (e.g. "ContentOutstreamPosition") 3157 // to include in API requests with the JSON null value. By default, 3158 // fields with empty values are omitted from API requests. However, any 3159 // field with an empty value appearing in NullFields will be sent to the 3160 // server as null. It is an error if a field in this list has a 3161 // non-empty value. This may be used to include null fields in Patch 3162 // requests. 3163 NullFields []string `json:"-"` 3164} 3165 3166func (s *ContentOutstreamPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3167 type NoMethod ContentOutstreamPositionAssignedTargetingOptionDetails 3168 raw := NoMethod(*s) 3169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3170} 3171 3172// ContentOutstreamPositionTargetingOptionDetails: Represents a 3173// targetable content outstream position, which could be used by 3174// display and video ads. This will be populated in 3175// the 3176// content_outstream_position_details 3177// field when targeting_type 3178// is 3179// `TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION`. 3180type ContentOutstreamPositionTargetingOptionDetails struct { 3181 // ContentOutstreamPosition: Output only. The content outstream 3182 // position. 3183 // 3184 // Possible values: 3185 // "CONTENT_OUTSTREAM_POSITION_UNSPECIFIED" - Content outstream 3186 // position is not specified in this version. This enum is a 3187 // place holder for a default value and does not represent a real 3188 // content 3189 // outstream position. 3190 // "CONTENT_OUTSTREAM_POSITION_UNKNOWN" - The ad position is unknown 3191 // in the content outstream. 3192 // "CONTENT_OUTSTREAM_POSITION_IN_ARTICLE" - Ads that appear between 3193 // the paragraphs of your pages. 3194 // "CONTENT_OUTSTREAM_POSITION_IN_BANNER" - Ads that display on the 3195 // top and the sides of a page. 3196 // "CONTENT_OUTSTREAM_POSITION_IN_FEED" - Ads that appear in a 3197 // scrollable stream of content. A feed is typically 3198 // editorial (e.g. a list of articles or news) or listings (e.g. a list 3199 // of 3200 // products or services). 3201 // "CONTENT_OUTSTREAM_POSITION_INTERSTITIAL" - Ads shown before or 3202 // between content loads. 3203 ContentOutstreamPosition string `json:"contentOutstreamPosition,omitempty"` 3204 3205 // ForceSendFields is a list of field names (e.g. 3206 // "ContentOutstreamPosition") to unconditionally include in API 3207 // requests. By default, fields with empty values are omitted from API 3208 // requests. However, any non-pointer, non-interface field appearing in 3209 // ForceSendFields will be sent to the server regardless of whether the 3210 // field is empty or not. This may be used to include empty fields in 3211 // Patch requests. 3212 ForceSendFields []string `json:"-"` 3213 3214 // NullFields is a list of field names (e.g. "ContentOutstreamPosition") 3215 // to include in API requests with the JSON null value. By default, 3216 // fields with empty values are omitted from API requests. However, any 3217 // field with an empty value appearing in NullFields will be sent to the 3218 // server as null. It is an error if a field in this list has a 3219 // non-empty value. This may be used to include null fields in Patch 3220 // requests. 3221 NullFields []string `json:"-"` 3222} 3223 3224func (s *ContentOutstreamPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 3225 type NoMethod ContentOutstreamPositionTargetingOptionDetails 3226 raw := NoMethod(*s) 3227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3228} 3229 3230// ConversionCountingConfig: Settings that control how conversions are 3231// counted. 3232// 3233// All post-click conversions will be counted. A percentage value can be 3234// set 3235// for post-view conversions counting. 3236type ConversionCountingConfig struct { 3237 // FloodlightActivityConfigs: The Floodlight activity configs used to 3238 // track conversions. 3239 // 3240 // The number of conversions counted is the sum of all of the 3241 // conversions 3242 // counted by all of the Floodlight activity IDs specified in this 3243 // field. 3244 FloodlightActivityConfigs []*TrackingFloodlightActivityConfig `json:"floodlightActivityConfigs,omitempty"` 3245 3246 // PostViewCountPercentageMillis: The percentage of post-view 3247 // conversions to count, in millis (1/1000 of a 3248 // percent). Must be between 0 and 100000 inclusive. 3249 // 3250 // For example, to track 50% of the post-click conversions, set a value 3251 // of 3252 // 50000. 3253 PostViewCountPercentageMillis int64 `json:"postViewCountPercentageMillis,omitempty,string"` 3254 3255 // ForceSendFields is a list of field names (e.g. 3256 // "FloodlightActivityConfigs") to unconditionally include in API 3257 // requests. By default, fields with empty values are omitted from API 3258 // requests. However, any non-pointer, non-interface field appearing in 3259 // ForceSendFields will be sent to the server regardless of whether the 3260 // field is empty or not. This may be used to include empty fields in 3261 // Patch requests. 3262 ForceSendFields []string `json:"-"` 3263 3264 // NullFields is a list of field names (e.g. 3265 // "FloodlightActivityConfigs") to include in API requests with the JSON 3266 // null value. By default, fields with empty values are omitted from API 3267 // requests. However, any field with an empty value appearing in 3268 // NullFields will be sent to the server as null. It is an error if a 3269 // field in this list has a non-empty value. This may be used to include 3270 // null fields in Patch requests. 3271 NullFields []string `json:"-"` 3272} 3273 3274func (s *ConversionCountingConfig) MarshalJSON() ([]byte, error) { 3275 type NoMethod ConversionCountingConfig 3276 raw := NoMethod(*s) 3277 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3278} 3279 3280// CounterEvent: Counter event of the creative. 3281type CounterEvent struct { 3282 // Name: Required. The name of the counter event. 3283 Name string `json:"name,omitempty"` 3284 3285 // ReportingName: Required. The name used to identify this counter event 3286 // in reports. 3287 ReportingName string `json:"reportingName,omitempty"` 3288 3289 // ForceSendFields is a list of field names (e.g. "Name") to 3290 // unconditionally include in API requests. By default, fields with 3291 // empty values are omitted from API requests. However, any non-pointer, 3292 // non-interface field appearing in ForceSendFields will be sent to the 3293 // server regardless of whether the field is empty or not. This may be 3294 // used to include empty fields in Patch requests. 3295 ForceSendFields []string `json:"-"` 3296 3297 // NullFields is a list of field names (e.g. "Name") to include in API 3298 // requests with the JSON null value. By default, fields with empty 3299 // values are omitted from API requests. However, any field with an 3300 // empty value appearing in NullFields will be sent to the server as 3301 // null. It is an error if a field in this list has a non-empty value. 3302 // This may be used to include null fields in Patch requests. 3303 NullFields []string `json:"-"` 3304} 3305 3306func (s *CounterEvent) MarshalJSON() ([]byte, error) { 3307 type NoMethod CounterEvent 3308 raw := NoMethod(*s) 3309 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3310} 3311 3312// CreateAssetRequest: A request message for CreateAsset. 3313type CreateAssetRequest struct { 3314 // Filename: Required. The filename of the asset, including the file 3315 // extension. 3316 // 3317 // The filename must be UTF-8 encoded with a maximum size of 240 bytes. 3318 Filename string `json:"filename,omitempty"` 3319 3320 // ForceSendFields is a list of field names (e.g. "Filename") to 3321 // unconditionally include in API requests. By default, fields with 3322 // empty values are omitted from API requests. However, any non-pointer, 3323 // non-interface field appearing in ForceSendFields will be sent to the 3324 // server regardless of whether the field is empty or not. This may be 3325 // used to include empty fields in Patch requests. 3326 ForceSendFields []string `json:"-"` 3327 3328 // NullFields is a list of field names (e.g. "Filename") to include in 3329 // API requests with the JSON null value. By default, fields with empty 3330 // values are omitted from API requests. However, any field with an 3331 // empty value appearing in NullFields will be sent to the server as 3332 // null. It is an error if a field in this list has a non-empty value. 3333 // This may be used to include null fields in Patch requests. 3334 NullFields []string `json:"-"` 3335} 3336 3337func (s *CreateAssetRequest) MarshalJSON() ([]byte, error) { 3338 type NoMethod CreateAssetRequest 3339 raw := NoMethod(*s) 3340 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3341} 3342 3343// CreateAssetResponse: A response message for CreateAsset. 3344type CreateAssetResponse struct { 3345 // Asset: The uploaded asset, if successful. 3346 Asset *Asset `json:"asset,omitempty"` 3347 3348 // ServerResponse contains the HTTP response code and headers from the 3349 // server. 3350 googleapi.ServerResponse `json:"-"` 3351 3352 // ForceSendFields is a list of field names (e.g. "Asset") to 3353 // unconditionally include in API requests. By default, fields with 3354 // empty values are omitted from API requests. However, any non-pointer, 3355 // non-interface field appearing in ForceSendFields will be sent to the 3356 // server regardless of whether the field is empty or not. This may be 3357 // used to include empty fields in Patch requests. 3358 ForceSendFields []string `json:"-"` 3359 3360 // NullFields is a list of field names (e.g. "Asset") to include in API 3361 // requests with the JSON null value. By default, fields with empty 3362 // values are omitted from API requests. However, any field with an 3363 // empty value appearing in NullFields will be sent to the server as 3364 // null. It is an error if a field in this list has a non-empty value. 3365 // This may be used to include null fields in Patch requests. 3366 NullFields []string `json:"-"` 3367} 3368 3369func (s *CreateAssetResponse) MarshalJSON() ([]byte, error) { 3370 type NoMethod CreateAssetResponse 3371 raw := NoMethod(*s) 3372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3373} 3374 3375// CreateAssignedTargetingOptionsRequest: A request listing which 3376// assigned targeting options of a given targeting type 3377// should be created and added. 3378type CreateAssignedTargetingOptionsRequest struct { 3379 // AssignedTargetingOptions: Required. The assigned targeting options to 3380 // create and add. 3381 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 3382 3383 // TargetingType: Required. Identifies the type of this assigned 3384 // targeting option. 3385 // 3386 // Possible values: 3387 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 3388 // specified or is unknown in this version. 3389 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 3390 // related websites or apps). 3391 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 3392 // example, education or puzzle games). 3393 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 3394 // Birds). 3395 // "TARGETING_TYPE_URL" - Target a specific url (for example, 3396 // quora.com). 3397 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 3398 // period on a specific day. 3399 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 3400 // (for example, 18-24). 3401 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 3402 // specified regions on a regional location list. 3403 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 3404 // specified points of interest on a proximity location 3405 // list. 3406 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 3407 // example, female or male). 3408 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 3409 // size for video ads. 3410 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 3411 // content for video ads. 3412 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 3413 // parental status (for example, parent or not a 3414 // parent). 3415 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 3416 // ads in a specific content instream position (for 3417 // example, pre-roll, mid-roll, or post-roll). 3418 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 3419 // specific content outstream position. 3420 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 3421 // (for example, tablet or connected TV). 3422 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 3423 // groups of audiences. 3424 // Singleton field, at most one can exist on a single Lineitem at a 3425 // time. 3426 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 3427 // example, Chrome). 3428 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 3429 // household income range (for example, top 10%). 3430 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 3431 // screen position. 3432 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 3433 // third party verification (for example, IAS or 3434 // DoubleVerify). 3435 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 3436 // by specific digital content label ratings (for example, 3437 // DL-MA: suitable only for mature audiences). 3438 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 3439 // content by sensitive categories (for example, adult). 3440 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 3441 // (for example, web or app). 3442 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 3443 // carrier or internet service provider 3444 // (ISP) (for example, Comcast or Orange). 3445 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 3446 // operating system (for example, macOS). 3447 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 3448 // device make or model (for example, Roku or 3449 // Samsung). 3450 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 3451 // example, dog or retriever). 3452 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 3453 // negative keyword list. 3454 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 3455 // (for example, 80% viewable). 3456 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 3457 // category (for example, arts & 3458 // entertainment). 3459 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 3460 // specific deals and auction packages. 3461 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 3462 // example, English or Japanese). 3463 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 3464 // authorized sellers. 3465 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 3466 // location (for example, a city or state). 3467 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 3468 // a group of deals and auction packages. 3469 // "TARGETING_TYPE_PROXIMITY_LOCATION" - Target ads to business 3470 // chains, individual points of interests (POIs), 3471 // street addresses, and latitude/longitude coordinates. 3472 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 3473 // exchanges. 3474 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 3475 // sub-exchanges. 3476 TargetingType string `json:"targetingType,omitempty"` 3477 3478 // ForceSendFields is a list of field names (e.g. 3479 // "AssignedTargetingOptions") to unconditionally include in API 3480 // requests. By default, fields with empty values are omitted from API 3481 // requests. However, any non-pointer, non-interface field appearing in 3482 // ForceSendFields will be sent to the server regardless of whether the 3483 // field is empty or not. This may be used to include empty fields in 3484 // Patch requests. 3485 ForceSendFields []string `json:"-"` 3486 3487 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 3488 // to include in API requests with the JSON null value. By default, 3489 // fields with empty values are omitted from API requests. However, any 3490 // field with an empty value appearing in NullFields will be sent to the 3491 // server as null. It is an error if a field in this list has a 3492 // non-empty value. This may be used to include null fields in Patch 3493 // requests. 3494 NullFields []string `json:"-"` 3495} 3496 3497func (s *CreateAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 3498 type NoMethod CreateAssignedTargetingOptionsRequest 3499 raw := NoMethod(*s) 3500 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3501} 3502 3503// CreateSdfDownloadTaskRequest: Request message for 3504// [SdfDownloadTaskService.CreateSdfDownloadTask]. 3505type CreateSdfDownloadTaskRequest struct { 3506 // AdvertiserId: The ID of the advertiser to download SDF for. 3507 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 3508 3509 // IdFilter: Filters on entities by their entity IDs. 3510 IdFilter *IdFilter `json:"idFilter,omitempty"` 3511 3512 // InventorySourceFilter: Filters on Inventory Sources by their IDs. 3513 InventorySourceFilter *InventorySourceFilter `json:"inventorySourceFilter,omitempty"` 3514 3515 // ParentEntityFilter: Filters on selected file types. The entities in 3516 // each file are filtered 3517 // by a chosen set of filter entities. The filter entities must be the 3518 // same 3519 // type as, or a parent type of, the selected file types. 3520 ParentEntityFilter *ParentEntityFilter `json:"parentEntityFilter,omitempty"` 3521 3522 // PartnerId: The ID of the partner to download SDF for. 3523 PartnerId int64 `json:"partnerId,omitempty,string"` 3524 3525 // Version: Required. The SDF version of the downloaded file. If set 3526 // to 3527 // `SDF_VERSION_UNSPECIFIED`, this will default to the version specified 3528 // by 3529 // the advertiser or partner identified by `root_id`. An advertiser 3530 // inherits 3531 // its SDF version from its partner unless configured otherwise. 3532 // 3533 // Possible values: 3534 // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or 3535 // is unknown in this version. 3536 // "SDF_VERSION_3_1" - SDF version 3.1 3537 // "SDF_VERSION_4" - SDF version 4 3538 // "SDF_VERSION_4_1" - SDF version 4.1 3539 // "SDF_VERSION_4_2" - SDF version 4.2 3540 // "SDF_VERSION_5" - SDF version 5. 3541 // "SDF_VERSION_5_1" - SDF version 5.1 3542 Version string `json:"version,omitempty"` 3543 3544 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 3545 // unconditionally include in API requests. By default, fields with 3546 // empty values are omitted from API requests. However, any non-pointer, 3547 // non-interface field appearing in ForceSendFields will be sent to the 3548 // server regardless of whether the field is empty or not. This may be 3549 // used to include empty fields in Patch requests. 3550 ForceSendFields []string `json:"-"` 3551 3552 // NullFields is a list of field names (e.g. "AdvertiserId") to include 3553 // in API requests with the JSON null value. By default, fields with 3554 // empty values are omitted from API requests. However, any field with 3555 // an empty value appearing in NullFields will be sent to the server as 3556 // null. It is an error if a field in this list has a non-empty value. 3557 // This may be used to include null fields in Patch requests. 3558 NullFields []string `json:"-"` 3559} 3560 3561func (s *CreateSdfDownloadTaskRequest) MarshalJSON() ([]byte, error) { 3562 type NoMethod CreateSdfDownloadTaskRequest 3563 raw := NoMethod(*s) 3564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3565} 3566 3567// Creative: A single Creative. 3568type Creative struct { 3569 // AdditionalDimensions: Additional dimensions. 3570 // Applicable when creative_type is one of: 3571 // 3572 // * `CREATIVE_TYPE_STANDARD` 3573 // * `CREATIVE_TYPE_EXPANDABLE` 3574 // * `CREATIVE_TYPE_NATIVE` 3575 // * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL` 3576 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 3577 // * `CREATIVE_TYPE_LIGHTBOX` 3578 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 3579 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 3580 // * `CREATIVE_TYPE_PUBLISHER_HOSTED` 3581 // 3582 // If this field is specified, width_pixels and 3583 // height_pixels are both required and must be 3584 // greater than or equal to 0. 3585 AdditionalDimensions []*Dimensions `json:"additionalDimensions,omitempty"` 3586 3587 // AdvertiserId: Output only. The unique ID of the advertiser the 3588 // creative belongs to. 3589 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 3590 3591 // AppendedTag: Third-party HTML tracking tag to be appended to the 3592 // creative tag. 3593 AppendedTag string `json:"appendedTag,omitempty"` 3594 3595 // Assets: Required. Assets associated to this creative. 3596 // Assets can be associated to the creative in one of following 3597 // roles: 3598 // 3599 // * `ASSET_ROLE_UNSPECIFIED` 3600 // * `ASSET_ROLE_MAIN` 3601 // * `ASSET_ROLE_BACKUP` 3602 // * `ASSET_ROLE_POLITE_LOAD` 3603 Assets []*AssetAssociation `json:"assets,omitempty"` 3604 3605 // CmPlacementId: Output only. The unique ID of the Campaign Manager 3606 // placement associated with the 3607 // creative. 3608 // This field is only applicable for creatives that are synced from 3609 // Campaign 3610 // Manager. 3611 CmPlacementId int64 `json:"cmPlacementId,omitempty,string"` 3612 3613 // CmTrackingAd: The Campaign Manager tracking ad associated with the 3614 // creative. 3615 // 3616 // Optional for the following creative_type when 3617 // created by an advertiser that uses both Campaign Manager and 3618 // third-party ad 3619 // serving: 3620 // 3621 // * `CREATIVE_TYPE_NATIVE` 3622 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 3623 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 3624 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 3625 // 3626 // Output only for other cases. 3627 CmTrackingAd *CmTrackingAd `json:"cmTrackingAd,omitempty"` 3628 3629 // CompanionCreativeIds: The IDs of companion creatives for a video 3630 // creative. 3631 // 3632 // You can assign existing display creatives (with image or HTML5 3633 // assets) 3634 // to serve surrounding the publisher's video player. Companions 3635 // display 3636 // around the video player while the video is playing and remain after 3637 // the 3638 // video has completed. 3639 // 3640 // Creatives contain additional dimensions 3641 // can not be companion creatives. 3642 // 3643 // This field is only supported for following 3644 // creative_type: 3645 // 3646 // * `CREATIVE_TYPE_AUDIO` 3647 // * `CREATIVE_TYPE_VIDEO` 3648 CompanionCreativeIds googleapi.Int64s `json:"companionCreativeIds,omitempty"` 3649 3650 // CounterEvents: Counter events for a rich media creative. 3651 // Counters track the number of times that a user interacts with any 3652 // part of a 3653 // rich media creative in a specified way (mouse-overs, mouse-outs, 3654 // clicks, 3655 // taps, data loading, keyboard entries, etc.). 3656 // Any event that can be captured in the creative can be recorded as 3657 // a 3658 // counter. 3659 // Leave it empty or unset for creatives containing image assets only. 3660 CounterEvents []*CounterEvent `json:"counterEvents,omitempty"` 3661 3662 // CreateTime: Output only. The timestamp when the creative was created. 3663 // Assigned by 3664 // the system. 3665 CreateTime string `json:"createTime,omitempty"` 3666 3667 // CreativeAttributes: Output only. A list of attributes of the creative 3668 // that is generated by the system. 3669 // 3670 // Possible values: 3671 // "CREATIVE_ATTRIBUTE_UNSPECIFIED" - The creative attribute is not 3672 // specified or is unknown in this version. 3673 // "CREATIVE_ATTRIBUTE_VAST" - The creative is a VAST creative. 3674 // "CREATIVE_ATTRIBUTE_VPAID_LINEAR" - The creative is a linear VPAID 3675 // creative. 3676 // "CREATIVE_ATTRIBUTE_VPAID_NON_LINEAR" - The creative is a 3677 // non-linear VPAID creative. 3678 CreativeAttributes []string `json:"creativeAttributes,omitempty"` 3679 3680 // CreativeId: Output only. The unique ID of the creative. Assigned by 3681 // the system. 3682 CreativeId int64 `json:"creativeId,omitempty,string"` 3683 3684 // CreativeType: Required. Immutable. The type of the creative. 3685 // 3686 // Possible values: 3687 // "CREATIVE_TYPE_UNSPECIFIED" - Type value is not specified or is 3688 // unknown in this version. 3689 // "CREATIVE_TYPE_STANDARD" - Standard display creative. 3690 // 3691 // Create and update methods are supported for this creative type if 3692 // the 3693 // hosting_source is one of the following: 3694 // 3695 // * `HOSTING_SOURCE_HOSTED` 3696 // * `HOSTING_SOURCE_THIRD_PARTY` 3697 // "CREATIVE_TYPE_EXPANDABLE" - Expandable creative. 3698 // 3699 // Create and update methods are supported for this creative type if 3700 // the 3701 // hosting_source is `HOSTING_SOURCE_THIRD_PARTY` 3702 // "CREATIVE_TYPE_VIDEO" - Video creative. 3703 // 3704 // Create and update methods are supported for this creative type if 3705 // the 3706 // hosting_source is one of the following: 3707 // 3708 // * `HOSTING_SOURCE_HOSTED` 3709 // * `HOSTING_SOURCE_THIRD_PARTY` 3710 // "CREATIVE_TYPE_NATIVE" - Native creative rendered by publishers 3711 // with assets from advertiser. 3712 // 3713 // Create and update methods are supported for this creative type if 3714 // the 3715 // hosting_source is `HOSTING_SOURCE_HOSTED` 3716 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL" - Templated app install 3717 // mobile creative (banner). 3718 // 3719 // Create and update methods are **not** supported for this creative 3720 // type. 3721 // "CREATIVE_TYPE_NATIVE_SITE_SQUARE" - Square native 3722 // creative. 3723 // 3724 // Create and update methods are supported for this creative type if 3725 // the 3726 // hosting_source is `HOSTING_SOURCE_HOSTED` 3727 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL" - Interstitial 3728 // creative including both display and video. 3729 // 3730 // Create and update methods are **not** supported for this creative 3731 // type. 3732 // "CREATIVE_TYPE_LIGHTBOX" - Responsive and expandable Lightbox 3733 // creative. 3734 // 3735 // Create and update methods are **not** supported for this creative 3736 // type. 3737 // "CREATIVE_TYPE_NATIVE_APP_INSTALL" - Native app install 3738 // creative. 3739 // 3740 // Create and update methods are supported for this creative type if 3741 // the 3742 // hosting_source is `HOSTING_SOURCE_HOSTED` 3743 // "CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE" - Square native app 3744 // install creative. 3745 // 3746 // Create and update methods are supported for this creative type if 3747 // the 3748 // hosting_source is `HOSTING_SOURCE_HOSTED` 3749 // "CREATIVE_TYPE_AUDIO" - Audio creative. 3750 // 3751 // Create and update methods are supported for this creative type if 3752 // the 3753 // hosting_source is `HOSTING_SOURCE_HOSTED` 3754 // "CREATIVE_TYPE_PUBLISHER_HOSTED" - Publisher hosted 3755 // creative. 3756 // 3757 // Create and update methods are **not** supported for this creative 3758 // type. 3759 // "CREATIVE_TYPE_NATIVE_VIDEO" - Native video creative. 3760 // 3761 // Create and update methods are supported for this creative type if 3762 // the 3763 // hosting_source is `HOSTING_SOURCE_HOSTED` 3764 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO" - Templated app install 3765 // mobile video creative. 3766 // 3767 // Create and update methods are **not** supported for this creative 3768 // type. 3769 CreativeType string `json:"creativeType,omitempty"` 3770 3771 // Dimensions: Required. Primary dimensions of the creative. 3772 // Applicable to all creative types. The value of 3773 // width_pixels and 3774 // height_pixels defaults to `0` 3775 // when creative_type is one of: 3776 // 3777 // * `CREATIVE_TYPE_VIDEO` 3778 // * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL` 3779 // * `CREATIVE_TYPE_AUDIO` 3780 // * `CREATIVE_TYPE_NATIVE_VIDEO` 3781 // * `CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO` 3782 Dimensions *Dimensions `json:"dimensions,omitempty"` 3783 3784 // DisplayName: Required. The display name of the creative. 3785 // 3786 // Must be UTF-8 encoded with a maximum size of 240 bytes. 3787 DisplayName string `json:"displayName,omitempty"` 3788 3789 // Dynamic: Output only. Indicates whether the creative is dynamic. 3790 Dynamic bool `json:"dynamic,omitempty"` 3791 3792 // EntityStatus: Required. Controls whether or not the creative can 3793 // serve. 3794 // 3795 // Accepted values are: 3796 // 3797 // * `ENTITY_STATUS_ACTIVE` 3798 // * `ENTITY_STATUS_ARCHIVED` 3799 // * `ENTITY_STATUS_PAUSED` 3800 // 3801 // Possible values: 3802 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 3803 // specified or is unknown in this version. 3804 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 3805 // budget. 3806 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 3807 // budget spending are disabled. An 3808 // entity can be deleted after archived. Deleted entities cannot be 3809 // retrieved. 3810 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 3811 // budget spending are disabled. 3812 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 3813 // the entity. 3814 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 3815 // for deletion. 3816 EntityStatus string `json:"entityStatus,omitempty"` 3817 3818 // ExitEvents: Required. Exit events for this creative. 3819 // An exit (also known as a click tag) is any area in your creative 3820 // that 3821 // someone can click or tap to open an advertiser's landing page. 3822 // Every creative must include at least one exit. 3823 // You can add an exit to your creative in any of the following ways: 3824 // 3825 // * Use Google Web Designer's tap area. 3826 // * Define a JavaScript variable called "clickTag". 3827 // * Use the Enabler (Enabler.exit()) to track exits in rich media 3828 // formats. 3829 ExitEvents []*ExitEvent `json:"exitEvents,omitempty"` 3830 3831 // ExpandOnHover: Optional. Indicates the creative will automatically 3832 // expand on hover. 3833 // 3834 // Optional and only valid for third-party expandable 3835 // creatives. 3836 // Third-party expandable creatives are creatives with following 3837 // hosting 3838 // source: 3839 // 3840 // * `HOSTING_SOURCE_THIRD_PARTY` 3841 // 3842 // combined with following creative_type: 3843 // 3844 // * `CREATIVE_TYPE_EXPANDABLE` 3845 ExpandOnHover bool `json:"expandOnHover,omitempty"` 3846 3847 // ExpandingDirection: Optional. Specifies the expanding direction of 3848 // the creative. 3849 // 3850 // Required and only valid for third-party expandable 3851 // creatives. 3852 // 3853 // Third-party expandable creatives are creatives with following 3854 // hosting 3855 // source: 3856 // 3857 // * `HOSTING_SOURCE_THIRD_PARTY` 3858 // 3859 // combined with following creative_type: 3860 // 3861 // * `CREATIVE_TYPE_EXPANDABLE` 3862 // 3863 // Possible values: 3864 // "EXPANDING_DIRECTION_UNSPECIFIED" - The expanding direction is not 3865 // specified. 3866 // "EXPANDING_DIRECTION_NONE" - Does not expand in any direction. 3867 // "EXPANDING_DIRECTION_UP" - Expands up. 3868 // "EXPANDING_DIRECTION_DOWN" - Expands down. 3869 // "EXPANDING_DIRECTION_LEFT" - Expands left. 3870 // "EXPANDING_DIRECTION_RIGHT" - Expands right. 3871 // "EXPANDING_DIRECTION_UP_AND_LEFT" - Expands up and to the left 3872 // side. 3873 // "EXPANDING_DIRECTION_UP_AND_RIGHT" - Expands up and to the right 3874 // side. 3875 // "EXPANDING_DIRECTION_DOWN_AND_LEFT" - Expands down and to the left 3876 // side. 3877 // "EXPANDING_DIRECTION_DOWN_AND_RIGHT" - Expands down and to the 3878 // right side. 3879 // "EXPANDING_DIRECTION_UP_OR_DOWN" - Expands either up or down. 3880 // "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - Expands to either the left or 3881 // the right side. 3882 // "EXPANDING_DIRECTION_ANY_DIAGONAL" - Can expand in any diagonal 3883 // direction. 3884 ExpandingDirection string `json:"expandingDirection,omitempty"` 3885 3886 // HostingSource: Required. Indicates where the creative is hosted. 3887 // 3888 // Possible values: 3889 // "HOSTING_SOURCE_UNSPECIFIED" - Hosting source is not specified or 3890 // is unknown in this version. 3891 // "HOSTING_SOURCE_CM" - A creative synced from Campaign 3892 // Manager. 3893 // 3894 // Create and update methods are **not** supported for this hosting 3895 // type. 3896 // "HOSTING_SOURCE_THIRD_PARTY" - A creative hosted by a third-party 3897 // ad server (3PAS). 3898 // 3899 // Create and update methods are supported for this hosting type if 3900 // the 3901 // creative_type is one of the following: 3902 // 3903 // * `CREATIVE_TYPE_EXPANDABLE` 3904 // * `CREATIVE_TYPE_STANDARD` 3905 // * `CREATIVE_TYPE_VIDEO` 3906 // "HOSTING_SOURCE_HOSTED" - A creative created in DV360 and hosted by 3907 // Campaign Manager. 3908 // 3909 // Create and update methods are supported for this hosting type if 3910 // the 3911 // creative_type is one of the following: 3912 // 3913 // * `CREATIVE_TYPE_AUDIO` 3914 // * `CREATIVE_TYPE_NATIVE` 3915 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 3916 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 3917 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 3918 // * `CREATIVE_TYPE_NATIVE_VIDEO` 3919 // * `CREATIVE_TYPE_STANDARD` 3920 // * `CREATIVE_TYPE_VIDEO` 3921 // "HOSTING_SOURCE_RICH_MEDIA" - A rich media creative created in 3922 // Studio and hosted by Campaign Manager. 3923 // 3924 // Create and update methods are **not** supported for this hosting 3925 // type. 3926 HostingSource string `json:"hostingSource,omitempty"` 3927 3928 // Html5Video: Output only. Indicates the third-party VAST tag creative 3929 // requires HTML5 Video support. 3930 // 3931 // Output only and only valid for third-party VAST tag 3932 // creatives. 3933 // 3934 // Third-party VAST tag creatives are creatives with 3935 // following 3936 // hosting_source: 3937 // 3938 // * `HOSTING_SOURCE_THIRD_PARTY` 3939 // 3940 // combined with following creative_type: 3941 // 3942 // * `CREATIVE_TYPE_VIDEO` 3943 Html5Video bool `json:"html5Video,omitempty"` 3944 3945 // IasCampaignMonitoring: Indicates whether Integral Ad Science (IAS) 3946 // campaign monitoring is enabled. 3947 // To enable this for the creative, make sure 3948 // the 3949 // Advertiser.creative_config.ias_client_id 3950 // has been set to your IAS client ID. 3951 IasCampaignMonitoring bool `json:"iasCampaignMonitoring,omitempty"` 3952 3953 // IntegrationCode: ID information used to link this creative to an 3954 // external system. 3955 // Must be UTF-8 encoded with a length of no more than 10,000 3956 // characters. 3957 IntegrationCode string `json:"integrationCode,omitempty"` 3958 3959 // JsTrackerUrl: JavaScript measurement URL from supported third-party 3960 // verification 3961 // providers (ComScore, DoubleVerify, IAS, Moat). HTML script tags are 3962 // not 3963 // supported. 3964 // 3965 // This field is only supported in following 3966 // creative_type: 3967 // 3968 // * `CREATIVE_TYPE_NATIVE` 3969 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 3970 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 3971 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 3972 // * `CREATIVE_TYPE_NATIVE_VIDEO` 3973 JsTrackerUrl string `json:"jsTrackerUrl,omitempty"` 3974 3975 // MediaDuration: Output only. Media duration of the 3976 // creative. 3977 // Applicable when creative_type 3978 // is one of: 3979 // 3980 // * `CREATIVE_TYPE_VIDEO` 3981 // * `CREATIVE_TYPE_AUDIO` 3982 // * `CREATIVE_TYPE_NATIVE_VIDEO` 3983 // * `CREATIVE_TYPE_PUBLISHER_HOSTED` 3984 MediaDuration string `json:"mediaDuration,omitempty"` 3985 3986 // Name: Output only. The resource name of the creative. 3987 Name string `json:"name,omitempty"` 3988 3989 // Notes: User notes for this creative. 3990 // Must be UTF-8 encoded with a length of no more than 20,000 3991 // characters. 3992 Notes string `json:"notes,omitempty"` 3993 3994 // ObaIcon: Specifies the OBA icon for a video creative. 3995 // 3996 // This field is only supported in following 3997 // creative_type: 3998 // 3999 // * `CREATIVE_TYPE_VIDEO` 4000 ObaIcon *ObaIcon `json:"obaIcon,omitempty"` 4001 4002 // ProgressOffset: Amount of time to play the video before counting a 4003 // view. 4004 // 4005 // This field is required when skippable is true. 4006 // 4007 // This field is only supported for the following 4008 // creative_type: 4009 // 4010 // * `CREATIVE_TYPE_VIDEO` 4011 ProgressOffset *AudioVideoOffset `json:"progressOffset,omitempty"` 4012 4013 // RequireHtml5: Optional. Indicates that the creative relies on HTML5 4014 // to render properly. 4015 // 4016 // Optional and only valid for third-party tag creatives. 4017 // Third-party tag creatives are creatives with 4018 // following 4019 // hosting_source: 4020 // 4021 // * `HOSTING_SOURCE_THIRD_PARTY` 4022 // 4023 // combined with following creative_type: 4024 // 4025 // * `CREATIVE_TYPE_STANDARD` 4026 // * `CREATIVE_TYPE_EXPANDABLE` 4027 RequireHtml5 bool `json:"requireHtml5,omitempty"` 4028 4029 // RequireMraid: Optional. Indicates that the creative requires MRAID 4030 // (Mobile Rich Media Ad Interface 4031 // Definitions system). 4032 // 4033 // Set this if the creative relies on mobile gestures for interactivity, 4034 // such 4035 // as swiping or tapping. 4036 // 4037 // Optional and only valid for third-party tag creatives. 4038 // 4039 // Third-party tag creatives are creatives with 4040 // following 4041 // hosting_source: 4042 // 4043 // * `HOSTING_SOURCE_THIRD_PARTY` 4044 // 4045 // combined with following creative_type: 4046 // 4047 // * `CREATIVE_TYPE_STANDARD` 4048 // * `CREATIVE_TYPE_EXPANDABLE` 4049 RequireMraid bool `json:"requireMraid,omitempty"` 4050 4051 // RequirePingForAttribution: Optional. Indicates that the creative will 4052 // wait for a return ping for attribution. 4053 // 4054 // Only valid when using a Campaign Manager tracking ad with a 4055 // third-party ad 4056 // server parameter and the ${DC_DBM_TOKEN} macro. 4057 // 4058 // Optional and only valid for third-party tag creatives or third-party 4059 // VAST 4060 // tag creatives. 4061 // 4062 // Third-party tag creatives are creatives with 4063 // following 4064 // hosting_source: 4065 // 4066 // * `HOSTING_SOURCE_THIRD_PARTY` 4067 // 4068 // combined with following creative_type: 4069 // 4070 // * `CREATIVE_TYPE_STANDARD` 4071 // * `CREATIVE_TYPE_EXPANDABLE` 4072 // 4073 // Third-party VAST tag creatives are creatives with 4074 // following 4075 // hosting_source: 4076 // 4077 // * `HOSTING_SOURCE_THIRD_PARTY` 4078 // 4079 // combined with following creative_type: 4080 // 4081 // * `CREATIVE_TYPE_VIDEO` 4082 RequirePingForAttribution bool `json:"requirePingForAttribution,omitempty"` 4083 4084 // ReviewStatus: Output only. The current status of the creative review 4085 // process. 4086 ReviewStatus *ReviewStatusInfo `json:"reviewStatus,omitempty"` 4087 4088 // SkipOffset: Amount of time to play the video before the skip button 4089 // appears. 4090 // 4091 // This field is required when skippable is true. 4092 // 4093 // This field is only supported for the following 4094 // creative_type: 4095 // 4096 // * `CREATIVE_TYPE_VIDEO` 4097 SkipOffset *AudioVideoOffset `json:"skipOffset,omitempty"` 4098 4099 // Skippable: Whether the user can choose to skip a video 4100 // creative. 4101 // 4102 // This field is only supported for the following 4103 // creative_type: 4104 // 4105 // * `CREATIVE_TYPE_VIDEO` 4106 Skippable bool `json:"skippable,omitempty"` 4107 4108 // ThirdPartyTag: Optional. The original third-party tag used for the 4109 // creative. 4110 // 4111 // Required and only valid for third-party tag creatives. 4112 // 4113 // Third-party tag creatives are creatives with 4114 // following 4115 // hosting_source: 4116 // 4117 // * `HOSTING_SOURCE_THIRD_PARTY` 4118 // 4119 // combined with following creative_type: 4120 // 4121 // * `CREATIVE_TYPE_STANDARD` 4122 // * `CREATIVE_TYPE_EXPANDABLE` 4123 ThirdPartyTag string `json:"thirdPartyTag,omitempty"` 4124 4125 // ThirdPartyUrls: Tracking URLs from third parties to track 4126 // interactions with a video 4127 // creative. 4128 // 4129 // This field is only supported for the following 4130 // creative_type: 4131 // 4132 // * `CREATIVE_TYPE_AUDIO` 4133 // * `CREATIVE_TYPE_VIDEO` 4134 // * `CREATIVE_TYPE_NATIVE_VIDEO` 4135 ThirdPartyUrls []*ThirdPartyUrl `json:"thirdPartyUrls,omitempty"` 4136 4137 // TimerEvents: Timer custom events for a rich media creative. 4138 // Timers track the time during which a user views and interacts with 4139 // a 4140 // specified part of a rich media creative. 4141 // A creative can have multiple timer events, each timed 4142 // independently. 4143 // Leave it empty or unset for creatives containing image assets only. 4144 TimerEvents []*TimerEvent `json:"timerEvents,omitempty"` 4145 4146 // TrackerUrls: Tracking URLs for analytics providers or third-party ad 4147 // technology vendors. 4148 // 4149 // The URLs must start with https (except on inventory that doesn't 4150 // require 4151 // SSL compliance). 4152 // If using macros in your URL, use only macros supported by Display & 4153 // Video 4154 // 360. 4155 // 4156 // Standard URLs only, no IMG or SCRIPT tags. 4157 // 4158 // This field is only supported in following 4159 // creative_type: 4160 // 4161 // * `CREATIVE_TYPE_NATIVE` 4162 // * `CREATIVE_TYPE_NATIVE_SITE_SQUARE` 4163 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL` 4164 // * `CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE` 4165 // * `CREATIVE_TYPE_NATIVE_VIDEO` 4166 TrackerUrls []string `json:"trackerUrls,omitempty"` 4167 4168 // Transcodes: Output only. Audio/Video transcodes. 4169 // 4170 // Display & Video 360 transcodes the main asset into a number of 4171 // alternative 4172 // versions that use different file formats or have different 4173 // properties 4174 // (resolution, audio bit rate, and video bit rate), each designed 4175 // for 4176 // specific video players or bandwidths. 4177 // 4178 // These transcodes give a publisher's system more options to choose 4179 // from for 4180 // each impression on your video and ensures that the appropriate file 4181 // serves 4182 // based on the viewer’s connection and screen size. 4183 // 4184 // This field is only supported in following 4185 // creative_type: 4186 // 4187 // * `CREATIVE_TYPE_VIDEO` 4188 // * `CREATIVE_TYPE_NATIVE_VIDEO` 4189 // * `CREATIVE_TYPE_AUDIO` 4190 Transcodes []*Transcode `json:"transcodes,omitempty"` 4191 4192 // UniversalAdId: Optional. An optional creative identifier provided by 4193 // a registry that is unique 4194 // across all platforms. 4195 // 4196 // Universal Ad ID is part of the VAST 4.0 standard. It can be modified 4197 // after 4198 // the creative is created. 4199 // 4200 // This field is only supported for the following 4201 // creative_type: 4202 // 4203 // * `CREATIVE_TYPE_VIDEO` 4204 UniversalAdId *UniversalAdId `json:"universalAdId,omitempty"` 4205 4206 // UpdateTime: Output only. The timestamp when the creative was last 4207 // updated. Assigned by 4208 // the system. 4209 UpdateTime string `json:"updateTime,omitempty"` 4210 4211 // VastTagUrl: Optional. The URL of the VAST tag for a third-party VAST 4212 // tag creative. 4213 // 4214 // Required and only valid for third-party VAST tag 4215 // creatives. 4216 // 4217 // Third-party VAST tag creatives are creatives with 4218 // following 4219 // hosting_source: 4220 // 4221 // * `HOSTING_SOURCE_THIRD_PARTY` 4222 // 4223 // combined with following creative_type: 4224 // 4225 // * `CREATIVE_TYPE_VIDEO` 4226 VastTagUrl string `json:"vastTagUrl,omitempty"` 4227 4228 // Vpaid: Output only. Indicates the third-party VAST tag creative 4229 // requires VPAID (Digital Video 4230 // Player-Ad Interface). 4231 // 4232 // Output only and only valid for third-party VAST tag 4233 // creatives. 4234 // 4235 // Third-party VAST tag creatives are creatives with 4236 // following 4237 // hosting_source: 4238 // 4239 // * `HOSTING_SOURCE_THIRD_PARTY` 4240 // 4241 // combined with following creative_type: 4242 // 4243 // * `CREATIVE_TYPE_VIDEO` 4244 Vpaid bool `json:"vpaid,omitempty"` 4245 4246 // ServerResponse contains the HTTP response code and headers from the 4247 // server. 4248 googleapi.ServerResponse `json:"-"` 4249 4250 // ForceSendFields is a list of field names (e.g. 4251 // "AdditionalDimensions") to unconditionally include in API requests. 4252 // By default, fields with empty values are omitted from API requests. 4253 // However, any non-pointer, non-interface field appearing in 4254 // ForceSendFields will be sent to the server regardless of whether the 4255 // field is empty or not. This may be used to include empty fields in 4256 // Patch requests. 4257 ForceSendFields []string `json:"-"` 4258 4259 // NullFields is a list of field names (e.g. "AdditionalDimensions") to 4260 // include in API requests with the JSON null value. By default, fields 4261 // with empty values are omitted from API requests. However, any field 4262 // with an empty value appearing in NullFields will be sent to the 4263 // server as null. It is an error if a field in this list has a 4264 // non-empty value. This may be used to include null fields in Patch 4265 // requests. 4266 NullFields []string `json:"-"` 4267} 4268 4269func (s *Creative) MarshalJSON() ([]byte, error) { 4270 type NoMethod Creative 4271 raw := NoMethod(*s) 4272 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4273} 4274 4275// CreativeConfig: Creative requirements configuration for the inventory 4276// source. 4277type CreativeConfig struct { 4278 // CreativeType: The type of creative that can be assigned to the 4279 // inventory source. 4280 // 4281 // Possible values: 4282 // "CREATIVE_TYPE_UNSPECIFIED" - Type value is not specified or is 4283 // unknown in this version. 4284 // "CREATIVE_TYPE_STANDARD" - Standard display creative. 4285 // 4286 // Create and update methods are supported for this creative type if 4287 // the 4288 // hosting_source is one of the following: 4289 // 4290 // * `HOSTING_SOURCE_HOSTED` 4291 // * `HOSTING_SOURCE_THIRD_PARTY` 4292 // "CREATIVE_TYPE_EXPANDABLE" - Expandable creative. 4293 // 4294 // Create and update methods are supported for this creative type if 4295 // the 4296 // hosting_source is `HOSTING_SOURCE_THIRD_PARTY` 4297 // "CREATIVE_TYPE_VIDEO" - Video creative. 4298 // 4299 // Create and update methods are supported for this creative type if 4300 // the 4301 // hosting_source is one of the following: 4302 // 4303 // * `HOSTING_SOURCE_HOSTED` 4304 // * `HOSTING_SOURCE_THIRD_PARTY` 4305 // "CREATIVE_TYPE_NATIVE" - Native creative rendered by publishers 4306 // with assets from advertiser. 4307 // 4308 // Create and update methods are supported for this creative type if 4309 // the 4310 // hosting_source is `HOSTING_SOURCE_HOSTED` 4311 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL" - Templated app install 4312 // mobile creative (banner). 4313 // 4314 // Create and update methods are **not** supported for this creative 4315 // type. 4316 // "CREATIVE_TYPE_NATIVE_SITE_SQUARE" - Square native 4317 // creative. 4318 // 4319 // Create and update methods are supported for this creative type if 4320 // the 4321 // hosting_source is `HOSTING_SOURCE_HOSTED` 4322 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_INTERSTITIAL" - Interstitial 4323 // creative including both display and video. 4324 // 4325 // Create and update methods are **not** supported for this creative 4326 // type. 4327 // "CREATIVE_TYPE_LIGHTBOX" - Responsive and expandable Lightbox 4328 // creative. 4329 // 4330 // Create and update methods are **not** supported for this creative 4331 // type. 4332 // "CREATIVE_TYPE_NATIVE_APP_INSTALL" - Native app install 4333 // creative. 4334 // 4335 // Create and update methods are supported for this creative type if 4336 // the 4337 // hosting_source is `HOSTING_SOURCE_HOSTED` 4338 // "CREATIVE_TYPE_NATIVE_APP_INSTALL_SQUARE" - Square native app 4339 // install creative. 4340 // 4341 // Create and update methods are supported for this creative type if 4342 // the 4343 // hosting_source is `HOSTING_SOURCE_HOSTED` 4344 // "CREATIVE_TYPE_AUDIO" - Audio creative. 4345 // 4346 // Create and update methods are supported for this creative type if 4347 // the 4348 // hosting_source is `HOSTING_SOURCE_HOSTED` 4349 // "CREATIVE_TYPE_PUBLISHER_HOSTED" - Publisher hosted 4350 // creative. 4351 // 4352 // Create and update methods are **not** supported for this creative 4353 // type. 4354 // "CREATIVE_TYPE_NATIVE_VIDEO" - Native video creative. 4355 // 4356 // Create and update methods are supported for this creative type if 4357 // the 4358 // hosting_source is `HOSTING_SOURCE_HOSTED` 4359 // "CREATIVE_TYPE_TEMPLATED_APP_INSTALL_VIDEO" - Templated app install 4360 // mobile video creative. 4361 // 4362 // Create and update methods are **not** supported for this creative 4363 // type. 4364 CreativeType string `json:"creativeType,omitempty"` 4365 4366 // DisplayCreativeConfig: The configuration for display 4367 // creatives. 4368 // Applicable when creative_type is 4369 // `CREATIVE_TYPE_STANDARD`. 4370 DisplayCreativeConfig *InventorySourceDisplayCreativeConfig `json:"displayCreativeConfig,omitempty"` 4371 4372 // VideoCreativeConfig: The configuration for video 4373 // creatives. 4374 // Applicable when creative_type is 4375 // `CREATIVE_TYPE_VIDEO`. 4376 VideoCreativeConfig *InventorySourceVideoCreativeConfig `json:"videoCreativeConfig,omitempty"` 4377 4378 // ForceSendFields is a list of field names (e.g. "CreativeType") to 4379 // unconditionally include in API requests. By default, fields with 4380 // empty values are omitted from API requests. However, any non-pointer, 4381 // non-interface field appearing in ForceSendFields will be sent to the 4382 // server regardless of whether the field is empty or not. This may be 4383 // used to include empty fields in Patch requests. 4384 ForceSendFields []string `json:"-"` 4385 4386 // NullFields is a list of field names (e.g. "CreativeType") to include 4387 // in API requests with the JSON null value. By default, fields with 4388 // empty values are omitted from API requests. However, any field with 4389 // an empty value appearing in NullFields will be sent to the server as 4390 // null. It is an error if a field in this list has a non-empty value. 4391 // This may be used to include null fields in Patch requests. 4392 NullFields []string `json:"-"` 4393} 4394 4395func (s *CreativeConfig) MarshalJSON() ([]byte, error) { 4396 type NoMethod CreativeConfig 4397 raw := NoMethod(*s) 4398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4399} 4400 4401// CustomList: Describes a custom list entity, such as a custom affinity 4402// or custom intent 4403// audience list. 4404type CustomList struct { 4405 // CustomListId: Output only. The unique ID of the custom list. Assigned 4406 // by the system. 4407 CustomListId int64 `json:"customListId,omitempty,string"` 4408 4409 // DisplayName: Output only. The display name of the custom list. 4410 // . 4411 DisplayName string `json:"displayName,omitempty"` 4412 4413 // Name: Output only. The resource name of the custom list. 4414 Name string `json:"name,omitempty"` 4415 4416 // ServerResponse contains the HTTP response code and headers from the 4417 // server. 4418 googleapi.ServerResponse `json:"-"` 4419 4420 // ForceSendFields is a list of field names (e.g. "CustomListId") to 4421 // unconditionally include in API requests. By default, fields with 4422 // empty values are omitted from API requests. However, any non-pointer, 4423 // non-interface field appearing in ForceSendFields will be sent to the 4424 // server regardless of whether the field is empty or not. This may be 4425 // used to include empty fields in Patch requests. 4426 ForceSendFields []string `json:"-"` 4427 4428 // NullFields is a list of field names (e.g. "CustomListId") to include 4429 // in API requests with the JSON null value. By default, fields with 4430 // empty values are omitted from API requests. However, any field with 4431 // an empty value appearing in NullFields will be sent to the server as 4432 // null. It is an error if a field in this list has a non-empty value. 4433 // This may be used to include null fields in Patch requests. 4434 NullFields []string `json:"-"` 4435} 4436 4437func (s *CustomList) MarshalJSON() ([]byte, error) { 4438 type NoMethod CustomList 4439 raw := NoMethod(*s) 4440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4441} 4442 4443// CustomListGroup: Details of custom list group. 4444// All custom list targeting settings are logically ‘OR’ of each 4445// other. 4446type CustomListGroup struct { 4447 // Settings: Required. All custom list targeting settings in custom list 4448 // group. 4449 // Repeated settings with same id will be ignored. 4450 Settings []*CustomListTargetingSetting `json:"settings,omitempty"` 4451 4452 // ForceSendFields is a list of field names (e.g. "Settings") to 4453 // unconditionally include in API requests. By default, fields with 4454 // empty values are omitted from API requests. However, any non-pointer, 4455 // non-interface field appearing in ForceSendFields will be sent to the 4456 // server regardless of whether the field is empty or not. This may be 4457 // used to include empty fields in Patch requests. 4458 ForceSendFields []string `json:"-"` 4459 4460 // NullFields is a list of field names (e.g. "Settings") to include in 4461 // API requests with the JSON null value. By default, fields with empty 4462 // values are omitted from API requests. However, any field with an 4463 // empty value appearing in NullFields will be sent to the server as 4464 // null. It is an error if a field in this list has a non-empty value. 4465 // This may be used to include null fields in Patch requests. 4466 NullFields []string `json:"-"` 4467} 4468 4469func (s *CustomListGroup) MarshalJSON() ([]byte, error) { 4470 type NoMethod CustomListGroup 4471 raw := NoMethod(*s) 4472 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4473} 4474 4475// CustomListTargetingSetting: Details of custom list targeting setting. 4476type CustomListTargetingSetting struct { 4477 // CustomListId: Required. Custom id of custom list targeting 4478 // setting. 4479 // This id is custom_list_id. 4480 CustomListId int64 `json:"customListId,omitempty,string"` 4481 4482 // ForceSendFields is a list of field names (e.g. "CustomListId") to 4483 // unconditionally include in API requests. By default, fields with 4484 // empty values are omitted from API requests. However, any non-pointer, 4485 // non-interface field appearing in ForceSendFields will be sent to the 4486 // server regardless of whether the field is empty or not. This may be 4487 // used to include empty fields in Patch requests. 4488 ForceSendFields []string `json:"-"` 4489 4490 // NullFields is a list of field names (e.g. "CustomListId") to include 4491 // in API requests with the JSON null value. By default, fields with 4492 // empty values are omitted from API requests. However, any field with 4493 // an empty value appearing in NullFields will be sent to the server as 4494 // null. It is an error if a field in this list has a non-empty value. 4495 // This may be used to include null fields in Patch requests. 4496 NullFields []string `json:"-"` 4497} 4498 4499func (s *CustomListTargetingSetting) MarshalJSON() ([]byte, error) { 4500 type NoMethod CustomListTargetingSetting 4501 raw := NoMethod(*s) 4502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4503} 4504 4505// Date: Represents a whole or partial calendar date, e.g. a birthday. 4506// The time of day 4507// and time zone are either specified elsewhere or are not significant. 4508// The date 4509// is relative to the Proleptic Gregorian Calendar. This can 4510// represent: 4511// 4512// * A full date, with non-zero year, month and day values 4513// * A month and day value, with a zero year, e.g. an anniversary 4514// * A year on its own, with zero month and day values 4515// * A year and month value, with a zero day, e.g. a credit card 4516// expiration date 4517// 4518// Related types are google.type.TimeOfDay and 4519// `google.protobuf.Timestamp`. 4520type Date struct { 4521 // Day: Day of month. Must be from 1 to 31 and valid for the year and 4522 // month, or 0 4523 // if specifying a year by itself or a year and month where the day is 4524 // not 4525 // significant. 4526 Day int64 `json:"day,omitempty"` 4527 4528 // Month: Month of year. Must be from 1 to 12, or 0 if specifying a year 4529 // without a 4530 // month and day. 4531 Month int64 `json:"month,omitempty"` 4532 4533 // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date 4534 // without 4535 // a year. 4536 Year int64 `json:"year,omitempty"` 4537 4538 // ForceSendFields is a list of field names (e.g. "Day") to 4539 // unconditionally include in API requests. By default, fields with 4540 // empty values are omitted from API requests. However, any non-pointer, 4541 // non-interface field appearing in ForceSendFields will be sent to the 4542 // server regardless of whether the field is empty or not. This may be 4543 // used to include empty fields in Patch requests. 4544 ForceSendFields []string `json:"-"` 4545 4546 // NullFields is a list of field names (e.g. "Day") to include in API 4547 // requests with the JSON null value. By default, fields with empty 4548 // values are omitted from API requests. However, any field with an 4549 // empty value appearing in NullFields will be sent to the server as 4550 // null. It is an error if a field in this list has a non-empty value. 4551 // This may be used to include null fields in Patch requests. 4552 NullFields []string `json:"-"` 4553} 4554 4555func (s *Date) MarshalJSON() ([]byte, error) { 4556 type NoMethod Date 4557 raw := NoMethod(*s) 4558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4559} 4560 4561// DateRange: A date range. 4562type DateRange struct { 4563 // EndDate: The upper bound of the date range, inclusive. Must specify a 4564 // positive value 4565 // for `year`, `month`, and `day`. 4566 EndDate *Date `json:"endDate,omitempty"` 4567 4568 // StartDate: The lower bound of the date range, inclusive. Must specify 4569 // a positive value 4570 // for `year`, `month`, and `day`. 4571 StartDate *Date `json:"startDate,omitempty"` 4572 4573 // ForceSendFields is a list of field names (e.g. "EndDate") to 4574 // unconditionally include in API requests. By default, fields with 4575 // empty values are omitted from API requests. However, any non-pointer, 4576 // non-interface field appearing in ForceSendFields will be sent to the 4577 // server regardless of whether the field is empty or not. This may be 4578 // used to include empty fields in Patch requests. 4579 ForceSendFields []string `json:"-"` 4580 4581 // NullFields is a list of field names (e.g. "EndDate") to include in 4582 // API requests with the JSON null value. By default, fields with empty 4583 // values are omitted from API requests. However, any field with an 4584 // empty value appearing in NullFields will be sent to the server as 4585 // null. It is an error if a field in this list has a non-empty value. 4586 // This may be used to include null fields in Patch requests. 4587 NullFields []string `json:"-"` 4588} 4589 4590func (s *DateRange) MarshalJSON() ([]byte, error) { 4591 type NoMethod DateRange 4592 raw := NoMethod(*s) 4593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4594} 4595 4596// DayAndTimeAssignedTargetingOptionDetails: Representation of a segment 4597// of time defined on a specific day of the week and 4598// with a start and end time. 4599// The time represented by `start_hour` must be before the time 4600// represented by 4601// `end_hour`. 4602type DayAndTimeAssignedTargetingOptionDetails struct { 4603 // DayOfWeek: Required. The day of the week for this day and time 4604 // targeting setting. 4605 // 4606 // Possible values: 4607 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 4608 // "MONDAY" - Monday 4609 // "TUESDAY" - Tuesday 4610 // "WEDNESDAY" - Wednesday 4611 // "THURSDAY" - Thursday 4612 // "FRIDAY" - Friday 4613 // "SATURDAY" - Saturday 4614 // "SUNDAY" - Sunday 4615 DayOfWeek string `json:"dayOfWeek,omitempty"` 4616 4617 // EndHour: Required. The end hour for day and time targeting. Must be 4618 // between 1 (1 hour after 4619 // start of day) and 24 (end of day). 4620 EndHour int64 `json:"endHour,omitempty"` 4621 4622 // StartHour: Required. The start hour for day and time targeting. Must 4623 // be between 0 (start of day) 4624 // and 23 (1 hour before end of day). 4625 StartHour int64 `json:"startHour,omitempty"` 4626 4627 // TimeZoneResolution: Required. The mechanism used to determine which 4628 // timezone to use for this day and time 4629 // targeting setting. 4630 // 4631 // Possible values: 4632 // "TIME_ZONE_RESOLUTION_UNSPECIFIED" - Time zone resolution is either 4633 // unspecific or unknown. 4634 // "TIME_ZONE_RESOLUTION_END_USER" - Times are resolved in the time 4635 // zone of the user that saw the ad. 4636 // "TIME_ZONE_RESOLUTION_ADVERTISER" - Times are resolved in the time 4637 // zone of the advertiser that served the ad. 4638 TimeZoneResolution string `json:"timeZoneResolution,omitempty"` 4639 4640 // ForceSendFields is a list of field names (e.g. "DayOfWeek") to 4641 // unconditionally include in API requests. By default, fields with 4642 // empty values are omitted from API requests. However, any non-pointer, 4643 // non-interface field appearing in ForceSendFields will be sent to the 4644 // server regardless of whether the field is empty or not. This may be 4645 // used to include empty fields in Patch requests. 4646 ForceSendFields []string `json:"-"` 4647 4648 // NullFields is a list of field names (e.g. "DayOfWeek") to include in 4649 // API requests with the JSON null value. By default, fields with empty 4650 // values are omitted from API requests. However, any field with an 4651 // empty value appearing in NullFields will be sent to the server as 4652 // null. It is an error if a field in this list has a non-empty value. 4653 // This may be used to include null fields in Patch requests. 4654 NullFields []string `json:"-"` 4655} 4656 4657func (s *DayAndTimeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4658 type NoMethod DayAndTimeAssignedTargetingOptionDetails 4659 raw := NoMethod(*s) 4660 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4661} 4662 4663// DeleteAssignedTargetingOptionsRequest: A request listing which 4664// assigned targeting options of a given targeting type 4665// should be deleted. 4666type DeleteAssignedTargetingOptionsRequest struct { 4667 // AssignedTargetingOptionIds: Required. The assigned targeting option 4668 // IDs to delete. 4669 AssignedTargetingOptionIds []string `json:"assignedTargetingOptionIds,omitempty"` 4670 4671 // TargetingType: Required. Identifies the type of this assigned 4672 // targeting option. 4673 // 4674 // Possible values: 4675 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 4676 // specified or is unknown in this version. 4677 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 4678 // related websites or apps). 4679 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 4680 // example, education or puzzle games). 4681 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 4682 // Birds). 4683 // "TARGETING_TYPE_URL" - Target a specific url (for example, 4684 // quora.com). 4685 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 4686 // period on a specific day. 4687 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 4688 // (for example, 18-24). 4689 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 4690 // specified regions on a regional location list. 4691 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 4692 // specified points of interest on a proximity location 4693 // list. 4694 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 4695 // example, female or male). 4696 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 4697 // size for video ads. 4698 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 4699 // content for video ads. 4700 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 4701 // parental status (for example, parent or not a 4702 // parent). 4703 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 4704 // ads in a specific content instream position (for 4705 // example, pre-roll, mid-roll, or post-roll). 4706 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 4707 // specific content outstream position. 4708 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 4709 // (for example, tablet or connected TV). 4710 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 4711 // groups of audiences. 4712 // Singleton field, at most one can exist on a single Lineitem at a 4713 // time. 4714 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 4715 // example, Chrome). 4716 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 4717 // household income range (for example, top 10%). 4718 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 4719 // screen position. 4720 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 4721 // third party verification (for example, IAS or 4722 // DoubleVerify). 4723 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 4724 // by specific digital content label ratings (for example, 4725 // DL-MA: suitable only for mature audiences). 4726 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 4727 // content by sensitive categories (for example, adult). 4728 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 4729 // (for example, web or app). 4730 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 4731 // carrier or internet service provider 4732 // (ISP) (for example, Comcast or Orange). 4733 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 4734 // operating system (for example, macOS). 4735 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 4736 // device make or model (for example, Roku or 4737 // Samsung). 4738 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 4739 // example, dog or retriever). 4740 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 4741 // negative keyword list. 4742 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 4743 // (for example, 80% viewable). 4744 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 4745 // category (for example, arts & 4746 // entertainment). 4747 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 4748 // specific deals and auction packages. 4749 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 4750 // example, English or Japanese). 4751 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 4752 // authorized sellers. 4753 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 4754 // location (for example, a city or state). 4755 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 4756 // a group of deals and auction packages. 4757 // "TARGETING_TYPE_PROXIMITY_LOCATION" - Target ads to business 4758 // chains, individual points of interests (POIs), 4759 // street addresses, and latitude/longitude coordinates. 4760 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 4761 // exchanges. 4762 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 4763 // sub-exchanges. 4764 TargetingType string `json:"targetingType,omitempty"` 4765 4766 // ForceSendFields is a list of field names (e.g. 4767 // "AssignedTargetingOptionIds") to unconditionally include in API 4768 // requests. By default, fields with empty values are omitted from API 4769 // requests. However, any non-pointer, non-interface field appearing in 4770 // ForceSendFields will be sent to the server regardless of whether the 4771 // field is empty or not. This may be used to include empty fields in 4772 // Patch requests. 4773 ForceSendFields []string `json:"-"` 4774 4775 // NullFields is a list of field names (e.g. 4776 // "AssignedTargetingOptionIds") to include in API requests with the 4777 // JSON null value. By default, fields with empty values are omitted 4778 // from API requests. However, any field with an empty value appearing 4779 // in NullFields will be sent to the server as null. It is an error if a 4780 // field in this list has a non-empty value. This may be used to include 4781 // null fields in Patch requests. 4782 NullFields []string `json:"-"` 4783} 4784 4785func (s *DeleteAssignedTargetingOptionsRequest) MarshalJSON() ([]byte, error) { 4786 type NoMethod DeleteAssignedTargetingOptionsRequest 4787 raw := NoMethod(*s) 4788 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4789} 4790 4791// DeviceMakeModelAssignedTargetingOptionDetails: Assigned device make 4792// and model targeting option details. This will be 4793// populated in the 4794// device_make_model_details 4795// field when 4796// targeting_type is 4797// `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 4798type DeviceMakeModelAssignedTargetingOptionDetails struct { 4799 // DisplayName: Output only. The display name of the device make and 4800 // model. 4801 DisplayName string `json:"displayName,omitempty"` 4802 4803 // Negative: Indicates if this option is being negatively targeted. 4804 Negative bool `json:"negative,omitempty"` 4805 4806 // TargetingOptionId: Required. The targeting_option_id field 4807 // when 4808 // targeting_type is 4809 // `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 4810 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4811 4812 // ForceSendFields is a list of field names (e.g. "DisplayName") to 4813 // unconditionally include in API requests. By default, fields with 4814 // empty values are omitted from API requests. However, any non-pointer, 4815 // non-interface field appearing in ForceSendFields will be sent to the 4816 // server regardless of whether the field is empty or not. This may be 4817 // used to include empty fields in Patch requests. 4818 ForceSendFields []string `json:"-"` 4819 4820 // NullFields is a list of field names (e.g. "DisplayName") to include 4821 // in API requests with the JSON null value. By default, fields with 4822 // empty values are omitted from API requests. However, any field with 4823 // an empty value appearing in NullFields will be sent to the server as 4824 // null. It is an error if a field in this list has a non-empty value. 4825 // This may be used to include null fields in Patch requests. 4826 NullFields []string `json:"-"` 4827} 4828 4829func (s *DeviceMakeModelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4830 type NoMethod DeviceMakeModelAssignedTargetingOptionDetails 4831 raw := NoMethod(*s) 4832 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4833} 4834 4835// DeviceMakeModelTargetingOptionDetails: Represents a targetable device 4836// make and model. This will be populated in 4837// the 4838// device_make_model_details 4839// field of a TargetingOption when 4840// targeting_type is 4841// `TARGETING_TYPE_DEVICE_MAKE_MODEL`. 4842type DeviceMakeModelTargetingOptionDetails struct { 4843 // DisplayName: Output only. The display name of the device make and 4844 // model. 4845 DisplayName string `json:"displayName,omitempty"` 4846 4847 // ForceSendFields is a list of field names (e.g. "DisplayName") to 4848 // unconditionally include in API requests. By default, fields with 4849 // empty values are omitted from API requests. However, any non-pointer, 4850 // non-interface field appearing in ForceSendFields will be sent to the 4851 // server regardless of whether the field is empty or not. This may be 4852 // used to include empty fields in Patch requests. 4853 ForceSendFields []string `json:"-"` 4854 4855 // NullFields is a list of field names (e.g. "DisplayName") to include 4856 // in API requests with the JSON null value. By default, fields with 4857 // empty values are omitted from API requests. However, any field with 4858 // an empty value appearing in NullFields will be sent to the server as 4859 // null. It is an error if a field in this list has a non-empty value. 4860 // This may be used to include null fields in Patch requests. 4861 NullFields []string `json:"-"` 4862} 4863 4864func (s *DeviceMakeModelTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4865 type NoMethod DeviceMakeModelTargetingOptionDetails 4866 raw := NoMethod(*s) 4867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4868} 4869 4870// DeviceTypeAssignedTargetingOptionDetails: Targeting details for 4871// device type. This will be 4872// populated in the details field of an AssignedTargetingOption 4873// when 4874// targeting_type is 4875// `TARGETING_TYPE_DEVICE_TYPE`. 4876type DeviceTypeAssignedTargetingOptionDetails struct { 4877 // DeviceType: Output only. The display name of the device type. 4878 // 4879 // Possible values: 4880 // "DEVICE_TYPE_UNSPECIFIED" - Default value when device type is not 4881 // specified in this version. This 4882 // enum is a placeholder for default value and does not represent a 4883 // real 4884 // device type option. 4885 // "DEVICE_TYPE_COMPUTER" - The device type is computer. 4886 // "DEVICE_TYPE_CONNECTED_TV" - The device type is connected TV. 4887 // "DEVICE_TYPE_SMART_PHONE" - The device type is smart phone.. 4888 // "DEVICE_TYPE_TABLET" - The device type is tablet. 4889 DeviceType string `json:"deviceType,omitempty"` 4890 4891 // TargetingOptionId: Required. ID of the device type. 4892 TargetingOptionId string `json:"targetingOptionId,omitempty"` 4893 4894 // ForceSendFields is a list of field names (e.g. "DeviceType") to 4895 // unconditionally include in API requests. By default, fields with 4896 // empty values are omitted from API requests. However, any non-pointer, 4897 // non-interface field appearing in ForceSendFields will be sent to the 4898 // server regardless of whether the field is empty or not. This may be 4899 // used to include empty fields in Patch requests. 4900 ForceSendFields []string `json:"-"` 4901 4902 // NullFields is a list of field names (e.g. "DeviceType") to include in 4903 // API requests with the JSON null value. By default, fields with empty 4904 // values are omitted from API requests. However, any field with an 4905 // empty value appearing in NullFields will be sent to the server as 4906 // null. It is an error if a field in this list has a non-empty value. 4907 // This may be used to include null fields in Patch requests. 4908 NullFields []string `json:"-"` 4909} 4910 4911func (s *DeviceTypeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4912 type NoMethod DeviceTypeAssignedTargetingOptionDetails 4913 raw := NoMethod(*s) 4914 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4915} 4916 4917// DeviceTypeTargetingOptionDetails: Represents a targetable device 4918// type. This will be populated in the 4919// device_type_details field of a 4920// TargetingOption when targeting_type is 4921// `TARGETING_TYPE_DEVICE_TYPE`. 4922type DeviceTypeTargetingOptionDetails struct { 4923 // DeviceType: Output only. The device type that is used to be targeted. 4924 // 4925 // Possible values: 4926 // "DEVICE_TYPE_UNSPECIFIED" - Default value when device type is not 4927 // specified in this version. This 4928 // enum is a placeholder for default value and does not represent a 4929 // real 4930 // device type option. 4931 // "DEVICE_TYPE_COMPUTER" - The device type is computer. 4932 // "DEVICE_TYPE_CONNECTED_TV" - The device type is connected TV. 4933 // "DEVICE_TYPE_SMART_PHONE" - The device type is smart phone.. 4934 // "DEVICE_TYPE_TABLET" - The device type is tablet. 4935 DeviceType string `json:"deviceType,omitempty"` 4936 4937 // ForceSendFields is a list of field names (e.g. "DeviceType") to 4938 // unconditionally include in API requests. By default, fields with 4939 // empty values are omitted from API requests. However, any non-pointer, 4940 // non-interface field appearing in ForceSendFields will be sent to the 4941 // server regardless of whether the field is empty or not. This may be 4942 // used to include empty fields in Patch requests. 4943 ForceSendFields []string `json:"-"` 4944 4945 // NullFields is a list of field names (e.g. "DeviceType") to include in 4946 // API requests with the JSON null value. By default, fields with empty 4947 // values are omitted from API requests. However, any field with an 4948 // empty value appearing in NullFields will be sent to the server as 4949 // null. It is an error if a field in this list has a non-empty value. 4950 // This may be used to include null fields in Patch requests. 4951 NullFields []string `json:"-"` 4952} 4953 4954func (s *DeviceTypeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 4955 type NoMethod DeviceTypeTargetingOptionDetails 4956 raw := NoMethod(*s) 4957 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4958} 4959 4960// DigitalContentLabelAssignedTargetingOptionDetails: Targeting details 4961// for digital content label. This will be 4962// populated in the details field of an AssignedTargetingOption 4963// when 4964// targeting_type is 4965// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION`. 4966type DigitalContentLabelAssignedTargetingOptionDetails struct { 4967 // ContentRatingTier: Output only. The display name of the digital 4968 // content label rating tier. 4969 // 4970 // Possible values: 4971 // "CONTENT_RATING_TIER_UNSPECIFIED" - Content label is not specified 4972 // in this version. This enum is a place 4973 // holder for a default value and does not represent a real content 4974 // rating. 4975 // "CONTENT_RATING_TIER_UNRATED" - Content that has not been labeled. 4976 // "CONTENT_RATING_TIER_GENERAL" - Content suitable for general 4977 // audiences. 4978 // "CONTENT_RATING_TIER_PARENTAL_GUIDANCE" - Content suitable for most 4979 // audiences with parental guidance. 4980 // "CONTENT_RATING_TIER_TEENS" - Content suitable for teen and older 4981 // audiences. 4982 // "CONTENT_RATING_TIER_MATURE" - Content suitable only for mature 4983 // audiences. 4984 ContentRatingTier string `json:"contentRatingTier,omitempty"` 4985 4986 // ExcludedTargetingOptionId: Required. ID of the digital content label 4987 // to be EXCLUDED. 4988 ExcludedTargetingOptionId string `json:"excludedTargetingOptionId,omitempty"` 4989 4990 // ForceSendFields is a list of field names (e.g. "ContentRatingTier") 4991 // to unconditionally include in API requests. By default, fields with 4992 // empty values are omitted from API requests. However, any non-pointer, 4993 // non-interface field appearing in ForceSendFields will be sent to the 4994 // server regardless of whether the field is empty or not. This may be 4995 // used to include empty fields in Patch requests. 4996 ForceSendFields []string `json:"-"` 4997 4998 // NullFields is a list of field names (e.g. "ContentRatingTier") to 4999 // include in API requests with the JSON null value. By default, fields 5000 // with empty values are omitted from API requests. However, any field 5001 // with an empty value appearing in NullFields will be sent to the 5002 // server as null. It is an error if a field in this list has a 5003 // non-empty value. This may be used to include null fields in Patch 5004 // requests. 5005 NullFields []string `json:"-"` 5006} 5007 5008func (s *DigitalContentLabelAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 5009 type NoMethod DigitalContentLabelAssignedTargetingOptionDetails 5010 raw := NoMethod(*s) 5011 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5012} 5013 5014// DigitalContentLabelTargetingOptionDetails: Represents a targetable 5015// digital content label rating tier. This will be 5016// populated in the 5017// digital_content_label_details 5018// field of the TargetingOption when 5019// targeting_type is 5020// `TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION`. 5021type DigitalContentLabelTargetingOptionDetails struct { 5022 // ContentRatingTier: Output only. An enum for the content label brand 5023 // safety tiers. 5024 // 5025 // Possible values: 5026 // "CONTENT_RATING_TIER_UNSPECIFIED" - Content label is not specified 5027 // in this version. This enum is a place 5028 // holder for a default value and does not represent a real content 5029 // rating. 5030 // "CONTENT_RATING_TIER_UNRATED" - Content that has not been labeled. 5031 // "CONTENT_RATING_TIER_GENERAL" - Content suitable for general 5032 // audiences. 5033 // "CONTENT_RATING_TIER_PARENTAL_GUIDANCE" - Content suitable for most 5034 // audiences with parental guidance. 5035 // "CONTENT_RATING_TIER_TEENS" - Content suitable for teen and older 5036 // audiences. 5037 // "CONTENT_RATING_TIER_MATURE" - Content suitable only for mature 5038 // audiences. 5039 ContentRatingTier string `json:"contentRatingTier,omitempty"` 5040 5041 // ForceSendFields is a list of field names (e.g. "ContentRatingTier") 5042 // to unconditionally include in API requests. By default, fields with 5043 // empty values are omitted from API requests. However, any non-pointer, 5044 // non-interface field appearing in ForceSendFields will be sent to the 5045 // server regardless of whether the field is empty or not. This may be 5046 // used to include empty fields in Patch requests. 5047 ForceSendFields []string `json:"-"` 5048 5049 // NullFields is a list of field names (e.g. "ContentRatingTier") to 5050 // include in API requests with the JSON null value. By default, fields 5051 // with empty values are omitted from API requests. However, any field 5052 // with an empty value appearing in NullFields will be sent to the 5053 // server as null. It is an error if a field in this list has a 5054 // non-empty value. This may be used to include null fields in Patch 5055 // requests. 5056 NullFields []string `json:"-"` 5057} 5058 5059func (s *DigitalContentLabelTargetingOptionDetails) MarshalJSON() ([]byte, error) { 5060 type NoMethod DigitalContentLabelTargetingOptionDetails 5061 raw := NoMethod(*s) 5062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5063} 5064 5065// Dimensions: Dimensions. 5066type Dimensions struct { 5067 // HeightPixels: The height in pixels. 5068 HeightPixels int64 `json:"heightPixels,omitempty"` 5069 5070 // WidthPixels: The width in pixels. 5071 WidthPixels int64 `json:"widthPixels,omitempty"` 5072 5073 // ForceSendFields is a list of field names (e.g. "HeightPixels") to 5074 // unconditionally include in API requests. By default, fields with 5075 // empty values are omitted from API requests. However, any non-pointer, 5076 // non-interface field appearing in ForceSendFields will be sent to the 5077 // server regardless of whether the field is empty or not. This may be 5078 // used to include empty fields in Patch requests. 5079 ForceSendFields []string `json:"-"` 5080 5081 // NullFields is a list of field names (e.g. "HeightPixels") to include 5082 // in API requests with the JSON null value. By default, fields with 5083 // empty values are omitted from API requests. However, any field with 5084 // an empty value appearing in NullFields will be sent to the server as 5085 // null. It is an error if a field in this list has a non-empty value. 5086 // This may be used to include null fields in Patch requests. 5087 NullFields []string `json:"-"` 5088} 5089 5090func (s *Dimensions) MarshalJSON() ([]byte, error) { 5091 type NoMethod Dimensions 5092 raw := NoMethod(*s) 5093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5094} 5095 5096// DoubleVerify: Details of DoubleVerify settings. 5097type DoubleVerify struct { 5098 // AppStarRating: Avoid bidding on apps with the star ratings. 5099 AppStarRating *DoubleVerifyAppStarRating `json:"appStarRating,omitempty"` 5100 5101 // AvoidedAgeRatings: Avoid bidding on apps with the age rating. 5102 // 5103 // Possible values: 5104 // "AGE_RATING_UNSPECIFIED" - This enum is only a placeholder and it 5105 // doesn't specify any age rating 5106 // options. 5107 // "APP_AGE_RATE_UNKNOWN" - Apps with unknown age rating. 5108 // "APP_AGE_RATE_4_PLUS" - Apps rated for Everyone (4+). 5109 // "APP_AGE_RATE_9_PLUS" - Apps rated for Everyone (9+). 5110 // "APP_AGE_RATE_12_PLUS" - Apps rated for Teens (12+). 5111 // "APP_AGE_RATE_17_PLUS" - Apps rated for Mature (17+). 5112 // "APP_AGE_RATE_18_PLUS" - Apps rated for Adults Only (18+). 5113 AvoidedAgeRatings []string `json:"avoidedAgeRatings,omitempty"` 5114 5115 // BrandSafetyCategories: DV Brand Safety Controls. 5116 BrandSafetyCategories *DoubleVerifyBrandSafetyCategories `json:"brandSafetyCategories,omitempty"` 5117 5118 // DisplayViewability: Display viewability settings (applicable to 5119 // display line items only). 5120 DisplayViewability *DoubleVerifyDisplayViewability `json:"displayViewability,omitempty"` 5121 5122 // FraudInvalidTraffic: Avoid Sites and Apps with historical Fraud & IVT 5123 // Rates. 5124 FraudInvalidTraffic *DoubleVerifyFraudInvalidTraffic `json:"fraudInvalidTraffic,omitempty"` 5125 5126 // VideoViewability: Video viewability settings (applicable to video 5127 // line items only). 5128 VideoViewability *DoubleVerifyVideoViewability `json:"videoViewability,omitempty"` 5129 5130 // ForceSendFields is a list of field names (e.g. "AppStarRating") to 5131 // unconditionally include in API requests. By default, fields with 5132 // empty values are omitted from API requests. However, any non-pointer, 5133 // non-interface field appearing in ForceSendFields will be sent to the 5134 // server regardless of whether the field is empty or not. This may be 5135 // used to include empty fields in Patch requests. 5136 ForceSendFields []string `json:"-"` 5137 5138 // NullFields is a list of field names (e.g. "AppStarRating") to include 5139 // in API requests with the JSON null value. By default, fields with 5140 // empty values are omitted from API requests. However, any field with 5141 // an empty value appearing in NullFields will be sent to the server as 5142 // null. It is an error if a field in this list has a non-empty value. 5143 // This may be used to include null fields in Patch requests. 5144 NullFields []string `json:"-"` 5145} 5146 5147func (s *DoubleVerify) MarshalJSON() ([]byte, error) { 5148 type NoMethod DoubleVerify 5149 raw := NoMethod(*s) 5150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5151} 5152 5153// DoubleVerifyAppStarRating: Details of DoubleVerify star ratings 5154// settings. 5155type DoubleVerifyAppStarRating struct { 5156 // AvoidInsufficientStarRating: Avoid bidding on apps with insufficient 5157 // star ratings. 5158 AvoidInsufficientStarRating bool `json:"avoidInsufficientStarRating,omitempty"` 5159 5160 // AvoidedStarRating: Avoid bidding on apps with the star ratings. 5161 // 5162 // Possible values: 5163 // "APP_STAR_RATE_UNSPECIFIED" - This enum is only a placeholder and 5164 // it doesn't specify any app star 5165 // rating options. 5166 // "APP_STAR_RATE_1_POINT_5_LESS" - Official Apps with rating < 1.5 5167 // Stars. 5168 // "APP_STAR_RATE_2_LESS" - Official Apps with rating < 2 Stars. 5169 // "APP_STAR_RATE_2_POINT_5_LESS" - Official Apps with rating < 2.5 5170 // Stars. 5171 // "APP_STAR_RATE_3_LESS" - Official Apps with rating < 3 Stars. 5172 // "APP_STAR_RATE_3_POINT_5_LESS" - Official Apps with rating < 3.5 5173 // Stars. 5174 // "APP_STAR_RATE_4_LESS" - Official Apps with rating < 4 Stars. 5175 // "APP_STAR_RATE_4_POINT_5_LESS" - Official Apps with rating < 4.5 5176 // Stars. 5177 AvoidedStarRating string `json:"avoidedStarRating,omitempty"` 5178 5179 // ForceSendFields is a list of field names (e.g. 5180 // "AvoidInsufficientStarRating") to unconditionally include in API 5181 // requests. By default, fields with empty values are omitted from API 5182 // requests. However, any non-pointer, non-interface field appearing in 5183 // ForceSendFields will be sent to the server regardless of whether the 5184 // field is empty or not. This may be used to include empty fields in 5185 // Patch requests. 5186 ForceSendFields []string `json:"-"` 5187 5188 // NullFields is a list of field names (e.g. 5189 // "AvoidInsufficientStarRating") to include in API requests with the 5190 // JSON null value. By default, fields with empty values are omitted 5191 // from API requests. However, any field with an empty value appearing 5192 // in NullFields will be sent to the server as null. It is an error if a 5193 // field in this list has a non-empty value. This may be used to include 5194 // null fields in Patch requests. 5195 NullFields []string `json:"-"` 5196} 5197 5198func (s *DoubleVerifyAppStarRating) MarshalJSON() ([]byte, error) { 5199 type NoMethod DoubleVerifyAppStarRating 5200 raw := NoMethod(*s) 5201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5202} 5203 5204// DoubleVerifyBrandSafetyCategories: Settings for brand safety 5205// controls. 5206type DoubleVerifyBrandSafetyCategories struct { 5207 // AvoidUnknownBrandSafetyCategory: Unknown or unrateable. 5208 AvoidUnknownBrandSafetyCategory bool `json:"avoidUnknownBrandSafetyCategory,omitempty"` 5209 5210 // AvoidedHighSeverityCategories: Brand safety high severity avoidance 5211 // categories. 5212 // 5213 // Possible values: 5214 // "HIGHER_SEVERITY_UNSPECIFIED" - This enum is only a placeholder and 5215 // it doesn't specify any high 5216 // severity categories. 5217 // "ADULT_CONTENT_PORNOGRAPHY" - Adult Content: Pornography, Mature 5218 // Topics & Nudity. 5219 // "COPYRIGHT_INFRINGEMENT" - Copyright Infringement. 5220 // "SUBSTANCE_ABUSE" - Drugs/Alcohol/Controlled Substances: Substance 5221 // Abuse. 5222 // "GRAPHIC_VIOLENCE_WEAPONS" - Extreme Graphic/Explicit 5223 // Violence/Weapons. 5224 // "HATE_PROFANITY" - Hate/Profanity. 5225 // "CRIMINAL_SKILLS" - Illegal Activities: Criminal Skills. 5226 // "NUISANCE_INCENTIVIZED_MALWARE_CLUTTER" - 5227 // Incentivized/Malware/Clutter. 5228 AvoidedHighSeverityCategories []string `json:"avoidedHighSeverityCategories,omitempty"` 5229 5230 // AvoidedMediumSeverityCategories: Brand safety medium severity 5231 // avoidance categories. 5232 // 5233 // Possible values: 5234 // "MEDIUM_SEVERITY_UNSPECIFIED" - This enum is only a placeholder and 5235 // it doesn't specify any medium 5236 // severity categories. 5237 // "AD_SERVERS" - Ad Servers. 5238 // "ADULT_CONTENT_SWIMSUIT" - Adult Content: Swimsuit. 5239 // "ALTERNATIVE_LIFESTYLES" - Controversial Subjects: Alternative 5240 // Lifestyles. 5241 // "CELEBRITY_GOSSIP" - Controversial Subjects: Celebrity Gossip. 5242 // "GAMBLING" - Controversial Subjects: Gambling. 5243 // "OCCULT" - Controversial Subjects: Occult. 5244 // "SEX_EDUCATION" - Controversial Subjects: Sex Education. 5245 // "DISASTER_AVIATION" - Disaster: Aviation. 5246 // "DISASTER_MAN_MADE" - Disaster: Man-made. 5247 // "DISASTER_NATURAL" - Disaster: Natural. 5248 // "DISASTER_TERRORIST_EVENTS" - Disaster: Terrorist Events. 5249 // "DISASTER_VEHICLE" - Disaster: Vehicle. 5250 // "ALCOHOL" - Drugs/Alcohol/Controlled Substances: Alcohol. 5251 // "SMOKING" - Drugs/Alcohol/Controlled Substances: Smoking. 5252 // "NEGATIVE_NEWS_FINANCIAL" - Negative News: Financial. 5253 // "NON_ENGLISH" - Non-Std Content: Non-English. 5254 // "PARKING_PAGE" - Non-Std Content: Parking Page. 5255 // "UNMODERATED_UGC" - Unmoderated UGC: Forums, Images & Video. 5256 // "INFLAMMATORY_POLITICS_AND_NEWS" - Controversial Subjects: 5257 // Inflammatory Politics and News. 5258 // "NEGATIVE_NEWS_PHARMACEUTICAL" - Negative News: Pharmaceutical. 5259 AvoidedMediumSeverityCategories []string `json:"avoidedMediumSeverityCategories,omitempty"` 5260 5261 // ForceSendFields is a list of field names (e.g. 5262 // "AvoidUnknownBrandSafetyCategory") to unconditionally include in API 5263 // requests. By default, fields with empty values are omitted from API 5264 // requests. However, any non-pointer, non-interface field appearing in 5265 // ForceSendFields will be sent to the server regardless of whether the 5266 // field is empty or not. This may be used to include empty fields in 5267 // Patch requests. 5268 ForceSendFields []string `json:"-"` 5269 5270 // NullFields is a list of field names (e.g. 5271 // "AvoidUnknownBrandSafetyCategory") to include in API requests with 5272 // the JSON null value. By default, fields with empty values are omitted 5273 // from API requests. However, any field with an empty value appearing 5274 // in NullFields will be sent to the server as null. It is an error if a 5275 // field in this list has a non-empty value. This may be used to include 5276 // null fields in Patch requests. 5277 NullFields []string `json:"-"` 5278} 5279 5280func (s *DoubleVerifyBrandSafetyCategories) MarshalJSON() ([]byte, error) { 5281 type NoMethod DoubleVerifyBrandSafetyCategories 5282 raw := NoMethod(*s) 5283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5284} 5285 5286// DoubleVerifyDisplayViewability: Details of DoubleVerify display 5287// viewability settings. 5288type DoubleVerifyDisplayViewability struct { 5289 // Iab: Target web and app inventory to maximize IAB viewable rate. 5290 // 5291 // Possible values: 5292 // "IAB_VIEWED_RATE_UNSPECIFIED" - This enum is only a placeholder and 5293 // it doesn't specify any IAB viewed 5294 // rate options. 5295 // "IAB_VIEWED_RATE_80_PERCENT_HIGHER" - Target web and app inventory 5296 // to maximize IAB viewable rate 80% or 5297 // higher. 5298 // "IAB_VIEWED_RATE_75_PERCENT_HIGHER" - Target web and app inventory 5299 // to maximize IAB viewable rate 75% or 5300 // higher. 5301 // "IAB_VIEWED_RATE_70_PERCENT_HIGHER" - Target web and app inventory 5302 // to maximize IAB viewable rate 70% or 5303 // higher. 5304 // "IAB_VIEWED_RATE_65_PERCENT_HIGHER" - Target web and app inventory 5305 // to maximize IAB viewable rate 65% or 5306 // higher. 5307 // "IAB_VIEWED_RATE_60_PERCENT_HIGHER" - Target web and app inventory 5308 // to maximize IAB viewable rate 60% or 5309 // higher. 5310 // "IAB_VIEWED_RATE_55_PERCENT_HIGHER" - Target web and app inventory 5311 // to maximize IAB viewable rate 55% or 5312 // higher. 5313 // "IAB_VIEWED_RATE_50_PERCENT_HIGHER" - Target web and app inventory 5314 // to maximize IAB viewable rate 50% or 5315 // higher. 5316 // "IAB_VIEWED_RATE_40_PERCENT_HIGHER" - Target web and app inventory 5317 // to maximize IAB viewable rate 40% or 5318 // higher. 5319 // "IAB_VIEWED_RATE_30_PERCENT_HIGHER" - Target web and app inventory 5320 // to maximize IAB viewable rate 30% or 5321 // higher. 5322 Iab string `json:"iab,omitempty"` 5323 5324 // ViewableDuring: Target web and app inventory to maximize 100% 5325 // viewable duration. 5326 // 5327 // Possible values: 5328 // "AVERAGE_VIEW_DURATION_UNSPECIFIED" - This enum is only a 5329 // placeholder and it doesn't specify any average view 5330 // duration options. 5331 // "AVERAGE_VIEW_DURATION_5_SEC" - Target web and app inventory to 5332 // maximize 100% viewable duration 5 5333 // seconds or more. 5334 // "AVERAGE_VIEW_DURATION_10_SEC" - Target web and app inventory to 5335 // maximize 100% viewable duration 10 5336 // seconds or more. 5337 // "AVERAGE_VIEW_DURATION_15_SEC" - Target web and app inventory to 5338 // maximize 100% viewable duration 15 5339 // seconds or more. 5340 ViewableDuring string `json:"viewableDuring,omitempty"` 5341 5342 // ForceSendFields is a list of field names (e.g. "Iab") to 5343 // unconditionally include in API requests. By default, fields with 5344 // empty values are omitted from API requests. However, any non-pointer, 5345 // non-interface field appearing in ForceSendFields will be sent to the 5346 // server regardless of whether the field is empty or not. This may be 5347 // used to include empty fields in Patch requests. 5348 ForceSendFields []string `json:"-"` 5349 5350 // NullFields is a list of field names (e.g. "Iab") to include in API 5351 // requests with the JSON null value. By default, fields with empty 5352 // values are omitted from API requests. However, any field with an 5353 // empty value appearing in NullFields will be sent to the server as 5354 // null. It is an error if a field in this list has a non-empty value. 5355 // This may be used to include null fields in Patch requests. 5356 NullFields []string `json:"-"` 5357} 5358 5359func (s *DoubleVerifyDisplayViewability) MarshalJSON() ([]byte, error) { 5360 type NoMethod DoubleVerifyDisplayViewability 5361 raw := NoMethod(*s) 5362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5363} 5364 5365// DoubleVerifyFraudInvalidTraffic: DoubleVerify Fraud & Invalid Traffic 5366// settings. 5367type DoubleVerifyFraudInvalidTraffic struct { 5368 // AvoidInsufficientOption: Insufficient Historical Fraud & IVT Stats. 5369 AvoidInsufficientOption bool `json:"avoidInsufficientOption,omitempty"` 5370 5371 // AvoidedFraudOption: Avoid Sites and Apps with historical Fraud & IVT. 5372 // 5373 // Possible values: 5374 // "FRAUD_UNSPECIFIED" - This enum is only a placeholder and it 5375 // doesn't specify any fraud and 5376 // invalid traffic options. 5377 // "AD_IMPRESSION_FRAUD_100" - 100% Fraud & IVT. 5378 // "AD_IMPRESSION_FRAUD_50" - 50% or Higher Fraud & IVT. 5379 // "AD_IMPRESSION_FRAUD_25" - 25% or Higher Fraud & IVT. 5380 // "AD_IMPRESSION_FRAUD_10" - 10% or Higher Fraud & IVT. 5381 // "AD_IMPRESSION_FRAUD_8" - 8% or Higher Fraud & IVT. 5382 // "AD_IMPRESSION_FRAUD_6" - 6% or Higher Fraud & IVT. 5383 // "AD_IMPRESSION_FRAUD_4" - 4% or Higher Fraud & IVT. 5384 // "AD_IMPRESSION_FRAUD_2" - 2% or Higher Fraud & IVT. 5385 AvoidedFraudOption string `json:"avoidedFraudOption,omitempty"` 5386 5387 // ForceSendFields is a list of field names (e.g. 5388 // "AvoidInsufficientOption") to unconditionally include in API 5389 // requests. By default, fields with empty values are omitted from API 5390 // requests. However, any non-pointer, non-interface field appearing in 5391 // ForceSendFields will be sent to the server regardless of whether the 5392 // field is empty or not. This may be used to include empty fields in 5393 // Patch requests. 5394 ForceSendFields []string `json:"-"` 5395 5396 // NullFields is a list of field names (e.g. "AvoidInsufficientOption") 5397 // to include in API requests with the JSON null value. By default, 5398 // fields with empty values are omitted from API requests. However, any 5399 // field with an empty value appearing in NullFields will be sent to the 5400 // server as null. It is an error if a field in this list has a 5401 // non-empty value. This may be used to include null fields in Patch 5402 // requests. 5403 NullFields []string `json:"-"` 5404} 5405 5406func (s *DoubleVerifyFraudInvalidTraffic) MarshalJSON() ([]byte, error) { 5407 type NoMethod DoubleVerifyFraudInvalidTraffic 5408 raw := NoMethod(*s) 5409 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5410} 5411 5412// DoubleVerifyVideoViewability: Details of DoubleVerify video 5413// viewability settings. 5414type DoubleVerifyVideoViewability struct { 5415 // PlayerImpressionRate: Target inventory to maximize impressions with 5416 // 400x300 or greater player 5417 // size. 5418 // 5419 // Possible values: 5420 // "PLAYER_SIZE_400X300_UNSPECIFIED" - This enum is only a placeholder 5421 // and it doesn't specify any impressions 5422 // options. 5423 // "PLAYER_SIZE_400X300_95" - Sites with 95%+ of impressions. 5424 // "PLAYER_SIZE_400X300_70" - Sites with 70%+ of impressions. 5425 // "PLAYER_SIZE_400X300_25" - Sites with 25%+ of impressions. 5426 // "PLAYER_SIZE_400X300_5" - Sites with 5%+ of impressions. 5427 PlayerImpressionRate string `json:"playerImpressionRate,omitempty"` 5428 5429 // VideoIab: Target web inventory to maximize IAB viewable rate. 5430 // 5431 // Possible values: 5432 // "VIDEO_IAB_UNSPECIFIED" - This enum is only a placeholder and it 5433 // doesn't specify any video IAB 5434 // viewable rate options. 5435 // "IAB_VIEWABILITY_80_PERCENT_HIGHER" - Target web and app inventory 5436 // to maximize IAB viewable rate 80% or 5437 // higher. 5438 // "IAB_VIEWABILITY_75_PERCENT_HIGHER" - Target web and app inventory 5439 // to maximize IAB viewable rate 75% or 5440 // higher. 5441 // "IAB_VIEWABILITY_70_PERCENT_HIGHER" - Target web and app inventory 5442 // to maximize IAB viewable rate 70% or 5443 // higher. 5444 // "IAB_VIEWABILITY_65_PERCENT_HIHGER" - Target web and app inventory 5445 // to maximize IAB viewable rate 65% or 5446 // higher. 5447 // "IAB_VIEWABILITY_60_PERCENT_HIGHER" - Target web and app inventory 5448 // to maximize IAB viewable rate 60% or 5449 // higher. 5450 // "IAB_VIEWABILITY_55_PERCENT_HIHGER" - Target web and app inventory 5451 // to maximize IAB viewable rate 55% or 5452 // higher. 5453 // "IAB_VIEWABILITY_50_PERCENT_HIGHER" - Target web and app inventory 5454 // to maximize IAB viewable rate 50% or 5455 // higher. 5456 // "IAB_VIEWABILITY_40_PERCENT_HIHGER" - Target web and app inventory 5457 // to maximize IAB viewable rate 40% or 5458 // higher. 5459 // "IAB_VIEWABILITY_30_PERCENT_HIHGER" - Target web and app inventory 5460 // to maximize IAB viewable rate 30% or 5461 // higher. 5462 VideoIab string `json:"videoIab,omitempty"` 5463 5464 // VideoViewableRate: Target web inventory to maximize fully viewable 5465 // rate. 5466 // 5467 // Possible values: 5468 // "VIDEO_VIEWABLE_RATE_UNSPECIFIED" - This enum is only a placeholder 5469 // and it doesn't specify any video 5470 // viewable rate options. 5471 // "VIEWED_PERFORMANCE_40_PERCENT_HIGHER" - Target web inventory to 5472 // maximize fully viewable rate 40% or higher. 5473 // "VIEWED_PERFORMANCE_35_PERCENT_HIGHER" - Target web inventory to 5474 // maximize fully viewable rate 35% or higher. 5475 // "VIEWED_PERFORMANCE_30_PERCENT_HIGHER" - Target web inventory to 5476 // maximize fully viewable rate 30% or higher. 5477 // "VIEWED_PERFORMANCE_25_PERCENT_HIGHER" - Target web inventory to 5478 // maximize fully viewable rate 25% or higher. 5479 // "VIEWED_PERFORMANCE_20_PERCENT_HIGHER" - Target web inventory to 5480 // maximize fully viewable rate 20% or higher. 5481 // "VIEWED_PERFORMANCE_10_PERCENT_HIGHER" - Target web inventory to 5482 // maximize fully viewable rate 10% or higher. 5483 VideoViewableRate string `json:"videoViewableRate,omitempty"` 5484 5485 // ForceSendFields is a list of field names (e.g. 5486 // "PlayerImpressionRate") to unconditionally include in API requests. 5487 // By default, fields with empty values are omitted from API requests. 5488 // However, any non-pointer, non-interface field appearing in 5489 // ForceSendFields will be sent to the server regardless of whether the 5490 // field is empty or not. This may be used to include empty fields in 5491 // Patch requests. 5492 ForceSendFields []string `json:"-"` 5493 5494 // NullFields is a list of field names (e.g. "PlayerImpressionRate") to 5495 // include in API requests with the JSON null value. By default, fields 5496 // with empty values are omitted from API requests. However, any field 5497 // with an empty value appearing in NullFields will be sent to the 5498 // server as null. It is an error if a field in this list has a 5499 // non-empty value. This may be used to include null fields in Patch 5500 // requests. 5501 NullFields []string `json:"-"` 5502} 5503 5504func (s *DoubleVerifyVideoViewability) MarshalJSON() ([]byte, error) { 5505 type NoMethod DoubleVerifyVideoViewability 5506 raw := NoMethod(*s) 5507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5508} 5509 5510// Empty: A generic empty message that you can re-use to avoid defining 5511// duplicated 5512// empty messages in your APIs. A typical example is to use it as the 5513// request 5514// or the response type of an API method. For instance: 5515// 5516// service Foo { 5517// rpc Bar(google.protobuf.Empty) returns 5518// (google.protobuf.Empty); 5519// } 5520// 5521// The JSON representation for `Empty` is empty JSON object `{}`. 5522type Empty struct { 5523 // ServerResponse contains the HTTP response code and headers from the 5524 // server. 5525 googleapi.ServerResponse `json:"-"` 5526} 5527 5528// EnvironmentAssignedTargetingOptionDetails: Assigned environment 5529// targeting option details. This will be populated 5530// in the details field of an AssignedTargetingOption 5531// when 5532// targeting_type is 5533// `TARGETING_TYPE_ENVIRONMENT`. 5534type EnvironmentAssignedTargetingOptionDetails struct { 5535 // Environment: Output only. The serving environment. 5536 // 5537 // Possible values: 5538 // "ENVIRONMENT_UNSPECIFIED" - Default value when environment is not 5539 // specified in this version. This enum 5540 // is a placeholder for default value and does not represent a 5541 // real 5542 // environment option. 5543 // "ENVIRONMENT_WEB_OPTIMIZED" - Target inventory displayed in 5544 // browsers. This includes inventory that was 5545 // designed for the device it was viewed on, such as mobile websites 5546 // viewed on 5547 // a mobile device. ENVIRONMENT_WEB_NOT_OPTIMIZED, if targeted, should 5548 // be 5549 // deleted prior to the deletion of this targeting option. 5550 // "ENVIRONMENT_WEB_NOT_OPTIMIZED" - Target inventory displayed in 5551 // browsers. This includes inventory that was 5552 // not designed for the device but viewed on it, such as websites 5553 // optimized 5554 // for desktop but viewed on a mobile device. ENVIRONMENT_WEB_OPTIMIZED 5555 // should 5556 // be targeted prior to the addition of this targeting option. 5557 // "ENVIRONMENT_APP" - Target inventory displayed in apps. 5558 Environment string `json:"environment,omitempty"` 5559 5560 // TargetingOptionId: Required. The targeting_option_id of 5561 // a 5562 // TargetingOption of type `TARGETING_TYPE_ENVIRONMENT` (e.g., 5563 // "508010" 5564 // for targeting the `ENVIRONMENT_WEB_OPTIMIZED` option). 5565 TargetingOptionId string `json:"targetingOptionId,omitempty"` 5566 5567 // ForceSendFields is a list of field names (e.g. "Environment") to 5568 // unconditionally include in API requests. By default, fields with 5569 // empty values are omitted from API requests. However, any non-pointer, 5570 // non-interface field appearing in ForceSendFields will be sent to the 5571 // server regardless of whether the field is empty or not. This may be 5572 // used to include empty fields in Patch requests. 5573 ForceSendFields []string `json:"-"` 5574 5575 // NullFields is a list of field names (e.g. "Environment") to include 5576 // in API requests with the JSON null value. By default, fields with 5577 // empty values are omitted from API requests. However, any field with 5578 // an empty value appearing in NullFields will be sent to the server as 5579 // null. It is an error if a field in this list has a non-empty value. 5580 // This may be used to include null fields in Patch requests. 5581 NullFields []string `json:"-"` 5582} 5583 5584func (s *EnvironmentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 5585 type NoMethod EnvironmentAssignedTargetingOptionDetails 5586 raw := NoMethod(*s) 5587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5588} 5589 5590// EnvironmentTargetingOptionDetails: Represents a targetable 5591// environment. This will be populated in the 5592// environment_details field of a 5593// TargetingOption when targeting_type is 5594// `TARGETING_TYPE_ENVIRONMENT`. 5595type EnvironmentTargetingOptionDetails struct { 5596 // Environment: Output only. The serving environment. 5597 // 5598 // Possible values: 5599 // "ENVIRONMENT_UNSPECIFIED" - Default value when environment is not 5600 // specified in this version. This enum 5601 // is a placeholder for default value and does not represent a 5602 // real 5603 // environment option. 5604 // "ENVIRONMENT_WEB_OPTIMIZED" - Target inventory displayed in 5605 // browsers. This includes inventory that was 5606 // designed for the device it was viewed on, such as mobile websites 5607 // viewed on 5608 // a mobile device. ENVIRONMENT_WEB_NOT_OPTIMIZED, if targeted, should 5609 // be 5610 // deleted prior to the deletion of this targeting option. 5611 // "ENVIRONMENT_WEB_NOT_OPTIMIZED" - Target inventory displayed in 5612 // browsers. This includes inventory that was 5613 // not designed for the device but viewed on it, such as websites 5614 // optimized 5615 // for desktop but viewed on a mobile device. ENVIRONMENT_WEB_OPTIMIZED 5616 // should 5617 // be targeted prior to the addition of this targeting option. 5618 // "ENVIRONMENT_APP" - Target inventory displayed in apps. 5619 Environment string `json:"environment,omitempty"` 5620 5621 // ForceSendFields is a list of field names (e.g. "Environment") to 5622 // unconditionally include in API requests. By default, fields with 5623 // empty values are omitted from API requests. However, any non-pointer, 5624 // non-interface field appearing in ForceSendFields will be sent to the 5625 // server regardless of whether the field is empty or not. This may be 5626 // used to include empty fields in Patch requests. 5627 ForceSendFields []string `json:"-"` 5628 5629 // NullFields is a list of field names (e.g. "Environment") to include 5630 // in API requests with the JSON null value. By default, fields with 5631 // empty values are omitted from API requests. However, any field with 5632 // an empty value appearing in NullFields will be sent to the server as 5633 // null. It is an error if a field in this list has a non-empty value. 5634 // This may be used to include null fields in Patch requests. 5635 NullFields []string `json:"-"` 5636} 5637 5638func (s *EnvironmentTargetingOptionDetails) MarshalJSON() ([]byte, error) { 5639 type NoMethod EnvironmentTargetingOptionDetails 5640 raw := NoMethod(*s) 5641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5642} 5643 5644// ExchangeAssignedTargetingOptionDetails: Details for assigned exchange 5645// targeting option. This will be populated in 5646// the details field of an AssignedTargetingOption when 5647// targeting_type is 5648// `TARGETING_TYPE_EXCHANGE`. 5649type ExchangeAssignedTargetingOptionDetails struct { 5650 // TargetingOptionId: Required. The targeting_option_id of 5651 // a 5652 // TargetingOption of type `TARGETING_TYPE_EXCHANGE`. 5653 TargetingOptionId string `json:"targetingOptionId,omitempty"` 5654 5655 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 5656 // to unconditionally include in API requests. By default, fields with 5657 // empty values are omitted from API requests. However, any non-pointer, 5658 // non-interface field appearing in ForceSendFields will be sent to the 5659 // server regardless of whether the field is empty or not. This may be 5660 // used to include empty fields in Patch requests. 5661 ForceSendFields []string `json:"-"` 5662 5663 // NullFields is a list of field names (e.g. "TargetingOptionId") to 5664 // include in API requests with the JSON null value. By default, fields 5665 // with empty values are omitted from API requests. However, any field 5666 // with an empty value appearing in NullFields will be sent to the 5667 // server as null. It is an error if a field in this list has a 5668 // non-empty value. This may be used to include null fields in Patch 5669 // requests. 5670 NullFields []string `json:"-"` 5671} 5672 5673func (s *ExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 5674 type NoMethod ExchangeAssignedTargetingOptionDetails 5675 raw := NoMethod(*s) 5676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5677} 5678 5679// ExchangeReviewStatus: Exchange review status for the creative. 5680type ExchangeReviewStatus struct { 5681 // Exchange: The exchange reviewing the creative. 5682 // 5683 // Possible values: 5684 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 5685 // this version. 5686 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 5687 // "EXCHANGE_APPNEXUS" - AppNexus. 5688 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 5689 // "EXCHANGE_ADFORM" - Adform. 5690 // "EXCHANGE_ADMETA" - Admeta. 5691 // "EXCHANGE_ADMIXER" - Admixer. 5692 // "EXCHANGE_ADSMOGO" - AdsMogo. 5693 // "EXCHANGE_ADSWIZZ" - AdsWizz. 5694 // "EXCHANGE_BIDSWITCH" - BidSwitch. 5695 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 5696 // from Yahoo!. 5697 // "EXCHANGE_CADREON" - Cadreon. 5698 // "EXCHANGE_DAILYMOTION" - Dailymotion. 5699 // "EXCHANGE_FIVE" - Five. 5700 // "EXCHANGE_FLUCT" - Fluct. 5701 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 5702 // "EXCHANGE_GENIEE" - Geniee. 5703 // "EXCHANGE_GUMGUM" - GumGum. 5704 // "EXCHANGE_IMOBILE" - i-mobile. 5705 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 5706 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 5707 // "EXCHANGE_INDEX" - Index Exchange. 5708 // "EXCHANGE_KARGO" - Kargo. 5709 // "EXCHANGE_MICROAD" - MicroAd. 5710 // "EXCHANGE_MOPUB" - MoPub. 5711 // "EXCHANGE_NEND" - Nend. 5712 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 5713 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 5714 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 5715 // "EXCHANGE_OOYALA" - Ooyala. 5716 // "EXCHANGE_OPENX" - OpenX. 5717 // "EXCHANGE_PERMODO" - Permodo. 5718 // "EXCHANGE_PLATFORMONE" - Platform One. 5719 // "EXCHANGE_PLATFORMID" - PlatformId. 5720 // "EXCHANGE_PUBMATIC" - PubMatic. 5721 // "EXCHANGE_PULSEPOINT" - PulsePoint. 5722 // "EXCHANGE_REVENUEMAX" - RevenueMax. 5723 // "EXCHANGE_RUBICON" - Rubicon. 5724 // "EXCHANGE_SMARTCLIP" - SmartClip. 5725 // "EXCHANGE_SMARTRTB" - SmartRTB+. 5726 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 5727 // "EXCHANGE_SOVRN" - Sovrn. 5728 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 5729 // "EXCHANGE_STROER" - Ströer SSP. 5730 // "EXCHANGE_TEADSTV" - TeadsTv. 5731 // "EXCHANGE_TELARIA" - Telaria. 5732 // "EXCHANGE_TVN" - TVN. 5733 // "EXCHANGE_UNITED" - United. 5734 // "EXCHANGE_YIELDLAB" - Yieldlab. 5735 // "EXCHANGE_YIELDMO" - Yieldmo. 5736 // "EXCHANGE_TRIPLELIFT" - TripleLift 5737 // "EXCHANGE_TABOOLA" - Taboola 5738 // "EXCHANGE_INMOBI" - InMobi. 5739 // "EXCHANGE_SMAATO" - Smaato 5740 // "EXCHANGE_AJA" - Aja. 5741 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 5742 // "EXCHANGE_WAZE" - Waze. 5743 Exchange string `json:"exchange,omitempty"` 5744 5745 // Status: Status of the exchange review. 5746 // 5747 // Possible values: 5748 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 5749 // unknown in this version. 5750 // "REVIEW_STATUS_APPROVED" - The creative is approved. 5751 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 5752 // "REVIEW_STATUS_PENDING" - The creative is pending review. 5753 Status string `json:"status,omitempty"` 5754 5755 // ForceSendFields is a list of field names (e.g. "Exchange") to 5756 // unconditionally include in API requests. By default, fields with 5757 // empty values are omitted from API requests. However, any non-pointer, 5758 // non-interface field appearing in ForceSendFields will be sent to the 5759 // server regardless of whether the field is empty or not. This may be 5760 // used to include empty fields in Patch requests. 5761 ForceSendFields []string `json:"-"` 5762 5763 // NullFields is a list of field names (e.g. "Exchange") to include in 5764 // API requests with the JSON null value. By default, fields with empty 5765 // values are omitted from API requests. However, any field with an 5766 // empty value appearing in NullFields will be sent to the server as 5767 // null. It is an error if a field in this list has a non-empty value. 5768 // This may be used to include null fields in Patch requests. 5769 NullFields []string `json:"-"` 5770} 5771 5772func (s *ExchangeReviewStatus) MarshalJSON() ([]byte, error) { 5773 type NoMethod ExchangeReviewStatus 5774 raw := NoMethod(*s) 5775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5776} 5777 5778// ExchangeTargetingOptionDetails: Represents a targetable exchange. 5779// This will be populated in the 5780// exchange_details field 5781// of a TargetingOption when 5782// targeting_type is 5783// `TARGETING_TYPE_EXCHANGE`. 5784type ExchangeTargetingOptionDetails struct { 5785 // Exchange: Output only. The type of exchange. 5786 // 5787 // Possible values: 5788 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 5789 // this version. 5790 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 5791 // "EXCHANGE_APPNEXUS" - AppNexus. 5792 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 5793 // "EXCHANGE_ADFORM" - Adform. 5794 // "EXCHANGE_ADMETA" - Admeta. 5795 // "EXCHANGE_ADMIXER" - Admixer. 5796 // "EXCHANGE_ADSMOGO" - AdsMogo. 5797 // "EXCHANGE_ADSWIZZ" - AdsWizz. 5798 // "EXCHANGE_BIDSWITCH" - BidSwitch. 5799 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 5800 // from Yahoo!. 5801 // "EXCHANGE_CADREON" - Cadreon. 5802 // "EXCHANGE_DAILYMOTION" - Dailymotion. 5803 // "EXCHANGE_FIVE" - Five. 5804 // "EXCHANGE_FLUCT" - Fluct. 5805 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 5806 // "EXCHANGE_GENIEE" - Geniee. 5807 // "EXCHANGE_GUMGUM" - GumGum. 5808 // "EXCHANGE_IMOBILE" - i-mobile. 5809 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 5810 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 5811 // "EXCHANGE_INDEX" - Index Exchange. 5812 // "EXCHANGE_KARGO" - Kargo. 5813 // "EXCHANGE_MICROAD" - MicroAd. 5814 // "EXCHANGE_MOPUB" - MoPub. 5815 // "EXCHANGE_NEND" - Nend. 5816 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 5817 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 5818 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 5819 // "EXCHANGE_OOYALA" - Ooyala. 5820 // "EXCHANGE_OPENX" - OpenX. 5821 // "EXCHANGE_PERMODO" - Permodo. 5822 // "EXCHANGE_PLATFORMONE" - Platform One. 5823 // "EXCHANGE_PLATFORMID" - PlatformId. 5824 // "EXCHANGE_PUBMATIC" - PubMatic. 5825 // "EXCHANGE_PULSEPOINT" - PulsePoint. 5826 // "EXCHANGE_REVENUEMAX" - RevenueMax. 5827 // "EXCHANGE_RUBICON" - Rubicon. 5828 // "EXCHANGE_SMARTCLIP" - SmartClip. 5829 // "EXCHANGE_SMARTRTB" - SmartRTB+. 5830 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 5831 // "EXCHANGE_SOVRN" - Sovrn. 5832 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 5833 // "EXCHANGE_STROER" - Ströer SSP. 5834 // "EXCHANGE_TEADSTV" - TeadsTv. 5835 // "EXCHANGE_TELARIA" - Telaria. 5836 // "EXCHANGE_TVN" - TVN. 5837 // "EXCHANGE_UNITED" - United. 5838 // "EXCHANGE_YIELDLAB" - Yieldlab. 5839 // "EXCHANGE_YIELDMO" - Yieldmo. 5840 // "EXCHANGE_TRIPLELIFT" - TripleLift 5841 // "EXCHANGE_TABOOLA" - Taboola 5842 // "EXCHANGE_INMOBI" - InMobi. 5843 // "EXCHANGE_SMAATO" - Smaato 5844 // "EXCHANGE_AJA" - Aja. 5845 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 5846 // "EXCHANGE_WAZE" - Waze. 5847 Exchange string `json:"exchange,omitempty"` 5848 5849 // ForceSendFields is a list of field names (e.g. "Exchange") to 5850 // unconditionally include in API requests. By default, fields with 5851 // empty values are omitted from API requests. However, any non-pointer, 5852 // non-interface field appearing in ForceSendFields will be sent to the 5853 // server regardless of whether the field is empty or not. This may be 5854 // used to include empty fields in Patch requests. 5855 ForceSendFields []string `json:"-"` 5856 5857 // NullFields is a list of field names (e.g. "Exchange") to include in 5858 // API requests with the JSON null value. By default, fields with empty 5859 // values are omitted from API requests. However, any field with an 5860 // empty value appearing in NullFields will be sent to the server as 5861 // null. It is an error if a field in this list has a non-empty value. 5862 // This may be used to include null fields in Patch requests. 5863 NullFields []string `json:"-"` 5864} 5865 5866func (s *ExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 5867 type NoMethod ExchangeTargetingOptionDetails 5868 raw := NoMethod(*s) 5869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5870} 5871 5872// ExitEvent: Exit event of the creative. 5873type ExitEvent struct { 5874 // Name: The name of the click tag of the exit event. 5875 // 5876 // The name must be unique within one creative. 5877 // 5878 // Leave it empty or unset for creatives containing image assets only. 5879 Name string `json:"name,omitempty"` 5880 5881 // ReportingName: The name used to identify this event in reports. 5882 // Leave it empty or unset for creatives containing image assets only. 5883 ReportingName string `json:"reportingName,omitempty"` 5884 5885 // Type: Required. The type of the exit event. 5886 // 5887 // Possible values: 5888 // "EXIT_EVENT_TYPE_UNSPECIFIED" - Exit event type is not specified or 5889 // is unknown in this version. 5890 // "EXIT_EVENT_TYPE_DEFAULT" - The exit event is the default one. 5891 // "EXIT_EVENT_TYPE_BACKUP" - The exit event is a backup exit 5892 // event. 5893 // There could be multiple backup exit events in a creative. 5894 Type string `json:"type,omitempty"` 5895 5896 // Url: Required. The click through URL of the exit event. 5897 // This is required when type is: 5898 // 5899 // * `EXIT_EVENT_TYPE_DEFAULT` 5900 // * `EXIT_EVENT_TYPE_BACKUP` 5901 Url string `json:"url,omitempty"` 5902 5903 // ForceSendFields is a list of field names (e.g. "Name") to 5904 // unconditionally include in API requests. By default, fields with 5905 // empty values are omitted from API requests. However, any non-pointer, 5906 // non-interface field appearing in ForceSendFields will be sent to the 5907 // server regardless of whether the field is empty or not. This may be 5908 // used to include empty fields in Patch requests. 5909 ForceSendFields []string `json:"-"` 5910 5911 // NullFields is a list of field names (e.g. "Name") to include in API 5912 // requests with the JSON null value. By default, fields with empty 5913 // values are omitted from API requests. However, any field with an 5914 // empty value appearing in NullFields will be sent to the server as 5915 // null. It is an error if a field in this list has a non-empty value. 5916 // This may be used to include null fields in Patch requests. 5917 NullFields []string `json:"-"` 5918} 5919 5920func (s *ExitEvent) MarshalJSON() ([]byte, error) { 5921 type NoMethod ExitEvent 5922 raw := NoMethod(*s) 5923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5924} 5925 5926// FirstAndThirdPartyAudience: Describes a first or third party audience 5927// list used for targeting. 5928// First party audiences are created via usage of client data. 5929// Third party audiences are provided by Third Party data providers and 5930// can only 5931// be licensed to customers. 5932type FirstAndThirdPartyAudience struct { 5933 // DisplayName: Output only. The display name of the first and third 5934 // party audience. 5935 // . 5936 DisplayName string `json:"displayName,omitempty"` 5937 5938 // FirstAndThirdPartyAudienceId: Output only. The unique ID of the first 5939 // and third party audience. Assigned by the 5940 // system. 5941 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"` 5942 5943 // FirstAndThirdPartyAudienceType: Output only. Whether the audience is 5944 // a first or third party audience. 5945 // . 5946 // 5947 // Possible values: 5948 // "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_UNSPECIFIED" - Default value 5949 // when type is not specified or is unknown. 5950 // "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_FIRST_PARTY" - Audience that 5951 // is created via usage of client data. 5952 // "FIRST_AND_THIRD_PARTY_AUDIENCE_TYPE_THIRD_PARTY" - Audience that 5953 // is provided by Third Party data providers. 5954 FirstAndThirdPartyAudienceType string `json:"firstAndThirdPartyAudienceType,omitempty"` 5955 5956 // Name: Output only. The resource name of the first and third party 5957 // audience. 5958 Name string `json:"name,omitempty"` 5959 5960 // ServerResponse contains the HTTP response code and headers from the 5961 // server. 5962 googleapi.ServerResponse `json:"-"` 5963 5964 // ForceSendFields is a list of field names (e.g. "DisplayName") to 5965 // unconditionally include in API requests. By default, fields with 5966 // empty values are omitted from API requests. However, any non-pointer, 5967 // non-interface field appearing in ForceSendFields will be sent to the 5968 // server regardless of whether the field is empty or not. This may be 5969 // used to include empty fields in Patch requests. 5970 ForceSendFields []string `json:"-"` 5971 5972 // NullFields is a list of field names (e.g. "DisplayName") to include 5973 // in API requests with the JSON null value. By default, fields with 5974 // empty values are omitted from API requests. However, any field with 5975 // an empty value appearing in NullFields will be sent to the server as 5976 // null. It is an error if a field in this list has a non-empty value. 5977 // This may be used to include null fields in Patch requests. 5978 NullFields []string `json:"-"` 5979} 5980 5981func (s *FirstAndThirdPartyAudience) MarshalJSON() ([]byte, error) { 5982 type NoMethod FirstAndThirdPartyAudience 5983 raw := NoMethod(*s) 5984 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5985} 5986 5987// FirstAndThirdPartyAudienceGroup: Details of first and third party 5988// audience group. 5989// All first and third party audience targeting settings are logically 5990// ‘OR’ of 5991// each other. 5992type FirstAndThirdPartyAudienceGroup struct { 5993 // Settings: Required. All first and third party audience targeting 5994 // settings in first and 5995 // third party audience group. 5996 // Repeated settings with same id are not allowed. 5997 Settings []*FirstAndThirdPartyAudienceTargetingSetting `json:"settings,omitempty"` 5998 5999 // ForceSendFields is a list of field names (e.g. "Settings") to 6000 // unconditionally include in API requests. By default, fields with 6001 // empty values are omitted from API requests. However, any non-pointer, 6002 // non-interface field appearing in ForceSendFields will be sent to the 6003 // server regardless of whether the field is empty or not. This may be 6004 // used to include empty fields in Patch requests. 6005 ForceSendFields []string `json:"-"` 6006 6007 // NullFields is a list of field names (e.g. "Settings") to include in 6008 // API requests with the JSON null value. By default, fields with empty 6009 // values are omitted from API requests. However, any field with an 6010 // empty value appearing in NullFields will be sent to the server as 6011 // null. It is an error if a field in this list has a non-empty value. 6012 // This may be used to include null fields in Patch requests. 6013 NullFields []string `json:"-"` 6014} 6015 6016func (s *FirstAndThirdPartyAudienceGroup) MarshalJSON() ([]byte, error) { 6017 type NoMethod FirstAndThirdPartyAudienceGroup 6018 raw := NoMethod(*s) 6019 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6020} 6021 6022// FirstAndThirdPartyAudienceTargetingSetting: Details of first and 6023// third party audience targeting setting. 6024type FirstAndThirdPartyAudienceTargetingSetting struct { 6025 // FirstAndThirdPartyAudienceId: Required. First and third party 6026 // audience id of the first and third party audience 6027 // targeting setting. This id is 6028 // first_and_third_party_audience_id. 6029 FirstAndThirdPartyAudienceId int64 `json:"firstAndThirdPartyAudienceId,omitempty,string"` 6030 6031 // Recency: The recency of the first and third party audience targeting 6032 // setting. 6033 // Only applicable to first party audiences, otherwise 6034 // will be ignored. For more info, refer 6035 // to 6036 // https://support.google.com/displayvideo/answer/2949947#recency 6037 // When 6038 // unspecified, no recency limit will be used. 6039 // 6040 // Possible values: 6041 // "RECENCY_NO_LIMIT" - No limit of recency. 6042 // "RECENCY_1_MINUTE" - Recency is 1 minute. 6043 // "RECENCY_5_MINUTES" - Recency is 5 minutes. 6044 // "RECENCY_10_MINUTES" - Recency is 10 minutes. 6045 // "RECENCY_15_MINUTES" - Recency is 15 minutes. 6046 // "RECENCY_30_MINUTES" - Recency is 30 minutes. 6047 // "RECENCY_1_HOUR" - Recency is 1 hour. 6048 // "RECENCY_2_HOURS" - Recency is 2 hours. 6049 // "RECENCY_3_HOURS" - Recency is 3 hours. 6050 // "RECENCY_6_HOURS" - Recency is 6 hours. 6051 // "RECENCY_12_HOURS" - Recency is 12 hours. 6052 // "RECENCY_1_DAY" - Recency is 1 day. 6053 // "RECENCY_2_DAYS" - Recency is 2 days. 6054 // "RECENCY_3_DAYS" - Recency is 3 days. 6055 // "RECENCY_5_DAYS" - Recency is 5 days. 6056 // "RECENCY_7_DAYS" - Recency is 7 days. 6057 // "RECENCY_10_DAYS" - Recency is 10 days. 6058 // "RECENCY_14_DAYS" - Recency is 14 days. 6059 // "RECENCY_15_DAYS" - Recency is 15 days. 6060 // "RECENCY_21_DAYS" - Recency is 21 days. 6061 // "RECENCY_28_DAYS" - Recency is 28 days. 6062 // "RECENCY_30_DAYS" - Recency is 30 days. 6063 // "RECENCY_40_DAYS" - Recency is 40 days. 6064 // "RECENCY_60_DAYS" - Recency is 60 days. 6065 // "RECENCY_90_DAYS" - Recency is 90 days. 6066 // "RECENCY_120_DAYS" - Recency is 120 days. 6067 // "RECENCY_180_DAYS" - Recency is 180 days. 6068 // "RECENCY_270_DAYS" - Recency is 270 days. 6069 // "RECENCY_365_DAYS" - Recency is 365 days. 6070 Recency string `json:"recency,omitempty"` 6071 6072 // ForceSendFields is a list of field names (e.g. 6073 // "FirstAndThirdPartyAudienceId") to unconditionally include in API 6074 // requests. By default, fields with empty values are omitted from API 6075 // requests. However, any non-pointer, non-interface field appearing in 6076 // ForceSendFields will be sent to the server regardless of whether the 6077 // field is empty or not. This may be used to include empty fields in 6078 // Patch requests. 6079 ForceSendFields []string `json:"-"` 6080 6081 // NullFields is a list of field names (e.g. 6082 // "FirstAndThirdPartyAudienceId") to include in API requests with the 6083 // JSON null value. By default, fields with empty values are omitted 6084 // from API requests. However, any field with an empty value appearing 6085 // in NullFields will be sent to the server as null. It is an error if a 6086 // field in this list has a non-empty value. This may be used to include 6087 // null fields in Patch requests. 6088 NullFields []string `json:"-"` 6089} 6090 6091func (s *FirstAndThirdPartyAudienceTargetingSetting) MarshalJSON() ([]byte, error) { 6092 type NoMethod FirstAndThirdPartyAudienceTargetingSetting 6093 raw := NoMethod(*s) 6094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6095} 6096 6097// FixedBidStrategy: A strategy that uses a fixed bidding price. 6098type FixedBidStrategy struct { 6099 // BidAmountMicros: The fixed bid amount, in micros of the advertiser's 6100 // currency. 6101 // For insertion order entity, 6102 // bid_amount_micros should be set as 0. 6103 // For line item entity, 6104 // bid_amount_micros must be greater 6105 // than or equal to billable unit of the given currency and smaller than 6106 // or 6107 // equal to the upper limit 1000000000. 6108 // 6109 // For example, 1500000 represents 1.5 standard units of the currency. 6110 BidAmountMicros int64 `json:"bidAmountMicros,omitempty,string"` 6111 6112 // ForceSendFields is a list of field names (e.g. "BidAmountMicros") to 6113 // unconditionally include in API requests. By default, fields with 6114 // empty values are omitted from API requests. However, any non-pointer, 6115 // non-interface field appearing in ForceSendFields will be sent to the 6116 // server regardless of whether the field is empty or not. This may be 6117 // used to include empty fields in Patch requests. 6118 ForceSendFields []string `json:"-"` 6119 6120 // NullFields is a list of field names (e.g. "BidAmountMicros") to 6121 // include in API requests with the JSON null value. By default, fields 6122 // with empty values are omitted from API requests. However, any field 6123 // with an empty value appearing in NullFields will be sent to the 6124 // server as null. It is an error if a field in this list has a 6125 // non-empty value. This may be used to include null fields in Patch 6126 // requests. 6127 NullFields []string `json:"-"` 6128} 6129 6130func (s *FixedBidStrategy) MarshalJSON() ([]byte, error) { 6131 type NoMethod FixedBidStrategy 6132 raw := NoMethod(*s) 6133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6134} 6135 6136// FloodlightGroup: A single Floodlight group. 6137type FloodlightGroup struct { 6138 // ActiveViewConfig: The Active View video viewability metric 6139 // configuration for the Floodlight 6140 // group. 6141 ActiveViewConfig *ActiveViewVideoViewabilityMetricConfig `json:"activeViewConfig,omitempty"` 6142 6143 // CustomVariables: User-defined custom variables owned by the 6144 // Floodlight group. 6145 // Use custom Floodlight variables to create reporting data that is 6146 // tailored 6147 // to your unique business needs. Custom Floodlight variables use the 6148 // keys 6149 // `U1=`, `U2=`, and so on, and can take any values that you choose to 6150 // pass to 6151 // them. You can use them to track virtually any type of data that you 6152 // collect 6153 // about your customers, such as the genre of movie that a customer 6154 // purchases, 6155 // the country to which the item is shipped, and so on. 6156 // 6157 // Custom Floodlight variables may not be used to pass any data that 6158 // could be 6159 // used or recognized as personally identifiable information 6160 // (PII). 6161 // 6162 // Example: 6163 // `custom_variables { 6164 // fields { 6165 // "U1": value { number_value: 123.4 }, 6166 // "U2": value { string_value: "MyVariable2" }, 6167 // "U3": value { string_value: "MyVariable3" } 6168 // } 6169 // }` 6170 // 6171 // Acceptable values for keys are "U1" through "U100", inclusive. 6172 // String 6173 // values must be less than 64 characters long, and cannot contain 6174 // the 6175 // following characters: "<>`. 6176 CustomVariables googleapi.RawMessage `json:"customVariables,omitempty"` 6177 6178 // DisplayName: Required. The display name of the Floodlight group. 6179 DisplayName string `json:"displayName,omitempty"` 6180 6181 // FloodlightGroupId: Output only. The unique ID of the Floodlight 6182 // group. Assigned by the system. 6183 FloodlightGroupId int64 `json:"floodlightGroupId,omitempty,string"` 6184 6185 // LookbackWindow: Required. The lookback window for the Floodlight 6186 // group. 6187 // Both click_days and 6188 // impression_days are required. Acceptable 6189 // values for both are `0` to `90`, inclusive. 6190 LookbackWindow *LookbackWindow `json:"lookbackWindow,omitempty"` 6191 6192 // Name: Output only. The resource name of the Floodlight group. 6193 Name string `json:"name,omitempty"` 6194 6195 // WebTagType: Required. The web tag type enabled for the Floodlight 6196 // group. 6197 // 6198 // Possible values: 6199 // "WEB_TAG_TYPE_UNSPECIFIED" - Type value is not specified or is 6200 // unknown in this version. 6201 // "WEB_TAG_TYPE_NONE" - No tag type. 6202 // "WEB_TAG_TYPE_IMAGE" - Image tag. 6203 // "WEB_TAG_TYPE_DYNAMIC" - Dynamic tag. 6204 WebTagType string `json:"webTagType,omitempty"` 6205 6206 // ServerResponse contains the HTTP response code and headers from the 6207 // server. 6208 googleapi.ServerResponse `json:"-"` 6209 6210 // ForceSendFields is a list of field names (e.g. "ActiveViewConfig") to 6211 // unconditionally include in API requests. By default, fields with 6212 // empty values are omitted from API requests. However, any non-pointer, 6213 // non-interface field appearing in ForceSendFields will be sent to the 6214 // server regardless of whether the field is empty or not. This may be 6215 // used to include empty fields in Patch requests. 6216 ForceSendFields []string `json:"-"` 6217 6218 // NullFields is a list of field names (e.g. "ActiveViewConfig") to 6219 // include in API requests with the JSON null value. By default, fields 6220 // with empty values are omitted from API requests. However, any field 6221 // with an empty value appearing in NullFields will be sent to the 6222 // server as null. It is an error if a field in this list has a 6223 // non-empty value. This may be used to include null fields in Patch 6224 // requests. 6225 NullFields []string `json:"-"` 6226} 6227 6228func (s *FloodlightGroup) MarshalJSON() ([]byte, error) { 6229 type NoMethod FloodlightGroup 6230 raw := NoMethod(*s) 6231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6232} 6233 6234// FrequencyCap: Settings that control the number of times a user may be 6235// shown with the same 6236// ad during a given time period. 6237type FrequencyCap struct { 6238 // MaxImpressions: The maximum number of times a user may be shown with 6239 // the same ad 6240 // during this period. Must be greater than 0. 6241 // 6242 // Applicable when unlimited is `false`. 6243 MaxImpressions int64 `json:"maxImpressions,omitempty"` 6244 6245 // TimeUnit: The time unit in which the frequency cap will be 6246 // applied. 6247 // 6248 // Applicable when unlimited is `false`. 6249 // 6250 // Possible values: 6251 // "TIME_UNIT_UNSPECIFIED" - Time unit value is not specified or is 6252 // unknown in this version. 6253 // "TIME_UNIT_LIFETIME" - The frequency cap will be applied to the 6254 // whole life time of the line 6255 // item. 6256 // "TIME_UNIT_MONTHS" - The frequency cap will be applied to a number 6257 // of months. 6258 // "TIME_UNIT_WEEKS" - The frequency cap will be applied to a number 6259 // of weeks. 6260 // "TIME_UNIT_DAYS" - The frequency cap will be applied to a number of 6261 // days. 6262 // "TIME_UNIT_HOURS" - The frequency cap will be applied to a number 6263 // of hours. 6264 // "TIME_UNIT_MINUTES" - The frequency cap will be applied to a number 6265 // of minutes. 6266 TimeUnit string `json:"timeUnit,omitempty"` 6267 6268 // TimeUnitCount: The number of time_unit the frequency cap 6269 // will 6270 // last. 6271 // 6272 // Applicable when unlimited is `false`. 6273 // The following restrictions apply based on the value of 6274 // time_unit: 6275 // 6276 // * `TIME_UNIT_LIFETIME` - this field is output only and will 6277 // default to 1 6278 // * `TIME_UNIT_MONTHS` - must be between 1 and 2 6279 // * `TIME_UNIT_WEEKS` - must be between 1 and 4 6280 // * `TIME_UNIT_DAYS` - must be between 1 and 6 6281 // * `TIME_UNIT_HOURS` - must be between 1 and 23 6282 // * `TIME_UNIT_MINUTES` - must be between 1 and 59 6283 TimeUnitCount int64 `json:"timeUnitCount,omitempty"` 6284 6285 // Unlimited: Whether unlimited frequency capping is applied. When this 6286 // field is set to 6287 // `true`, the remaining frequency cap fields are not applicable. 6288 Unlimited bool `json:"unlimited,omitempty"` 6289 6290 // ForceSendFields is a list of field names (e.g. "MaxImpressions") to 6291 // unconditionally include in API requests. By default, fields with 6292 // empty values are omitted from API requests. However, any non-pointer, 6293 // non-interface field appearing in ForceSendFields will be sent to the 6294 // server regardless of whether the field is empty or not. This may be 6295 // used to include empty fields in Patch requests. 6296 ForceSendFields []string `json:"-"` 6297 6298 // NullFields is a list of field names (e.g. "MaxImpressions") to 6299 // include in API requests with the JSON null value. By default, fields 6300 // with empty values are omitted from API requests. However, any field 6301 // with an empty value appearing in NullFields will be sent to the 6302 // server as null. It is an error if a field in this list has a 6303 // non-empty value. This may be used to include null fields in Patch 6304 // requests. 6305 NullFields []string `json:"-"` 6306} 6307 6308func (s *FrequencyCap) MarshalJSON() ([]byte, error) { 6309 type NoMethod FrequencyCap 6310 raw := NoMethod(*s) 6311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6312} 6313 6314// GenderAssignedTargetingOptionDetails: Details for assigned gender 6315// targeting option. This will be populated in 6316// the details field of an AssignedTargetingOption when 6317// targeting_type is 6318// `TARTGETING_TYPE_GENDER`. 6319type GenderAssignedTargetingOptionDetails struct { 6320 // Gender: Output only. The gender of the audience. 6321 // 6322 // Possible values: 6323 // "GENDER_UNSPECIFIED" - Default value when gender is not specified 6324 // in this version. This enum is a 6325 // place holder for default value and does not represent a real gender 6326 // option. 6327 // "GENDER_MALE" - The audience gender is male. 6328 // "GENDER_FEMALE" - The audience gender is female. 6329 // "GENDER_UNKNOWN" - The audience gender is unknown. 6330 Gender string `json:"gender,omitempty"` 6331 6332 // TargetingOptionId: Required. The targeting_option_id of 6333 // a 6334 // TargetingOption of type `TARGETING_TYPE_GENDER`. 6335 TargetingOptionId string `json:"targetingOptionId,omitempty"` 6336 6337 // ForceSendFields is a list of field names (e.g. "Gender") to 6338 // unconditionally include in API requests. By default, fields with 6339 // empty values are omitted from API requests. However, any non-pointer, 6340 // non-interface field appearing in ForceSendFields will be sent to the 6341 // server regardless of whether the field is empty or not. This may be 6342 // used to include empty fields in Patch requests. 6343 ForceSendFields []string `json:"-"` 6344 6345 // NullFields is a list of field names (e.g. "Gender") to include in API 6346 // requests with the JSON null value. By default, fields with empty 6347 // values are omitted from API requests. However, any field with an 6348 // empty value appearing in NullFields will be sent to the server as 6349 // null. It is an error if a field in this list has a non-empty value. 6350 // This may be used to include null fields in Patch requests. 6351 NullFields []string `json:"-"` 6352} 6353 6354func (s *GenderAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6355 type NoMethod GenderAssignedTargetingOptionDetails 6356 raw := NoMethod(*s) 6357 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6358} 6359 6360// GenderTargetingOptionDetails: Represents a targetable gender. This 6361// will be populated in the 6362// gender_details field of a TargetingOption 6363// when targeting_type is 6364// `TARGETING_TYPE_GENDER`. 6365type GenderTargetingOptionDetails struct { 6366 // Gender: Output only. The gender of an audience. 6367 // 6368 // Possible values: 6369 // "GENDER_UNSPECIFIED" - Default value when gender is not specified 6370 // in this version. This enum is a 6371 // place holder for default value and does not represent a real gender 6372 // option. 6373 // "GENDER_MALE" - The audience gender is male. 6374 // "GENDER_FEMALE" - The audience gender is female. 6375 // "GENDER_UNKNOWN" - The audience gender is unknown. 6376 Gender string `json:"gender,omitempty"` 6377 6378 // ForceSendFields is a list of field names (e.g. "Gender") to 6379 // unconditionally include in API requests. By default, fields with 6380 // empty values are omitted from API requests. However, any non-pointer, 6381 // non-interface field appearing in ForceSendFields will be sent to the 6382 // server regardless of whether the field is empty or not. This may be 6383 // used to include empty fields in Patch requests. 6384 ForceSendFields []string `json:"-"` 6385 6386 // NullFields is a list of field names (e.g. "Gender") to include in API 6387 // requests with the JSON null value. By default, fields with empty 6388 // values are omitted from API requests. However, any field with an 6389 // empty value appearing in NullFields will be sent to the server as 6390 // null. It is an error if a field in this list has a non-empty value. 6391 // This may be used to include null fields in Patch requests. 6392 NullFields []string `json:"-"` 6393} 6394 6395func (s *GenderTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6396 type NoMethod GenderTargetingOptionDetails 6397 raw := NoMethod(*s) 6398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6399} 6400 6401// GeoRegionAssignedTargetingOptionDetails: Details for assigned 6402// geographic region targeting option. This will be 6403// populated in the details field of an AssignedTargetingOption 6404// when 6405// targeting_type is 6406// `TARGETING_TYPE_GEO_REGION`. 6407type GeoRegionAssignedTargetingOptionDetails struct { 6408 // DisplayName: Output only. The display name of the geographic region 6409 // (e.g., "Ontario, Canada"). 6410 DisplayName string `json:"displayName,omitempty"` 6411 6412 // GeoRegionType: Output only. The type of geographic region targeting. 6413 // 6414 // Possible values: 6415 // "GEO_REGION_TYPE_UNKNOWN" - The geographic region type is unknown. 6416 // "GEO_REGION_TYPE_OTHER" - The geographic region type is other. 6417 // "GEO_REGION_TYPE_COUNTRY" - The geographic region is a country. 6418 // "GEO_REGION_TYPE_REGION" - The geographic region type is region. 6419 // "GEO_REGION_TYPE_TERRITORY" - The geographic region is a territory. 6420 // "GEO_REGION_TYPE_PROVINCE" - The geographic region is a province. 6421 // "GEO_REGION_TYPE_STATE" - The geographic region is a state. 6422 // "GEO_REGION_TYPE_PREFECTURE" - The geographic region is a 6423 // prefecture. 6424 // "GEO_REGION_TYPE_GOVERNORATE" - The geographic region is a 6425 // governorate. 6426 // "GEO_REGION_TYPE_CANTON" - The geographic region is a canton. 6427 // "GEO_REGION_TYPE_UNION_TERRITORY" - The geographic region is a 6428 // union territory. 6429 // "GEO_REGION_TYPE_AUTONOMOUS_COMMUNITY" - The geographic region is 6430 // an autonomous community. 6431 // "GEO_REGION_TYPE_DMA_REGION" - The geographic region is a 6432 // designated market area (DMA) region. 6433 // "GEO_REGION_TYPE_METRO" - The geographic region type is metro. 6434 // "GEO_REGION_TYPE_CONGRESSIONAL_DISTRICT" - The geographic region is 6435 // a congressional district. 6436 // "GEO_REGION_TYPE_COUNTY" - The geographic region is a county. 6437 // "GEO_REGION_TYPE_MUNICIPALITY" - The geographic region is a 6438 // municipality. 6439 // "GEO_REGION_TYPE_CITY" - The geographic region is a city. 6440 // "GEO_REGION_TYPE_POSTAL_CODE" - The geographic region targeting 6441 // type is postal code. 6442 // "GEO_REGION_TYPE_DEPARTMENT" - The geographic region targeting type 6443 // is department. 6444 // "GEO_REGION_TYPE_AIRPORT" - The geographic region is an airport. 6445 // "GEO_REGION_TYPE_TV_REGION" - The geographic region is a TV region. 6446 // "GEO_REGION_TYPE_OKRUG" - The geographic region is an okrug. 6447 // "GEO_REGION_TYPE_BOROUGH" - The geographic region is a borough. 6448 // "GEO_REGION_TYPE_CITY_REGION" - The geographic region is a city 6449 // region. 6450 // "GEO_REGION_TYPE_ARRONDISSEMENT" - The geographic region is an 6451 // arrondissement. 6452 // "GEO_REGION_TYPE_NEIGHBORHOOD" - The geographic region is a 6453 // neighborhood. 6454 // "GEO_REGION_TYPE_UNIVERSITY" - The geographic region is a 6455 // university. 6456 // "GEO_REGION_TYPE_DISTRICT" - The geographic region is a district. 6457 GeoRegionType string `json:"geoRegionType,omitempty"` 6458 6459 // Negative: Indicates if this option is being negatively targeted. 6460 Negative bool `json:"negative,omitempty"` 6461 6462 // TargetingOptionId: Required. The targeting_option_id of 6463 // a 6464 // TargetingOption of type `TARGETING_TYPE_GEO_REGION`. 6465 TargetingOptionId string `json:"targetingOptionId,omitempty"` 6466 6467 // ForceSendFields is a list of field names (e.g. "DisplayName") to 6468 // unconditionally include in API requests. By default, fields with 6469 // empty values are omitted from API requests. However, any non-pointer, 6470 // non-interface field appearing in ForceSendFields will be sent to the 6471 // server regardless of whether the field is empty or not. This may be 6472 // used to include empty fields in Patch requests. 6473 ForceSendFields []string `json:"-"` 6474 6475 // NullFields is a list of field names (e.g. "DisplayName") to include 6476 // in API requests with the JSON null value. By default, fields with 6477 // empty values are omitted from API requests. However, any field with 6478 // an empty value appearing in NullFields will be sent to the server as 6479 // null. It is an error if a field in this list has a non-empty value. 6480 // This may be used to include null fields in Patch requests. 6481 NullFields []string `json:"-"` 6482} 6483 6484func (s *GeoRegionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6485 type NoMethod GeoRegionAssignedTargetingOptionDetails 6486 raw := NoMethod(*s) 6487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6488} 6489 6490// GeoRegionTargetingOptionDetails: Represents a targetable geographic 6491// region. This will be populated in the 6492// geo_region_details field when 6493// targeting_type is 6494// `TARGETING_TYPE_GEO_REGION`. 6495type GeoRegionTargetingOptionDetails struct { 6496 // DisplayName: Output only. The display name of the geographic region 6497 // (e.g., "Ontario, Canada"). 6498 DisplayName string `json:"displayName,omitempty"` 6499 6500 // GeoRegionType: Output only. The type of geographic region targeting. 6501 // 6502 // Possible values: 6503 // "GEO_REGION_TYPE_UNKNOWN" - The geographic region type is unknown. 6504 // "GEO_REGION_TYPE_OTHER" - The geographic region type is other. 6505 // "GEO_REGION_TYPE_COUNTRY" - The geographic region is a country. 6506 // "GEO_REGION_TYPE_REGION" - The geographic region type is region. 6507 // "GEO_REGION_TYPE_TERRITORY" - The geographic region is a territory. 6508 // "GEO_REGION_TYPE_PROVINCE" - The geographic region is a province. 6509 // "GEO_REGION_TYPE_STATE" - The geographic region is a state. 6510 // "GEO_REGION_TYPE_PREFECTURE" - The geographic region is a 6511 // prefecture. 6512 // "GEO_REGION_TYPE_GOVERNORATE" - The geographic region is a 6513 // governorate. 6514 // "GEO_REGION_TYPE_CANTON" - The geographic region is a canton. 6515 // "GEO_REGION_TYPE_UNION_TERRITORY" - The geographic region is a 6516 // union territory. 6517 // "GEO_REGION_TYPE_AUTONOMOUS_COMMUNITY" - The geographic region is 6518 // an autonomous community. 6519 // "GEO_REGION_TYPE_DMA_REGION" - The geographic region is a 6520 // designated market area (DMA) region. 6521 // "GEO_REGION_TYPE_METRO" - The geographic region type is metro. 6522 // "GEO_REGION_TYPE_CONGRESSIONAL_DISTRICT" - The geographic region is 6523 // a congressional district. 6524 // "GEO_REGION_TYPE_COUNTY" - The geographic region is a county. 6525 // "GEO_REGION_TYPE_MUNICIPALITY" - The geographic region is a 6526 // municipality. 6527 // "GEO_REGION_TYPE_CITY" - The geographic region is a city. 6528 // "GEO_REGION_TYPE_POSTAL_CODE" - The geographic region targeting 6529 // type is postal code. 6530 // "GEO_REGION_TYPE_DEPARTMENT" - The geographic region targeting type 6531 // is department. 6532 // "GEO_REGION_TYPE_AIRPORT" - The geographic region is an airport. 6533 // "GEO_REGION_TYPE_TV_REGION" - The geographic region is a TV region. 6534 // "GEO_REGION_TYPE_OKRUG" - The geographic region is an okrug. 6535 // "GEO_REGION_TYPE_BOROUGH" - The geographic region is a borough. 6536 // "GEO_REGION_TYPE_CITY_REGION" - The geographic region is a city 6537 // region. 6538 // "GEO_REGION_TYPE_ARRONDISSEMENT" - The geographic region is an 6539 // arrondissement. 6540 // "GEO_REGION_TYPE_NEIGHBORHOOD" - The geographic region is a 6541 // neighborhood. 6542 // "GEO_REGION_TYPE_UNIVERSITY" - The geographic region is a 6543 // university. 6544 // "GEO_REGION_TYPE_DISTRICT" - The geographic region is a district. 6545 GeoRegionType string `json:"geoRegionType,omitempty"` 6546 6547 // ForceSendFields is a list of field names (e.g. "DisplayName") to 6548 // unconditionally include in API requests. By default, fields with 6549 // empty values are omitted from API requests. However, any non-pointer, 6550 // non-interface field appearing in ForceSendFields will be sent to the 6551 // server regardless of whether the field is empty or not. This may be 6552 // used to include empty fields in Patch requests. 6553 ForceSendFields []string `json:"-"` 6554 6555 // NullFields is a list of field names (e.g. "DisplayName") to include 6556 // in API requests with the JSON null value. By default, fields with 6557 // empty values are omitted from API requests. However, any field with 6558 // an empty value appearing in NullFields will be sent to the server as 6559 // null. It is an error if a field in this list has a non-empty value. 6560 // This may be used to include null fields in Patch requests. 6561 NullFields []string `json:"-"` 6562} 6563 6564func (s *GeoRegionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6565 type NoMethod GeoRegionTargetingOptionDetails 6566 raw := NoMethod(*s) 6567 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6568} 6569 6570// GoogleAudience: Describes a Google audience resource. 6571// Includes Google audience lists. 6572type GoogleAudience struct { 6573 // DisplayName: Output only. The display name of the Google audience. 6574 // . 6575 DisplayName string `json:"displayName,omitempty"` 6576 6577 // GoogleAudienceId: Output only. The unique ID of the Google audience. 6578 // Assigned by the system. 6579 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"` 6580 6581 // GoogleAudienceType: Output only. The type of Google audience. 6582 // . 6583 // 6584 // Possible values: 6585 // "GOOGLE_AUDIENCE_TYPE_UNSPECIFIED" - Default value when type is not 6586 // specified or is unknown. 6587 // "GOOGLE_AUDIENCE_TYPE_AFFINITY" - Affinity type Google audience. 6588 // "GOOGLE_AUDIENCE_TYPE_IN_MARKET" - In-Market type Google audience. 6589 // "GOOGLE_AUDIENCE_TYPE_INSTALLED_APPS" - Installed-apps type Google 6590 // audience. 6591 // "GOOGLE_AUDIENCE_TYPE_NEW_MOBILE_DEVICES" - New-mobile-devices type 6592 // Google audience. 6593 GoogleAudienceType string `json:"googleAudienceType,omitempty"` 6594 6595 // Name: Output only. The resource name of the google audience. 6596 Name string `json:"name,omitempty"` 6597 6598 // ServerResponse contains the HTTP response code and headers from the 6599 // server. 6600 googleapi.ServerResponse `json:"-"` 6601 6602 // ForceSendFields is a list of field names (e.g. "DisplayName") to 6603 // unconditionally include in API requests. By default, fields with 6604 // empty values are omitted from API requests. However, any non-pointer, 6605 // non-interface field appearing in ForceSendFields will be sent to the 6606 // server regardless of whether the field is empty or not. This may be 6607 // used to include empty fields in Patch requests. 6608 ForceSendFields []string `json:"-"` 6609 6610 // NullFields is a list of field names (e.g. "DisplayName") to include 6611 // in API requests with the JSON null value. By default, fields with 6612 // empty values are omitted from API requests. However, any field with 6613 // an empty value appearing in NullFields will be sent to the server as 6614 // null. It is an error if a field in this list has a non-empty value. 6615 // This may be used to include null fields in Patch requests. 6616 NullFields []string `json:"-"` 6617} 6618 6619func (s *GoogleAudience) MarshalJSON() ([]byte, error) { 6620 type NoMethod GoogleAudience 6621 raw := NoMethod(*s) 6622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6623} 6624 6625// GoogleAudienceGroup: Details of Google audience group. 6626// All Google audience targeting settings are logically ‘OR’ of each 6627// other. 6628type GoogleAudienceGroup struct { 6629 // Settings: Required. All Google audience targeting settings in Google 6630 // audience group. 6631 // Repeated settings with same id will be ignored. 6632 Settings []*GoogleAudienceTargetingSetting `json:"settings,omitempty"` 6633 6634 // ForceSendFields is a list of field names (e.g. "Settings") to 6635 // unconditionally include in API requests. By default, fields with 6636 // empty values are omitted from API requests. However, any non-pointer, 6637 // non-interface field appearing in ForceSendFields will be sent to the 6638 // server regardless of whether the field is empty or not. This may be 6639 // used to include empty fields in Patch requests. 6640 ForceSendFields []string `json:"-"` 6641 6642 // NullFields is a list of field names (e.g. "Settings") to include in 6643 // API requests with the JSON null value. By default, fields with empty 6644 // values are omitted from API requests. However, any field with an 6645 // empty value appearing in NullFields will be sent to the server as 6646 // null. It is an error if a field in this list has a non-empty value. 6647 // This may be used to include null fields in Patch requests. 6648 NullFields []string `json:"-"` 6649} 6650 6651func (s *GoogleAudienceGroup) MarshalJSON() ([]byte, error) { 6652 type NoMethod GoogleAudienceGroup 6653 raw := NoMethod(*s) 6654 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6655} 6656 6657// GoogleAudienceTargetingSetting: Details of Google audience targeting 6658// setting. 6659type GoogleAudienceTargetingSetting struct { 6660 // GoogleAudienceId: Required. Google audience id of the Google audience 6661 // targeting setting. 6662 // This id is google_audience_id. 6663 GoogleAudienceId int64 `json:"googleAudienceId,omitempty,string"` 6664 6665 // ForceSendFields is a list of field names (e.g. "GoogleAudienceId") to 6666 // unconditionally include in API requests. By default, fields with 6667 // empty values are omitted from API requests. However, any non-pointer, 6668 // non-interface field appearing in ForceSendFields will be sent to the 6669 // server regardless of whether the field is empty or not. This may be 6670 // used to include empty fields in Patch requests. 6671 ForceSendFields []string `json:"-"` 6672 6673 // NullFields is a list of field names (e.g. "GoogleAudienceId") to 6674 // include in API requests with the JSON null value. By default, fields 6675 // with empty values are omitted from API requests. However, any field 6676 // with an empty value appearing in NullFields will be sent to the 6677 // server as null. It is an error if a field in this list has a 6678 // non-empty value. This may be used to include null fields in Patch 6679 // requests. 6680 NullFields []string `json:"-"` 6681} 6682 6683func (s *GoogleAudienceTargetingSetting) MarshalJSON() ([]byte, error) { 6684 type NoMethod GoogleAudienceTargetingSetting 6685 raw := NoMethod(*s) 6686 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6687} 6688 6689// GoogleBytestreamMedia: Media resource. 6690type GoogleBytestreamMedia struct { 6691 // ResourceName: Name of the media resource. 6692 ResourceName string `json:"resourceName,omitempty"` 6693 6694 // ServerResponse contains the HTTP response code and headers from the 6695 // server. 6696 googleapi.ServerResponse `json:"-"` 6697 6698 // ForceSendFields is a list of field names (e.g. "ResourceName") to 6699 // unconditionally include in API requests. By default, fields with 6700 // empty values are omitted from API requests. However, any non-pointer, 6701 // non-interface field appearing in ForceSendFields will be sent to the 6702 // server regardless of whether the field is empty or not. This may be 6703 // used to include empty fields in Patch requests. 6704 ForceSendFields []string `json:"-"` 6705 6706 // NullFields is a list of field names (e.g. "ResourceName") to include 6707 // in API requests with the JSON null value. By default, fields with 6708 // empty values are omitted from API requests. However, any field with 6709 // an empty value appearing in NullFields will be sent to the server as 6710 // null. It is an error if a field in this list has a non-empty value. 6711 // This may be used to include null fields in Patch requests. 6712 NullFields []string `json:"-"` 6713} 6714 6715func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte, error) { 6716 type NoMethod GoogleBytestreamMedia 6717 raw := NoMethod(*s) 6718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6719} 6720 6721// HouseholdIncomeAssignedTargetingOptionDetails: Details for assigned 6722// household income targeting option. This will be 6723// populated in the details field of an AssignedTargetingOption 6724// when 6725// targeting_type is 6726// `TARGETING_TYPE_HOUSEHOLD_INCOME`. 6727type HouseholdIncomeAssignedTargetingOptionDetails struct { 6728 // HouseholdIncome: Output only. The household income of the audience. 6729 // 6730 // Possible values: 6731 // "HOUSEHOLD_INCOME_UNSPECIFIED" - Default value when household 6732 // income is not specified in this version. This 6733 // enum is a placeholder for default value and does not represent a 6734 // real 6735 // household income option. 6736 // "HOUSEHOLD_INCOME_UNKNOWN" - The household income of the audience 6737 // is unknown. 6738 // "HOUSEHOLD_INCOME_LOWER_50_PERCENT" - The audience is in the lower 6739 // 50% of U.S. household incomes. 6740 // "HOUSEHOLD_INCOME_TOP_41_TO_50_PERCENT" - The audience is in the 6741 // top 41-50% of U.S. household incomes. 6742 // "HOUSEHOLD_INCOME_TOP_31_TO_40_PERCENT" - The audience is in the 6743 // top 31-40% of U.S. household incomes. 6744 // "HOUSEHOLD_INCOME_TOP_21_TO_30_PERCENT" - The audience is in the 6745 // top 21-30% of U.S. household incomes. 6746 // "HOUSEHOLD_INCOME_TOP_11_TO_20_PERCENT" - The audience is in the 6747 // top 11-20% of U.S. household incomes. 6748 // "HOUSEHOLD_INCOME_TOP_10_PERCENT" - The audience is in the top 10% 6749 // of U.S. household incomes. 6750 HouseholdIncome string `json:"householdIncome,omitempty"` 6751 6752 // TargetingOptionId: Required. The targeting_option_id of 6753 // a 6754 // TargetingOption of type `TARGETING_TYPE_HOUSEHOLD_INCOME`. 6755 TargetingOptionId string `json:"targetingOptionId,omitempty"` 6756 6757 // ForceSendFields is a list of field names (e.g. "HouseholdIncome") to 6758 // unconditionally include in API requests. By default, fields with 6759 // empty values are omitted from API requests. However, any non-pointer, 6760 // non-interface field appearing in ForceSendFields will be sent to the 6761 // server regardless of whether the field is empty or not. This may be 6762 // used to include empty fields in Patch requests. 6763 ForceSendFields []string `json:"-"` 6764 6765 // NullFields is a list of field names (e.g. "HouseholdIncome") to 6766 // include in API requests with the JSON null value. By default, fields 6767 // with empty values are omitted from API requests. However, any field 6768 // with an empty value appearing in NullFields will be sent to the 6769 // server as null. It is an error if a field in this list has a 6770 // non-empty value. This may be used to include null fields in Patch 6771 // requests. 6772 NullFields []string `json:"-"` 6773} 6774 6775func (s *HouseholdIncomeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6776 type NoMethod HouseholdIncomeAssignedTargetingOptionDetails 6777 raw := NoMethod(*s) 6778 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6779} 6780 6781// HouseholdIncomeTargetingOptionDetails: Represents a targetable 6782// household income. This will be populated in 6783// the 6784// household_income_details field of 6785// a TargetingOption when targeting_type 6786// is 6787// `TARGETING_TYPE_HOUSEHOLD_INCOME`. 6788type HouseholdIncomeTargetingOptionDetails struct { 6789 // HouseholdIncome: Output only. The household income of an audience. 6790 // 6791 // Possible values: 6792 // "HOUSEHOLD_INCOME_UNSPECIFIED" - Default value when household 6793 // income is not specified in this version. This 6794 // enum is a placeholder for default value and does not represent a 6795 // real 6796 // household income option. 6797 // "HOUSEHOLD_INCOME_UNKNOWN" - The household income of the audience 6798 // is unknown. 6799 // "HOUSEHOLD_INCOME_LOWER_50_PERCENT" - The audience is in the lower 6800 // 50% of U.S. household incomes. 6801 // "HOUSEHOLD_INCOME_TOP_41_TO_50_PERCENT" - The audience is in the 6802 // top 41-50% of U.S. household incomes. 6803 // "HOUSEHOLD_INCOME_TOP_31_TO_40_PERCENT" - The audience is in the 6804 // top 31-40% of U.S. household incomes. 6805 // "HOUSEHOLD_INCOME_TOP_21_TO_30_PERCENT" - The audience is in the 6806 // top 21-30% of U.S. household incomes. 6807 // "HOUSEHOLD_INCOME_TOP_11_TO_20_PERCENT" - The audience is in the 6808 // top 11-20% of U.S. household incomes. 6809 // "HOUSEHOLD_INCOME_TOP_10_PERCENT" - The audience is in the top 10% 6810 // of U.S. household incomes. 6811 HouseholdIncome string `json:"householdIncome,omitempty"` 6812 6813 // ForceSendFields is a list of field names (e.g. "HouseholdIncome") to 6814 // unconditionally include in API requests. By default, fields with 6815 // empty values are omitted from API requests. However, any non-pointer, 6816 // non-interface field appearing in ForceSendFields will be sent to the 6817 // server regardless of whether the field is empty or not. This may be 6818 // used to include empty fields in Patch requests. 6819 ForceSendFields []string `json:"-"` 6820 6821 // NullFields is a list of field names (e.g. "HouseholdIncome") to 6822 // include in API requests with the JSON null value. By default, fields 6823 // with empty values are omitted from API requests. However, any field 6824 // with an empty value appearing in NullFields will be sent to the 6825 // server as null. It is an error if a field in this list has a 6826 // non-empty value. This may be used to include null fields in Patch 6827 // requests. 6828 NullFields []string `json:"-"` 6829} 6830 6831func (s *HouseholdIncomeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 6832 type NoMethod HouseholdIncomeTargetingOptionDetails 6833 raw := NoMethod(*s) 6834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6835} 6836 6837// IdFilter: A filtering option that filters entities by their entity 6838// IDs. 6839type IdFilter struct { 6840 // AdGroupAdIds: TrueView Ads to download by ID. All IDs must belong to 6841 // the same 6842 // Advertiser or 6843 // Partner specified in 6844 // CreateSdfDownloadTaskRequest. 6845 AdGroupAdIds googleapi.Int64s `json:"adGroupAdIds,omitempty"` 6846 6847 // AdGroupIds: TrueView Ad Groups to download by ID. All IDs must belong 6848 // to the same 6849 // Advertiser or 6850 // Partner specified in 6851 // CreateSdfDownloadTaskRequest. 6852 AdGroupIds googleapi.Int64s `json:"adGroupIds,omitempty"` 6853 6854 // CampaignIds: Campaigns to download by ID. All IDs must belong to the 6855 // same 6856 // Advertiser or 6857 // Partner specified in 6858 // CreateSdfDownloadTaskRequest. 6859 CampaignIds googleapi.Int64s `json:"campaignIds,omitempty"` 6860 6861 // InsertionOrderIds: Insertion Orders to download by ID. All IDs must 6862 // belong to the same 6863 // Advertiser or 6864 // Partner specified in 6865 // CreateSdfDownloadTaskRequest. 6866 InsertionOrderIds googleapi.Int64s `json:"insertionOrderIds,omitempty"` 6867 6868 // LineItemIds: Line Items to download by ID. All IDs must belong to the 6869 // same 6870 // Advertiser or 6871 // Partner specified in 6872 // CreateSdfDownloadTaskRequest. 6873 LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"` 6874 6875 // MediaProductIds: Media Products to download by ID. All IDs must 6876 // belong to the same 6877 // Advertiser or 6878 // Partner specified in 6879 // CreateSdfDownloadTaskRequest. 6880 MediaProductIds googleapi.Int64s `json:"mediaProductIds,omitempty"` 6881 6882 // ForceSendFields is a list of field names (e.g. "AdGroupAdIds") to 6883 // unconditionally include in API requests. By default, fields with 6884 // empty values are omitted from API requests. However, any non-pointer, 6885 // non-interface field appearing in ForceSendFields will be sent to the 6886 // server regardless of whether the field is empty or not. This may be 6887 // used to include empty fields in Patch requests. 6888 ForceSendFields []string `json:"-"` 6889 6890 // NullFields is a list of field names (e.g. "AdGroupAdIds") to include 6891 // in API requests with the JSON null value. By default, fields with 6892 // empty values are omitted from API requests. However, any field with 6893 // an empty value appearing in NullFields will be sent to the server as 6894 // null. It is an error if a field in this list has a non-empty value. 6895 // This may be used to include null fields in Patch requests. 6896 NullFields []string `json:"-"` 6897} 6898 6899func (s *IdFilter) MarshalJSON() ([]byte, error) { 6900 type NoMethod IdFilter 6901 raw := NoMethod(*s) 6902 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6903} 6904 6905// InsertionOrder: A single insertion order. 6906type InsertionOrder struct { 6907 // AdvertiserId: Output only. The unique ID of the advertiser the 6908 // insertion order belongs to. 6909 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 6910 6911 // BidStrategy: Optional. The bidding strategy of the insertion order. 6912 // By default, 6913 // fixed_bid is set. 6914 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"` 6915 6916 // Budget: Required. The budget allocation settings of the insertion 6917 // order. 6918 Budget *InsertionOrderBudget `json:"budget,omitempty"` 6919 6920 // CampaignId: Required. Immutable. The unique ID of the campaign that 6921 // the insertion order belongs to. 6922 CampaignId int64 `json:"campaignId,omitempty,string"` 6923 6924 // DisplayName: Required. The display name of the insertion order. 6925 // 6926 // Must be UTF-8 encoded with a maximum size of 240 bytes. 6927 DisplayName string `json:"displayName,omitempty"` 6928 6929 // EntityStatus: Required. Controls whether or not the insertion order 6930 // can spend its budget 6931 // and bid on inventory. 6932 // 6933 // * For 6934 // CreateInsertionOrder method, 6935 // only `ENTITY_STATUS_DRAFT` is allowed. To activate an insertion 6936 // order, use 6937 // UpdateInsertionOrder method 6938 // and update the status to `ENTITY_STATUS_ACTIVE` after creation. 6939 // * An insertion order cannot be changed back to `ENTITY_STATUS_DRAFT` 6940 // status 6941 // from any other status. 6942 // * An insertion order cannot be set to `ENTITY_STATUS_ACTIVE` if its 6943 // parent 6944 // campaign is not active. 6945 // 6946 // Possible values: 6947 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 6948 // specified or is unknown in this version. 6949 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 6950 // budget. 6951 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 6952 // budget spending are disabled. An 6953 // entity can be deleted after archived. Deleted entities cannot be 6954 // retrieved. 6955 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 6956 // budget spending are disabled. 6957 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 6958 // the entity. 6959 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 6960 // for deletion. 6961 EntityStatus string `json:"entityStatus,omitempty"` 6962 6963 // FrequencyCap: Required. The frequency capping setting of the 6964 // insertion order. 6965 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"` 6966 6967 // InsertionOrderId: Output only. The unique ID of the insertion order. 6968 // Assigned by the system. 6969 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"` 6970 6971 // IntegrationDetails: Additional integration details of the insertion 6972 // order. 6973 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"` 6974 6975 // Name: Output only. The resource name of the insertion order. 6976 Name string `json:"name,omitempty"` 6977 6978 // Pacing: Required. The budget spending speed setting of the insertion 6979 // order. 6980 Pacing *Pacing `json:"pacing,omitempty"` 6981 6982 // PartnerCosts: The partner costs associated with the insertion 6983 // order. 6984 // 6985 // If absent or empty in 6986 // CreateInsertionOrder 6987 // method, the newly created insertion order will inherit partner costs 6988 // from 6989 // the partner settings. 6990 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"` 6991 6992 // PerformanceGoal: Required. Performance goal of the insertion order. 6993 PerformanceGoal *PerformanceGoal `json:"performanceGoal,omitempty"` 6994 6995 // UpdateTime: Output only. The timestamp when the insertion order was 6996 // last updated. 6997 // Assigned by the system. 6998 UpdateTime string `json:"updateTime,omitempty"` 6999 7000 // ServerResponse contains the HTTP response code and headers from the 7001 // server. 7002 googleapi.ServerResponse `json:"-"` 7003 7004 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 7005 // unconditionally include in API requests. By default, fields with 7006 // empty values are omitted from API requests. However, any non-pointer, 7007 // non-interface field appearing in ForceSendFields will be sent to the 7008 // server regardless of whether the field is empty or not. This may be 7009 // used to include empty fields in Patch requests. 7010 ForceSendFields []string `json:"-"` 7011 7012 // NullFields is a list of field names (e.g. "AdvertiserId") to include 7013 // in API requests with the JSON null value. By default, fields with 7014 // empty values are omitted from API requests. However, any field with 7015 // an empty value appearing in NullFields will be sent to the server as 7016 // null. It is an error if a field in this list has a non-empty value. 7017 // This may be used to include null fields in Patch requests. 7018 NullFields []string `json:"-"` 7019} 7020 7021func (s *InsertionOrder) MarshalJSON() ([]byte, error) { 7022 type NoMethod InsertionOrder 7023 raw := NoMethod(*s) 7024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7025} 7026 7027// InsertionOrderBudget: Settings that control how insertion order 7028// budget is allocated. 7029type InsertionOrderBudget struct { 7030 // AutomationType: The type of automation used to manage bid and budget 7031 // for 7032 // the insertion order. 7033 // 7034 // If this field is unspecified in creation, the value defaults 7035 // to 7036 // `INSERTION_ORDER_AUTOMATION_TYPE_NONE`. 7037 // 7038 // Possible values: 7039 // "INSERTION_ORDER_AUTOMATION_TYPE_UNSPECIFIED" - Insertion order 7040 // automation option is not specified or is unknown in 7041 // this version. 7042 // "INSERTION_ORDER_AUTOMATION_TYPE_BUDGET" - Automatic budget 7043 // allocation. Allow the system to automatically shift 7044 // budget to owning line items to optimize performance defined 7045 // by 7046 // performance_goal. No automation 7047 // on bid settings. 7048 // "INSERTION_ORDER_AUTOMATION_TYPE_NONE" - No automation of bid or 7049 // budget on insertion order level. 7050 // Bid and budget must be manually configured at the line item level. 7051 // "INSERTION_ORDER_AUTOMATION_TYPE_BID_BUDGET" - Allow the system to 7052 // automatically adjust bids and shift budget to 7053 // owning line items to optimize performance defined 7054 // by 7055 // performance_goal. 7056 AutomationType string `json:"automationType,omitempty"` 7057 7058 // BudgetSegments: Required. The list of budget segments. Use a budget 7059 // segment to specify 7060 // a specific budget for a given period of time an insertion order is 7061 // running. 7062 BudgetSegments []*InsertionOrderBudgetSegment `json:"budgetSegments,omitempty"` 7063 7064 // BudgetUnit: Required. Immutable. The budget unit specifies whether 7065 // the budget is currency based or 7066 // impression based. 7067 // 7068 // Possible values: 7069 // "BUDGET_UNIT_UNSPECIFIED" - Type value is not specified or is 7070 // unknown in this version. 7071 // "BUDGET_UNIT_CURRENCY" - Budgeting in currency amounts. 7072 // "BUDGET_UNIT_IMPRESSIONS" - Budgeting in impression amounts. 7073 BudgetUnit string `json:"budgetUnit,omitempty"` 7074 7075 // ForceSendFields is a list of field names (e.g. "AutomationType") to 7076 // unconditionally include in API requests. By default, fields with 7077 // empty values are omitted from API requests. However, any non-pointer, 7078 // non-interface field appearing in ForceSendFields will be sent to the 7079 // server regardless of whether the field is empty or not. This may be 7080 // used to include empty fields in Patch requests. 7081 ForceSendFields []string `json:"-"` 7082 7083 // NullFields is a list of field names (e.g. "AutomationType") to 7084 // include in API requests with the JSON null value. By default, fields 7085 // with empty values are omitted from API requests. However, any field 7086 // with an empty value appearing in NullFields will be sent to the 7087 // server as null. It is an error if a field in this list has a 7088 // non-empty value. This may be used to include null fields in Patch 7089 // requests. 7090 NullFields []string `json:"-"` 7091} 7092 7093func (s *InsertionOrderBudget) MarshalJSON() ([]byte, error) { 7094 type NoMethod InsertionOrderBudget 7095 raw := NoMethod(*s) 7096 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7097} 7098 7099// InsertionOrderBudgetSegment: Settings that control the budget of a 7100// single budget segment. 7101type InsertionOrderBudgetSegment struct { 7102 // BudgetAmountMicros: Required. The budget amount the insertion order 7103 // will spend for the given 7104 // date_range. 7105 // The amount is in micros. Must be greater than 0. For example, 7106 // 500000000 7107 // represents 500 standard units of the currency. 7108 BudgetAmountMicros int64 `json:"budgetAmountMicros,omitempty,string"` 7109 7110 // DateRange: Required. The start and end date settings of the budget 7111 // segment. They are resolved 7112 // relative to the parent advertiser's time zone. 7113 // 7114 // * When creating a new budget segment, both `start_date` and 7115 // `end_date` 7116 // must be in the future. 7117 // * An existing budget segment with a `start_date` in the past has a 7118 // mutable 7119 // `end_date` but an immutable `start_date`. 7120 // * `end_date` must be the `start_date` or later, both before the year 7121 // 2037. 7122 DateRange *DateRange `json:"dateRange,omitempty"` 7123 7124 // Description: The budget segment description. It can be used to enter 7125 // Purchase Order 7126 // information for each budget segment and have that information printed 7127 // on 7128 // the invoices. 7129 // 7130 // Must be UTF-8 encoded with a length of no more than 80 characters. 7131 Description string `json:"description,omitempty"` 7132 7133 // ForceSendFields is a list of field names (e.g. "BudgetAmountMicros") 7134 // to unconditionally include in API requests. By default, fields with 7135 // empty values are omitted from API requests. However, any non-pointer, 7136 // non-interface field appearing in ForceSendFields will be sent to the 7137 // server regardless of whether the field is empty or not. This may be 7138 // used to include empty fields in Patch requests. 7139 ForceSendFields []string `json:"-"` 7140 7141 // NullFields is a list of field names (e.g. "BudgetAmountMicros") to 7142 // include in API requests with the JSON null value. By default, fields 7143 // with empty values are omitted from API requests. However, any field 7144 // with an empty value appearing in NullFields will be sent to the 7145 // server as null. It is an error if a field in this list has a 7146 // non-empty value. This may be used to include null fields in Patch 7147 // requests. 7148 NullFields []string `json:"-"` 7149} 7150 7151func (s *InsertionOrderBudgetSegment) MarshalJSON() ([]byte, error) { 7152 type NoMethod InsertionOrderBudgetSegment 7153 raw := NoMethod(*s) 7154 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7155} 7156 7157// IntegralAdScience: Details of Integral Ad Science settings. 7158type IntegralAdScience struct { 7159 // DisplayViewability: Display Viewability section (applicable to 7160 // display line items only). 7161 // 7162 // Possible values: 7163 // "PERFORMANCE_VIEWABILITY_UNSPECIFIED" - This enum is only a 7164 // placeholder and it doesn't specify any display 7165 // viewability options. 7166 // "PERFORMANCE_VIEWABILITY_40" - Target 40% Viewability or Higher. 7167 // "PERFORMANCE_VIEWABILITY_50" - Target 50% Viewability or Higher. 7168 // "PERFORMANCE_VIEWABILITY_60" - Target 60% Viewability or Higher. 7169 // "PERFORMANCE_VIEWABILITY_70" - Target 70% Viewability or Higher. 7170 DisplayViewability string `json:"displayViewability,omitempty"` 7171 7172 // ExcludeUnrateable: Brand Safety - **Unrateable**. 7173 ExcludeUnrateable bool `json:"excludeUnrateable,omitempty"` 7174 7175 // ExcludedAdFraudRisk: Ad Fraud settings. 7176 // 7177 // Possible values: 7178 // "SUSPICIOUS_ACTIVITY_UNSPECIFIED" - This enum is only a placeholder 7179 // and it doesn't specify any ad fraud 7180 // prevention options. 7181 // "SUSPICIOUS_ACTIVITY_HR" - Ad Fraud - Exclude High Risk. 7182 // "SUSPICIOUS_ACTIVITY_HMR" - Ad Fraud - Exclude High and Moderate 7183 // Risk. 7184 ExcludedAdFraudRisk string `json:"excludedAdFraudRisk,omitempty"` 7185 7186 // ExcludedAdultRisk: Brand Safety - **Adult content**. 7187 // 7188 // Possible values: 7189 // "ADULT_UNSPECIFIED" - This enum is only a placeholder and it 7190 // doesn't specify any adult options. 7191 // "ADULT_HR" - Adult - Exclude High Risk. 7192 // "ADULT_HMR" - Adult - Exclude High and Moderate Risk. 7193 ExcludedAdultRisk string `json:"excludedAdultRisk,omitempty"` 7194 7195 // ExcludedAlcoholRisk: Brand Safety - **Alcohol**. 7196 // 7197 // Possible values: 7198 // "ALCOHOL_UNSPECIFIED" - This enum is only a placeholder and it 7199 // doesn't specify any alcohol 7200 // options. 7201 // "ALCOHOL_HR" - Alcohol - Exclude High Risk. 7202 // "ALCOHOL_HMR" - Alcohol - Exclude High and Moderate Risk. 7203 ExcludedAlcoholRisk string `json:"excludedAlcoholRisk,omitempty"` 7204 7205 // ExcludedDrugsRisk: Brand Safety - **Drugs**. 7206 // 7207 // Possible values: 7208 // "DRUGS_UNSPECIFIED" - This enum is only a placeholder and it 7209 // doesn't specify any drugs options. 7210 // "DRUGS_HR" - Drugs - Exclude High Risk. 7211 // "DRUGS_HMR" - Drugs - Exclude High and Moderate Risk. 7212 ExcludedDrugsRisk string `json:"excludedDrugsRisk,omitempty"` 7213 7214 // ExcludedGamblingRisk: Brand Safety - **Gambling**. 7215 // 7216 // Possible values: 7217 // "GAMBLING_UNSPECIFIED" - This enum is only a placeholder and it 7218 // doesn't specify any gambling 7219 // options. 7220 // "GAMBLING_HR" - Gambling - Exclude High Risk. 7221 // "GAMBLING_HMR" - Gambling - Exclude High and Moderate Risk. 7222 ExcludedGamblingRisk string `json:"excludedGamblingRisk,omitempty"` 7223 7224 // ExcludedHateSpeechRisk: Brand Safety - **Hate speech**. 7225 // 7226 // Possible values: 7227 // "HATE_SPEECH_UNSPECIFIED" - This enum is only a placeholder and it 7228 // doesn't specify any hate speech 7229 // options. 7230 // "HATE_SPEECH_HR" - Hate Speech - Exclude High Risk. 7231 // "HATE_SPEECH_HMR" - Hate Speech - Exclude High and Moderate Risk. 7232 ExcludedHateSpeechRisk string `json:"excludedHateSpeechRisk,omitempty"` 7233 7234 // ExcludedIllegalDownloadsRisk: Brand Safety - **Illegal downloads**. 7235 // 7236 // Possible values: 7237 // "ILLEGAL_DOWNLOADS_UNSPECIFIED" - This enum is only a placeholder 7238 // and it doesn't specify any illegal 7239 // downloads options. 7240 // "ILLEGAL_DOWNLOADS_HR" - Illegal Downloads - Exclude High Risk. 7241 // "ILLEGAL_DOWNLOADS_HMR" - Illegal Downloads - Exclude High and 7242 // Moderate Risk. 7243 ExcludedIllegalDownloadsRisk string `json:"excludedIllegalDownloadsRisk,omitempty"` 7244 7245 // ExcludedOffensiveLanguageRisk: Brand Safety - **Offensive language**. 7246 // 7247 // Possible values: 7248 // "OFFENSIVE_LANGUAGE_UNSPECIFIED" - This enum is only a placeholder 7249 // and it doesn't specify any language 7250 // options. 7251 // "OFFENSIVE_LANGUAGE_HR" - Offensive Language - Exclude High Risk. 7252 // "OFFENSIVE_LANGUAGE_HMR" - Offensive Language - Exclude High and 7253 // Moderate Risk. 7254 ExcludedOffensiveLanguageRisk string `json:"excludedOffensiveLanguageRisk,omitempty"` 7255 7256 // ExcludedViolenceRisk: Brand Safety - **Violence**. 7257 // 7258 // Possible values: 7259 // "VIOLENCE_UNSPECIFIED" - This enum is only a placeholder and it 7260 // doesn't specify any violence 7261 // options. 7262 // "VIOLENCE_HR" - Violence - Exclude High Risk. 7263 // "VIOLENCE_HMR" - Violence - Exclude High and Moderate Risk. 7264 ExcludedViolenceRisk string `json:"excludedViolenceRisk,omitempty"` 7265 7266 // TraqScoreOption: True advertising quality (applicable to Display line 7267 // items only). 7268 // 7269 // Possible values: 7270 // "TRAQ_UNSPECIFIED" - This enum is only a placeholder and it doesn't 7271 // specify any true 7272 // advertising quality scores. 7273 // "TRAQ_250" - TRAQ score 250-1000. 7274 // "TRAQ_500" - TRAQ score 500-1000. 7275 // "TRAQ_600" - TRAQ score 600-1000. 7276 // "TRAQ_700" - TRAQ score 700-1000. 7277 // "TRAQ_750" - TRAQ score 750-1000. 7278 // "TRAQ_875" - TRAQ score 875-1000. 7279 // "TRAQ_1000" - TRAQ score 1000. 7280 TraqScoreOption string `json:"traqScoreOption,omitempty"` 7281 7282 // VideoViewability: Video Viewability Section (applicable to video line 7283 // items only). 7284 // 7285 // Possible values: 7286 // "VIDEO_VIEWABILITY_UNSPECIFIED" - This enum is only a placeholder 7287 // and it doesn't specify any video 7288 // viewability options. 7289 // "VIDEO_VIEWABILITY_40" - 40%+ in view (IAB video viewability 7290 // standard). 7291 // "VIDEO_VIEWABILITY_50" - 50%+ in view (IAB video viewability 7292 // standard). 7293 // "VIDEO_VIEWABILITY_60" - 60%+ in view (IAB video viewability 7294 // standard). 7295 // "VIDEO_VIEWABILITY_70" - 70%+ in view (IAB video viewability 7296 // standard). 7297 VideoViewability string `json:"videoViewability,omitempty"` 7298 7299 // ForceSendFields is a list of field names (e.g. "DisplayViewability") 7300 // to unconditionally include in API requests. By default, fields with 7301 // empty values are omitted from API requests. However, any non-pointer, 7302 // non-interface field appearing in ForceSendFields will be sent to the 7303 // server regardless of whether the field is empty or not. This may be 7304 // used to include empty fields in Patch requests. 7305 ForceSendFields []string `json:"-"` 7306 7307 // NullFields is a list of field names (e.g. "DisplayViewability") to 7308 // include in API requests with the JSON null value. By default, fields 7309 // with empty values are omitted from API requests. However, any field 7310 // with an empty value appearing in NullFields will be sent to the 7311 // server as null. It is an error if a field in this list has a 7312 // non-empty value. This may be used to include null fields in Patch 7313 // requests. 7314 NullFields []string `json:"-"` 7315} 7316 7317func (s *IntegralAdScience) MarshalJSON() ([]byte, error) { 7318 type NoMethod IntegralAdScience 7319 raw := NoMethod(*s) 7320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7321} 7322 7323// IntegrationDetails: Integration details of an entry. 7324type IntegrationDetails struct { 7325 // Details: Additional details of the entry in string format. 7326 // 7327 // Must be UTF-8 encoded with a length of no more than 1000 characters. 7328 Details string `json:"details,omitempty"` 7329 7330 // IntegrationCode: An external identifier to be associated with the 7331 // entry. 7332 // The integration code will show up together with the entry in 7333 // many 7334 // places in the system, for example, reporting. 7335 // 7336 // Must be UTF-8 encoded with a length of no more than 500 characters. 7337 IntegrationCode string `json:"integrationCode,omitempty"` 7338 7339 // ForceSendFields is a list of field names (e.g. "Details") to 7340 // unconditionally include in API requests. By default, fields with 7341 // empty values are omitted from API requests. However, any non-pointer, 7342 // non-interface field appearing in ForceSendFields will be sent to the 7343 // server regardless of whether the field is empty or not. This may be 7344 // used to include empty fields in Patch requests. 7345 ForceSendFields []string `json:"-"` 7346 7347 // NullFields is a list of field names (e.g. "Details") to include in 7348 // API requests with the JSON null value. By default, fields with empty 7349 // values are omitted from API requests. However, any field with an 7350 // empty value appearing in NullFields will be sent to the server as 7351 // null. It is an error if a field in this list has a non-empty value. 7352 // This may be used to include null fields in Patch requests. 7353 NullFields []string `json:"-"` 7354} 7355 7356func (s *IntegrationDetails) MarshalJSON() ([]byte, error) { 7357 type NoMethod IntegrationDetails 7358 raw := NoMethod(*s) 7359 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7360} 7361 7362// InventorySource: An inventory source. 7363type InventorySource struct { 7364 // Commitment: Whether the inventory source has a guaranteed or 7365 // non-guaranteed delivery. 7366 // 7367 // Possible values: 7368 // "INVENTORY_SOURCE_COMMITMENT_UNSPECIFIED" - The commitment is not 7369 // specified or is unknown in this version. 7370 // "INVENTORY_SOURCE_COMMITMENT_GUARANTEED" - The commitment is 7371 // guaranteed delivery. 7372 // "INVENTORY_SOURCE_COMMITMENT_NON_GUARANTEED" - The commitment is 7373 // non-guaranteed delivery. 7374 Commitment string `json:"commitment,omitempty"` 7375 7376 // CreativeConfigs: The creative requirements of the inventory 7377 // source. 7378 // 7379 // Not applicable for auction packages. 7380 CreativeConfigs []*CreativeConfig `json:"creativeConfigs,omitempty"` 7381 7382 // DealId: The ID in the exchange space that uniquely identifies the 7383 // inventory source. 7384 // 7385 // Must be unique across buyers within each exchange but not 7386 // necessarily 7387 // unique across exchanges. 7388 DealId string `json:"dealId,omitempty"` 7389 7390 // DeliveryMethod: The delivery method of the inventory source. 7391 // 7392 // * For non-guaranteed inventory sources, the only acceptable value 7393 // is 7394 // `INVENTORY_SOURCE_DELIVERY_METHOD_PROGRAMMATIC`. 7395 // * For guaranteed inventory sources, acceptable values 7396 // are 7397 // `INVENTORY_SOURCE_DELIVERY_METHOD_TAG` 7398 // and 7399 // `INVENTORY_SOURCE_DELIVERY_METHOD_PROGRAMMATIC`. 7400 // 7401 // Possible values: 7402 // "INVENTORY_SOURCE_DELIVERY_METHOD_UNSPECIFIED" - The delivery 7403 // method is not specified or is unknown in this version. 7404 // "INVENTORY_SOURCE_DELIVERY_METHOD_PROGRAMMATIC" - The delivery 7405 // method is programmatic. 7406 // "INVENTORY_SOURCE_DELIVERY_METHOD_TAG" - The delivery method is 7407 // tag. 7408 DeliveryMethod string `json:"deliveryMethod,omitempty"` 7409 7410 // DisplayName: The display name of the inventory source. 7411 // 7412 // Must be UTF-8 encoded with a maximum size of 240 bytes. 7413 DisplayName string `json:"displayName,omitempty"` 7414 7415 // Exchange: The exchange to which the inventory source belongs. 7416 // 7417 // Possible values: 7418 // "EXCHANGE_UNSPECIFIED" - Exchange is not specified or is unknown in 7419 // this version. 7420 // "EXCHANGE_GOOGLE_AD_MANAGER" - Google Ad Manager. 7421 // "EXCHANGE_APPNEXUS" - AppNexus. 7422 // "EXCHANGE_BRIGHTROLL" - BrightRoll Exchange for Video from Yahoo!. 7423 // "EXCHANGE_ADFORM" - Adform. 7424 // "EXCHANGE_ADMETA" - Admeta. 7425 // "EXCHANGE_ADMIXER" - Admixer. 7426 // "EXCHANGE_ADSMOGO" - AdsMogo. 7427 // "EXCHANGE_ADSWIZZ" - AdsWizz. 7428 // "EXCHANGE_BIDSWITCH" - BidSwitch. 7429 // "EXCHANGE_BRIGHTROLL_DISPLAY" - BrightRoll Exchange for Display 7430 // from Yahoo!. 7431 // "EXCHANGE_CADREON" - Cadreon. 7432 // "EXCHANGE_DAILYMOTION" - Dailymotion. 7433 // "EXCHANGE_FIVE" - Five. 7434 // "EXCHANGE_FLUCT" - Fluct. 7435 // "EXCHANGE_FREEWHEEL" - FreeWheel SSP. 7436 // "EXCHANGE_GENIEE" - Geniee. 7437 // "EXCHANGE_GUMGUM" - GumGum. 7438 // "EXCHANGE_IMOBILE" - i-mobile. 7439 // "EXCHANGE_IBILLBOARD" - iBILLBOARD. 7440 // "EXCHANGE_IMPROVE_DIGITAL" - Improve Digital. 7441 // "EXCHANGE_INDEX" - Index Exchange. 7442 // "EXCHANGE_KARGO" - Kargo. 7443 // "EXCHANGE_MICROAD" - MicroAd. 7444 // "EXCHANGE_MOPUB" - MoPub. 7445 // "EXCHANGE_NEND" - Nend. 7446 // "EXCHANGE_ONE_BY_AOL_DISPLAY" - ONE by AOL: Display Market Place. 7447 // "EXCHANGE_ONE_BY_AOL_MOBILE" - ONE by AOL: Mobile. 7448 // "EXCHANGE_ONE_BY_AOL_VIDEO" - ONE by AOL: Video. 7449 // "EXCHANGE_OOYALA" - Ooyala. 7450 // "EXCHANGE_OPENX" - OpenX. 7451 // "EXCHANGE_PERMODO" - Permodo. 7452 // "EXCHANGE_PLATFORMONE" - Platform One. 7453 // "EXCHANGE_PLATFORMID" - PlatformId. 7454 // "EXCHANGE_PUBMATIC" - PubMatic. 7455 // "EXCHANGE_PULSEPOINT" - PulsePoint. 7456 // "EXCHANGE_REVENUEMAX" - RevenueMax. 7457 // "EXCHANGE_RUBICON" - Rubicon. 7458 // "EXCHANGE_SMARTCLIP" - SmartClip. 7459 // "EXCHANGE_SMARTRTB" - SmartRTB+. 7460 // "EXCHANGE_SMARTSTREAMTV" - SmartstreamTv. 7461 // "EXCHANGE_SOVRN" - Sovrn. 7462 // "EXCHANGE_SPOTXCHANGE" - SpotXchange. 7463 // "EXCHANGE_STROER" - Ströer SSP. 7464 // "EXCHANGE_TEADSTV" - TeadsTv. 7465 // "EXCHANGE_TELARIA" - Telaria. 7466 // "EXCHANGE_TVN" - TVN. 7467 // "EXCHANGE_UNITED" - United. 7468 // "EXCHANGE_YIELDLAB" - Yieldlab. 7469 // "EXCHANGE_YIELDMO" - Yieldmo. 7470 // "EXCHANGE_TRIPLELIFT" - TripleLift 7471 // "EXCHANGE_TABOOLA" - Taboola 7472 // "EXCHANGE_INMOBI" - InMobi. 7473 // "EXCHANGE_SMAATO" - Smaato 7474 // "EXCHANGE_AJA" - Aja. 7475 // "EXCHANGE_NEXSTAR_DIGITAL" - Nexstar Digital. 7476 // "EXCHANGE_WAZE" - Waze. 7477 Exchange string `json:"exchange,omitempty"` 7478 7479 // InventorySourceId: Output only. The unique ID of the inventory 7480 // source. Assigned by the system. 7481 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"` 7482 7483 // InventorySourceType: Denotes the type of the inventory source. 7484 // 7485 // Possible values: 7486 // "INVENTORY_SOURCE_TYPE_UNSPECIFIED" - The inventory source type is 7487 // not specified or is unknown in this version. 7488 // "INVENTORY_SOURCE_TYPE_PRIVATE" - Private inventory source. 7489 // "INVENTORY_SOURCE_TYPE_AUCTION_PACKAGE" - Auction package. 7490 InventorySourceType string `json:"inventorySourceType,omitempty"` 7491 7492 // Name: Output only. The resource name of the inventory source. 7493 Name string `json:"name,omitempty"` 7494 7495 // PublisherName: The publisher/seller name of the inventory source. 7496 PublisherName string `json:"publisherName,omitempty"` 7497 7498 // RateDetails: Required. The rate details of the inventory source. 7499 RateDetails *RateDetails `json:"rateDetails,omitempty"` 7500 7501 // Status: The status settings of the inventory source. 7502 Status *InventorySourceStatus `json:"status,omitempty"` 7503 7504 // TimeRange: The time range when this inventory source starts and stops 7505 // serving. 7506 TimeRange *TimeRange `json:"timeRange,omitempty"` 7507 7508 // UpdateTime: Output only. The timestamp when the inventory source was 7509 // last updated. Assigned by the 7510 // system. 7511 UpdateTime string `json:"updateTime,omitempty"` 7512 7513 // ServerResponse contains the HTTP response code and headers from the 7514 // server. 7515 googleapi.ServerResponse `json:"-"` 7516 7517 // ForceSendFields is a list of field names (e.g. "Commitment") to 7518 // unconditionally include in API requests. By default, fields with 7519 // empty values are omitted from API requests. However, any non-pointer, 7520 // non-interface field appearing in ForceSendFields will be sent to the 7521 // server regardless of whether the field is empty or not. This may be 7522 // used to include empty fields in Patch requests. 7523 ForceSendFields []string `json:"-"` 7524 7525 // NullFields is a list of field names (e.g. "Commitment") to include in 7526 // API requests with the JSON null value. By default, fields with empty 7527 // values are omitted from API requests. However, any field with an 7528 // empty value appearing in NullFields will be sent to the server as 7529 // null. It is an error if a field in this list has a non-empty value. 7530 // This may be used to include null fields in Patch requests. 7531 NullFields []string `json:"-"` 7532} 7533 7534func (s *InventorySource) MarshalJSON() ([]byte, error) { 7535 type NoMethod InventorySource 7536 raw := NoMethod(*s) 7537 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7538} 7539 7540// InventorySourceAssignedTargetingOptionDetails: Targeting details for 7541// inventory source. This will be 7542// populated in the details field of an AssignedTargetingOption 7543// when 7544// targeting_type is 7545// `TARGETING_TYPE_INVENTORY_SOURCE`. 7546type InventorySourceAssignedTargetingOptionDetails struct { 7547 // InventorySourceId: Required. ID of the inventory source. Should refer 7548 // to the 7549 // inventory_source_id field of an 7550 // InventorySource resource. 7551 InventorySourceId int64 `json:"inventorySourceId,omitempty,string"` 7552 7553 // ForceSendFields is a list of field names (e.g. "InventorySourceId") 7554 // to unconditionally include in API requests. By default, fields with 7555 // empty values are omitted from API requests. However, any non-pointer, 7556 // non-interface field appearing in ForceSendFields will be sent to the 7557 // server regardless of whether the field is empty or not. This may be 7558 // used to include empty fields in Patch requests. 7559 ForceSendFields []string `json:"-"` 7560 7561 // NullFields is a list of field names (e.g. "InventorySourceId") to 7562 // include in API requests with the JSON null value. By default, fields 7563 // with empty values are omitted from API requests. However, any field 7564 // with an empty value appearing in NullFields will be sent to the 7565 // server as null. It is an error if a field in this list has a 7566 // non-empty value. This may be used to include null fields in Patch 7567 // requests. 7568 NullFields []string `json:"-"` 7569} 7570 7571func (s *InventorySourceAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7572 type NoMethod InventorySourceAssignedTargetingOptionDetails 7573 raw := NoMethod(*s) 7574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7575} 7576 7577// InventorySourceDisplayCreativeConfig: The configuration for display 7578// creatives. 7579type InventorySourceDisplayCreativeConfig struct { 7580 // CreativeSize: The size requirements for display creatives that can be 7581 // assigned to the 7582 // inventory source. 7583 CreativeSize *Dimensions `json:"creativeSize,omitempty"` 7584 7585 // ForceSendFields is a list of field names (e.g. "CreativeSize") to 7586 // unconditionally include in API requests. By default, fields with 7587 // empty values are omitted from API requests. However, any non-pointer, 7588 // non-interface field appearing in ForceSendFields will be sent to the 7589 // server regardless of whether the field is empty or not. This may be 7590 // used to include empty fields in Patch requests. 7591 ForceSendFields []string `json:"-"` 7592 7593 // NullFields is a list of field names (e.g. "CreativeSize") to include 7594 // in API requests with the JSON null value. By default, fields with 7595 // empty values are omitted from API requests. However, any field with 7596 // an empty value appearing in NullFields will be sent to the server as 7597 // null. It is an error if a field in this list has a non-empty value. 7598 // This may be used to include null fields in Patch requests. 7599 NullFields []string `json:"-"` 7600} 7601 7602func (s *InventorySourceDisplayCreativeConfig) MarshalJSON() ([]byte, error) { 7603 type NoMethod InventorySourceDisplayCreativeConfig 7604 raw := NoMethod(*s) 7605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7606} 7607 7608// InventorySourceFilter: A filtering option for filtering on Inventory 7609// Source entities. 7610type InventorySourceFilter struct { 7611 // InventorySourceIds: Inventory Sources to download by ID. All IDs must 7612 // belong to the same 7613 // Advertiser or 7614 // Partner specified in 7615 // CreateSdfDownloadTaskRequest. Leave empty to download all 7616 // Inventory 7617 // Sources for the selected Advertiser or Partner. 7618 InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"` 7619 7620 // ForceSendFields is a list of field names (e.g. "InventorySourceIds") 7621 // to unconditionally include in API requests. By default, fields with 7622 // empty values are omitted from API requests. However, any non-pointer, 7623 // non-interface field appearing in ForceSendFields will be sent to the 7624 // server regardless of whether the field is empty or not. This may be 7625 // used to include empty fields in Patch requests. 7626 ForceSendFields []string `json:"-"` 7627 7628 // NullFields is a list of field names (e.g. "InventorySourceIds") to 7629 // include in API requests with the JSON null value. By default, fields 7630 // with empty values are omitted from API requests. However, any field 7631 // with an empty value appearing in NullFields will be sent to the 7632 // server as null. It is an error if a field in this list has a 7633 // non-empty value. This may be used to include null fields in Patch 7634 // requests. 7635 NullFields []string `json:"-"` 7636} 7637 7638func (s *InventorySourceFilter) MarshalJSON() ([]byte, error) { 7639 type NoMethod InventorySourceFilter 7640 raw := NoMethod(*s) 7641 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7642} 7643 7644// InventorySourceGroup: A collection of targetable inventory sources. 7645type InventorySourceGroup struct { 7646 // DisplayName: Required. The display name of the inventory source 7647 // group. 7648 // 7649 // Must be UTF-8 encoded with a maximum size of 240 bytes. 7650 DisplayName string `json:"displayName,omitempty"` 7651 7652 // InventorySourceGroupId: Output only. The unique ID of the inventory 7653 // source group. Assigned by the system. 7654 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"` 7655 7656 // Name: Output only. The resource name of the inventory source group. 7657 Name string `json:"name,omitempty"` 7658 7659 // ServerResponse contains the HTTP response code and headers from the 7660 // server. 7661 googleapi.ServerResponse `json:"-"` 7662 7663 // ForceSendFields is a list of field names (e.g. "DisplayName") to 7664 // unconditionally include in API requests. By default, fields with 7665 // empty values are omitted from API requests. However, any non-pointer, 7666 // non-interface field appearing in ForceSendFields will be sent to the 7667 // server regardless of whether the field is empty or not. This may be 7668 // used to include empty fields in Patch requests. 7669 ForceSendFields []string `json:"-"` 7670 7671 // NullFields is a list of field names (e.g. "DisplayName") to include 7672 // in API requests with the JSON null value. By default, fields with 7673 // empty values are omitted from API requests. However, any field with 7674 // an empty value appearing in NullFields will be sent to the server as 7675 // null. It is an error if a field in this list has a non-empty value. 7676 // This may be used to include null fields in Patch requests. 7677 NullFields []string `json:"-"` 7678} 7679 7680func (s *InventorySourceGroup) MarshalJSON() ([]byte, error) { 7681 type NoMethod InventorySourceGroup 7682 raw := NoMethod(*s) 7683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7684} 7685 7686// InventorySourceGroupAssignedTargetingOptionDetails: Targeting details 7687// for inventory source group. This will be 7688// populated in the details field of an AssignedTargetingOption 7689// when 7690// targeting_type is 7691// `TARGETING_TYPE_INVENTORY_SOURCE_GROUP`. 7692type InventorySourceGroupAssignedTargetingOptionDetails struct { 7693 // InventorySourceGroupId: Required. ID of the inventory source group. 7694 // Should refer to the 7695 // inventory_source_group_id 7696 // field of an InventorySourceGroup resource. 7697 InventorySourceGroupId int64 `json:"inventorySourceGroupId,omitempty,string"` 7698 7699 // ForceSendFields is a list of field names (e.g. 7700 // "InventorySourceGroupId") to unconditionally include in API requests. 7701 // By default, fields with empty values are omitted from API requests. 7702 // However, any non-pointer, non-interface field appearing in 7703 // ForceSendFields will be sent to the server regardless of whether the 7704 // field is empty or not. This may be used to include empty fields in 7705 // Patch requests. 7706 ForceSendFields []string `json:"-"` 7707 7708 // NullFields is a list of field names (e.g. "InventorySourceGroupId") 7709 // to include in API requests with the JSON null value. By default, 7710 // fields with empty values are omitted from API requests. However, any 7711 // field with an empty value appearing in NullFields will be sent to the 7712 // server as null. It is an error if a field in this list has a 7713 // non-empty value. This may be used to include null fields in Patch 7714 // requests. 7715 NullFields []string `json:"-"` 7716} 7717 7718func (s *InventorySourceGroupAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7719 type NoMethod InventorySourceGroupAssignedTargetingOptionDetails 7720 raw := NoMethod(*s) 7721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7722} 7723 7724// InventorySourceStatus: The status related settings of the inventory 7725// source. 7726type InventorySourceStatus struct { 7727 // ConfigStatus: Output only. The configuration status of the inventory 7728 // source. 7729 // 7730 // Only applicable for guaranteed inventory sources. 7731 // Acceptable values are `INVENTORY_SOURCE_CONFIG_STATUS_PENDING` 7732 // and 7733 // `INVENTORY_SOURCE_CONFIG_STATUS_COMPLETED`. 7734 // 7735 // An inventory source must be configured (fill in the required fields, 7736 // choose 7737 // creatives, and select a default campaign) before it can serve. 7738 // 7739 // Possible values: 7740 // "INVENTORY_SOURCE_CONFIG_STATUS_UNSPECIFIED" - The approval status 7741 // is not specified or is unknown in this version. 7742 // "INVENTORY_SOURCE_CONFIG_STATUS_PENDING" - The beginning state of a 7743 // guaranteed inventory source. The inventory 7744 // source in this state needs to be configured. 7745 // "INVENTORY_SOURCE_CONFIG_STATUS_COMPLETED" - The state after the 7746 // buyer configures a guaranteed inventory source. 7747 ConfigStatus string `json:"configStatus,omitempty"` 7748 7749 // EntityPauseReason: The user-provided reason for pausing this 7750 // inventory source. 7751 // 7752 // Must not exceed 100 characters. 7753 // 7754 // Only applicable when entity_status 7755 // is set to `ENTITY_STATUS_PAUSED`. 7756 EntityPauseReason string `json:"entityPauseReason,omitempty"` 7757 7758 // EntityStatus: Whether or not the inventory source is 7759 // servable. 7760 // 7761 // Acceptable values are `ENTITY_STATUS_ACTIVE`, 7762 // `ENTITY_STATUS_ARCHIVED`, and 7763 // `ENTITY_STATUS_PAUSED`. 7764 // Default value is `ENTITY_STATUS_ACTIVE`. 7765 // 7766 // Possible values: 7767 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 7768 // specified or is unknown in this version. 7769 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 7770 // budget. 7771 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 7772 // budget spending are disabled. An 7773 // entity can be deleted after archived. Deleted entities cannot be 7774 // retrieved. 7775 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 7776 // budget spending are disabled. 7777 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 7778 // the entity. 7779 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 7780 // for deletion. 7781 EntityStatus string `json:"entityStatus,omitempty"` 7782 7783 // SellerPauseReason: Output only. The seller-provided reason for 7784 // pausing this inventory source. 7785 // 7786 // Only applicable for inventory sources synced directly from 7787 // the 7788 // publishers and when seller_status 7789 // is set to `ENTITY_STATUS_PAUSED`. 7790 SellerPauseReason string `json:"sellerPauseReason,omitempty"` 7791 7792 // SellerStatus: Output only. The status set by the seller for the 7793 // inventory source. 7794 // 7795 // Only applicable for inventory sources synced directly from 7796 // the 7797 // publishers. 7798 // Acceptable values are `ENTITY_STATUS_ACTIVE` and 7799 // `ENTITY_STATUS_PAUSED`. 7800 // 7801 // Possible values: 7802 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 7803 // specified or is unknown in this version. 7804 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 7805 // budget. 7806 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 7807 // budget spending are disabled. An 7808 // entity can be deleted after archived. Deleted entities cannot be 7809 // retrieved. 7810 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 7811 // budget spending are disabled. 7812 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 7813 // the entity. 7814 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 7815 // for deletion. 7816 SellerStatus string `json:"sellerStatus,omitempty"` 7817 7818 // ForceSendFields is a list of field names (e.g. "ConfigStatus") to 7819 // unconditionally include in API requests. By default, fields with 7820 // empty values are omitted from API requests. However, any non-pointer, 7821 // non-interface field appearing in ForceSendFields will be sent to the 7822 // server regardless of whether the field is empty or not. This may be 7823 // used to include empty fields in Patch requests. 7824 ForceSendFields []string `json:"-"` 7825 7826 // NullFields is a list of field names (e.g. "ConfigStatus") to include 7827 // in API requests with the JSON null value. By default, fields with 7828 // empty values are omitted from API requests. However, any field with 7829 // an empty value appearing in NullFields will be sent to the server as 7830 // null. It is an error if a field in this list has a non-empty value. 7831 // This may be used to include null fields in Patch requests. 7832 NullFields []string `json:"-"` 7833} 7834 7835func (s *InventorySourceStatus) MarshalJSON() ([]byte, error) { 7836 type NoMethod InventorySourceStatus 7837 raw := NoMethod(*s) 7838 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7839} 7840 7841// InventorySourceVideoCreativeConfig: The configuration for video 7842// creatives. 7843type InventorySourceVideoCreativeConfig struct { 7844 // Duration: The duration requirements for the video creatives that can 7845 // be assigned to 7846 // the inventory source. 7847 Duration string `json:"duration,omitempty"` 7848 7849 // ForceSendFields is a list of field names (e.g. "Duration") to 7850 // unconditionally include in API requests. By default, fields with 7851 // empty values are omitted from API requests. However, any non-pointer, 7852 // non-interface field appearing in ForceSendFields will be sent to the 7853 // server regardless of whether the field is empty or not. This may be 7854 // used to include empty fields in Patch requests. 7855 ForceSendFields []string `json:"-"` 7856 7857 // NullFields is a list of field names (e.g. "Duration") to include in 7858 // API requests with the JSON null value. By default, fields with empty 7859 // values are omitted from API requests. However, any field with an 7860 // empty value appearing in NullFields will be sent to the server as 7861 // null. It is an error if a field in this list has a non-empty value. 7862 // This may be used to include null fields in Patch requests. 7863 NullFields []string `json:"-"` 7864} 7865 7866func (s *InventorySourceVideoCreativeConfig) MarshalJSON() ([]byte, error) { 7867 type NoMethod InventorySourceVideoCreativeConfig 7868 raw := NoMethod(*s) 7869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7870} 7871 7872// KeywordAssignedTargetingOptionDetails: Details for assigned keyword 7873// targeting option. This will be populated in the 7874// details field of an AssignedTargetingOption when 7875// targeting_type is 7876// `TARGETING_TYPE_KEYWORD`. 7877type KeywordAssignedTargetingOptionDetails struct { 7878 // Keyword: Required. The keyword, for example `car 7879 // insurance`. 7880 // 7881 // Positive keyword cannot be offensive word. 7882 // Must be UTF-8 encoded with a maximum size of 255 bytes. Maximum 7883 // number 7884 // of characters is 80. Maximum number of words is 10. 7885 Keyword string `json:"keyword,omitempty"` 7886 7887 // Negative: Indicates if this option is being negatively targeted. 7888 Negative bool `json:"negative,omitempty"` 7889 7890 // ForceSendFields is a list of field names (e.g. "Keyword") to 7891 // unconditionally include in API requests. By default, fields with 7892 // empty values are omitted from API requests. However, any non-pointer, 7893 // non-interface field appearing in ForceSendFields will be sent to the 7894 // server regardless of whether the field is empty or not. This may be 7895 // used to include empty fields in Patch requests. 7896 ForceSendFields []string `json:"-"` 7897 7898 // NullFields is a list of field names (e.g. "Keyword") to include in 7899 // API requests with the JSON null value. By default, fields with empty 7900 // values are omitted from API requests. However, any field with an 7901 // empty value appearing in NullFields will be sent to the server as 7902 // null. It is an error if a field in this list has a non-empty value. 7903 // This may be used to include null fields in Patch requests. 7904 NullFields []string `json:"-"` 7905} 7906 7907func (s *KeywordAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7908 type NoMethod KeywordAssignedTargetingOptionDetails 7909 raw := NoMethod(*s) 7910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7911} 7912 7913// LanguageAssignedTargetingOptionDetails: Details for assigned language 7914// targeting option. This will be populated in the 7915// details field of an AssignedTargetingOption when 7916// targeting_type is 7917// `TARGETING_TYPE_LANGUAGE`. 7918type LanguageAssignedTargetingOptionDetails struct { 7919 // DisplayName: Output only. The display name of the language (e.g., 7920 // "French"). 7921 DisplayName string `json:"displayName,omitempty"` 7922 7923 // Negative: Indicates if this option is being negatively targeted. All 7924 // assigned 7925 // language targeting options on the same line item must have the same 7926 // value 7927 // for this field. 7928 Negative bool `json:"negative,omitempty"` 7929 7930 // TargetingOptionId: Required. The targeting_option_id of 7931 // a 7932 // TargetingOption of type `TARGETING_TYPE_LANGUAGE`. 7933 TargetingOptionId string `json:"targetingOptionId,omitempty"` 7934 7935 // ForceSendFields is a list of field names (e.g. "DisplayName") to 7936 // unconditionally include in API requests. By default, fields with 7937 // empty values are omitted from API requests. However, any non-pointer, 7938 // non-interface field appearing in ForceSendFields will be sent to the 7939 // server regardless of whether the field is empty or not. This may be 7940 // used to include empty fields in Patch requests. 7941 ForceSendFields []string `json:"-"` 7942 7943 // NullFields is a list of field names (e.g. "DisplayName") to include 7944 // in API requests with the JSON null value. By default, fields with 7945 // empty values are omitted from API requests. However, any field with 7946 // an empty value appearing in NullFields will be sent to the server as 7947 // null. It is an error if a field in this list has a non-empty value. 7948 // This may be used to include null fields in Patch requests. 7949 NullFields []string `json:"-"` 7950} 7951 7952func (s *LanguageAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7953 type NoMethod LanguageAssignedTargetingOptionDetails 7954 raw := NoMethod(*s) 7955 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7956} 7957 7958// LanguageTargetingOptionDetails: Represents a targetable language. 7959// This will be populated in the 7960// language_details field when 7961// targeting_type is 7962// `TARGETING_TYPE_LANGUAGE`. 7963type LanguageTargetingOptionDetails struct { 7964 // DisplayName: Output only. The display name of the language (e.g., 7965 // "French"). 7966 DisplayName string `json:"displayName,omitempty"` 7967 7968 // ForceSendFields is a list of field names (e.g. "DisplayName") to 7969 // unconditionally include in API requests. By default, fields with 7970 // empty values are omitted from API requests. However, any non-pointer, 7971 // non-interface field appearing in ForceSendFields will be sent to the 7972 // server regardless of whether the field is empty or not. This may be 7973 // used to include empty fields in Patch requests. 7974 ForceSendFields []string `json:"-"` 7975 7976 // NullFields is a list of field names (e.g. "DisplayName") to include 7977 // in API requests with the JSON null value. By default, fields with 7978 // empty values are omitted from API requests. However, any field with 7979 // an empty value appearing in NullFields will be sent to the server as 7980 // null. It is an error if a field in this list has a non-empty value. 7981 // This may be used to include null fields in Patch requests. 7982 NullFields []string `json:"-"` 7983} 7984 7985func (s *LanguageTargetingOptionDetails) MarshalJSON() ([]byte, error) { 7986 type NoMethod LanguageTargetingOptionDetails 7987 raw := NoMethod(*s) 7988 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7989} 7990 7991// LineItem: A single line item. 7992type LineItem struct { 7993 // AdvertiserId: Output only. The unique ID of the advertiser the line 7994 // item belongs to. 7995 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 7996 7997 // BidStrategy: Required. The bidding strategy of the line item. 7998 BidStrategy *BiddingStrategy `json:"bidStrategy,omitempty"` 7999 8000 // Budget: Required. The budget allocation setting of the line item. 8001 Budget *LineItemBudget `json:"budget,omitempty"` 8002 8003 // CampaignId: Output only. The unique ID of the campaign that the line 8004 // item belongs to. 8005 CampaignId int64 `json:"campaignId,omitempty,string"` 8006 8007 // ConversionCounting: The conversion tracking setting of the line item. 8008 ConversionCounting *ConversionCountingConfig `json:"conversionCounting,omitempty"` 8009 8010 // CreativeIds: The IDs of the creatives associated with the line item. 8011 CreativeIds googleapi.Int64s `json:"creativeIds,omitempty"` 8012 8013 // DisplayName: Required. The display name of the line item. 8014 // 8015 // Must be UTF-8 encoded with a maximum size of 240 bytes. 8016 DisplayName string `json:"displayName,omitempty"` 8017 8018 // EntityStatus: Required. Controls whether or not the line item can 8019 // spend its budget and 8020 // bid on inventory. 8021 // 8022 // * For CreateLineItem method, only 8023 // `ENTITY_STATUS_DRAFT` is allowed. To activate a line item, 8024 // use 8025 // UpdateLineItem method and update the 8026 // status to `ENTITY_STATUS_ACTIVE` after creation. 8027 // * A line item cannot be changed back to `ENTITY_STATUS_DRAFT` status 8028 // from 8029 // any other status. 8030 // * If the line item's parent insertion order is not active, the line 8031 // item 8032 // can't spend its budget even if its own status is 8033 // `ENTITY_STATUS_ACTIVE`. 8034 // 8035 // Possible values: 8036 // "ENTITY_STATUS_UNSPECIFIED" - Default value when status is not 8037 // specified or is unknown in this version. 8038 // "ENTITY_STATUS_ACTIVE" - The entity is enabled to bid and spend 8039 // budget. 8040 // "ENTITY_STATUS_ARCHIVED" - The entity is archived. Bidding and 8041 // budget spending are disabled. An 8042 // entity can be deleted after archived. Deleted entities cannot be 8043 // retrieved. 8044 // "ENTITY_STATUS_DRAFT" - The entity is under draft. Bidding and 8045 // budget spending are disabled. 8046 // "ENTITY_STATUS_PAUSED" - Bidding and budget spending are paused for 8047 // the entity. 8048 // "ENTITY_STATUS_SCHEDULED_FOR_DELETION" - The entity is scheduled 8049 // for deletion. 8050 EntityStatus string `json:"entityStatus,omitempty"` 8051 8052 // Flight: Required. The start and end time of the line item's flight. 8053 Flight *LineItemFlight `json:"flight,omitempty"` 8054 8055 // FrequencyCap: Required. The frequency capping setting of the line 8056 // item. 8057 FrequencyCap *FrequencyCap `json:"frequencyCap,omitempty"` 8058 8059 // InsertionOrderId: Required. Immutable. The unique ID of the insertion 8060 // order that the line item belongs to. 8061 InsertionOrderId int64 `json:"insertionOrderId,omitempty,string"` 8062 8063 // IntegrationDetails: Integration details of the line item. 8064 IntegrationDetails *IntegrationDetails `json:"integrationDetails,omitempty"` 8065 8066 // InventorySourceIds: The IDs of the private inventory sources assigned 8067 // to the line item. 8068 InventorySourceIds googleapi.Int64s `json:"inventorySourceIds,omitempty"` 8069 8070 // LineItemId: Output only. The unique ID of the line item. Assigned by 8071 // the system. 8072 LineItemId int64 `json:"lineItemId,omitempty,string"` 8073 8074 // LineItemType: Required. Immutable. The type of the line item. 8075 // 8076 // Possible values: 8077 // "LINE_ITEM_TYPE_UNSPECIFIED" - Type value is not specified or is 8078 // unknown in this version. 8079 // "LINE_ITEM_TYPE_DISPLAY_DEFAULT" - Image, HTML5, native, or rich 8080 // media ads. 8081 // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INSTALL" - Display ads that 8082 // drive installs of an app. 8083 // "LINE_ITEM_TYPE_VIDEO_DEFAULT" - Video ads sold on a CPM basis for 8084 // a variety of environments. 8085 // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INSTALL" - Video ads that drive 8086 // installs of an app. 8087 // "LINE_ITEM_TYPE_DISPLAY_MOBILE_APP_INVENTORY" - Display ads served 8088 // on mobile app inventory. 8089 // "LINE_ITEM_TYPE_VIDEO_MOBILE_APP_INVENTORY" - Video ads served on 8090 // mobile app inventory. 8091 LineItemType string `json:"lineItemType,omitempty"` 8092 8093 // Name: Output only. The resource name of the line item. 8094 Name string `json:"name,omitempty"` 8095 8096 // Pacing: Required. The budget spending speed setting of the line item. 8097 Pacing *Pacing `json:"pacing,omitempty"` 8098 8099 // PartnerCosts: The partner costs associated with the line item. 8100 // 8101 // If absent or empty in CreateLineItem 8102 // method, the newly created line item will inherit partner costs from 8103 // its 8104 // parent insertion order. 8105 PartnerCosts []*PartnerCost `json:"partnerCosts,omitempty"` 8106 8107 // PartnerRevenueModel: Required. The partner revenue model setting of 8108 // the line item. 8109 PartnerRevenueModel *PartnerRevenueModel `json:"partnerRevenueModel,omitempty"` 8110 8111 // UpdateTime: Output only. The timestamp when the line item was last 8112 // updated. Assigned by the system. 8113 UpdateTime string `json:"updateTime,omitempty"` 8114 8115 // ServerResponse contains the HTTP response code and headers from the 8116 // server. 8117 googleapi.ServerResponse `json:"-"` 8118 8119 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 8120 // unconditionally include in API requests. By default, fields with 8121 // empty values are omitted from API requests. However, any non-pointer, 8122 // non-interface field appearing in ForceSendFields will be sent to the 8123 // server regardless of whether the field is empty or not. This may be 8124 // used to include empty fields in Patch requests. 8125 ForceSendFields []string `json:"-"` 8126 8127 // NullFields is a list of field names (e.g. "AdvertiserId") to include 8128 // in API requests with the JSON null value. By default, fields with 8129 // empty values are omitted from API requests. However, any field with 8130 // an empty value appearing in NullFields will be sent to the server as 8131 // null. It is an error if a field in this list has a non-empty value. 8132 // This may be used to include null fields in Patch requests. 8133 NullFields []string `json:"-"` 8134} 8135 8136func (s *LineItem) MarshalJSON() ([]byte, error) { 8137 type NoMethod LineItem 8138 raw := NoMethod(*s) 8139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8140} 8141 8142// LineItemBudget: Settings that control how budget is allocated. 8143type LineItemBudget struct { 8144 // BudgetAllocationType: Required. The type of the budget 8145 // allocation. 8146 // 8147 // `LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC` is only applicable 8148 // when 8149 // automatic budget allocation is enabled for the parent insertion 8150 // order. 8151 // 8152 // Possible values: 8153 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNSPECIFIED" - Type value is not 8154 // specified or is unknown in this version. 8155 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC" - Automatic budget 8156 // allocation is enabled for the line item. 8157 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_FIXED" - A fixed max budget 8158 // amount is allocated for the line item. 8159 // "LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNLIMITED" - No budget limit is 8160 // applied to the line item. 8161 BudgetAllocationType string `json:"budgetAllocationType,omitempty"` 8162 8163 // BudgetUnit: Output only. The budget unit specifies whether the budget 8164 // is currency based 8165 // or impression based. This value is inherited from the parent 8166 // insertion 8167 // order. 8168 // 8169 // Possible values: 8170 // "BUDGET_UNIT_UNSPECIFIED" - Type value is not specified or is 8171 // unknown in this version. 8172 // "BUDGET_UNIT_CURRENCY" - Budgeting in currency amounts. 8173 // "BUDGET_UNIT_IMPRESSIONS" - Budgeting in impression amounts. 8174 BudgetUnit string `json:"budgetUnit,omitempty"` 8175 8176 // MaxAmount: The maximum budget amount the line item will spend. Must 8177 // be greater than 0. 8178 // 8179 // When budget_allocation_type is: 8180 // 8181 // * `LINE_ITEM_BUDGET_ALLOCATION_TYPE_AUTOMATIC`, this field is 8182 // immutable 8183 // and is set by the system. 8184 // * `LINE_ITEM_BUDGET_ALLOCATION_TYPE_FIXED`, if 8185 // budget_unit is: 8186 // - `BUDGET_UNIT_CURRENCY`, this field represents maximum budget 8187 // amount 8188 // to spend, in micros of the advertiser's currency. For example, 8189 // 1500000 8190 // represents 1.5 standard units of the currency. 8191 // - `BUDGET_UNIT_IMPRESSIONS`, this field represents the maximum 8192 // number 8193 // of impressions to serve. 8194 // * `LINE_ITEM_BUDGET_ALLOCATION_TYPE_UNLIMITED`, this field is 8195 // not 8196 // applicable and will be ignored by the system. 8197 MaxAmount int64 `json:"maxAmount,omitempty,string"` 8198 8199 // ForceSendFields is a list of field names (e.g. 8200 // "BudgetAllocationType") to unconditionally include in API requests. 8201 // By default, fields with empty values are omitted from API requests. 8202 // However, any non-pointer, non-interface field appearing in 8203 // ForceSendFields will be sent to the server regardless of whether the 8204 // field is empty or not. This may be used to include empty fields in 8205 // Patch requests. 8206 ForceSendFields []string `json:"-"` 8207 8208 // NullFields is a list of field names (e.g. "BudgetAllocationType") to 8209 // include in API requests with the JSON null value. By default, fields 8210 // with empty values are omitted from API requests. However, any field 8211 // with an empty value appearing in NullFields will be sent to the 8212 // server as null. It is an error if a field in this list has a 8213 // non-empty value. This may be used to include null fields in Patch 8214 // requests. 8215 NullFields []string `json:"-"` 8216} 8217 8218func (s *LineItemBudget) MarshalJSON() ([]byte, error) { 8219 type NoMethod LineItemBudget 8220 raw := NoMethod(*s) 8221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8222} 8223 8224// LineItemFlight: Settings that control the active duration of a line 8225// item. 8226type LineItemFlight struct { 8227 // DateRange: The flight start and end dates of the line item. They are 8228 // resolved 8229 // relative to the parent advertiser's time zone. 8230 // 8231 // * Required when 8232 // flight_date_type is 8233 // `LINE_ITEM_FLIGHT_DATE_TYPE_CUSTOM`. Output only otherwise. 8234 // * When creating a new flight, both `start_date` and `end_date` must 8235 // be in 8236 // the future. 8237 // * An existing flight with a `start_date` in the past has a 8238 // mutable 8239 // `end_date` but an immutable `start_date`. 8240 // * `end_date` must be the `start_date` or later, both before the year 8241 // 2037. 8242 DateRange *DateRange `json:"dateRange,omitempty"` 8243 8244 // FlightDateType: Required. The type of the line item's flight dates. 8245 // 8246 // Possible values: 8247 // "LINE_ITEM_FLIGHT_DATE_TYPE_UNSPECIFIED" - Type value is not 8248 // specified or is unknown in this version. 8249 // "LINE_ITEM_FLIGHT_DATE_TYPE_INHERITED" - The line item's flight 8250 // dates are inherited from its parent insertion order. 8251 // "LINE_ITEM_FLIGHT_DATE_TYPE_CUSTOM" - The line item uses its own 8252 // custom flight dates. 8253 FlightDateType string `json:"flightDateType,omitempty"` 8254 8255 // ForceSendFields is a list of field names (e.g. "DateRange") to 8256 // unconditionally include in API requests. By default, fields with 8257 // empty values are omitted from API requests. However, any non-pointer, 8258 // non-interface field appearing in ForceSendFields will be sent to the 8259 // server regardless of whether the field is empty or not. This may be 8260 // used to include empty fields in Patch requests. 8261 ForceSendFields []string `json:"-"` 8262 8263 // NullFields is a list of field names (e.g. "DateRange") to include in 8264 // API requests with the JSON null value. By default, fields with empty 8265 // values are omitted from API requests. However, any field with an 8266 // empty value appearing in NullFields will be sent to the server as 8267 // null. It is an error if a field in this list has a non-empty value. 8268 // This may be used to include null fields in Patch requests. 8269 NullFields []string `json:"-"` 8270} 8271 8272func (s *LineItemFlight) MarshalJSON() ([]byte, error) { 8273 type NoMethod LineItemFlight 8274 raw := NoMethod(*s) 8275 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8276} 8277 8278type ListAdvertisersResponse struct { 8279 // Advertisers: The list of advertisers. 8280 // 8281 // This list will be absent if empty. 8282 Advertisers []*Advertiser `json:"advertisers,omitempty"` 8283 8284 // NextPageToken: A token to retrieve the next page of results. 8285 // Pass this value in the 8286 // page_token 8287 // field in the subsequent call to `ListAdvertisers` method to retrieve 8288 // the 8289 // next page of results. 8290 NextPageToken string `json:"nextPageToken,omitempty"` 8291 8292 // ServerResponse contains the HTTP response code and headers from the 8293 // server. 8294 googleapi.ServerResponse `json:"-"` 8295 8296 // ForceSendFields is a list of field names (e.g. "Advertisers") to 8297 // unconditionally include in API requests. By default, fields with 8298 // empty values are omitted from API requests. However, any non-pointer, 8299 // non-interface field appearing in ForceSendFields will be sent to the 8300 // server regardless of whether the field is empty or not. This may be 8301 // used to include empty fields in Patch requests. 8302 ForceSendFields []string `json:"-"` 8303 8304 // NullFields is a list of field names (e.g. "Advertisers") to include 8305 // in API requests with the JSON null value. By default, fields with 8306 // empty values are omitted from API requests. However, any field with 8307 // an empty value appearing in NullFields will be sent to the server as 8308 // null. It is an error if a field in this list has a non-empty value. 8309 // This may be used to include null fields in Patch requests. 8310 NullFields []string `json:"-"` 8311} 8312 8313func (s *ListAdvertisersResponse) MarshalJSON() ([]byte, error) { 8314 type NoMethod ListAdvertisersResponse 8315 raw := NoMethod(*s) 8316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8317} 8318 8319type ListCampaignsResponse struct { 8320 // Campaigns: The list of campaigns. 8321 // 8322 // This list will be absent if empty. 8323 Campaigns []*Campaign `json:"campaigns,omitempty"` 8324 8325 // NextPageToken: A token to retrieve the next page of results. 8326 // Pass this value in the page_token field 8327 // in the subsequent call to `ListCampaigns` method to retrieve the next 8328 // page 8329 // of results. 8330 NextPageToken string `json:"nextPageToken,omitempty"` 8331 8332 // ServerResponse contains the HTTP response code and headers from the 8333 // server. 8334 googleapi.ServerResponse `json:"-"` 8335 8336 // ForceSendFields is a list of field names (e.g. "Campaigns") to 8337 // unconditionally include in API requests. By default, fields with 8338 // empty values are omitted from API requests. However, any non-pointer, 8339 // non-interface field appearing in ForceSendFields will be sent to the 8340 // server regardless of whether the field is empty or not. This may be 8341 // used to include empty fields in Patch requests. 8342 ForceSendFields []string `json:"-"` 8343 8344 // NullFields is a list of field names (e.g. "Campaigns") to include in 8345 // API requests with the JSON null value. By default, fields with empty 8346 // values are omitted from API requests. However, any field with an 8347 // empty value appearing in NullFields will be sent to the server as 8348 // null. It is an error if a field in this list has a non-empty value. 8349 // This may be used to include null fields in Patch requests. 8350 NullFields []string `json:"-"` 8351} 8352 8353func (s *ListCampaignsResponse) MarshalJSON() ([]byte, error) { 8354 type NoMethod ListCampaignsResponse 8355 raw := NoMethod(*s) 8356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8357} 8358 8359type ListChannelsResponse struct { 8360 // Channels: The list of channels. 8361 // 8362 // This list will be absent if empty. 8363 Channels []*Channel `json:"channels,omitempty"` 8364 8365 // NextPageToken: A token to retrieve the next page of results. 8366 // Pass this value in the page_token field 8367 // in the subsequent call to `ListChannels` method to retrieve the next 8368 // page 8369 // of results. 8370 NextPageToken string `json:"nextPageToken,omitempty"` 8371 8372 // ServerResponse contains the HTTP response code and headers from the 8373 // server. 8374 googleapi.ServerResponse `json:"-"` 8375 8376 // ForceSendFields is a list of field names (e.g. "Channels") to 8377 // unconditionally include in API requests. By default, fields with 8378 // empty values are omitted from API requests. However, any non-pointer, 8379 // non-interface field appearing in ForceSendFields will be sent to the 8380 // server regardless of whether the field is empty or not. This may be 8381 // used to include empty fields in Patch requests. 8382 ForceSendFields []string `json:"-"` 8383 8384 // NullFields is a list of field names (e.g. "Channels") to include in 8385 // API requests with the JSON null value. By default, fields with empty 8386 // values are omitted from API requests. However, any field with an 8387 // empty value appearing in NullFields will be sent to the server as 8388 // null. It is an error if a field in this list has a non-empty value. 8389 // This may be used to include null fields in Patch requests. 8390 NullFields []string `json:"-"` 8391} 8392 8393func (s *ListChannelsResponse) MarshalJSON() ([]byte, error) { 8394 type NoMethod ListChannelsResponse 8395 raw := NoMethod(*s) 8396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8397} 8398 8399type ListCombinedAudiencesResponse struct { 8400 // CombinedAudiences: The list of combined audiences. 8401 // 8402 // This list will be absent if empty. 8403 CombinedAudiences []*CombinedAudience `json:"combinedAudiences,omitempty"` 8404 8405 // NextPageToken: A token to retrieve the next page of results. 8406 // Pass this value in the 8407 // page_token 8408 // field in the subsequent call to `ListCombinedAudiences` method to 8409 // retrieve 8410 // the next page of results. 8411 NextPageToken string `json:"nextPageToken,omitempty"` 8412 8413 // ServerResponse contains the HTTP response code and headers from the 8414 // server. 8415 googleapi.ServerResponse `json:"-"` 8416 8417 // ForceSendFields is a list of field names (e.g. "CombinedAudiences") 8418 // to unconditionally include in API requests. By default, fields with 8419 // empty values are omitted from API requests. However, any non-pointer, 8420 // non-interface field appearing in ForceSendFields will be sent to the 8421 // server regardless of whether the field is empty or not. This may be 8422 // used to include empty fields in Patch requests. 8423 ForceSendFields []string `json:"-"` 8424 8425 // NullFields is a list of field names (e.g. "CombinedAudiences") to 8426 // include in API requests with the JSON null value. By default, fields 8427 // with empty values are omitted from API requests. However, any field 8428 // with an empty value appearing in NullFields will be sent to the 8429 // server as null. It is an error if a field in this list has a 8430 // non-empty value. This may be used to include null fields in Patch 8431 // requests. 8432 NullFields []string `json:"-"` 8433} 8434 8435func (s *ListCombinedAudiencesResponse) MarshalJSON() ([]byte, error) { 8436 type NoMethod ListCombinedAudiencesResponse 8437 raw := NoMethod(*s) 8438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8439} 8440 8441type ListCreativesResponse struct { 8442 // Creatives: The list of creatives. 8443 // 8444 // This list will be absent if empty. 8445 Creatives []*Creative `json:"creatives,omitempty"` 8446 8447 // NextPageToken: A token to retrieve the next page of results. 8448 // Pass this value in the page_token field 8449 // in the subsequent call to `ListCreativesRequest` method to retrieve 8450 // the 8451 // next page of results. 8452 // If this field is null, it means this is the last page. 8453 NextPageToken string `json:"nextPageToken,omitempty"` 8454 8455 // ServerResponse contains the HTTP response code and headers from the 8456 // server. 8457 googleapi.ServerResponse `json:"-"` 8458 8459 // ForceSendFields is a list of field names (e.g. "Creatives") to 8460 // unconditionally include in API requests. By default, fields with 8461 // empty values are omitted from API requests. However, any non-pointer, 8462 // non-interface field appearing in ForceSendFields will be sent to the 8463 // server regardless of whether the field is empty or not. This may be 8464 // used to include empty fields in Patch requests. 8465 ForceSendFields []string `json:"-"` 8466 8467 // NullFields is a list of field names (e.g. "Creatives") to include in 8468 // API requests with the JSON null value. By default, fields with empty 8469 // values are omitted from API requests. However, any field with an 8470 // empty value appearing in NullFields will be sent to the server as 8471 // null. It is an error if a field in this list has a non-empty value. 8472 // This may be used to include null fields in Patch requests. 8473 NullFields []string `json:"-"` 8474} 8475 8476func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) { 8477 type NoMethod ListCreativesResponse 8478 raw := NoMethod(*s) 8479 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8480} 8481 8482type ListCustomListsResponse struct { 8483 // CustomLists: The list of custom lists. 8484 // 8485 // This list will be absent if empty. 8486 CustomLists []*CustomList `json:"customLists,omitempty"` 8487 8488 // NextPageToken: A token to retrieve the next page of results. 8489 // Pass this value in the 8490 // page_token 8491 // field in the subsequent call to `ListCustomLists` method to retrieve 8492 // the 8493 // next page of results. 8494 NextPageToken string `json:"nextPageToken,omitempty"` 8495 8496 // ServerResponse contains the HTTP response code and headers from the 8497 // server. 8498 googleapi.ServerResponse `json:"-"` 8499 8500 // ForceSendFields is a list of field names (e.g. "CustomLists") to 8501 // unconditionally include in API requests. By default, fields with 8502 // empty values are omitted from API requests. However, any non-pointer, 8503 // non-interface field appearing in ForceSendFields will be sent to the 8504 // server regardless of whether the field is empty or not. This may be 8505 // used to include empty fields in Patch requests. 8506 ForceSendFields []string `json:"-"` 8507 8508 // NullFields is a list of field names (e.g. "CustomLists") to include 8509 // in API requests with the JSON null value. By default, fields with 8510 // empty values are omitted from API requests. However, any field with 8511 // an empty value appearing in NullFields will be sent to the server as 8512 // null. It is an error if a field in this list has a non-empty value. 8513 // This may be used to include null fields in Patch requests. 8514 NullFields []string `json:"-"` 8515} 8516 8517func (s *ListCustomListsResponse) MarshalJSON() ([]byte, error) { 8518 type NoMethod ListCustomListsResponse 8519 raw := NoMethod(*s) 8520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8521} 8522 8523type ListFirstAndThirdPartyAudiencesResponse struct { 8524 // FirstAndThirdPartyAudiences: The list of first and third party 8525 // audiences. Audience size properties will 8526 // not be included. 8527 // 8528 // This list will be absent if empty. 8529 FirstAndThirdPartyAudiences []*FirstAndThirdPartyAudience `json:"firstAndThirdPartyAudiences,omitempty"` 8530 8531 // NextPageToken: A token to retrieve the next page of results. 8532 // Pass this value in the 8533 // page_token 8534 // field in the subsequent call to `ListFirstAndThirdPartyAudiences` 8535 // method to 8536 // retrieve the next page of results. 8537 NextPageToken string `json:"nextPageToken,omitempty"` 8538 8539 // ServerResponse contains the HTTP response code and headers from the 8540 // server. 8541 googleapi.ServerResponse `json:"-"` 8542 8543 // ForceSendFields is a list of field names (e.g. 8544 // "FirstAndThirdPartyAudiences") to unconditionally include in API 8545 // requests. By default, fields with empty values are omitted from API 8546 // requests. However, any non-pointer, non-interface field appearing in 8547 // ForceSendFields will be sent to the server regardless of whether the 8548 // field is empty or not. This may be used to include empty fields in 8549 // Patch requests. 8550 ForceSendFields []string `json:"-"` 8551 8552 // NullFields is a list of field names (e.g. 8553 // "FirstAndThirdPartyAudiences") to include in API requests with the 8554 // JSON null value. By default, fields with empty values are omitted 8555 // from API requests. However, any field with an empty value appearing 8556 // in NullFields will be sent to the server as null. It is an error if a 8557 // field in this list has a non-empty value. This may be used to include 8558 // null fields in Patch requests. 8559 NullFields []string `json:"-"` 8560} 8561 8562func (s *ListFirstAndThirdPartyAudiencesResponse) MarshalJSON() ([]byte, error) { 8563 type NoMethod ListFirstAndThirdPartyAudiencesResponse 8564 raw := NoMethod(*s) 8565 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8566} 8567 8568type ListGoogleAudiencesResponse struct { 8569 // GoogleAudiences: The list of Google audiences. 8570 // 8571 // This list will be absent if empty. 8572 GoogleAudiences []*GoogleAudience `json:"googleAudiences,omitempty"` 8573 8574 // NextPageToken: A token to retrieve the next page of results. 8575 // Pass this value in the 8576 // page_token 8577 // field in the subsequent call to `ListGoogleAudiences` method to 8578 // retrieve 8579 // the next page of results. 8580 NextPageToken string `json:"nextPageToken,omitempty"` 8581 8582 // ServerResponse contains the HTTP response code and headers from the 8583 // server. 8584 googleapi.ServerResponse `json:"-"` 8585 8586 // ForceSendFields is a list of field names (e.g. "GoogleAudiences") to 8587 // unconditionally include in API requests. By default, fields with 8588 // empty values are omitted from API requests. However, any non-pointer, 8589 // non-interface field appearing in ForceSendFields will be sent to the 8590 // server regardless of whether the field is empty or not. This may be 8591 // used to include empty fields in Patch requests. 8592 ForceSendFields []string `json:"-"` 8593 8594 // NullFields is a list of field names (e.g. "GoogleAudiences") to 8595 // include in API requests with the JSON null value. By default, fields 8596 // with empty values are omitted from API requests. However, any field 8597 // with an empty value appearing in NullFields will be sent to the 8598 // server as null. It is an error if a field in this list has a 8599 // non-empty value. This may be used to include null fields in Patch 8600 // requests. 8601 NullFields []string `json:"-"` 8602} 8603 8604func (s *ListGoogleAudiencesResponse) MarshalJSON() ([]byte, error) { 8605 type NoMethod ListGoogleAudiencesResponse 8606 raw := NoMethod(*s) 8607 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8608} 8609 8610type ListInsertionOrdersResponse struct { 8611 // InsertionOrders: The list of insertion orders. 8612 // 8613 // This list will be absent if empty. 8614 InsertionOrders []*InsertionOrder `json:"insertionOrders,omitempty"` 8615 8616 // NextPageToken: A token to retrieve the next page of results. 8617 // Pass this value in the page_token 8618 // field in the subsequent call to `ListInsertionOrders` method to 8619 // retrieve 8620 // the next page of results. 8621 NextPageToken string `json:"nextPageToken,omitempty"` 8622 8623 // ServerResponse contains the HTTP response code and headers from the 8624 // server. 8625 googleapi.ServerResponse `json:"-"` 8626 8627 // ForceSendFields is a list of field names (e.g. "InsertionOrders") to 8628 // unconditionally include in API requests. By default, fields with 8629 // empty values are omitted from API requests. However, any non-pointer, 8630 // non-interface field appearing in ForceSendFields will be sent to the 8631 // server regardless of whether the field is empty or not. This may be 8632 // used to include empty fields in Patch requests. 8633 ForceSendFields []string `json:"-"` 8634 8635 // NullFields is a list of field names (e.g. "InsertionOrders") to 8636 // include in API requests with the JSON null value. By default, fields 8637 // with empty values are omitted from API requests. However, any field 8638 // with an empty value appearing in NullFields will be sent to the 8639 // server as null. It is an error if a field in this list has a 8640 // non-empty value. This may be used to include null fields in Patch 8641 // requests. 8642 NullFields []string `json:"-"` 8643} 8644 8645func (s *ListInsertionOrdersResponse) MarshalJSON() ([]byte, error) { 8646 type NoMethod ListInsertionOrdersResponse 8647 raw := NoMethod(*s) 8648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8649} 8650 8651// ListInventorySourceGroupsResponse: Response message for 8652// InventorySourceGroupService.ListInventorySourceGroups. 8653type ListInventorySourceGroupsResponse struct { 8654 // InventorySourceGroups: The list of inventory source groups. 8655 // 8656 // This list will be absent if empty. 8657 InventorySourceGroups []*InventorySourceGroup `json:"inventorySourceGroups,omitempty"` 8658 8659 // NextPageToken: A token to retrieve the next page of results. 8660 // Pass this value in the 8661 // page_token 8662 // field in the subsequent call to `ListInventorySourceGroups` method 8663 // to 8664 // retrieve the next page of results. 8665 NextPageToken string `json:"nextPageToken,omitempty"` 8666 8667 // ServerResponse contains the HTTP response code and headers from the 8668 // server. 8669 googleapi.ServerResponse `json:"-"` 8670 8671 // ForceSendFields is a list of field names (e.g. 8672 // "InventorySourceGroups") to unconditionally include in API requests. 8673 // By default, fields with empty values are omitted from API requests. 8674 // However, any non-pointer, non-interface field appearing in 8675 // ForceSendFields will be sent to the server regardless of whether the 8676 // field is empty or not. This may be used to include empty fields in 8677 // Patch requests. 8678 ForceSendFields []string `json:"-"` 8679 8680 // NullFields is a list of field names (e.g. "InventorySourceGroups") to 8681 // include in API requests with the JSON null value. By default, fields 8682 // with empty values are omitted from API requests. However, any field 8683 // with an empty value appearing in NullFields will be sent to the 8684 // server as null. It is an error if a field in this list has a 8685 // non-empty value. This may be used to include null fields in Patch 8686 // requests. 8687 NullFields []string `json:"-"` 8688} 8689 8690func (s *ListInventorySourceGroupsResponse) MarshalJSON() ([]byte, error) { 8691 type NoMethod ListInventorySourceGroupsResponse 8692 raw := NoMethod(*s) 8693 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8694} 8695 8696type ListInventorySourcesResponse struct { 8697 // InventorySources: The list of inventory sources. 8698 // 8699 // This list will be absent if empty. 8700 InventorySources []*InventorySource `json:"inventorySources,omitempty"` 8701 8702 // NextPageToken: A token to retrieve the next page of results. 8703 // Pass this value in the 8704 // page_token 8705 // field in the subsequent call to `ListInventorySources` method to 8706 // retrieve 8707 // the next page of results. 8708 NextPageToken string `json:"nextPageToken,omitempty"` 8709 8710 // ServerResponse contains the HTTP response code and headers from the 8711 // server. 8712 googleapi.ServerResponse `json:"-"` 8713 8714 // ForceSendFields is a list of field names (e.g. "InventorySources") to 8715 // unconditionally include in API requests. By default, fields with 8716 // empty values are omitted from API requests. However, any non-pointer, 8717 // non-interface field appearing in ForceSendFields will be sent to the 8718 // server regardless of whether the field is empty or not. This may be 8719 // used to include empty fields in Patch requests. 8720 ForceSendFields []string `json:"-"` 8721 8722 // NullFields is a list of field names (e.g. "InventorySources") to 8723 // include in API requests with the JSON null value. By default, fields 8724 // with empty values are omitted from API requests. However, any field 8725 // with an empty value appearing in NullFields will be sent to the 8726 // server as null. It is an error if a field in this list has a 8727 // non-empty value. This may be used to include null fields in Patch 8728 // requests. 8729 NullFields []string `json:"-"` 8730} 8731 8732func (s *ListInventorySourcesResponse) MarshalJSON() ([]byte, error) { 8733 type NoMethod ListInventorySourcesResponse 8734 raw := NoMethod(*s) 8735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8736} 8737 8738// ListLineItemAssignedTargetingOptionsResponse: Response message 8739// for 8740// ListLineItemAssignedTargetingOptions. 8741type ListLineItemAssignedTargetingOptionsResponse struct { 8742 // AssignedTargetingOptions: The list of assigned targeting 8743 // options. 8744 // 8745 // This list will be absent if empty. 8746 AssignedTargetingOptions []*AssignedTargetingOption `json:"assignedTargetingOptions,omitempty"` 8747 8748 // NextPageToken: A token identifying the next page of results. This 8749 // value should be 8750 // specified as the 8751 // pageToken in a 8752 // subsequent ListLineItemAssignedTargetingOptionsRequest to fetch 8753 // the 8754 // next page of results. This token will be absent if there are no 8755 // more 8756 // assigned_targeting_options 8757 // to return. 8758 NextPageToken string `json:"nextPageToken,omitempty"` 8759 8760 // ServerResponse contains the HTTP response code and headers from the 8761 // server. 8762 googleapi.ServerResponse `json:"-"` 8763 8764 // ForceSendFields is a list of field names (e.g. 8765 // "AssignedTargetingOptions") to unconditionally include in API 8766 // requests. By default, fields with empty values are omitted from API 8767 // requests. However, any non-pointer, non-interface field appearing in 8768 // ForceSendFields will be sent to the server regardless of whether the 8769 // field is empty or not. This may be used to include empty fields in 8770 // Patch requests. 8771 ForceSendFields []string `json:"-"` 8772 8773 // NullFields is a list of field names (e.g. "AssignedTargetingOptions") 8774 // to include in API requests with the JSON null value. By default, 8775 // fields with empty values are omitted from API requests. However, any 8776 // field with an empty value appearing in NullFields will be sent to the 8777 // server as null. It is an error if a field in this list has a 8778 // non-empty value. This may be used to include null fields in Patch 8779 // requests. 8780 NullFields []string `json:"-"` 8781} 8782 8783func (s *ListLineItemAssignedTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 8784 type NoMethod ListLineItemAssignedTargetingOptionsResponse 8785 raw := NoMethod(*s) 8786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8787} 8788 8789type ListLineItemsResponse struct { 8790 // LineItems: The list of line items. 8791 // 8792 // This list will be absent if empty. 8793 LineItems []*LineItem `json:"lineItems,omitempty"` 8794 8795 // NextPageToken: A token to retrieve the next page of results. 8796 // Pass this value in the 8797 // page_token 8798 // field in the subsequent call to `ListLineItems` method to retrieve 8799 // the 8800 // next page of results. 8801 NextPageToken string `json:"nextPageToken,omitempty"` 8802 8803 // ServerResponse contains the HTTP response code and headers from the 8804 // server. 8805 googleapi.ServerResponse `json:"-"` 8806 8807 // ForceSendFields is a list of field names (e.g. "LineItems") to 8808 // unconditionally include in API requests. By default, fields with 8809 // empty values are omitted from API requests. However, any non-pointer, 8810 // non-interface field appearing in ForceSendFields will be sent to the 8811 // server regardless of whether the field is empty or not. This may be 8812 // used to include empty fields in Patch requests. 8813 ForceSendFields []string `json:"-"` 8814 8815 // NullFields is a list of field names (e.g. "LineItems") to include in 8816 // API requests with the JSON null value. By default, fields with empty 8817 // values are omitted from API requests. However, any field with an 8818 // empty value appearing in NullFields will be sent to the server as 8819 // null. It is an error if a field in this list has a non-empty value. 8820 // This may be used to include null fields in Patch requests. 8821 NullFields []string `json:"-"` 8822} 8823 8824func (s *ListLineItemsResponse) MarshalJSON() ([]byte, error) { 8825 type NoMethod ListLineItemsResponse 8826 raw := NoMethod(*s) 8827 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8828} 8829 8830type ListLocationListsResponse struct { 8831 // LocationLists: The list of location lists. 8832 // 8833 // This list will be absent if empty. 8834 LocationLists []*LocationList `json:"locationLists,omitempty"` 8835 8836 // NextPageToken: A token to retrieve the next page of results. 8837 // 8838 // Pass this value in the 8839 // page_token 8840 // field in the subsequent call to `ListLocationLists` method to 8841 // retrieve the 8842 // next page of results. 8843 NextPageToken string `json:"nextPageToken,omitempty"` 8844 8845 // ServerResponse contains the HTTP response code and headers from the 8846 // server. 8847 googleapi.ServerResponse `json:"-"` 8848 8849 // ForceSendFields is a list of field names (e.g. "LocationLists") to 8850 // unconditionally include in API requests. By default, fields with 8851 // empty values are omitted from API requests. However, any non-pointer, 8852 // non-interface field appearing in ForceSendFields will be sent to the 8853 // server regardless of whether the field is empty or not. This may be 8854 // used to include empty fields in Patch requests. 8855 ForceSendFields []string `json:"-"` 8856 8857 // NullFields is a list of field names (e.g. "LocationLists") to include 8858 // in API requests with the JSON null value. By default, fields with 8859 // empty values are omitted from API requests. However, any field with 8860 // an empty value appearing in NullFields will be sent to the server as 8861 // null. It is an error if a field in this list has a non-empty value. 8862 // This may be used to include null fields in Patch requests. 8863 NullFields []string `json:"-"` 8864} 8865 8866func (s *ListLocationListsResponse) MarshalJSON() ([]byte, error) { 8867 type NoMethod ListLocationListsResponse 8868 raw := NoMethod(*s) 8869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8870} 8871 8872// ListNegativeKeywordListsResponse: Response message for 8873// NegativeKeywordListService.ListNegativeKeywordLists. 8874type ListNegativeKeywordListsResponse struct { 8875 // NegativeKeywordLists: The list of negative keyword lists. 8876 // 8877 // This list will be absent if empty. 8878 NegativeKeywordLists []*NegativeKeywordList `json:"negativeKeywordLists,omitempty"` 8879 8880 // NextPageToken: A token to retrieve the next page of results. 8881 // 8882 // Pass this value in the 8883 // page_token 8884 // field in the subsequent call to `ListNegativeKeywordLists` method 8885 // to 8886 // retrieve the next page of results. 8887 NextPageToken string `json:"nextPageToken,omitempty"` 8888 8889 // ServerResponse contains the HTTP response code and headers from the 8890 // server. 8891 googleapi.ServerResponse `json:"-"` 8892 8893 // ForceSendFields is a list of field names (e.g. 8894 // "NegativeKeywordLists") to unconditionally include in API requests. 8895 // By default, fields with empty values are omitted from API requests. 8896 // However, any non-pointer, non-interface field appearing in 8897 // ForceSendFields will be sent to the server regardless of whether the 8898 // field is empty or not. This may be used to include empty fields in 8899 // Patch requests. 8900 ForceSendFields []string `json:"-"` 8901 8902 // NullFields is a list of field names (e.g. "NegativeKeywordLists") to 8903 // include in API requests with the JSON null value. By default, fields 8904 // with empty values are omitted from API requests. However, any field 8905 // with an empty value appearing in NullFields will be sent to the 8906 // server as null. It is an error if a field in this list has a 8907 // non-empty value. This may be used to include null fields in Patch 8908 // requests. 8909 NullFields []string `json:"-"` 8910} 8911 8912func (s *ListNegativeKeywordListsResponse) MarshalJSON() ([]byte, error) { 8913 type NoMethod ListNegativeKeywordListsResponse 8914 raw := NoMethod(*s) 8915 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8916} 8917 8918// ListTargetingOptionsResponse: Response message 8919// for 8920// ListTargetingOptions. 8921type ListTargetingOptionsResponse struct { 8922 // NextPageToken: A token to retrieve the next page of results. 8923 // Pass this value in the 8924 // page_token 8925 // field in the subsequent call to `ListTargetingOptions` method to 8926 // retrieve 8927 // the next page of results. 8928 NextPageToken string `json:"nextPageToken,omitempty"` 8929 8930 // TargetingOptions: The list of targeting options. 8931 // 8932 // This list will be absent if empty. 8933 TargetingOptions []*TargetingOption `json:"targetingOptions,omitempty"` 8934 8935 // ServerResponse contains the HTTP response code and headers from the 8936 // server. 8937 googleapi.ServerResponse `json:"-"` 8938 8939 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 8940 // unconditionally include in API requests. By default, fields with 8941 // empty values are omitted from API requests. However, any non-pointer, 8942 // non-interface field appearing in ForceSendFields will be sent to the 8943 // server regardless of whether the field is empty or not. This may be 8944 // used to include empty fields in Patch requests. 8945 ForceSendFields []string `json:"-"` 8946 8947 // NullFields is a list of field names (e.g. "NextPageToken") to include 8948 // in API requests with the JSON null value. By default, fields with 8949 // empty values are omitted from API requests. However, any field with 8950 // an empty value appearing in NullFields will be sent to the server as 8951 // null. It is an error if a field in this list has a non-empty value. 8952 // This may be used to include null fields in Patch requests. 8953 NullFields []string `json:"-"` 8954} 8955 8956func (s *ListTargetingOptionsResponse) MarshalJSON() ([]byte, error) { 8957 type NoMethod ListTargetingOptionsResponse 8958 raw := NoMethod(*s) 8959 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8960} 8961 8962// LocationList: A list of locations used for targeting. 8963type LocationList struct { 8964 // AdvertiserId: Required. Immutable. The unique ID of the advertiser 8965 // the location list belongs to. 8966 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 8967 8968 // DisplayName: Required. The display name of the location list. 8969 // Must be UTF-8 encoded with a maximum size of 240 bytes. 8970 DisplayName string `json:"displayName,omitempty"` 8971 8972 // LocationListId: Output only. The unique ID of the location list. 8973 // Assigned by the system. 8974 LocationListId int64 `json:"locationListId,omitempty,string"` 8975 8976 // LocationType: Required. Immutable. The type of location. All 8977 // locations in the list will share this type. 8978 // 8979 // Possible values: 8980 // "TARGETING_LOCATION_TYPE_UNSPECIFIED" - Default value when type is 8981 // not specified or is unknown. 8982 // "TARGETING_LOCATION_TYPE_PROXIMITY" - The type for proximity geo 8983 // location. 8984 // "TARGETING_LOCATION_TYPE_REGIONAL" - The type for regional geo 8985 // location. 8986 LocationType string `json:"locationType,omitempty"` 8987 8988 // Name: Output only. The resource name of the location list. 8989 Name string `json:"name,omitempty"` 8990 8991 // ServerResponse contains the HTTP response code and headers from the 8992 // server. 8993 googleapi.ServerResponse `json:"-"` 8994 8995 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 8996 // unconditionally include in API requests. By default, fields with 8997 // empty values are omitted from API requests. However, any non-pointer, 8998 // non-interface field appearing in ForceSendFields will be sent to the 8999 // server regardless of whether the field is empty or not. This may be 9000 // used to include empty fields in Patch requests. 9001 ForceSendFields []string `json:"-"` 9002 9003 // NullFields is a list of field names (e.g. "AdvertiserId") to include 9004 // in API requests with the JSON null value. By default, fields with 9005 // empty values are omitted from API requests. However, any field with 9006 // an empty value appearing in NullFields will be sent to the server as 9007 // null. It is an error if a field in this list has a non-empty value. 9008 // This may be used to include null fields in Patch requests. 9009 NullFields []string `json:"-"` 9010} 9011 9012func (s *LocationList) MarshalJSON() ([]byte, error) { 9013 type NoMethod LocationList 9014 raw := NoMethod(*s) 9015 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9016} 9017 9018// LookbackWindow: Specifies how many days into the past to look when 9019// determining whether to 9020// record a conversion. 9021type LookbackWindow struct { 9022 // ClickDays: Lookback window, in days, from the last time a given user 9023 // clicked on one of 9024 // your ads. 9025 ClickDays int64 `json:"clickDays,omitempty"` 9026 9027 // ImpressionDays: Lookback window, in days, from the last time a given 9028 // user viewed one of 9029 // your ads. 9030 ImpressionDays int64 `json:"impressionDays,omitempty"` 9031 9032 // ForceSendFields is a list of field names (e.g. "ClickDays") to 9033 // unconditionally include in API requests. By default, fields with 9034 // empty values are omitted from API requests. However, any non-pointer, 9035 // non-interface field appearing in ForceSendFields will be sent to the 9036 // server regardless of whether the field is empty or not. This may be 9037 // used to include empty fields in Patch requests. 9038 ForceSendFields []string `json:"-"` 9039 9040 // NullFields is a list of field names (e.g. "ClickDays") to include in 9041 // API requests with the JSON null value. By default, fields with empty 9042 // values are omitted from API requests. However, any field with an 9043 // empty value appearing in NullFields will be sent to the server as 9044 // null. It is an error if a field in this list has a non-empty value. 9045 // This may be used to include null fields in Patch requests. 9046 NullFields []string `json:"-"` 9047} 9048 9049func (s *LookbackWindow) MarshalJSON() ([]byte, error) { 9050 type NoMethod LookbackWindow 9051 raw := NoMethod(*s) 9052 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9053} 9054 9055// MaximizeSpendBidStrategy: A strategy that automatically adjusts the 9056// bid to optimize a specified 9057// performance goal while spending the full budget. 9058type MaximizeSpendBidStrategy struct { 9059 // MaxAverageCpmBidAmountMicros: The maximum average CPM that may be 9060 // bid, in micros of the advertiser's 9061 // currency. Must be greater than or equal to a billable unit of the 9062 // given 9063 // currency. 9064 // 9065 // For example, 1500000 represents 1.5 standard units of the currency. 9066 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"` 9067 9068 // PerformanceGoalType: Required. The type of the performance goal that 9069 // the bidding strategy 9070 // tries to minimize while spending the full 9071 // budget. 9072 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM` is not 9073 // supported for 9074 // this strategy. 9075 // 9076 // Possible values: 9077 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_UNSPECIFIED" - Type value 9078 // is not specified or is unknown in this version. 9079 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA" - Cost per action. 9080 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC" - Cost per click. 9081 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM" - Viewable 9082 // CPM. 9083 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA" - Completed inview 9084 // and audible views. 9085 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN" - Inview time over 9086 // 10 secs views. 9087 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED" - Viewable 9088 // impressions. 9089 PerformanceGoalType string `json:"performanceGoalType,omitempty"` 9090 9091 // ForceSendFields is a list of field names (e.g. 9092 // "MaxAverageCpmBidAmountMicros") to unconditionally include in API 9093 // requests. By default, fields with empty values are omitted from API 9094 // requests. However, any non-pointer, non-interface field appearing in 9095 // ForceSendFields will be sent to the server regardless of whether the 9096 // field is empty or not. This may be used to include empty fields in 9097 // Patch requests. 9098 ForceSendFields []string `json:"-"` 9099 9100 // NullFields is a list of field names (e.g. 9101 // "MaxAverageCpmBidAmountMicros") to include in API requests with the 9102 // JSON null value. By default, fields with empty values are omitted 9103 // from API requests. However, any field with an empty value appearing 9104 // in NullFields will be sent to the server as null. It is an error if a 9105 // field in this list has a non-empty value. This may be used to include 9106 // null fields in Patch requests. 9107 NullFields []string `json:"-"` 9108} 9109 9110func (s *MaximizeSpendBidStrategy) MarshalJSON() ([]byte, error) { 9111 type NoMethod MaximizeSpendBidStrategy 9112 raw := NoMethod(*s) 9113 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9114} 9115 9116// Money: Represents an amount of money with its currency type. 9117type Money struct { 9118 // CurrencyCode: The 3-letter currency code defined in ISO 4217. 9119 CurrencyCode string `json:"currencyCode,omitempty"` 9120 9121 // Nanos: Number of nano (10^-9) units of the amount. 9122 // The value must be between -999,999,999 and +999,999,999 inclusive. 9123 // If `units` is positive, `nanos` must be positive or zero. 9124 // If `units` is zero, `nanos` can be positive, zero, or negative. 9125 // If `units` is negative, `nanos` must be negative or zero. 9126 // For example $-1.75 is represented as `units`=-1 and 9127 // `nanos`=-750,000,000. 9128 Nanos int64 `json:"nanos,omitempty"` 9129 9130 // Units: The whole units of the amount. 9131 // For example if `currencyCode` is "USD", then 1 unit is one US 9132 // dollar. 9133 Units int64 `json:"units,omitempty,string"` 9134 9135 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 9136 // unconditionally include in API requests. By default, fields with 9137 // empty values are omitted from API requests. However, any non-pointer, 9138 // non-interface field appearing in ForceSendFields will be sent to the 9139 // server regardless of whether the field is empty or not. This may be 9140 // used to include empty fields in Patch requests. 9141 ForceSendFields []string `json:"-"` 9142 9143 // NullFields is a list of field names (e.g. "CurrencyCode") to include 9144 // in API requests with the JSON null value. By default, fields with 9145 // empty values are omitted from API requests. However, any field with 9146 // an empty value appearing in NullFields will be sent to the server as 9147 // null. It is an error if a field in this list has a non-empty value. 9148 // This may be used to include null fields in Patch requests. 9149 NullFields []string `json:"-"` 9150} 9151 9152func (s *Money) MarshalJSON() ([]byte, error) { 9153 type NoMethod Money 9154 raw := NoMethod(*s) 9155 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9156} 9157 9158// NegativeKeywordList: A list of negative keywords used for targeting. 9159type NegativeKeywordList struct { 9160 // AdvertiserId: Output only. The unique ID of the advertiser the 9161 // negative keyword list belongs to. 9162 AdvertiserId int64 `json:"advertiserId,omitempty,string"` 9163 9164 // DisplayName: Required. The display name of the negative keyword 9165 // list. 9166 // Must be UTF-8 encoded with a maximum size of 255 bytes. 9167 DisplayName string `json:"displayName,omitempty"` 9168 9169 // Name: Output only. The resource name of the negative keyword list. 9170 Name string `json:"name,omitempty"` 9171 9172 // NegativeKeywordListId: Output only. The unique ID of the negative 9173 // keyword list. Assigned by the system. 9174 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"` 9175 9176 // ServerResponse contains the HTTP response code and headers from the 9177 // server. 9178 googleapi.ServerResponse `json:"-"` 9179 9180 // ForceSendFields is a list of field names (e.g. "AdvertiserId") to 9181 // unconditionally include in API requests. By default, fields with 9182 // empty values are omitted from API requests. However, any non-pointer, 9183 // non-interface field appearing in ForceSendFields will be sent to the 9184 // server regardless of whether the field is empty or not. This may be 9185 // used to include empty fields in Patch requests. 9186 ForceSendFields []string `json:"-"` 9187 9188 // NullFields is a list of field names (e.g. "AdvertiserId") to include 9189 // in API requests with the JSON null value. By default, fields with 9190 // empty values are omitted from API requests. However, any field with 9191 // an empty value appearing in NullFields will be sent to the server as 9192 // null. It is an error if a field in this list has a non-empty value. 9193 // This may be used to include null fields in Patch requests. 9194 NullFields []string `json:"-"` 9195} 9196 9197func (s *NegativeKeywordList) MarshalJSON() ([]byte, error) { 9198 type NoMethod NegativeKeywordList 9199 raw := NoMethod(*s) 9200 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9201} 9202 9203// NegativeKeywordListAssignedTargetingOptionDetails: Targeting details 9204// for negative keyword list. This will be populated in the 9205// details field of an AssignedTargetingOption when 9206// targeting_type is 9207// `TARGETING_TYPE_NEGATIVE_KEYWORD_LIST`. 9208type NegativeKeywordListAssignedTargetingOptionDetails struct { 9209 // NegativeKeywordListId: Required. ID of the negative keyword list. 9210 // Should refer to the 9211 // negative_keyword_list_id 9212 // field of a NegativeKeywordList resource. 9213 NegativeKeywordListId int64 `json:"negativeKeywordListId,omitempty,string"` 9214 9215 // ForceSendFields is a list of field names (e.g. 9216 // "NegativeKeywordListId") to unconditionally include in API requests. 9217 // By default, fields with empty values are omitted from API requests. 9218 // However, any non-pointer, non-interface field appearing in 9219 // ForceSendFields will be sent to the server regardless of whether the 9220 // field is empty or not. This may be used to include empty fields in 9221 // Patch requests. 9222 ForceSendFields []string `json:"-"` 9223 9224 // NullFields is a list of field names (e.g. "NegativeKeywordListId") to 9225 // include in API requests with the JSON null value. By default, fields 9226 // with empty values are omitted from API requests. However, any field 9227 // with an empty value appearing in NullFields will be sent to the 9228 // server as null. It is an error if a field in this list has a 9229 // non-empty value. This may be used to include null fields in Patch 9230 // requests. 9231 NullFields []string `json:"-"` 9232} 9233 9234func (s *NegativeKeywordListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9235 type NoMethod NegativeKeywordListAssignedTargetingOptionDetails 9236 raw := NoMethod(*s) 9237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9238} 9239 9240// ObaIcon: OBA Icon for a Creative 9241type ObaIcon struct { 9242 // ClickTrackingUrl: Required. The click tracking URL of the OBA 9243 // icon. 9244 // 9245 // Only URLs of the following domains are allowed: 9246 // 9247 // * https://info.evidon.com 9248 // * https://l.betrad.com 9249 ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"` 9250 9251 // Dimensions: The dimensions of the OBA icon. 9252 Dimensions *Dimensions `json:"dimensions,omitempty"` 9253 9254 // LandingPageUrl: Required. The landing page URL of the OBA icon. 9255 // 9256 // Only URLs of the following domains are allowed: 9257 // 9258 // * https://info.evidon.com 9259 // * https://l.betrad.com 9260 LandingPageUrl string `json:"landingPageUrl,omitempty"` 9261 9262 // Position: The position of the OBA icon on the creative. 9263 // 9264 // Possible values: 9265 // "OBA_ICON_POSITION_UNSPECIFIED" - The OBA icon position is not 9266 // specified. 9267 // "OBA_ICON_POSITION_UPPER_RIGHT" - At the upper right side of the 9268 // creative. 9269 // "OBA_ICON_POSITION_UPPER_LEFT" - At the upper left side of the 9270 // creative. 9271 // "OBA_ICON_POSITION_LOWER_RIGHT" - At the lower right side of the 9272 // creative. 9273 // "OBA_ICON_POSITION_LOWER_LEFT" - At the lower left side of the 9274 // creative. 9275 Position string `json:"position,omitempty"` 9276 9277 // Program: The program of the OBA icon. For example: “AdChoices”. 9278 Program string `json:"program,omitempty"` 9279 9280 // ResourceMimeType: The MIME type of the OBA icon resource. 9281 ResourceMimeType string `json:"resourceMimeType,omitempty"` 9282 9283 // ResourceUrl: The URL of the OBA icon resource. 9284 ResourceUrl string `json:"resourceUrl,omitempty"` 9285 9286 // ViewTrackingUrl: Required. The view tracking URL of the OBA 9287 // icon. 9288 // 9289 // Only URLs of the following domains are allowed: 9290 // 9291 // * https://info.evidon.com 9292 // * https://l.betrad.com 9293 ViewTrackingUrl string `json:"viewTrackingUrl,omitempty"` 9294 9295 // ForceSendFields is a list of field names (e.g. "ClickTrackingUrl") to 9296 // unconditionally include in API requests. By default, fields with 9297 // empty values are omitted from API requests. However, any non-pointer, 9298 // non-interface field appearing in ForceSendFields will be sent to the 9299 // server regardless of whether the field is empty or not. This may be 9300 // used to include empty fields in Patch requests. 9301 ForceSendFields []string `json:"-"` 9302 9303 // NullFields is a list of field names (e.g. "ClickTrackingUrl") to 9304 // include in API requests with the JSON null value. By default, fields 9305 // with empty values are omitted from API requests. However, any field 9306 // with an empty value appearing in NullFields will be sent to the 9307 // server as null. It is an error if a field in this list has a 9308 // non-empty value. This may be used to include null fields in Patch 9309 // requests. 9310 NullFields []string `json:"-"` 9311} 9312 9313func (s *ObaIcon) MarshalJSON() ([]byte, error) { 9314 type NoMethod ObaIcon 9315 raw := NoMethod(*s) 9316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9317} 9318 9319// OnScreenPositionAssignedTargetingOptionDetails: On screen position 9320// targeting option details. This will be 9321// populated in the 9322// on_screen_position_details 9323// field when 9324// targeting_type is 9325// `TARGETING_TYPE_ON_SCREEN_POSITION`. 9326type OnScreenPositionAssignedTargetingOptionDetails struct { 9327 // OnScreenPosition: Output only. The on screen position. 9328 // 9329 // Possible values: 9330 // "ON_SCREEN_POSITION_UNSPECIFIED" - On screen position is not 9331 // specified in this version. This enum is a place 9332 // holder for a default value and does not represent a real on 9333 // screen 9334 // position. 9335 // "ON_SCREEN_POSITION_UNKNOWN" - The ad position is unknown on the 9336 // screen. 9337 // "ON_SCREEN_POSITION_ABOVE_THE_FOLD" - The ad is located above the 9338 // fold. 9339 // "ON_SCREEN_POSITION_BELOW_THE_FOLD" - The ad is located below the 9340 // fold. 9341 OnScreenPosition string `json:"onScreenPosition,omitempty"` 9342 9343 // TargetingOptionId: Required. The targeting_option_id field 9344 // when 9345 // targeting_type is 9346 // `TARGETING_TYPE_ON_SCREEN_POSITION`. 9347 TargetingOptionId string `json:"targetingOptionId,omitempty"` 9348 9349 // ForceSendFields is a list of field names (e.g. "OnScreenPosition") to 9350 // unconditionally include in API requests. By default, fields with 9351 // empty values are omitted from API requests. However, any non-pointer, 9352 // non-interface field appearing in ForceSendFields will be sent to the 9353 // server regardless of whether the field is empty or not. This may be 9354 // used to include empty fields in Patch requests. 9355 ForceSendFields []string `json:"-"` 9356 9357 // NullFields is a list of field names (e.g. "OnScreenPosition") to 9358 // include in API requests with the JSON null value. By default, fields 9359 // with empty values are omitted from API requests. However, any field 9360 // with an empty value appearing in NullFields will be sent to the 9361 // server as null. It is an error if a field in this list has a 9362 // non-empty value. This may be used to include null fields in Patch 9363 // requests. 9364 NullFields []string `json:"-"` 9365} 9366 9367func (s *OnScreenPositionAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9368 type NoMethod OnScreenPositionAssignedTargetingOptionDetails 9369 raw := NoMethod(*s) 9370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9371} 9372 9373// OnScreenPositionTargetingOptionDetails: Represents a targetable on 9374// screen position, which could be used by display 9375// and video ads. This will be populated in 9376// the 9377// on_screen_position_details 9378// field when 9379// targeting_type is 9380// `TARGETING_TYPE_ON_SCREEN_POSITION`. 9381type OnScreenPositionTargetingOptionDetails struct { 9382 // OnScreenPosition: Output only. The on screen position. 9383 // 9384 // Possible values: 9385 // "ON_SCREEN_POSITION_UNSPECIFIED" - On screen position is not 9386 // specified in this version. This enum is a place 9387 // holder for a default value and does not represent a real on 9388 // screen 9389 // position. 9390 // "ON_SCREEN_POSITION_UNKNOWN" - The ad position is unknown on the 9391 // screen. 9392 // "ON_SCREEN_POSITION_ABOVE_THE_FOLD" - The ad is located above the 9393 // fold. 9394 // "ON_SCREEN_POSITION_BELOW_THE_FOLD" - The ad is located below the 9395 // fold. 9396 OnScreenPosition string `json:"onScreenPosition,omitempty"` 9397 9398 // ForceSendFields is a list of field names (e.g. "OnScreenPosition") to 9399 // unconditionally include in API requests. By default, fields with 9400 // empty values are omitted from API requests. However, any non-pointer, 9401 // non-interface field appearing in ForceSendFields will be sent to the 9402 // server regardless of whether the field is empty or not. This may be 9403 // used to include empty fields in Patch requests. 9404 ForceSendFields []string `json:"-"` 9405 9406 // NullFields is a list of field names (e.g. "OnScreenPosition") to 9407 // include in API requests with the JSON null value. By default, fields 9408 // with empty values are omitted from API requests. However, any field 9409 // with an empty value appearing in NullFields will be sent to the 9410 // server as null. It is an error if a field in this list has a 9411 // non-empty value. This may be used to include null fields in Patch 9412 // requests. 9413 NullFields []string `json:"-"` 9414} 9415 9416func (s *OnScreenPositionTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9417 type NoMethod OnScreenPositionTargetingOptionDetails 9418 raw := NoMethod(*s) 9419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9420} 9421 9422// OperatingSystemAssignedTargetingOptionDetails: Assigned operating 9423// system targeting option details. This will be 9424// populated in the 9425// operating_system_details 9426// field when 9427// targeting_type is 9428// `TARGETING_TYPE_OPERATING_SYSTEM`. 9429type OperatingSystemAssignedTargetingOptionDetails struct { 9430 // DisplayName: Output only. The display name of the operating system. 9431 DisplayName string `json:"displayName,omitempty"` 9432 9433 // Negative: Indicates if this option is being negatively targeted. 9434 Negative bool `json:"negative,omitempty"` 9435 9436 // TargetingOptionId: Required. The targeting option ID populated 9437 // in 9438 // targeting_option_id field when 9439 // targeting_type is 9440 // `TARGETING_TYPE_OPERATING_SYSTEM`. 9441 TargetingOptionId string `json:"targetingOptionId,omitempty"` 9442 9443 // ForceSendFields is a list of field names (e.g. "DisplayName") to 9444 // unconditionally include in API requests. By default, fields with 9445 // empty values are omitted from API requests. However, any non-pointer, 9446 // non-interface field appearing in ForceSendFields will be sent to the 9447 // server regardless of whether the field is empty or not. This may be 9448 // used to include empty fields in Patch requests. 9449 ForceSendFields []string `json:"-"` 9450 9451 // NullFields is a list of field names (e.g. "DisplayName") to include 9452 // in API requests with the JSON null value. By default, fields with 9453 // empty values are omitted from API requests. However, any field with 9454 // an empty value appearing in NullFields will be sent to the server as 9455 // null. It is an error if a field in this list has a non-empty value. 9456 // This may be used to include null fields in Patch requests. 9457 NullFields []string `json:"-"` 9458} 9459 9460func (s *OperatingSystemAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9461 type NoMethod OperatingSystemAssignedTargetingOptionDetails 9462 raw := NoMethod(*s) 9463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9464} 9465 9466// OperatingSystemTargetingOptionDetails: Represents a targetable 9467// operating system. This will be populated in 9468// the 9469// operating_system_details field 9470// of a TargetingOption when 9471// targeting_type is 9472// `TARGETING_TYPE_OPERATING_SYSTEM`. 9473type OperatingSystemTargetingOptionDetails struct { 9474 // DisplayName: Output only. The display name of the operating system. 9475 DisplayName string `json:"displayName,omitempty"` 9476 9477 // ForceSendFields is a list of field names (e.g. "DisplayName") to 9478 // unconditionally include in API requests. By default, fields with 9479 // empty values are omitted from API requests. However, any non-pointer, 9480 // non-interface field appearing in ForceSendFields will be sent to the 9481 // server regardless of whether the field is empty or not. This may be 9482 // used to include empty fields in Patch requests. 9483 ForceSendFields []string `json:"-"` 9484 9485 // NullFields is a list of field names (e.g. "DisplayName") to include 9486 // in API requests with the JSON null value. By default, fields with 9487 // empty values are omitted from API requests. However, any field with 9488 // an empty value appearing in NullFields will be sent to the server as 9489 // null. It is an error if a field in this list has a non-empty value. 9490 // This may be used to include null fields in Patch requests. 9491 NullFields []string `json:"-"` 9492} 9493 9494func (s *OperatingSystemTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9495 type NoMethod OperatingSystemTargetingOptionDetails 9496 raw := NoMethod(*s) 9497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9498} 9499 9500// Operation: This resource represents a long-running operation that is 9501// the result of a 9502// network API call. 9503type Operation struct { 9504 // Done: If the value is `false`, it means the operation is still in 9505 // progress. 9506 // If `true`, the operation is completed, and either `error` or 9507 // `response` is 9508 // available. 9509 Done bool `json:"done,omitempty"` 9510 9511 // Error: The error result of the operation in case of failure or 9512 // cancellation. 9513 Error *Status `json:"error,omitempty"` 9514 9515 // Metadata: Service-specific metadata associated with the operation. 9516 // It typically 9517 // contains progress information and common metadata such as create 9518 // time. 9519 // Some services might not provide such metadata. Any method that 9520 // returns a 9521 // long-running operation should document the metadata type, if any. 9522 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 9523 9524 // Name: The server-assigned name, which is only unique within the same 9525 // service that 9526 // originally returns it. If you use the default HTTP mapping, 9527 // the 9528 // `name` should be a resource name ending with 9529 // `operations/{unique_id}`. 9530 Name string `json:"name,omitempty"` 9531 9532 // Response: The normal response of the operation in case of success. 9533 // If the original 9534 // method returns no data on success, such as `Delete`, the response 9535 // is 9536 // `google.protobuf.Empty`. If the original method is 9537 // standard 9538 // `Get`/`Create`/`Update`, the response should be the resource. For 9539 // other 9540 // methods, the response should have the type `XxxResponse`, where 9541 // `Xxx` 9542 // is the original method name. For example, if the original method 9543 // name 9544 // is `TakeSnapshot()`, the inferred response type 9545 // is 9546 // `TakeSnapshotResponse`. 9547 Response googleapi.RawMessage `json:"response,omitempty"` 9548 9549 // ServerResponse contains the HTTP response code and headers from the 9550 // server. 9551 googleapi.ServerResponse `json:"-"` 9552 9553 // ForceSendFields is a list of field names (e.g. "Done") to 9554 // unconditionally include in API requests. By default, fields with 9555 // empty values are omitted from API requests. However, any non-pointer, 9556 // non-interface field appearing in ForceSendFields will be sent to the 9557 // server regardless of whether the field is empty or not. This may be 9558 // used to include empty fields in Patch requests. 9559 ForceSendFields []string `json:"-"` 9560 9561 // NullFields is a list of field names (e.g. "Done") to include in API 9562 // requests with the JSON null value. By default, fields with empty 9563 // values are omitted from API requests. However, any field with an 9564 // empty value appearing in NullFields will be sent to the server as 9565 // null. It is an error if a field in this list has a non-empty value. 9566 // This may be used to include null fields in Patch requests. 9567 NullFields []string `json:"-"` 9568} 9569 9570func (s *Operation) MarshalJSON() ([]byte, error) { 9571 type NoMethod Operation 9572 raw := NoMethod(*s) 9573 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9574} 9575 9576// Pacing: Settings that control the rate at which a budget is spent. 9577type Pacing struct { 9578 // DailyMaxImpressions: Maximum number of impressions to serve every 9579 // day. 9580 // 9581 // Applicable when the budget is impression based. Must be greater than 9582 // 0. 9583 DailyMaxImpressions int64 `json:"dailyMaxImpressions,omitempty,string"` 9584 9585 // DailyMaxMicros: Maximum currency amount to spend every day in micros 9586 // of 9587 // advertiser's currency. 9588 // 9589 // Applicable when the budget is currency based. Must be greater than 9590 // 0. 9591 // For example, for 1.5 standard unit of the currency, set this field 9592 // to 9593 // 1500000. 9594 // 9595 // The value assigned will be rounded to whole billable units for 9596 // the 9597 // relevant currency by the following rules: any positive value less 9598 // than a 9599 // single billable unit will be rounded up to one billable unit and 9600 // any 9601 // value larger than a single billable unit will be rounded down to 9602 // the 9603 // nearest billable value. For example, if the currency's billable unit 9604 // is 9605 // 0.01, and this field is set to 10257770, it will round down to 9606 // 10250000, 9607 // a value of 10.25. If set to 505, it will round up to 10000, a value 9608 // of 9609 // 0.01. 9610 DailyMaxMicros int64 `json:"dailyMaxMicros,omitempty,string"` 9611 9612 // PacingPeriod: Required. The time period in which the pacing budget 9613 // will be spent. 9614 // 9615 // When automatic budget allocation is enabled at the insertion order 9616 // via 9617 // auto_budget_allocation, this 9618 // field is output only and defaults to `PACING_PERIOD_FLIGHT`. 9619 // 9620 // Possible values: 9621 // "PACING_PERIOD_UNSPECIFIED" - Period value is not specified or is 9622 // unknown in this version. 9623 // "PACING_PERIOD_DAILY" - The pacing setting will be applied on daily 9624 // basis. 9625 // "PACING_PERIOD_FLIGHT" - The pacing setting will be applied to the 9626 // whole flight duration. 9627 PacingPeriod string `json:"pacingPeriod,omitempty"` 9628 9629 // PacingType: Required. The type of pacing that defines how the budget 9630 // amount will be 9631 // spent across the pacing_period. 9632 // 9633 // Possible values: 9634 // "PACING_TYPE_UNSPECIFIED" - Pacing mode value is not specified or 9635 // is unknown in this version. 9636 // "PACING_TYPE_AHEAD" - Only applicable to `PACING_PERIOD_FLIGHT` 9637 // pacing period. 9638 // Ahead pacing attempts to spend faster than evenly, to make sure 9639 // the 9640 // entire budget is spent by the end of the flight. 9641 // "PACING_TYPE_ASAP" - Spend all of pacing budget amount as quick as 9642 // possible. 9643 // "PACING_TYPE_EVEN" - Spend a consistent budget amount every period 9644 // of time. 9645 PacingType string `json:"pacingType,omitempty"` 9646 9647 // ForceSendFields is a list of field names (e.g. "DailyMaxImpressions") 9648 // to unconditionally include in API requests. By default, fields with 9649 // empty values are omitted from API requests. However, any non-pointer, 9650 // non-interface field appearing in ForceSendFields will be sent to the 9651 // server regardless of whether the field is empty or not. This may be 9652 // used to include empty fields in Patch requests. 9653 ForceSendFields []string `json:"-"` 9654 9655 // NullFields is a list of field names (e.g. "DailyMaxImpressions") to 9656 // include in API requests with the JSON null value. By default, fields 9657 // with empty values are omitted from API requests. However, any field 9658 // with an empty value appearing in NullFields will be sent to the 9659 // server as null. It is an error if a field in this list has a 9660 // non-empty value. This may be used to include null fields in Patch 9661 // requests. 9662 NullFields []string `json:"-"` 9663} 9664 9665func (s *Pacing) MarshalJSON() ([]byte, error) { 9666 type NoMethod Pacing 9667 raw := NoMethod(*s) 9668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9669} 9670 9671// ParentEntityFilter: A filtering option that filters on selected file 9672// types belonging to a chosen 9673// set of filter entities. 9674type ParentEntityFilter struct { 9675 // FileType: Required. File types that will be returned. 9676 // 9677 // Possible values: 9678 // "FILE_TYPE_UNSPECIFIED" - Default value when type is unspecified or 9679 // is unknown in this version. 9680 // "FILE_TYPE_CAMPAIGN" - Campaign. 9681 // "FILE_TYPE_MEDIA_PRODUCT" - Media Product. 9682 // "FILE_TYPE_INSERTION_ORDER" - Insertion Order. 9683 // "FILE_TYPE_LINE_ITEM" - Line Item. 9684 // "FILE_TYPE_AD_GROUP" - TrueView Ad Group. 9685 // "FILE_TYPE_AD" - TrueView Ad. 9686 FileType []string `json:"fileType,omitempty"` 9687 9688 // FilterIds: The IDs of the specified filter type. This is used to 9689 // filter entities to 9690 // fetch. If filter type is not `FILTER_TYPE_NONE`, at least one ID must 9691 // be 9692 // specified. 9693 FilterIds googleapi.Int64s `json:"filterIds,omitempty"` 9694 9695 // FilterType: Required. Filter type used to filter fetched entities. 9696 // 9697 // Possible values: 9698 // "FILTER_TYPE_UNSPECIFIED" - Default value when type is unspecified 9699 // or is unknown in this version. 9700 // "FILTER_TYPE_NONE" - If selected, no filter will be applied to the 9701 // download. Can only be used if 9702 // an Advertiser is specified 9703 // in CreateSdfDownloadTaskRequest. 9704 // "FILTER_TYPE_ADVERTISER_ID" - Advertiser ID. If selected, all 9705 // filter IDs must be Advertiser IDs that 9706 // belong to the Partner specified 9707 // in CreateSdfDownloadTaskRequest. 9708 // "FILTER_TYPE_CAMPAIGN_ID" - Campaign ID. If selected, all filter 9709 // IDs must be Campaign IDs that belong 9710 // to the Advertiser or 9711 // Partner specified in 9712 // CreateSdfDownloadTaskRequest. 9713 // "FILTER_TYPE_MEDIA_PRODUCT_ID" - Media Product ID. If selected, all 9714 // filter IDs must be Media Product IDs 9715 // that belong to the Advertiser 9716 // or Partner specified in 9717 // CreateSdfDownloadTaskRequest. Can only be used for 9718 // downloading 9719 // `FILE_TYPE_MEDIA_PRODUCT`. 9720 // "FILTER_TYPE_INSERTION_ORDER_ID" - Insertion Order ID. If selected, 9721 // all filter IDs must be Insertion Order IDs 9722 // that belong to the Advertiser 9723 // or Partner specified in 9724 // CreateSdfDownloadTaskRequest. Can only be used for 9725 // downloading 9726 // `FILE_TYPE_INSERTION_ORDER`, `FILE_TYPE_LINE_ITEM`, 9727 // `FILE_TYPE_AD_GROUP`, 9728 // and `FILE_TYPE_AD`. 9729 // "FILTER_TYPE_LINE_ITEM_ID" - Line Item ID. If selected, all filter 9730 // IDs must be Line Item IDs that belong 9731 // to the Advertiser or 9732 // Partner specified in 9733 // CreateSdfDownloadTaskRequest. Can only be used for 9734 // downloading 9735 // `FILE_TYPE_LINE_ITEM`, `FILE_TYPE_AD_GROUP`, and `FILE_TYPE_AD`. 9736 FilterType string `json:"filterType,omitempty"` 9737 9738 // ForceSendFields is a list of field names (e.g. "FileType") to 9739 // unconditionally include in API requests. By default, fields with 9740 // empty values are omitted from API requests. However, any non-pointer, 9741 // non-interface field appearing in ForceSendFields will be sent to the 9742 // server regardless of whether the field is empty or not. This may be 9743 // used to include empty fields in Patch requests. 9744 ForceSendFields []string `json:"-"` 9745 9746 // NullFields is a list of field names (e.g. "FileType") to include in 9747 // API requests with the JSON null value. By default, fields with empty 9748 // values are omitted from API requests. However, any field with an 9749 // empty value appearing in NullFields will be sent to the server as 9750 // null. It is an error if a field in this list has a non-empty value. 9751 // This may be used to include null fields in Patch requests. 9752 NullFields []string `json:"-"` 9753} 9754 9755func (s *ParentEntityFilter) MarshalJSON() ([]byte, error) { 9756 type NoMethod ParentEntityFilter 9757 raw := NoMethod(*s) 9758 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9759} 9760 9761// ParentalStatusAssignedTargetingOptionDetails: Details for assigned 9762// parental status targeting option. This will be 9763// populated in the details field of an AssignedTargetingOption 9764// when 9765// targeting_type is 9766// `TARTGETING_TYPE_PARENTAL_STATUS`. 9767type ParentalStatusAssignedTargetingOptionDetails struct { 9768 // ParentalStatus: Output only. The parental status of the audience. 9769 // 9770 // Possible values: 9771 // "PARENTAL_STATUS_UNSPECIFIED" - Default value when parental status 9772 // is not specified in this version. This 9773 // enum is a place holder for default value and does not represent a 9774 // real 9775 // parental status option. 9776 // "PARENTAL_STATUS_PARENT" - The audience is a parent. 9777 // "PARENTAL_STATUS_NOT_A_PARENT" - The audience is not a parent. 9778 // "PARENTAL_STATUS_UNKNOWN" - The parental status of the audience is 9779 // unknown. 9780 ParentalStatus string `json:"parentalStatus,omitempty"` 9781 9782 // TargetingOptionId: Required. The targeting_option_id of 9783 // a 9784 // TargetingOption of type `TARGETING_TYPE_PARENTAL_STATUS`. 9785 TargetingOptionId string `json:"targetingOptionId,omitempty"` 9786 9787 // ForceSendFields is a list of field names (e.g. "ParentalStatus") to 9788 // unconditionally include in API requests. By default, fields with 9789 // empty values are omitted from API requests. However, any non-pointer, 9790 // non-interface field appearing in ForceSendFields will be sent to the 9791 // server regardless of whether the field is empty or not. This may be 9792 // used to include empty fields in Patch requests. 9793 ForceSendFields []string `json:"-"` 9794 9795 // NullFields is a list of field names (e.g. "ParentalStatus") to 9796 // include in API requests with the JSON null value. By default, fields 9797 // with empty values are omitted from API requests. However, any field 9798 // with an empty value appearing in NullFields will be sent to the 9799 // server as null. It is an error if a field in this list has a 9800 // non-empty value. This may be used to include null fields in Patch 9801 // requests. 9802 NullFields []string `json:"-"` 9803} 9804 9805func (s *ParentalStatusAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9806 type NoMethod ParentalStatusAssignedTargetingOptionDetails 9807 raw := NoMethod(*s) 9808 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9809} 9810 9811// ParentalStatusTargetingOptionDetails: Represents a targetable 9812// parental status. This will be populated in 9813// the 9814// parental_status_details field of a 9815// TargetingOption when targeting_type 9816// is 9817// `TARGETING_TYPE_PARENTAL_STATUS`. 9818type ParentalStatusTargetingOptionDetails struct { 9819 // ParentalStatus: Output only. The parental status of an audience. 9820 // 9821 // Possible values: 9822 // "PARENTAL_STATUS_UNSPECIFIED" - Default value when parental status 9823 // is not specified in this version. This 9824 // enum is a place holder for default value and does not represent a 9825 // real 9826 // parental status option. 9827 // "PARENTAL_STATUS_PARENT" - The audience is a parent. 9828 // "PARENTAL_STATUS_NOT_A_PARENT" - The audience is not a parent. 9829 // "PARENTAL_STATUS_UNKNOWN" - The parental status of the audience is 9830 // unknown. 9831 ParentalStatus string `json:"parentalStatus,omitempty"` 9832 9833 // ForceSendFields is a list of field names (e.g. "ParentalStatus") to 9834 // unconditionally include in API requests. By default, fields with 9835 // empty values are omitted from API requests. However, any non-pointer, 9836 // non-interface field appearing in ForceSendFields will be sent to the 9837 // server regardless of whether the field is empty or not. This may be 9838 // used to include empty fields in Patch requests. 9839 ForceSendFields []string `json:"-"` 9840 9841 // NullFields is a list of field names (e.g. "ParentalStatus") to 9842 // include in API requests with the JSON null value. By default, fields 9843 // with empty values are omitted from API requests. However, any field 9844 // with an empty value appearing in NullFields will be sent to the 9845 // server as null. It is an error if a field in this list has a 9846 // non-empty value. This may be used to include null fields in Patch 9847 // requests. 9848 NullFields []string `json:"-"` 9849} 9850 9851func (s *ParentalStatusTargetingOptionDetails) MarshalJSON() ([]byte, error) { 9852 type NoMethod ParentalStatusTargetingOptionDetails 9853 raw := NoMethod(*s) 9854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9855} 9856 9857// PartnerCost: Settings that control a partner cost. 9858// 9859// A partner cost is any type of expense involved in running a campaign, 9860// other 9861// than the costs of purchasing impressions (which is called the media 9862// cost) 9863// and using third-party audience segment data (data fee). Some examples 9864// of 9865// partner costs include the fees for using DV360, a third-party ad 9866// server, 9867// or a third-party ad serving verification service. 9868type PartnerCost struct { 9869 // CostType: Required. The type of the partner cost. 9870 // 9871 // Possible values: 9872 // "PARTNER_COST_TYPE_UNSPECIFIED" - Type value is not specified or is 9873 // unknown in this version. 9874 // "PARTNER_COST_TYPE_ADLOOX" - The cost is charged for using Adloox. 9875 // "PARTNER_COST_TYPE_ADLOOX_PREBID" - The cost is charged for using 9876 // Adloox Pre-Bid. 9877 // "PARTNER_COST_TYPE_ADSAFE" - The cost is charged for using AdSafe. 9878 // "PARTNER_COST_TYPE_ADXPOSE" - The cost is charged for using 9879 // AdExpose. 9880 // "PARTNER_COST_TYPE_AGGREGATE_KNOWLEDGE" - The cost is charged for 9881 // using Aggregate Knowledge. 9882 // "PARTNER_COST_TYPE_AGENCY_TRADING_DESK" - The cost is charged for 9883 // using an Agency Trading Desk. 9884 // "PARTNER_COST_TYPE_DV360_FEE" - The cost is charged for using 9885 // DV360. 9886 // "PARTNER_COST_TYPE_COMSCORE_VCE" - The cost is charged for using 9887 // comScore vCE. 9888 // "PARTNER_COST_TYPE_DATA_MANAGEMENT_PLATFORM" - The cost is charged 9889 // for using a Data Management Platform. 9890 // "PARTNER_COST_TYPE_DEFAULT" - The default cost type. 9891 // "PARTNER_COST_TYPE_DOUBLE_VERIFY" - The cost is charged for using 9892 // DoubleVerify. 9893 // "PARTNER_COST_TYPE_DOUBLE_VERIFY_PREBID" - The cost is charged for 9894 // using DoubleVerify Pre-Bid. 9895 // "PARTNER_COST_TYPE_EVIDON" - The cost is charged for using Evidon. 9896 // "PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_VIDEO" - The cost is charged 9897 // for using Integral Ad Science Video. 9898 // "PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_PREBID" - The cost is 9899 // charged for using Integral Ad Science Pre-Bid. 9900 // "PARTNER_COST_TYPE_MEDIA_COST_DATA" - The cost is charged for using 9901 // media cost data. 9902 // "PARTNER_COST_TYPE_MOAT_VIDEO" - The cost is charged for using MOAT 9903 // Video. 9904 // "PARTNER_COST_TYPE_NIELSEN_DAR" - The cost is charged for using 9905 // Nielsen Digital Ad Ratings. 9906 // "PARTNER_COST_TYPE_SHOP_LOCAL" - The cost is charged for using 9907 // ShopLocal. 9908 // "PARTNER_COST_TYPE_TERACENT" - The cost is charged for using 9909 // Teracent. 9910 // "PARTNER_COST_TYPE_THIRD_PARTY_AD_SERVER" - The cost is charged for 9911 // using a third-party ad server. 9912 // "PARTNER_COST_TYPE_TRUST_METRICS" - The cost is charged for using 9913 // TrustMetrics. 9914 // "PARTNER_COST_TYPE_VIZU" - The cost is charged for using Vizu. 9915 // "PARTNER_COST_TYPE_ADLINGO_FEE" - The cost is charged for using 9916 // AdLingo. 9917 // "PARTNER_COST_TYPE_CUSTOM_FEE_1" - The cost is charged as custom 9918 // fee 1. 9919 // "PARTNER_COST_TYPE_CUSTOM_FEE_2" - The cost is charged as custom 9920 // fee 2. 9921 // "PARTNER_COST_TYPE_CUSTOM_FEE_3" - The cost is charged as custom 9922 // fee 3. 9923 // "PARTNER_COST_TYPE_CUSTOM_FEE_4" - The cost is charged as custom 9924 // fee 4. 9925 // "PARTNER_COST_TYPE_CUSTOM_FEE_5" - The cost is charged as custom 9926 // fee 5. 9927 CostType string `json:"costType,omitempty"` 9928 9929 // FeeAmount: The CPM fee amount in micros of advertiser's 9930 // currency. 9931 // 9932 // Applicable when the fee_type is 9933 // `PARTNER_FEE_TYPE_CPM_FEE`. Must be greater than or equal to 0. 9934 // 9935 // For example, for 1.5 standard unit of the advertiser's currency, 9936 // set 9937 // this field to 1500000. 9938 FeeAmount int64 `json:"feeAmount,omitempty,string"` 9939 9940 // FeePercentageMillis: The media fee percentage in millis (1/1000 of a 9941 // percent). 9942 // 9943 // Applicable when the fee_type is 9944 // `PARTNER_FEE_TYPE_MEDIA_FEE`. Must be greater than or equal to 9945 // 0. 9946 // 9947 // For example: 100 represents 0.1%. 9948 FeePercentageMillis int64 `json:"feePercentageMillis,omitempty,string"` 9949 9950 // FeeType: Required. The fee type for this partner cost. 9951 // 9952 // Possible values: 9953 // "PARTNER_COST_FEE_TYPE_UNSPECIFIED" - Value is not specified or is 9954 // unknown in this version. 9955 // "PARTNER_COST_FEE_TYPE_CPM_FEE" - The partner cost is a fixed CPM 9956 // fee. 9957 // 9958 // Not applicable when the partner cost cost_type 9959 // is one of: 9960 // 9961 // * `PARTNER_COST_TYPE_MEDIA_COST_DATA` 9962 // * `PARTNER_COST_TYPE_DV360_FEE`. 9963 // "PARTNER_COST_FEE_TYPE_MEDIA_FEE" - The partner cost is a 9964 // percentage surcharge based on the media cost. 9965 // 9966 // Not applicable when the partner cost_type is one 9967 // of: 9968 // 9969 // * `PARTNER_COST_TYPE_SHOP_LOCAL` 9970 // * `PARTNER_COST_TYPE_TRUST_METRICS` 9971 // * `PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE_VIDEO` 9972 // * `PARTNER_COST_TYPE_MOAT_VIDEO`. 9973 FeeType string `json:"feeType,omitempty"` 9974 9975 // InvoiceType: The invoice type for this partner cost. 9976 // 9977 // * Required when cost_type is one of: 9978 // - `PARTNER_COST_TYPE_ADLOOX` 9979 // - `PARTNER_COST_TYPE_DOUBLE_VERIFY` 9980 // - `PARTNER_COST_TYPE_INTEGRAL_AD_SCIENCE`. 9981 // * Output only for other types. 9982 // 9983 // Possible values: 9984 // "PARTNER_COST_INVOICE_TYPE_UNSPECIFIED" - Type value is not 9985 // specified or is unknown in this version. 9986 // "PARTNER_COST_INVOICE_TYPE_DV360" - Partner cost is billed through 9987 // DV360. 9988 // "PARTNER_COST_INVOICE_TYPE_PARTNER" - Partner cost is billed by the 9989 // partner. 9990 InvoiceType string `json:"invoiceType,omitempty"` 9991 9992 // ForceSendFields is a list of field names (e.g. "CostType") to 9993 // unconditionally include in API requests. By default, fields with 9994 // empty values are omitted from API requests. However, any non-pointer, 9995 // non-interface field appearing in ForceSendFields will be sent to the 9996 // server regardless of whether the field is empty or not. This may be 9997 // used to include empty fields in Patch requests. 9998 ForceSendFields []string `json:"-"` 9999 10000 // NullFields is a list of field names (e.g. "CostType") to include in 10001 // API requests with the JSON null value. By default, fields with empty 10002 // values are omitted from API requests. However, any field with an 10003 // empty value appearing in NullFields will be sent to the server as 10004 // null. It is an error if a field in this list has a non-empty value. 10005 // This may be used to include null fields in Patch requests. 10006 NullFields []string `json:"-"` 10007} 10008 10009func (s *PartnerCost) MarshalJSON() ([]byte, error) { 10010 type NoMethod PartnerCost 10011 raw := NoMethod(*s) 10012 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10013} 10014 10015// PartnerRevenueModel: Settings that control how partner revenue is 10016// calculated. 10017type PartnerRevenueModel struct { 10018 // MarkupAmount: Required. The markup amount of the partner revenue 10019 // model. 10020 // Must be greater than or equal to 0. 10021 // 10022 // * When the markup_type is set to 10023 // be 10024 // `PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM`, this field represents the 10025 // CPM 10026 // markup in micros of advertiser's currency. For example, 10027 // 1500000 10028 // represents 1.5 standard units of the currency. 10029 // * When the markup_type is set to 10030 // be 10031 // `PARTNER_REVENUE_MODEL_MARKUP_TYPE_MEDIA_COST_MARKUP`, this 10032 // field 10033 // represents the media cost percent markup in millis. For example, 10034 // 100 represents 0.1% (decimal 0.001). 10035 // * When the markup_type is set to 10036 // be 10037 // `PARTNER_REVENUE_MODEL_MARKUP_TYPE_TOTAL_MEDIA_COST_MARKUP`, this 10038 // field 10039 // represents the total media cost percent markup in millis. For 10040 // example, 10041 // 100 represents 0.1% (decimal 0.001). 10042 MarkupAmount int64 `json:"markupAmount,omitempty,string"` 10043 10044 // MarkupType: Required. The markup type of the partner revenue model. 10045 // 10046 // Possible values: 10047 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_UNSPECIFIED" - Type value is not 10048 // specified or is unknown in this version. 10049 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_CPM" - Calculate the partner 10050 // revenue based on a fixed CPM. 10051 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_MEDIA_COST_MARKUP" - Calculate 10052 // the partner revenue based on a percentage surcharge of its 10053 // media cost. 10054 // "PARTNER_REVENUE_MODEL_MARKUP_TYPE_TOTAL_MEDIA_COST_MARKUP" - 10055 // Calculate the partner revenue based on a percentage surcharge of 10056 // its 10057 // total media cost, which includes all partner costs and data costs. 10058 MarkupType string `json:"markupType,omitempty"` 10059 10060 // ForceSendFields is a list of field names (e.g. "MarkupAmount") to 10061 // unconditionally include in API requests. By default, fields with 10062 // empty values are omitted from API requests. However, any non-pointer, 10063 // non-interface field appearing in ForceSendFields will be sent to the 10064 // server regardless of whether the field is empty or not. This may be 10065 // used to include empty fields in Patch requests. 10066 ForceSendFields []string `json:"-"` 10067 10068 // NullFields is a list of field names (e.g. "MarkupAmount") to include 10069 // in API requests with the JSON null value. By default, fields with 10070 // empty values are omitted from API requests. However, any field with 10071 // an empty value appearing in NullFields will be sent to the server as 10072 // null. It is an error if a field in this list has a non-empty value. 10073 // This may be used to include null fields in Patch requests. 10074 NullFields []string `json:"-"` 10075} 10076 10077func (s *PartnerRevenueModel) MarshalJSON() ([]byte, error) { 10078 type NoMethod PartnerRevenueModel 10079 raw := NoMethod(*s) 10080 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10081} 10082 10083// PerformanceGoal: Settings that control the performance goal of a 10084// campaign or insertion order. 10085type PerformanceGoal struct { 10086 // PerformanceGoalAmountMicros: The goal amount, in micros of the 10087 // advertiser's currency. 10088 // 10089 // Applicable when 10090 // performance_goal_type is one of: 10091 // 10092 // * `PERFORMANCE_GOAL_TYPE_CPM` 10093 // * `PERFORMANCE_GOAL_TYPE_CPC` 10094 // * `PERFORMANCE_GOAL_TYPE_CPA` 10095 // * `PERFORMANCE_GOAL_TYPE_CPIAVC` 10096 // 10097 // For example 1500000 represents 1.5 standard units of the currency. 10098 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"` 10099 10100 // PerformanceGoalPercentageMicros: The decimal representation of the 10101 // goal percentage in micros. 10102 // 10103 // Applicable when 10104 // performance_goal_type is one of: 10105 // 10106 // * `PERFORMANCE_GOAL_TYPE_CTR` 10107 // * `PERFORMANCE_GOAL_TYPE_VIEWABILITY` 10108 // 10109 // For example, 70000 represents 7% (decimal 0.07). 10110 PerformanceGoalPercentageMicros int64 `json:"performanceGoalPercentageMicros,omitempty,string"` 10111 10112 // PerformanceGoalString: A key performance indicator (KPI) string, 10113 // which can be empty. 10114 // Must be UTF-8 encoded with a length of no more than 100 10115 // characters. 10116 // 10117 // Applicable when 10118 // performance_goal_type is set to 10119 // `PERFORMANCE_GOAL_TYPE_OTHER`. 10120 PerformanceGoalString string `json:"performanceGoalString,omitempty"` 10121 10122 // PerformanceGoalType: Required. The type of the performance goal. 10123 // 10124 // Possible values: 10125 // "PERFORMANCE_GOAL_TYPE_UNSPECIFIED" - Performance goal type is not 10126 // specified or is unknown in this version. 10127 // "PERFORMANCE_GOAL_TYPE_CPM" - The performance goal is set in CPM 10128 // (cost per mille). 10129 // "PERFORMANCE_GOAL_TYPE_CPC" - The performance goal is set in CPC 10130 // (cost per click). 10131 // "PERFORMANCE_GOAL_TYPE_CPA" - The performance goal is set in CPA 10132 // (cost per action). 10133 // "PERFORMANCE_GOAL_TYPE_VIEWABILITY" - The performance goal is set 10134 // in Viewability percentage. 10135 // "PERFORMANCE_GOAL_TYPE_CPIAVC" - The performance goal is set as 10136 // CPIAVC (cost per impression audible and 10137 // visible at completion). 10138 // "PERFORMANCE_GOAL_TYPE_CPE" - The performance goal is set in CPE 10139 // (cost per engagement). 10140 // "PERFORMANCE_GOAL_TYPE_OTHER" - The performance goal is set to 10141 // Other. 10142 PerformanceGoalType string `json:"performanceGoalType,omitempty"` 10143 10144 // ForceSendFields is a list of field names (e.g. 10145 // "PerformanceGoalAmountMicros") to unconditionally include in API 10146 // requests. By default, fields with empty values are omitted from API 10147 // requests. However, any non-pointer, non-interface field appearing in 10148 // ForceSendFields will be sent to the server regardless of whether the 10149 // field is empty or not. This may be used to include empty fields in 10150 // Patch requests. 10151 ForceSendFields []string `json:"-"` 10152 10153 // NullFields is a list of field names (e.g. 10154 // "PerformanceGoalAmountMicros") to include in API requests with the 10155 // JSON null value. By default, fields with empty values are omitted 10156 // from API requests. However, any field with an empty value appearing 10157 // in NullFields will be sent to the server as null. It is an error if a 10158 // field in this list has a non-empty value. This may be used to include 10159 // null fields in Patch requests. 10160 NullFields []string `json:"-"` 10161} 10162 10163func (s *PerformanceGoal) MarshalJSON() ([]byte, error) { 10164 type NoMethod PerformanceGoal 10165 raw := NoMethod(*s) 10166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10167} 10168 10169// PerformanceGoalBidStrategy: A strategy that automatically adjusts the 10170// bid to meet or beat a specified 10171// performance goal. 10172type PerformanceGoalBidStrategy struct { 10173 // MaxAverageCpmBidAmountMicros: The maximum average CPM that may be 10174 // bid, in micros of the advertiser's 10175 // currency. Must be greater than or equal to a billable unit of the 10176 // given 10177 // currency. Not applicable when 10178 // performance_goal_type 10179 // is set to `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`. 10180 // 10181 // For example, 1500000 represents 1.5 standard units of the currency. 10182 MaxAverageCpmBidAmountMicros int64 `json:"maxAverageCpmBidAmountMicros,omitempty,string"` 10183 10184 // PerformanceGoalAmountMicros: Required. The performance goal the 10185 // bidding strategy will attempt to 10186 // meet or beat, in micros of the advertiser's currency. 10187 // Must be greater than or equal to a billable unit of the given 10188 // currency and 10189 // smaller or equal to upper bounds. Each 10190 // performance_goal_type 10191 // has its upper bound: 10192 // 10193 // * when 10194 // performance_goal_type 10195 // is `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA`, 10196 // upper bound is 10000.00 USD. 10197 // * when 10198 // performance_goal_type 10199 // is `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC`, 10200 // upper bound is 1000.00 USD. 10201 // * when 10202 // performance_goal_type 10203 // is `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`, upper bound 10204 // is 10205 // 1000.00 USD. 10206 // 10207 // Example: If set 10208 // to 10209 // `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`, the bid price 10210 // will 10211 // be based on the probability that each available impression will 10212 // be 10213 // viewable. For example, if viewable CPM target is $2 and an impression 10214 // is 10215 // 40% likely to be viewable, the bid price will be $0.80 CPM (40% of 10216 // $2). 10217 // 10218 // For example, 1500000 represents 1.5 standard units of the currency. 10219 PerformanceGoalAmountMicros int64 `json:"performanceGoalAmountMicros,omitempty,string"` 10220 10221 // PerformanceGoalType: Required. The type of the performance goal that 10222 // the bidding strategy 10223 // will try to meet or beat. 10224 // 10225 // For line item level usage, the value must be one of: 10226 // 10227 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA` 10228 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC` 10229 // * `BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM`. 10230 // 10231 // Possible values: 10232 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_UNSPECIFIED" - Type value 10233 // is not specified or is unknown in this version. 10234 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPA" - Cost per action. 10235 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CPC" - Cost per click. 10236 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_VIEWABLE_CPM" - Viewable 10237 // CPM. 10238 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_CIVA" - Completed inview 10239 // and audible views. 10240 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_IVO_TEN" - Inview time over 10241 // 10 secs views. 10242 // "BIDDING_STRATEGY_PERFORMANCE_GOAL_TYPE_AV_VIEWED" - Viewable 10243 // impressions. 10244 PerformanceGoalType string `json:"performanceGoalType,omitempty"` 10245 10246 // ForceSendFields is a list of field names (e.g. 10247 // "MaxAverageCpmBidAmountMicros") to unconditionally include in API 10248 // requests. By default, fields with empty values are omitted from API 10249 // requests. However, any non-pointer, non-interface field appearing in 10250 // ForceSendFields will be sent to the server regardless of whether the 10251 // field is empty or not. This may be used to include empty fields in 10252 // Patch requests. 10253 ForceSendFields []string `json:"-"` 10254 10255 // NullFields is a list of field names (e.g. 10256 // "MaxAverageCpmBidAmountMicros") to include in API requests with the 10257 // JSON null value. By default, fields with empty values are omitted 10258 // from API requests. However, any field with an empty value appearing 10259 // in NullFields will be sent to the server as null. It is an error if a 10260 // field in this list has a non-empty value. This may be used to include 10261 // null fields in Patch requests. 10262 NullFields []string `json:"-"` 10263} 10264 10265func (s *PerformanceGoalBidStrategy) MarshalJSON() ([]byte, error) { 10266 type NoMethod PerformanceGoalBidStrategy 10267 raw := NoMethod(*s) 10268 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10269} 10270 10271// ProximityLocationListAssignedTargetingOptionDetails: Targeting 10272// details for proximity location list. This will be 10273// populated in the details field of an AssignedTargetingOption 10274// when 10275// targeting_type is 10276// `TARGETING_TYPE_PROXIMITY_LOCATION_LIST`. 10277type ProximityLocationListAssignedTargetingOptionDetails struct { 10278 // ProximityLocationListId: Required. ID of the proximity location list. 10279 // Should refer to the 10280 // location_list_id field of a 10281 // LocationList resource whose type 10282 // is 10283 // `TARGETING_LOCATION_TYPE_PROXIMITY`. 10284 ProximityLocationListId int64 `json:"proximityLocationListId,omitempty,string"` 10285 10286 // ProximityRadiusRange: Required. Radius range for proximity location 10287 // list. 10288 // This represents the size of the area around a chosen location that 10289 // will be 10290 // targeted. 10291 // 10292 // `All` proximity location targeting under a single line item must have 10293 // the 10294 // same radius range value. Set this value to match any existing 10295 // targeting. 10296 // If updated, this field will change the radius range for all 10297 // proximity 10298 // targeting under the line item. 10299 // 10300 // Possible values: 10301 // "PROXIMITY_RADIUS_RANGE_UNSPECIFIED" - The targeted radius range is 10302 // not specified or is unknown. 10303 // Default value when radius range is not specified in this 10304 // version. 10305 // This enum is a placeholder for default value and does not represent a 10306 // real 10307 // radius range option. 10308 // "PROXIMITY_RADIUS_RANGE_SMALL" - The targeted radius range is 10309 // small. 10310 // "PROXIMITY_RADIUS_RANGE_MEDIUM" - The targeted radius range is 10311 // medium. 10312 // "PROXIMITY_RADIUS_RANGE_LARGE" - The targeted radius range is 10313 // large. 10314 ProximityRadiusRange string `json:"proximityRadiusRange,omitempty"` 10315 10316 // ForceSendFields is a list of field names (e.g. 10317 // "ProximityLocationListId") to unconditionally include in API 10318 // requests. By default, fields with empty values are omitted from API 10319 // requests. However, any non-pointer, non-interface field appearing in 10320 // ForceSendFields will be sent to the server regardless of whether the 10321 // field is empty or not. This may be used to include empty fields in 10322 // Patch requests. 10323 ForceSendFields []string `json:"-"` 10324 10325 // NullFields is a list of field names (e.g. "ProximityLocationListId") 10326 // to include in API requests with the JSON null value. By default, 10327 // fields with empty values are omitted from API requests. However, any 10328 // field with an empty value appearing in NullFields will be sent to the 10329 // server as null. It is an error if a field in this list has a 10330 // non-empty value. This may be used to include null fields in Patch 10331 // requests. 10332 NullFields []string `json:"-"` 10333} 10334 10335func (s *ProximityLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10336 type NoMethod ProximityLocationListAssignedTargetingOptionDetails 10337 raw := NoMethod(*s) 10338 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10339} 10340 10341// PublisherReviewStatus: Publisher review status for the creative. 10342type PublisherReviewStatus struct { 10343 // PublisherName: The publisher reviewing the creative. 10344 PublisherName string `json:"publisherName,omitempty"` 10345 10346 // Status: Status of the publisher review. 10347 // 10348 // Possible values: 10349 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 10350 // unknown in this version. 10351 // "REVIEW_STATUS_APPROVED" - The creative is approved. 10352 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 10353 // "REVIEW_STATUS_PENDING" - The creative is pending review. 10354 Status string `json:"status,omitempty"` 10355 10356 // ForceSendFields is a list of field names (e.g. "PublisherName") to 10357 // unconditionally include in API requests. By default, fields with 10358 // empty values are omitted from API requests. However, any non-pointer, 10359 // non-interface field appearing in ForceSendFields will be sent to the 10360 // server regardless of whether the field is empty or not. This may be 10361 // used to include empty fields in Patch requests. 10362 ForceSendFields []string `json:"-"` 10363 10364 // NullFields is a list of field names (e.g. "PublisherName") to include 10365 // in API requests with the JSON null value. By default, fields with 10366 // empty values are omitted from API requests. However, any field with 10367 // an empty value appearing in NullFields will be sent to the server as 10368 // null. It is an error if a field in this list has a non-empty value. 10369 // This may be used to include null fields in Patch requests. 10370 NullFields []string `json:"-"` 10371} 10372 10373func (s *PublisherReviewStatus) MarshalJSON() ([]byte, error) { 10374 type NoMethod PublisherReviewStatus 10375 raw := NoMethod(*s) 10376 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10377} 10378 10379// RateDetails: The rate related settings of the inventory source. 10380type RateDetails struct { 10381 // InventorySourceRateType: The rate type. 10382 // 10383 // Acceptable values are 10384 // `INVENTORY_SOURCE_RATE_TYPE_CPM_FIXED`, 10385 // `INVENTORY_SOURCE_RATE_TYPE_CP 10386 // M_FLOOR`, and 10387 // `INVENTORY_SOURCE_RATE_TYPE_CPD`. 10388 // 10389 // Possible values: 10390 // "INVENTORY_SOURCE_RATE_TYPE_UNSPECIFIED" - The rate type is not 10391 // specified or is unknown in this version. 10392 // "INVENTORY_SOURCE_RATE_TYPE_CPM_FIXED" - The rate type is CPM 10393 // (Fixed). 10394 // "INVENTORY_SOURCE_RATE_TYPE_CPM_FLOOR" - The rate type is CPM 10395 // (Floor). 10396 // "INVENTORY_SOURCE_RATE_TYPE_CPD" - The rate type is Cost per Day. 10397 // "INVENTORY_SOURCE_RATE_TYPE_FLAT" - The rate type is Flat. 10398 InventorySourceRateType string `json:"inventorySourceRateType,omitempty"` 10399 10400 // MinimumSpend: Output only. The amount that the buyer has committed to 10401 // spending on the inventory source 10402 // up front. 10403 // 10404 // Only applicable for guaranteed inventory sources. 10405 MinimumSpend *Money `json:"minimumSpend,omitempty"` 10406 10407 // Rate: The rate for the inventory source. 10408 Rate *Money `json:"rate,omitempty"` 10409 10410 // UnitsPurchased: Required for guaranteed inventory sources. 10411 // The number of impressions guaranteed by the seller. 10412 UnitsPurchased int64 `json:"unitsPurchased,omitempty,string"` 10413 10414 // ForceSendFields is a list of field names (e.g. 10415 // "InventorySourceRateType") to unconditionally include in API 10416 // requests. By default, fields with empty values are omitted from API 10417 // requests. However, any non-pointer, non-interface field appearing in 10418 // ForceSendFields will be sent to the server regardless of whether the 10419 // field is empty or not. This may be used to include empty fields in 10420 // Patch requests. 10421 ForceSendFields []string `json:"-"` 10422 10423 // NullFields is a list of field names (e.g. "InventorySourceRateType") 10424 // to include in API requests with the JSON null value. By default, 10425 // fields with empty values are omitted from API requests. However, any 10426 // field with an empty value appearing in NullFields will be sent to the 10427 // server as null. It is an error if a field in this list has a 10428 // non-empty value. This may be used to include null fields in Patch 10429 // requests. 10430 NullFields []string `json:"-"` 10431} 10432 10433func (s *RateDetails) MarshalJSON() ([]byte, error) { 10434 type NoMethod RateDetails 10435 raw := NoMethod(*s) 10436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10437} 10438 10439// RegionalLocationListAssignedTargetingOptionDetails: Targeting details 10440// for regional location list. This will be 10441// populated in the details field of an AssignedTargetingOption 10442// when 10443// targeting_type is 10444// `TARGETING_TYPE_REGIONAL_LOCATION_LIST`. 10445type RegionalLocationListAssignedTargetingOptionDetails struct { 10446 // Negative: Indicates if this option is being negatively targeted. 10447 Negative bool `json:"negative,omitempty"` 10448 10449 // RegionalLocationListId: Required. ID of the regional location list. 10450 // Should refer to the 10451 // location_list_id field of a 10452 // LocationList resource whose type is 10453 // `TARGETING_LOCATION_TYPE_REGIONAL`. 10454 RegionalLocationListId int64 `json:"regionalLocationListId,omitempty,string"` 10455 10456 // ForceSendFields is a list of field names (e.g. "Negative") to 10457 // unconditionally include in API requests. By default, fields with 10458 // empty values are omitted from API requests. However, any non-pointer, 10459 // non-interface field appearing in ForceSendFields will be sent to the 10460 // server regardless of whether the field is empty or not. This may be 10461 // used to include empty fields in Patch requests. 10462 ForceSendFields []string `json:"-"` 10463 10464 // NullFields is a list of field names (e.g. "Negative") to include in 10465 // API requests with the JSON null value. By default, fields with empty 10466 // values are omitted from API requests. However, any field with an 10467 // empty value appearing in NullFields will be sent to the server as 10468 // null. It is an error if a field in this list has a non-empty value. 10469 // This may be used to include null fields in Patch requests. 10470 NullFields []string `json:"-"` 10471} 10472 10473func (s *RegionalLocationListAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10474 type NoMethod RegionalLocationListAssignedTargetingOptionDetails 10475 raw := NoMethod(*s) 10476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10477} 10478 10479// ReviewStatusInfo: Review statuses for the creative. 10480type ReviewStatusInfo struct { 10481 // ApprovalStatus: Represents the basic approval needed for a creative 10482 // to begin serving. 10483 // Summary 10484 // of 10485 // creative_and_landing_page_review_status 10486 // and 10487 // content_and_policy_revi 10488 // ew_status. 10489 // 10490 // Possible values: 10491 // "APPROVAL_STATUS_UNSPECIFIED" - Type value is not specified or is 10492 // unknown in this version. 10493 // "APPROVAL_STATUS_PENDING_NOT_SERVABLE" - The creative is still 10494 // under review and not servable. 10495 // "APPROVAL_STATUS_PENDING_SERVABLE" - The creative has passed 10496 // creative & landing page 10497 // review and is servable, but is awaiting additional 10498 // content & policy review. 10499 // "APPROVAL_STATUS_APPROVED_SERVABLE" - Both creative & landing page 10500 // review and 10501 // content & policy review are approved. The creative is servable. 10502 // "APPROVAL_STATUS_REJECTED_NOT_SERVABLE" - There is an issue with 10503 // the creative that must be fixed before it can serve. 10504 ApprovalStatus string `json:"approvalStatus,omitempty"` 10505 10506 // ContentAndPolicyReviewStatus: Content and policy review status for 10507 // the creative. 10508 // 10509 // Possible values: 10510 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 10511 // unknown in this version. 10512 // "REVIEW_STATUS_APPROVED" - The creative is approved. 10513 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 10514 // "REVIEW_STATUS_PENDING" - The creative is pending review. 10515 ContentAndPolicyReviewStatus string `json:"contentAndPolicyReviewStatus,omitempty"` 10516 10517 // CreativeAndLandingPageReviewStatus: Creative and landing page review 10518 // status for the creative. 10519 // 10520 // Possible values: 10521 // "REVIEW_STATUS_UNSPECIFIED" - Type value is not specified or is 10522 // unknown in this version. 10523 // "REVIEW_STATUS_APPROVED" - The creative is approved. 10524 // "REVIEW_STATUS_REJECTED" - The creative is rejected. 10525 // "REVIEW_STATUS_PENDING" - The creative is pending review. 10526 CreativeAndLandingPageReviewStatus string `json:"creativeAndLandingPageReviewStatus,omitempty"` 10527 10528 // ExchangeReviewStatuses: Exchange review statuses for the creative. 10529 ExchangeReviewStatuses []*ExchangeReviewStatus `json:"exchangeReviewStatuses,omitempty"` 10530 10531 // PublisherReviewStatuses: Publisher review statuses for the creative. 10532 PublisherReviewStatuses []*PublisherReviewStatus `json:"publisherReviewStatuses,omitempty"` 10533 10534 // ForceSendFields is a list of field names (e.g. "ApprovalStatus") to 10535 // unconditionally include in API requests. By default, fields with 10536 // empty values are omitted from API requests. However, any non-pointer, 10537 // non-interface field appearing in ForceSendFields will be sent to the 10538 // server regardless of whether the field is empty or not. This may be 10539 // used to include empty fields in Patch requests. 10540 ForceSendFields []string `json:"-"` 10541 10542 // NullFields is a list of field names (e.g. "ApprovalStatus") to 10543 // include in API requests with the JSON null value. By default, fields 10544 // with empty values are omitted from API requests. However, any field 10545 // with an empty value appearing in NullFields will be sent to the 10546 // server as null. It is an error if a field in this list has a 10547 // non-empty value. This may be used to include null fields in Patch 10548 // requests. 10549 NullFields []string `json:"-"` 10550} 10551 10552func (s *ReviewStatusInfo) MarshalJSON() ([]byte, error) { 10553 type NoMethod ReviewStatusInfo 10554 raw := NoMethod(*s) 10555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10556} 10557 10558// SdfConfig: Structured Data File (SDF) related settings. 10559type SdfConfig struct { 10560 // AdminEmail: An administrator email address to which the SDF 10561 // processing status reports 10562 // will be sent. 10563 AdminEmail string `json:"adminEmail,omitempty"` 10564 10565 // Version: Required. The version of SDF being used. 10566 // 10567 // Possible values: 10568 // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or 10569 // is unknown in this version. 10570 // "SDF_VERSION_3_1" - SDF version 3.1 10571 // "SDF_VERSION_4" - SDF version 4 10572 // "SDF_VERSION_4_1" - SDF version 4.1 10573 // "SDF_VERSION_4_2" - SDF version 4.2 10574 // "SDF_VERSION_5" - SDF version 5. 10575 // "SDF_VERSION_5_1" - SDF version 5.1 10576 Version string `json:"version,omitempty"` 10577 10578 // ForceSendFields is a list of field names (e.g. "AdminEmail") to 10579 // unconditionally include in API requests. By default, fields with 10580 // empty values are omitted from API requests. However, any non-pointer, 10581 // non-interface field appearing in ForceSendFields will be sent to the 10582 // server regardless of whether the field is empty or not. This may be 10583 // used to include empty fields in Patch requests. 10584 ForceSendFields []string `json:"-"` 10585 10586 // NullFields is a list of field names (e.g. "AdminEmail") to include in 10587 // API requests with the JSON null value. By default, fields with empty 10588 // values are omitted from API requests. However, any field with an 10589 // empty value appearing in NullFields will be sent to the server as 10590 // null. It is an error if a field in this list has a non-empty value. 10591 // This may be used to include null fields in Patch requests. 10592 NullFields []string `json:"-"` 10593} 10594 10595func (s *SdfConfig) MarshalJSON() ([]byte, error) { 10596 type NoMethod SdfConfig 10597 raw := NoMethod(*s) 10598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10599} 10600 10601// SdfDownloadTask: Type for the response returned 10602// by [SdfDownloadTaskService.CreateSdfDownloadTask]. 10603type SdfDownloadTask struct { 10604 // ResourceName: A resource name to be used in 10605 // media.download to Download the prepared 10606 // files. Resource names have the 10607 // format 10608 // `download/sdfdownloadtasks/media/{media_id}`. `media_id` will be 10609 // made 10610 // available by the long running operation service once the task status 10611 // is 10612 // done. 10613 ResourceName string `json:"resourceName,omitempty"` 10614 10615 // ForceSendFields is a list of field names (e.g. "ResourceName") to 10616 // unconditionally include in API requests. By default, fields with 10617 // empty values are omitted from API requests. However, any non-pointer, 10618 // non-interface field appearing in ForceSendFields will be sent to the 10619 // server regardless of whether the field is empty or not. This may be 10620 // used to include empty fields in Patch requests. 10621 ForceSendFields []string `json:"-"` 10622 10623 // NullFields is a list of field names (e.g. "ResourceName") to include 10624 // in API requests with the JSON null value. By default, fields with 10625 // empty values are omitted from API requests. However, any field with 10626 // an empty value appearing in NullFields will be sent to the server as 10627 // null. It is an error if a field in this list has a non-empty value. 10628 // This may be used to include null fields in Patch requests. 10629 NullFields []string `json:"-"` 10630} 10631 10632func (s *SdfDownloadTask) MarshalJSON() ([]byte, error) { 10633 type NoMethod SdfDownloadTask 10634 raw := NoMethod(*s) 10635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10636} 10637 10638// SdfDownloadTaskMetadata: Type for the metadata returned 10639// by [SdfDownloadTaskService.CreateSdfDownloadTask]. 10640type SdfDownloadTaskMetadata struct { 10641 // CreateTime: The time when the operation was created. 10642 CreateTime string `json:"createTime,omitempty"` 10643 10644 // EndTime: The time when execution was completed. 10645 EndTime string `json:"endTime,omitempty"` 10646 10647 // Version: The SDF version used to execute this download task. 10648 // 10649 // Possible values: 10650 // "SDF_VERSION_UNSPECIFIED" - SDF version value is not specified or 10651 // is unknown in this version. 10652 // "SDF_VERSION_3_1" - SDF version 3.1 10653 // "SDF_VERSION_4" - SDF version 4 10654 // "SDF_VERSION_4_1" - SDF version 4.1 10655 // "SDF_VERSION_4_2" - SDF version 4.2 10656 // "SDF_VERSION_5" - SDF version 5. 10657 // "SDF_VERSION_5_1" - SDF version 5.1 10658 Version string `json:"version,omitempty"` 10659 10660 // ForceSendFields is a list of field names (e.g. "CreateTime") to 10661 // unconditionally include in API requests. By default, fields with 10662 // empty values are omitted from API requests. However, any non-pointer, 10663 // non-interface field appearing in ForceSendFields will be sent to the 10664 // server regardless of whether the field is empty or not. This may be 10665 // used to include empty fields in Patch requests. 10666 ForceSendFields []string `json:"-"` 10667 10668 // NullFields is a list of field names (e.g. "CreateTime") to include in 10669 // API requests with the JSON null value. By default, fields with empty 10670 // values are omitted from API requests. However, any field with an 10671 // empty value appearing in NullFields will be sent to the server as 10672 // null. It is an error if a field in this list has a non-empty value. 10673 // This may be used to include null fields in Patch requests. 10674 NullFields []string `json:"-"` 10675} 10676 10677func (s *SdfDownloadTaskMetadata) MarshalJSON() ([]byte, error) { 10678 type NoMethod SdfDownloadTaskMetadata 10679 raw := NoMethod(*s) 10680 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10681} 10682 10683// SensitiveCategoryAssignedTargetingOptionDetails: Targeting details 10684// for sensitive category. This will be populated in the 10685// details field of an AssignedTargetingOption when 10686// targeting_type is 10687// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 10688type SensitiveCategoryAssignedTargetingOptionDetails struct { 10689 // ExcludedTargetingOptionId: Required. ID of the sensitive category to 10690 // be EXCLUDED. 10691 ExcludedTargetingOptionId string `json:"excludedTargetingOptionId,omitempty"` 10692 10693 // SensitiveCategory: Output only. An enum for the DV360 Sensitive 10694 // category content classifier. 10695 // 10696 // Possible values: 10697 // "SENSITIVE_CATEGORY_UNSPECIFIED" - This enum is only a placeholder 10698 // and doesn't specify a DV360 sensitive 10699 // category. 10700 // "SENSITIVE_CATEGORY_ADULT" - Adult or pornographic text, image, or 10701 // video content. 10702 // "SENSITIVE_CATEGORY_DEROGATORY" - Content that may be construed as 10703 // biased against individuals, groups, or 10704 // organizations based on criteria such as race, religion, disability, 10705 // sex, 10706 // age, veteran status, sexual orientation, gender identity, or 10707 // political 10708 // affiliation. May also indicate discussion of such content, for 10709 // instance, 10710 // in an academic or journalistic context. 10711 // "SENSITIVE_CATEGORY_DOWNLOADS_SHARING" - Content related to audio, 10712 // video, or software downloads. 10713 // "SENSITIVE_CATEGORY_WEAPONS" - Contains content related to personal 10714 // weapons, including knives, guns, 10715 // small firearms, and ammunition. Selecting either "weapons" 10716 // or 10717 // "sensitive social issues" will result in selecting both. 10718 // "SENSITIVE_CATEGORY_GAMBLING" - Contains content related to betting 10719 // or wagering in a real-world or 10720 // online setting. 10721 // "SENSITIVE_CATEGORY_VIOLENCE" - Content which may be considered 10722 // graphically violent, gory, gruesome, or 10723 // shocking, such as street fighting videos, accident photos, 10724 // descriptions 10725 // of torture, etc. 10726 // "SENSITIVE_CATEGORY_SUGGESTIVE" - Adult content, as well as 10727 // suggestive content that's not explicitly 10728 // pornographic. This category includes all pages categorized as adult. 10729 // "SENSITIVE_CATEGORY_PROFANITY" - Prominent use of words considered 10730 // indecent, such as curse words and 10731 // sexual slang. Pages with only very occasional usage, such as news 10732 // sites 10733 // that might include such words in a quotation, are not included. 10734 // "SENSITIVE_CATEGORY_ALCOHOL" - Contains content related to 10735 // alcoholic beverages, alcohol brands, 10736 // recipes, etc. 10737 // "SENSITIVE_CATEGORY_DRUGS" - Contains content related to the 10738 // recreational use of legal or illegal 10739 // drugs, as well as to drug paraphernalia or cultivation. 10740 // "SENSITIVE_CATEGORY_TOBACCO" - Contains content related to tobacco 10741 // and tobacco accessories, including 10742 // lighters, humidors, ashtrays, etc. 10743 // "SENSITIVE_CATEGORY_POLITICS" - Political news and media, including 10744 // discussions of social, governmental, 10745 // and public policy. 10746 // "SENSITIVE_CATEGORY_RELIGION" - Content related to religious 10747 // thought or beliefs. 10748 // "SENSITIVE_CATEGORY_TRAGEDY" - Content related to death, disasters, 10749 // accidents, war, etc. 10750 // "SENSITIVE_CATEGORY_TRANSPORTATION_ACCIDENTS" - Content related to 10751 // motor vehicle, aviation or other transportation 10752 // accidents. 10753 // "SENSITIVE_CATEGORY_SENSITIVE_SOCIAL_ISSUES" - Issues that evoke 10754 // strong, opposing views and spark debate. These include 10755 // issues that are controversial in most countries and markets (such 10756 // as 10757 // abortion), as well as those that are controversial in specific 10758 // countries 10759 // and markets (such as immigration reform in the United States). 10760 // "SENSITIVE_CATEGORY_SHOCKING" - Content which may be considered 10761 // shocking or disturbing, such as violent 10762 // news stories, stunts, or toilet humor. 10763 SensitiveCategory string `json:"sensitiveCategory,omitempty"` 10764 10765 // ForceSendFields is a list of field names (e.g. 10766 // "ExcludedTargetingOptionId") to unconditionally include in API 10767 // requests. By default, fields with empty values are omitted from API 10768 // requests. However, any non-pointer, non-interface field appearing in 10769 // ForceSendFields will be sent to the server regardless of whether the 10770 // field is empty or not. This may be used to include empty fields in 10771 // Patch requests. 10772 ForceSendFields []string `json:"-"` 10773 10774 // NullFields is a list of field names (e.g. 10775 // "ExcludedTargetingOptionId") to include in API requests with the JSON 10776 // null value. By default, fields with empty values are omitted from API 10777 // requests. However, any field with an empty value appearing in 10778 // NullFields will be sent to the server as null. It is an error if a 10779 // field in this list has a non-empty value. This may be used to include 10780 // null fields in Patch requests. 10781 NullFields []string `json:"-"` 10782} 10783 10784func (s *SensitiveCategoryAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10785 type NoMethod SensitiveCategoryAssignedTargetingOptionDetails 10786 raw := NoMethod(*s) 10787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10788} 10789 10790// SensitiveCategoryTargetingOptionDetails: Represents a targetable 10791// sensitive category. This will be 10792// populated in the 10793// sensitive_category_details 10794// field of the TargetingOption when 10795// targeting_type is 10796// `TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION`. 10797type SensitiveCategoryTargetingOptionDetails struct { 10798 // SensitiveCategory: Output only. An enum for the DV360 Sensitive 10799 // category content classifier. 10800 // 10801 // Possible values: 10802 // "SENSITIVE_CATEGORY_UNSPECIFIED" - This enum is only a placeholder 10803 // and doesn't specify a DV360 sensitive 10804 // category. 10805 // "SENSITIVE_CATEGORY_ADULT" - Adult or pornographic text, image, or 10806 // video content. 10807 // "SENSITIVE_CATEGORY_DEROGATORY" - Content that may be construed as 10808 // biased against individuals, groups, or 10809 // organizations based on criteria such as race, religion, disability, 10810 // sex, 10811 // age, veteran status, sexual orientation, gender identity, or 10812 // political 10813 // affiliation. May also indicate discussion of such content, for 10814 // instance, 10815 // in an academic or journalistic context. 10816 // "SENSITIVE_CATEGORY_DOWNLOADS_SHARING" - Content related to audio, 10817 // video, or software downloads. 10818 // "SENSITIVE_CATEGORY_WEAPONS" - Contains content related to personal 10819 // weapons, including knives, guns, 10820 // small firearms, and ammunition. Selecting either "weapons" 10821 // or 10822 // "sensitive social issues" will result in selecting both. 10823 // "SENSITIVE_CATEGORY_GAMBLING" - Contains content related to betting 10824 // or wagering in a real-world or 10825 // online setting. 10826 // "SENSITIVE_CATEGORY_VIOLENCE" - Content which may be considered 10827 // graphically violent, gory, gruesome, or 10828 // shocking, such as street fighting videos, accident photos, 10829 // descriptions 10830 // of torture, etc. 10831 // "SENSITIVE_CATEGORY_SUGGESTIVE" - Adult content, as well as 10832 // suggestive content that's not explicitly 10833 // pornographic. This category includes all pages categorized as adult. 10834 // "SENSITIVE_CATEGORY_PROFANITY" - Prominent use of words considered 10835 // indecent, such as curse words and 10836 // sexual slang. Pages with only very occasional usage, such as news 10837 // sites 10838 // that might include such words in a quotation, are not included. 10839 // "SENSITIVE_CATEGORY_ALCOHOL" - Contains content related to 10840 // alcoholic beverages, alcohol brands, 10841 // recipes, etc. 10842 // "SENSITIVE_CATEGORY_DRUGS" - Contains content related to the 10843 // recreational use of legal or illegal 10844 // drugs, as well as to drug paraphernalia or cultivation. 10845 // "SENSITIVE_CATEGORY_TOBACCO" - Contains content related to tobacco 10846 // and tobacco accessories, including 10847 // lighters, humidors, ashtrays, etc. 10848 // "SENSITIVE_CATEGORY_POLITICS" - Political news and media, including 10849 // discussions of social, governmental, 10850 // and public policy. 10851 // "SENSITIVE_CATEGORY_RELIGION" - Content related to religious 10852 // thought or beliefs. 10853 // "SENSITIVE_CATEGORY_TRAGEDY" - Content related to death, disasters, 10854 // accidents, war, etc. 10855 // "SENSITIVE_CATEGORY_TRANSPORTATION_ACCIDENTS" - Content related to 10856 // motor vehicle, aviation or other transportation 10857 // accidents. 10858 // "SENSITIVE_CATEGORY_SENSITIVE_SOCIAL_ISSUES" - Issues that evoke 10859 // strong, opposing views and spark debate. These include 10860 // issues that are controversial in most countries and markets (such 10861 // as 10862 // abortion), as well as those that are controversial in specific 10863 // countries 10864 // and markets (such as immigration reform in the United States). 10865 // "SENSITIVE_CATEGORY_SHOCKING" - Content which may be considered 10866 // shocking or disturbing, such as violent 10867 // news stories, stunts, or toilet humor. 10868 SensitiveCategory string `json:"sensitiveCategory,omitempty"` 10869 10870 // ForceSendFields is a list of field names (e.g. "SensitiveCategory") 10871 // to unconditionally include in API requests. By default, fields with 10872 // empty values are omitted from API requests. However, any non-pointer, 10873 // non-interface field appearing in ForceSendFields will be sent to the 10874 // server regardless of whether the field is empty or not. This may be 10875 // used to include empty fields in Patch requests. 10876 ForceSendFields []string `json:"-"` 10877 10878 // NullFields is a list of field names (e.g. "SensitiveCategory") to 10879 // include in API requests with the JSON null value. By default, fields 10880 // with empty values are omitted from API requests. However, any field 10881 // with an empty value appearing in NullFields will be sent to the 10882 // server as null. It is an error if a field in this list has a 10883 // non-empty value. This may be used to include null fields in Patch 10884 // requests. 10885 NullFields []string `json:"-"` 10886} 10887 10888func (s *SensitiveCategoryTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10889 type NoMethod SensitiveCategoryTargetingOptionDetails 10890 raw := NoMethod(*s) 10891 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10892} 10893 10894// Status: The `Status` type defines a logical error model that is 10895// suitable for 10896// different programming environments, including REST APIs and RPC APIs. 10897// It is 10898// used by [gRPC](https://github.com/grpc). Each `Status` message 10899// contains 10900// three pieces of data: error code, error message, and error 10901// details. 10902// 10903// You can find out more about this error model and how to work with it 10904// in the 10905// [API Design Guide](https://cloud.google.com/apis/design/errors). 10906type Status struct { 10907 // Code: The status code, which should be an enum value of 10908 // google.rpc.Code. 10909 Code int64 `json:"code,omitempty"` 10910 10911 // Details: A list of messages that carry the error details. There is a 10912 // common set of 10913 // message types for APIs to use. 10914 Details []googleapi.RawMessage `json:"details,omitempty"` 10915 10916 // Message: A developer-facing error message, which should be in 10917 // English. Any 10918 // user-facing error message should be localized and sent in 10919 // the 10920 // google.rpc.Status.details field, or localized by the client. 10921 Message string `json:"message,omitempty"` 10922 10923 // ForceSendFields is a list of field names (e.g. "Code") to 10924 // unconditionally include in API requests. By default, fields with 10925 // empty values are omitted from API requests. However, any non-pointer, 10926 // non-interface field appearing in ForceSendFields will be sent to the 10927 // server regardless of whether the field is empty or not. This may be 10928 // used to include empty fields in Patch requests. 10929 ForceSendFields []string `json:"-"` 10930 10931 // NullFields is a list of field names (e.g. "Code") to include in API 10932 // requests with the JSON null value. By default, fields with empty 10933 // values are omitted from API requests. However, any field with an 10934 // empty value appearing in NullFields will be sent to the server as 10935 // null. It is an error if a field in this list has a non-empty value. 10936 // This may be used to include null fields in Patch requests. 10937 NullFields []string `json:"-"` 10938} 10939 10940func (s *Status) MarshalJSON() ([]byte, error) { 10941 type NoMethod Status 10942 raw := NoMethod(*s) 10943 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10944} 10945 10946// SubExchangeAssignedTargetingOptionDetails: Details for assigned 10947// sub-exchange targeting option. This will be populated in 10948// the details field of an AssignedTargetingOption when 10949// targeting_type is 10950// `TARGETING_TYPE_SUB_EXCHANGE`. 10951type SubExchangeAssignedTargetingOptionDetails struct { 10952 // TargetingOptionId: Required. The targeting_option_id of 10953 // a 10954 // TargetingOption of type `TARGETING_TYPE_SUB_EXCHANGE`. 10955 TargetingOptionId string `json:"targetingOptionId,omitempty"` 10956 10957 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 10958 // to unconditionally include in API requests. By default, fields with 10959 // empty values are omitted from API requests. However, any non-pointer, 10960 // non-interface field appearing in ForceSendFields will be sent to the 10961 // server regardless of whether the field is empty or not. This may be 10962 // used to include empty fields in Patch requests. 10963 ForceSendFields []string `json:"-"` 10964 10965 // NullFields is a list of field names (e.g. "TargetingOptionId") to 10966 // include in API requests with the JSON null value. By default, fields 10967 // with empty values are omitted from API requests. However, any field 10968 // with an empty value appearing in NullFields will be sent to the 10969 // server as null. It is an error if a field in this list has a 10970 // non-empty value. This may be used to include null fields in Patch 10971 // requests. 10972 NullFields []string `json:"-"` 10973} 10974 10975func (s *SubExchangeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 10976 type NoMethod SubExchangeAssignedTargetingOptionDetails 10977 raw := NoMethod(*s) 10978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10979} 10980 10981// SubExchangeTargetingOptionDetails: Represents a targetable 10982// sub-exchange. This will be populated in the 10983// sub_exchange_details field 10984// of a TargetingOption when 10985// targeting_type is 10986// `TARGETING_TYPE_SUB_EXCHANGE`. 10987type SubExchangeTargetingOptionDetails struct { 10988 // DisplayName: Output only. The display name of the sub-exchange. 10989 DisplayName string `json:"displayName,omitempty"` 10990 10991 // ForceSendFields is a list of field names (e.g. "DisplayName") to 10992 // unconditionally include in API requests. By default, fields with 10993 // empty values are omitted from API requests. However, any non-pointer, 10994 // non-interface field appearing in ForceSendFields will be sent to the 10995 // server regardless of whether the field is empty or not. This may be 10996 // used to include empty fields in Patch requests. 10997 ForceSendFields []string `json:"-"` 10998 10999 // NullFields is a list of field names (e.g. "DisplayName") to include 11000 // in API requests with the JSON null value. By default, fields with 11001 // empty values are omitted from API requests. However, any field with 11002 // an empty value appearing in NullFields will be sent to the server as 11003 // null. It is an error if a field in this list has a non-empty value. 11004 // This may be used to include null fields in Patch requests. 11005 NullFields []string `json:"-"` 11006} 11007 11008func (s *SubExchangeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11009 type NoMethod SubExchangeTargetingOptionDetails 11010 raw := NoMethod(*s) 11011 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11012} 11013 11014// TargetingOption: Represents a single targeting option, which is a 11015// targetable concept in 11016// DV360. 11017type TargetingOption struct { 11018 // AgeRangeDetails: Age range details. 11019 AgeRangeDetails *AgeRangeTargetingOptionDetails `json:"ageRangeDetails,omitempty"` 11020 11021 // AppCategoryDetails: App category details. 11022 AppCategoryDetails *AppCategoryTargetingOptionDetails `json:"appCategoryDetails,omitempty"` 11023 11024 // AuthorizedSellerStatusDetails: Authorized seller status resource 11025 // details. 11026 AuthorizedSellerStatusDetails *AuthorizedSellerStatusTargetingOptionDetails `json:"authorizedSellerStatusDetails,omitempty"` 11027 11028 // BrowserDetails: Browser details. 11029 BrowserDetails *BrowserTargetingOptionDetails `json:"browserDetails,omitempty"` 11030 11031 // CarrierAndIspDetails: Carrier and ISP details. 11032 CarrierAndIspDetails *CarrierAndIspTargetingOptionDetails `json:"carrierAndIspDetails,omitempty"` 11033 11034 // CategoryDetails: Category resource details. 11035 CategoryDetails *CategoryTargetingOptionDetails `json:"categoryDetails,omitempty"` 11036 11037 // ContentInstreamPositionDetails: Content instream position details. 11038 ContentInstreamPositionDetails *ContentInstreamPositionTargetingOptionDetails `json:"contentInstreamPositionDetails,omitempty"` 11039 11040 // ContentOutstreamPositionDetails: Content outstream position details. 11041 ContentOutstreamPositionDetails *ContentOutstreamPositionTargetingOptionDetails `json:"contentOutstreamPositionDetails,omitempty"` 11042 11043 // DeviceMakeModelDetails: Device make and model resource details. 11044 DeviceMakeModelDetails *DeviceMakeModelTargetingOptionDetails `json:"deviceMakeModelDetails,omitempty"` 11045 11046 // DeviceTypeDetails: Device type details. 11047 DeviceTypeDetails *DeviceTypeTargetingOptionDetails `json:"deviceTypeDetails,omitempty"` 11048 11049 // DigitalContentLabelDetails: Digital content label details. 11050 DigitalContentLabelDetails *DigitalContentLabelTargetingOptionDetails `json:"digitalContentLabelDetails,omitempty"` 11051 11052 // EnvironmentDetails: Environment details. 11053 EnvironmentDetails *EnvironmentTargetingOptionDetails `json:"environmentDetails,omitempty"` 11054 11055 // ExchangeDetails: Exchange details. 11056 ExchangeDetails *ExchangeTargetingOptionDetails `json:"exchangeDetails,omitempty"` 11057 11058 // GenderDetails: Gender details. 11059 GenderDetails *GenderTargetingOptionDetails `json:"genderDetails,omitempty"` 11060 11061 // GeoRegionDetails: Geographic region resource details. 11062 GeoRegionDetails *GeoRegionTargetingOptionDetails `json:"geoRegionDetails,omitempty"` 11063 11064 // HouseholdIncomeDetails: Household income details. 11065 HouseholdIncomeDetails *HouseholdIncomeTargetingOptionDetails `json:"householdIncomeDetails,omitempty"` 11066 11067 // LanguageDetails: Language resource details. 11068 LanguageDetails *LanguageTargetingOptionDetails `json:"languageDetails,omitempty"` 11069 11070 // Name: Output only. The resource name for this targeting option. 11071 Name string `json:"name,omitempty"` 11072 11073 // OnScreenPositionDetails: On screen position details. 11074 OnScreenPositionDetails *OnScreenPositionTargetingOptionDetails `json:"onScreenPositionDetails,omitempty"` 11075 11076 // OperatingSystemDetails: Operating system resources details. 11077 OperatingSystemDetails *OperatingSystemTargetingOptionDetails `json:"operatingSystemDetails,omitempty"` 11078 11079 // ParentalStatusDetails: Parental status details. 11080 ParentalStatusDetails *ParentalStatusTargetingOptionDetails `json:"parentalStatusDetails,omitempty"` 11081 11082 // SensitiveCategoryDetails: Sensitive Category details. 11083 SensitiveCategoryDetails *SensitiveCategoryTargetingOptionDetails `json:"sensitiveCategoryDetails,omitempty"` 11084 11085 // SubExchangeDetails: Sub-exchange details. 11086 SubExchangeDetails *SubExchangeTargetingOptionDetails `json:"subExchangeDetails,omitempty"` 11087 11088 // TargetingOptionId: Output only. A unique identifier for this 11089 // targeting option. The tuple 11090 // {`targeting_type`, `targeting_option_id`} will be unique. 11091 TargetingOptionId string `json:"targetingOptionId,omitempty"` 11092 11093 // TargetingType: Output only. The type of this targeting option. 11094 // 11095 // Possible values: 11096 // "TARGETING_TYPE_UNSPECIFIED" - Default value when type is not 11097 // specified or is unknown in this version. 11098 // "TARGETING_TYPE_CHANNEL" - Target a channel (a custom group of 11099 // related websites or apps). 11100 // "TARGETING_TYPE_APP_CATEGORY" - Target an app category (for 11101 // example, education or puzzle games). 11102 // "TARGETING_TYPE_APP" - Target a specific app (for example, Angry 11103 // Birds). 11104 // "TARGETING_TYPE_URL" - Target a specific url (for example, 11105 // quora.com). 11106 // "TARGETING_TYPE_DAY_AND_TIME" - Target ads during a chosen time 11107 // period on a specific day. 11108 // "TARGETING_TYPE_AGE_RANGE" - Target ads to a specific age range 11109 // (for example, 18-24). 11110 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST" - Target ads to the 11111 // specified regions on a regional location list. 11112 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST" - Target ads to the 11113 // specified points of interest on a proximity location 11114 // list. 11115 // "TARGETING_TYPE_GENDER" - Target ads to a specific gender (for 11116 // example, female or male). 11117 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE" - Target a specific video player 11118 // size for video ads. 11119 // "TARGETING_TYPE_USER_REWARDED_CONTENT" - Target user rewarded 11120 // content for video ads. 11121 // "TARGETING_TYPE_PARENTAL_STATUS" - Target ads to a specific 11122 // parental status (for example, parent or not a 11123 // parent). 11124 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION" - Target video or audio 11125 // ads in a specific content instream position (for 11126 // example, pre-roll, mid-roll, or post-roll). 11127 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION" - Target ads in a 11128 // specific content outstream position. 11129 // "TARGETING_TYPE_DEVICE_TYPE" - Target ads to a specific device type 11130 // (for example, tablet or connected TV). 11131 // "TARGETING_TYPE_AUDIENCE_GROUP" - Target ads to an audience or 11132 // groups of audiences. 11133 // Singleton field, at most one can exist on a single Lineitem at a 11134 // time. 11135 // "TARGETING_TYPE_BROWSER" - Target ads to specific web browsers (for 11136 // example, Chrome). 11137 // "TARGETING_TYPE_HOUSEHOLD_INCOME" - Target ads to a specific 11138 // household income range (for example, top 10%). 11139 // "TARGETING_TYPE_ON_SCREEN_POSITION" - Target ads in a specific on 11140 // screen position. 11141 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER" - Filter web sites through 11142 // third party verification (for example, IAS or 11143 // DoubleVerify). 11144 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION" - Filter web sites 11145 // by specific digital content label ratings (for example, 11146 // DL-MA: suitable only for mature audiences). 11147 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION" - Filter website 11148 // content by sensitive categories (for example, adult). 11149 // "TARGETING_TYPE_ENVIRONMENT" - Target ads to a specific environment 11150 // (for example, web or app). 11151 // "TARGETING_TYPE_CARRIER_AND_ISP" - Target ads to a specific network 11152 // carrier or internet service provider 11153 // (ISP) (for example, Comcast or Orange). 11154 // "TARGETING_TYPE_OPERATING_SYSTEM" - Target ads to a specific 11155 // operating system (for example, macOS). 11156 // "TARGETING_TYPE_DEVICE_MAKE_MODEL" - Target ads to a specific 11157 // device make or model (for example, Roku or 11158 // Samsung). 11159 // "TARGETING_TYPE_KEYWORD" - Target ads to a specific keyword (for 11160 // example, dog or retriever). 11161 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST" - Target ads to a specific 11162 // negative keyword list. 11163 // "TARGETING_TYPE_VIEWABILITY" - Target ads to a specific viewability 11164 // (for example, 80% viewable). 11165 // "TARGETING_TYPE_CATEGORY" - Target ads to a specific content 11166 // category (for example, arts & 11167 // entertainment). 11168 // "TARGETING_TYPE_INVENTORY_SOURCE" - Purchase impressions from 11169 // specific deals and auction packages. 11170 // "TARGETING_TYPE_LANGUAGE" - Target ads to a specific language (for 11171 // example, English or Japanese). 11172 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS" - Target ads to ads.txt 11173 // authorized sellers. 11174 // "TARGETING_TYPE_GEO_REGION" - Target ads to a specific regional 11175 // location (for example, a city or state). 11176 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP" - Purchase impressions from 11177 // a group of deals and auction packages. 11178 // "TARGETING_TYPE_PROXIMITY_LOCATION" - Target ads to business 11179 // chains, individual points of interests (POIs), 11180 // street addresses, and latitude/longitude coordinates. 11181 // "TARGETING_TYPE_EXCHANGE" - Purchase impressions from specific 11182 // exchanges. 11183 // "TARGETING_TYPE_SUB_EXCHANGE" - Purchase impressions from specific 11184 // sub-exchanges. 11185 TargetingType string `json:"targetingType,omitempty"` 11186 11187 // UserRewardedContentDetails: User rewarded content details. 11188 UserRewardedContentDetails *UserRewardedContentTargetingOptionDetails `json:"userRewardedContentDetails,omitempty"` 11189 11190 // VideoPlayerSizeDetails: Video player size details. 11191 VideoPlayerSizeDetails *VideoPlayerSizeTargetingOptionDetails `json:"videoPlayerSizeDetails,omitempty"` 11192 11193 // ViewabilityDetails: Viewability resource details. 11194 ViewabilityDetails *ViewabilityTargetingOptionDetails `json:"viewabilityDetails,omitempty"` 11195 11196 // ServerResponse contains the HTTP response code and headers from the 11197 // server. 11198 googleapi.ServerResponse `json:"-"` 11199 11200 // ForceSendFields is a list of field names (e.g. "AgeRangeDetails") to 11201 // unconditionally include in API requests. By default, fields with 11202 // empty values are omitted from API requests. However, any non-pointer, 11203 // non-interface field appearing in ForceSendFields will be sent to the 11204 // server regardless of whether the field is empty or not. This may be 11205 // used to include empty fields in Patch requests. 11206 ForceSendFields []string `json:"-"` 11207 11208 // NullFields is a list of field names (e.g. "AgeRangeDetails") to 11209 // include in API requests with the JSON null value. By default, fields 11210 // with empty values are omitted from API requests. However, any field 11211 // with an empty value appearing in NullFields will be sent to the 11212 // server as null. It is an error if a field in this list has a 11213 // non-empty value. This may be used to include null fields in Patch 11214 // requests. 11215 NullFields []string `json:"-"` 11216} 11217 11218func (s *TargetingOption) MarshalJSON() ([]byte, error) { 11219 type NoMethod TargetingOption 11220 raw := NoMethod(*s) 11221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11222} 11223 11224// ThirdPartyOnlyConfig: Settings for advertisers that use third-party 11225// ad servers only. 11226type ThirdPartyOnlyConfig struct { 11227 // PixelOrderIdReportingEnabled: Whether or not order ID reporting for 11228 // pixels is enabled. 11229 // This value cannot be changed once set to `true`. 11230 PixelOrderIdReportingEnabled bool `json:"pixelOrderIdReportingEnabled,omitempty"` 11231 11232 // ForceSendFields is a list of field names (e.g. 11233 // "PixelOrderIdReportingEnabled") to unconditionally include in API 11234 // requests. By default, fields with empty values are omitted from API 11235 // requests. However, any non-pointer, non-interface field appearing in 11236 // ForceSendFields will be sent to the server regardless of whether the 11237 // field is empty or not. This may be used to include empty fields in 11238 // Patch requests. 11239 ForceSendFields []string `json:"-"` 11240 11241 // NullFields is a list of field names (e.g. 11242 // "PixelOrderIdReportingEnabled") to include in API requests with the 11243 // JSON null value. By default, fields with empty values are omitted 11244 // from API requests. However, any field with an empty value appearing 11245 // in NullFields will be sent to the server as null. It is an error if a 11246 // field in this list has a non-empty value. This may be used to include 11247 // null fields in Patch requests. 11248 NullFields []string `json:"-"` 11249} 11250 11251func (s *ThirdPartyOnlyConfig) MarshalJSON() ([]byte, error) { 11252 type NoMethod ThirdPartyOnlyConfig 11253 raw := NoMethod(*s) 11254 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11255} 11256 11257// ThirdPartyUrl: Tracking URLs from third parties to track interactions 11258// with an audio or a 11259// video creative. 11260type ThirdPartyUrl struct { 11261 // Type: The type of interaction needs to be tracked by the tracking URL 11262 // 11263 // Possible values: 11264 // "THIRD_PARTY_URL_TYPE_UNSPECIFIED" - The type of third-party URL is 11265 // unspecified or is unknown in this version. 11266 // "THIRD_PARTY_URL_TYPE_IMPRESSION" - Used to count impressions of 11267 // the creative after the audio or video 11268 // buffering is complete. 11269 // "THIRD_PARTY_URL_TYPE_CLICK_TRACKING" - Used to track user clicks 11270 // on the audio or video. 11271 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_START" - Used to track the number 11272 // of times a user starts the audio or video. 11273 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_FIRST_QUARTILE" - Used to track 11274 // the number of times the audio or video plays to 25% of its 11275 // length. 11276 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_MIDPOINT" - Used to track the 11277 // number of times the audio or video plays to 50% of its 11278 // length. 11279 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_THIRD_QUARTILE" - Used to track 11280 // the number of times the audio or video plays to 75% of its 11281 // length. 11282 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_COMPLETE" - Used to track the 11283 // number of times the audio or video plays to the end. 11284 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_MUTE" - Used to track the number 11285 // of times a user mutes the audio or video. 11286 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_PAUSE" - Used to track the number 11287 // of times a user pauses the audio or video. 11288 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_REWIND" - Used to track the 11289 // number of times a user replays the audio or video. 11290 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_FULLSCREEN" - Used to track the 11291 // number of times a user expands the player to 11292 // full-screen size. 11293 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_STOP" - Used to track the number 11294 // of times a user stops the audio or video. 11295 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_CUSTOM" - Used to track the 11296 // number of times a user performs a custom click, 11297 // such as clicking on a video hot spot. 11298 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_SKIP" - Used to track the number 11299 // of times the audio or video was skipped. 11300 // "THIRD_PARTY_URL_TYPE_AUDIO_VIDEO_PROGRESS" - Used to track the 11301 // number of times the audio or video plays to an offset 11302 // determined by the progress_offset. 11303 Type string `json:"type,omitempty"` 11304 11305 // Url: Tracking URL used to track the interaction. 11306 // 11307 // Provide a URL with optional path or query string, beginning with 11308 // `https:`. 11309 // For example, https://www.example.com/path 11310 Url string `json:"url,omitempty"` 11311 11312 // ForceSendFields is a list of field names (e.g. "Type") to 11313 // unconditionally include in API requests. By default, fields with 11314 // empty values are omitted from API requests. However, any non-pointer, 11315 // non-interface field appearing in ForceSendFields will be sent to the 11316 // server regardless of whether the field is empty or not. This may be 11317 // used to include empty fields in Patch requests. 11318 ForceSendFields []string `json:"-"` 11319 11320 // NullFields is a list of field names (e.g. "Type") to include in API 11321 // requests with the JSON null value. By default, fields with empty 11322 // values are omitted from API requests. However, any field with an 11323 // empty value appearing in NullFields will be sent to the server as 11324 // null. It is an error if a field in this list has a non-empty value. 11325 // This may be used to include null fields in Patch requests. 11326 NullFields []string `json:"-"` 11327} 11328 11329func (s *ThirdPartyUrl) MarshalJSON() ([]byte, error) { 11330 type NoMethod ThirdPartyUrl 11331 raw := NoMethod(*s) 11332 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11333} 11334 11335// ThirdPartyVerifierAssignedTargetingOptionDetails: Assigned third 11336// party verifier targeting option details. This will be 11337// populated in the details field of an AssignedTargetingOption 11338// when 11339// targeting_type is 11340// `TARGETING_TYPE_THIRD_PARTY_VERIFIER`. 11341type ThirdPartyVerifierAssignedTargetingOptionDetails struct { 11342 // Adloox: Third party brand verifier -- Adloox. 11343 Adloox *Adloox `json:"adloox,omitempty"` 11344 11345 // DoubleVerify: Third party brand verifier -- DoubleVerify. 11346 DoubleVerify *DoubleVerify `json:"doubleVerify,omitempty"` 11347 11348 // IntegralAdScience: Third party brand verifier -- Integral Ad Science. 11349 IntegralAdScience *IntegralAdScience `json:"integralAdScience,omitempty"` 11350 11351 // ForceSendFields is a list of field names (e.g. "Adloox") to 11352 // unconditionally include in API requests. By default, fields with 11353 // empty values are omitted from API requests. However, any non-pointer, 11354 // non-interface field appearing in ForceSendFields will be sent to the 11355 // server regardless of whether the field is empty or not. This may be 11356 // used to include empty fields in Patch requests. 11357 ForceSendFields []string `json:"-"` 11358 11359 // NullFields is a list of field names (e.g. "Adloox") to include in API 11360 // requests with the JSON null value. By default, fields with empty 11361 // values are omitted from API requests. However, any field with an 11362 // empty value appearing in NullFields will be sent to the server as 11363 // null. It is an error if a field in this list has a non-empty value. 11364 // This may be used to include null fields in Patch requests. 11365 NullFields []string `json:"-"` 11366} 11367 11368func (s *ThirdPartyVerifierAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11369 type NoMethod ThirdPartyVerifierAssignedTargetingOptionDetails 11370 raw := NoMethod(*s) 11371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11372} 11373 11374// TimeRange: A time range. 11375type TimeRange struct { 11376 // EndTime: Required. The upper bound of a time range, inclusive. 11377 EndTime string `json:"endTime,omitempty"` 11378 11379 // StartTime: Required. The lower bound of a time range, inclusive. 11380 StartTime string `json:"startTime,omitempty"` 11381 11382 // ForceSendFields is a list of field names (e.g. "EndTime") to 11383 // unconditionally include in API requests. By default, fields with 11384 // empty values are omitted from API requests. However, any non-pointer, 11385 // non-interface field appearing in ForceSendFields will be sent to the 11386 // server regardless of whether the field is empty or not. This may be 11387 // used to include empty fields in Patch requests. 11388 ForceSendFields []string `json:"-"` 11389 11390 // NullFields is a list of field names (e.g. "EndTime") to include in 11391 // API requests with the JSON null value. By default, fields with empty 11392 // values are omitted from API requests. However, any field with an 11393 // empty value appearing in NullFields will be sent to the server as 11394 // null. It is an error if a field in this list has a non-empty value. 11395 // This may be used to include null fields in Patch requests. 11396 NullFields []string `json:"-"` 11397} 11398 11399func (s *TimeRange) MarshalJSON() ([]byte, error) { 11400 type NoMethod TimeRange 11401 raw := NoMethod(*s) 11402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11403} 11404 11405// TimerEvent: Timer event of the creative. 11406type TimerEvent struct { 11407 // Name: Required. The name of the timer event. 11408 Name string `json:"name,omitempty"` 11409 11410 // ReportingName: Required. The name used to identify this timer event 11411 // in reports. 11412 ReportingName string `json:"reportingName,omitempty"` 11413 11414 // ForceSendFields is a list of field names (e.g. "Name") to 11415 // unconditionally include in API requests. By default, fields with 11416 // empty values are omitted from API requests. However, any non-pointer, 11417 // non-interface field appearing in ForceSendFields will be sent to the 11418 // server regardless of whether the field is empty or not. This may be 11419 // used to include empty fields in Patch requests. 11420 ForceSendFields []string `json:"-"` 11421 11422 // NullFields is a list of field names (e.g. "Name") to include in API 11423 // requests with the JSON null value. By default, fields with empty 11424 // values are omitted from API requests. However, any field with an 11425 // empty value appearing in NullFields will be sent to the server as 11426 // null. It is an error if a field in this list has a non-empty value. 11427 // This may be used to include null fields in Patch requests. 11428 NullFields []string `json:"-"` 11429} 11430 11431func (s *TimerEvent) MarshalJSON() ([]byte, error) { 11432 type NoMethod TimerEvent 11433 raw := NoMethod(*s) 11434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11435} 11436 11437// TrackingFloodlightActivityConfig: Settings that control the behavior 11438// of a single Floodlight activity config. 11439type TrackingFloodlightActivityConfig struct { 11440 // FloodlightActivityId: Required. The ID of the Floodlight activity. 11441 FloodlightActivityId int64 `json:"floodlightActivityId,omitempty,string"` 11442 11443 // PostClickLookbackWindowDays: Required. The number of days after an ad 11444 // has been clicked in which a 11445 // conversion may be counted. 11446 // Must be between 0 and 90 inclusive. 11447 PostClickLookbackWindowDays int64 `json:"postClickLookbackWindowDays,omitempty"` 11448 11449 // PostViewLookbackWindowDays: Required. The number of days after an ad 11450 // has been viewed in which a 11451 // conversion may be counted. 11452 // Must be between 0 and 90 inclusive. 11453 PostViewLookbackWindowDays int64 `json:"postViewLookbackWindowDays,omitempty"` 11454 11455 // ForceSendFields is a list of field names (e.g. 11456 // "FloodlightActivityId") to unconditionally include in API requests. 11457 // By default, fields with empty values are omitted from API requests. 11458 // However, any non-pointer, non-interface field appearing in 11459 // ForceSendFields will be sent to the server regardless of whether the 11460 // field is empty or not. This may be used to include empty fields in 11461 // Patch requests. 11462 ForceSendFields []string `json:"-"` 11463 11464 // NullFields is a list of field names (e.g. "FloodlightActivityId") to 11465 // include in API requests with the JSON null value. By default, fields 11466 // with empty values are omitted from API requests. However, any field 11467 // with an empty value appearing in NullFields will be sent to the 11468 // server as null. It is an error if a field in this list has a 11469 // non-empty value. This may be used to include null fields in Patch 11470 // requests. 11471 NullFields []string `json:"-"` 11472} 11473 11474func (s *TrackingFloodlightActivityConfig) MarshalJSON() ([]byte, error) { 11475 type NoMethod TrackingFloodlightActivityConfig 11476 raw := NoMethod(*s) 11477 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11478} 11479 11480// Transcode: Represents information about the transcoded audio or video 11481// file. 11482type Transcode struct { 11483 // AudioBitRateKbps: The bit rate for the audio stream of the transcoded 11484 // video, or the bit rate 11485 // for the transcoded audio, in kilobits per second. 11486 AudioBitRateKbps int64 `json:"audioBitRateKbps,omitempty,string"` 11487 11488 // AudioSampleRateHz: The sample rate for the audio stream of the 11489 // transcoded video, or the sample 11490 // rate for the transcoded audio, in hertz. 11491 AudioSampleRateHz int64 `json:"audioSampleRateHz,omitempty,string"` 11492 11493 // BitRateKbps: The transcoding bit rate of the transcoded video, in 11494 // kilobits per second. 11495 BitRateKbps int64 `json:"bitRateKbps,omitempty,string"` 11496 11497 // Dimensions: The dimensions of the transcoded video. 11498 Dimensions *Dimensions `json:"dimensions,omitempty"` 11499 11500 // FileSizeBytes: The size of the transcoded file, in bytes. 11501 FileSizeBytes int64 `json:"fileSizeBytes,omitempty,string"` 11502 11503 // FrameRate: The frame rate of the transcoded video, in frames per 11504 // second. 11505 FrameRate float64 `json:"frameRate,omitempty"` 11506 11507 // MimeType: The MIME type of the transcoded file. 11508 MimeType string `json:"mimeType,omitempty"` 11509 11510 // Name: The name of the transcoded file. 11511 Name string `json:"name,omitempty"` 11512 11513 // Transcoded: Indicates if the transcoding was successful. 11514 Transcoded bool `json:"transcoded,omitempty"` 11515 11516 // ForceSendFields is a list of field names (e.g. "AudioBitRateKbps") to 11517 // unconditionally include in API requests. By default, fields with 11518 // empty values are omitted from API requests. However, any non-pointer, 11519 // non-interface field appearing in ForceSendFields will be sent to the 11520 // server regardless of whether the field is empty or not. This may be 11521 // used to include empty fields in Patch requests. 11522 ForceSendFields []string `json:"-"` 11523 11524 // NullFields is a list of field names (e.g. "AudioBitRateKbps") to 11525 // include in API requests with the JSON null value. By default, fields 11526 // with empty values are omitted from API requests. However, any field 11527 // with an empty value appearing in NullFields will be sent to the 11528 // server as null. It is an error if a field in this list has a 11529 // non-empty value. This may be used to include null fields in Patch 11530 // requests. 11531 NullFields []string `json:"-"` 11532} 11533 11534func (s *Transcode) MarshalJSON() ([]byte, error) { 11535 type NoMethod Transcode 11536 raw := NoMethod(*s) 11537 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11538} 11539 11540func (s *Transcode) UnmarshalJSON(data []byte) error { 11541 type NoMethod Transcode 11542 var s1 struct { 11543 FrameRate gensupport.JSONFloat64 `json:"frameRate"` 11544 *NoMethod 11545 } 11546 s1.NoMethod = (*NoMethod)(s) 11547 if err := json.Unmarshal(data, &s1); err != nil { 11548 return err 11549 } 11550 s.FrameRate = float64(s1.FrameRate) 11551 return nil 11552} 11553 11554// UniversalAdId: A creative identifier provided by a registry that is 11555// unique across all 11556// platforms. This is part of the VAST 4.0 standard. 11557type UniversalAdId struct { 11558 // Id: The unique creative identifier. 11559 Id string `json:"id,omitempty"` 11560 11561 // Registry: The registry provides unique creative identifiers. 11562 // 11563 // Possible values: 11564 // "UNIVERSAL_AD_REGISTRY_UNSPECIFIED" - The Universal Ad registry is 11565 // unspecified or is unknown in this version. 11566 // "UNIVERSAL_AD_REGISTRY_OTHER" - Use a custom provider to provide 11567 // the Universal Ad ID. 11568 // "UNIVERSAL_AD_REGISTRY_AD_ID" - Use Ad-ID to provide the Universal 11569 // Ad ID. 11570 // "UNIVERSAL_AD_REGISTRY_CLEARCAST" - Use clearcast.co.uk to provide 11571 // the Universal Ad ID. 11572 // "UNIVERSAL_AD_REGISTRY_DV360" - Use Display & Video 360 to provide 11573 // the Universal Ad ID. 11574 // "UNIVERSAL_AD_REGISTRY_CM" - Use Campaign Manager to provide the 11575 // Universal Ad ID. 11576 Registry string `json:"registry,omitempty"` 11577 11578 // ForceSendFields is a list of field names (e.g. "Id") to 11579 // unconditionally include in API requests. By default, fields with 11580 // empty values are omitted from API requests. However, any non-pointer, 11581 // non-interface field appearing in ForceSendFields will be sent to the 11582 // server regardless of whether the field is empty or not. This may be 11583 // used to include empty fields in Patch requests. 11584 ForceSendFields []string `json:"-"` 11585 11586 // NullFields is a list of field names (e.g. "Id") to include in API 11587 // requests with the JSON null value. By default, fields with empty 11588 // values are omitted from API requests. However, any field with an 11589 // empty value appearing in NullFields will be sent to the server as 11590 // null. It is an error if a field in this list has a non-empty value. 11591 // This may be used to include null fields in Patch requests. 11592 NullFields []string `json:"-"` 11593} 11594 11595func (s *UniversalAdId) MarshalJSON() ([]byte, error) { 11596 type NoMethod UniversalAdId 11597 raw := NoMethod(*s) 11598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11599} 11600 11601// UrlAssignedTargetingOptionDetails: Details for assigned URL targeting 11602// option. This will be populated in the 11603// details field of an AssignedTargetingOption when 11604// targeting_type is 11605// `TARGETING_TYPE_URL`. 11606type UrlAssignedTargetingOptionDetails struct { 11607 // Negative: Indicates if this option is being negatively targeted. 11608 Negative bool `json:"negative,omitempty"` 11609 11610 // Url: Required. The URL, for example `example.com`. 11611 // 11612 // DV360 supports two levels of subdirectory targeting, for 11613 // example 11614 // `www.example.com/one-subdirectory-level/second-level`, and five 11615 // levels of 11616 // subdomain targeting, for example 11617 // `five.four.three.two.one.example.com`. 11618 Url string `json:"url,omitempty"` 11619 11620 // ForceSendFields is a list of field names (e.g. "Negative") to 11621 // unconditionally include in API requests. By default, fields with 11622 // empty values are omitted from API requests. However, any non-pointer, 11623 // non-interface field appearing in ForceSendFields will be sent to the 11624 // server regardless of whether the field is empty or not. This may be 11625 // used to include empty fields in Patch requests. 11626 ForceSendFields []string `json:"-"` 11627 11628 // NullFields is a list of field names (e.g. "Negative") to include in 11629 // API requests with the JSON null value. By default, fields with empty 11630 // values are omitted from API requests. However, any field with an 11631 // empty value appearing in NullFields will be sent to the server as 11632 // null. It is an error if a field in this list has a non-empty value. 11633 // This may be used to include null fields in Patch requests. 11634 NullFields []string `json:"-"` 11635} 11636 11637func (s *UrlAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11638 type NoMethod UrlAssignedTargetingOptionDetails 11639 raw := NoMethod(*s) 11640 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11641} 11642 11643// UserRewardedContentAssignedTargetingOptionDetails: User rewarded 11644// content targeting option details. This will be populated 11645// in 11646// the 11647// user_rewarded_content_details 11648// field when 11649// targeting_type is 11650// `TARGETING_TYPE_USER_REWARDED_CONTENT`. 11651type UserRewardedContentAssignedTargetingOptionDetails struct { 11652 // TargetingOptionId: Required. The targeting_option_id field 11653 // when 11654 // targeting_type is 11655 // `TARGETING_TYPE_USER_REWARDED_CONTENT`. 11656 TargetingOptionId string `json:"targetingOptionId,omitempty"` 11657 11658 // UserRewardedContent: Output only. User rewarded content status for 11659 // video ads. 11660 // 11661 // Possible values: 11662 // "USER_REWARDED_CONTENT_UNSPECIFIED" - User rewarded content is not 11663 // specified or is unknown in this version. 11664 // "USER_REWARDED_CONTENT_USER_REWARDED" - Represents ads where the 11665 // user will see a reward after viewing. 11666 // "USER_REWARDED_CONTENT_NOT_USER_REWARDED" - Represents all other 11667 // ads besides user-rewarded. 11668 UserRewardedContent string `json:"userRewardedContent,omitempty"` 11669 11670 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 11671 // to unconditionally include in API requests. By default, fields with 11672 // empty values are omitted from API requests. However, any non-pointer, 11673 // non-interface field appearing in ForceSendFields will be sent to the 11674 // server regardless of whether the field is empty or not. This may be 11675 // used to include empty fields in Patch requests. 11676 ForceSendFields []string `json:"-"` 11677 11678 // NullFields is a list of field names (e.g. "TargetingOptionId") to 11679 // include in API requests with the JSON null value. By default, fields 11680 // with empty values are omitted from API requests. However, any field 11681 // with an empty value appearing in NullFields will be sent to the 11682 // server as null. It is an error if a field in this list has a 11683 // non-empty value. This may be used to include null fields in Patch 11684 // requests. 11685 NullFields []string `json:"-"` 11686} 11687 11688func (s *UserRewardedContentAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11689 type NoMethod UserRewardedContentAssignedTargetingOptionDetails 11690 raw := NoMethod(*s) 11691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11692} 11693 11694// UserRewardedContentTargetingOptionDetails: Represents a targetable 11695// user rewarded content status for video ads only. This 11696// will be populated in the 11697// user_rewarded_content_details 11698// field when 11699// targeting_type is 11700// `TARGETING_TYPE_USER_REWARDED_CONTENT`. 11701type UserRewardedContentTargetingOptionDetails struct { 11702 // UserRewardedContent: Output only. User rewarded content status for 11703 // video ads. 11704 // 11705 // Possible values: 11706 // "USER_REWARDED_CONTENT_UNSPECIFIED" - User rewarded content is not 11707 // specified or is unknown in this version. 11708 // "USER_REWARDED_CONTENT_USER_REWARDED" - Represents ads where the 11709 // user will see a reward after viewing. 11710 // "USER_REWARDED_CONTENT_NOT_USER_REWARDED" - Represents all other 11711 // ads besides user-rewarded. 11712 UserRewardedContent string `json:"userRewardedContent,omitempty"` 11713 11714 // ForceSendFields is a list of field names (e.g. "UserRewardedContent") 11715 // to unconditionally include in API requests. By default, fields with 11716 // empty values are omitted from API requests. However, any non-pointer, 11717 // non-interface field appearing in ForceSendFields will be sent to the 11718 // server regardless of whether the field is empty or not. This may be 11719 // used to include empty fields in Patch requests. 11720 ForceSendFields []string `json:"-"` 11721 11722 // NullFields is a list of field names (e.g. "UserRewardedContent") to 11723 // include in API requests with the JSON null value. By default, fields 11724 // with empty values are omitted from API requests. However, any field 11725 // with an empty value appearing in NullFields will be sent to the 11726 // server as null. It is an error if a field in this list has a 11727 // non-empty value. This may be used to include null fields in Patch 11728 // requests. 11729 NullFields []string `json:"-"` 11730} 11731 11732func (s *UserRewardedContentTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11733 type NoMethod UserRewardedContentTargetingOptionDetails 11734 raw := NoMethod(*s) 11735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11736} 11737 11738// VideoPlayerSizeAssignedTargetingOptionDetails: Video player size 11739// targeting option details. This will be populated in 11740// the 11741// video_player_size_details 11742// field when targeting_type 11743// is 11744// `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 11745// Explicitly targeting all options is not supported. Remove all video 11746// player 11747// size targeting options to achieve this effect. 11748type VideoPlayerSizeAssignedTargetingOptionDetails struct { 11749 // TargetingOptionId: Required. The targeting_option_id field 11750 // when 11751 // targeting_type is 11752 // `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 11753 TargetingOptionId string `json:"targetingOptionId,omitempty"` 11754 11755 // VideoPlayerSize: Output only. The video player size. 11756 // 11757 // Possible values: 11758 // "VIDEO_PLAYER_SIZE_UNSPECIFIED" - Video player size is not 11759 // specified in this version. This enum is a place 11760 // holder for a default value and does not represent a real video player 11761 // size. 11762 // "VIDEO_PLAYER_SIZE_SMALL" - The dimensions of the video player are 11763 // less than 400×300 (desktop), or up 11764 // to 20% of screen covered (mobile). 11765 // "VIDEO_PLAYER_SIZE_LARGE" - The dimensions of the video player are 11766 // between 400x300 and 1280x720 pixels 11767 // (desktop), or 20% to 90% of the screen covered (mobile). 11768 // "VIDEO_PLAYER_SIZE_HD" - The dimensions of the video player are 11769 // 1280×720 or greater (desktop), or 11770 // over 90% of the screen covered (mobile). 11771 // "VIDEO_PLAYER_SIZE_UNKNOWN" - The dimensions of the video player 11772 // are unknown. 11773 VideoPlayerSize string `json:"videoPlayerSize,omitempty"` 11774 11775 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 11776 // to unconditionally include in API requests. By default, fields with 11777 // empty values are omitted from API requests. However, any non-pointer, 11778 // non-interface field appearing in ForceSendFields will be sent to the 11779 // server regardless of whether the field is empty or not. This may be 11780 // used to include empty fields in Patch requests. 11781 ForceSendFields []string `json:"-"` 11782 11783 // NullFields is a list of field names (e.g. "TargetingOptionId") to 11784 // include in API requests with the JSON null value. By default, fields 11785 // with empty values are omitted from API requests. However, any field 11786 // with an empty value appearing in NullFields will be sent to the 11787 // server as null. It is an error if a field in this list has a 11788 // non-empty value. This may be used to include null fields in Patch 11789 // requests. 11790 NullFields []string `json:"-"` 11791} 11792 11793func (s *VideoPlayerSizeAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11794 type NoMethod VideoPlayerSizeAssignedTargetingOptionDetails 11795 raw := NoMethod(*s) 11796 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11797} 11798 11799// VideoPlayerSizeTargetingOptionDetails: Represents a targetable video 11800// player size. This will be populated in 11801// the 11802// video_player_size_details 11803// field when targeting_type is 11804// `TARGETING_TYPE_VIDEO_PLAYER_SIZE`. 11805type VideoPlayerSizeTargetingOptionDetails struct { 11806 // VideoPlayerSize: Output only. The video player size. 11807 // 11808 // Possible values: 11809 // "VIDEO_PLAYER_SIZE_UNSPECIFIED" - Video player size is not 11810 // specified in this version. This enum is a place 11811 // holder for a default value and does not represent a real video player 11812 // size. 11813 // "VIDEO_PLAYER_SIZE_SMALL" - The dimensions of the video player are 11814 // less than 400×300 (desktop), or up 11815 // to 20% of screen covered (mobile). 11816 // "VIDEO_PLAYER_SIZE_LARGE" - The dimensions of the video player are 11817 // between 400x300 and 1280x720 pixels 11818 // (desktop), or 20% to 90% of the screen covered (mobile). 11819 // "VIDEO_PLAYER_SIZE_HD" - The dimensions of the video player are 11820 // 1280×720 or greater (desktop), or 11821 // over 90% of the screen covered (mobile). 11822 // "VIDEO_PLAYER_SIZE_UNKNOWN" - The dimensions of the video player 11823 // are unknown. 11824 VideoPlayerSize string `json:"videoPlayerSize,omitempty"` 11825 11826 // ForceSendFields is a list of field names (e.g. "VideoPlayerSize") to 11827 // unconditionally include in API requests. By default, fields with 11828 // empty values are omitted from API requests. However, any non-pointer, 11829 // non-interface field appearing in ForceSendFields will be sent to the 11830 // server regardless of whether the field is empty or not. This may be 11831 // used to include empty fields in Patch requests. 11832 ForceSendFields []string `json:"-"` 11833 11834 // NullFields is a list of field names (e.g. "VideoPlayerSize") to 11835 // include in API requests with the JSON null value. By default, fields 11836 // with empty values are omitted from API requests. However, any field 11837 // with an empty value appearing in NullFields will be sent to the 11838 // server as null. It is an error if a field in this list has a 11839 // non-empty value. This may be used to include null fields in Patch 11840 // requests. 11841 NullFields []string `json:"-"` 11842} 11843 11844func (s *VideoPlayerSizeTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11845 type NoMethod VideoPlayerSizeTargetingOptionDetails 11846 raw := NoMethod(*s) 11847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11848} 11849 11850// ViewabilityAssignedTargetingOptionDetails: Assigned viewability 11851// targeting option details. This will be populated in 11852// the 11853// viewability_details field of 11854// an AssignedTargetingOption when 11855// targeting_type is 11856// `TARGETING_TYPE_VIEWABILITY`. 11857type ViewabilityAssignedTargetingOptionDetails struct { 11858 // TargetingOptionId: Required. The targeting_option_id of 11859 // a 11860 // TargetingOption of type `TARGETING_TYPE_VIEWABILITY` (e.g., 11861 // "509010" 11862 // for targeting the `VIEWABILITY_10_PERCENT_OR_MORE` option). 11863 TargetingOptionId string `json:"targetingOptionId,omitempty"` 11864 11865 // Viewability: Output only. The predicted viewability percentage. 11866 // 11867 // Possible values: 11868 // "VIEWABILITY_UNSPECIFIED" - Default value when viewability is not 11869 // specified in this version. This enum 11870 // is a placeholder for default value and does not represent a 11871 // real 11872 // viewability option. 11873 // "VIEWABILITY_10_PERCENT_OR_MORE" - Bid only on impressions that are 11874 // at least 10% likely to be viewable. 11875 // "VIEWABILITY_20_PERCENT_OR_MORE" - Bid only on impressions that are 11876 // at least 20% likely to be viewable. 11877 // "VIEWABILITY_30_PERCENT_OR_MORE" - Bid only on impressions that are 11878 // at least 30% likely to be viewable. 11879 // "VIEWABILITY_40_PERCENT_OR_MORE" - Bid only on impressions that are 11880 // at least 40% likely to be viewable. 11881 // "VIEWABILITY_50_PERCENT_OR_MORE" - Bid only on impressions that are 11882 // at least 50% likely to be viewable. 11883 // "VIEWABILITY_60_PERCENT_OR_MORE" - Bid only on impressions that are 11884 // at least 60% likely to be viewable. 11885 // "VIEWABILITY_70_PERCENT_OR_MORE" - Bid only on impressions that are 11886 // at least 70% likely to be viewable. 11887 // "VIEWABILITY_80_PERCENT_OR_MORE" - Bid only on impressions that are 11888 // at least 80% likely to be viewable. 11889 // "VIEWABILITY_90_PERCENT_OR_MORE" - Bid only on impressions that are 11890 // at least 90% likely to be viewable. 11891 Viewability string `json:"viewability,omitempty"` 11892 11893 // ForceSendFields is a list of field names (e.g. "TargetingOptionId") 11894 // to unconditionally include in API requests. By default, fields with 11895 // empty values are omitted from API requests. However, any non-pointer, 11896 // non-interface field appearing in ForceSendFields will be sent to the 11897 // server regardless of whether the field is empty or not. This may be 11898 // used to include empty fields in Patch requests. 11899 ForceSendFields []string `json:"-"` 11900 11901 // NullFields is a list of field names (e.g. "TargetingOptionId") to 11902 // include in API requests with the JSON null value. By default, fields 11903 // with empty values are omitted from API requests. However, any field 11904 // with an empty value appearing in NullFields will be sent to the 11905 // server as null. It is an error if a field in this list has a 11906 // non-empty value. This may be used to include null fields in Patch 11907 // requests. 11908 NullFields []string `json:"-"` 11909} 11910 11911func (s *ViewabilityAssignedTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11912 type NoMethod ViewabilityAssignedTargetingOptionDetails 11913 raw := NoMethod(*s) 11914 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11915} 11916 11917// ViewabilityTargetingOptionDetails: Represents a targetable 11918// viewability. This will be populated in the 11919// viewability_details field of a 11920// TargetingOption when targeting_type is 11921// `TARGETING_TYPE_VIEWABILITY`. 11922type ViewabilityTargetingOptionDetails struct { 11923 // Viewability: Output only. The predicted viewability percentage. 11924 // 11925 // Possible values: 11926 // "VIEWABILITY_UNSPECIFIED" - Default value when viewability is not 11927 // specified in this version. This enum 11928 // is a placeholder for default value and does not represent a 11929 // real 11930 // viewability option. 11931 // "VIEWABILITY_10_PERCENT_OR_MORE" - Bid only on impressions that are 11932 // at least 10% likely to be viewable. 11933 // "VIEWABILITY_20_PERCENT_OR_MORE" - Bid only on impressions that are 11934 // at least 20% likely to be viewable. 11935 // "VIEWABILITY_30_PERCENT_OR_MORE" - Bid only on impressions that are 11936 // at least 30% likely to be viewable. 11937 // "VIEWABILITY_40_PERCENT_OR_MORE" - Bid only on impressions that are 11938 // at least 40% likely to be viewable. 11939 // "VIEWABILITY_50_PERCENT_OR_MORE" - Bid only on impressions that are 11940 // at least 50% likely to be viewable. 11941 // "VIEWABILITY_60_PERCENT_OR_MORE" - Bid only on impressions that are 11942 // at least 60% likely to be viewable. 11943 // "VIEWABILITY_70_PERCENT_OR_MORE" - Bid only on impressions that are 11944 // at least 70% likely to be viewable. 11945 // "VIEWABILITY_80_PERCENT_OR_MORE" - Bid only on impressions that are 11946 // at least 80% likely to be viewable. 11947 // "VIEWABILITY_90_PERCENT_OR_MORE" - Bid only on impressions that are 11948 // at least 90% likely to be viewable. 11949 Viewability string `json:"viewability,omitempty"` 11950 11951 // ForceSendFields is a list of field names (e.g. "Viewability") to 11952 // unconditionally include in API requests. By default, fields with 11953 // empty values are omitted from API requests. However, any non-pointer, 11954 // non-interface field appearing in ForceSendFields will be sent to the 11955 // server regardless of whether the field is empty or not. This may be 11956 // used to include empty fields in Patch requests. 11957 ForceSendFields []string `json:"-"` 11958 11959 // NullFields is a list of field names (e.g. "Viewability") to include 11960 // in API requests with the JSON null value. By default, fields with 11961 // empty values are omitted from API requests. However, any field with 11962 // an empty value appearing in NullFields will be sent to the server as 11963 // null. It is an error if a field in this list has a non-empty value. 11964 // This may be used to include null fields in Patch requests. 11965 NullFields []string `json:"-"` 11966} 11967 11968func (s *ViewabilityTargetingOptionDetails) MarshalJSON() ([]byte, error) { 11969 type NoMethod ViewabilityTargetingOptionDetails 11970 raw := NoMethod(*s) 11971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11972} 11973 11974// method id "displayvideo.advertisers.create": 11975 11976type AdvertisersCreateCall struct { 11977 s *Service 11978 advertiser *Advertiser 11979 urlParams_ gensupport.URLParams 11980 ctx_ context.Context 11981 header_ http.Header 11982} 11983 11984// Create: Creates a new advertiser. 11985// Returns the newly created advertiser if successful. 11986// This method can take up to 180 seconds to complete. 11987func (r *AdvertisersService) Create(advertiser *Advertiser) *AdvertisersCreateCall { 11988 c := &AdvertisersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11989 c.advertiser = advertiser 11990 return c 11991} 11992 11993// Fields allows partial responses to be retrieved. See 11994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11995// for more information. 11996func (c *AdvertisersCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreateCall { 11997 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11998 return c 11999} 12000 12001// Context sets the context to be used in this call's Do method. Any 12002// pending HTTP request will be aborted if the provided context is 12003// canceled. 12004func (c *AdvertisersCreateCall) Context(ctx context.Context) *AdvertisersCreateCall { 12005 c.ctx_ = ctx 12006 return c 12007} 12008 12009// Header returns an http.Header that can be modified by the caller to 12010// add HTTP headers to the request. 12011func (c *AdvertisersCreateCall) Header() http.Header { 12012 if c.header_ == nil { 12013 c.header_ = make(http.Header) 12014 } 12015 return c.header_ 12016} 12017 12018func (c *AdvertisersCreateCall) doRequest(alt string) (*http.Response, error) { 12019 reqHeaders := make(http.Header) 12020 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12021 for k, v := range c.header_ { 12022 reqHeaders[k] = v 12023 } 12024 reqHeaders.Set("User-Agent", c.s.userAgent()) 12025 var body io.Reader = nil 12026 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser) 12027 if err != nil { 12028 return nil, err 12029 } 12030 reqHeaders.Set("Content-Type", "application/json") 12031 c.urlParams_.Set("alt", alt) 12032 c.urlParams_.Set("prettyPrint", "false") 12033 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers") 12034 urls += "?" + c.urlParams_.Encode() 12035 req, err := http.NewRequest("POST", urls, body) 12036 if err != nil { 12037 return nil, err 12038 } 12039 req.Header = reqHeaders 12040 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12041} 12042 12043// Do executes the "displayvideo.advertisers.create" call. 12044// Exactly one of *Advertiser or error will be non-nil. Any non-2xx 12045// status code is an error. Response headers are in either 12046// *Advertiser.ServerResponse.Header or (if a response was returned at 12047// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12048// to check whether the returned error was because 12049// http.StatusNotModified was returned. 12050func (c *AdvertisersCreateCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) { 12051 gensupport.SetOptions(c.urlParams_, opts...) 12052 res, err := c.doRequest("json") 12053 if res != nil && res.StatusCode == http.StatusNotModified { 12054 if res.Body != nil { 12055 res.Body.Close() 12056 } 12057 return nil, &googleapi.Error{ 12058 Code: res.StatusCode, 12059 Header: res.Header, 12060 } 12061 } 12062 if err != nil { 12063 return nil, err 12064 } 12065 defer googleapi.CloseBody(res) 12066 if err := googleapi.CheckResponse(res); err != nil { 12067 return nil, err 12068 } 12069 ret := &Advertiser{ 12070 ServerResponse: googleapi.ServerResponse{ 12071 Header: res.Header, 12072 HTTPStatusCode: res.StatusCode, 12073 }, 12074 } 12075 target := &ret 12076 if err := gensupport.DecodeResponse(target, res); err != nil { 12077 return nil, err 12078 } 12079 return ret, nil 12080 // { 12081 // "description": "Creates a new advertiser.\nReturns the newly created advertiser if successful.\nThis method can take up to 180 seconds to complete.", 12082 // "flatPath": "v1/advertisers", 12083 // "httpMethod": "POST", 12084 // "id": "displayvideo.advertisers.create", 12085 // "parameterOrder": [], 12086 // "parameters": {}, 12087 // "path": "v1/advertisers", 12088 // "request": { 12089 // "$ref": "Advertiser" 12090 // }, 12091 // "response": { 12092 // "$ref": "Advertiser" 12093 // }, 12094 // "scopes": [ 12095 // "https://www.googleapis.com/auth/display-video" 12096 // ] 12097 // } 12098 12099} 12100 12101// method id "displayvideo.advertisers.delete": 12102 12103type AdvertisersDeleteCall struct { 12104 s *Service 12105 advertiserId int64 12106 urlParams_ gensupport.URLParams 12107 ctx_ context.Context 12108 header_ http.Header 12109} 12110 12111// Delete: Deletes an advertiser. 12112// Deleting an advertiser will delete all of its child resources, for 12113// example, 12114// campaigns, insertion orders and line items. 12115// A deleted advertiser cannot be recovered. 12116func (r *AdvertisersService) Delete(advertiserId int64) *AdvertisersDeleteCall { 12117 c := &AdvertisersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12118 c.advertiserId = advertiserId 12119 return c 12120} 12121 12122// Fields allows partial responses to be retrieved. See 12123// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12124// for more information. 12125func (c *AdvertisersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersDeleteCall { 12126 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12127 return c 12128} 12129 12130// Context sets the context to be used in this call's Do method. Any 12131// pending HTTP request will be aborted if the provided context is 12132// canceled. 12133func (c *AdvertisersDeleteCall) Context(ctx context.Context) *AdvertisersDeleteCall { 12134 c.ctx_ = ctx 12135 return c 12136} 12137 12138// Header returns an http.Header that can be modified by the caller to 12139// add HTTP headers to the request. 12140func (c *AdvertisersDeleteCall) Header() http.Header { 12141 if c.header_ == nil { 12142 c.header_ = make(http.Header) 12143 } 12144 return c.header_ 12145} 12146 12147func (c *AdvertisersDeleteCall) doRequest(alt string) (*http.Response, error) { 12148 reqHeaders := make(http.Header) 12149 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12150 for k, v := range c.header_ { 12151 reqHeaders[k] = v 12152 } 12153 reqHeaders.Set("User-Agent", c.s.userAgent()) 12154 var body io.Reader = nil 12155 c.urlParams_.Set("alt", alt) 12156 c.urlParams_.Set("prettyPrint", "false") 12157 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}") 12158 urls += "?" + c.urlParams_.Encode() 12159 req, err := http.NewRequest("DELETE", urls, body) 12160 if err != nil { 12161 return nil, err 12162 } 12163 req.Header = reqHeaders 12164 googleapi.Expand(req.URL, map[string]string{ 12165 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 12166 }) 12167 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12168} 12169 12170// Do executes the "displayvideo.advertisers.delete" call. 12171// Exactly one of *Empty or error will be non-nil. Any non-2xx status 12172// code is an error. Response headers are in either 12173// *Empty.ServerResponse.Header or (if a response was returned at all) 12174// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 12175// check whether the returned error was because http.StatusNotModified 12176// was returned. 12177func (c *AdvertisersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 12178 gensupport.SetOptions(c.urlParams_, opts...) 12179 res, err := c.doRequest("json") 12180 if res != nil && res.StatusCode == http.StatusNotModified { 12181 if res.Body != nil { 12182 res.Body.Close() 12183 } 12184 return nil, &googleapi.Error{ 12185 Code: res.StatusCode, 12186 Header: res.Header, 12187 } 12188 } 12189 if err != nil { 12190 return nil, err 12191 } 12192 defer googleapi.CloseBody(res) 12193 if err := googleapi.CheckResponse(res); err != nil { 12194 return nil, err 12195 } 12196 ret := &Empty{ 12197 ServerResponse: googleapi.ServerResponse{ 12198 Header: res.Header, 12199 HTTPStatusCode: res.StatusCode, 12200 }, 12201 } 12202 target := &ret 12203 if err := gensupport.DecodeResponse(target, res); err != nil { 12204 return nil, err 12205 } 12206 return ret, nil 12207 // { 12208 // "description": "Deletes an advertiser.\nDeleting an advertiser will delete all of its child resources, for example,\ncampaigns, insertion orders and line items.\nA deleted advertiser cannot be recovered.", 12209 // "flatPath": "v1/advertisers/{advertisersId}", 12210 // "httpMethod": "DELETE", 12211 // "id": "displayvideo.advertisers.delete", 12212 // "parameterOrder": [ 12213 // "advertiserId" 12214 // ], 12215 // "parameters": { 12216 // "advertiserId": { 12217 // "description": "The ID of the advertiser we need to delete.", 12218 // "format": "int64", 12219 // "location": "path", 12220 // "pattern": "^[^/]+$", 12221 // "required": true, 12222 // "type": "string" 12223 // } 12224 // }, 12225 // "path": "v1/advertisers/{+advertiserId}", 12226 // "response": { 12227 // "$ref": "Empty" 12228 // }, 12229 // "scopes": [ 12230 // "https://www.googleapis.com/auth/display-video" 12231 // ] 12232 // } 12233 12234} 12235 12236// method id "displayvideo.advertisers.get": 12237 12238type AdvertisersGetCall struct { 12239 s *Service 12240 advertiserId int64 12241 urlParams_ gensupport.URLParams 12242 ifNoneMatch_ string 12243 ctx_ context.Context 12244 header_ http.Header 12245} 12246 12247// Get: Gets an advertiser. 12248func (r *AdvertisersService) Get(advertiserId int64) *AdvertisersGetCall { 12249 c := &AdvertisersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12250 c.advertiserId = advertiserId 12251 return c 12252} 12253 12254// Fields allows partial responses to be retrieved. See 12255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12256// for more information. 12257func (c *AdvertisersGetCall) Fields(s ...googleapi.Field) *AdvertisersGetCall { 12258 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12259 return c 12260} 12261 12262// IfNoneMatch sets the optional parameter which makes the operation 12263// fail if the object's ETag matches the given value. This is useful for 12264// getting updates only after the object has changed since the last 12265// request. Use googleapi.IsNotModified to check whether the response 12266// error from Do is the result of In-None-Match. 12267func (c *AdvertisersGetCall) IfNoneMatch(entityTag string) *AdvertisersGetCall { 12268 c.ifNoneMatch_ = entityTag 12269 return c 12270} 12271 12272// Context sets the context to be used in this call's Do method. Any 12273// pending HTTP request will be aborted if the provided context is 12274// canceled. 12275func (c *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall { 12276 c.ctx_ = ctx 12277 return c 12278} 12279 12280// Header returns an http.Header that can be modified by the caller to 12281// add HTTP headers to the request. 12282func (c *AdvertisersGetCall) Header() http.Header { 12283 if c.header_ == nil { 12284 c.header_ = make(http.Header) 12285 } 12286 return c.header_ 12287} 12288 12289func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) { 12290 reqHeaders := make(http.Header) 12291 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12292 for k, v := range c.header_ { 12293 reqHeaders[k] = v 12294 } 12295 reqHeaders.Set("User-Agent", c.s.userAgent()) 12296 if c.ifNoneMatch_ != "" { 12297 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12298 } 12299 var body io.Reader = nil 12300 c.urlParams_.Set("alt", alt) 12301 c.urlParams_.Set("prettyPrint", "false") 12302 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}") 12303 urls += "?" + c.urlParams_.Encode() 12304 req, err := http.NewRequest("GET", urls, body) 12305 if err != nil { 12306 return nil, err 12307 } 12308 req.Header = reqHeaders 12309 googleapi.Expand(req.URL, map[string]string{ 12310 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 12311 }) 12312 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12313} 12314 12315// Do executes the "displayvideo.advertisers.get" call. 12316// Exactly one of *Advertiser or error will be non-nil. Any non-2xx 12317// status code is an error. Response headers are in either 12318// *Advertiser.ServerResponse.Header or (if a response was returned at 12319// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12320// to check whether the returned error was because 12321// http.StatusNotModified was returned. 12322func (c *AdvertisersGetCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) { 12323 gensupport.SetOptions(c.urlParams_, opts...) 12324 res, err := c.doRequest("json") 12325 if res != nil && res.StatusCode == http.StatusNotModified { 12326 if res.Body != nil { 12327 res.Body.Close() 12328 } 12329 return nil, &googleapi.Error{ 12330 Code: res.StatusCode, 12331 Header: res.Header, 12332 } 12333 } 12334 if err != nil { 12335 return nil, err 12336 } 12337 defer googleapi.CloseBody(res) 12338 if err := googleapi.CheckResponse(res); err != nil { 12339 return nil, err 12340 } 12341 ret := &Advertiser{ 12342 ServerResponse: googleapi.ServerResponse{ 12343 Header: res.Header, 12344 HTTPStatusCode: res.StatusCode, 12345 }, 12346 } 12347 target := &ret 12348 if err := gensupport.DecodeResponse(target, res); err != nil { 12349 return nil, err 12350 } 12351 return ret, nil 12352 // { 12353 // "description": "Gets an advertiser.", 12354 // "flatPath": "v1/advertisers/{advertisersId}", 12355 // "httpMethod": "GET", 12356 // "id": "displayvideo.advertisers.get", 12357 // "parameterOrder": [ 12358 // "advertiserId" 12359 // ], 12360 // "parameters": { 12361 // "advertiserId": { 12362 // "description": "Required. The ID of the advertiser to fetch.", 12363 // "format": "int64", 12364 // "location": "path", 12365 // "pattern": "^[^/]+$", 12366 // "required": true, 12367 // "type": "string" 12368 // } 12369 // }, 12370 // "path": "v1/advertisers/{+advertiserId}", 12371 // "response": { 12372 // "$ref": "Advertiser" 12373 // }, 12374 // "scopes": [ 12375 // "https://www.googleapis.com/auth/display-video" 12376 // ] 12377 // } 12378 12379} 12380 12381// method id "displayvideo.advertisers.list": 12382 12383type AdvertisersListCall struct { 12384 s *Service 12385 urlParams_ gensupport.URLParams 12386 ifNoneMatch_ string 12387 ctx_ context.Context 12388 header_ http.Header 12389} 12390 12391// List: Lists advertisers that are accessible to the current user. 12392// 12393// The order is defined by the order_by 12394// parameter. 12395// 12396// A single partner_id is required. 12397// Cross-partner listing is not supported. 12398func (r *AdvertisersService) List() *AdvertisersListCall { 12399 c := &AdvertisersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12400 return c 12401} 12402 12403// Filter sets the optional parameter "filter": Allows filtering by 12404// advertiser properties. 12405// 12406// Supported syntax: 12407// 12408// * Filter expressions are made up of one or more restrictions. 12409// * Restrictions can be combined by `AND` or `OR` logical operators. 12410// A 12411// sequence of restrictions implicitly uses `AND`. 12412// * A restriction has the form of `{field} {operator} {value}`. 12413// * The operator must be `EQUALS (=)`. 12414// * Supported fields: 12415// - `entityStatus` 12416// 12417// Examples: 12418// 12419// * All active advertisers under a 12420// partner: 12421// `entityStatus="ENTITY_STATUS_ACTIVE" 12422// 12423// The length of this field should be no more than 500 characters. 12424func (c *AdvertisersListCall) Filter(filter string) *AdvertisersListCall { 12425 c.urlParams_.Set("filter", filter) 12426 return c 12427} 12428 12429// OrderBy sets the optional parameter "orderBy": Field by which to sort 12430// the list. 12431// Acceptable values are: 12432// 12433// * `displayName` (default) 12434// * `entityStatus` 12435// 12436// The default sorting order is ascending. To specify descending order 12437// for 12438// a field, a suffix "desc" should be added to the field name. For 12439// example, 12440// `displayName desc`. 12441func (c *AdvertisersListCall) OrderBy(orderBy string) *AdvertisersListCall { 12442 c.urlParams_.Set("orderBy", orderBy) 12443 return c 12444} 12445 12446// PageSize sets the optional parameter "pageSize": Requested page size. 12447// Must be between `1` and `100`. If unspecified will 12448// default to `100`. 12449func (c *AdvertisersListCall) PageSize(pageSize int64) *AdvertisersListCall { 12450 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12451 return c 12452} 12453 12454// PageToken sets the optional parameter "pageToken": A token 12455// identifying a page of results the server should return. 12456// Typically, this is the value of 12457// next_page_token 12458// returned from the previous call to `ListAdvertisers` method. 12459// If not specified, the first page of results will be returned. 12460func (c *AdvertisersListCall) PageToken(pageToken string) *AdvertisersListCall { 12461 c.urlParams_.Set("pageToken", pageToken) 12462 return c 12463} 12464 12465// PartnerId sets the optional parameter "partnerId": Required. The ID 12466// of the partner that the fetched advertisers should all belong to. 12467// The system only supports listing advertisers for one partner at a 12468// time. 12469func (c *AdvertisersListCall) PartnerId(partnerId int64) *AdvertisersListCall { 12470 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 12471 return c 12472} 12473 12474// Fields allows partial responses to be retrieved. See 12475// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12476// for more information. 12477func (c *AdvertisersListCall) Fields(s ...googleapi.Field) *AdvertisersListCall { 12478 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12479 return c 12480} 12481 12482// IfNoneMatch sets the optional parameter which makes the operation 12483// fail if the object's ETag matches the given value. This is useful for 12484// getting updates only after the object has changed since the last 12485// request. Use googleapi.IsNotModified to check whether the response 12486// error from Do is the result of In-None-Match. 12487func (c *AdvertisersListCall) IfNoneMatch(entityTag string) *AdvertisersListCall { 12488 c.ifNoneMatch_ = entityTag 12489 return c 12490} 12491 12492// Context sets the context to be used in this call's Do method. Any 12493// pending HTTP request will be aborted if the provided context is 12494// canceled. 12495func (c *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall { 12496 c.ctx_ = ctx 12497 return c 12498} 12499 12500// Header returns an http.Header that can be modified by the caller to 12501// add HTTP headers to the request. 12502func (c *AdvertisersListCall) Header() http.Header { 12503 if c.header_ == nil { 12504 c.header_ = make(http.Header) 12505 } 12506 return c.header_ 12507} 12508 12509func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) { 12510 reqHeaders := make(http.Header) 12511 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12512 for k, v := range c.header_ { 12513 reqHeaders[k] = v 12514 } 12515 reqHeaders.Set("User-Agent", c.s.userAgent()) 12516 if c.ifNoneMatch_ != "" { 12517 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12518 } 12519 var body io.Reader = nil 12520 c.urlParams_.Set("alt", alt) 12521 c.urlParams_.Set("prettyPrint", "false") 12522 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers") 12523 urls += "?" + c.urlParams_.Encode() 12524 req, err := http.NewRequest("GET", urls, body) 12525 if err != nil { 12526 return nil, err 12527 } 12528 req.Header = reqHeaders 12529 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12530} 12531 12532// Do executes the "displayvideo.advertisers.list" call. 12533// Exactly one of *ListAdvertisersResponse or error will be non-nil. Any 12534// non-2xx status code is an error. Response headers are in either 12535// *ListAdvertisersResponse.ServerResponse.Header or (if a response was 12536// returned at all) in error.(*googleapi.Error).Header. Use 12537// googleapi.IsNotModified to check whether the returned error was 12538// because http.StatusNotModified was returned. 12539func (c *AdvertisersListCall) Do(opts ...googleapi.CallOption) (*ListAdvertisersResponse, error) { 12540 gensupport.SetOptions(c.urlParams_, opts...) 12541 res, err := c.doRequest("json") 12542 if res != nil && res.StatusCode == http.StatusNotModified { 12543 if res.Body != nil { 12544 res.Body.Close() 12545 } 12546 return nil, &googleapi.Error{ 12547 Code: res.StatusCode, 12548 Header: res.Header, 12549 } 12550 } 12551 if err != nil { 12552 return nil, err 12553 } 12554 defer googleapi.CloseBody(res) 12555 if err := googleapi.CheckResponse(res); err != nil { 12556 return nil, err 12557 } 12558 ret := &ListAdvertisersResponse{ 12559 ServerResponse: googleapi.ServerResponse{ 12560 Header: res.Header, 12561 HTTPStatusCode: res.StatusCode, 12562 }, 12563 } 12564 target := &ret 12565 if err := gensupport.DecodeResponse(target, res); err != nil { 12566 return nil, err 12567 } 12568 return ret, nil 12569 // { 12570 // "description": "Lists advertisers that are accessible to the current user.\n\nThe order is defined by the order_by\nparameter.\n\nA single partner_id is required.\nCross-partner listing is not supported.", 12571 // "flatPath": "v1/advertisers", 12572 // "httpMethod": "GET", 12573 // "id": "displayvideo.advertisers.list", 12574 // "parameterOrder": [], 12575 // "parameters": { 12576 // "filter": { 12577 // "description": "Allows filtering by advertiser properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `entityStatus`\n\nExamples:\n\n* All active advertisers under a partner:\n`entityStatus=\"ENTITY_STATUS_ACTIVE\"`\n\nThe length of this field should be no more than 500 characters.", 12578 // "location": "query", 12579 // "type": "string" 12580 // }, 12581 // "orderBy": { 12582 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `displayName` (default)\n* `entityStatus`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. For example,\n`displayName desc`.", 12583 // "location": "query", 12584 // "type": "string" 12585 // }, 12586 // "pageSize": { 12587 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`.", 12588 // "format": "int32", 12589 // "location": "query", 12590 // "type": "integer" 12591 // }, 12592 // "pageToken": { 12593 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListAdvertisers` method.\nIf not specified, the first page of results will be returned.", 12594 // "location": "query", 12595 // "type": "string" 12596 // }, 12597 // "partnerId": { 12598 // "description": "Required. The ID of the partner that the fetched advertisers should all belong to.\nThe system only supports listing advertisers for one partner at a time.", 12599 // "format": "int64", 12600 // "location": "query", 12601 // "type": "string" 12602 // } 12603 // }, 12604 // "path": "v1/advertisers", 12605 // "response": { 12606 // "$ref": "ListAdvertisersResponse" 12607 // }, 12608 // "scopes": [ 12609 // "https://www.googleapis.com/auth/display-video" 12610 // ] 12611 // } 12612 12613} 12614 12615// Pages invokes f for each page of results. 12616// A non-nil error returned from f will halt the iteration. 12617// The provided context supersedes any context provided to the Context method. 12618func (c *AdvertisersListCall) Pages(ctx context.Context, f func(*ListAdvertisersResponse) error) error { 12619 c.ctx_ = ctx 12620 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 12621 for { 12622 x, err := c.Do() 12623 if err != nil { 12624 return err 12625 } 12626 if err := f(x); err != nil { 12627 return err 12628 } 12629 if x.NextPageToken == "" { 12630 return nil 12631 } 12632 c.PageToken(x.NextPageToken) 12633 } 12634} 12635 12636// method id "displayvideo.advertisers.patch": 12637 12638type AdvertisersPatchCall struct { 12639 s *Service 12640 advertiserId int64 12641 advertiser *Advertiser 12642 urlParams_ gensupport.URLParams 12643 ctx_ context.Context 12644 header_ http.Header 12645} 12646 12647// Patch: Updates an existing advertiser. 12648// Returns the updated advertiser if successful. 12649func (r *AdvertisersService) Patch(advertiserId int64, advertiser *Advertiser) *AdvertisersPatchCall { 12650 c := &AdvertisersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12651 c.advertiserId = advertiserId 12652 c.advertiser = advertiser 12653 return c 12654} 12655 12656// UpdateMask sets the optional parameter "updateMask": Required. The 12657// mask to control which fields to update. 12658func (c *AdvertisersPatchCall) UpdateMask(updateMask string) *AdvertisersPatchCall { 12659 c.urlParams_.Set("updateMask", updateMask) 12660 return c 12661} 12662 12663// Fields allows partial responses to be retrieved. See 12664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12665// for more information. 12666func (c *AdvertisersPatchCall) Fields(s ...googleapi.Field) *AdvertisersPatchCall { 12667 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12668 return c 12669} 12670 12671// Context sets the context to be used in this call's Do method. Any 12672// pending HTTP request will be aborted if the provided context is 12673// canceled. 12674func (c *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall { 12675 c.ctx_ = ctx 12676 return c 12677} 12678 12679// Header returns an http.Header that can be modified by the caller to 12680// add HTTP headers to the request. 12681func (c *AdvertisersPatchCall) Header() http.Header { 12682 if c.header_ == nil { 12683 c.header_ = make(http.Header) 12684 } 12685 return c.header_ 12686} 12687 12688func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) { 12689 reqHeaders := make(http.Header) 12690 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12691 for k, v := range c.header_ { 12692 reqHeaders[k] = v 12693 } 12694 reqHeaders.Set("User-Agent", c.s.userAgent()) 12695 var body io.Reader = nil 12696 body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser) 12697 if err != nil { 12698 return nil, err 12699 } 12700 reqHeaders.Set("Content-Type", "application/json") 12701 c.urlParams_.Set("alt", alt) 12702 c.urlParams_.Set("prettyPrint", "false") 12703 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}") 12704 urls += "?" + c.urlParams_.Encode() 12705 req, err := http.NewRequest("PATCH", urls, body) 12706 if err != nil { 12707 return nil, err 12708 } 12709 req.Header = reqHeaders 12710 googleapi.Expand(req.URL, map[string]string{ 12711 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 12712 }) 12713 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12714} 12715 12716// Do executes the "displayvideo.advertisers.patch" call. 12717// Exactly one of *Advertiser or error will be non-nil. Any non-2xx 12718// status code is an error. Response headers are in either 12719// *Advertiser.ServerResponse.Header or (if a response was returned at 12720// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12721// to check whether the returned error was because 12722// http.StatusNotModified was returned. 12723func (c *AdvertisersPatchCall) Do(opts ...googleapi.CallOption) (*Advertiser, error) { 12724 gensupport.SetOptions(c.urlParams_, opts...) 12725 res, err := c.doRequest("json") 12726 if res != nil && res.StatusCode == http.StatusNotModified { 12727 if res.Body != nil { 12728 res.Body.Close() 12729 } 12730 return nil, &googleapi.Error{ 12731 Code: res.StatusCode, 12732 Header: res.Header, 12733 } 12734 } 12735 if err != nil { 12736 return nil, err 12737 } 12738 defer googleapi.CloseBody(res) 12739 if err := googleapi.CheckResponse(res); err != nil { 12740 return nil, err 12741 } 12742 ret := &Advertiser{ 12743 ServerResponse: googleapi.ServerResponse{ 12744 Header: res.Header, 12745 HTTPStatusCode: res.StatusCode, 12746 }, 12747 } 12748 target := &ret 12749 if err := gensupport.DecodeResponse(target, res); err != nil { 12750 return nil, err 12751 } 12752 return ret, nil 12753 // { 12754 // "description": "Updates an existing advertiser.\nReturns the updated advertiser if successful.", 12755 // "flatPath": "v1/advertisers/{advertisersId}", 12756 // "httpMethod": "PATCH", 12757 // "id": "displayvideo.advertisers.patch", 12758 // "parameterOrder": [ 12759 // "advertiserId" 12760 // ], 12761 // "parameters": { 12762 // "advertiserId": { 12763 // "description": "Output only. The unique ID of the advertiser. Assigned by the system.", 12764 // "format": "int64", 12765 // "location": "path", 12766 // "pattern": "^[^/]+$", 12767 // "required": true, 12768 // "type": "string" 12769 // }, 12770 // "updateMask": { 12771 // "description": "Required. The mask to control which fields to update.", 12772 // "format": "google-fieldmask", 12773 // "location": "query", 12774 // "type": "string" 12775 // } 12776 // }, 12777 // "path": "v1/advertisers/{+advertiserId}", 12778 // "request": { 12779 // "$ref": "Advertiser" 12780 // }, 12781 // "response": { 12782 // "$ref": "Advertiser" 12783 // }, 12784 // "scopes": [ 12785 // "https://www.googleapis.com/auth/display-video" 12786 // ] 12787 // } 12788 12789} 12790 12791// method id "displayvideo.advertisers.assets.upload": 12792 12793type AdvertisersAssetsUploadCall struct { 12794 s *Service 12795 advertiserId int64 12796 createassetrequest *CreateAssetRequest 12797 urlParams_ gensupport.URLParams 12798 mediaInfo_ *gensupport.MediaInfo 12799 ctx_ context.Context 12800 header_ http.Header 12801} 12802 12803// Upload: Uploads an asset. 12804// Returns the ID of the newly uploaded asset if successful. 12805// The asset file size should be no more than 10 MB for images, 200 MB 12806// for 12807// ZIP files, and 1 GB for videos. 12808func (r *AdvertisersAssetsService) Upload(advertiserId int64, createassetrequest *CreateAssetRequest) *AdvertisersAssetsUploadCall { 12809 c := &AdvertisersAssetsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12810 c.advertiserId = advertiserId 12811 c.createassetrequest = createassetrequest 12812 return c 12813} 12814 12815// Media specifies the media to upload in one or more chunks. The chunk 12816// size may be controlled by supplying a MediaOption generated by 12817// googleapi.ChunkSize. The chunk size defaults to 12818// googleapi.DefaultUploadChunkSize.The Content-Type header used in the 12819// upload request will be determined by sniffing the contents of r, 12820// unless a MediaOption generated by googleapi.ContentType is 12821// supplied. 12822// At most one of Media and ResumableMedia may be set. 12823func (c *AdvertisersAssetsUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *AdvertisersAssetsUploadCall { 12824 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) 12825 return c 12826} 12827 12828// ResumableMedia specifies the media to upload in chunks and can be 12829// canceled with ctx. 12830// 12831// Deprecated: use Media instead. 12832// 12833// At most one of Media and ResumableMedia may be set. mediaType 12834// identifies the MIME media type of the upload, such as "image/png". If 12835// mediaType is "", it will be auto-detected. The provided ctx will 12836// supersede any context previously provided to the Context method. 12837func (c *AdvertisersAssetsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *AdvertisersAssetsUploadCall { 12838 c.ctx_ = ctx 12839 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) 12840 return c 12841} 12842 12843// ProgressUpdater provides a callback function that will be called 12844// after every chunk. It should be a low-latency function in order to 12845// not slow down the upload operation. This should only be called when 12846// using ResumableMedia (as opposed to Media). 12847func (c *AdvertisersAssetsUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *AdvertisersAssetsUploadCall { 12848 c.mediaInfo_.SetProgressUpdater(pu) 12849 return c 12850} 12851 12852// Fields allows partial responses to be retrieved. See 12853// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12854// for more information. 12855func (c *AdvertisersAssetsUploadCall) Fields(s ...googleapi.Field) *AdvertisersAssetsUploadCall { 12856 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12857 return c 12858} 12859 12860// Context sets the context to be used in this call's Do method. Any 12861// pending HTTP request will be aborted if the provided context is 12862// canceled. 12863// This context will supersede any context previously provided to the 12864// ResumableMedia method. 12865func (c *AdvertisersAssetsUploadCall) Context(ctx context.Context) *AdvertisersAssetsUploadCall { 12866 c.ctx_ = ctx 12867 return c 12868} 12869 12870// Header returns an http.Header that can be modified by the caller to 12871// add HTTP headers to the request. 12872func (c *AdvertisersAssetsUploadCall) Header() http.Header { 12873 if c.header_ == nil { 12874 c.header_ = make(http.Header) 12875 } 12876 return c.header_ 12877} 12878 12879func (c *AdvertisersAssetsUploadCall) doRequest(alt string) (*http.Response, error) { 12880 reqHeaders := make(http.Header) 12881 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 12882 for k, v := range c.header_ { 12883 reqHeaders[k] = v 12884 } 12885 reqHeaders.Set("User-Agent", c.s.userAgent()) 12886 var body io.Reader = nil 12887 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createassetrequest) 12888 if err != nil { 12889 return nil, err 12890 } 12891 reqHeaders.Set("Content-Type", "application/json") 12892 c.urlParams_.Set("alt", alt) 12893 c.urlParams_.Set("prettyPrint", "false") 12894 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/assets") 12895 if c.mediaInfo_ != nil { 12896 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/advertisers/{+advertiserId}/assets") 12897 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) 12898 } 12899 if body == nil { 12900 body = new(bytes.Buffer) 12901 reqHeaders.Set("Content-Type", "application/json") 12902 } 12903 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) 12904 defer cleanup() 12905 urls += "?" + c.urlParams_.Encode() 12906 req, err := http.NewRequest("POST", urls, body) 12907 if err != nil { 12908 return nil, err 12909 } 12910 req.Header = reqHeaders 12911 req.GetBody = getBody 12912 googleapi.Expand(req.URL, map[string]string{ 12913 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 12914 }) 12915 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12916} 12917 12918// Do executes the "displayvideo.advertisers.assets.upload" call. 12919// Exactly one of *CreateAssetResponse or error will be non-nil. Any 12920// non-2xx status code is an error. Response headers are in either 12921// *CreateAssetResponse.ServerResponse.Header or (if a response was 12922// returned at all) in error.(*googleapi.Error).Header. Use 12923// googleapi.IsNotModified to check whether the returned error was 12924// because http.StatusNotModified was returned. 12925func (c *AdvertisersAssetsUploadCall) Do(opts ...googleapi.CallOption) (*CreateAssetResponse, error) { 12926 gensupport.SetOptions(c.urlParams_, opts...) 12927 res, err := c.doRequest("json") 12928 if res != nil && res.StatusCode == http.StatusNotModified { 12929 if res.Body != nil { 12930 res.Body.Close() 12931 } 12932 return nil, &googleapi.Error{ 12933 Code: res.StatusCode, 12934 Header: res.Header, 12935 } 12936 } 12937 if err != nil { 12938 return nil, err 12939 } 12940 defer googleapi.CloseBody(res) 12941 if err := googleapi.CheckResponse(res); err != nil { 12942 return nil, err 12943 } 12944 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) 12945 if rx != nil { 12946 rx.Client = c.s.client 12947 rx.UserAgent = c.s.userAgent() 12948 ctx := c.ctx_ 12949 if ctx == nil { 12950 ctx = context.TODO() 12951 } 12952 res, err = rx.Upload(ctx) 12953 if err != nil { 12954 return nil, err 12955 } 12956 defer res.Body.Close() 12957 if err := googleapi.CheckResponse(res); err != nil { 12958 return nil, err 12959 } 12960 } 12961 ret := &CreateAssetResponse{ 12962 ServerResponse: googleapi.ServerResponse{ 12963 Header: res.Header, 12964 HTTPStatusCode: res.StatusCode, 12965 }, 12966 } 12967 target := &ret 12968 if err := gensupport.DecodeResponse(target, res); err != nil { 12969 return nil, err 12970 } 12971 return ret, nil 12972 // { 12973 // "description": "Uploads an asset.\nReturns the ID of the newly uploaded asset if successful.\nThe asset file size should be no more than 10 MB for images, 200 MB for\nZIP files, and 1 GB for videos.", 12974 // "flatPath": "v1/advertisers/{advertisersId}/assets", 12975 // "httpMethod": "POST", 12976 // "id": "displayvideo.advertisers.assets.upload", 12977 // "mediaUpload": { 12978 // "accept": [ 12979 // "*/*" 12980 // ], 12981 // "protocols": { 12982 // "simple": { 12983 // "multipart": true, 12984 // "path": "/upload/v1/advertisers/{+advertiserId}/assets" 12985 // } 12986 // } 12987 // }, 12988 // "parameterOrder": [ 12989 // "advertiserId" 12990 // ], 12991 // "parameters": { 12992 // "advertiserId": { 12993 // "description": "Required. The ID of the advertiser this asset belongs to.", 12994 // "format": "int64", 12995 // "location": "path", 12996 // "pattern": "^[^/]+$", 12997 // "required": true, 12998 // "type": "string" 12999 // } 13000 // }, 13001 // "path": "v1/advertisers/{+advertiserId}/assets", 13002 // "request": { 13003 // "$ref": "CreateAssetRequest" 13004 // }, 13005 // "response": { 13006 // "$ref": "CreateAssetResponse" 13007 // }, 13008 // "scopes": [ 13009 // "https://www.googleapis.com/auth/display-video" 13010 // ], 13011 // "supportsMediaUpload": true 13012 // } 13013 13014} 13015 13016// method id "displayvideo.advertisers.campaigns.create": 13017 13018type AdvertisersCampaignsCreateCall struct { 13019 s *Service 13020 advertiserId int64 13021 campaign *Campaign 13022 urlParams_ gensupport.URLParams 13023 ctx_ context.Context 13024 header_ http.Header 13025} 13026 13027// Create: Creates a new campaign. 13028// Returns the newly created campaign if successful. 13029func (r *AdvertisersCampaignsService) Create(advertiserId int64, campaign *Campaign) *AdvertisersCampaignsCreateCall { 13030 c := &AdvertisersCampaignsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13031 c.advertiserId = advertiserId 13032 c.campaign = campaign 13033 return c 13034} 13035 13036// Fields allows partial responses to be retrieved. See 13037// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13038// for more information. 13039func (c *AdvertisersCampaignsCreateCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsCreateCall { 13040 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13041 return c 13042} 13043 13044// Context sets the context to be used in this call's Do method. Any 13045// pending HTTP request will be aborted if the provided context is 13046// canceled. 13047func (c *AdvertisersCampaignsCreateCall) Context(ctx context.Context) *AdvertisersCampaignsCreateCall { 13048 c.ctx_ = ctx 13049 return c 13050} 13051 13052// Header returns an http.Header that can be modified by the caller to 13053// add HTTP headers to the request. 13054func (c *AdvertisersCampaignsCreateCall) Header() http.Header { 13055 if c.header_ == nil { 13056 c.header_ = make(http.Header) 13057 } 13058 return c.header_ 13059} 13060 13061func (c *AdvertisersCampaignsCreateCall) doRequest(alt string) (*http.Response, error) { 13062 reqHeaders := make(http.Header) 13063 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13064 for k, v := range c.header_ { 13065 reqHeaders[k] = v 13066 } 13067 reqHeaders.Set("User-Agent", c.s.userAgent()) 13068 var body io.Reader = nil 13069 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign) 13070 if err != nil { 13071 return nil, err 13072 } 13073 reqHeaders.Set("Content-Type", "application/json") 13074 c.urlParams_.Set("alt", alt) 13075 c.urlParams_.Set("prettyPrint", "false") 13076 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns") 13077 urls += "?" + c.urlParams_.Encode() 13078 req, err := http.NewRequest("POST", urls, body) 13079 if err != nil { 13080 return nil, err 13081 } 13082 req.Header = reqHeaders 13083 googleapi.Expand(req.URL, map[string]string{ 13084 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 13085 }) 13086 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13087} 13088 13089// Do executes the "displayvideo.advertisers.campaigns.create" call. 13090// Exactly one of *Campaign or error will be non-nil. Any non-2xx status 13091// code is an error. Response headers are in either 13092// *Campaign.ServerResponse.Header or (if a response was returned at 13093// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13094// to check whether the returned error was because 13095// http.StatusNotModified was returned. 13096func (c *AdvertisersCampaignsCreateCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { 13097 gensupport.SetOptions(c.urlParams_, opts...) 13098 res, err := c.doRequest("json") 13099 if res != nil && res.StatusCode == http.StatusNotModified { 13100 if res.Body != nil { 13101 res.Body.Close() 13102 } 13103 return nil, &googleapi.Error{ 13104 Code: res.StatusCode, 13105 Header: res.Header, 13106 } 13107 } 13108 if err != nil { 13109 return nil, err 13110 } 13111 defer googleapi.CloseBody(res) 13112 if err := googleapi.CheckResponse(res); err != nil { 13113 return nil, err 13114 } 13115 ret := &Campaign{ 13116 ServerResponse: googleapi.ServerResponse{ 13117 Header: res.Header, 13118 HTTPStatusCode: res.StatusCode, 13119 }, 13120 } 13121 target := &ret 13122 if err := gensupport.DecodeResponse(target, res); err != nil { 13123 return nil, err 13124 } 13125 return ret, nil 13126 // { 13127 // "description": "Creates a new campaign.\nReturns the newly created campaign if successful.", 13128 // "flatPath": "v1/advertisers/{advertisersId}/campaigns", 13129 // "httpMethod": "POST", 13130 // "id": "displayvideo.advertisers.campaigns.create", 13131 // "parameterOrder": [ 13132 // "advertiserId" 13133 // ], 13134 // "parameters": { 13135 // "advertiserId": { 13136 // "description": "Output only. The unique ID of the advertiser the campaign belongs to.", 13137 // "format": "int64", 13138 // "location": "path", 13139 // "pattern": "^[^/]+$", 13140 // "required": true, 13141 // "type": "string" 13142 // } 13143 // }, 13144 // "path": "v1/advertisers/{+advertiserId}/campaigns", 13145 // "request": { 13146 // "$ref": "Campaign" 13147 // }, 13148 // "response": { 13149 // "$ref": "Campaign" 13150 // }, 13151 // "scopes": [ 13152 // "https://www.googleapis.com/auth/display-video" 13153 // ] 13154 // } 13155 13156} 13157 13158// method id "displayvideo.advertisers.campaigns.delete": 13159 13160type AdvertisersCampaignsDeleteCall struct { 13161 s *Service 13162 advertiserId int64 13163 campaignId int64 13164 urlParams_ gensupport.URLParams 13165 ctx_ context.Context 13166 header_ http.Header 13167} 13168 13169// Delete: Permanently deletes a campaign. A deleted campaign cannot be 13170// recovered. 13171// The campaign should be archived first, i.e. set 13172// entity_status to `ENTITY_STATUS_ARCHIVED`, to be 13173// able to delete it. 13174func (r *AdvertisersCampaignsService) Delete(advertiserId int64, campaignId int64) *AdvertisersCampaignsDeleteCall { 13175 c := &AdvertisersCampaignsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13176 c.advertiserId = advertiserId 13177 c.campaignId = campaignId 13178 return c 13179} 13180 13181// Fields allows partial responses to be retrieved. See 13182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13183// for more information. 13184func (c *AdvertisersCampaignsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsDeleteCall { 13185 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13186 return c 13187} 13188 13189// Context sets the context to be used in this call's Do method. Any 13190// pending HTTP request will be aborted if the provided context is 13191// canceled. 13192func (c *AdvertisersCampaignsDeleteCall) Context(ctx context.Context) *AdvertisersCampaignsDeleteCall { 13193 c.ctx_ = ctx 13194 return c 13195} 13196 13197// Header returns an http.Header that can be modified by the caller to 13198// add HTTP headers to the request. 13199func (c *AdvertisersCampaignsDeleteCall) Header() http.Header { 13200 if c.header_ == nil { 13201 c.header_ = make(http.Header) 13202 } 13203 return c.header_ 13204} 13205 13206func (c *AdvertisersCampaignsDeleteCall) doRequest(alt string) (*http.Response, error) { 13207 reqHeaders := make(http.Header) 13208 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13209 for k, v := range c.header_ { 13210 reqHeaders[k] = v 13211 } 13212 reqHeaders.Set("User-Agent", c.s.userAgent()) 13213 var body io.Reader = nil 13214 c.urlParams_.Set("alt", alt) 13215 c.urlParams_.Set("prettyPrint", "false") 13216 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}") 13217 urls += "?" + c.urlParams_.Encode() 13218 req, err := http.NewRequest("DELETE", urls, body) 13219 if err != nil { 13220 return nil, err 13221 } 13222 req.Header = reqHeaders 13223 googleapi.Expand(req.URL, map[string]string{ 13224 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 13225 "campaignId": strconv.FormatInt(c.campaignId, 10), 13226 }) 13227 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13228} 13229 13230// Do executes the "displayvideo.advertisers.campaigns.delete" call. 13231// Exactly one of *Empty or error will be non-nil. Any non-2xx status 13232// code is an error. Response headers are in either 13233// *Empty.ServerResponse.Header or (if a response was returned at all) 13234// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13235// check whether the returned error was because http.StatusNotModified 13236// was returned. 13237func (c *AdvertisersCampaignsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 13238 gensupport.SetOptions(c.urlParams_, opts...) 13239 res, err := c.doRequest("json") 13240 if res != nil && res.StatusCode == http.StatusNotModified { 13241 if res.Body != nil { 13242 res.Body.Close() 13243 } 13244 return nil, &googleapi.Error{ 13245 Code: res.StatusCode, 13246 Header: res.Header, 13247 } 13248 } 13249 if err != nil { 13250 return nil, err 13251 } 13252 defer googleapi.CloseBody(res) 13253 if err := googleapi.CheckResponse(res); err != nil { 13254 return nil, err 13255 } 13256 ret := &Empty{ 13257 ServerResponse: googleapi.ServerResponse{ 13258 Header: res.Header, 13259 HTTPStatusCode: res.StatusCode, 13260 }, 13261 } 13262 target := &ret 13263 if err := gensupport.DecodeResponse(target, res); err != nil { 13264 return nil, err 13265 } 13266 return ret, nil 13267 // { 13268 // "description": "Permanently deletes a campaign. A deleted campaign cannot be recovered.\nThe campaign should be archived first, i.e. set\nentity_status to `ENTITY_STATUS_ARCHIVED`, to be\nable to delete it.", 13269 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}", 13270 // "httpMethod": "DELETE", 13271 // "id": "displayvideo.advertisers.campaigns.delete", 13272 // "parameterOrder": [ 13273 // "advertiserId", 13274 // "campaignId" 13275 // ], 13276 // "parameters": { 13277 // "advertiserId": { 13278 // "description": "The ID of the advertiser this campaign belongs to.", 13279 // "format": "int64", 13280 // "location": "path", 13281 // "pattern": "^[^/]+$", 13282 // "required": true, 13283 // "type": "string" 13284 // }, 13285 // "campaignId": { 13286 // "description": "The ID of the campaign we need to delete.", 13287 // "format": "int64", 13288 // "location": "path", 13289 // "pattern": "^[^/]+$", 13290 // "required": true, 13291 // "type": "string" 13292 // } 13293 // }, 13294 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", 13295 // "response": { 13296 // "$ref": "Empty" 13297 // }, 13298 // "scopes": [ 13299 // "https://www.googleapis.com/auth/display-video" 13300 // ] 13301 // } 13302 13303} 13304 13305// method id "displayvideo.advertisers.campaigns.get": 13306 13307type AdvertisersCampaignsGetCall struct { 13308 s *Service 13309 advertiserId int64 13310 campaignId int64 13311 urlParams_ gensupport.URLParams 13312 ifNoneMatch_ string 13313 ctx_ context.Context 13314 header_ http.Header 13315} 13316 13317// Get: Gets a campaign. 13318func (r *AdvertisersCampaignsService) Get(advertiserId int64, campaignId int64) *AdvertisersCampaignsGetCall { 13319 c := &AdvertisersCampaignsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13320 c.advertiserId = advertiserId 13321 c.campaignId = campaignId 13322 return c 13323} 13324 13325// Fields allows partial responses to be retrieved. See 13326// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13327// for more information. 13328func (c *AdvertisersCampaignsGetCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsGetCall { 13329 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13330 return c 13331} 13332 13333// IfNoneMatch sets the optional parameter which makes the operation 13334// fail if the object's ETag matches the given value. This is useful for 13335// getting updates only after the object has changed since the last 13336// request. Use googleapi.IsNotModified to check whether the response 13337// error from Do is the result of In-None-Match. 13338func (c *AdvertisersCampaignsGetCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsGetCall { 13339 c.ifNoneMatch_ = entityTag 13340 return c 13341} 13342 13343// Context sets the context to be used in this call's Do method. Any 13344// pending HTTP request will be aborted if the provided context is 13345// canceled. 13346func (c *AdvertisersCampaignsGetCall) Context(ctx context.Context) *AdvertisersCampaignsGetCall { 13347 c.ctx_ = ctx 13348 return c 13349} 13350 13351// Header returns an http.Header that can be modified by the caller to 13352// add HTTP headers to the request. 13353func (c *AdvertisersCampaignsGetCall) Header() http.Header { 13354 if c.header_ == nil { 13355 c.header_ = make(http.Header) 13356 } 13357 return c.header_ 13358} 13359 13360func (c *AdvertisersCampaignsGetCall) doRequest(alt string) (*http.Response, error) { 13361 reqHeaders := make(http.Header) 13362 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13363 for k, v := range c.header_ { 13364 reqHeaders[k] = v 13365 } 13366 reqHeaders.Set("User-Agent", c.s.userAgent()) 13367 if c.ifNoneMatch_ != "" { 13368 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13369 } 13370 var body io.Reader = nil 13371 c.urlParams_.Set("alt", alt) 13372 c.urlParams_.Set("prettyPrint", "false") 13373 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}") 13374 urls += "?" + c.urlParams_.Encode() 13375 req, err := http.NewRequest("GET", urls, body) 13376 if err != nil { 13377 return nil, err 13378 } 13379 req.Header = reqHeaders 13380 googleapi.Expand(req.URL, map[string]string{ 13381 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 13382 "campaignId": strconv.FormatInt(c.campaignId, 10), 13383 }) 13384 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13385} 13386 13387// Do executes the "displayvideo.advertisers.campaigns.get" call. 13388// Exactly one of *Campaign or error will be non-nil. Any non-2xx status 13389// code is an error. Response headers are in either 13390// *Campaign.ServerResponse.Header or (if a response was returned at 13391// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13392// to check whether the returned error was because 13393// http.StatusNotModified was returned. 13394func (c *AdvertisersCampaignsGetCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { 13395 gensupport.SetOptions(c.urlParams_, opts...) 13396 res, err := c.doRequest("json") 13397 if res != nil && res.StatusCode == http.StatusNotModified { 13398 if res.Body != nil { 13399 res.Body.Close() 13400 } 13401 return nil, &googleapi.Error{ 13402 Code: res.StatusCode, 13403 Header: res.Header, 13404 } 13405 } 13406 if err != nil { 13407 return nil, err 13408 } 13409 defer googleapi.CloseBody(res) 13410 if err := googleapi.CheckResponse(res); err != nil { 13411 return nil, err 13412 } 13413 ret := &Campaign{ 13414 ServerResponse: googleapi.ServerResponse{ 13415 Header: res.Header, 13416 HTTPStatusCode: res.StatusCode, 13417 }, 13418 } 13419 target := &ret 13420 if err := gensupport.DecodeResponse(target, res); err != nil { 13421 return nil, err 13422 } 13423 return ret, nil 13424 // { 13425 // "description": "Gets a campaign.", 13426 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}", 13427 // "httpMethod": "GET", 13428 // "id": "displayvideo.advertisers.campaigns.get", 13429 // "parameterOrder": [ 13430 // "advertiserId", 13431 // "campaignId" 13432 // ], 13433 // "parameters": { 13434 // "advertiserId": { 13435 // "description": "Required. The ID of the advertiser this campaign belongs to.", 13436 // "format": "int64", 13437 // "location": "path", 13438 // "pattern": "^[^/]+$", 13439 // "required": true, 13440 // "type": "string" 13441 // }, 13442 // "campaignId": { 13443 // "description": "Required. The ID of the campaign to fetch.", 13444 // "format": "int64", 13445 // "location": "path", 13446 // "pattern": "^[^/]+$", 13447 // "required": true, 13448 // "type": "string" 13449 // } 13450 // }, 13451 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", 13452 // "response": { 13453 // "$ref": "Campaign" 13454 // }, 13455 // "scopes": [ 13456 // "https://www.googleapis.com/auth/display-video" 13457 // ] 13458 // } 13459 13460} 13461 13462// method id "displayvideo.advertisers.campaigns.list": 13463 13464type AdvertisersCampaignsListCall struct { 13465 s *Service 13466 advertiserId int64 13467 urlParams_ gensupport.URLParams 13468 ifNoneMatch_ string 13469 ctx_ context.Context 13470 header_ http.Header 13471} 13472 13473// List: Lists campaigns in an advertiser. 13474// 13475// The order is defined by the order_by 13476// parameter. 13477// If a filter by 13478// entity_status is not specified, campaigns 13479// with 13480// `ENTITY_STATUS_ARCHIVED` will not be included in the results. 13481func (r *AdvertisersCampaignsService) List(advertiserId int64) *AdvertisersCampaignsListCall { 13482 c := &AdvertisersCampaignsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13483 c.advertiserId = advertiserId 13484 return c 13485} 13486 13487// Filter sets the optional parameter "filter": Allows filtering by 13488// campaign properties. 13489// 13490// Supported syntax: 13491// 13492// * Filter expressions are made up of one or more restrictions. 13493// * Restrictions can be combined by `AND` or `OR` logical operators. 13494// A 13495// sequence of restrictions implicitly uses `AND`. 13496// * A restriction has the form of `{field} {operator} {value}`. 13497// * The operator must be `EQUALS (=)`. 13498// * Supported fields: 13499// - `entityStatus` 13500// 13501// Examples: 13502// 13503// * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns 13504// under an 13505// advertiser: 13506// `(entityStatus="ENTITY_STATUS_ACTIVE" 13507// OR 13508// entityStatus="ENTITY_STATUS_PAUSED")` 13509// 13510// The length of this field should be no more than 500 characters. 13511func (c *AdvertisersCampaignsListCall) Filter(filter string) *AdvertisersCampaignsListCall { 13512 c.urlParams_.Set("filter", filter) 13513 return c 13514} 13515 13516// OrderBy sets the optional parameter "orderBy": Field by which to sort 13517// the list. 13518// Acceptable values are: 13519// 13520// * `displayName` (default) 13521// * `entityStatus` 13522// 13523// The default sorting order is ascending. To specify descending order 13524// for 13525// a field, a suffix "desc" should be added to the field name. 13526// Example: 13527// `displayName desc`. 13528func (c *AdvertisersCampaignsListCall) OrderBy(orderBy string) *AdvertisersCampaignsListCall { 13529 c.urlParams_.Set("orderBy", orderBy) 13530 return c 13531} 13532 13533// PageSize sets the optional parameter "pageSize": Requested page size. 13534// Must be between `1` and `100`. If unspecified will 13535// default to `100`. 13536func (c *AdvertisersCampaignsListCall) PageSize(pageSize int64) *AdvertisersCampaignsListCall { 13537 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13538 return c 13539} 13540 13541// PageToken sets the optional parameter "pageToken": A token 13542// identifying a page of results the server should return. 13543// Typically, this is the value of 13544// next_page_token returned from the 13545// previous call to `ListCampaigns` method. If not specified, the first 13546// page 13547// of results will be returned. 13548func (c *AdvertisersCampaignsListCall) PageToken(pageToken string) *AdvertisersCampaignsListCall { 13549 c.urlParams_.Set("pageToken", pageToken) 13550 return c 13551} 13552 13553// Fields allows partial responses to be retrieved. See 13554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13555// for more information. 13556func (c *AdvertisersCampaignsListCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsListCall { 13557 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13558 return c 13559} 13560 13561// IfNoneMatch sets the optional parameter which makes the operation 13562// fail if the object's ETag matches the given value. This is useful for 13563// getting updates only after the object has changed since the last 13564// request. Use googleapi.IsNotModified to check whether the response 13565// error from Do is the result of In-None-Match. 13566func (c *AdvertisersCampaignsListCall) IfNoneMatch(entityTag string) *AdvertisersCampaignsListCall { 13567 c.ifNoneMatch_ = entityTag 13568 return c 13569} 13570 13571// Context sets the context to be used in this call's Do method. Any 13572// pending HTTP request will be aborted if the provided context is 13573// canceled. 13574func (c *AdvertisersCampaignsListCall) Context(ctx context.Context) *AdvertisersCampaignsListCall { 13575 c.ctx_ = ctx 13576 return c 13577} 13578 13579// Header returns an http.Header that can be modified by the caller to 13580// add HTTP headers to the request. 13581func (c *AdvertisersCampaignsListCall) Header() http.Header { 13582 if c.header_ == nil { 13583 c.header_ = make(http.Header) 13584 } 13585 return c.header_ 13586} 13587 13588func (c *AdvertisersCampaignsListCall) doRequest(alt string) (*http.Response, error) { 13589 reqHeaders := make(http.Header) 13590 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13591 for k, v := range c.header_ { 13592 reqHeaders[k] = v 13593 } 13594 reqHeaders.Set("User-Agent", c.s.userAgent()) 13595 if c.ifNoneMatch_ != "" { 13596 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13597 } 13598 var body io.Reader = nil 13599 c.urlParams_.Set("alt", alt) 13600 c.urlParams_.Set("prettyPrint", "false") 13601 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns") 13602 urls += "?" + c.urlParams_.Encode() 13603 req, err := http.NewRequest("GET", urls, body) 13604 if err != nil { 13605 return nil, err 13606 } 13607 req.Header = reqHeaders 13608 googleapi.Expand(req.URL, map[string]string{ 13609 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 13610 }) 13611 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13612} 13613 13614// Do executes the "displayvideo.advertisers.campaigns.list" call. 13615// Exactly one of *ListCampaignsResponse or error will be non-nil. Any 13616// non-2xx status code is an error. Response headers are in either 13617// *ListCampaignsResponse.ServerResponse.Header or (if a response was 13618// returned at all) in error.(*googleapi.Error).Header. Use 13619// googleapi.IsNotModified to check whether the returned error was 13620// because http.StatusNotModified was returned. 13621func (c *AdvertisersCampaignsListCall) Do(opts ...googleapi.CallOption) (*ListCampaignsResponse, error) { 13622 gensupport.SetOptions(c.urlParams_, opts...) 13623 res, err := c.doRequest("json") 13624 if res != nil && res.StatusCode == http.StatusNotModified { 13625 if res.Body != nil { 13626 res.Body.Close() 13627 } 13628 return nil, &googleapi.Error{ 13629 Code: res.StatusCode, 13630 Header: res.Header, 13631 } 13632 } 13633 if err != nil { 13634 return nil, err 13635 } 13636 defer googleapi.CloseBody(res) 13637 if err := googleapi.CheckResponse(res); err != nil { 13638 return nil, err 13639 } 13640 ret := &ListCampaignsResponse{ 13641 ServerResponse: googleapi.ServerResponse{ 13642 Header: res.Header, 13643 HTTPStatusCode: res.StatusCode, 13644 }, 13645 } 13646 target := &ret 13647 if err := gensupport.DecodeResponse(target, res); err != nil { 13648 return nil, err 13649 } 13650 return ret, nil 13651 // { 13652 // "description": "Lists campaigns in an advertiser.\n\nThe order is defined by the order_by\nparameter.\nIf a filter by\nentity_status is not specified, campaigns with\n`ENTITY_STATUS_ARCHIVED` will not be included in the results.", 13653 // "flatPath": "v1/advertisers/{advertisersId}/campaigns", 13654 // "httpMethod": "GET", 13655 // "id": "displayvideo.advertisers.campaigns.list", 13656 // "parameterOrder": [ 13657 // "advertiserId" 13658 // ], 13659 // "parameters": { 13660 // "advertiserId": { 13661 // "description": "The ID of the advertiser to list campaigns for.", 13662 // "format": "int64", 13663 // "location": "path", 13664 // "pattern": "^[^/]+$", 13665 // "required": true, 13666 // "type": "string" 13667 // }, 13668 // "filter": { 13669 // "description": "Allows filtering by campaign properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `entityStatus`\n\nExamples:\n\n* All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` campaigns under an\nadvertiser:\n`(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR\nentityStatus=\"ENTITY_STATUS_PAUSED\")`\n\nThe length of this field should be no more than 500 characters.", 13670 // "location": "query", 13671 // "type": "string" 13672 // }, 13673 // "orderBy": { 13674 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `displayName` (default)\n* `entityStatus`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 13675 // "location": "query", 13676 // "type": "string" 13677 // }, 13678 // "pageSize": { 13679 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`.", 13680 // "format": "int32", 13681 // "location": "query", 13682 // "type": "integer" 13683 // }, 13684 // "pageToken": { 13685 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token returned from the\nprevious call to `ListCampaigns` method. If not specified, the first page\nof results will be returned.", 13686 // "location": "query", 13687 // "type": "string" 13688 // } 13689 // }, 13690 // "path": "v1/advertisers/{+advertiserId}/campaigns", 13691 // "response": { 13692 // "$ref": "ListCampaignsResponse" 13693 // }, 13694 // "scopes": [ 13695 // "https://www.googleapis.com/auth/display-video" 13696 // ] 13697 // } 13698 13699} 13700 13701// Pages invokes f for each page of results. 13702// A non-nil error returned from f will halt the iteration. 13703// The provided context supersedes any context provided to the Context method. 13704func (c *AdvertisersCampaignsListCall) Pages(ctx context.Context, f func(*ListCampaignsResponse) error) error { 13705 c.ctx_ = ctx 13706 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 13707 for { 13708 x, err := c.Do() 13709 if err != nil { 13710 return err 13711 } 13712 if err := f(x); err != nil { 13713 return err 13714 } 13715 if x.NextPageToken == "" { 13716 return nil 13717 } 13718 c.PageToken(x.NextPageToken) 13719 } 13720} 13721 13722// method id "displayvideo.advertisers.campaigns.patch": 13723 13724type AdvertisersCampaignsPatchCall struct { 13725 s *Service 13726 advertiserId int64 13727 campaignId int64 13728 campaign *Campaign 13729 urlParams_ gensupport.URLParams 13730 ctx_ context.Context 13731 header_ http.Header 13732} 13733 13734// Patch: Updates an existing campaign. 13735// Returns the updated campaign if successful. 13736func (r *AdvertisersCampaignsService) Patch(advertiserId int64, campaignId int64, campaign *Campaign) *AdvertisersCampaignsPatchCall { 13737 c := &AdvertisersCampaignsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13738 c.advertiserId = advertiserId 13739 c.campaignId = campaignId 13740 c.campaign = campaign 13741 return c 13742} 13743 13744// UpdateMask sets the optional parameter "updateMask": Required. The 13745// mask to control which fields to update. 13746func (c *AdvertisersCampaignsPatchCall) UpdateMask(updateMask string) *AdvertisersCampaignsPatchCall { 13747 c.urlParams_.Set("updateMask", updateMask) 13748 return c 13749} 13750 13751// Fields allows partial responses to be retrieved. See 13752// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13753// for more information. 13754func (c *AdvertisersCampaignsPatchCall) Fields(s ...googleapi.Field) *AdvertisersCampaignsPatchCall { 13755 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13756 return c 13757} 13758 13759// Context sets the context to be used in this call's Do method. Any 13760// pending HTTP request will be aborted if the provided context is 13761// canceled. 13762func (c *AdvertisersCampaignsPatchCall) Context(ctx context.Context) *AdvertisersCampaignsPatchCall { 13763 c.ctx_ = ctx 13764 return c 13765} 13766 13767// Header returns an http.Header that can be modified by the caller to 13768// add HTTP headers to the request. 13769func (c *AdvertisersCampaignsPatchCall) Header() http.Header { 13770 if c.header_ == nil { 13771 c.header_ = make(http.Header) 13772 } 13773 return c.header_ 13774} 13775 13776func (c *AdvertisersCampaignsPatchCall) doRequest(alt string) (*http.Response, error) { 13777 reqHeaders := make(http.Header) 13778 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13779 for k, v := range c.header_ { 13780 reqHeaders[k] = v 13781 } 13782 reqHeaders.Set("User-Agent", c.s.userAgent()) 13783 var body io.Reader = nil 13784 body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign) 13785 if err != nil { 13786 return nil, err 13787 } 13788 reqHeaders.Set("Content-Type", "application/json") 13789 c.urlParams_.Set("alt", alt) 13790 c.urlParams_.Set("prettyPrint", "false") 13791 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}") 13792 urls += "?" + c.urlParams_.Encode() 13793 req, err := http.NewRequest("PATCH", urls, body) 13794 if err != nil { 13795 return nil, err 13796 } 13797 req.Header = reqHeaders 13798 googleapi.Expand(req.URL, map[string]string{ 13799 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 13800 "campaignId": strconv.FormatInt(c.campaignId, 10), 13801 }) 13802 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13803} 13804 13805// Do executes the "displayvideo.advertisers.campaigns.patch" call. 13806// Exactly one of *Campaign or error will be non-nil. Any non-2xx status 13807// code is an error. Response headers are in either 13808// *Campaign.ServerResponse.Header or (if a response was returned at 13809// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 13810// to check whether the returned error was because 13811// http.StatusNotModified was returned. 13812func (c *AdvertisersCampaignsPatchCall) Do(opts ...googleapi.CallOption) (*Campaign, error) { 13813 gensupport.SetOptions(c.urlParams_, opts...) 13814 res, err := c.doRequest("json") 13815 if res != nil && res.StatusCode == http.StatusNotModified { 13816 if res.Body != nil { 13817 res.Body.Close() 13818 } 13819 return nil, &googleapi.Error{ 13820 Code: res.StatusCode, 13821 Header: res.Header, 13822 } 13823 } 13824 if err != nil { 13825 return nil, err 13826 } 13827 defer googleapi.CloseBody(res) 13828 if err := googleapi.CheckResponse(res); err != nil { 13829 return nil, err 13830 } 13831 ret := &Campaign{ 13832 ServerResponse: googleapi.ServerResponse{ 13833 Header: res.Header, 13834 HTTPStatusCode: res.StatusCode, 13835 }, 13836 } 13837 target := &ret 13838 if err := gensupport.DecodeResponse(target, res); err != nil { 13839 return nil, err 13840 } 13841 return ret, nil 13842 // { 13843 // "description": "Updates an existing campaign.\nReturns the updated campaign if successful.", 13844 // "flatPath": "v1/advertisers/{advertisersId}/campaigns/{campaignsId}", 13845 // "httpMethod": "PATCH", 13846 // "id": "displayvideo.advertisers.campaigns.patch", 13847 // "parameterOrder": [ 13848 // "advertiserId", 13849 // "campaignId" 13850 // ], 13851 // "parameters": { 13852 // "advertiserId": { 13853 // "description": "Output only. The unique ID of the advertiser the campaign belongs to.", 13854 // "format": "int64", 13855 // "location": "path", 13856 // "pattern": "^[^/]+$", 13857 // "required": true, 13858 // "type": "string" 13859 // }, 13860 // "campaignId": { 13861 // "description": "Output only. The unique ID of the campaign. Assigned by the system.", 13862 // "format": "int64", 13863 // "location": "path", 13864 // "pattern": "^[^/]+$", 13865 // "required": true, 13866 // "type": "string" 13867 // }, 13868 // "updateMask": { 13869 // "description": "Required. The mask to control which fields to update.", 13870 // "format": "google-fieldmask", 13871 // "location": "query", 13872 // "type": "string" 13873 // } 13874 // }, 13875 // "path": "v1/advertisers/{+advertiserId}/campaigns/{+campaignId}", 13876 // "request": { 13877 // "$ref": "Campaign" 13878 // }, 13879 // "response": { 13880 // "$ref": "Campaign" 13881 // }, 13882 // "scopes": [ 13883 // "https://www.googleapis.com/auth/display-video" 13884 // ] 13885 // } 13886 13887} 13888 13889// method id "displayvideo.advertisers.channels.get": 13890 13891type AdvertisersChannelsGetCall struct { 13892 s *Service 13893 advertiserId int64 13894 channelId int64 13895 urlParams_ gensupport.URLParams 13896 ifNoneMatch_ string 13897 ctx_ context.Context 13898 header_ http.Header 13899} 13900 13901// Get: Gets a channel for a partner or advertiser. 13902func (r *AdvertisersChannelsService) Get(advertiserId int64, channelId int64) *AdvertisersChannelsGetCall { 13903 c := &AdvertisersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13904 c.advertiserId = advertiserId 13905 c.channelId = channelId 13906 return c 13907} 13908 13909// PartnerId sets the optional parameter "partnerId": The ID of the 13910// partner that owns the fetched channel. 13911func (c *AdvertisersChannelsGetCall) PartnerId(partnerId int64) *AdvertisersChannelsGetCall { 13912 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 13913 return c 13914} 13915 13916// Fields allows partial responses to be retrieved. See 13917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13918// for more information. 13919func (c *AdvertisersChannelsGetCall) Fields(s ...googleapi.Field) *AdvertisersChannelsGetCall { 13920 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13921 return c 13922} 13923 13924// IfNoneMatch sets the optional parameter which makes the operation 13925// fail if the object's ETag matches the given value. This is useful for 13926// getting updates only after the object has changed since the last 13927// request. Use googleapi.IsNotModified to check whether the response 13928// error from Do is the result of In-None-Match. 13929func (c *AdvertisersChannelsGetCall) IfNoneMatch(entityTag string) *AdvertisersChannelsGetCall { 13930 c.ifNoneMatch_ = entityTag 13931 return c 13932} 13933 13934// Context sets the context to be used in this call's Do method. Any 13935// pending HTTP request will be aborted if the provided context is 13936// canceled. 13937func (c *AdvertisersChannelsGetCall) Context(ctx context.Context) *AdvertisersChannelsGetCall { 13938 c.ctx_ = ctx 13939 return c 13940} 13941 13942// Header returns an http.Header that can be modified by the caller to 13943// add HTTP headers to the request. 13944func (c *AdvertisersChannelsGetCall) Header() http.Header { 13945 if c.header_ == nil { 13946 c.header_ = make(http.Header) 13947 } 13948 return c.header_ 13949} 13950 13951func (c *AdvertisersChannelsGetCall) doRequest(alt string) (*http.Response, error) { 13952 reqHeaders := make(http.Header) 13953 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 13954 for k, v := range c.header_ { 13955 reqHeaders[k] = v 13956 } 13957 reqHeaders.Set("User-Agent", c.s.userAgent()) 13958 if c.ifNoneMatch_ != "" { 13959 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13960 } 13961 var body io.Reader = nil 13962 c.urlParams_.Set("alt", alt) 13963 c.urlParams_.Set("prettyPrint", "false") 13964 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels/{+channelId}") 13965 urls += "?" + c.urlParams_.Encode() 13966 req, err := http.NewRequest("GET", urls, body) 13967 if err != nil { 13968 return nil, err 13969 } 13970 req.Header = reqHeaders 13971 googleapi.Expand(req.URL, map[string]string{ 13972 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 13973 "channelId": strconv.FormatInt(c.channelId, 10), 13974 }) 13975 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13976} 13977 13978// Do executes the "displayvideo.advertisers.channels.get" call. 13979// Exactly one of *Channel or error will be non-nil. Any non-2xx status 13980// code is an error. Response headers are in either 13981// *Channel.ServerResponse.Header or (if a response was returned at all) 13982// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 13983// check whether the returned error was because http.StatusNotModified 13984// was returned. 13985func (c *AdvertisersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 13986 gensupport.SetOptions(c.urlParams_, opts...) 13987 res, err := c.doRequest("json") 13988 if res != nil && res.StatusCode == http.StatusNotModified { 13989 if res.Body != nil { 13990 res.Body.Close() 13991 } 13992 return nil, &googleapi.Error{ 13993 Code: res.StatusCode, 13994 Header: res.Header, 13995 } 13996 } 13997 if err != nil { 13998 return nil, err 13999 } 14000 defer googleapi.CloseBody(res) 14001 if err := googleapi.CheckResponse(res); err != nil { 14002 return nil, err 14003 } 14004 ret := &Channel{ 14005 ServerResponse: googleapi.ServerResponse{ 14006 Header: res.Header, 14007 HTTPStatusCode: res.StatusCode, 14008 }, 14009 } 14010 target := &ret 14011 if err := gensupport.DecodeResponse(target, res); err != nil { 14012 return nil, err 14013 } 14014 return ret, nil 14015 // { 14016 // "description": "Gets a channel for a partner or advertiser.", 14017 // "flatPath": "v1/advertisers/{advertisersId}/channels/{channelsId}", 14018 // "httpMethod": "GET", 14019 // "id": "displayvideo.advertisers.channels.get", 14020 // "parameterOrder": [ 14021 // "advertiserId", 14022 // "channelId" 14023 // ], 14024 // "parameters": { 14025 // "advertiserId": { 14026 // "description": "The ID of the advertiser that owns the fetched channel.", 14027 // "format": "int64", 14028 // "location": "path", 14029 // "pattern": "^[^/]+$", 14030 // "required": true, 14031 // "type": "string" 14032 // }, 14033 // "channelId": { 14034 // "description": "Required. The ID of the channel to fetch.", 14035 // "format": "int64", 14036 // "location": "path", 14037 // "pattern": "^[^/]+$", 14038 // "required": true, 14039 // "type": "string" 14040 // }, 14041 // "partnerId": { 14042 // "description": "The ID of the partner that owns the fetched channel.", 14043 // "format": "int64", 14044 // "location": "query", 14045 // "type": "string" 14046 // } 14047 // }, 14048 // "path": "v1/advertisers/{+advertiserId}/channels/{+channelId}", 14049 // "response": { 14050 // "$ref": "Channel" 14051 // }, 14052 // "scopes": [ 14053 // "https://www.googleapis.com/auth/display-video" 14054 // ] 14055 // } 14056 14057} 14058 14059// method id "displayvideo.advertisers.channels.list": 14060 14061type AdvertisersChannelsListCall struct { 14062 s *Service 14063 advertiserId int64 14064 urlParams_ gensupport.URLParams 14065 ifNoneMatch_ string 14066 ctx_ context.Context 14067 header_ http.Header 14068} 14069 14070// List: Lists channels for a partner or advertiser. 14071func (r *AdvertisersChannelsService) List(advertiserId int64) *AdvertisersChannelsListCall { 14072 c := &AdvertisersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14073 c.advertiserId = advertiserId 14074 return c 14075} 14076 14077// Filter sets the optional parameter "filter": Allows filtering by 14078// channel fields. 14079// 14080// Supported syntax: 14081// 14082// * Filter expressions for channel currently can only contain at most 14083// one 14084// * restriction. 14085// * A restriction has the form of `{field} {operator} {value}`. 14086// * The operator must be `CONTAINS (:)`. 14087// * Supported fields: 14088// - `displayName` 14089// 14090// Examples: 14091// 14092// * All channels for which the display name contains 14093// "google": 14094// `displayName : "google". 14095// 14096// The length of this field should be no more than 500 characters. 14097func (c *AdvertisersChannelsListCall) Filter(filter string) *AdvertisersChannelsListCall { 14098 c.urlParams_.Set("filter", filter) 14099 return c 14100} 14101 14102// OrderBy sets the optional parameter "orderBy": Field by which to sort 14103// the list. 14104// Acceptable values are: 14105// 14106// * `displayName` (default) 14107// * `channelId` 14108// 14109// The default sorting order is ascending. To specify descending order 14110// for a 14111// field, a suffix " desc" should be added to the field name. 14112// Example: 14113// `displayName desc`. 14114func (c *AdvertisersChannelsListCall) OrderBy(orderBy string) *AdvertisersChannelsListCall { 14115 c.urlParams_.Set("orderBy", orderBy) 14116 return c 14117} 14118 14119// PageSize sets the optional parameter "pageSize": Requested page size. 14120// Must be between `1` and `100`. If unspecified will 14121// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 14122// value 14123// is specified. 14124func (c *AdvertisersChannelsListCall) PageSize(pageSize int64) *AdvertisersChannelsListCall { 14125 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14126 return c 14127} 14128 14129// PageToken sets the optional parameter "pageToken": A token 14130// identifying a page of results the server should return. 14131// Typically, this is the value of 14132// next_page_token returned from the 14133// previous call to `ListChannels` method. If not specified, the first 14134// page 14135// of results will be returned. 14136func (c *AdvertisersChannelsListCall) PageToken(pageToken string) *AdvertisersChannelsListCall { 14137 c.urlParams_.Set("pageToken", pageToken) 14138 return c 14139} 14140 14141// PartnerId sets the optional parameter "partnerId": The ID of the 14142// partner that owns the channels. 14143func (c *AdvertisersChannelsListCall) PartnerId(partnerId int64) *AdvertisersChannelsListCall { 14144 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 14145 return c 14146} 14147 14148// Fields allows partial responses to be retrieved. See 14149// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14150// for more information. 14151func (c *AdvertisersChannelsListCall) Fields(s ...googleapi.Field) *AdvertisersChannelsListCall { 14152 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14153 return c 14154} 14155 14156// IfNoneMatch sets the optional parameter which makes the operation 14157// fail if the object's ETag matches the given value. This is useful for 14158// getting updates only after the object has changed since the last 14159// request. Use googleapi.IsNotModified to check whether the response 14160// error from Do is the result of In-None-Match. 14161func (c *AdvertisersChannelsListCall) IfNoneMatch(entityTag string) *AdvertisersChannelsListCall { 14162 c.ifNoneMatch_ = entityTag 14163 return c 14164} 14165 14166// Context sets the context to be used in this call's Do method. Any 14167// pending HTTP request will be aborted if the provided context is 14168// canceled. 14169func (c *AdvertisersChannelsListCall) Context(ctx context.Context) *AdvertisersChannelsListCall { 14170 c.ctx_ = ctx 14171 return c 14172} 14173 14174// Header returns an http.Header that can be modified by the caller to 14175// add HTTP headers to the request. 14176func (c *AdvertisersChannelsListCall) Header() http.Header { 14177 if c.header_ == nil { 14178 c.header_ = make(http.Header) 14179 } 14180 return c.header_ 14181} 14182 14183func (c *AdvertisersChannelsListCall) doRequest(alt string) (*http.Response, error) { 14184 reqHeaders := make(http.Header) 14185 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14186 for k, v := range c.header_ { 14187 reqHeaders[k] = v 14188 } 14189 reqHeaders.Set("User-Agent", c.s.userAgent()) 14190 if c.ifNoneMatch_ != "" { 14191 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14192 } 14193 var body io.Reader = nil 14194 c.urlParams_.Set("alt", alt) 14195 c.urlParams_.Set("prettyPrint", "false") 14196 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/channels") 14197 urls += "?" + c.urlParams_.Encode() 14198 req, err := http.NewRequest("GET", urls, body) 14199 if err != nil { 14200 return nil, err 14201 } 14202 req.Header = reqHeaders 14203 googleapi.Expand(req.URL, map[string]string{ 14204 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 14205 }) 14206 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14207} 14208 14209// Do executes the "displayvideo.advertisers.channels.list" call. 14210// Exactly one of *ListChannelsResponse or error will be non-nil. Any 14211// non-2xx status code is an error. Response headers are in either 14212// *ListChannelsResponse.ServerResponse.Header or (if a response was 14213// returned at all) in error.(*googleapi.Error).Header. Use 14214// googleapi.IsNotModified to check whether the returned error was 14215// because http.StatusNotModified was returned. 14216func (c *AdvertisersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { 14217 gensupport.SetOptions(c.urlParams_, opts...) 14218 res, err := c.doRequest("json") 14219 if res != nil && res.StatusCode == http.StatusNotModified { 14220 if res.Body != nil { 14221 res.Body.Close() 14222 } 14223 return nil, &googleapi.Error{ 14224 Code: res.StatusCode, 14225 Header: res.Header, 14226 } 14227 } 14228 if err != nil { 14229 return nil, err 14230 } 14231 defer googleapi.CloseBody(res) 14232 if err := googleapi.CheckResponse(res); err != nil { 14233 return nil, err 14234 } 14235 ret := &ListChannelsResponse{ 14236 ServerResponse: googleapi.ServerResponse{ 14237 Header: res.Header, 14238 HTTPStatusCode: res.StatusCode, 14239 }, 14240 } 14241 target := &ret 14242 if err := gensupport.DecodeResponse(target, res); err != nil { 14243 return nil, err 14244 } 14245 return ret, nil 14246 // { 14247 // "description": "Lists channels for a partner or advertiser.", 14248 // "flatPath": "v1/advertisers/{advertisersId}/channels", 14249 // "httpMethod": "GET", 14250 // "id": "displayvideo.advertisers.channels.list", 14251 // "parameterOrder": [ 14252 // "advertiserId" 14253 // ], 14254 // "parameters": { 14255 // "advertiserId": { 14256 // "description": "The ID of the advertiser that owns the channels.", 14257 // "format": "int64", 14258 // "location": "path", 14259 // "pattern": "^[^/]+$", 14260 // "required": true, 14261 // "type": "string" 14262 // }, 14263 // "filter": { 14264 // "description": "Allows filtering by channel fields.\n\nSupported syntax:\n\n* Filter expressions for channel currently can only contain at most one\n* restriction.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `CONTAINS (:)`.\n* Supported fields:\n - `displayName`\n\nExamples:\n\n* All channels for which the display name contains \"google\":\n`displayName : \"google\"`.\n\nThe length of this field should be no more than 500 characters.", 14265 // "location": "query", 14266 // "type": "string" 14267 // }, 14268 // "orderBy": { 14269 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `displayName` (default)\n* `channelId`\n\nThe default sorting order is ascending. To specify descending order for a\nfield, a suffix \" desc\" should be added to the field name. Example:\n`displayName desc`.", 14270 // "location": "query", 14271 // "type": "string" 14272 // }, 14273 // "pageSize": { 14274 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 14275 // "format": "int32", 14276 // "location": "query", 14277 // "type": "integer" 14278 // }, 14279 // "pageToken": { 14280 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token returned from the\nprevious call to `ListChannels` method. If not specified, the first page\nof results will be returned.", 14281 // "location": "query", 14282 // "type": "string" 14283 // }, 14284 // "partnerId": { 14285 // "description": "The ID of the partner that owns the channels.", 14286 // "format": "int64", 14287 // "location": "query", 14288 // "type": "string" 14289 // } 14290 // }, 14291 // "path": "v1/advertisers/{+advertiserId}/channels", 14292 // "response": { 14293 // "$ref": "ListChannelsResponse" 14294 // }, 14295 // "scopes": [ 14296 // "https://www.googleapis.com/auth/display-video" 14297 // ] 14298 // } 14299 14300} 14301 14302// Pages invokes f for each page of results. 14303// A non-nil error returned from f will halt the iteration. 14304// The provided context supersedes any context provided to the Context method. 14305func (c *AdvertisersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error { 14306 c.ctx_ = ctx 14307 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 14308 for { 14309 x, err := c.Do() 14310 if err != nil { 14311 return err 14312 } 14313 if err := f(x); err != nil { 14314 return err 14315 } 14316 if x.NextPageToken == "" { 14317 return nil 14318 } 14319 c.PageToken(x.NextPageToken) 14320 } 14321} 14322 14323// method id "displayvideo.advertisers.creatives.create": 14324 14325type AdvertisersCreativesCreateCall struct { 14326 s *Service 14327 advertiserId int64 14328 creative *Creative 14329 urlParams_ gensupport.URLParams 14330 ctx_ context.Context 14331 header_ http.Header 14332} 14333 14334// Create: Creates a new creative. 14335// Returns the newly created creative if successful. 14336func (r *AdvertisersCreativesService) Create(advertiserId int64, creative *Creative) *AdvertisersCreativesCreateCall { 14337 c := &AdvertisersCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14338 c.advertiserId = advertiserId 14339 c.creative = creative 14340 return c 14341} 14342 14343// Fields allows partial responses to be retrieved. See 14344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14345// for more information. 14346func (c *AdvertisersCreativesCreateCall) Fields(s ...googleapi.Field) *AdvertisersCreativesCreateCall { 14347 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14348 return c 14349} 14350 14351// Context sets the context to be used in this call's Do method. Any 14352// pending HTTP request will be aborted if the provided context is 14353// canceled. 14354func (c *AdvertisersCreativesCreateCall) Context(ctx context.Context) *AdvertisersCreativesCreateCall { 14355 c.ctx_ = ctx 14356 return c 14357} 14358 14359// Header returns an http.Header that can be modified by the caller to 14360// add HTTP headers to the request. 14361func (c *AdvertisersCreativesCreateCall) Header() http.Header { 14362 if c.header_ == nil { 14363 c.header_ = make(http.Header) 14364 } 14365 return c.header_ 14366} 14367 14368func (c *AdvertisersCreativesCreateCall) doRequest(alt string) (*http.Response, error) { 14369 reqHeaders := make(http.Header) 14370 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14371 for k, v := range c.header_ { 14372 reqHeaders[k] = v 14373 } 14374 reqHeaders.Set("User-Agent", c.s.userAgent()) 14375 var body io.Reader = nil 14376 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 14377 if err != nil { 14378 return nil, err 14379 } 14380 reqHeaders.Set("Content-Type", "application/json") 14381 c.urlParams_.Set("alt", alt) 14382 c.urlParams_.Set("prettyPrint", "false") 14383 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives") 14384 urls += "?" + c.urlParams_.Encode() 14385 req, err := http.NewRequest("POST", urls, body) 14386 if err != nil { 14387 return nil, err 14388 } 14389 req.Header = reqHeaders 14390 googleapi.Expand(req.URL, map[string]string{ 14391 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 14392 }) 14393 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14394} 14395 14396// Do executes the "displayvideo.advertisers.creatives.create" call. 14397// Exactly one of *Creative or error will be non-nil. Any non-2xx status 14398// code is an error. Response headers are in either 14399// *Creative.ServerResponse.Header or (if a response was returned at 14400// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14401// to check whether the returned error was because 14402// http.StatusNotModified was returned. 14403func (c *AdvertisersCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 14404 gensupport.SetOptions(c.urlParams_, opts...) 14405 res, err := c.doRequest("json") 14406 if res != nil && res.StatusCode == http.StatusNotModified { 14407 if res.Body != nil { 14408 res.Body.Close() 14409 } 14410 return nil, &googleapi.Error{ 14411 Code: res.StatusCode, 14412 Header: res.Header, 14413 } 14414 } 14415 if err != nil { 14416 return nil, err 14417 } 14418 defer googleapi.CloseBody(res) 14419 if err := googleapi.CheckResponse(res); err != nil { 14420 return nil, err 14421 } 14422 ret := &Creative{ 14423 ServerResponse: googleapi.ServerResponse{ 14424 Header: res.Header, 14425 HTTPStatusCode: res.StatusCode, 14426 }, 14427 } 14428 target := &ret 14429 if err := gensupport.DecodeResponse(target, res); err != nil { 14430 return nil, err 14431 } 14432 return ret, nil 14433 // { 14434 // "description": "Creates a new creative.\nReturns the newly created creative if successful.", 14435 // "flatPath": "v1/advertisers/{advertisersId}/creatives", 14436 // "httpMethod": "POST", 14437 // "id": "displayvideo.advertisers.creatives.create", 14438 // "parameterOrder": [ 14439 // "advertiserId" 14440 // ], 14441 // "parameters": { 14442 // "advertiserId": { 14443 // "description": "Output only. The unique ID of the advertiser the creative belongs to.", 14444 // "format": "int64", 14445 // "location": "path", 14446 // "pattern": "^[^/]+$", 14447 // "required": true, 14448 // "type": "string" 14449 // } 14450 // }, 14451 // "path": "v1/advertisers/{+advertiserId}/creatives", 14452 // "request": { 14453 // "$ref": "Creative" 14454 // }, 14455 // "response": { 14456 // "$ref": "Creative" 14457 // }, 14458 // "scopes": [ 14459 // "https://www.googleapis.com/auth/display-video" 14460 // ] 14461 // } 14462 14463} 14464 14465// method id "displayvideo.advertisers.creatives.delete": 14466 14467type AdvertisersCreativesDeleteCall struct { 14468 s *Service 14469 advertiserId int64 14470 creativeId int64 14471 urlParams_ gensupport.URLParams 14472 ctx_ context.Context 14473 header_ http.Header 14474} 14475 14476// Delete: Deletes a creative. 14477// Returns error code `NOT_FOUND` if the creative does not exist. 14478// The creative should be archived first, i.e. set 14479// entity_status to `ENTITY_STATUS_ARCHIVED`, before 14480// it can be deleted. 14481func (r *AdvertisersCreativesService) Delete(advertiserId int64, creativeId int64) *AdvertisersCreativesDeleteCall { 14482 c := &AdvertisersCreativesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14483 c.advertiserId = advertiserId 14484 c.creativeId = creativeId 14485 return c 14486} 14487 14488// Fields allows partial responses to be retrieved. See 14489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14490// for more information. 14491func (c *AdvertisersCreativesDeleteCall) Fields(s ...googleapi.Field) *AdvertisersCreativesDeleteCall { 14492 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14493 return c 14494} 14495 14496// Context sets the context to be used in this call's Do method. Any 14497// pending HTTP request will be aborted if the provided context is 14498// canceled. 14499func (c *AdvertisersCreativesDeleteCall) Context(ctx context.Context) *AdvertisersCreativesDeleteCall { 14500 c.ctx_ = ctx 14501 return c 14502} 14503 14504// Header returns an http.Header that can be modified by the caller to 14505// add HTTP headers to the request. 14506func (c *AdvertisersCreativesDeleteCall) Header() http.Header { 14507 if c.header_ == nil { 14508 c.header_ = make(http.Header) 14509 } 14510 return c.header_ 14511} 14512 14513func (c *AdvertisersCreativesDeleteCall) doRequest(alt string) (*http.Response, error) { 14514 reqHeaders := make(http.Header) 14515 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14516 for k, v := range c.header_ { 14517 reqHeaders[k] = v 14518 } 14519 reqHeaders.Set("User-Agent", c.s.userAgent()) 14520 var body io.Reader = nil 14521 c.urlParams_.Set("alt", alt) 14522 c.urlParams_.Set("prettyPrint", "false") 14523 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives/{+creativeId}") 14524 urls += "?" + c.urlParams_.Encode() 14525 req, err := http.NewRequest("DELETE", urls, body) 14526 if err != nil { 14527 return nil, err 14528 } 14529 req.Header = reqHeaders 14530 googleapi.Expand(req.URL, map[string]string{ 14531 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 14532 "creativeId": strconv.FormatInt(c.creativeId, 10), 14533 }) 14534 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14535} 14536 14537// Do executes the "displayvideo.advertisers.creatives.delete" call. 14538// Exactly one of *Empty or error will be non-nil. Any non-2xx status 14539// code is an error. Response headers are in either 14540// *Empty.ServerResponse.Header or (if a response was returned at all) 14541// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 14542// check whether the returned error was because http.StatusNotModified 14543// was returned. 14544func (c *AdvertisersCreativesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 14545 gensupport.SetOptions(c.urlParams_, opts...) 14546 res, err := c.doRequest("json") 14547 if res != nil && res.StatusCode == http.StatusNotModified { 14548 if res.Body != nil { 14549 res.Body.Close() 14550 } 14551 return nil, &googleapi.Error{ 14552 Code: res.StatusCode, 14553 Header: res.Header, 14554 } 14555 } 14556 if err != nil { 14557 return nil, err 14558 } 14559 defer googleapi.CloseBody(res) 14560 if err := googleapi.CheckResponse(res); err != nil { 14561 return nil, err 14562 } 14563 ret := &Empty{ 14564 ServerResponse: googleapi.ServerResponse{ 14565 Header: res.Header, 14566 HTTPStatusCode: res.StatusCode, 14567 }, 14568 } 14569 target := &ret 14570 if err := gensupport.DecodeResponse(target, res); err != nil { 14571 return nil, err 14572 } 14573 return ret, nil 14574 // { 14575 // "description": "Deletes a creative.\nReturns error code `NOT_FOUND` if the creative does not exist.\nThe creative should be archived first, i.e. set\nentity_status to `ENTITY_STATUS_ARCHIVED`, before\nit can be deleted.", 14576 // "flatPath": "v1/advertisers/{advertisersId}/creatives/{creativesId}", 14577 // "httpMethod": "DELETE", 14578 // "id": "displayvideo.advertisers.creatives.delete", 14579 // "parameterOrder": [ 14580 // "advertiserId", 14581 // "creativeId" 14582 // ], 14583 // "parameters": { 14584 // "advertiserId": { 14585 // "description": "The ID of the advertiser this creative belongs to.", 14586 // "format": "int64", 14587 // "location": "path", 14588 // "pattern": "^[^/]+$", 14589 // "required": true, 14590 // "type": "string" 14591 // }, 14592 // "creativeId": { 14593 // "description": "The ID of the creative to be deleted.", 14594 // "format": "int64", 14595 // "location": "path", 14596 // "pattern": "^[^/]+$", 14597 // "required": true, 14598 // "type": "string" 14599 // } 14600 // }, 14601 // "path": "v1/advertisers/{+advertiserId}/creatives/{+creativeId}", 14602 // "response": { 14603 // "$ref": "Empty" 14604 // }, 14605 // "scopes": [ 14606 // "https://www.googleapis.com/auth/display-video" 14607 // ] 14608 // } 14609 14610} 14611 14612// method id "displayvideo.advertisers.creatives.get": 14613 14614type AdvertisersCreativesGetCall struct { 14615 s *Service 14616 advertiserId int64 14617 creativeId int64 14618 urlParams_ gensupport.URLParams 14619 ifNoneMatch_ string 14620 ctx_ context.Context 14621 header_ http.Header 14622} 14623 14624// Get: Gets a creative. 14625func (r *AdvertisersCreativesService) Get(advertiserId int64, creativeId int64) *AdvertisersCreativesGetCall { 14626 c := &AdvertisersCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14627 c.advertiserId = advertiserId 14628 c.creativeId = creativeId 14629 return c 14630} 14631 14632// Fields allows partial responses to be retrieved. See 14633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14634// for more information. 14635func (c *AdvertisersCreativesGetCall) Fields(s ...googleapi.Field) *AdvertisersCreativesGetCall { 14636 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14637 return c 14638} 14639 14640// IfNoneMatch sets the optional parameter which makes the operation 14641// fail if the object's ETag matches the given value. This is useful for 14642// getting updates only after the object has changed since the last 14643// request. Use googleapi.IsNotModified to check whether the response 14644// error from Do is the result of In-None-Match. 14645func (c *AdvertisersCreativesGetCall) IfNoneMatch(entityTag string) *AdvertisersCreativesGetCall { 14646 c.ifNoneMatch_ = entityTag 14647 return c 14648} 14649 14650// Context sets the context to be used in this call's Do method. Any 14651// pending HTTP request will be aborted if the provided context is 14652// canceled. 14653func (c *AdvertisersCreativesGetCall) Context(ctx context.Context) *AdvertisersCreativesGetCall { 14654 c.ctx_ = ctx 14655 return c 14656} 14657 14658// Header returns an http.Header that can be modified by the caller to 14659// add HTTP headers to the request. 14660func (c *AdvertisersCreativesGetCall) Header() http.Header { 14661 if c.header_ == nil { 14662 c.header_ = make(http.Header) 14663 } 14664 return c.header_ 14665} 14666 14667func (c *AdvertisersCreativesGetCall) doRequest(alt string) (*http.Response, error) { 14668 reqHeaders := make(http.Header) 14669 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14670 for k, v := range c.header_ { 14671 reqHeaders[k] = v 14672 } 14673 reqHeaders.Set("User-Agent", c.s.userAgent()) 14674 if c.ifNoneMatch_ != "" { 14675 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14676 } 14677 var body io.Reader = nil 14678 c.urlParams_.Set("alt", alt) 14679 c.urlParams_.Set("prettyPrint", "false") 14680 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives/{+creativeId}") 14681 urls += "?" + c.urlParams_.Encode() 14682 req, err := http.NewRequest("GET", urls, body) 14683 if err != nil { 14684 return nil, err 14685 } 14686 req.Header = reqHeaders 14687 googleapi.Expand(req.URL, map[string]string{ 14688 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 14689 "creativeId": strconv.FormatInt(c.creativeId, 10), 14690 }) 14691 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14692} 14693 14694// Do executes the "displayvideo.advertisers.creatives.get" call. 14695// Exactly one of *Creative or error will be non-nil. Any non-2xx status 14696// code is an error. Response headers are in either 14697// *Creative.ServerResponse.Header or (if a response was returned at 14698// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14699// to check whether the returned error was because 14700// http.StatusNotModified was returned. 14701func (c *AdvertisersCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 14702 gensupport.SetOptions(c.urlParams_, opts...) 14703 res, err := c.doRequest("json") 14704 if res != nil && res.StatusCode == http.StatusNotModified { 14705 if res.Body != nil { 14706 res.Body.Close() 14707 } 14708 return nil, &googleapi.Error{ 14709 Code: res.StatusCode, 14710 Header: res.Header, 14711 } 14712 } 14713 if err != nil { 14714 return nil, err 14715 } 14716 defer googleapi.CloseBody(res) 14717 if err := googleapi.CheckResponse(res); err != nil { 14718 return nil, err 14719 } 14720 ret := &Creative{ 14721 ServerResponse: googleapi.ServerResponse{ 14722 Header: res.Header, 14723 HTTPStatusCode: res.StatusCode, 14724 }, 14725 } 14726 target := &ret 14727 if err := gensupport.DecodeResponse(target, res); err != nil { 14728 return nil, err 14729 } 14730 return ret, nil 14731 // { 14732 // "description": "Gets a creative.", 14733 // "flatPath": "v1/advertisers/{advertisersId}/creatives/{creativesId}", 14734 // "httpMethod": "GET", 14735 // "id": "displayvideo.advertisers.creatives.get", 14736 // "parameterOrder": [ 14737 // "advertiserId", 14738 // "creativeId" 14739 // ], 14740 // "parameters": { 14741 // "advertiserId": { 14742 // "description": "Required. The ID of the advertiser this creative belongs to.", 14743 // "format": "int64", 14744 // "location": "path", 14745 // "pattern": "^[^/]+$", 14746 // "required": true, 14747 // "type": "string" 14748 // }, 14749 // "creativeId": { 14750 // "description": "Required. The ID of the creative to fetch.", 14751 // "format": "int64", 14752 // "location": "path", 14753 // "pattern": "^[^/]+$", 14754 // "required": true, 14755 // "type": "string" 14756 // } 14757 // }, 14758 // "path": "v1/advertisers/{+advertiserId}/creatives/{+creativeId}", 14759 // "response": { 14760 // "$ref": "Creative" 14761 // }, 14762 // "scopes": [ 14763 // "https://www.googleapis.com/auth/display-video" 14764 // ] 14765 // } 14766 14767} 14768 14769// method id "displayvideo.advertisers.creatives.list": 14770 14771type AdvertisersCreativesListCall struct { 14772 s *Service 14773 advertiserId int64 14774 urlParams_ gensupport.URLParams 14775 ifNoneMatch_ string 14776 ctx_ context.Context 14777 header_ http.Header 14778} 14779 14780// List: Lists creatives in an advertiser. 14781// 14782// The order is defined by the order_by 14783// parameter. 14784// If a filter by 14785// entity_status is not specified, creatives 14786// with 14787// `ENTITY_STATUS_ARCHIVED` will not be included in the results. 14788func (r *AdvertisersCreativesService) List(advertiserId int64) *AdvertisersCreativesListCall { 14789 c := &AdvertisersCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14790 c.advertiserId = advertiserId 14791 return c 14792} 14793 14794// Filter sets the optional parameter "filter": Allows filtering by 14795// creative properties. 14796// 14797// Supported syntax: 14798// 14799// * Filter expressions are made up of one or more restrictions. 14800// * Restriction for the same field must be combined by `OR`. 14801// * Restriction for different fields must be combined by `AND`. 14802// * Between `(` and `)` there can only be restrictions combined by 14803// `OR` 14804// for the same field. 14805// * A restriction has the form of `{field} {operator} {value}`. 14806// * The operator must be `EQUALS (=)`. 14807// * Supported fields: 14808// - `entityStatus` 14809// - `creativeType`. 14810// - `dimensions` 14811// - `minDuration` 14812// - `maxDuration` 14813// - `approvalStatus` 14814// - `exchangeReviewStatus` 14815// - `dynamic` 14816// * For `entityStatus`, `minDuration`, `maxDuration`, and `dynamic` 14817// there may 14818// be at most one restriction. 14819// * For `dimensions`, the value is in the form of 14820// "{width}x{height}". 14821// * For `exchangeReviewStatus`, the value is in the form 14822// of 14823// `{exchange}-{reviewStatus}`. 14824// * For `minDuration` and `maxDuration`, the value is in the form 14825// of 14826// "{duration}s". Only seconds are supported with millisecond 14827// granularity. 14828// 14829// Examples: 14830// 14831// * All native creatives: `creativeType="CREATIVE_TYPE_NATIVE" 14832// * All active creatives with 300x400 or 50x100 14833// dimensions: 14834// `entityStatus="ENTITY_STATUS_ACTIVE" AND (dimensions="300x400" 14835// OR dimensions="50x100")` 14836// * All dynamic creatives that are approved by AdX or 14837// AppNexus, with a minimum duration of 5 seconds and 14838// 200ms. 14839// `dynamic="true" AND minDuration="5.2s" 14840// AND 14841// (exchangeReviewStatus="EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_AP 14842// PROVED" 14843// OR 14844// exchangeReviewStatus="EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED")` 14845// 14846// The 14847// length of this field should be no more than 500 characters. 14848func (c *AdvertisersCreativesListCall) Filter(filter string) *AdvertisersCreativesListCall { 14849 c.urlParams_.Set("filter", filter) 14850 return c 14851} 14852 14853// OrderBy sets the optional parameter "orderBy": Field by which to sort 14854// the list. 14855// Acceptable values are: 14856// 14857// * `creativeId` (default) 14858// * `createTime` 14859// * `mediaDuration` 14860// * `dimensions` (sorts by width first, then by height) 14861// 14862// The default sorting order is ascending. To specify descending order 14863// for 14864// a field, a suffix "desc" should be added to the field name. 14865// Example: `createTime desc`. 14866func (c *AdvertisersCreativesListCall) OrderBy(orderBy string) *AdvertisersCreativesListCall { 14867 c.urlParams_.Set("orderBy", orderBy) 14868 return c 14869} 14870 14871// PageSize sets the optional parameter "pageSize": Requested page size. 14872// Must be between `1` and `100`. If unspecified will 14873// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 14874// value 14875// is specified. 14876func (c *AdvertisersCreativesListCall) PageSize(pageSize int64) *AdvertisersCreativesListCall { 14877 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 14878 return c 14879} 14880 14881// PageToken sets the optional parameter "pageToken": A token 14882// identifying a page of results the server should return. 14883// Typically, this is the value of 14884// next_page_token 14885// returned from the previous call to `ListCreatives` method. 14886// If not specified, the first page of results will be returned. 14887func (c *AdvertisersCreativesListCall) PageToken(pageToken string) *AdvertisersCreativesListCall { 14888 c.urlParams_.Set("pageToken", pageToken) 14889 return c 14890} 14891 14892// Fields allows partial responses to be retrieved. See 14893// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14894// for more information. 14895func (c *AdvertisersCreativesListCall) Fields(s ...googleapi.Field) *AdvertisersCreativesListCall { 14896 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14897 return c 14898} 14899 14900// IfNoneMatch sets the optional parameter which makes the operation 14901// fail if the object's ETag matches the given value. This is useful for 14902// getting updates only after the object has changed since the last 14903// request. Use googleapi.IsNotModified to check whether the response 14904// error from Do is the result of In-None-Match. 14905func (c *AdvertisersCreativesListCall) IfNoneMatch(entityTag string) *AdvertisersCreativesListCall { 14906 c.ifNoneMatch_ = entityTag 14907 return c 14908} 14909 14910// Context sets the context to be used in this call's Do method. Any 14911// pending HTTP request will be aborted if the provided context is 14912// canceled. 14913func (c *AdvertisersCreativesListCall) Context(ctx context.Context) *AdvertisersCreativesListCall { 14914 c.ctx_ = ctx 14915 return c 14916} 14917 14918// Header returns an http.Header that can be modified by the caller to 14919// add HTTP headers to the request. 14920func (c *AdvertisersCreativesListCall) Header() http.Header { 14921 if c.header_ == nil { 14922 c.header_ = make(http.Header) 14923 } 14924 return c.header_ 14925} 14926 14927func (c *AdvertisersCreativesListCall) doRequest(alt string) (*http.Response, error) { 14928 reqHeaders := make(http.Header) 14929 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 14930 for k, v := range c.header_ { 14931 reqHeaders[k] = v 14932 } 14933 reqHeaders.Set("User-Agent", c.s.userAgent()) 14934 if c.ifNoneMatch_ != "" { 14935 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14936 } 14937 var body io.Reader = nil 14938 c.urlParams_.Set("alt", alt) 14939 c.urlParams_.Set("prettyPrint", "false") 14940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives") 14941 urls += "?" + c.urlParams_.Encode() 14942 req, err := http.NewRequest("GET", urls, body) 14943 if err != nil { 14944 return nil, err 14945 } 14946 req.Header = reqHeaders 14947 googleapi.Expand(req.URL, map[string]string{ 14948 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 14949 }) 14950 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14951} 14952 14953// Do executes the "displayvideo.advertisers.creatives.list" call. 14954// Exactly one of *ListCreativesResponse or error will be non-nil. Any 14955// non-2xx status code is an error. Response headers are in either 14956// *ListCreativesResponse.ServerResponse.Header or (if a response was 14957// returned at all) in error.(*googleapi.Error).Header. Use 14958// googleapi.IsNotModified to check whether the returned error was 14959// because http.StatusNotModified was returned. 14960func (c *AdvertisersCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) { 14961 gensupport.SetOptions(c.urlParams_, opts...) 14962 res, err := c.doRequest("json") 14963 if res != nil && res.StatusCode == http.StatusNotModified { 14964 if res.Body != nil { 14965 res.Body.Close() 14966 } 14967 return nil, &googleapi.Error{ 14968 Code: res.StatusCode, 14969 Header: res.Header, 14970 } 14971 } 14972 if err != nil { 14973 return nil, err 14974 } 14975 defer googleapi.CloseBody(res) 14976 if err := googleapi.CheckResponse(res); err != nil { 14977 return nil, err 14978 } 14979 ret := &ListCreativesResponse{ 14980 ServerResponse: googleapi.ServerResponse{ 14981 Header: res.Header, 14982 HTTPStatusCode: res.StatusCode, 14983 }, 14984 } 14985 target := &ret 14986 if err := gensupport.DecodeResponse(target, res); err != nil { 14987 return nil, err 14988 } 14989 return ret, nil 14990 // { 14991 // "description": "Lists creatives in an advertiser.\n\nThe order is defined by the order_by\nparameter.\nIf a filter by\nentity_status is not specified, creatives with\n`ENTITY_STATUS_ARCHIVED` will not be included in the results.", 14992 // "flatPath": "v1/advertisers/{advertisersId}/creatives", 14993 // "httpMethod": "GET", 14994 // "id": "displayvideo.advertisers.creatives.list", 14995 // "parameterOrder": [ 14996 // "advertiserId" 14997 // ], 14998 // "parameters": { 14999 // "advertiserId": { 15000 // "description": "Required. The ID of the advertiser to list creatives for.", 15001 // "format": "int64", 15002 // "location": "path", 15003 // "pattern": "^[^/]+$", 15004 // "required": true, 15005 // "type": "string" 15006 // }, 15007 // "filter": { 15008 // "description": "Allows filtering by creative properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restriction for the same field must be combined by `OR`.\n* Restriction for different fields must be combined by `AND`.\n* Between `(` and `)` there can only be restrictions combined by `OR`\nfor the same field.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `entityStatus`\n - `creativeType`.\n - `dimensions`\n - `minDuration`\n - `maxDuration`\n - `approvalStatus`\n - `exchangeReviewStatus`\n - `dynamic`\n* For `entityStatus`, `minDuration`, `maxDuration`, and `dynamic` there may\nbe at most one restriction.\n* For `dimensions`, the value is in the form of `\"{width}x{height}\"`.\n* For `exchangeReviewStatus`, the value is in the form of\n`{exchange}-{reviewStatus}`.\n* For `minDuration` and `maxDuration`, the value is in the form of\n`\"{duration}s\"`. Only seconds are supported with millisecond granularity.\n\nExamples:\n\n* All native creatives: `creativeType=\"CREATIVE_TYPE_NATIVE\"`\n* All active creatives with 300x400 or 50x100 dimensions:\n`entityStatus=\"ENTITY_STATUS_ACTIVE\" AND (dimensions=\"300x400\"\nOR dimensions=\"50x100\")`\n* All dynamic creatives that are approved by AdX or\nAppNexus, with a minimum duration of 5 seconds and 200ms.\n`dynamic=\"true\" AND minDuration=\"5.2s\" AND\n(exchangeReviewStatus=\"EXCHANGE_GOOGLE_AD_MANAGER-REVIEW_STATUS_APPROVED\"\nOR exchangeReviewStatus=\"EXCHANGE_APPNEXUS-REVIEW_STATUS_APPROVED\")`\n\nThe length of this field should be no more than 500 characters.", 15009 // "location": "query", 15010 // "type": "string" 15011 // }, 15012 // "orderBy": { 15013 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `creativeId` (default)\n* `createTime`\n* `mediaDuration`\n* `dimensions` (sorts by width first, then by height)\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name.\nExample: `createTime desc`.", 15014 // "location": "query", 15015 // "type": "string" 15016 // }, 15017 // "pageSize": { 15018 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 15019 // "format": "int32", 15020 // "location": "query", 15021 // "type": "integer" 15022 // }, 15023 // "pageToken": { 15024 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListCreatives` method.\nIf not specified, the first page of results will be returned.", 15025 // "location": "query", 15026 // "type": "string" 15027 // } 15028 // }, 15029 // "path": "v1/advertisers/{+advertiserId}/creatives", 15030 // "response": { 15031 // "$ref": "ListCreativesResponse" 15032 // }, 15033 // "scopes": [ 15034 // "https://www.googleapis.com/auth/display-video" 15035 // ] 15036 // } 15037 15038} 15039 15040// Pages invokes f for each page of results. 15041// A non-nil error returned from f will halt the iteration. 15042// The provided context supersedes any context provided to the Context method. 15043func (c *AdvertisersCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error { 15044 c.ctx_ = ctx 15045 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15046 for { 15047 x, err := c.Do() 15048 if err != nil { 15049 return err 15050 } 15051 if err := f(x); err != nil { 15052 return err 15053 } 15054 if x.NextPageToken == "" { 15055 return nil 15056 } 15057 c.PageToken(x.NextPageToken) 15058 } 15059} 15060 15061// method id "displayvideo.advertisers.creatives.patch": 15062 15063type AdvertisersCreativesPatchCall struct { 15064 s *Service 15065 advertiserId int64 15066 creativeId int64 15067 creative *Creative 15068 urlParams_ gensupport.URLParams 15069 ctx_ context.Context 15070 header_ http.Header 15071} 15072 15073// Patch: Updates an existing creative. 15074// Returns the updated creative if successful. 15075func (r *AdvertisersCreativesService) Patch(advertiserId int64, creativeId int64, creative *Creative) *AdvertisersCreativesPatchCall { 15076 c := &AdvertisersCreativesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15077 c.advertiserId = advertiserId 15078 c.creativeId = creativeId 15079 c.creative = creative 15080 return c 15081} 15082 15083// UpdateMask sets the optional parameter "updateMask": Required. The 15084// mask to control which fields to update. 15085func (c *AdvertisersCreativesPatchCall) UpdateMask(updateMask string) *AdvertisersCreativesPatchCall { 15086 c.urlParams_.Set("updateMask", updateMask) 15087 return c 15088} 15089 15090// Fields allows partial responses to be retrieved. See 15091// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15092// for more information. 15093func (c *AdvertisersCreativesPatchCall) Fields(s ...googleapi.Field) *AdvertisersCreativesPatchCall { 15094 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15095 return c 15096} 15097 15098// Context sets the context to be used in this call's Do method. Any 15099// pending HTTP request will be aborted if the provided context is 15100// canceled. 15101func (c *AdvertisersCreativesPatchCall) Context(ctx context.Context) *AdvertisersCreativesPatchCall { 15102 c.ctx_ = ctx 15103 return c 15104} 15105 15106// Header returns an http.Header that can be modified by the caller to 15107// add HTTP headers to the request. 15108func (c *AdvertisersCreativesPatchCall) Header() http.Header { 15109 if c.header_ == nil { 15110 c.header_ = make(http.Header) 15111 } 15112 return c.header_ 15113} 15114 15115func (c *AdvertisersCreativesPatchCall) doRequest(alt string) (*http.Response, error) { 15116 reqHeaders := make(http.Header) 15117 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15118 for k, v := range c.header_ { 15119 reqHeaders[k] = v 15120 } 15121 reqHeaders.Set("User-Agent", c.s.userAgent()) 15122 var body io.Reader = nil 15123 body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative) 15124 if err != nil { 15125 return nil, err 15126 } 15127 reqHeaders.Set("Content-Type", "application/json") 15128 c.urlParams_.Set("alt", alt) 15129 c.urlParams_.Set("prettyPrint", "false") 15130 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/creatives/{+creativeId}") 15131 urls += "?" + c.urlParams_.Encode() 15132 req, err := http.NewRequest("PATCH", urls, body) 15133 if err != nil { 15134 return nil, err 15135 } 15136 req.Header = reqHeaders 15137 googleapi.Expand(req.URL, map[string]string{ 15138 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 15139 "creativeId": strconv.FormatInt(c.creativeId, 10), 15140 }) 15141 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15142} 15143 15144// Do executes the "displayvideo.advertisers.creatives.patch" call. 15145// Exactly one of *Creative or error will be non-nil. Any non-2xx status 15146// code is an error. Response headers are in either 15147// *Creative.ServerResponse.Header or (if a response was returned at 15148// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 15149// to check whether the returned error was because 15150// http.StatusNotModified was returned. 15151func (c *AdvertisersCreativesPatchCall) Do(opts ...googleapi.CallOption) (*Creative, error) { 15152 gensupport.SetOptions(c.urlParams_, opts...) 15153 res, err := c.doRequest("json") 15154 if res != nil && res.StatusCode == http.StatusNotModified { 15155 if res.Body != nil { 15156 res.Body.Close() 15157 } 15158 return nil, &googleapi.Error{ 15159 Code: res.StatusCode, 15160 Header: res.Header, 15161 } 15162 } 15163 if err != nil { 15164 return nil, err 15165 } 15166 defer googleapi.CloseBody(res) 15167 if err := googleapi.CheckResponse(res); err != nil { 15168 return nil, err 15169 } 15170 ret := &Creative{ 15171 ServerResponse: googleapi.ServerResponse{ 15172 Header: res.Header, 15173 HTTPStatusCode: res.StatusCode, 15174 }, 15175 } 15176 target := &ret 15177 if err := gensupport.DecodeResponse(target, res); err != nil { 15178 return nil, err 15179 } 15180 return ret, nil 15181 // { 15182 // "description": "Updates an existing creative.\nReturns the updated creative if successful.", 15183 // "flatPath": "v1/advertisers/{advertisersId}/creatives/{creativesId}", 15184 // "httpMethod": "PATCH", 15185 // "id": "displayvideo.advertisers.creatives.patch", 15186 // "parameterOrder": [ 15187 // "advertiserId", 15188 // "creativeId" 15189 // ], 15190 // "parameters": { 15191 // "advertiserId": { 15192 // "description": "Output only. The unique ID of the advertiser the creative belongs to.", 15193 // "format": "int64", 15194 // "location": "path", 15195 // "pattern": "^[^/]+$", 15196 // "required": true, 15197 // "type": "string" 15198 // }, 15199 // "creativeId": { 15200 // "description": "Output only. The unique ID of the creative. Assigned by the system.", 15201 // "format": "int64", 15202 // "location": "path", 15203 // "pattern": "^[^/]+$", 15204 // "required": true, 15205 // "type": "string" 15206 // }, 15207 // "updateMask": { 15208 // "description": "Required. The mask to control which fields to update.", 15209 // "format": "google-fieldmask", 15210 // "location": "query", 15211 // "type": "string" 15212 // } 15213 // }, 15214 // "path": "v1/advertisers/{+advertiserId}/creatives/{+creativeId}", 15215 // "request": { 15216 // "$ref": "Creative" 15217 // }, 15218 // "response": { 15219 // "$ref": "Creative" 15220 // }, 15221 // "scopes": [ 15222 // "https://www.googleapis.com/auth/display-video" 15223 // ] 15224 // } 15225 15226} 15227 15228// method id "displayvideo.advertisers.insertionOrders.create": 15229 15230type AdvertisersInsertionOrdersCreateCall struct { 15231 s *Service 15232 advertiserId int64 15233 insertionorder *InsertionOrder 15234 urlParams_ gensupport.URLParams 15235 ctx_ context.Context 15236 header_ http.Header 15237} 15238 15239// Create: Creates a new insertion order. 15240// Returns the newly created insertion order if successful. 15241func (r *AdvertisersInsertionOrdersService) Create(advertiserId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersCreateCall { 15242 c := &AdvertisersInsertionOrdersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15243 c.advertiserId = advertiserId 15244 c.insertionorder = insertionorder 15245 return c 15246} 15247 15248// Fields allows partial responses to be retrieved. See 15249// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15250// for more information. 15251func (c *AdvertisersInsertionOrdersCreateCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersCreateCall { 15252 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15253 return c 15254} 15255 15256// Context sets the context to be used in this call's Do method. Any 15257// pending HTTP request will be aborted if the provided context is 15258// canceled. 15259func (c *AdvertisersInsertionOrdersCreateCall) Context(ctx context.Context) *AdvertisersInsertionOrdersCreateCall { 15260 c.ctx_ = ctx 15261 return c 15262} 15263 15264// Header returns an http.Header that can be modified by the caller to 15265// add HTTP headers to the request. 15266func (c *AdvertisersInsertionOrdersCreateCall) Header() http.Header { 15267 if c.header_ == nil { 15268 c.header_ = make(http.Header) 15269 } 15270 return c.header_ 15271} 15272 15273func (c *AdvertisersInsertionOrdersCreateCall) doRequest(alt string) (*http.Response, error) { 15274 reqHeaders := make(http.Header) 15275 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15276 for k, v := range c.header_ { 15277 reqHeaders[k] = v 15278 } 15279 reqHeaders.Set("User-Agent", c.s.userAgent()) 15280 var body io.Reader = nil 15281 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder) 15282 if err != nil { 15283 return nil, err 15284 } 15285 reqHeaders.Set("Content-Type", "application/json") 15286 c.urlParams_.Set("alt", alt) 15287 c.urlParams_.Set("prettyPrint", "false") 15288 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders") 15289 urls += "?" + c.urlParams_.Encode() 15290 req, err := http.NewRequest("POST", urls, body) 15291 if err != nil { 15292 return nil, err 15293 } 15294 req.Header = reqHeaders 15295 googleapi.Expand(req.URL, map[string]string{ 15296 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 15297 }) 15298 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15299} 15300 15301// Do executes the "displayvideo.advertisers.insertionOrders.create" call. 15302// Exactly one of *InsertionOrder or error will be non-nil. Any non-2xx 15303// status code is an error. Response headers are in either 15304// *InsertionOrder.ServerResponse.Header or (if a response was returned 15305// at all) in error.(*googleapi.Error).Header. Use 15306// googleapi.IsNotModified to check whether the returned error was 15307// because http.StatusNotModified was returned. 15308func (c *AdvertisersInsertionOrdersCreateCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { 15309 gensupport.SetOptions(c.urlParams_, opts...) 15310 res, err := c.doRequest("json") 15311 if res != nil && res.StatusCode == http.StatusNotModified { 15312 if res.Body != nil { 15313 res.Body.Close() 15314 } 15315 return nil, &googleapi.Error{ 15316 Code: res.StatusCode, 15317 Header: res.Header, 15318 } 15319 } 15320 if err != nil { 15321 return nil, err 15322 } 15323 defer googleapi.CloseBody(res) 15324 if err := googleapi.CheckResponse(res); err != nil { 15325 return nil, err 15326 } 15327 ret := &InsertionOrder{ 15328 ServerResponse: googleapi.ServerResponse{ 15329 Header: res.Header, 15330 HTTPStatusCode: res.StatusCode, 15331 }, 15332 } 15333 target := &ret 15334 if err := gensupport.DecodeResponse(target, res); err != nil { 15335 return nil, err 15336 } 15337 return ret, nil 15338 // { 15339 // "description": "Creates a new insertion order.\nReturns the newly created insertion order if successful.", 15340 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders", 15341 // "httpMethod": "POST", 15342 // "id": "displayvideo.advertisers.insertionOrders.create", 15343 // "parameterOrder": [ 15344 // "advertiserId" 15345 // ], 15346 // "parameters": { 15347 // "advertiserId": { 15348 // "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", 15349 // "format": "int64", 15350 // "location": "path", 15351 // "pattern": "^[^/]+$", 15352 // "required": true, 15353 // "type": "string" 15354 // } 15355 // }, 15356 // "path": "v1/advertisers/{+advertiserId}/insertionOrders", 15357 // "request": { 15358 // "$ref": "InsertionOrder" 15359 // }, 15360 // "response": { 15361 // "$ref": "InsertionOrder" 15362 // }, 15363 // "scopes": [ 15364 // "https://www.googleapis.com/auth/display-video" 15365 // ] 15366 // } 15367 15368} 15369 15370// method id "displayvideo.advertisers.insertionOrders.delete": 15371 15372type AdvertisersInsertionOrdersDeleteCall struct { 15373 s *Service 15374 advertiserId int64 15375 insertionOrderId int64 15376 urlParams_ gensupport.URLParams 15377 ctx_ context.Context 15378 header_ http.Header 15379} 15380 15381// Delete: Deletes an insertion order. 15382// Returns error code `NOT_FOUND` if the insertion order does not 15383// exist. 15384// The insertion order should be archived first, i.e. set 15385// entity_status to `ENTITY_STATUS_ARCHIVED`, 15386// to be able to delete it. 15387func (r *AdvertisersInsertionOrdersService) Delete(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersDeleteCall { 15388 c := &AdvertisersInsertionOrdersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15389 c.advertiserId = advertiserId 15390 c.insertionOrderId = insertionOrderId 15391 return c 15392} 15393 15394// Fields allows partial responses to be retrieved. See 15395// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15396// for more information. 15397func (c *AdvertisersInsertionOrdersDeleteCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersDeleteCall { 15398 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15399 return c 15400} 15401 15402// Context sets the context to be used in this call's Do method. Any 15403// pending HTTP request will be aborted if the provided context is 15404// canceled. 15405func (c *AdvertisersInsertionOrdersDeleteCall) Context(ctx context.Context) *AdvertisersInsertionOrdersDeleteCall { 15406 c.ctx_ = ctx 15407 return c 15408} 15409 15410// Header returns an http.Header that can be modified by the caller to 15411// add HTTP headers to the request. 15412func (c *AdvertisersInsertionOrdersDeleteCall) Header() http.Header { 15413 if c.header_ == nil { 15414 c.header_ = make(http.Header) 15415 } 15416 return c.header_ 15417} 15418 15419func (c *AdvertisersInsertionOrdersDeleteCall) doRequest(alt string) (*http.Response, error) { 15420 reqHeaders := make(http.Header) 15421 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15422 for k, v := range c.header_ { 15423 reqHeaders[k] = v 15424 } 15425 reqHeaders.Set("User-Agent", c.s.userAgent()) 15426 var body io.Reader = nil 15427 c.urlParams_.Set("alt", alt) 15428 c.urlParams_.Set("prettyPrint", "false") 15429 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") 15430 urls += "?" + c.urlParams_.Encode() 15431 req, err := http.NewRequest("DELETE", urls, body) 15432 if err != nil { 15433 return nil, err 15434 } 15435 req.Header = reqHeaders 15436 googleapi.Expand(req.URL, map[string]string{ 15437 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 15438 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 15439 }) 15440 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15441} 15442 15443// Do executes the "displayvideo.advertisers.insertionOrders.delete" call. 15444// Exactly one of *Empty or error will be non-nil. Any non-2xx status 15445// code is an error. Response headers are in either 15446// *Empty.ServerResponse.Header or (if a response was returned at all) 15447// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 15448// check whether the returned error was because http.StatusNotModified 15449// was returned. 15450func (c *AdvertisersInsertionOrdersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 15451 gensupport.SetOptions(c.urlParams_, opts...) 15452 res, err := c.doRequest("json") 15453 if res != nil && res.StatusCode == http.StatusNotModified { 15454 if res.Body != nil { 15455 res.Body.Close() 15456 } 15457 return nil, &googleapi.Error{ 15458 Code: res.StatusCode, 15459 Header: res.Header, 15460 } 15461 } 15462 if err != nil { 15463 return nil, err 15464 } 15465 defer googleapi.CloseBody(res) 15466 if err := googleapi.CheckResponse(res); err != nil { 15467 return nil, err 15468 } 15469 ret := &Empty{ 15470 ServerResponse: googleapi.ServerResponse{ 15471 Header: res.Header, 15472 HTTPStatusCode: res.StatusCode, 15473 }, 15474 } 15475 target := &ret 15476 if err := gensupport.DecodeResponse(target, res); err != nil { 15477 return nil, err 15478 } 15479 return ret, nil 15480 // { 15481 // "description": "Deletes an insertion order.\nReturns error code `NOT_FOUND` if the insertion order does not exist.\nThe insertion order should be archived first, i.e. set\nentity_status to `ENTITY_STATUS_ARCHIVED`,\nto be able to delete it.", 15482 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", 15483 // "httpMethod": "DELETE", 15484 // "id": "displayvideo.advertisers.insertionOrders.delete", 15485 // "parameterOrder": [ 15486 // "advertiserId", 15487 // "insertionOrderId" 15488 // ], 15489 // "parameters": { 15490 // "advertiserId": { 15491 // "description": "The ID of the advertiser this insertion order belongs to.", 15492 // "format": "int64", 15493 // "location": "path", 15494 // "pattern": "^[^/]+$", 15495 // "required": true, 15496 // "type": "string" 15497 // }, 15498 // "insertionOrderId": { 15499 // "description": "The ID of the insertion order we need to delete.", 15500 // "format": "int64", 15501 // "location": "path", 15502 // "pattern": "^[^/]+$", 15503 // "required": true, 15504 // "type": "string" 15505 // } 15506 // }, 15507 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", 15508 // "response": { 15509 // "$ref": "Empty" 15510 // }, 15511 // "scopes": [ 15512 // "https://www.googleapis.com/auth/display-video" 15513 // ] 15514 // } 15515 15516} 15517 15518// method id "displayvideo.advertisers.insertionOrders.get": 15519 15520type AdvertisersInsertionOrdersGetCall struct { 15521 s *Service 15522 advertiserId int64 15523 insertionOrderId int64 15524 urlParams_ gensupport.URLParams 15525 ifNoneMatch_ string 15526 ctx_ context.Context 15527 header_ http.Header 15528} 15529 15530// Get: Gets an insertion order. 15531// Returns error code `NOT_FOUND` if the insertion order does not exist. 15532func (r *AdvertisersInsertionOrdersService) Get(advertiserId int64, insertionOrderId int64) *AdvertisersInsertionOrdersGetCall { 15533 c := &AdvertisersInsertionOrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15534 c.advertiserId = advertiserId 15535 c.insertionOrderId = insertionOrderId 15536 return c 15537} 15538 15539// Fields allows partial responses to be retrieved. See 15540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15541// for more information. 15542func (c *AdvertisersInsertionOrdersGetCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersGetCall { 15543 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15544 return c 15545} 15546 15547// IfNoneMatch sets the optional parameter which makes the operation 15548// fail if the object's ETag matches the given value. This is useful for 15549// getting updates only after the object has changed since the last 15550// request. Use googleapi.IsNotModified to check whether the response 15551// error from Do is the result of In-None-Match. 15552func (c *AdvertisersInsertionOrdersGetCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersGetCall { 15553 c.ifNoneMatch_ = entityTag 15554 return c 15555} 15556 15557// Context sets the context to be used in this call's Do method. Any 15558// pending HTTP request will be aborted if the provided context is 15559// canceled. 15560func (c *AdvertisersInsertionOrdersGetCall) Context(ctx context.Context) *AdvertisersInsertionOrdersGetCall { 15561 c.ctx_ = ctx 15562 return c 15563} 15564 15565// Header returns an http.Header that can be modified by the caller to 15566// add HTTP headers to the request. 15567func (c *AdvertisersInsertionOrdersGetCall) Header() http.Header { 15568 if c.header_ == nil { 15569 c.header_ = make(http.Header) 15570 } 15571 return c.header_ 15572} 15573 15574func (c *AdvertisersInsertionOrdersGetCall) doRequest(alt string) (*http.Response, error) { 15575 reqHeaders := make(http.Header) 15576 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15577 for k, v := range c.header_ { 15578 reqHeaders[k] = v 15579 } 15580 reqHeaders.Set("User-Agent", c.s.userAgent()) 15581 if c.ifNoneMatch_ != "" { 15582 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15583 } 15584 var body io.Reader = nil 15585 c.urlParams_.Set("alt", alt) 15586 c.urlParams_.Set("prettyPrint", "false") 15587 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") 15588 urls += "?" + c.urlParams_.Encode() 15589 req, err := http.NewRequest("GET", urls, body) 15590 if err != nil { 15591 return nil, err 15592 } 15593 req.Header = reqHeaders 15594 googleapi.Expand(req.URL, map[string]string{ 15595 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 15596 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 15597 }) 15598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15599} 15600 15601// Do executes the "displayvideo.advertisers.insertionOrders.get" call. 15602// Exactly one of *InsertionOrder or error will be non-nil. Any non-2xx 15603// status code is an error. Response headers are in either 15604// *InsertionOrder.ServerResponse.Header or (if a response was returned 15605// at all) in error.(*googleapi.Error).Header. Use 15606// googleapi.IsNotModified to check whether the returned error was 15607// because http.StatusNotModified was returned. 15608func (c *AdvertisersInsertionOrdersGetCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { 15609 gensupport.SetOptions(c.urlParams_, opts...) 15610 res, err := c.doRequest("json") 15611 if res != nil && res.StatusCode == http.StatusNotModified { 15612 if res.Body != nil { 15613 res.Body.Close() 15614 } 15615 return nil, &googleapi.Error{ 15616 Code: res.StatusCode, 15617 Header: res.Header, 15618 } 15619 } 15620 if err != nil { 15621 return nil, err 15622 } 15623 defer googleapi.CloseBody(res) 15624 if err := googleapi.CheckResponse(res); err != nil { 15625 return nil, err 15626 } 15627 ret := &InsertionOrder{ 15628 ServerResponse: googleapi.ServerResponse{ 15629 Header: res.Header, 15630 HTTPStatusCode: res.StatusCode, 15631 }, 15632 } 15633 target := &ret 15634 if err := gensupport.DecodeResponse(target, res); err != nil { 15635 return nil, err 15636 } 15637 return ret, nil 15638 // { 15639 // "description": "Gets an insertion order.\nReturns error code `NOT_FOUND` if the insertion order does not exist.", 15640 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", 15641 // "httpMethod": "GET", 15642 // "id": "displayvideo.advertisers.insertionOrders.get", 15643 // "parameterOrder": [ 15644 // "advertiserId", 15645 // "insertionOrderId" 15646 // ], 15647 // "parameters": { 15648 // "advertiserId": { 15649 // "description": "Required. The ID of the advertiser this insertion order belongs to.", 15650 // "format": "int64", 15651 // "location": "path", 15652 // "pattern": "^[^/]+$", 15653 // "required": true, 15654 // "type": "string" 15655 // }, 15656 // "insertionOrderId": { 15657 // "description": "Required. The ID of the insertion order to fetch.", 15658 // "format": "int64", 15659 // "location": "path", 15660 // "pattern": "^[^/]+$", 15661 // "required": true, 15662 // "type": "string" 15663 // } 15664 // }, 15665 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", 15666 // "response": { 15667 // "$ref": "InsertionOrder" 15668 // }, 15669 // "scopes": [ 15670 // "https://www.googleapis.com/auth/display-video" 15671 // ] 15672 // } 15673 15674} 15675 15676// method id "displayvideo.advertisers.insertionOrders.list": 15677 15678type AdvertisersInsertionOrdersListCall struct { 15679 s *Service 15680 advertiserId int64 15681 urlParams_ gensupport.URLParams 15682 ifNoneMatch_ string 15683 ctx_ context.Context 15684 header_ http.Header 15685} 15686 15687// List: Lists insertion orders in an advertiser. 15688// 15689// The order is defined by the order_by 15690// parameter. 15691// If a filter by 15692// entity_status is not specified, insertion 15693// orders with `ENTITY_STATUS_ARCHIVED` will not be included in the 15694// results. 15695func (r *AdvertisersInsertionOrdersService) List(advertiserId int64) *AdvertisersInsertionOrdersListCall { 15696 c := &AdvertisersInsertionOrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15697 c.advertiserId = advertiserId 15698 return c 15699} 15700 15701// Filter sets the optional parameter "filter": Allows filtering by 15702// insertion order properties. 15703// 15704// Supported syntax: 15705// 15706// * Filter expressions are made up of one or more restrictions. 15707// * Restrictions can be combined by `AND` or `OR` logical operators. 15708// A 15709// sequence of restrictions implicitly uses `AND`. 15710// * A restriction has the form of `{field} {operator} {value}`. 15711// * The operator must be `EQUALS (=)`. 15712// * Supported fields: 15713// - `campaignId` 15714// - `entityStatus` 15715// 15716// Examples: 15717// 15718// * All insertion orders under a campaign: `campaignId="1234" 15719// * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion 15720// orders 15721// under an advertiser: 15722// `(entityStatus="ENTITY_STATUS_ACTIVE" 15723// OR 15724// entityStatus="ENTITY_STATUS_PAUSED")` 15725// 15726// The length of this field should be no more than 500 characters. 15727func (c *AdvertisersInsertionOrdersListCall) Filter(filter string) *AdvertisersInsertionOrdersListCall { 15728 c.urlParams_.Set("filter", filter) 15729 return c 15730} 15731 15732// OrderBy sets the optional parameter "orderBy": Field by which to sort 15733// the list. 15734// Acceptable values are: 15735// 15736// * "displayName" (default) 15737// * "entityStatus" 15738// 15739// The default sorting order is ascending. To specify descending order 15740// for 15741// a field, a suffix "desc" should be added to the field name. 15742// Example: 15743// `displayName desc`. 15744func (c *AdvertisersInsertionOrdersListCall) OrderBy(orderBy string) *AdvertisersInsertionOrdersListCall { 15745 c.urlParams_.Set("orderBy", orderBy) 15746 return c 15747} 15748 15749// PageSize sets the optional parameter "pageSize": Requested page size. 15750// Must be between `1` and `100`. If unspecified will 15751// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 15752// value 15753// is specified. 15754func (c *AdvertisersInsertionOrdersListCall) PageSize(pageSize int64) *AdvertisersInsertionOrdersListCall { 15755 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 15756 return c 15757} 15758 15759// PageToken sets the optional parameter "pageToken": A token 15760// identifying a page of results the server should return. 15761// Typically, this is the value of 15762// next_page_token returned 15763// from the previous call to `ListInsertionOrders` method. If not 15764// specified, 15765// the first page of results will be returned. 15766func (c *AdvertisersInsertionOrdersListCall) PageToken(pageToken string) *AdvertisersInsertionOrdersListCall { 15767 c.urlParams_.Set("pageToken", pageToken) 15768 return c 15769} 15770 15771// Fields allows partial responses to be retrieved. See 15772// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15773// for more information. 15774func (c *AdvertisersInsertionOrdersListCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersListCall { 15775 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15776 return c 15777} 15778 15779// IfNoneMatch sets the optional parameter which makes the operation 15780// fail if the object's ETag matches the given value. This is useful for 15781// getting updates only after the object has changed since the last 15782// request. Use googleapi.IsNotModified to check whether the response 15783// error from Do is the result of In-None-Match. 15784func (c *AdvertisersInsertionOrdersListCall) IfNoneMatch(entityTag string) *AdvertisersInsertionOrdersListCall { 15785 c.ifNoneMatch_ = entityTag 15786 return c 15787} 15788 15789// Context sets the context to be used in this call's Do method. Any 15790// pending HTTP request will be aborted if the provided context is 15791// canceled. 15792func (c *AdvertisersInsertionOrdersListCall) Context(ctx context.Context) *AdvertisersInsertionOrdersListCall { 15793 c.ctx_ = ctx 15794 return c 15795} 15796 15797// Header returns an http.Header that can be modified by the caller to 15798// add HTTP headers to the request. 15799func (c *AdvertisersInsertionOrdersListCall) Header() http.Header { 15800 if c.header_ == nil { 15801 c.header_ = make(http.Header) 15802 } 15803 return c.header_ 15804} 15805 15806func (c *AdvertisersInsertionOrdersListCall) doRequest(alt string) (*http.Response, error) { 15807 reqHeaders := make(http.Header) 15808 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15809 for k, v := range c.header_ { 15810 reqHeaders[k] = v 15811 } 15812 reqHeaders.Set("User-Agent", c.s.userAgent()) 15813 if c.ifNoneMatch_ != "" { 15814 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 15815 } 15816 var body io.Reader = nil 15817 c.urlParams_.Set("alt", alt) 15818 c.urlParams_.Set("prettyPrint", "false") 15819 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders") 15820 urls += "?" + c.urlParams_.Encode() 15821 req, err := http.NewRequest("GET", urls, body) 15822 if err != nil { 15823 return nil, err 15824 } 15825 req.Header = reqHeaders 15826 googleapi.Expand(req.URL, map[string]string{ 15827 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 15828 }) 15829 return gensupport.SendRequest(c.ctx_, c.s.client, req) 15830} 15831 15832// Do executes the "displayvideo.advertisers.insertionOrders.list" call. 15833// Exactly one of *ListInsertionOrdersResponse or error will be non-nil. 15834// Any non-2xx status code is an error. Response headers are in either 15835// *ListInsertionOrdersResponse.ServerResponse.Header or (if a response 15836// was returned at all) in error.(*googleapi.Error).Header. Use 15837// googleapi.IsNotModified to check whether the returned error was 15838// because http.StatusNotModified was returned. 15839func (c *AdvertisersInsertionOrdersListCall) Do(opts ...googleapi.CallOption) (*ListInsertionOrdersResponse, error) { 15840 gensupport.SetOptions(c.urlParams_, opts...) 15841 res, err := c.doRequest("json") 15842 if res != nil && res.StatusCode == http.StatusNotModified { 15843 if res.Body != nil { 15844 res.Body.Close() 15845 } 15846 return nil, &googleapi.Error{ 15847 Code: res.StatusCode, 15848 Header: res.Header, 15849 } 15850 } 15851 if err != nil { 15852 return nil, err 15853 } 15854 defer googleapi.CloseBody(res) 15855 if err := googleapi.CheckResponse(res); err != nil { 15856 return nil, err 15857 } 15858 ret := &ListInsertionOrdersResponse{ 15859 ServerResponse: googleapi.ServerResponse{ 15860 Header: res.Header, 15861 HTTPStatusCode: res.StatusCode, 15862 }, 15863 } 15864 target := &ret 15865 if err := gensupport.DecodeResponse(target, res); err != nil { 15866 return nil, err 15867 } 15868 return ret, nil 15869 // { 15870 // "description": "Lists insertion orders in an advertiser.\n\nThe order is defined by the order_by\nparameter.\nIf a filter by\nentity_status is not specified, insertion\norders with `ENTITY_STATUS_ARCHIVED` will not be included in the results.", 15871 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders", 15872 // "httpMethod": "GET", 15873 // "id": "displayvideo.advertisers.insertionOrders.list", 15874 // "parameterOrder": [ 15875 // "advertiserId" 15876 // ], 15877 // "parameters": { 15878 // "advertiserId": { 15879 // "description": "Required. The ID of the advertiser to list insertion orders for.", 15880 // "format": "int64", 15881 // "location": "path", 15882 // "pattern": "^[^/]+$", 15883 // "required": true, 15884 // "type": "string" 15885 // }, 15886 // "filter": { 15887 // "description": "Allows filtering by insertion order properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `campaignId`\n - `entityStatus`\n\nExamples:\n\n* All insertion orders under a campaign: `campaignId=\"1234\"`\n* All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` insertion orders\nunder an advertiser:\n`(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR\nentityStatus=\"ENTITY_STATUS_PAUSED\")`\n\nThe length of this field should be no more than 500 characters.", 15888 // "location": "query", 15889 // "type": "string" 15890 // }, 15891 // "orderBy": { 15892 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* \"displayName\" (default)\n* \"entityStatus\"\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 15893 // "location": "query", 15894 // "type": "string" 15895 // }, 15896 // "pageSize": { 15897 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 15898 // "format": "int32", 15899 // "location": "query", 15900 // "type": "integer" 15901 // }, 15902 // "pageToken": { 15903 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token returned\nfrom the previous call to `ListInsertionOrders` method. If not specified,\nthe first page of results will be returned.", 15904 // "location": "query", 15905 // "type": "string" 15906 // } 15907 // }, 15908 // "path": "v1/advertisers/{+advertiserId}/insertionOrders", 15909 // "response": { 15910 // "$ref": "ListInsertionOrdersResponse" 15911 // }, 15912 // "scopes": [ 15913 // "https://www.googleapis.com/auth/display-video" 15914 // ] 15915 // } 15916 15917} 15918 15919// Pages invokes f for each page of results. 15920// A non-nil error returned from f will halt the iteration. 15921// The provided context supersedes any context provided to the Context method. 15922func (c *AdvertisersInsertionOrdersListCall) Pages(ctx context.Context, f func(*ListInsertionOrdersResponse) error) error { 15923 c.ctx_ = ctx 15924 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 15925 for { 15926 x, err := c.Do() 15927 if err != nil { 15928 return err 15929 } 15930 if err := f(x); err != nil { 15931 return err 15932 } 15933 if x.NextPageToken == "" { 15934 return nil 15935 } 15936 c.PageToken(x.NextPageToken) 15937 } 15938} 15939 15940// method id "displayvideo.advertisers.insertionOrders.patch": 15941 15942type AdvertisersInsertionOrdersPatchCall struct { 15943 s *Service 15944 advertiserId int64 15945 insertionOrderId int64 15946 insertionorder *InsertionOrder 15947 urlParams_ gensupport.URLParams 15948 ctx_ context.Context 15949 header_ http.Header 15950} 15951 15952// Patch: Updates an existing insertion order. 15953// Returns the updated insertion order if successful. 15954func (r *AdvertisersInsertionOrdersService) Patch(advertiserId int64, insertionOrderId int64, insertionorder *InsertionOrder) *AdvertisersInsertionOrdersPatchCall { 15955 c := &AdvertisersInsertionOrdersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 15956 c.advertiserId = advertiserId 15957 c.insertionOrderId = insertionOrderId 15958 c.insertionorder = insertionorder 15959 return c 15960} 15961 15962// UpdateMask sets the optional parameter "updateMask": Required. The 15963// mask to control which fields to update. 15964func (c *AdvertisersInsertionOrdersPatchCall) UpdateMask(updateMask string) *AdvertisersInsertionOrdersPatchCall { 15965 c.urlParams_.Set("updateMask", updateMask) 15966 return c 15967} 15968 15969// Fields allows partial responses to be retrieved. See 15970// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 15971// for more information. 15972func (c *AdvertisersInsertionOrdersPatchCall) Fields(s ...googleapi.Field) *AdvertisersInsertionOrdersPatchCall { 15973 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 15974 return c 15975} 15976 15977// Context sets the context to be used in this call's Do method. Any 15978// pending HTTP request will be aborted if the provided context is 15979// canceled. 15980func (c *AdvertisersInsertionOrdersPatchCall) Context(ctx context.Context) *AdvertisersInsertionOrdersPatchCall { 15981 c.ctx_ = ctx 15982 return c 15983} 15984 15985// Header returns an http.Header that can be modified by the caller to 15986// add HTTP headers to the request. 15987func (c *AdvertisersInsertionOrdersPatchCall) Header() http.Header { 15988 if c.header_ == nil { 15989 c.header_ = make(http.Header) 15990 } 15991 return c.header_ 15992} 15993 15994func (c *AdvertisersInsertionOrdersPatchCall) doRequest(alt string) (*http.Response, error) { 15995 reqHeaders := make(http.Header) 15996 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 15997 for k, v := range c.header_ { 15998 reqHeaders[k] = v 15999 } 16000 reqHeaders.Set("User-Agent", c.s.userAgent()) 16001 var body io.Reader = nil 16002 body, err := googleapi.WithoutDataWrapper.JSONReader(c.insertionorder) 16003 if err != nil { 16004 return nil, err 16005 } 16006 reqHeaders.Set("Content-Type", "application/json") 16007 c.urlParams_.Set("alt", alt) 16008 c.urlParams_.Set("prettyPrint", "false") 16009 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}") 16010 urls += "?" + c.urlParams_.Encode() 16011 req, err := http.NewRequest("PATCH", urls, body) 16012 if err != nil { 16013 return nil, err 16014 } 16015 req.Header = reqHeaders 16016 googleapi.Expand(req.URL, map[string]string{ 16017 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16018 "insertionOrderId": strconv.FormatInt(c.insertionOrderId, 10), 16019 }) 16020 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16021} 16022 16023// Do executes the "displayvideo.advertisers.insertionOrders.patch" call. 16024// Exactly one of *InsertionOrder or error will be non-nil. Any non-2xx 16025// status code is an error. Response headers are in either 16026// *InsertionOrder.ServerResponse.Header or (if a response was returned 16027// at all) in error.(*googleapi.Error).Header. Use 16028// googleapi.IsNotModified to check whether the returned error was 16029// because http.StatusNotModified was returned. 16030func (c *AdvertisersInsertionOrdersPatchCall) Do(opts ...googleapi.CallOption) (*InsertionOrder, error) { 16031 gensupport.SetOptions(c.urlParams_, opts...) 16032 res, err := c.doRequest("json") 16033 if res != nil && res.StatusCode == http.StatusNotModified { 16034 if res.Body != nil { 16035 res.Body.Close() 16036 } 16037 return nil, &googleapi.Error{ 16038 Code: res.StatusCode, 16039 Header: res.Header, 16040 } 16041 } 16042 if err != nil { 16043 return nil, err 16044 } 16045 defer googleapi.CloseBody(res) 16046 if err := googleapi.CheckResponse(res); err != nil { 16047 return nil, err 16048 } 16049 ret := &InsertionOrder{ 16050 ServerResponse: googleapi.ServerResponse{ 16051 Header: res.Header, 16052 HTTPStatusCode: res.StatusCode, 16053 }, 16054 } 16055 target := &ret 16056 if err := gensupport.DecodeResponse(target, res); err != nil { 16057 return nil, err 16058 } 16059 return ret, nil 16060 // { 16061 // "description": "Updates an existing insertion order.\nReturns the updated insertion order if successful.", 16062 // "flatPath": "v1/advertisers/{advertisersId}/insertionOrders/{insertionOrdersId}", 16063 // "httpMethod": "PATCH", 16064 // "id": "displayvideo.advertisers.insertionOrders.patch", 16065 // "parameterOrder": [ 16066 // "advertiserId", 16067 // "insertionOrderId" 16068 // ], 16069 // "parameters": { 16070 // "advertiserId": { 16071 // "description": "Output only. The unique ID of the advertiser the insertion order belongs to.", 16072 // "format": "int64", 16073 // "location": "path", 16074 // "pattern": "^[^/]+$", 16075 // "required": true, 16076 // "type": "string" 16077 // }, 16078 // "insertionOrderId": { 16079 // "description": "Output only. The unique ID of the insertion order. Assigned by the system.", 16080 // "format": "int64", 16081 // "location": "path", 16082 // "pattern": "^[^/]+$", 16083 // "required": true, 16084 // "type": "string" 16085 // }, 16086 // "updateMask": { 16087 // "description": "Required. The mask to control which fields to update.", 16088 // "format": "google-fieldmask", 16089 // "location": "query", 16090 // "type": "string" 16091 // } 16092 // }, 16093 // "path": "v1/advertisers/{+advertiserId}/insertionOrders/{+insertionOrderId}", 16094 // "request": { 16095 // "$ref": "InsertionOrder" 16096 // }, 16097 // "response": { 16098 // "$ref": "InsertionOrder" 16099 // }, 16100 // "scopes": [ 16101 // "https://www.googleapis.com/auth/display-video" 16102 // ] 16103 // } 16104 16105} 16106 16107// method id "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions": 16108 16109type AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall struct { 16110 s *Service 16111 advertiserId int64 16112 lineItemId int64 16113 bulkeditlineitemassignedtargetingoptionsrequest *BulkEditLineItemAssignedTargetingOptionsRequest 16114 urlParams_ gensupport.URLParams 16115 ctx_ context.Context 16116 header_ http.Header 16117} 16118 16119// BulkEditLineItemAssignedTargetingOptions: Bulk edits targeting 16120// options under a single line item. 16121// The operation will delete the assigned targeting options provided 16122// in 16123// BulkEditLineItemAssignedTargetingOptionsRequest.delete_requests 16124// and 16125// then create the assigned targeting options provided 16126// in 16127// BulkEditLineItemAssignedTargetingOptionsRequest.create_requests . 16128func (r *AdvertisersLineItemsService) BulkEditLineItemAssignedTargetingOptions(advertiserId int64, lineItemId int64, bulkeditlineitemassignedtargetingoptionsrequest *BulkEditLineItemAssignedTargetingOptionsRequest) *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall { 16129 c := &AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16130 c.advertiserId = advertiserId 16131 c.lineItemId = lineItemId 16132 c.bulkeditlineitemassignedtargetingoptionsrequest = bulkeditlineitemassignedtargetingoptionsrequest 16133 return c 16134} 16135 16136// Fields allows partial responses to be retrieved. See 16137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16138// for more information. 16139func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall { 16140 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16141 return c 16142} 16143 16144// Context sets the context to be used in this call's Do method. Any 16145// pending HTTP request will be aborted if the provided context is 16146// canceled. 16147func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall { 16148 c.ctx_ = ctx 16149 return c 16150} 16151 16152// Header returns an http.Header that can be modified by the caller to 16153// add HTTP headers to the request. 16154func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Header() http.Header { 16155 if c.header_ == nil { 16156 c.header_ = make(http.Header) 16157 } 16158 return c.header_ 16159} 16160 16161func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 16162 reqHeaders := make(http.Header) 16163 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16164 for k, v := range c.header_ { 16165 reqHeaders[k] = v 16166 } 16167 reqHeaders.Set("User-Agent", c.s.userAgent()) 16168 var body io.Reader = nil 16169 body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkeditlineitemassignedtargetingoptionsrequest) 16170 if err != nil { 16171 return nil, err 16172 } 16173 reqHeaders.Set("Content-Type", "application/json") 16174 c.urlParams_.Set("alt", alt) 16175 c.urlParams_.Set("prettyPrint", "false") 16176 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkEditLineItemAssignedTargetingOptions") 16177 urls += "?" + c.urlParams_.Encode() 16178 req, err := http.NewRequest("POST", urls, body) 16179 if err != nil { 16180 return nil, err 16181 } 16182 req.Header = reqHeaders 16183 googleapi.Expand(req.URL, map[string]string{ 16184 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16185 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 16186 }) 16187 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16188} 16189 16190// Do executes the "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions" call. 16191// Exactly one of *BulkEditLineItemAssignedTargetingOptionsResponse or 16192// error will be non-nil. Any non-2xx status code is an error. Response 16193// headers are in either 16194// *BulkEditLineItemAssignedTargetingOptionsResponse.ServerResponse.Heade 16195// r or (if a response was returned at all) in 16196// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16197// whether the returned error was because http.StatusNotModified was 16198// returned. 16199func (c *AdvertisersLineItemsBulkEditLineItemAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkEditLineItemAssignedTargetingOptionsResponse, error) { 16200 gensupport.SetOptions(c.urlParams_, opts...) 16201 res, err := c.doRequest("json") 16202 if res != nil && res.StatusCode == http.StatusNotModified { 16203 if res.Body != nil { 16204 res.Body.Close() 16205 } 16206 return nil, &googleapi.Error{ 16207 Code: res.StatusCode, 16208 Header: res.Header, 16209 } 16210 } 16211 if err != nil { 16212 return nil, err 16213 } 16214 defer googleapi.CloseBody(res) 16215 if err := googleapi.CheckResponse(res); err != nil { 16216 return nil, err 16217 } 16218 ret := &BulkEditLineItemAssignedTargetingOptionsResponse{ 16219 ServerResponse: googleapi.ServerResponse{ 16220 Header: res.Header, 16221 HTTPStatusCode: res.StatusCode, 16222 }, 16223 } 16224 target := &ret 16225 if err := gensupport.DecodeResponse(target, res); err != nil { 16226 return nil, err 16227 } 16228 return ret, nil 16229 // { 16230 // "description": "Bulk edits targeting options under a single line item.\nThe operation will delete the assigned targeting options provided in\nBulkEditLineItemAssignedTargetingOptionsRequest.delete_requests and\nthen create the assigned targeting options provided in\nBulkEditLineItemAssignedTargetingOptionsRequest.create_requests .", 16231 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}:bulkEditLineItemAssignedTargetingOptions", 16232 // "httpMethod": "POST", 16233 // "id": "displayvideo.advertisers.lineItems.bulkEditLineItemAssignedTargetingOptions", 16234 // "parameterOrder": [ 16235 // "advertiserId", 16236 // "lineItemId" 16237 // ], 16238 // "parameters": { 16239 // "advertiserId": { 16240 // "description": "Required. The ID of the advertiser the line item belongs to.", 16241 // "format": "int64", 16242 // "location": "path", 16243 // "pattern": "^[^/]+$", 16244 // "required": true, 16245 // "type": "string" 16246 // }, 16247 // "lineItemId": { 16248 // "description": "Required. The ID of the line item the assigned targeting option will belong to.", 16249 // "format": "int64", 16250 // "location": "path", 16251 // "pattern": "^[^/]+$", 16252 // "required": true, 16253 // "type": "string" 16254 // } 16255 // }, 16256 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkEditLineItemAssignedTargetingOptions", 16257 // "request": { 16258 // "$ref": "BulkEditLineItemAssignedTargetingOptionsRequest" 16259 // }, 16260 // "response": { 16261 // "$ref": "BulkEditLineItemAssignedTargetingOptionsResponse" 16262 // }, 16263 // "scopes": [ 16264 // "https://www.googleapis.com/auth/display-video" 16265 // ] 16266 // } 16267 16268} 16269 16270// method id "displayvideo.advertisers.lineItems.bulkListLineItemAssignedTargetingOptions": 16271 16272type AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall struct { 16273 s *Service 16274 advertiserId int64 16275 lineItemId int64 16276 urlParams_ gensupport.URLParams 16277 ifNoneMatch_ string 16278 ctx_ context.Context 16279 header_ http.Header 16280} 16281 16282// BulkListLineItemAssignedTargetingOptions: Lists assigned targeting 16283// options of a line item across targeting types. 16284func (r *AdvertisersLineItemsService) BulkListLineItemAssignedTargetingOptions(advertiserId int64, lineItemId int64) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16285 c := &AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16286 c.advertiserId = advertiserId 16287 c.lineItemId = lineItemId 16288 return c 16289} 16290 16291// Filter sets the optional parameter "filter": Allows filtering by 16292// assigned targeting option properties. 16293// Supported syntax: 16294// 16295// * Filter expressions are made up of one or more restrictions. 16296// * Restrictions can be combined by the logical operator `OR` on the 16297// same 16298// field. 16299// * A restriction has the form of `{field} {operator} {value}`. 16300// * The operator must be `EQUALS (=)`. 16301// * Supported fields: 16302// - `targetingType` 16303// - `inheritance` 16304// 16305// Examples: 16306// 16307// * AssignedTargetingOptions of targeting 16308// type 16309// TARGETING_TYPE_PROXIMITY_LOCATION_LIST or 16310// TARGETING_TYPE_CHANNEL 16311// `targetingType="TARGETING_TYPE_PROXIMITY_LOCATI 16312// ON_LIST" OR 16313// targetingType="TARGETING_TYPE_CHANNEL" 16314// * AssignedTargetingOptions with inheritance status of NOT_INHERITED 16315// or 16316// INHERITED_FROM_PARTNER 16317// `inheritance="NOT_INHERITED" OR 16318// inheritance="INHERITED_FROM_PARTNER" 16319// 16320// The length of this field should be no more than 500 characters. 16321func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Filter(filter string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16322 c.urlParams_.Set("filter", filter) 16323 return c 16324} 16325 16326// OrderBy sets the optional parameter "orderBy": Field by which to sort 16327// the list. 16328// Acceptable values are: 16329// 16330// * `targetingType` (default) 16331// 16332// The default sorting order is ascending. To specify descending order 16333// for 16334// a field, a suffix "desc" should be added to the field name. 16335// Example: 16336// `targetingType desc`. 16337func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) OrderBy(orderBy string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16338 c.urlParams_.Set("orderBy", orderBy) 16339 return c 16340} 16341 16342// PageSize sets the optional parameter "pageSize": Requested page 16343// size. 16344// The size must be an integer between `1` and `5000`. If 16345// unspecified, 16346// the default is '5000'. Returns error code `INVALID_ARGUMENT` if an 16347// invalid 16348// value is specified. 16349func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) PageSize(pageSize int64) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16350 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 16351 return c 16352} 16353 16354// PageToken sets the optional parameter "pageToken": A token that lets 16355// the client fetch the next page of results. 16356// Typically, this is the value of 16357// next_page_token 16358// returned from the previous call 16359// to 16360// `BulkListLineItemAssignedTargetingOptions` method. 16361// If not specified, the first page of results will be returned. 16362func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) PageToken(pageToken string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16363 c.urlParams_.Set("pageToken", pageToken) 16364 return c 16365} 16366 16367// Fields allows partial responses to be retrieved. See 16368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16369// for more information. 16370func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16371 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16372 return c 16373} 16374 16375// IfNoneMatch sets the optional parameter which makes the operation 16376// fail if the object's ETag matches the given value. This is useful for 16377// getting updates only after the object has changed since the last 16378// request. Use googleapi.IsNotModified to check whether the response 16379// error from Do is the result of In-None-Match. 16380func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16381 c.ifNoneMatch_ = entityTag 16382 return c 16383} 16384 16385// Context sets the context to be used in this call's Do method. Any 16386// pending HTTP request will be aborted if the provided context is 16387// canceled. 16388func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Context(ctx context.Context) *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall { 16389 c.ctx_ = ctx 16390 return c 16391} 16392 16393// Header returns an http.Header that can be modified by the caller to 16394// add HTTP headers to the request. 16395func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Header() http.Header { 16396 if c.header_ == nil { 16397 c.header_ = make(http.Header) 16398 } 16399 return c.header_ 16400} 16401 16402func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) doRequest(alt string) (*http.Response, error) { 16403 reqHeaders := make(http.Header) 16404 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16405 for k, v := range c.header_ { 16406 reqHeaders[k] = v 16407 } 16408 reqHeaders.Set("User-Agent", c.s.userAgent()) 16409 if c.ifNoneMatch_ != "" { 16410 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16411 } 16412 var body io.Reader = nil 16413 c.urlParams_.Set("alt", alt) 16414 c.urlParams_.Set("prettyPrint", "false") 16415 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkListLineItemAssignedTargetingOptions") 16416 urls += "?" + c.urlParams_.Encode() 16417 req, err := http.NewRequest("GET", urls, body) 16418 if err != nil { 16419 return nil, err 16420 } 16421 req.Header = reqHeaders 16422 googleapi.Expand(req.URL, map[string]string{ 16423 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16424 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 16425 }) 16426 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16427} 16428 16429// Do executes the "displayvideo.advertisers.lineItems.bulkListLineItemAssignedTargetingOptions" call. 16430// Exactly one of *BulkListLineItemAssignedTargetingOptionsResponse or 16431// error will be non-nil. Any non-2xx status code is an error. Response 16432// headers are in either 16433// *BulkListLineItemAssignedTargetingOptionsResponse.ServerResponse.Heade 16434// r or (if a response was returned at all) in 16435// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 16436// whether the returned error was because http.StatusNotModified was 16437// returned. 16438func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Do(opts ...googleapi.CallOption) (*BulkListLineItemAssignedTargetingOptionsResponse, error) { 16439 gensupport.SetOptions(c.urlParams_, opts...) 16440 res, err := c.doRequest("json") 16441 if res != nil && res.StatusCode == http.StatusNotModified { 16442 if res.Body != nil { 16443 res.Body.Close() 16444 } 16445 return nil, &googleapi.Error{ 16446 Code: res.StatusCode, 16447 Header: res.Header, 16448 } 16449 } 16450 if err != nil { 16451 return nil, err 16452 } 16453 defer googleapi.CloseBody(res) 16454 if err := googleapi.CheckResponse(res); err != nil { 16455 return nil, err 16456 } 16457 ret := &BulkListLineItemAssignedTargetingOptionsResponse{ 16458 ServerResponse: googleapi.ServerResponse{ 16459 Header: res.Header, 16460 HTTPStatusCode: res.StatusCode, 16461 }, 16462 } 16463 target := &ret 16464 if err := gensupport.DecodeResponse(target, res); err != nil { 16465 return nil, err 16466 } 16467 return ret, nil 16468 // { 16469 // "description": "Lists assigned targeting options of a line item across targeting types.", 16470 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}:bulkListLineItemAssignedTargetingOptions", 16471 // "httpMethod": "GET", 16472 // "id": "displayvideo.advertisers.lineItems.bulkListLineItemAssignedTargetingOptions", 16473 // "parameterOrder": [ 16474 // "advertiserId", 16475 // "lineItemId" 16476 // ], 16477 // "parameters": { 16478 // "advertiserId": { 16479 // "description": "Required. The ID of the advertiser the line item belongs to.", 16480 // "format": "int64", 16481 // "location": "path", 16482 // "pattern": "^[^/]+$", 16483 // "required": true, 16484 // "type": "string" 16485 // }, 16486 // "filter": { 16487 // "description": "Allows filtering by assigned targeting option properties.\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by the logical operator `OR` on the same\nfield.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `targetingType`\n - `inheritance`\n\nExamples:\n\n* AssignedTargetingOptions of targeting type\nTARGETING_TYPE_PROXIMITY_LOCATION_LIST or TARGETING_TYPE_CHANNEL\n`targetingType=\"TARGETING_TYPE_PROXIMITY_LOCATION_LIST\" OR\ntargetingType=\"TARGETING_TYPE_CHANNEL\"`\n* AssignedTargetingOptions with inheritance status of NOT_INHERITED or\n INHERITED_FROM_PARTNER\n`inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"`\n\nThe length of this field should be no more than 500 characters.", 16488 // "location": "query", 16489 // "type": "string" 16490 // }, 16491 // "lineItemId": { 16492 // "description": "Required. The ID of the line item to list assigned targeting options for.", 16493 // "format": "int64", 16494 // "location": "path", 16495 // "pattern": "^[^/]+$", 16496 // "required": true, 16497 // "type": "string" 16498 // }, 16499 // "orderBy": { 16500 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `targetingType` (default)\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`targetingType desc`.", 16501 // "location": "query", 16502 // "type": "string" 16503 // }, 16504 // "pageSize": { 16505 // "description": "Requested page size.\nThe size must be an integer between `1` and `5000`. If unspecified,\nthe default is '5000'. Returns error code `INVALID_ARGUMENT` if an invalid\nvalue is specified.", 16506 // "format": "int32", 16507 // "location": "query", 16508 // "type": "integer" 16509 // }, 16510 // "pageToken": { 16511 // "description": "A token that lets the client fetch the next page of results.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to\n`BulkListLineItemAssignedTargetingOptions` method.\nIf not specified, the first page of results will be returned.", 16512 // "location": "query", 16513 // "type": "string" 16514 // } 16515 // }, 16516 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}:bulkListLineItemAssignedTargetingOptions", 16517 // "response": { 16518 // "$ref": "BulkListLineItemAssignedTargetingOptionsResponse" 16519 // }, 16520 // "scopes": [ 16521 // "https://www.googleapis.com/auth/display-video" 16522 // ] 16523 // } 16524 16525} 16526 16527// Pages invokes f for each page of results. 16528// A non-nil error returned from f will halt the iteration. 16529// The provided context supersedes any context provided to the Context method. 16530func (c *AdvertisersLineItemsBulkListLineItemAssignedTargetingOptionsCall) Pages(ctx context.Context, f func(*BulkListLineItemAssignedTargetingOptionsResponse) error) error { 16531 c.ctx_ = ctx 16532 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 16533 for { 16534 x, err := c.Do() 16535 if err != nil { 16536 return err 16537 } 16538 if err := f(x); err != nil { 16539 return err 16540 } 16541 if x.NextPageToken == "" { 16542 return nil 16543 } 16544 c.PageToken(x.NextPageToken) 16545 } 16546} 16547 16548// method id "displayvideo.advertisers.lineItems.create": 16549 16550type AdvertisersLineItemsCreateCall struct { 16551 s *Service 16552 advertiserId int64 16553 lineitem *LineItem 16554 urlParams_ gensupport.URLParams 16555 ctx_ context.Context 16556 header_ http.Header 16557} 16558 16559// Create: Creates a new line item. 16560// Returns the newly created line item if successful. 16561func (r *AdvertisersLineItemsService) Create(advertiserId int64, lineitem *LineItem) *AdvertisersLineItemsCreateCall { 16562 c := &AdvertisersLineItemsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16563 c.advertiserId = advertiserId 16564 c.lineitem = lineitem 16565 return c 16566} 16567 16568// Fields allows partial responses to be retrieved. See 16569// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16570// for more information. 16571func (c *AdvertisersLineItemsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsCreateCall { 16572 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16573 return c 16574} 16575 16576// Context sets the context to be used in this call's Do method. Any 16577// pending HTTP request will be aborted if the provided context is 16578// canceled. 16579func (c *AdvertisersLineItemsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsCreateCall { 16580 c.ctx_ = ctx 16581 return c 16582} 16583 16584// Header returns an http.Header that can be modified by the caller to 16585// add HTTP headers to the request. 16586func (c *AdvertisersLineItemsCreateCall) Header() http.Header { 16587 if c.header_ == nil { 16588 c.header_ = make(http.Header) 16589 } 16590 return c.header_ 16591} 16592 16593func (c *AdvertisersLineItemsCreateCall) doRequest(alt string) (*http.Response, error) { 16594 reqHeaders := make(http.Header) 16595 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16596 for k, v := range c.header_ { 16597 reqHeaders[k] = v 16598 } 16599 reqHeaders.Set("User-Agent", c.s.userAgent()) 16600 var body io.Reader = nil 16601 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem) 16602 if err != nil { 16603 return nil, err 16604 } 16605 reqHeaders.Set("Content-Type", "application/json") 16606 c.urlParams_.Set("alt", alt) 16607 c.urlParams_.Set("prettyPrint", "false") 16608 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems") 16609 urls += "?" + c.urlParams_.Encode() 16610 req, err := http.NewRequest("POST", urls, body) 16611 if err != nil { 16612 return nil, err 16613 } 16614 req.Header = reqHeaders 16615 googleapi.Expand(req.URL, map[string]string{ 16616 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16617 }) 16618 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16619} 16620 16621// Do executes the "displayvideo.advertisers.lineItems.create" call. 16622// Exactly one of *LineItem or error will be non-nil. Any non-2xx status 16623// code is an error. Response headers are in either 16624// *LineItem.ServerResponse.Header or (if a response was returned at 16625// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16626// to check whether the returned error was because 16627// http.StatusNotModified was returned. 16628func (c *AdvertisersLineItemsCreateCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 16629 gensupport.SetOptions(c.urlParams_, opts...) 16630 res, err := c.doRequest("json") 16631 if res != nil && res.StatusCode == http.StatusNotModified { 16632 if res.Body != nil { 16633 res.Body.Close() 16634 } 16635 return nil, &googleapi.Error{ 16636 Code: res.StatusCode, 16637 Header: res.Header, 16638 } 16639 } 16640 if err != nil { 16641 return nil, err 16642 } 16643 defer googleapi.CloseBody(res) 16644 if err := googleapi.CheckResponse(res); err != nil { 16645 return nil, err 16646 } 16647 ret := &LineItem{ 16648 ServerResponse: googleapi.ServerResponse{ 16649 Header: res.Header, 16650 HTTPStatusCode: res.StatusCode, 16651 }, 16652 } 16653 target := &ret 16654 if err := gensupport.DecodeResponse(target, res); err != nil { 16655 return nil, err 16656 } 16657 return ret, nil 16658 // { 16659 // "description": "Creates a new line item.\nReturns the newly created line item if successful.", 16660 // "flatPath": "v1/advertisers/{advertisersId}/lineItems", 16661 // "httpMethod": "POST", 16662 // "id": "displayvideo.advertisers.lineItems.create", 16663 // "parameterOrder": [ 16664 // "advertiserId" 16665 // ], 16666 // "parameters": { 16667 // "advertiserId": { 16668 // "description": "Output only. The unique ID of the advertiser the line item belongs to.", 16669 // "format": "int64", 16670 // "location": "path", 16671 // "pattern": "^[^/]+$", 16672 // "required": true, 16673 // "type": "string" 16674 // } 16675 // }, 16676 // "path": "v1/advertisers/{+advertiserId}/lineItems", 16677 // "request": { 16678 // "$ref": "LineItem" 16679 // }, 16680 // "response": { 16681 // "$ref": "LineItem" 16682 // }, 16683 // "scopes": [ 16684 // "https://www.googleapis.com/auth/display-video" 16685 // ] 16686 // } 16687 16688} 16689 16690// method id "displayvideo.advertisers.lineItems.delete": 16691 16692type AdvertisersLineItemsDeleteCall struct { 16693 s *Service 16694 advertiserId int64 16695 lineItemId int64 16696 urlParams_ gensupport.URLParams 16697 ctx_ context.Context 16698 header_ http.Header 16699} 16700 16701// Delete: Deletes a line item. 16702// Returns error code `NOT_FOUND` if the line item does not exist. 16703// The line item should be archived first, i.e. set 16704// entity_status to `ENTITY_STATUS_ARCHIVED`, to be 16705// able to delete it. 16706func (r *AdvertisersLineItemsService) Delete(advertiserId int64, lineItemId int64) *AdvertisersLineItemsDeleteCall { 16707 c := &AdvertisersLineItemsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16708 c.advertiserId = advertiserId 16709 c.lineItemId = lineItemId 16710 return c 16711} 16712 16713// Fields allows partial responses to be retrieved. See 16714// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16715// for more information. 16716func (c *AdvertisersLineItemsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsDeleteCall { 16717 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16718 return c 16719} 16720 16721// Context sets the context to be used in this call's Do method. Any 16722// pending HTTP request will be aborted if the provided context is 16723// canceled. 16724func (c *AdvertisersLineItemsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsDeleteCall { 16725 c.ctx_ = ctx 16726 return c 16727} 16728 16729// Header returns an http.Header that can be modified by the caller to 16730// add HTTP headers to the request. 16731func (c *AdvertisersLineItemsDeleteCall) Header() http.Header { 16732 if c.header_ == nil { 16733 c.header_ = make(http.Header) 16734 } 16735 return c.header_ 16736} 16737 16738func (c *AdvertisersLineItemsDeleteCall) doRequest(alt string) (*http.Response, error) { 16739 reqHeaders := make(http.Header) 16740 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16741 for k, v := range c.header_ { 16742 reqHeaders[k] = v 16743 } 16744 reqHeaders.Set("User-Agent", c.s.userAgent()) 16745 var body io.Reader = nil 16746 c.urlParams_.Set("alt", alt) 16747 c.urlParams_.Set("prettyPrint", "false") 16748 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}") 16749 urls += "?" + c.urlParams_.Encode() 16750 req, err := http.NewRequest("DELETE", urls, body) 16751 if err != nil { 16752 return nil, err 16753 } 16754 req.Header = reqHeaders 16755 googleapi.Expand(req.URL, map[string]string{ 16756 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16757 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 16758 }) 16759 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16760} 16761 16762// Do executes the "displayvideo.advertisers.lineItems.delete" call. 16763// Exactly one of *Empty or error will be non-nil. Any non-2xx status 16764// code is an error. Response headers are in either 16765// *Empty.ServerResponse.Header or (if a response was returned at all) 16766// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 16767// check whether the returned error was because http.StatusNotModified 16768// was returned. 16769func (c *AdvertisersLineItemsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 16770 gensupport.SetOptions(c.urlParams_, opts...) 16771 res, err := c.doRequest("json") 16772 if res != nil && res.StatusCode == http.StatusNotModified { 16773 if res.Body != nil { 16774 res.Body.Close() 16775 } 16776 return nil, &googleapi.Error{ 16777 Code: res.StatusCode, 16778 Header: res.Header, 16779 } 16780 } 16781 if err != nil { 16782 return nil, err 16783 } 16784 defer googleapi.CloseBody(res) 16785 if err := googleapi.CheckResponse(res); err != nil { 16786 return nil, err 16787 } 16788 ret := &Empty{ 16789 ServerResponse: googleapi.ServerResponse{ 16790 Header: res.Header, 16791 HTTPStatusCode: res.StatusCode, 16792 }, 16793 } 16794 target := &ret 16795 if err := gensupport.DecodeResponse(target, res); err != nil { 16796 return nil, err 16797 } 16798 return ret, nil 16799 // { 16800 // "description": "Deletes a line item.\nReturns error code `NOT_FOUND` if the line item does not exist.\nThe line item should be archived first, i.e. set\nentity_status to `ENTITY_STATUS_ARCHIVED`, to be\nable to delete it.", 16801 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", 16802 // "httpMethod": "DELETE", 16803 // "id": "displayvideo.advertisers.lineItems.delete", 16804 // "parameterOrder": [ 16805 // "advertiserId", 16806 // "lineItemId" 16807 // ], 16808 // "parameters": { 16809 // "advertiserId": { 16810 // "description": "The ID of the advertiser this line item belongs to.", 16811 // "format": "int64", 16812 // "location": "path", 16813 // "pattern": "^[^/]+$", 16814 // "required": true, 16815 // "type": "string" 16816 // }, 16817 // "lineItemId": { 16818 // "description": "The ID of the line item we need to fetch.", 16819 // "format": "int64", 16820 // "location": "path", 16821 // "pattern": "^[^/]+$", 16822 // "required": true, 16823 // "type": "string" 16824 // } 16825 // }, 16826 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}", 16827 // "response": { 16828 // "$ref": "Empty" 16829 // }, 16830 // "scopes": [ 16831 // "https://www.googleapis.com/auth/display-video" 16832 // ] 16833 // } 16834 16835} 16836 16837// method id "displayvideo.advertisers.lineItems.get": 16838 16839type AdvertisersLineItemsGetCall struct { 16840 s *Service 16841 advertiserId int64 16842 lineItemId int64 16843 urlParams_ gensupport.URLParams 16844 ifNoneMatch_ string 16845 ctx_ context.Context 16846 header_ http.Header 16847} 16848 16849// Get: Gets a line item. 16850func (r *AdvertisersLineItemsService) Get(advertiserId int64, lineItemId int64) *AdvertisersLineItemsGetCall { 16851 c := &AdvertisersLineItemsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 16852 c.advertiserId = advertiserId 16853 c.lineItemId = lineItemId 16854 return c 16855} 16856 16857// Fields allows partial responses to be retrieved. See 16858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 16859// for more information. 16860func (c *AdvertisersLineItemsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsGetCall { 16861 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 16862 return c 16863} 16864 16865// IfNoneMatch sets the optional parameter which makes the operation 16866// fail if the object's ETag matches the given value. This is useful for 16867// getting updates only after the object has changed since the last 16868// request. Use googleapi.IsNotModified to check whether the response 16869// error from Do is the result of In-None-Match. 16870func (c *AdvertisersLineItemsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsGetCall { 16871 c.ifNoneMatch_ = entityTag 16872 return c 16873} 16874 16875// Context sets the context to be used in this call's Do method. Any 16876// pending HTTP request will be aborted if the provided context is 16877// canceled. 16878func (c *AdvertisersLineItemsGetCall) Context(ctx context.Context) *AdvertisersLineItemsGetCall { 16879 c.ctx_ = ctx 16880 return c 16881} 16882 16883// Header returns an http.Header that can be modified by the caller to 16884// add HTTP headers to the request. 16885func (c *AdvertisersLineItemsGetCall) Header() http.Header { 16886 if c.header_ == nil { 16887 c.header_ = make(http.Header) 16888 } 16889 return c.header_ 16890} 16891 16892func (c *AdvertisersLineItemsGetCall) doRequest(alt string) (*http.Response, error) { 16893 reqHeaders := make(http.Header) 16894 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 16895 for k, v := range c.header_ { 16896 reqHeaders[k] = v 16897 } 16898 reqHeaders.Set("User-Agent", c.s.userAgent()) 16899 if c.ifNoneMatch_ != "" { 16900 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 16901 } 16902 var body io.Reader = nil 16903 c.urlParams_.Set("alt", alt) 16904 c.urlParams_.Set("prettyPrint", "false") 16905 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}") 16906 urls += "?" + c.urlParams_.Encode() 16907 req, err := http.NewRequest("GET", urls, body) 16908 if err != nil { 16909 return nil, err 16910 } 16911 req.Header = reqHeaders 16912 googleapi.Expand(req.URL, map[string]string{ 16913 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 16914 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 16915 }) 16916 return gensupport.SendRequest(c.ctx_, c.s.client, req) 16917} 16918 16919// Do executes the "displayvideo.advertisers.lineItems.get" call. 16920// Exactly one of *LineItem or error will be non-nil. Any non-2xx status 16921// code is an error. Response headers are in either 16922// *LineItem.ServerResponse.Header or (if a response was returned at 16923// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 16924// to check whether the returned error was because 16925// http.StatusNotModified was returned. 16926func (c *AdvertisersLineItemsGetCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 16927 gensupport.SetOptions(c.urlParams_, opts...) 16928 res, err := c.doRequest("json") 16929 if res != nil && res.StatusCode == http.StatusNotModified { 16930 if res.Body != nil { 16931 res.Body.Close() 16932 } 16933 return nil, &googleapi.Error{ 16934 Code: res.StatusCode, 16935 Header: res.Header, 16936 } 16937 } 16938 if err != nil { 16939 return nil, err 16940 } 16941 defer googleapi.CloseBody(res) 16942 if err := googleapi.CheckResponse(res); err != nil { 16943 return nil, err 16944 } 16945 ret := &LineItem{ 16946 ServerResponse: googleapi.ServerResponse{ 16947 Header: res.Header, 16948 HTTPStatusCode: res.StatusCode, 16949 }, 16950 } 16951 target := &ret 16952 if err := gensupport.DecodeResponse(target, res); err != nil { 16953 return nil, err 16954 } 16955 return ret, nil 16956 // { 16957 // "description": "Gets a line item.", 16958 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", 16959 // "httpMethod": "GET", 16960 // "id": "displayvideo.advertisers.lineItems.get", 16961 // "parameterOrder": [ 16962 // "advertiserId", 16963 // "lineItemId" 16964 // ], 16965 // "parameters": { 16966 // "advertiserId": { 16967 // "description": "Required. The ID of the advertiser this line item belongs to.", 16968 // "format": "int64", 16969 // "location": "path", 16970 // "pattern": "^[^/]+$", 16971 // "required": true, 16972 // "type": "string" 16973 // }, 16974 // "lineItemId": { 16975 // "description": "Required. The ID of the line item to fetch.", 16976 // "format": "int64", 16977 // "location": "path", 16978 // "pattern": "^[^/]+$", 16979 // "required": true, 16980 // "type": "string" 16981 // } 16982 // }, 16983 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}", 16984 // "response": { 16985 // "$ref": "LineItem" 16986 // }, 16987 // "scopes": [ 16988 // "https://www.googleapis.com/auth/display-video" 16989 // ] 16990 // } 16991 16992} 16993 16994// method id "displayvideo.advertisers.lineItems.list": 16995 16996type AdvertisersLineItemsListCall struct { 16997 s *Service 16998 advertiserId int64 16999 urlParams_ gensupport.URLParams 17000 ifNoneMatch_ string 17001 ctx_ context.Context 17002 header_ http.Header 17003} 17004 17005// List: Lists line items in an advertiser. 17006// 17007// The order is defined by the order_by 17008// parameter. 17009// If a filter by 17010// entity_status is not specified, line items 17011// with 17012// `ENTITY_STATUS_ARCHIVED` will not be included in the results. 17013func (r *AdvertisersLineItemsService) List(advertiserId int64) *AdvertisersLineItemsListCall { 17014 c := &AdvertisersLineItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17015 c.advertiserId = advertiserId 17016 return c 17017} 17018 17019// Filter sets the optional parameter "filter": Allows filtering by line 17020// item properties. 17021// 17022// Supported syntax: 17023// 17024// * Filter expressions are made up of one or more restrictions. 17025// * Restrictions can be combined by `AND` or `OR` logical operators. 17026// A 17027// sequence of restrictions implicitly uses `AND`. 17028// * A restriction has the form of `{field} {operator} {value}`. 17029// * The operator must be `EQUALS (=)`. 17030// * Supported fields: 17031// - `campaignId` 17032// - `insertionOrderId` 17033// - `entityStatus` 17034// - `lineItemType`. 17035// 17036// Examples: 17037// 17038// * All line items under an insertion order: 17039// `insertionOrderId="1234" 17040// * All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED` 17041// and `LINE_ITEM_TYPE_DISPLAY_DEFAULT` line items under an 17042// advertiser: 17043// `(entityStatus="ENTITY_STATUS_ACTIVE" 17044// OR 17045// entityStatus="ENTITY_STATUS_PAUSED") 17046// AND 17047// lineItemType="LINE_ITEM_TYPE_DISPLAY_DEFAULT" 17048// 17049// The length of this field should be no more than 500 characters. 17050func (c *AdvertisersLineItemsListCall) Filter(filter string) *AdvertisersLineItemsListCall { 17051 c.urlParams_.Set("filter", filter) 17052 return c 17053} 17054 17055// OrderBy sets the optional parameter "orderBy": Field by which to sort 17056// the list. 17057// Acceptable values are: 17058// 17059// * "displayName" (default) 17060// * "entityStatus" 17061// 17062// The default sorting order is ascending. To specify descending order 17063// for 17064// a field, a suffix "desc" should be added to the field name. 17065// Example: 17066// `displayName desc`. 17067func (c *AdvertisersLineItemsListCall) OrderBy(orderBy string) *AdvertisersLineItemsListCall { 17068 c.urlParams_.Set("orderBy", orderBy) 17069 return c 17070} 17071 17072// PageSize sets the optional parameter "pageSize": Requested page size. 17073// Must be between `1` and `100`. If unspecified will 17074// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 17075// value 17076// is specified. 17077func (c *AdvertisersLineItemsListCall) PageSize(pageSize int64) *AdvertisersLineItemsListCall { 17078 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 17079 return c 17080} 17081 17082// PageToken sets the optional parameter "pageToken": A token 17083// identifying a page of results the server should return. 17084// Typically, this is the value of 17085// next_page_token 17086// returned from the previous call to `ListLineItems` method. 17087// If not specified, the first page of results will be returned. 17088func (c *AdvertisersLineItemsListCall) PageToken(pageToken string) *AdvertisersLineItemsListCall { 17089 c.urlParams_.Set("pageToken", pageToken) 17090 return c 17091} 17092 17093// Fields allows partial responses to be retrieved. See 17094// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17095// for more information. 17096func (c *AdvertisersLineItemsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsListCall { 17097 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17098 return c 17099} 17100 17101// IfNoneMatch sets the optional parameter which makes the operation 17102// fail if the object's ETag matches the given value. This is useful for 17103// getting updates only after the object has changed since the last 17104// request. Use googleapi.IsNotModified to check whether the response 17105// error from Do is the result of In-None-Match. 17106func (c *AdvertisersLineItemsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsListCall { 17107 c.ifNoneMatch_ = entityTag 17108 return c 17109} 17110 17111// Context sets the context to be used in this call's Do method. Any 17112// pending HTTP request will be aborted if the provided context is 17113// canceled. 17114func (c *AdvertisersLineItemsListCall) Context(ctx context.Context) *AdvertisersLineItemsListCall { 17115 c.ctx_ = ctx 17116 return c 17117} 17118 17119// Header returns an http.Header that can be modified by the caller to 17120// add HTTP headers to the request. 17121func (c *AdvertisersLineItemsListCall) Header() http.Header { 17122 if c.header_ == nil { 17123 c.header_ = make(http.Header) 17124 } 17125 return c.header_ 17126} 17127 17128func (c *AdvertisersLineItemsListCall) doRequest(alt string) (*http.Response, error) { 17129 reqHeaders := make(http.Header) 17130 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17131 for k, v := range c.header_ { 17132 reqHeaders[k] = v 17133 } 17134 reqHeaders.Set("User-Agent", c.s.userAgent()) 17135 if c.ifNoneMatch_ != "" { 17136 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17137 } 17138 var body io.Reader = nil 17139 c.urlParams_.Set("alt", alt) 17140 c.urlParams_.Set("prettyPrint", "false") 17141 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems") 17142 urls += "?" + c.urlParams_.Encode() 17143 req, err := http.NewRequest("GET", urls, body) 17144 if err != nil { 17145 return nil, err 17146 } 17147 req.Header = reqHeaders 17148 googleapi.Expand(req.URL, map[string]string{ 17149 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17150 }) 17151 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17152} 17153 17154// Do executes the "displayvideo.advertisers.lineItems.list" call. 17155// Exactly one of *ListLineItemsResponse or error will be non-nil. Any 17156// non-2xx status code is an error. Response headers are in either 17157// *ListLineItemsResponse.ServerResponse.Header or (if a response was 17158// returned at all) in error.(*googleapi.Error).Header. Use 17159// googleapi.IsNotModified to check whether the returned error was 17160// because http.StatusNotModified was returned. 17161func (c *AdvertisersLineItemsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemsResponse, error) { 17162 gensupport.SetOptions(c.urlParams_, opts...) 17163 res, err := c.doRequest("json") 17164 if res != nil && res.StatusCode == http.StatusNotModified { 17165 if res.Body != nil { 17166 res.Body.Close() 17167 } 17168 return nil, &googleapi.Error{ 17169 Code: res.StatusCode, 17170 Header: res.Header, 17171 } 17172 } 17173 if err != nil { 17174 return nil, err 17175 } 17176 defer googleapi.CloseBody(res) 17177 if err := googleapi.CheckResponse(res); err != nil { 17178 return nil, err 17179 } 17180 ret := &ListLineItemsResponse{ 17181 ServerResponse: googleapi.ServerResponse{ 17182 Header: res.Header, 17183 HTTPStatusCode: res.StatusCode, 17184 }, 17185 } 17186 target := &ret 17187 if err := gensupport.DecodeResponse(target, res); err != nil { 17188 return nil, err 17189 } 17190 return ret, nil 17191 // { 17192 // "description": "Lists line items in an advertiser.\n\nThe order is defined by the order_by\nparameter.\nIf a filter by\nentity_status is not specified, line items with\n`ENTITY_STATUS_ARCHIVED` will not be included in the results.", 17193 // "flatPath": "v1/advertisers/{advertisersId}/lineItems", 17194 // "httpMethod": "GET", 17195 // "id": "displayvideo.advertisers.lineItems.list", 17196 // "parameterOrder": [ 17197 // "advertiserId" 17198 // ], 17199 // "parameters": { 17200 // "advertiserId": { 17201 // "description": "Required. The ID of the advertiser to list line items for.", 17202 // "format": "int64", 17203 // "location": "path", 17204 // "pattern": "^[^/]+$", 17205 // "required": true, 17206 // "type": "string" 17207 // }, 17208 // "filter": { 17209 // "description": "Allows filtering by line item properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `campaignId`\n - `insertionOrderId`\n - `entityStatus`\n - `lineItemType`.\n\nExamples:\n\n* All line items under an insertion order: `insertionOrderId=\"1234\"`\n* All `ENTITY_STATUS_ACTIVE` or `ENTITY_STATUS_PAUSED`\nand `LINE_ITEM_TYPE_DISPLAY_DEFAULT` line items under an advertiser:\n`(entityStatus=\"ENTITY_STATUS_ACTIVE\" OR\nentityStatus=\"ENTITY_STATUS_PAUSED\") AND\nlineItemType=\"LINE_ITEM_TYPE_DISPLAY_DEFAULT\"`\n\nThe length of this field should be no more than 500 characters.", 17210 // "location": "query", 17211 // "type": "string" 17212 // }, 17213 // "orderBy": { 17214 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* \"displayName\" (default)\n* \"entityStatus\"\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 17215 // "location": "query", 17216 // "type": "string" 17217 // }, 17218 // "pageSize": { 17219 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 17220 // "format": "int32", 17221 // "location": "query", 17222 // "type": "integer" 17223 // }, 17224 // "pageToken": { 17225 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListLineItems` method.\nIf not specified, the first page of results will be returned.", 17226 // "location": "query", 17227 // "type": "string" 17228 // } 17229 // }, 17230 // "path": "v1/advertisers/{+advertiserId}/lineItems", 17231 // "response": { 17232 // "$ref": "ListLineItemsResponse" 17233 // }, 17234 // "scopes": [ 17235 // "https://www.googleapis.com/auth/display-video" 17236 // ] 17237 // } 17238 17239} 17240 17241// Pages invokes f for each page of results. 17242// A non-nil error returned from f will halt the iteration. 17243// The provided context supersedes any context provided to the Context method. 17244func (c *AdvertisersLineItemsListCall) Pages(ctx context.Context, f func(*ListLineItemsResponse) error) error { 17245 c.ctx_ = ctx 17246 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 17247 for { 17248 x, err := c.Do() 17249 if err != nil { 17250 return err 17251 } 17252 if err := f(x); err != nil { 17253 return err 17254 } 17255 if x.NextPageToken == "" { 17256 return nil 17257 } 17258 c.PageToken(x.NextPageToken) 17259 } 17260} 17261 17262// method id "displayvideo.advertisers.lineItems.patch": 17263 17264type AdvertisersLineItemsPatchCall struct { 17265 s *Service 17266 advertiserId int64 17267 lineItemId int64 17268 lineitem *LineItem 17269 urlParams_ gensupport.URLParams 17270 ctx_ context.Context 17271 header_ http.Header 17272} 17273 17274// Patch: Updates an existing line item. 17275// Returns the updated line item if successful. 17276func (r *AdvertisersLineItemsService) Patch(advertiserId int64, lineItemId int64, lineitem *LineItem) *AdvertisersLineItemsPatchCall { 17277 c := &AdvertisersLineItemsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17278 c.advertiserId = advertiserId 17279 c.lineItemId = lineItemId 17280 c.lineitem = lineitem 17281 return c 17282} 17283 17284// UpdateMask sets the optional parameter "updateMask": Required. The 17285// mask to control which fields to update. 17286func (c *AdvertisersLineItemsPatchCall) UpdateMask(updateMask string) *AdvertisersLineItemsPatchCall { 17287 c.urlParams_.Set("updateMask", updateMask) 17288 return c 17289} 17290 17291// Fields allows partial responses to be retrieved. See 17292// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17293// for more information. 17294func (c *AdvertisersLineItemsPatchCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsPatchCall { 17295 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17296 return c 17297} 17298 17299// Context sets the context to be used in this call's Do method. Any 17300// pending HTTP request will be aborted if the provided context is 17301// canceled. 17302func (c *AdvertisersLineItemsPatchCall) Context(ctx context.Context) *AdvertisersLineItemsPatchCall { 17303 c.ctx_ = ctx 17304 return c 17305} 17306 17307// Header returns an http.Header that can be modified by the caller to 17308// add HTTP headers to the request. 17309func (c *AdvertisersLineItemsPatchCall) Header() http.Header { 17310 if c.header_ == nil { 17311 c.header_ = make(http.Header) 17312 } 17313 return c.header_ 17314} 17315 17316func (c *AdvertisersLineItemsPatchCall) doRequest(alt string) (*http.Response, error) { 17317 reqHeaders := make(http.Header) 17318 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17319 for k, v := range c.header_ { 17320 reqHeaders[k] = v 17321 } 17322 reqHeaders.Set("User-Agent", c.s.userAgent()) 17323 var body io.Reader = nil 17324 body, err := googleapi.WithoutDataWrapper.JSONReader(c.lineitem) 17325 if err != nil { 17326 return nil, err 17327 } 17328 reqHeaders.Set("Content-Type", "application/json") 17329 c.urlParams_.Set("alt", alt) 17330 c.urlParams_.Set("prettyPrint", "false") 17331 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}") 17332 urls += "?" + c.urlParams_.Encode() 17333 req, err := http.NewRequest("PATCH", urls, body) 17334 if err != nil { 17335 return nil, err 17336 } 17337 req.Header = reqHeaders 17338 googleapi.Expand(req.URL, map[string]string{ 17339 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17340 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 17341 }) 17342 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17343} 17344 17345// Do executes the "displayvideo.advertisers.lineItems.patch" call. 17346// Exactly one of *LineItem or error will be non-nil. Any non-2xx status 17347// code is an error. Response headers are in either 17348// *LineItem.ServerResponse.Header or (if a response was returned at 17349// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 17350// to check whether the returned error was because 17351// http.StatusNotModified was returned. 17352func (c *AdvertisersLineItemsPatchCall) Do(opts ...googleapi.CallOption) (*LineItem, error) { 17353 gensupport.SetOptions(c.urlParams_, opts...) 17354 res, err := c.doRequest("json") 17355 if res != nil && res.StatusCode == http.StatusNotModified { 17356 if res.Body != nil { 17357 res.Body.Close() 17358 } 17359 return nil, &googleapi.Error{ 17360 Code: res.StatusCode, 17361 Header: res.Header, 17362 } 17363 } 17364 if err != nil { 17365 return nil, err 17366 } 17367 defer googleapi.CloseBody(res) 17368 if err := googleapi.CheckResponse(res); err != nil { 17369 return nil, err 17370 } 17371 ret := &LineItem{ 17372 ServerResponse: googleapi.ServerResponse{ 17373 Header: res.Header, 17374 HTTPStatusCode: res.StatusCode, 17375 }, 17376 } 17377 target := &ret 17378 if err := gensupport.DecodeResponse(target, res); err != nil { 17379 return nil, err 17380 } 17381 return ret, nil 17382 // { 17383 // "description": "Updates an existing line item.\nReturns the updated line item if successful.", 17384 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}", 17385 // "httpMethod": "PATCH", 17386 // "id": "displayvideo.advertisers.lineItems.patch", 17387 // "parameterOrder": [ 17388 // "advertiserId", 17389 // "lineItemId" 17390 // ], 17391 // "parameters": { 17392 // "advertiserId": { 17393 // "description": "Output only. The unique ID of the advertiser the line item belongs to.", 17394 // "format": "int64", 17395 // "location": "path", 17396 // "pattern": "^[^/]+$", 17397 // "required": true, 17398 // "type": "string" 17399 // }, 17400 // "lineItemId": { 17401 // "description": "Output only. The unique ID of the line item. Assigned by the system.", 17402 // "format": "int64", 17403 // "location": "path", 17404 // "pattern": "^[^/]+$", 17405 // "required": true, 17406 // "type": "string" 17407 // }, 17408 // "updateMask": { 17409 // "description": "Required. The mask to control which fields to update.", 17410 // "format": "google-fieldmask", 17411 // "location": "query", 17412 // "type": "string" 17413 // } 17414 // }, 17415 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}", 17416 // "request": { 17417 // "$ref": "LineItem" 17418 // }, 17419 // "response": { 17420 // "$ref": "LineItem" 17421 // }, 17422 // "scopes": [ 17423 // "https://www.googleapis.com/auth/display-video" 17424 // ] 17425 // } 17426 17427} 17428 17429// method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create": 17430 17431type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall struct { 17432 s *Service 17433 advertiserId int64 17434 lineItemId int64 17435 targetingType string 17436 assignedtargetingoption *AssignedTargetingOption 17437 urlParams_ gensupport.URLParams 17438 ctx_ context.Context 17439 header_ http.Header 17440} 17441 17442// Create: Assigns a targeting option to a line item. 17443// Returns the assigned targeting option if successful. 17444func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Create(advertiserId int64, lineItemId int64, targetingType string, assignedtargetingoption *AssignedTargetingOption) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall { 17445 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17446 c.advertiserId = advertiserId 17447 c.lineItemId = lineItemId 17448 c.targetingType = targetingType 17449 c.assignedtargetingoption = assignedtargetingoption 17450 return c 17451} 17452 17453// Fields allows partial responses to be retrieved. See 17454// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17455// for more information. 17456func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall { 17457 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17458 return c 17459} 17460 17461// Context sets the context to be used in this call's Do method. Any 17462// pending HTTP request will be aborted if the provided context is 17463// canceled. 17464func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall { 17465 c.ctx_ = ctx 17466 return c 17467} 17468 17469// Header returns an http.Header that can be modified by the caller to 17470// add HTTP headers to the request. 17471func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Header() http.Header { 17472 if c.header_ == nil { 17473 c.header_ = make(http.Header) 17474 } 17475 return c.header_ 17476} 17477 17478func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) doRequest(alt string) (*http.Response, error) { 17479 reqHeaders := make(http.Header) 17480 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17481 for k, v := range c.header_ { 17482 reqHeaders[k] = v 17483 } 17484 reqHeaders.Set("User-Agent", c.s.userAgent()) 17485 var body io.Reader = nil 17486 body, err := googleapi.WithoutDataWrapper.JSONReader(c.assignedtargetingoption) 17487 if err != nil { 17488 return nil, err 17489 } 17490 reqHeaders.Set("Content-Type", "application/json") 17491 c.urlParams_.Set("alt", alt) 17492 c.urlParams_.Set("prettyPrint", "false") 17493 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 17494 urls += "?" + c.urlParams_.Encode() 17495 req, err := http.NewRequest("POST", urls, body) 17496 if err != nil { 17497 return nil, err 17498 } 17499 req.Header = reqHeaders 17500 googleapi.Expand(req.URL, map[string]string{ 17501 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17502 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 17503 "targetingType": c.targetingType, 17504 }) 17505 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17506} 17507 17508// Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create" call. 17509// Exactly one of *AssignedTargetingOption or error will be non-nil. Any 17510// non-2xx status code is an error. Response headers are in either 17511// *AssignedTargetingOption.ServerResponse.Header or (if a response was 17512// returned at all) in error.(*googleapi.Error).Header. Use 17513// googleapi.IsNotModified to check whether the returned error was 17514// because http.StatusNotModified was returned. 17515func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsCreateCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 17516 gensupport.SetOptions(c.urlParams_, opts...) 17517 res, err := c.doRequest("json") 17518 if res != nil && res.StatusCode == http.StatusNotModified { 17519 if res.Body != nil { 17520 res.Body.Close() 17521 } 17522 return nil, &googleapi.Error{ 17523 Code: res.StatusCode, 17524 Header: res.Header, 17525 } 17526 } 17527 if err != nil { 17528 return nil, err 17529 } 17530 defer googleapi.CloseBody(res) 17531 if err := googleapi.CheckResponse(res); err != nil { 17532 return nil, err 17533 } 17534 ret := &AssignedTargetingOption{ 17535 ServerResponse: googleapi.ServerResponse{ 17536 Header: res.Header, 17537 HTTPStatusCode: res.StatusCode, 17538 }, 17539 } 17540 target := &ret 17541 if err := gensupport.DecodeResponse(target, res); err != nil { 17542 return nil, err 17543 } 17544 return ret, nil 17545 // { 17546 // "description": "Assigns a targeting option to a line item.\nReturns the assigned targeting option if successful.", 17547 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 17548 // "httpMethod": "POST", 17549 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.create", 17550 // "parameterOrder": [ 17551 // "advertiserId", 17552 // "lineItemId", 17553 // "targetingType" 17554 // ], 17555 // "parameters": { 17556 // "advertiserId": { 17557 // "description": "Required. The ID of the advertiser the line item belongs to.", 17558 // "format": "int64", 17559 // "location": "path", 17560 // "pattern": "^[^/]+$", 17561 // "required": true, 17562 // "type": "string" 17563 // }, 17564 // "lineItemId": { 17565 // "description": "Required. The ID of the line item the assigned targeting option will belong to.", 17566 // "format": "int64", 17567 // "location": "path", 17568 // "pattern": "^[^/]+$", 17569 // "required": true, 17570 // "type": "string" 17571 // }, 17572 // "targetingType": { 17573 // "description": "Required. Identifies the type of this assigned targeting option.", 17574 // "enum": [ 17575 // "TARGETING_TYPE_UNSPECIFIED", 17576 // "TARGETING_TYPE_CHANNEL", 17577 // "TARGETING_TYPE_APP_CATEGORY", 17578 // "TARGETING_TYPE_APP", 17579 // "TARGETING_TYPE_URL", 17580 // "TARGETING_TYPE_DAY_AND_TIME", 17581 // "TARGETING_TYPE_AGE_RANGE", 17582 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 17583 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 17584 // "TARGETING_TYPE_GENDER", 17585 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 17586 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 17587 // "TARGETING_TYPE_PARENTAL_STATUS", 17588 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 17589 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 17590 // "TARGETING_TYPE_DEVICE_TYPE", 17591 // "TARGETING_TYPE_AUDIENCE_GROUP", 17592 // "TARGETING_TYPE_BROWSER", 17593 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 17594 // "TARGETING_TYPE_ON_SCREEN_POSITION", 17595 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 17596 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 17597 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 17598 // "TARGETING_TYPE_ENVIRONMENT", 17599 // "TARGETING_TYPE_CARRIER_AND_ISP", 17600 // "TARGETING_TYPE_OPERATING_SYSTEM", 17601 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 17602 // "TARGETING_TYPE_KEYWORD", 17603 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 17604 // "TARGETING_TYPE_VIEWABILITY", 17605 // "TARGETING_TYPE_CATEGORY", 17606 // "TARGETING_TYPE_INVENTORY_SOURCE", 17607 // "TARGETING_TYPE_LANGUAGE", 17608 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 17609 // "TARGETING_TYPE_GEO_REGION", 17610 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 17611 // "TARGETING_TYPE_PROXIMITY_LOCATION", 17612 // "TARGETING_TYPE_EXCHANGE", 17613 // "TARGETING_TYPE_SUB_EXCHANGE" 17614 // ], 17615 // "location": "path", 17616 // "pattern": "^[^/]+$", 17617 // "required": true, 17618 // "type": "string" 17619 // } 17620 // }, 17621 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 17622 // "request": { 17623 // "$ref": "AssignedTargetingOption" 17624 // }, 17625 // "response": { 17626 // "$ref": "AssignedTargetingOption" 17627 // }, 17628 // "scopes": [ 17629 // "https://www.googleapis.com/auth/display-video" 17630 // ] 17631 // } 17632 17633} 17634 17635// method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete": 17636 17637type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall struct { 17638 s *Service 17639 advertiserId int64 17640 lineItemId int64 17641 targetingType string 17642 assignedTargetingOptionId string 17643 urlParams_ gensupport.URLParams 17644 ctx_ context.Context 17645 header_ http.Header 17646} 17647 17648// Delete: Deletes an assigned targeting option from a line item. 17649func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Delete(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall { 17650 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17651 c.advertiserId = advertiserId 17652 c.lineItemId = lineItemId 17653 c.targetingType = targetingType 17654 c.assignedTargetingOptionId = assignedTargetingOptionId 17655 return c 17656} 17657 17658// Fields allows partial responses to be retrieved. See 17659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17660// for more information. 17661func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall { 17662 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17663 return c 17664} 17665 17666// Context sets the context to be used in this call's Do method. Any 17667// pending HTTP request will be aborted if the provided context is 17668// canceled. 17669func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall { 17670 c.ctx_ = ctx 17671 return c 17672} 17673 17674// Header returns an http.Header that can be modified by the caller to 17675// add HTTP headers to the request. 17676func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Header() http.Header { 17677 if c.header_ == nil { 17678 c.header_ = make(http.Header) 17679 } 17680 return c.header_ 17681} 17682 17683func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) doRequest(alt string) (*http.Response, error) { 17684 reqHeaders := make(http.Header) 17685 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17686 for k, v := range c.header_ { 17687 reqHeaders[k] = v 17688 } 17689 reqHeaders.Set("User-Agent", c.s.userAgent()) 17690 var body io.Reader = nil 17691 c.urlParams_.Set("alt", alt) 17692 c.urlParams_.Set("prettyPrint", "false") 17693 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 17694 urls += "?" + c.urlParams_.Encode() 17695 req, err := http.NewRequest("DELETE", urls, body) 17696 if err != nil { 17697 return nil, err 17698 } 17699 req.Header = reqHeaders 17700 googleapi.Expand(req.URL, map[string]string{ 17701 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17702 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 17703 "targetingType": c.targetingType, 17704 "assignedTargetingOptionId": c.assignedTargetingOptionId, 17705 }) 17706 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17707} 17708 17709// Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete" call. 17710// Exactly one of *Empty or error will be non-nil. Any non-2xx status 17711// code is an error. Response headers are in either 17712// *Empty.ServerResponse.Header or (if a response was returned at all) 17713// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 17714// check whether the returned error was because http.StatusNotModified 17715// was returned. 17716func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 17717 gensupport.SetOptions(c.urlParams_, opts...) 17718 res, err := c.doRequest("json") 17719 if res != nil && res.StatusCode == http.StatusNotModified { 17720 if res.Body != nil { 17721 res.Body.Close() 17722 } 17723 return nil, &googleapi.Error{ 17724 Code: res.StatusCode, 17725 Header: res.Header, 17726 } 17727 } 17728 if err != nil { 17729 return nil, err 17730 } 17731 defer googleapi.CloseBody(res) 17732 if err := googleapi.CheckResponse(res); err != nil { 17733 return nil, err 17734 } 17735 ret := &Empty{ 17736 ServerResponse: googleapi.ServerResponse{ 17737 Header: res.Header, 17738 HTTPStatusCode: res.StatusCode, 17739 }, 17740 } 17741 target := &ret 17742 if err := gensupport.DecodeResponse(target, res); err != nil { 17743 return nil, err 17744 } 17745 return ret, nil 17746 // { 17747 // "description": "Deletes an assigned targeting option from a line item.", 17748 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 17749 // "httpMethod": "DELETE", 17750 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.delete", 17751 // "parameterOrder": [ 17752 // "advertiserId", 17753 // "lineItemId", 17754 // "targetingType", 17755 // "assignedTargetingOptionId" 17756 // ], 17757 // "parameters": { 17758 // "advertiserId": { 17759 // "description": "Required. The ID of the advertiser the line item belongs to.", 17760 // "format": "int64", 17761 // "location": "path", 17762 // "pattern": "^[^/]+$", 17763 // "required": true, 17764 // "type": "string" 17765 // }, 17766 // "assignedTargetingOptionId": { 17767 // "description": "Required. The ID of the assigned targeting option to delete.", 17768 // "location": "path", 17769 // "pattern": "^[^/]+$", 17770 // "required": true, 17771 // "type": "string" 17772 // }, 17773 // "lineItemId": { 17774 // "description": "Required. The ID of the line item the assigned targeting option belongs to.", 17775 // "format": "int64", 17776 // "location": "path", 17777 // "pattern": "^[^/]+$", 17778 // "required": true, 17779 // "type": "string" 17780 // }, 17781 // "targetingType": { 17782 // "description": "Required. Identifies the type of this assigned targeting option.", 17783 // "enum": [ 17784 // "TARGETING_TYPE_UNSPECIFIED", 17785 // "TARGETING_TYPE_CHANNEL", 17786 // "TARGETING_TYPE_APP_CATEGORY", 17787 // "TARGETING_TYPE_APP", 17788 // "TARGETING_TYPE_URL", 17789 // "TARGETING_TYPE_DAY_AND_TIME", 17790 // "TARGETING_TYPE_AGE_RANGE", 17791 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 17792 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 17793 // "TARGETING_TYPE_GENDER", 17794 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 17795 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 17796 // "TARGETING_TYPE_PARENTAL_STATUS", 17797 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 17798 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 17799 // "TARGETING_TYPE_DEVICE_TYPE", 17800 // "TARGETING_TYPE_AUDIENCE_GROUP", 17801 // "TARGETING_TYPE_BROWSER", 17802 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 17803 // "TARGETING_TYPE_ON_SCREEN_POSITION", 17804 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 17805 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 17806 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 17807 // "TARGETING_TYPE_ENVIRONMENT", 17808 // "TARGETING_TYPE_CARRIER_AND_ISP", 17809 // "TARGETING_TYPE_OPERATING_SYSTEM", 17810 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 17811 // "TARGETING_TYPE_KEYWORD", 17812 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 17813 // "TARGETING_TYPE_VIEWABILITY", 17814 // "TARGETING_TYPE_CATEGORY", 17815 // "TARGETING_TYPE_INVENTORY_SOURCE", 17816 // "TARGETING_TYPE_LANGUAGE", 17817 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 17818 // "TARGETING_TYPE_GEO_REGION", 17819 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 17820 // "TARGETING_TYPE_PROXIMITY_LOCATION", 17821 // "TARGETING_TYPE_EXCHANGE", 17822 // "TARGETING_TYPE_SUB_EXCHANGE" 17823 // ], 17824 // "location": "path", 17825 // "pattern": "^[^/]+$", 17826 // "required": true, 17827 // "type": "string" 17828 // } 17829 // }, 17830 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 17831 // "response": { 17832 // "$ref": "Empty" 17833 // }, 17834 // "scopes": [ 17835 // "https://www.googleapis.com/auth/display-video" 17836 // ] 17837 // } 17838 17839} 17840 17841// method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.get": 17842 17843type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall struct { 17844 s *Service 17845 advertiserId int64 17846 lineItemId int64 17847 targetingType string 17848 assignedTargetingOptionId string 17849 urlParams_ gensupport.URLParams 17850 ifNoneMatch_ string 17851 ctx_ context.Context 17852 header_ http.Header 17853} 17854 17855// Get: Gets a single targeting option assigned to a line item. 17856func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) Get(advertiserId int64, lineItemId int64, targetingType string, assignedTargetingOptionId string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 17857 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 17858 c.advertiserId = advertiserId 17859 c.lineItemId = lineItemId 17860 c.targetingType = targetingType 17861 c.assignedTargetingOptionId = assignedTargetingOptionId 17862 return c 17863} 17864 17865// Fields allows partial responses to be retrieved. See 17866// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 17867// for more information. 17868func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 17869 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 17870 return c 17871} 17872 17873// IfNoneMatch sets the optional parameter which makes the operation 17874// fail if the object's ETag matches the given value. This is useful for 17875// getting updates only after the object has changed since the last 17876// request. Use googleapi.IsNotModified to check whether the response 17877// error from Do is the result of In-None-Match. 17878func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 17879 c.ifNoneMatch_ = entityTag 17880 return c 17881} 17882 17883// Context sets the context to be used in this call's Do method. Any 17884// pending HTTP request will be aborted if the provided context is 17885// canceled. 17886func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall { 17887 c.ctx_ = ctx 17888 return c 17889} 17890 17891// Header returns an http.Header that can be modified by the caller to 17892// add HTTP headers to the request. 17893func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Header() http.Header { 17894 if c.header_ == nil { 17895 c.header_ = make(http.Header) 17896 } 17897 return c.header_ 17898} 17899 17900func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 17901 reqHeaders := make(http.Header) 17902 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 17903 for k, v := range c.header_ { 17904 reqHeaders[k] = v 17905 } 17906 reqHeaders.Set("User-Agent", c.s.userAgent()) 17907 if c.ifNoneMatch_ != "" { 17908 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 17909 } 17910 var body io.Reader = nil 17911 c.urlParams_.Set("alt", alt) 17912 c.urlParams_.Set("prettyPrint", "false") 17913 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}") 17914 urls += "?" + c.urlParams_.Encode() 17915 req, err := http.NewRequest("GET", urls, body) 17916 if err != nil { 17917 return nil, err 17918 } 17919 req.Header = reqHeaders 17920 googleapi.Expand(req.URL, map[string]string{ 17921 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 17922 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 17923 "targetingType": c.targetingType, 17924 "assignedTargetingOptionId": c.assignedTargetingOptionId, 17925 }) 17926 return gensupport.SendRequest(c.ctx_, c.s.client, req) 17927} 17928 17929// Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.get" call. 17930// Exactly one of *AssignedTargetingOption or error will be non-nil. Any 17931// non-2xx status code is an error. Response headers are in either 17932// *AssignedTargetingOption.ServerResponse.Header or (if a response was 17933// returned at all) in error.(*googleapi.Error).Header. Use 17934// googleapi.IsNotModified to check whether the returned error was 17935// because http.StatusNotModified was returned. 17936func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*AssignedTargetingOption, error) { 17937 gensupport.SetOptions(c.urlParams_, opts...) 17938 res, err := c.doRequest("json") 17939 if res != nil && res.StatusCode == http.StatusNotModified { 17940 if res.Body != nil { 17941 res.Body.Close() 17942 } 17943 return nil, &googleapi.Error{ 17944 Code: res.StatusCode, 17945 Header: res.Header, 17946 } 17947 } 17948 if err != nil { 17949 return nil, err 17950 } 17951 defer googleapi.CloseBody(res) 17952 if err := googleapi.CheckResponse(res); err != nil { 17953 return nil, err 17954 } 17955 ret := &AssignedTargetingOption{ 17956 ServerResponse: googleapi.ServerResponse{ 17957 Header: res.Header, 17958 HTTPStatusCode: res.StatusCode, 17959 }, 17960 } 17961 target := &ret 17962 if err := gensupport.DecodeResponse(target, res); err != nil { 17963 return nil, err 17964 } 17965 return ret, nil 17966 // { 17967 // "description": "Gets a single targeting option assigned to a line item.", 17968 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions/{assignedTargetingOptionsId}", 17969 // "httpMethod": "GET", 17970 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.get", 17971 // "parameterOrder": [ 17972 // "advertiserId", 17973 // "lineItemId", 17974 // "targetingType", 17975 // "assignedTargetingOptionId" 17976 // ], 17977 // "parameters": { 17978 // "advertiserId": { 17979 // "description": "Required. The ID of the advertiser the line item belongs to.", 17980 // "format": "int64", 17981 // "location": "path", 17982 // "pattern": "^[^/]+$", 17983 // "required": true, 17984 // "type": "string" 17985 // }, 17986 // "assignedTargetingOptionId": { 17987 // "description": "Required. An identifier unique to the targeting type in this line item that\nidentifies the assigned targeting option being requested.", 17988 // "location": "path", 17989 // "pattern": "^[^/]+$", 17990 // "required": true, 17991 // "type": "string" 17992 // }, 17993 // "lineItemId": { 17994 // "description": "Required. The ID of the line item the assigned targeting option belongs to.", 17995 // "format": "int64", 17996 // "location": "path", 17997 // "pattern": "^[^/]+$", 17998 // "required": true, 17999 // "type": "string" 18000 // }, 18001 // "targetingType": { 18002 // "description": "Required. Identifies the type of this assigned targeting option.", 18003 // "enum": [ 18004 // "TARGETING_TYPE_UNSPECIFIED", 18005 // "TARGETING_TYPE_CHANNEL", 18006 // "TARGETING_TYPE_APP_CATEGORY", 18007 // "TARGETING_TYPE_APP", 18008 // "TARGETING_TYPE_URL", 18009 // "TARGETING_TYPE_DAY_AND_TIME", 18010 // "TARGETING_TYPE_AGE_RANGE", 18011 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 18012 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 18013 // "TARGETING_TYPE_GENDER", 18014 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 18015 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 18016 // "TARGETING_TYPE_PARENTAL_STATUS", 18017 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 18018 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 18019 // "TARGETING_TYPE_DEVICE_TYPE", 18020 // "TARGETING_TYPE_AUDIENCE_GROUP", 18021 // "TARGETING_TYPE_BROWSER", 18022 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 18023 // "TARGETING_TYPE_ON_SCREEN_POSITION", 18024 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 18025 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 18026 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 18027 // "TARGETING_TYPE_ENVIRONMENT", 18028 // "TARGETING_TYPE_CARRIER_AND_ISP", 18029 // "TARGETING_TYPE_OPERATING_SYSTEM", 18030 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 18031 // "TARGETING_TYPE_KEYWORD", 18032 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 18033 // "TARGETING_TYPE_VIEWABILITY", 18034 // "TARGETING_TYPE_CATEGORY", 18035 // "TARGETING_TYPE_INVENTORY_SOURCE", 18036 // "TARGETING_TYPE_LANGUAGE", 18037 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 18038 // "TARGETING_TYPE_GEO_REGION", 18039 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 18040 // "TARGETING_TYPE_PROXIMITY_LOCATION", 18041 // "TARGETING_TYPE_EXCHANGE", 18042 // "TARGETING_TYPE_SUB_EXCHANGE" 18043 // ], 18044 // "location": "path", 18045 // "pattern": "^[^/]+$", 18046 // "required": true, 18047 // "type": "string" 18048 // } 18049 // }, 18050 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions/{+assignedTargetingOptionId}", 18051 // "response": { 18052 // "$ref": "AssignedTargetingOption" 18053 // }, 18054 // "scopes": [ 18055 // "https://www.googleapis.com/auth/display-video" 18056 // ] 18057 // } 18058 18059} 18060 18061// method id "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.list": 18062 18063type AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall struct { 18064 s *Service 18065 advertiserId int64 18066 lineItemId int64 18067 targetingType string 18068 urlParams_ gensupport.URLParams 18069 ifNoneMatch_ string 18070 ctx_ context.Context 18071 header_ http.Header 18072} 18073 18074// List: Lists the targeting options assigned to a line item. 18075func (r *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsService) List(advertiserId int64, lineItemId int64, targetingType string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18076 c := &AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18077 c.advertiserId = advertiserId 18078 c.lineItemId = lineItemId 18079 c.targetingType = targetingType 18080 return c 18081} 18082 18083// Filter sets the optional parameter "filter": Allows filtering by 18084// assigned targeting option properties. 18085// 18086// Supported syntax: 18087// 18088// * Filter expressions are made up of one or more restrictions. 18089// * Restrictions can be combined by the logical operator `OR`. 18090// * A restriction has the form of `{field} {operator} {value}`. 18091// * The operator must be `EQUALS (=)`. 18092// * Supported fields: 18093// - `assignedTargetingOptionId` 18094// - `inheritance` 18095// 18096// Examples: 18097// 18098// * AssignedTargetingOptions with ID 1 or 18099// 2 18100// `assignedTargetingOptionId="1" OR assignedTargetingOptionId="2" 18101// * AssignedTargetingOptions with inheritance status of NOT_INHERITED 18102// or 18103// INHERITED_FROM_PARTNER 18104// `inheritance="NOT_INHERITED" OR 18105// inheritance="INHERITED_FROM_PARTNER" 18106// 18107// The length of this field should be no more than 500 characters. 18108func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Filter(filter string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18109 c.urlParams_.Set("filter", filter) 18110 return c 18111} 18112 18113// OrderBy sets the optional parameter "orderBy": Field by which to sort 18114// the list. 18115// Acceptable values are: 18116// 18117// * `assignedTargetingOptionId` (default) 18118// 18119// The default sorting order is ascending. To specify descending order 18120// for 18121// a field, a suffix "desc" should be added to the field name. 18122// Example: 18123// `assignedTargetingOptionId desc`. 18124func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) OrderBy(orderBy string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18125 c.urlParams_.Set("orderBy", orderBy) 18126 return c 18127} 18128 18129// PageSize sets the optional parameter "pageSize": Requested page size. 18130// Must be between `1` and `100`. If unspecified will 18131// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 18132// value 18133// is specified. 18134func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageSize(pageSize int64) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18135 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18136 return c 18137} 18138 18139// PageToken sets the optional parameter "pageToken": A token 18140// identifying a page of results the server should return. 18141// Typically, this is the value of 18142// next_page_token 18143// returned from the previous call to 18144// `ListLineItemAssignedTargetingOptions` 18145// method. If not specified, the first page of results will be returned. 18146func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) PageToken(pageToken string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18147 c.urlParams_.Set("pageToken", pageToken) 18148 return c 18149} 18150 18151// Fields allows partial responses to be retrieved. See 18152// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18153// for more information. 18154func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Fields(s ...googleapi.Field) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18155 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18156 return c 18157} 18158 18159// IfNoneMatch sets the optional parameter which makes the operation 18160// fail if the object's ETag matches the given value. This is useful for 18161// getting updates only after the object has changed since the last 18162// request. Use googleapi.IsNotModified to check whether the response 18163// error from Do is the result of In-None-Match. 18164func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) IfNoneMatch(entityTag string) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18165 c.ifNoneMatch_ = entityTag 18166 return c 18167} 18168 18169// Context sets the context to be used in this call's Do method. Any 18170// pending HTTP request will be aborted if the provided context is 18171// canceled. 18172func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Context(ctx context.Context) *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall { 18173 c.ctx_ = ctx 18174 return c 18175} 18176 18177// Header returns an http.Header that can be modified by the caller to 18178// add HTTP headers to the request. 18179func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Header() http.Header { 18180 if c.header_ == nil { 18181 c.header_ = make(http.Header) 18182 } 18183 return c.header_ 18184} 18185 18186func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 18187 reqHeaders := make(http.Header) 18188 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18189 for k, v := range c.header_ { 18190 reqHeaders[k] = v 18191 } 18192 reqHeaders.Set("User-Agent", c.s.userAgent()) 18193 if c.ifNoneMatch_ != "" { 18194 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18195 } 18196 var body io.Reader = nil 18197 c.urlParams_.Set("alt", alt) 18198 c.urlParams_.Set("prettyPrint", "false") 18199 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions") 18200 urls += "?" + c.urlParams_.Encode() 18201 req, err := http.NewRequest("GET", urls, body) 18202 if err != nil { 18203 return nil, err 18204 } 18205 req.Header = reqHeaders 18206 googleapi.Expand(req.URL, map[string]string{ 18207 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18208 "lineItemId": strconv.FormatInt(c.lineItemId, 10), 18209 "targetingType": c.targetingType, 18210 }) 18211 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18212} 18213 18214// Do executes the "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.list" call. 18215// Exactly one of *ListLineItemAssignedTargetingOptionsResponse or error 18216// will be non-nil. Any non-2xx status code is an error. Response 18217// headers are in either 18218// *ListLineItemAssignedTargetingOptionsResponse.ServerResponse.Header 18219// or (if a response was returned at all) in 18220// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 18221// whether the returned error was because http.StatusNotModified was 18222// returned. 18223func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListLineItemAssignedTargetingOptionsResponse, error) { 18224 gensupport.SetOptions(c.urlParams_, opts...) 18225 res, err := c.doRequest("json") 18226 if res != nil && res.StatusCode == http.StatusNotModified { 18227 if res.Body != nil { 18228 res.Body.Close() 18229 } 18230 return nil, &googleapi.Error{ 18231 Code: res.StatusCode, 18232 Header: res.Header, 18233 } 18234 } 18235 if err != nil { 18236 return nil, err 18237 } 18238 defer googleapi.CloseBody(res) 18239 if err := googleapi.CheckResponse(res); err != nil { 18240 return nil, err 18241 } 18242 ret := &ListLineItemAssignedTargetingOptionsResponse{ 18243 ServerResponse: googleapi.ServerResponse{ 18244 Header: res.Header, 18245 HTTPStatusCode: res.StatusCode, 18246 }, 18247 } 18248 target := &ret 18249 if err := gensupport.DecodeResponse(target, res); err != nil { 18250 return nil, err 18251 } 18252 return ret, nil 18253 // { 18254 // "description": "Lists the targeting options assigned to a line item.", 18255 // "flatPath": "v1/advertisers/{advertisersId}/lineItems/{lineItemsId}/targetingTypes/{targetingTypesId}/assignedTargetingOptions", 18256 // "httpMethod": "GET", 18257 // "id": "displayvideo.advertisers.lineItems.targetingTypes.assignedTargetingOptions.list", 18258 // "parameterOrder": [ 18259 // "advertiserId", 18260 // "lineItemId", 18261 // "targetingType" 18262 // ], 18263 // "parameters": { 18264 // "advertiserId": { 18265 // "description": "Required. The ID of the advertiser the line item belongs to.", 18266 // "format": "int64", 18267 // "location": "path", 18268 // "pattern": "^[^/]+$", 18269 // "required": true, 18270 // "type": "string" 18271 // }, 18272 // "filter": { 18273 // "description": "Allows filtering by assigned targeting option properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by the logical operator `OR`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `assignedTargetingOptionId`\n - `inheritance`\n\nExamples:\n\n* AssignedTargetingOptions with ID 1 or 2\n`assignedTargetingOptionId=\"1\" OR assignedTargetingOptionId=\"2\"`\n* AssignedTargetingOptions with inheritance status of NOT_INHERITED or\n INHERITED_FROM_PARTNER\n`inheritance=\"NOT_INHERITED\" OR inheritance=\"INHERITED_FROM_PARTNER\"`\n\nThe length of this field should be no more than 500 characters.", 18274 // "location": "query", 18275 // "type": "string" 18276 // }, 18277 // "lineItemId": { 18278 // "description": "Required. The ID of the line item to list assigned targeting options for.", 18279 // "format": "int64", 18280 // "location": "path", 18281 // "pattern": "^[^/]+$", 18282 // "required": true, 18283 // "type": "string" 18284 // }, 18285 // "orderBy": { 18286 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `assignedTargetingOptionId` (default)\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`assignedTargetingOptionId desc`.", 18287 // "location": "query", 18288 // "type": "string" 18289 // }, 18290 // "pageSize": { 18291 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 18292 // "format": "int32", 18293 // "location": "query", 18294 // "type": "integer" 18295 // }, 18296 // "pageToken": { 18297 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListLineItemAssignedTargetingOptions`\nmethod. If not specified, the first page of results will be returned.", 18298 // "location": "query", 18299 // "type": "string" 18300 // }, 18301 // "targetingType": { 18302 // "description": "Required. Identifies the type of assigned targeting options to list.", 18303 // "enum": [ 18304 // "TARGETING_TYPE_UNSPECIFIED", 18305 // "TARGETING_TYPE_CHANNEL", 18306 // "TARGETING_TYPE_APP_CATEGORY", 18307 // "TARGETING_TYPE_APP", 18308 // "TARGETING_TYPE_URL", 18309 // "TARGETING_TYPE_DAY_AND_TIME", 18310 // "TARGETING_TYPE_AGE_RANGE", 18311 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 18312 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 18313 // "TARGETING_TYPE_GENDER", 18314 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 18315 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 18316 // "TARGETING_TYPE_PARENTAL_STATUS", 18317 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 18318 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 18319 // "TARGETING_TYPE_DEVICE_TYPE", 18320 // "TARGETING_TYPE_AUDIENCE_GROUP", 18321 // "TARGETING_TYPE_BROWSER", 18322 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 18323 // "TARGETING_TYPE_ON_SCREEN_POSITION", 18324 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 18325 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 18326 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 18327 // "TARGETING_TYPE_ENVIRONMENT", 18328 // "TARGETING_TYPE_CARRIER_AND_ISP", 18329 // "TARGETING_TYPE_OPERATING_SYSTEM", 18330 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 18331 // "TARGETING_TYPE_KEYWORD", 18332 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 18333 // "TARGETING_TYPE_VIEWABILITY", 18334 // "TARGETING_TYPE_CATEGORY", 18335 // "TARGETING_TYPE_INVENTORY_SOURCE", 18336 // "TARGETING_TYPE_LANGUAGE", 18337 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 18338 // "TARGETING_TYPE_GEO_REGION", 18339 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 18340 // "TARGETING_TYPE_PROXIMITY_LOCATION", 18341 // "TARGETING_TYPE_EXCHANGE", 18342 // "TARGETING_TYPE_SUB_EXCHANGE" 18343 // ], 18344 // "location": "path", 18345 // "pattern": "^[^/]+$", 18346 // "required": true, 18347 // "type": "string" 18348 // } 18349 // }, 18350 // "path": "v1/advertisers/{+advertiserId}/lineItems/{+lineItemId}/targetingTypes/{+targetingType}/assignedTargetingOptions", 18351 // "response": { 18352 // "$ref": "ListLineItemAssignedTargetingOptionsResponse" 18353 // }, 18354 // "scopes": [ 18355 // "https://www.googleapis.com/auth/display-video" 18356 // ] 18357 // } 18358 18359} 18360 18361// Pages invokes f for each page of results. 18362// A non-nil error returned from f will halt the iteration. 18363// The provided context supersedes any context provided to the Context method. 18364func (c *AdvertisersLineItemsTargetingTypesAssignedTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListLineItemAssignedTargetingOptionsResponse) error) error { 18365 c.ctx_ = ctx 18366 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18367 for { 18368 x, err := c.Do() 18369 if err != nil { 18370 return err 18371 } 18372 if err := f(x); err != nil { 18373 return err 18374 } 18375 if x.NextPageToken == "" { 18376 return nil 18377 } 18378 c.PageToken(x.NextPageToken) 18379 } 18380} 18381 18382// method id "displayvideo.advertisers.locationLists.get": 18383 18384type AdvertisersLocationListsGetCall struct { 18385 s *Service 18386 advertiserId int64 18387 locationListId int64 18388 urlParams_ gensupport.URLParams 18389 ifNoneMatch_ string 18390 ctx_ context.Context 18391 header_ http.Header 18392} 18393 18394// Get: Gets a location list. 18395func (r *AdvertisersLocationListsService) Get(advertiserId int64, locationListId int64) *AdvertisersLocationListsGetCall { 18396 c := &AdvertisersLocationListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18397 c.advertiserId = advertiserId 18398 c.locationListId = locationListId 18399 return c 18400} 18401 18402// Fields allows partial responses to be retrieved. See 18403// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18404// for more information. 18405func (c *AdvertisersLocationListsGetCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsGetCall { 18406 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18407 return c 18408} 18409 18410// IfNoneMatch sets the optional parameter which makes the operation 18411// fail if the object's ETag matches the given value. This is useful for 18412// getting updates only after the object has changed since the last 18413// request. Use googleapi.IsNotModified to check whether the response 18414// error from Do is the result of In-None-Match. 18415func (c *AdvertisersLocationListsGetCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsGetCall { 18416 c.ifNoneMatch_ = entityTag 18417 return c 18418} 18419 18420// Context sets the context to be used in this call's Do method. Any 18421// pending HTTP request will be aborted if the provided context is 18422// canceled. 18423func (c *AdvertisersLocationListsGetCall) Context(ctx context.Context) *AdvertisersLocationListsGetCall { 18424 c.ctx_ = ctx 18425 return c 18426} 18427 18428// Header returns an http.Header that can be modified by the caller to 18429// add HTTP headers to the request. 18430func (c *AdvertisersLocationListsGetCall) Header() http.Header { 18431 if c.header_ == nil { 18432 c.header_ = make(http.Header) 18433 } 18434 return c.header_ 18435} 18436 18437func (c *AdvertisersLocationListsGetCall) doRequest(alt string) (*http.Response, error) { 18438 reqHeaders := make(http.Header) 18439 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18440 for k, v := range c.header_ { 18441 reqHeaders[k] = v 18442 } 18443 reqHeaders.Set("User-Agent", c.s.userAgent()) 18444 if c.ifNoneMatch_ != "" { 18445 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18446 } 18447 var body io.Reader = nil 18448 c.urlParams_.Set("alt", alt) 18449 c.urlParams_.Set("prettyPrint", "false") 18450 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/locationLists/{+locationListId}") 18451 urls += "?" + c.urlParams_.Encode() 18452 req, err := http.NewRequest("GET", urls, body) 18453 if err != nil { 18454 return nil, err 18455 } 18456 req.Header = reqHeaders 18457 googleapi.Expand(req.URL, map[string]string{ 18458 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18459 "locationListId": strconv.FormatInt(c.locationListId, 10), 18460 }) 18461 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18462} 18463 18464// Do executes the "displayvideo.advertisers.locationLists.get" call. 18465// Exactly one of *LocationList or error will be non-nil. Any non-2xx 18466// status code is an error. Response headers are in either 18467// *LocationList.ServerResponse.Header or (if a response was returned at 18468// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 18469// to check whether the returned error was because 18470// http.StatusNotModified was returned. 18471func (c *AdvertisersLocationListsGetCall) Do(opts ...googleapi.CallOption) (*LocationList, error) { 18472 gensupport.SetOptions(c.urlParams_, opts...) 18473 res, err := c.doRequest("json") 18474 if res != nil && res.StatusCode == http.StatusNotModified { 18475 if res.Body != nil { 18476 res.Body.Close() 18477 } 18478 return nil, &googleapi.Error{ 18479 Code: res.StatusCode, 18480 Header: res.Header, 18481 } 18482 } 18483 if err != nil { 18484 return nil, err 18485 } 18486 defer googleapi.CloseBody(res) 18487 if err := googleapi.CheckResponse(res); err != nil { 18488 return nil, err 18489 } 18490 ret := &LocationList{ 18491 ServerResponse: googleapi.ServerResponse{ 18492 Header: res.Header, 18493 HTTPStatusCode: res.StatusCode, 18494 }, 18495 } 18496 target := &ret 18497 if err := gensupport.DecodeResponse(target, res); err != nil { 18498 return nil, err 18499 } 18500 return ret, nil 18501 // { 18502 // "description": "Gets a location list.", 18503 // "flatPath": "v1/advertisers/{advertisersId}/locationLists/{locationListsId}", 18504 // "httpMethod": "GET", 18505 // "id": "displayvideo.advertisers.locationLists.get", 18506 // "parameterOrder": [ 18507 // "advertiserId", 18508 // "locationListId" 18509 // ], 18510 // "parameters": { 18511 // "advertiserId": { 18512 // "description": "Required. The ID of the DV360 advertiser to which the fetched location list belongs.", 18513 // "format": "int64", 18514 // "location": "path", 18515 // "pattern": "^[^/]+$", 18516 // "required": true, 18517 // "type": "string" 18518 // }, 18519 // "locationListId": { 18520 // "description": "Required. The ID of the location list to fetch.", 18521 // "format": "int64", 18522 // "location": "path", 18523 // "pattern": "^[^/]+$", 18524 // "required": true, 18525 // "type": "string" 18526 // } 18527 // }, 18528 // "path": "v1/advertisers/{+advertiserId}/locationLists/{+locationListId}", 18529 // "response": { 18530 // "$ref": "LocationList" 18531 // }, 18532 // "scopes": [ 18533 // "https://www.googleapis.com/auth/display-video" 18534 // ] 18535 // } 18536 18537} 18538 18539// method id "displayvideo.advertisers.locationLists.list": 18540 18541type AdvertisersLocationListsListCall struct { 18542 s *Service 18543 advertiserId int64 18544 urlParams_ gensupport.URLParams 18545 ifNoneMatch_ string 18546 ctx_ context.Context 18547 header_ http.Header 18548} 18549 18550// List: Lists location lists based on a given advertiser id. 18551func (r *AdvertisersLocationListsService) List(advertiserId int64) *AdvertisersLocationListsListCall { 18552 c := &AdvertisersLocationListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18553 c.advertiserId = advertiserId 18554 return c 18555} 18556 18557// Filter sets the optional parameter "filter": Allows filtering by 18558// location list fields. 18559// 18560// Supported syntax: 18561// 18562// * Filter expressions are made up of one or more restrictions. 18563// * Restrictions can be combined by `AND` or `OR` logical operators. 18564// A 18565// sequence of restrictions implicitly uses `AND`. 18566// * A restriction has the form of `{field} {operator} {value}`. 18567// * The operator must be `EQUALS (=)`. 18568// * Supported fields: 18569// - `locationType` 18570// 18571// Examples: 18572// 18573// * All regional location 18574// list: 18575// `locationType="TARGETING_LOCATION_TYPE_REGIONAL" 18576// * All proximity location 18577// list: 18578// `locationType="TARGETING_LOCATION_TYPE_PROXIMITY" 18579func (c *AdvertisersLocationListsListCall) Filter(filter string) *AdvertisersLocationListsListCall { 18580 c.urlParams_.Set("filter", filter) 18581 return c 18582} 18583 18584// OrderBy sets the optional parameter "orderBy": Field by which to sort 18585// the list. 18586// Acceptable values are: 18587// 18588// * `locationListId` (default) 18589// * `displayName` 18590// 18591// The default sorting order is ascending. To specify descending order 18592// for 18593// a field, a suffix "desc" should be added to the field name. 18594// Example: 18595// `displayName desc`. 18596func (c *AdvertisersLocationListsListCall) OrderBy(orderBy string) *AdvertisersLocationListsListCall { 18597 c.urlParams_.Set("orderBy", orderBy) 18598 return c 18599} 18600 18601// PageSize sets the optional parameter "pageSize": Requested page size. 18602// Must be between `1` and `100`. 18603// Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` 18604// if an 18605// invalid value is specified. 18606func (c *AdvertisersLocationListsListCall) PageSize(pageSize int64) *AdvertisersLocationListsListCall { 18607 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18608 return c 18609} 18610 18611// PageToken sets the optional parameter "pageToken": A token 18612// identifying a page of results the server should return. 18613// 18614// Typically, this is the value of 18615// next_page_token 18616// returned from the previous call to `ListLocationLists` method. 18617// If not specified, the first page of results will be returned. 18618func (c *AdvertisersLocationListsListCall) PageToken(pageToken string) *AdvertisersLocationListsListCall { 18619 c.urlParams_.Set("pageToken", pageToken) 18620 return c 18621} 18622 18623// Fields allows partial responses to be retrieved. See 18624// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18625// for more information. 18626func (c *AdvertisersLocationListsListCall) Fields(s ...googleapi.Field) *AdvertisersLocationListsListCall { 18627 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18628 return c 18629} 18630 18631// IfNoneMatch sets the optional parameter which makes the operation 18632// fail if the object's ETag matches the given value. This is useful for 18633// getting updates only after the object has changed since the last 18634// request. Use googleapi.IsNotModified to check whether the response 18635// error from Do is the result of In-None-Match. 18636func (c *AdvertisersLocationListsListCall) IfNoneMatch(entityTag string) *AdvertisersLocationListsListCall { 18637 c.ifNoneMatch_ = entityTag 18638 return c 18639} 18640 18641// Context sets the context to be used in this call's Do method. Any 18642// pending HTTP request will be aborted if the provided context is 18643// canceled. 18644func (c *AdvertisersLocationListsListCall) Context(ctx context.Context) *AdvertisersLocationListsListCall { 18645 c.ctx_ = ctx 18646 return c 18647} 18648 18649// Header returns an http.Header that can be modified by the caller to 18650// add HTTP headers to the request. 18651func (c *AdvertisersLocationListsListCall) Header() http.Header { 18652 if c.header_ == nil { 18653 c.header_ = make(http.Header) 18654 } 18655 return c.header_ 18656} 18657 18658func (c *AdvertisersLocationListsListCall) doRequest(alt string) (*http.Response, error) { 18659 reqHeaders := make(http.Header) 18660 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18661 for k, v := range c.header_ { 18662 reqHeaders[k] = v 18663 } 18664 reqHeaders.Set("User-Agent", c.s.userAgent()) 18665 if c.ifNoneMatch_ != "" { 18666 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18667 } 18668 var body io.Reader = nil 18669 c.urlParams_.Set("alt", alt) 18670 c.urlParams_.Set("prettyPrint", "false") 18671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/locationLists") 18672 urls += "?" + c.urlParams_.Encode() 18673 req, err := http.NewRequest("GET", urls, body) 18674 if err != nil { 18675 return nil, err 18676 } 18677 req.Header = reqHeaders 18678 googleapi.Expand(req.URL, map[string]string{ 18679 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18680 }) 18681 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18682} 18683 18684// Do executes the "displayvideo.advertisers.locationLists.list" call. 18685// Exactly one of *ListLocationListsResponse or error will be non-nil. 18686// Any non-2xx status code is an error. Response headers are in either 18687// *ListLocationListsResponse.ServerResponse.Header or (if a response 18688// was returned at all) in error.(*googleapi.Error).Header. Use 18689// googleapi.IsNotModified to check whether the returned error was 18690// because http.StatusNotModified was returned. 18691func (c *AdvertisersLocationListsListCall) Do(opts ...googleapi.CallOption) (*ListLocationListsResponse, error) { 18692 gensupport.SetOptions(c.urlParams_, opts...) 18693 res, err := c.doRequest("json") 18694 if res != nil && res.StatusCode == http.StatusNotModified { 18695 if res.Body != nil { 18696 res.Body.Close() 18697 } 18698 return nil, &googleapi.Error{ 18699 Code: res.StatusCode, 18700 Header: res.Header, 18701 } 18702 } 18703 if err != nil { 18704 return nil, err 18705 } 18706 defer googleapi.CloseBody(res) 18707 if err := googleapi.CheckResponse(res); err != nil { 18708 return nil, err 18709 } 18710 ret := &ListLocationListsResponse{ 18711 ServerResponse: googleapi.ServerResponse{ 18712 Header: res.Header, 18713 HTTPStatusCode: res.StatusCode, 18714 }, 18715 } 18716 target := &ret 18717 if err := gensupport.DecodeResponse(target, res); err != nil { 18718 return nil, err 18719 } 18720 return ret, nil 18721 // { 18722 // "description": "Lists location lists based on a given advertiser id.", 18723 // "flatPath": "v1/advertisers/{advertisersId}/locationLists", 18724 // "httpMethod": "GET", 18725 // "id": "displayvideo.advertisers.locationLists.list", 18726 // "parameterOrder": [ 18727 // "advertiserId" 18728 // ], 18729 // "parameters": { 18730 // "advertiserId": { 18731 // "description": "Required. The ID of the DV360 advertiser to which the fetched location lists belong.", 18732 // "format": "int64", 18733 // "location": "path", 18734 // "pattern": "^[^/]+$", 18735 // "required": true, 18736 // "type": "string" 18737 // }, 18738 // "filter": { 18739 // "description": "Allows filtering by location list fields.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `locationType`\n\nExamples:\n\n* All regional location list:\n`locationType=\"TARGETING_LOCATION_TYPE_REGIONAL\"`\n* All proximity location list:\n`locationType=\"TARGETING_LOCATION_TYPE_PROXIMITY\"`", 18740 // "location": "query", 18741 // "type": "string" 18742 // }, 18743 // "orderBy": { 18744 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `locationListId` (default)\n* `displayName`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 18745 // "location": "query", 18746 // "type": "string" 18747 // }, 18748 // "pageSize": { 18749 // "description": "Requested page size. Must be between `1` and `100`.\nDefaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an\ninvalid value is specified.", 18750 // "format": "int32", 18751 // "location": "query", 18752 // "type": "integer" 18753 // }, 18754 // "pageToken": { 18755 // "description": "A token identifying a page of results the server should return.\n\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListLocationLists` method.\nIf not specified, the first page of results will be returned.", 18756 // "location": "query", 18757 // "type": "string" 18758 // } 18759 // }, 18760 // "path": "v1/advertisers/{+advertiserId}/locationLists", 18761 // "response": { 18762 // "$ref": "ListLocationListsResponse" 18763 // }, 18764 // "scopes": [ 18765 // "https://www.googleapis.com/auth/display-video" 18766 // ] 18767 // } 18768 18769} 18770 18771// Pages invokes f for each page of results. 18772// A non-nil error returned from f will halt the iteration. 18773// The provided context supersedes any context provided to the Context method. 18774func (c *AdvertisersLocationListsListCall) Pages(ctx context.Context, f func(*ListLocationListsResponse) error) error { 18775 c.ctx_ = ctx 18776 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 18777 for { 18778 x, err := c.Do() 18779 if err != nil { 18780 return err 18781 } 18782 if err := f(x); err != nil { 18783 return err 18784 } 18785 if x.NextPageToken == "" { 18786 return nil 18787 } 18788 c.PageToken(x.NextPageToken) 18789 } 18790} 18791 18792// method id "displayvideo.advertisers.negativeKeywordLists.get": 18793 18794type AdvertisersNegativeKeywordListsGetCall struct { 18795 s *Service 18796 advertiserId int64 18797 negativeKeywordListId int64 18798 urlParams_ gensupport.URLParams 18799 ifNoneMatch_ string 18800 ctx_ context.Context 18801 header_ http.Header 18802} 18803 18804// Get: Gets a negative keyword list given an advertiser ID and a 18805// negative keyword 18806// list ID. 18807func (r *AdvertisersNegativeKeywordListsService) Get(advertiserId int64, negativeKeywordListId int64) *AdvertisersNegativeKeywordListsGetCall { 18808 c := &AdvertisersNegativeKeywordListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18809 c.advertiserId = advertiserId 18810 c.negativeKeywordListId = negativeKeywordListId 18811 return c 18812} 18813 18814// Fields allows partial responses to be retrieved. See 18815// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18816// for more information. 18817func (c *AdvertisersNegativeKeywordListsGetCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsGetCall { 18818 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18819 return c 18820} 18821 18822// IfNoneMatch sets the optional parameter which makes the operation 18823// fail if the object's ETag matches the given value. This is useful for 18824// getting updates only after the object has changed since the last 18825// request. Use googleapi.IsNotModified to check whether the response 18826// error from Do is the result of In-None-Match. 18827func (c *AdvertisersNegativeKeywordListsGetCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsGetCall { 18828 c.ifNoneMatch_ = entityTag 18829 return c 18830} 18831 18832// Context sets the context to be used in this call's Do method. Any 18833// pending HTTP request will be aborted if the provided context is 18834// canceled. 18835func (c *AdvertisersNegativeKeywordListsGetCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsGetCall { 18836 c.ctx_ = ctx 18837 return c 18838} 18839 18840// Header returns an http.Header that can be modified by the caller to 18841// add HTTP headers to the request. 18842func (c *AdvertisersNegativeKeywordListsGetCall) Header() http.Header { 18843 if c.header_ == nil { 18844 c.header_ = make(http.Header) 18845 } 18846 return c.header_ 18847} 18848 18849func (c *AdvertisersNegativeKeywordListsGetCall) doRequest(alt string) (*http.Response, error) { 18850 reqHeaders := make(http.Header) 18851 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 18852 for k, v := range c.header_ { 18853 reqHeaders[k] = v 18854 } 18855 reqHeaders.Set("User-Agent", c.s.userAgent()) 18856 if c.ifNoneMatch_ != "" { 18857 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 18858 } 18859 var body io.Reader = nil 18860 c.urlParams_.Set("alt", alt) 18861 c.urlParams_.Set("prettyPrint", "false") 18862 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}") 18863 urls += "?" + c.urlParams_.Encode() 18864 req, err := http.NewRequest("GET", urls, body) 18865 if err != nil { 18866 return nil, err 18867 } 18868 req.Header = reqHeaders 18869 googleapi.Expand(req.URL, map[string]string{ 18870 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 18871 "negativeKeywordListId": strconv.FormatInt(c.negativeKeywordListId, 10), 18872 }) 18873 return gensupport.SendRequest(c.ctx_, c.s.client, req) 18874} 18875 18876// Do executes the "displayvideo.advertisers.negativeKeywordLists.get" call. 18877// Exactly one of *NegativeKeywordList or error will be non-nil. Any 18878// non-2xx status code is an error. Response headers are in either 18879// *NegativeKeywordList.ServerResponse.Header or (if a response was 18880// returned at all) in error.(*googleapi.Error).Header. Use 18881// googleapi.IsNotModified to check whether the returned error was 18882// because http.StatusNotModified was returned. 18883func (c *AdvertisersNegativeKeywordListsGetCall) Do(opts ...googleapi.CallOption) (*NegativeKeywordList, error) { 18884 gensupport.SetOptions(c.urlParams_, opts...) 18885 res, err := c.doRequest("json") 18886 if res != nil && res.StatusCode == http.StatusNotModified { 18887 if res.Body != nil { 18888 res.Body.Close() 18889 } 18890 return nil, &googleapi.Error{ 18891 Code: res.StatusCode, 18892 Header: res.Header, 18893 } 18894 } 18895 if err != nil { 18896 return nil, err 18897 } 18898 defer googleapi.CloseBody(res) 18899 if err := googleapi.CheckResponse(res); err != nil { 18900 return nil, err 18901 } 18902 ret := &NegativeKeywordList{ 18903 ServerResponse: googleapi.ServerResponse{ 18904 Header: res.Header, 18905 HTTPStatusCode: res.StatusCode, 18906 }, 18907 } 18908 target := &ret 18909 if err := gensupport.DecodeResponse(target, res); err != nil { 18910 return nil, err 18911 } 18912 return ret, nil 18913 // { 18914 // "description": "Gets a negative keyword list given an advertiser ID and a negative keyword\nlist ID.", 18915 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists/{negativeKeywordListsId}", 18916 // "httpMethod": "GET", 18917 // "id": "displayvideo.advertisers.negativeKeywordLists.get", 18918 // "parameterOrder": [ 18919 // "advertiserId", 18920 // "negativeKeywordListId" 18921 // ], 18922 // "parameters": { 18923 // "advertiserId": { 18924 // "description": "Required. The ID of the DV360 advertiser to which the fetched negative keyword list\nbelongs.", 18925 // "format": "int64", 18926 // "location": "path", 18927 // "pattern": "^[^/]+$", 18928 // "required": true, 18929 // "type": "string" 18930 // }, 18931 // "negativeKeywordListId": { 18932 // "description": "Required. The ID of the negative keyword list to fetch.", 18933 // "format": "int64", 18934 // "location": "path", 18935 // "pattern": "^[^/]+$", 18936 // "required": true, 18937 // "type": "string" 18938 // } 18939 // }, 18940 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists/{+negativeKeywordListId}", 18941 // "response": { 18942 // "$ref": "NegativeKeywordList" 18943 // }, 18944 // "scopes": [ 18945 // "https://www.googleapis.com/auth/display-video" 18946 // ] 18947 // } 18948 18949} 18950 18951// method id "displayvideo.advertisers.negativeKeywordLists.list": 18952 18953type AdvertisersNegativeKeywordListsListCall struct { 18954 s *Service 18955 advertiserId int64 18956 urlParams_ gensupport.URLParams 18957 ifNoneMatch_ string 18958 ctx_ context.Context 18959 header_ http.Header 18960} 18961 18962// List: Lists negative keyword lists based on a given advertiser id. 18963func (r *AdvertisersNegativeKeywordListsService) List(advertiserId int64) *AdvertisersNegativeKeywordListsListCall { 18964 c := &AdvertisersNegativeKeywordListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 18965 c.advertiserId = advertiserId 18966 return c 18967} 18968 18969// PageSize sets the optional parameter "pageSize": Requested page size. 18970// Must be between `1` and `100`. 18971// Defaults to `100` if not set. Returns error code `INVALID_ARGUMENT` 18972// if an 18973// invalid value is specified. 18974func (c *AdvertisersNegativeKeywordListsListCall) PageSize(pageSize int64) *AdvertisersNegativeKeywordListsListCall { 18975 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 18976 return c 18977} 18978 18979// PageToken sets the optional parameter "pageToken": A token 18980// identifying a page of results the server should return. 18981// 18982// Typically, this is the value of 18983// next_page_token 18984// returned from the previous call to `ListNegativeKeywordLists` 18985// method. 18986// If not specified, the first page of results will be returned. 18987func (c *AdvertisersNegativeKeywordListsListCall) PageToken(pageToken string) *AdvertisersNegativeKeywordListsListCall { 18988 c.urlParams_.Set("pageToken", pageToken) 18989 return c 18990} 18991 18992// Fields allows partial responses to be retrieved. See 18993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 18994// for more information. 18995func (c *AdvertisersNegativeKeywordListsListCall) Fields(s ...googleapi.Field) *AdvertisersNegativeKeywordListsListCall { 18996 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 18997 return c 18998} 18999 19000// IfNoneMatch sets the optional parameter which makes the operation 19001// fail if the object's ETag matches the given value. This is useful for 19002// getting updates only after the object has changed since the last 19003// request. Use googleapi.IsNotModified to check whether the response 19004// error from Do is the result of In-None-Match. 19005func (c *AdvertisersNegativeKeywordListsListCall) IfNoneMatch(entityTag string) *AdvertisersNegativeKeywordListsListCall { 19006 c.ifNoneMatch_ = entityTag 19007 return c 19008} 19009 19010// Context sets the context to be used in this call's Do method. Any 19011// pending HTTP request will be aborted if the provided context is 19012// canceled. 19013func (c *AdvertisersNegativeKeywordListsListCall) Context(ctx context.Context) *AdvertisersNegativeKeywordListsListCall { 19014 c.ctx_ = ctx 19015 return c 19016} 19017 19018// Header returns an http.Header that can be modified by the caller to 19019// add HTTP headers to the request. 19020func (c *AdvertisersNegativeKeywordListsListCall) Header() http.Header { 19021 if c.header_ == nil { 19022 c.header_ = make(http.Header) 19023 } 19024 return c.header_ 19025} 19026 19027func (c *AdvertisersNegativeKeywordListsListCall) doRequest(alt string) (*http.Response, error) { 19028 reqHeaders := make(http.Header) 19029 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19030 for k, v := range c.header_ { 19031 reqHeaders[k] = v 19032 } 19033 reqHeaders.Set("User-Agent", c.s.userAgent()) 19034 if c.ifNoneMatch_ != "" { 19035 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19036 } 19037 var body io.Reader = nil 19038 c.urlParams_.Set("alt", alt) 19039 c.urlParams_.Set("prettyPrint", "false") 19040 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/advertisers/{+advertiserId}/negativeKeywordLists") 19041 urls += "?" + c.urlParams_.Encode() 19042 req, err := http.NewRequest("GET", urls, body) 19043 if err != nil { 19044 return nil, err 19045 } 19046 req.Header = reqHeaders 19047 googleapi.Expand(req.URL, map[string]string{ 19048 "advertiserId": strconv.FormatInt(c.advertiserId, 10), 19049 }) 19050 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19051} 19052 19053// Do executes the "displayvideo.advertisers.negativeKeywordLists.list" call. 19054// Exactly one of *ListNegativeKeywordListsResponse or error will be 19055// non-nil. Any non-2xx status code is an error. Response headers are in 19056// either *ListNegativeKeywordListsResponse.ServerResponse.Header or (if 19057// a response was returned at all) in error.(*googleapi.Error).Header. 19058// Use googleapi.IsNotModified to check whether the returned error was 19059// because http.StatusNotModified was returned. 19060func (c *AdvertisersNegativeKeywordListsListCall) Do(opts ...googleapi.CallOption) (*ListNegativeKeywordListsResponse, error) { 19061 gensupport.SetOptions(c.urlParams_, opts...) 19062 res, err := c.doRequest("json") 19063 if res != nil && res.StatusCode == http.StatusNotModified { 19064 if res.Body != nil { 19065 res.Body.Close() 19066 } 19067 return nil, &googleapi.Error{ 19068 Code: res.StatusCode, 19069 Header: res.Header, 19070 } 19071 } 19072 if err != nil { 19073 return nil, err 19074 } 19075 defer googleapi.CloseBody(res) 19076 if err := googleapi.CheckResponse(res); err != nil { 19077 return nil, err 19078 } 19079 ret := &ListNegativeKeywordListsResponse{ 19080 ServerResponse: googleapi.ServerResponse{ 19081 Header: res.Header, 19082 HTTPStatusCode: res.StatusCode, 19083 }, 19084 } 19085 target := &ret 19086 if err := gensupport.DecodeResponse(target, res); err != nil { 19087 return nil, err 19088 } 19089 return ret, nil 19090 // { 19091 // "description": "Lists negative keyword lists based on a given advertiser id.", 19092 // "flatPath": "v1/advertisers/{advertisersId}/negativeKeywordLists", 19093 // "httpMethod": "GET", 19094 // "id": "displayvideo.advertisers.negativeKeywordLists.list", 19095 // "parameterOrder": [ 19096 // "advertiserId" 19097 // ], 19098 // "parameters": { 19099 // "advertiserId": { 19100 // "description": "Required. The ID of the DV360 advertiser to which the fetched negative keyword lists\nbelong.", 19101 // "format": "int64", 19102 // "location": "path", 19103 // "pattern": "^[^/]+$", 19104 // "required": true, 19105 // "type": "string" 19106 // }, 19107 // "pageSize": { 19108 // "description": "Requested page size. Must be between `1` and `100`.\nDefaults to `100` if not set. Returns error code `INVALID_ARGUMENT` if an\ninvalid value is specified.", 19109 // "format": "int32", 19110 // "location": "query", 19111 // "type": "integer" 19112 // }, 19113 // "pageToken": { 19114 // "description": "A token identifying a page of results the server should return.\n\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListNegativeKeywordLists` method.\nIf not specified, the first page of results will be returned.", 19115 // "location": "query", 19116 // "type": "string" 19117 // } 19118 // }, 19119 // "path": "v1/advertisers/{+advertiserId}/negativeKeywordLists", 19120 // "response": { 19121 // "$ref": "ListNegativeKeywordListsResponse" 19122 // }, 19123 // "scopes": [ 19124 // "https://www.googleapis.com/auth/display-video" 19125 // ] 19126 // } 19127 19128} 19129 19130// Pages invokes f for each page of results. 19131// A non-nil error returned from f will halt the iteration. 19132// The provided context supersedes any context provided to the Context method. 19133func (c *AdvertisersNegativeKeywordListsListCall) Pages(ctx context.Context, f func(*ListNegativeKeywordListsResponse) error) error { 19134 c.ctx_ = ctx 19135 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19136 for { 19137 x, err := c.Do() 19138 if err != nil { 19139 return err 19140 } 19141 if err := f(x); err != nil { 19142 return err 19143 } 19144 if x.NextPageToken == "" { 19145 return nil 19146 } 19147 c.PageToken(x.NextPageToken) 19148 } 19149} 19150 19151// method id "displayvideo.combinedAudiences.get": 19152 19153type CombinedAudiencesGetCall struct { 19154 s *Service 19155 combinedAudienceId int64 19156 urlParams_ gensupport.URLParams 19157 ifNoneMatch_ string 19158 ctx_ context.Context 19159 header_ http.Header 19160} 19161 19162// Get: Gets a combined audience. 19163func (r *CombinedAudiencesService) Get(combinedAudienceId int64) *CombinedAudiencesGetCall { 19164 c := &CombinedAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19165 c.combinedAudienceId = combinedAudienceId 19166 return c 19167} 19168 19169// AdvertiserId sets the optional parameter "advertiserId": The ID of 19170// the advertiser that has access to the fetched combined 19171// audience. 19172func (c *CombinedAudiencesGetCall) AdvertiserId(advertiserId int64) *CombinedAudiencesGetCall { 19173 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 19174 return c 19175} 19176 19177// PartnerId sets the optional parameter "partnerId": The ID of the 19178// partner that has access to the fetched combined audience. 19179func (c *CombinedAudiencesGetCall) PartnerId(partnerId int64) *CombinedAudiencesGetCall { 19180 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 19181 return c 19182} 19183 19184// Fields allows partial responses to be retrieved. See 19185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19186// for more information. 19187func (c *CombinedAudiencesGetCall) Fields(s ...googleapi.Field) *CombinedAudiencesGetCall { 19188 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19189 return c 19190} 19191 19192// IfNoneMatch sets the optional parameter which makes the operation 19193// fail if the object's ETag matches the given value. This is useful for 19194// getting updates only after the object has changed since the last 19195// request. Use googleapi.IsNotModified to check whether the response 19196// error from Do is the result of In-None-Match. 19197func (c *CombinedAudiencesGetCall) IfNoneMatch(entityTag string) *CombinedAudiencesGetCall { 19198 c.ifNoneMatch_ = entityTag 19199 return c 19200} 19201 19202// Context sets the context to be used in this call's Do method. Any 19203// pending HTTP request will be aborted if the provided context is 19204// canceled. 19205func (c *CombinedAudiencesGetCall) Context(ctx context.Context) *CombinedAudiencesGetCall { 19206 c.ctx_ = ctx 19207 return c 19208} 19209 19210// Header returns an http.Header that can be modified by the caller to 19211// add HTTP headers to the request. 19212func (c *CombinedAudiencesGetCall) Header() http.Header { 19213 if c.header_ == nil { 19214 c.header_ = make(http.Header) 19215 } 19216 return c.header_ 19217} 19218 19219func (c *CombinedAudiencesGetCall) doRequest(alt string) (*http.Response, error) { 19220 reqHeaders := make(http.Header) 19221 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19222 for k, v := range c.header_ { 19223 reqHeaders[k] = v 19224 } 19225 reqHeaders.Set("User-Agent", c.s.userAgent()) 19226 if c.ifNoneMatch_ != "" { 19227 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19228 } 19229 var body io.Reader = nil 19230 c.urlParams_.Set("alt", alt) 19231 c.urlParams_.Set("prettyPrint", "false") 19232 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/combinedAudiences/{+combinedAudienceId}") 19233 urls += "?" + c.urlParams_.Encode() 19234 req, err := http.NewRequest("GET", urls, body) 19235 if err != nil { 19236 return nil, err 19237 } 19238 req.Header = reqHeaders 19239 googleapi.Expand(req.URL, map[string]string{ 19240 "combinedAudienceId": strconv.FormatInt(c.combinedAudienceId, 10), 19241 }) 19242 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19243} 19244 19245// Do executes the "displayvideo.combinedAudiences.get" call. 19246// Exactly one of *CombinedAudience or error will be non-nil. Any 19247// non-2xx status code is an error. Response headers are in either 19248// *CombinedAudience.ServerResponse.Header or (if a response was 19249// returned at all) in error.(*googleapi.Error).Header. Use 19250// googleapi.IsNotModified to check whether the returned error was 19251// because http.StatusNotModified was returned. 19252func (c *CombinedAudiencesGetCall) Do(opts ...googleapi.CallOption) (*CombinedAudience, error) { 19253 gensupport.SetOptions(c.urlParams_, opts...) 19254 res, err := c.doRequest("json") 19255 if res != nil && res.StatusCode == http.StatusNotModified { 19256 if res.Body != nil { 19257 res.Body.Close() 19258 } 19259 return nil, &googleapi.Error{ 19260 Code: res.StatusCode, 19261 Header: res.Header, 19262 } 19263 } 19264 if err != nil { 19265 return nil, err 19266 } 19267 defer googleapi.CloseBody(res) 19268 if err := googleapi.CheckResponse(res); err != nil { 19269 return nil, err 19270 } 19271 ret := &CombinedAudience{ 19272 ServerResponse: googleapi.ServerResponse{ 19273 Header: res.Header, 19274 HTTPStatusCode: res.StatusCode, 19275 }, 19276 } 19277 target := &ret 19278 if err := gensupport.DecodeResponse(target, res); err != nil { 19279 return nil, err 19280 } 19281 return ret, nil 19282 // { 19283 // "description": "Gets a combined audience.", 19284 // "flatPath": "v1/combinedAudiences/{combinedAudiencesId}", 19285 // "httpMethod": "GET", 19286 // "id": "displayvideo.combinedAudiences.get", 19287 // "parameterOrder": [ 19288 // "combinedAudienceId" 19289 // ], 19290 // "parameters": { 19291 // "advertiserId": { 19292 // "description": "The ID of the advertiser that has access to the fetched combined\naudience.", 19293 // "format": "int64", 19294 // "location": "query", 19295 // "type": "string" 19296 // }, 19297 // "combinedAudienceId": { 19298 // "description": "Required. The ID of the combined audience to fetch.", 19299 // "format": "int64", 19300 // "location": "path", 19301 // "pattern": "^[^/]+$", 19302 // "required": true, 19303 // "type": "string" 19304 // }, 19305 // "partnerId": { 19306 // "description": "The ID of the partner that has access to the fetched combined audience.", 19307 // "format": "int64", 19308 // "location": "query", 19309 // "type": "string" 19310 // } 19311 // }, 19312 // "path": "v1/combinedAudiences/{+combinedAudienceId}", 19313 // "response": { 19314 // "$ref": "CombinedAudience" 19315 // }, 19316 // "scopes": [ 19317 // "https://www.googleapis.com/auth/display-video" 19318 // ] 19319 // } 19320 19321} 19322 19323// method id "displayvideo.combinedAudiences.list": 19324 19325type CombinedAudiencesListCall struct { 19326 s *Service 19327 urlParams_ gensupport.URLParams 19328 ifNoneMatch_ string 19329 ctx_ context.Context 19330 header_ http.Header 19331} 19332 19333// List: Lists combined audiences. 19334// 19335// The order is defined by the 19336// order_by parameter. 19337func (r *CombinedAudiencesService) List() *CombinedAudiencesListCall { 19338 c := &CombinedAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19339 return c 19340} 19341 19342// AdvertiserId sets the optional parameter "advertiserId": The ID of 19343// the advertiser that has access to the fetched combined 19344// audiences. 19345func (c *CombinedAudiencesListCall) AdvertiserId(advertiserId int64) *CombinedAudiencesListCall { 19346 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 19347 return c 19348} 19349 19350// Filter sets the optional parameter "filter": Allows filtering by 19351// combined audience fields. 19352// 19353// Supported syntax: 19354// 19355// * Filter expressions for combined audiences currently can only 19356// contain at 19357// most one restriction. 19358// * A restriction has the form of `{field} {operator} {value}`. 19359// * The operator must be `CONTAINS (:)`. 19360// * Supported fields: 19361// - `displayName` 19362// 19363// Examples: 19364// 19365// * All combined audiences for which the display name contains 19366// "Google": 19367// `displayName : "Google". 19368// 19369// The length of this field should be no more than 500 characters. 19370func (c *CombinedAudiencesListCall) Filter(filter string) *CombinedAudiencesListCall { 19371 c.urlParams_.Set("filter", filter) 19372 return c 19373} 19374 19375// OrderBy sets the optional parameter "orderBy": Field by which to sort 19376// the list. 19377// Acceptable values are: 19378// 19379// * `combinedAudienceId` (default) 19380// * `displayName` 19381// 19382// The default sorting order is ascending. To specify descending order 19383// for 19384// a field, a suffix "desc" should be added to the field name. 19385// Example: 19386// `displayName desc`. 19387func (c *CombinedAudiencesListCall) OrderBy(orderBy string) *CombinedAudiencesListCall { 19388 c.urlParams_.Set("orderBy", orderBy) 19389 return c 19390} 19391 19392// PageSize sets the optional parameter "pageSize": Requested page size. 19393// Must be between `1` and `100`. If unspecified will 19394// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 19395// value 19396// is specified. 19397func (c *CombinedAudiencesListCall) PageSize(pageSize int64) *CombinedAudiencesListCall { 19398 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19399 return c 19400} 19401 19402// PageToken sets the optional parameter "pageToken": A token 19403// identifying a page of results the server should return. 19404// Typically, this is the value of 19405// next_page_token 19406// returned from the previous call to `ListCombinedAudiences` method. 19407// If not specified, the first page of results will be returned. 19408func (c *CombinedAudiencesListCall) PageToken(pageToken string) *CombinedAudiencesListCall { 19409 c.urlParams_.Set("pageToken", pageToken) 19410 return c 19411} 19412 19413// PartnerId sets the optional parameter "partnerId": The ID of the 19414// partner that has access to the fetched combined audiences. 19415func (c *CombinedAudiencesListCall) PartnerId(partnerId int64) *CombinedAudiencesListCall { 19416 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 19417 return c 19418} 19419 19420// Fields allows partial responses to be retrieved. See 19421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19422// for more information. 19423func (c *CombinedAudiencesListCall) Fields(s ...googleapi.Field) *CombinedAudiencesListCall { 19424 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19425 return c 19426} 19427 19428// IfNoneMatch sets the optional parameter which makes the operation 19429// fail if the object's ETag matches the given value. This is useful for 19430// getting updates only after the object has changed since the last 19431// request. Use googleapi.IsNotModified to check whether the response 19432// error from Do is the result of In-None-Match. 19433func (c *CombinedAudiencesListCall) IfNoneMatch(entityTag string) *CombinedAudiencesListCall { 19434 c.ifNoneMatch_ = entityTag 19435 return c 19436} 19437 19438// Context sets the context to be used in this call's Do method. Any 19439// pending HTTP request will be aborted if the provided context is 19440// canceled. 19441func (c *CombinedAudiencesListCall) Context(ctx context.Context) *CombinedAudiencesListCall { 19442 c.ctx_ = ctx 19443 return c 19444} 19445 19446// Header returns an http.Header that can be modified by the caller to 19447// add HTTP headers to the request. 19448func (c *CombinedAudiencesListCall) Header() http.Header { 19449 if c.header_ == nil { 19450 c.header_ = make(http.Header) 19451 } 19452 return c.header_ 19453} 19454 19455func (c *CombinedAudiencesListCall) doRequest(alt string) (*http.Response, error) { 19456 reqHeaders := make(http.Header) 19457 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19458 for k, v := range c.header_ { 19459 reqHeaders[k] = v 19460 } 19461 reqHeaders.Set("User-Agent", c.s.userAgent()) 19462 if c.ifNoneMatch_ != "" { 19463 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19464 } 19465 var body io.Reader = nil 19466 c.urlParams_.Set("alt", alt) 19467 c.urlParams_.Set("prettyPrint", "false") 19468 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/combinedAudiences") 19469 urls += "?" + c.urlParams_.Encode() 19470 req, err := http.NewRequest("GET", urls, body) 19471 if err != nil { 19472 return nil, err 19473 } 19474 req.Header = reqHeaders 19475 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19476} 19477 19478// Do executes the "displayvideo.combinedAudiences.list" call. 19479// Exactly one of *ListCombinedAudiencesResponse or error will be 19480// non-nil. Any non-2xx status code is an error. Response headers are in 19481// either *ListCombinedAudiencesResponse.ServerResponse.Header or (if a 19482// response was returned at all) in error.(*googleapi.Error).Header. Use 19483// googleapi.IsNotModified to check whether the returned error was 19484// because http.StatusNotModified was returned. 19485func (c *CombinedAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListCombinedAudiencesResponse, error) { 19486 gensupport.SetOptions(c.urlParams_, opts...) 19487 res, err := c.doRequest("json") 19488 if res != nil && res.StatusCode == http.StatusNotModified { 19489 if res.Body != nil { 19490 res.Body.Close() 19491 } 19492 return nil, &googleapi.Error{ 19493 Code: res.StatusCode, 19494 Header: res.Header, 19495 } 19496 } 19497 if err != nil { 19498 return nil, err 19499 } 19500 defer googleapi.CloseBody(res) 19501 if err := googleapi.CheckResponse(res); err != nil { 19502 return nil, err 19503 } 19504 ret := &ListCombinedAudiencesResponse{ 19505 ServerResponse: googleapi.ServerResponse{ 19506 Header: res.Header, 19507 HTTPStatusCode: res.StatusCode, 19508 }, 19509 } 19510 target := &ret 19511 if err := gensupport.DecodeResponse(target, res); err != nil { 19512 return nil, err 19513 } 19514 return ret, nil 19515 // { 19516 // "description": "Lists combined audiences.\n\nThe order is defined by the\norder_by parameter.", 19517 // "flatPath": "v1/combinedAudiences", 19518 // "httpMethod": "GET", 19519 // "id": "displayvideo.combinedAudiences.list", 19520 // "parameterOrder": [], 19521 // "parameters": { 19522 // "advertiserId": { 19523 // "description": "The ID of the advertiser that has access to the fetched combined\naudiences.", 19524 // "format": "int64", 19525 // "location": "query", 19526 // "type": "string" 19527 // }, 19528 // "filter": { 19529 // "description": "Allows filtering by combined audience fields.\n\nSupported syntax:\n\n* Filter expressions for combined audiences currently can only contain at\nmost one restriction.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `CONTAINS (:)`.\n* Supported fields:\n - `displayName`\n\nExamples:\n\n* All combined audiences for which the display name contains \"Google\":\n`displayName : \"Google\"`.\n\nThe length of this field should be no more than 500 characters.", 19530 // "location": "query", 19531 // "type": "string" 19532 // }, 19533 // "orderBy": { 19534 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `combinedAudienceId` (default)\n* `displayName`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 19535 // "location": "query", 19536 // "type": "string" 19537 // }, 19538 // "pageSize": { 19539 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 19540 // "format": "int32", 19541 // "location": "query", 19542 // "type": "integer" 19543 // }, 19544 // "pageToken": { 19545 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListCombinedAudiences` method.\nIf not specified, the first page of results will be returned.", 19546 // "location": "query", 19547 // "type": "string" 19548 // }, 19549 // "partnerId": { 19550 // "description": "The ID of the partner that has access to the fetched combined audiences.", 19551 // "format": "int64", 19552 // "location": "query", 19553 // "type": "string" 19554 // } 19555 // }, 19556 // "path": "v1/combinedAudiences", 19557 // "response": { 19558 // "$ref": "ListCombinedAudiencesResponse" 19559 // }, 19560 // "scopes": [ 19561 // "https://www.googleapis.com/auth/display-video" 19562 // ] 19563 // } 19564 19565} 19566 19567// Pages invokes f for each page of results. 19568// A non-nil error returned from f will halt the iteration. 19569// The provided context supersedes any context provided to the Context method. 19570func (c *CombinedAudiencesListCall) Pages(ctx context.Context, f func(*ListCombinedAudiencesResponse) error) error { 19571 c.ctx_ = ctx 19572 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19573 for { 19574 x, err := c.Do() 19575 if err != nil { 19576 return err 19577 } 19578 if err := f(x); err != nil { 19579 return err 19580 } 19581 if x.NextPageToken == "" { 19582 return nil 19583 } 19584 c.PageToken(x.NextPageToken) 19585 } 19586} 19587 19588// method id "displayvideo.customLists.get": 19589 19590type CustomListsGetCall struct { 19591 s *Service 19592 customListId int64 19593 urlParams_ gensupport.URLParams 19594 ifNoneMatch_ string 19595 ctx_ context.Context 19596 header_ http.Header 19597} 19598 19599// Get: Gets a custom list. 19600func (r *CustomListsService) Get(customListId int64) *CustomListsGetCall { 19601 c := &CustomListsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19602 c.customListId = customListId 19603 return c 19604} 19605 19606// AdvertiserId sets the optional parameter "advertiserId": The ID of 19607// the DV360 advertiser that has access to the fetched custom 19608// lists. 19609func (c *CustomListsGetCall) AdvertiserId(advertiserId int64) *CustomListsGetCall { 19610 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 19611 return c 19612} 19613 19614// Fields allows partial responses to be retrieved. See 19615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19616// for more information. 19617func (c *CustomListsGetCall) Fields(s ...googleapi.Field) *CustomListsGetCall { 19618 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19619 return c 19620} 19621 19622// IfNoneMatch sets the optional parameter which makes the operation 19623// fail if the object's ETag matches the given value. This is useful for 19624// getting updates only after the object has changed since the last 19625// request. Use googleapi.IsNotModified to check whether the response 19626// error from Do is the result of In-None-Match. 19627func (c *CustomListsGetCall) IfNoneMatch(entityTag string) *CustomListsGetCall { 19628 c.ifNoneMatch_ = entityTag 19629 return c 19630} 19631 19632// Context sets the context to be used in this call's Do method. Any 19633// pending HTTP request will be aborted if the provided context is 19634// canceled. 19635func (c *CustomListsGetCall) Context(ctx context.Context) *CustomListsGetCall { 19636 c.ctx_ = ctx 19637 return c 19638} 19639 19640// Header returns an http.Header that can be modified by the caller to 19641// add HTTP headers to the request. 19642func (c *CustomListsGetCall) Header() http.Header { 19643 if c.header_ == nil { 19644 c.header_ = make(http.Header) 19645 } 19646 return c.header_ 19647} 19648 19649func (c *CustomListsGetCall) doRequest(alt string) (*http.Response, error) { 19650 reqHeaders := make(http.Header) 19651 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19652 for k, v := range c.header_ { 19653 reqHeaders[k] = v 19654 } 19655 reqHeaders.Set("User-Agent", c.s.userAgent()) 19656 if c.ifNoneMatch_ != "" { 19657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19658 } 19659 var body io.Reader = nil 19660 c.urlParams_.Set("alt", alt) 19661 c.urlParams_.Set("prettyPrint", "false") 19662 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customLists/{+customListId}") 19663 urls += "?" + c.urlParams_.Encode() 19664 req, err := http.NewRequest("GET", urls, body) 19665 if err != nil { 19666 return nil, err 19667 } 19668 req.Header = reqHeaders 19669 googleapi.Expand(req.URL, map[string]string{ 19670 "customListId": strconv.FormatInt(c.customListId, 10), 19671 }) 19672 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19673} 19674 19675// Do executes the "displayvideo.customLists.get" call. 19676// Exactly one of *CustomList or error will be non-nil. Any non-2xx 19677// status code is an error. Response headers are in either 19678// *CustomList.ServerResponse.Header or (if a response was returned at 19679// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 19680// to check whether the returned error was because 19681// http.StatusNotModified was returned. 19682func (c *CustomListsGetCall) Do(opts ...googleapi.CallOption) (*CustomList, error) { 19683 gensupport.SetOptions(c.urlParams_, opts...) 19684 res, err := c.doRequest("json") 19685 if res != nil && res.StatusCode == http.StatusNotModified { 19686 if res.Body != nil { 19687 res.Body.Close() 19688 } 19689 return nil, &googleapi.Error{ 19690 Code: res.StatusCode, 19691 Header: res.Header, 19692 } 19693 } 19694 if err != nil { 19695 return nil, err 19696 } 19697 defer googleapi.CloseBody(res) 19698 if err := googleapi.CheckResponse(res); err != nil { 19699 return nil, err 19700 } 19701 ret := &CustomList{ 19702 ServerResponse: googleapi.ServerResponse{ 19703 Header: res.Header, 19704 HTTPStatusCode: res.StatusCode, 19705 }, 19706 } 19707 target := &ret 19708 if err := gensupport.DecodeResponse(target, res); err != nil { 19709 return nil, err 19710 } 19711 return ret, nil 19712 // { 19713 // "description": "Gets a custom list.", 19714 // "flatPath": "v1/customLists/{customListsId}", 19715 // "httpMethod": "GET", 19716 // "id": "displayvideo.customLists.get", 19717 // "parameterOrder": [ 19718 // "customListId" 19719 // ], 19720 // "parameters": { 19721 // "advertiserId": { 19722 // "description": "The ID of the DV360 advertiser that has access to the fetched custom\nlists.", 19723 // "format": "int64", 19724 // "location": "query", 19725 // "type": "string" 19726 // }, 19727 // "customListId": { 19728 // "description": "Required. The ID of the custom list to fetch.", 19729 // "format": "int64", 19730 // "location": "path", 19731 // "pattern": "^[^/]+$", 19732 // "required": true, 19733 // "type": "string" 19734 // } 19735 // }, 19736 // "path": "v1/customLists/{+customListId}", 19737 // "response": { 19738 // "$ref": "CustomList" 19739 // }, 19740 // "scopes": [ 19741 // "https://www.googleapis.com/auth/display-video" 19742 // ] 19743 // } 19744 19745} 19746 19747// method id "displayvideo.customLists.list": 19748 19749type CustomListsListCall struct { 19750 s *Service 19751 urlParams_ gensupport.URLParams 19752 ifNoneMatch_ string 19753 ctx_ context.Context 19754 header_ http.Header 19755} 19756 19757// List: Lists custom lists. 19758// 19759// The order is defined by the order_by 19760// parameter. 19761func (r *CustomListsService) List() *CustomListsListCall { 19762 c := &CustomListsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 19763 return c 19764} 19765 19766// AdvertiserId sets the optional parameter "advertiserId": The ID of 19767// the DV360 advertiser that has access to the fetched custom 19768// lists. 19769func (c *CustomListsListCall) AdvertiserId(advertiserId int64) *CustomListsListCall { 19770 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 19771 return c 19772} 19773 19774// Filter sets the optional parameter "filter": Allows filtering by 19775// custom list fields. 19776// 19777// Supported syntax: 19778// 19779// * Filter expressions for custom lists currently can only contain 19780// at 19781// most one restriction. 19782// * A restriction has the form of `{field} {operator} {value}`. 19783// * The operator must be `CONTAINS (:)`. 19784// * Supported fields: 19785// - `displayName` 19786// 19787// Examples: 19788// 19789// * All custom lists for which the display name contains 19790// "Google": 19791// `displayName : "Google". 19792// 19793// The length of this field should be no more than 500 characters. 19794func (c *CustomListsListCall) Filter(filter string) *CustomListsListCall { 19795 c.urlParams_.Set("filter", filter) 19796 return c 19797} 19798 19799// OrderBy sets the optional parameter "orderBy": Field by which to sort 19800// the list. 19801// Acceptable values are: 19802// 19803// * `customListId` (default) 19804// * `displayName` 19805// 19806// The default sorting order is ascending. To specify descending order 19807// for 19808// a field, a suffix "desc" should be added to the field name. 19809// Example: 19810// `displayName desc`. 19811func (c *CustomListsListCall) OrderBy(orderBy string) *CustomListsListCall { 19812 c.urlParams_.Set("orderBy", orderBy) 19813 return c 19814} 19815 19816// PageSize sets the optional parameter "pageSize": Requested page size. 19817// Must be between `1` and `100`. If unspecified will 19818// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 19819// value 19820// is specified. 19821func (c *CustomListsListCall) PageSize(pageSize int64) *CustomListsListCall { 19822 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 19823 return c 19824} 19825 19826// PageToken sets the optional parameter "pageToken": A token 19827// identifying a page of results the server should return. 19828// Typically, this is the value of 19829// next_page_token 19830// returned from the previous call to `ListCustomLists` method. 19831// If not specified, the first page of results will be returned. 19832func (c *CustomListsListCall) PageToken(pageToken string) *CustomListsListCall { 19833 c.urlParams_.Set("pageToken", pageToken) 19834 return c 19835} 19836 19837// Fields allows partial responses to be retrieved. See 19838// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 19839// for more information. 19840func (c *CustomListsListCall) Fields(s ...googleapi.Field) *CustomListsListCall { 19841 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 19842 return c 19843} 19844 19845// IfNoneMatch sets the optional parameter which makes the operation 19846// fail if the object's ETag matches the given value. This is useful for 19847// getting updates only after the object has changed since the last 19848// request. Use googleapi.IsNotModified to check whether the response 19849// error from Do is the result of In-None-Match. 19850func (c *CustomListsListCall) IfNoneMatch(entityTag string) *CustomListsListCall { 19851 c.ifNoneMatch_ = entityTag 19852 return c 19853} 19854 19855// Context sets the context to be used in this call's Do method. Any 19856// pending HTTP request will be aborted if the provided context is 19857// canceled. 19858func (c *CustomListsListCall) Context(ctx context.Context) *CustomListsListCall { 19859 c.ctx_ = ctx 19860 return c 19861} 19862 19863// Header returns an http.Header that can be modified by the caller to 19864// add HTTP headers to the request. 19865func (c *CustomListsListCall) Header() http.Header { 19866 if c.header_ == nil { 19867 c.header_ = make(http.Header) 19868 } 19869 return c.header_ 19870} 19871 19872func (c *CustomListsListCall) doRequest(alt string) (*http.Response, error) { 19873 reqHeaders := make(http.Header) 19874 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 19875 for k, v := range c.header_ { 19876 reqHeaders[k] = v 19877 } 19878 reqHeaders.Set("User-Agent", c.s.userAgent()) 19879 if c.ifNoneMatch_ != "" { 19880 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 19881 } 19882 var body io.Reader = nil 19883 c.urlParams_.Set("alt", alt) 19884 c.urlParams_.Set("prettyPrint", "false") 19885 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/customLists") 19886 urls += "?" + c.urlParams_.Encode() 19887 req, err := http.NewRequest("GET", urls, body) 19888 if err != nil { 19889 return nil, err 19890 } 19891 req.Header = reqHeaders 19892 return gensupport.SendRequest(c.ctx_, c.s.client, req) 19893} 19894 19895// Do executes the "displayvideo.customLists.list" call. 19896// Exactly one of *ListCustomListsResponse or error will be non-nil. Any 19897// non-2xx status code is an error. Response headers are in either 19898// *ListCustomListsResponse.ServerResponse.Header or (if a response was 19899// returned at all) in error.(*googleapi.Error).Header. Use 19900// googleapi.IsNotModified to check whether the returned error was 19901// because http.StatusNotModified was returned. 19902func (c *CustomListsListCall) Do(opts ...googleapi.CallOption) (*ListCustomListsResponse, error) { 19903 gensupport.SetOptions(c.urlParams_, opts...) 19904 res, err := c.doRequest("json") 19905 if res != nil && res.StatusCode == http.StatusNotModified { 19906 if res.Body != nil { 19907 res.Body.Close() 19908 } 19909 return nil, &googleapi.Error{ 19910 Code: res.StatusCode, 19911 Header: res.Header, 19912 } 19913 } 19914 if err != nil { 19915 return nil, err 19916 } 19917 defer googleapi.CloseBody(res) 19918 if err := googleapi.CheckResponse(res); err != nil { 19919 return nil, err 19920 } 19921 ret := &ListCustomListsResponse{ 19922 ServerResponse: googleapi.ServerResponse{ 19923 Header: res.Header, 19924 HTTPStatusCode: res.StatusCode, 19925 }, 19926 } 19927 target := &ret 19928 if err := gensupport.DecodeResponse(target, res); err != nil { 19929 return nil, err 19930 } 19931 return ret, nil 19932 // { 19933 // "description": "Lists custom lists.\n\nThe order is defined by the order_by\nparameter.", 19934 // "flatPath": "v1/customLists", 19935 // "httpMethod": "GET", 19936 // "id": "displayvideo.customLists.list", 19937 // "parameterOrder": [], 19938 // "parameters": { 19939 // "advertiserId": { 19940 // "description": "The ID of the DV360 advertiser that has access to the fetched custom\nlists.", 19941 // "format": "int64", 19942 // "location": "query", 19943 // "type": "string" 19944 // }, 19945 // "filter": { 19946 // "description": "Allows filtering by custom list fields.\n\nSupported syntax:\n\n* Filter expressions for custom lists currently can only contain at\nmost one restriction.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `CONTAINS (:)`.\n* Supported fields:\n - `displayName`\n\nExamples:\n\n* All custom lists for which the display name contains \"Google\":\n`displayName : \"Google\"`.\n\nThe length of this field should be no more than 500 characters.", 19947 // "location": "query", 19948 // "type": "string" 19949 // }, 19950 // "orderBy": { 19951 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `customListId` (default)\n* `displayName`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 19952 // "location": "query", 19953 // "type": "string" 19954 // }, 19955 // "pageSize": { 19956 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 19957 // "format": "int32", 19958 // "location": "query", 19959 // "type": "integer" 19960 // }, 19961 // "pageToken": { 19962 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListCustomLists` method.\nIf not specified, the first page of results will be returned.", 19963 // "location": "query", 19964 // "type": "string" 19965 // } 19966 // }, 19967 // "path": "v1/customLists", 19968 // "response": { 19969 // "$ref": "ListCustomListsResponse" 19970 // }, 19971 // "scopes": [ 19972 // "https://www.googleapis.com/auth/display-video" 19973 // ] 19974 // } 19975 19976} 19977 19978// Pages invokes f for each page of results. 19979// A non-nil error returned from f will halt the iteration. 19980// The provided context supersedes any context provided to the Context method. 19981func (c *CustomListsListCall) Pages(ctx context.Context, f func(*ListCustomListsResponse) error) error { 19982 c.ctx_ = ctx 19983 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 19984 for { 19985 x, err := c.Do() 19986 if err != nil { 19987 return err 19988 } 19989 if err := f(x); err != nil { 19990 return err 19991 } 19992 if x.NextPageToken == "" { 19993 return nil 19994 } 19995 c.PageToken(x.NextPageToken) 19996 } 19997} 19998 19999// method id "displayvideo.firstAndThirdPartyAudiences.get": 20000 20001type FirstAndThirdPartyAudiencesGetCall struct { 20002 s *Service 20003 firstAndThirdPartyAudienceId int64 20004 urlParams_ gensupport.URLParams 20005 ifNoneMatch_ string 20006 ctx_ context.Context 20007 header_ http.Header 20008} 20009 20010// Get: Gets a first and third party audience. 20011func (r *FirstAndThirdPartyAudiencesService) Get(firstAndThirdPartyAudienceId int64) *FirstAndThirdPartyAudiencesGetCall { 20012 c := &FirstAndThirdPartyAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20013 c.firstAndThirdPartyAudienceId = firstAndThirdPartyAudienceId 20014 return c 20015} 20016 20017// AdvertiserId sets the optional parameter "advertiserId": The ID of 20018// the advertiser that has access to the fetched first and 20019// third party audience. 20020func (c *FirstAndThirdPartyAudiencesGetCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesGetCall { 20021 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 20022 return c 20023} 20024 20025// PartnerId sets the optional parameter "partnerId": The ID of the 20026// partner that has access to the fetched first and 20027// third party audience. 20028func (c *FirstAndThirdPartyAudiencesGetCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesGetCall { 20029 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20030 return c 20031} 20032 20033// Fields allows partial responses to be retrieved. See 20034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20035// for more information. 20036func (c *FirstAndThirdPartyAudiencesGetCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesGetCall { 20037 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20038 return c 20039} 20040 20041// IfNoneMatch sets the optional parameter which makes the operation 20042// fail if the object's ETag matches the given value. This is useful for 20043// getting updates only after the object has changed since the last 20044// request. Use googleapi.IsNotModified to check whether the response 20045// error from Do is the result of In-None-Match. 20046func (c *FirstAndThirdPartyAudiencesGetCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesGetCall { 20047 c.ifNoneMatch_ = entityTag 20048 return c 20049} 20050 20051// Context sets the context to be used in this call's Do method. Any 20052// pending HTTP request will be aborted if the provided context is 20053// canceled. 20054func (c *FirstAndThirdPartyAudiencesGetCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesGetCall { 20055 c.ctx_ = ctx 20056 return c 20057} 20058 20059// Header returns an http.Header that can be modified by the caller to 20060// add HTTP headers to the request. 20061func (c *FirstAndThirdPartyAudiencesGetCall) Header() http.Header { 20062 if c.header_ == nil { 20063 c.header_ = make(http.Header) 20064 } 20065 return c.header_ 20066} 20067 20068func (c *FirstAndThirdPartyAudiencesGetCall) doRequest(alt string) (*http.Response, error) { 20069 reqHeaders := make(http.Header) 20070 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20071 for k, v := range c.header_ { 20072 reqHeaders[k] = v 20073 } 20074 reqHeaders.Set("User-Agent", c.s.userAgent()) 20075 if c.ifNoneMatch_ != "" { 20076 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20077 } 20078 var body io.Reader = nil 20079 c.urlParams_.Set("alt", alt) 20080 c.urlParams_.Set("prettyPrint", "false") 20081 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}") 20082 urls += "?" + c.urlParams_.Encode() 20083 req, err := http.NewRequest("GET", urls, body) 20084 if err != nil { 20085 return nil, err 20086 } 20087 req.Header = reqHeaders 20088 googleapi.Expand(req.URL, map[string]string{ 20089 "firstAndThirdPartyAudienceId": strconv.FormatInt(c.firstAndThirdPartyAudienceId, 10), 20090 }) 20091 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20092} 20093 20094// Do executes the "displayvideo.firstAndThirdPartyAudiences.get" call. 20095// Exactly one of *FirstAndThirdPartyAudience or error will be non-nil. 20096// Any non-2xx status code is an error. Response headers are in either 20097// *FirstAndThirdPartyAudience.ServerResponse.Header or (if a response 20098// was returned at all) in error.(*googleapi.Error).Header. Use 20099// googleapi.IsNotModified to check whether the returned error was 20100// because http.StatusNotModified was returned. 20101func (c *FirstAndThirdPartyAudiencesGetCall) Do(opts ...googleapi.CallOption) (*FirstAndThirdPartyAudience, error) { 20102 gensupport.SetOptions(c.urlParams_, opts...) 20103 res, err := c.doRequest("json") 20104 if res != nil && res.StatusCode == http.StatusNotModified { 20105 if res.Body != nil { 20106 res.Body.Close() 20107 } 20108 return nil, &googleapi.Error{ 20109 Code: res.StatusCode, 20110 Header: res.Header, 20111 } 20112 } 20113 if err != nil { 20114 return nil, err 20115 } 20116 defer googleapi.CloseBody(res) 20117 if err := googleapi.CheckResponse(res); err != nil { 20118 return nil, err 20119 } 20120 ret := &FirstAndThirdPartyAudience{ 20121 ServerResponse: googleapi.ServerResponse{ 20122 Header: res.Header, 20123 HTTPStatusCode: res.StatusCode, 20124 }, 20125 } 20126 target := &ret 20127 if err := gensupport.DecodeResponse(target, res); err != nil { 20128 return nil, err 20129 } 20130 return ret, nil 20131 // { 20132 // "description": "Gets a first and third party audience.", 20133 // "flatPath": "v1/firstAndThirdPartyAudiences/{firstAndThirdPartyAudiencesId}", 20134 // "httpMethod": "GET", 20135 // "id": "displayvideo.firstAndThirdPartyAudiences.get", 20136 // "parameterOrder": [ 20137 // "firstAndThirdPartyAudienceId" 20138 // ], 20139 // "parameters": { 20140 // "advertiserId": { 20141 // "description": "The ID of the advertiser that has access to the fetched first and\nthird party audience.", 20142 // "format": "int64", 20143 // "location": "query", 20144 // "type": "string" 20145 // }, 20146 // "firstAndThirdPartyAudienceId": { 20147 // "description": "Required. The ID of the first and third party audience to fetch.", 20148 // "format": "int64", 20149 // "location": "path", 20150 // "pattern": "^[^/]+$", 20151 // "required": true, 20152 // "type": "string" 20153 // }, 20154 // "partnerId": { 20155 // "description": "The ID of the partner that has access to the fetched first and\nthird party audience.", 20156 // "format": "int64", 20157 // "location": "query", 20158 // "type": "string" 20159 // } 20160 // }, 20161 // "path": "v1/firstAndThirdPartyAudiences/{+firstAndThirdPartyAudienceId}", 20162 // "response": { 20163 // "$ref": "FirstAndThirdPartyAudience" 20164 // }, 20165 // "scopes": [ 20166 // "https://www.googleapis.com/auth/display-video" 20167 // ] 20168 // } 20169 20170} 20171 20172// method id "displayvideo.firstAndThirdPartyAudiences.list": 20173 20174type FirstAndThirdPartyAudiencesListCall struct { 20175 s *Service 20176 urlParams_ gensupport.URLParams 20177 ifNoneMatch_ string 20178 ctx_ context.Context 20179 header_ http.Header 20180} 20181 20182// List: Lists first and third party audiences. 20183// 20184// The order is defined by the 20185// order_by parameter. 20186func (r *FirstAndThirdPartyAudiencesService) List() *FirstAndThirdPartyAudiencesListCall { 20187 c := &FirstAndThirdPartyAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20188 return c 20189} 20190 20191// AdvertiserId sets the optional parameter "advertiserId": The ID of 20192// the advertiser that has access to the fetched first and 20193// third party audiences. 20194func (c *FirstAndThirdPartyAudiencesListCall) AdvertiserId(advertiserId int64) *FirstAndThirdPartyAudiencesListCall { 20195 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 20196 return c 20197} 20198 20199// Filter sets the optional parameter "filter": Allows filtering by 20200// first and third party audience fields. 20201// 20202// Supported syntax: 20203// 20204// * Filter expressions for first and third party audiences currently 20205// can 20206// only contain at most one restriction. 20207// * A restriction has the form of `{field} {operator} {value}`. 20208// * The operator must be `CONTAINS (:)`. 20209// * Supported fields: 20210// - `displayName` 20211// 20212// Examples: 20213// 20214// * All first and third party audiences for which the display name 20215// contains 20216// "Google": `displayName : "Google". 20217// 20218// The length of this field should be no more than 500 characters. 20219func (c *FirstAndThirdPartyAudiencesListCall) Filter(filter string) *FirstAndThirdPartyAudiencesListCall { 20220 c.urlParams_.Set("filter", filter) 20221 return c 20222} 20223 20224// OrderBy sets the optional parameter "orderBy": Field by which to sort 20225// the list. 20226// Acceptable values are: 20227// 20228// * `firstAndThirdPartyAudienceId` (default) 20229// * `displayName` 20230// 20231// The default sorting order is ascending. To specify descending order 20232// for 20233// a field, a suffix "desc" should be added to the field name. 20234// Example: 20235// `displayName desc`. 20236func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndThirdPartyAudiencesListCall { 20237 c.urlParams_.Set("orderBy", orderBy) 20238 return c 20239} 20240 20241// PageSize sets the optional parameter "pageSize": Requested page size. 20242// Must be between `1` and `100`. If unspecified will 20243// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 20244// value 20245// is specified. 20246func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { 20247 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 20248 return c 20249} 20250 20251// PageToken sets the optional parameter "pageToken": A token 20252// identifying a page of results the server should return. 20253// Typically, this is the value of 20254// next_page_token 20255// returned from the previous call to 20256// `ListFirstAndThirdPartyAudiences` 20257// method. If not specified, the first page of results will be returned. 20258func (c *FirstAndThirdPartyAudiencesListCall) PageToken(pageToken string) *FirstAndThirdPartyAudiencesListCall { 20259 c.urlParams_.Set("pageToken", pageToken) 20260 return c 20261} 20262 20263// PartnerId sets the optional parameter "partnerId": The ID of the 20264// partner that has access to the fetched first and 20265// third party audiences. 20266func (c *FirstAndThirdPartyAudiencesListCall) PartnerId(partnerId int64) *FirstAndThirdPartyAudiencesListCall { 20267 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20268 return c 20269} 20270 20271// Fields allows partial responses to be retrieved. See 20272// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20273// for more information. 20274func (c *FirstAndThirdPartyAudiencesListCall) Fields(s ...googleapi.Field) *FirstAndThirdPartyAudiencesListCall { 20275 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20276 return c 20277} 20278 20279// IfNoneMatch sets the optional parameter which makes the operation 20280// fail if the object's ETag matches the given value. This is useful for 20281// getting updates only after the object has changed since the last 20282// request. Use googleapi.IsNotModified to check whether the response 20283// error from Do is the result of In-None-Match. 20284func (c *FirstAndThirdPartyAudiencesListCall) IfNoneMatch(entityTag string) *FirstAndThirdPartyAudiencesListCall { 20285 c.ifNoneMatch_ = entityTag 20286 return c 20287} 20288 20289// Context sets the context to be used in this call's Do method. Any 20290// pending HTTP request will be aborted if the provided context is 20291// canceled. 20292func (c *FirstAndThirdPartyAudiencesListCall) Context(ctx context.Context) *FirstAndThirdPartyAudiencesListCall { 20293 c.ctx_ = ctx 20294 return c 20295} 20296 20297// Header returns an http.Header that can be modified by the caller to 20298// add HTTP headers to the request. 20299func (c *FirstAndThirdPartyAudiencesListCall) Header() http.Header { 20300 if c.header_ == nil { 20301 c.header_ = make(http.Header) 20302 } 20303 return c.header_ 20304} 20305 20306func (c *FirstAndThirdPartyAudiencesListCall) doRequest(alt string) (*http.Response, error) { 20307 reqHeaders := make(http.Header) 20308 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20309 for k, v := range c.header_ { 20310 reqHeaders[k] = v 20311 } 20312 reqHeaders.Set("User-Agent", c.s.userAgent()) 20313 if c.ifNoneMatch_ != "" { 20314 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20315 } 20316 var body io.Reader = nil 20317 c.urlParams_.Set("alt", alt) 20318 c.urlParams_.Set("prettyPrint", "false") 20319 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/firstAndThirdPartyAudiences") 20320 urls += "?" + c.urlParams_.Encode() 20321 req, err := http.NewRequest("GET", urls, body) 20322 if err != nil { 20323 return nil, err 20324 } 20325 req.Header = reqHeaders 20326 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20327} 20328 20329// Do executes the "displayvideo.firstAndThirdPartyAudiences.list" call. 20330// Exactly one of *ListFirstAndThirdPartyAudiencesResponse or error will 20331// be non-nil. Any non-2xx status code is an error. Response headers are 20332// in either 20333// *ListFirstAndThirdPartyAudiencesResponse.ServerResponse.Header or (if 20334// a response was returned at all) in error.(*googleapi.Error).Header. 20335// Use googleapi.IsNotModified to check whether the returned error was 20336// because http.StatusNotModified was returned. 20337func (c *FirstAndThirdPartyAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListFirstAndThirdPartyAudiencesResponse, error) { 20338 gensupport.SetOptions(c.urlParams_, opts...) 20339 res, err := c.doRequest("json") 20340 if res != nil && res.StatusCode == http.StatusNotModified { 20341 if res.Body != nil { 20342 res.Body.Close() 20343 } 20344 return nil, &googleapi.Error{ 20345 Code: res.StatusCode, 20346 Header: res.Header, 20347 } 20348 } 20349 if err != nil { 20350 return nil, err 20351 } 20352 defer googleapi.CloseBody(res) 20353 if err := googleapi.CheckResponse(res); err != nil { 20354 return nil, err 20355 } 20356 ret := &ListFirstAndThirdPartyAudiencesResponse{ 20357 ServerResponse: googleapi.ServerResponse{ 20358 Header: res.Header, 20359 HTTPStatusCode: res.StatusCode, 20360 }, 20361 } 20362 target := &ret 20363 if err := gensupport.DecodeResponse(target, res); err != nil { 20364 return nil, err 20365 } 20366 return ret, nil 20367 // { 20368 // "description": "Lists first and third party audiences.\n\nThe order is defined by the\norder_by parameter.", 20369 // "flatPath": "v1/firstAndThirdPartyAudiences", 20370 // "httpMethod": "GET", 20371 // "id": "displayvideo.firstAndThirdPartyAudiences.list", 20372 // "parameterOrder": [], 20373 // "parameters": { 20374 // "advertiserId": { 20375 // "description": "The ID of the advertiser that has access to the fetched first and\nthird party audiences.", 20376 // "format": "int64", 20377 // "location": "query", 20378 // "type": "string" 20379 // }, 20380 // "filter": { 20381 // "description": "Allows filtering by first and third party audience fields.\n\nSupported syntax:\n\n* Filter expressions for first and third party audiences currently can\nonly contain at most one restriction.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `CONTAINS (:)`.\n* Supported fields:\n - `displayName`\n\nExamples:\n\n* All first and third party audiences for which the display name contains\n\"Google\": `displayName : \"Google\"`.\n\nThe length of this field should be no more than 500 characters.", 20382 // "location": "query", 20383 // "type": "string" 20384 // }, 20385 // "orderBy": { 20386 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `firstAndThirdPartyAudienceId` (default)\n* `displayName`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 20387 // "location": "query", 20388 // "type": "string" 20389 // }, 20390 // "pageSize": { 20391 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 20392 // "format": "int32", 20393 // "location": "query", 20394 // "type": "integer" 20395 // }, 20396 // "pageToken": { 20397 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListFirstAndThirdPartyAudiences`\nmethod. If not specified, the first page of results will be returned.", 20398 // "location": "query", 20399 // "type": "string" 20400 // }, 20401 // "partnerId": { 20402 // "description": "The ID of the partner that has access to the fetched first and\nthird party audiences.", 20403 // "format": "int64", 20404 // "location": "query", 20405 // "type": "string" 20406 // } 20407 // }, 20408 // "path": "v1/firstAndThirdPartyAudiences", 20409 // "response": { 20410 // "$ref": "ListFirstAndThirdPartyAudiencesResponse" 20411 // }, 20412 // "scopes": [ 20413 // "https://www.googleapis.com/auth/display-video" 20414 // ] 20415 // } 20416 20417} 20418 20419// Pages invokes f for each page of results. 20420// A non-nil error returned from f will halt the iteration. 20421// The provided context supersedes any context provided to the Context method. 20422func (c *FirstAndThirdPartyAudiencesListCall) Pages(ctx context.Context, f func(*ListFirstAndThirdPartyAudiencesResponse) error) error { 20423 c.ctx_ = ctx 20424 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 20425 for { 20426 x, err := c.Do() 20427 if err != nil { 20428 return err 20429 } 20430 if err := f(x); err != nil { 20431 return err 20432 } 20433 if x.NextPageToken == "" { 20434 return nil 20435 } 20436 c.PageToken(x.NextPageToken) 20437 } 20438} 20439 20440// method id "displayvideo.floodlightGroups.get": 20441 20442type FloodlightGroupsGetCall struct { 20443 s *Service 20444 floodlightGroupId int64 20445 urlParams_ gensupport.URLParams 20446 ifNoneMatch_ string 20447 ctx_ context.Context 20448 header_ http.Header 20449} 20450 20451// Get: Gets a Floodlight group. 20452func (r *FloodlightGroupsService) Get(floodlightGroupId int64) *FloodlightGroupsGetCall { 20453 c := &FloodlightGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20454 c.floodlightGroupId = floodlightGroupId 20455 return c 20456} 20457 20458// PartnerId sets the optional parameter "partnerId": Required. The 20459// partner context by which the Floodlight group is being accessed. 20460func (c *FloodlightGroupsGetCall) PartnerId(partnerId int64) *FloodlightGroupsGetCall { 20461 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20462 return c 20463} 20464 20465// Fields allows partial responses to be retrieved. See 20466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20467// for more information. 20468func (c *FloodlightGroupsGetCall) Fields(s ...googleapi.Field) *FloodlightGroupsGetCall { 20469 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20470 return c 20471} 20472 20473// IfNoneMatch sets the optional parameter which makes the operation 20474// fail if the object's ETag matches the given value. This is useful for 20475// getting updates only after the object has changed since the last 20476// request. Use googleapi.IsNotModified to check whether the response 20477// error from Do is the result of In-None-Match. 20478func (c *FloodlightGroupsGetCall) IfNoneMatch(entityTag string) *FloodlightGroupsGetCall { 20479 c.ifNoneMatch_ = entityTag 20480 return c 20481} 20482 20483// Context sets the context to be used in this call's Do method. Any 20484// pending HTTP request will be aborted if the provided context is 20485// canceled. 20486func (c *FloodlightGroupsGetCall) Context(ctx context.Context) *FloodlightGroupsGetCall { 20487 c.ctx_ = ctx 20488 return c 20489} 20490 20491// Header returns an http.Header that can be modified by the caller to 20492// add HTTP headers to the request. 20493func (c *FloodlightGroupsGetCall) Header() http.Header { 20494 if c.header_ == nil { 20495 c.header_ = make(http.Header) 20496 } 20497 return c.header_ 20498} 20499 20500func (c *FloodlightGroupsGetCall) doRequest(alt string) (*http.Response, error) { 20501 reqHeaders := make(http.Header) 20502 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20503 for k, v := range c.header_ { 20504 reqHeaders[k] = v 20505 } 20506 reqHeaders.Set("User-Agent", c.s.userAgent()) 20507 if c.ifNoneMatch_ != "" { 20508 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20509 } 20510 var body io.Reader = nil 20511 c.urlParams_.Set("alt", alt) 20512 c.urlParams_.Set("prettyPrint", "false") 20513 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/floodlightGroups/{+floodlightGroupId}") 20514 urls += "?" + c.urlParams_.Encode() 20515 req, err := http.NewRequest("GET", urls, body) 20516 if err != nil { 20517 return nil, err 20518 } 20519 req.Header = reqHeaders 20520 googleapi.Expand(req.URL, map[string]string{ 20521 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10), 20522 }) 20523 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20524} 20525 20526// Do executes the "displayvideo.floodlightGroups.get" call. 20527// Exactly one of *FloodlightGroup or error will be non-nil. Any non-2xx 20528// status code is an error. Response headers are in either 20529// *FloodlightGroup.ServerResponse.Header or (if a response was returned 20530// at all) in error.(*googleapi.Error).Header. Use 20531// googleapi.IsNotModified to check whether the returned error was 20532// because http.StatusNotModified was returned. 20533func (c *FloodlightGroupsGetCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) { 20534 gensupport.SetOptions(c.urlParams_, opts...) 20535 res, err := c.doRequest("json") 20536 if res != nil && res.StatusCode == http.StatusNotModified { 20537 if res.Body != nil { 20538 res.Body.Close() 20539 } 20540 return nil, &googleapi.Error{ 20541 Code: res.StatusCode, 20542 Header: res.Header, 20543 } 20544 } 20545 if err != nil { 20546 return nil, err 20547 } 20548 defer googleapi.CloseBody(res) 20549 if err := googleapi.CheckResponse(res); err != nil { 20550 return nil, err 20551 } 20552 ret := &FloodlightGroup{ 20553 ServerResponse: googleapi.ServerResponse{ 20554 Header: res.Header, 20555 HTTPStatusCode: res.StatusCode, 20556 }, 20557 } 20558 target := &ret 20559 if err := gensupport.DecodeResponse(target, res); err != nil { 20560 return nil, err 20561 } 20562 return ret, nil 20563 // { 20564 // "description": "Gets a Floodlight group.", 20565 // "flatPath": "v1/floodlightGroups/{floodlightGroupsId}", 20566 // "httpMethod": "GET", 20567 // "id": "displayvideo.floodlightGroups.get", 20568 // "parameterOrder": [ 20569 // "floodlightGroupId" 20570 // ], 20571 // "parameters": { 20572 // "floodlightGroupId": { 20573 // "description": "Required. The ID of the Floodlight group to fetch.", 20574 // "format": "int64", 20575 // "location": "path", 20576 // "pattern": "^[^/]+$", 20577 // "required": true, 20578 // "type": "string" 20579 // }, 20580 // "partnerId": { 20581 // "description": "Required. The partner context by which the Floodlight group is being accessed.", 20582 // "format": "int64", 20583 // "location": "query", 20584 // "type": "string" 20585 // } 20586 // }, 20587 // "path": "v1/floodlightGroups/{+floodlightGroupId}", 20588 // "response": { 20589 // "$ref": "FloodlightGroup" 20590 // }, 20591 // "scopes": [ 20592 // "https://www.googleapis.com/auth/display-video" 20593 // ] 20594 // } 20595 20596} 20597 20598// method id "displayvideo.floodlightGroups.patch": 20599 20600type FloodlightGroupsPatchCall struct { 20601 s *Service 20602 floodlightGroupId int64 20603 floodlightgroup *FloodlightGroup 20604 urlParams_ gensupport.URLParams 20605 ctx_ context.Context 20606 header_ http.Header 20607} 20608 20609// Patch: Updates an existing Floodlight group. 20610// Returns the updated Floodlight group if successful. 20611func (r *FloodlightGroupsService) Patch(floodlightGroupId int64, floodlightgroup *FloodlightGroup) *FloodlightGroupsPatchCall { 20612 c := &FloodlightGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20613 c.floodlightGroupId = floodlightGroupId 20614 c.floodlightgroup = floodlightgroup 20615 return c 20616} 20617 20618// PartnerId sets the optional parameter "partnerId": Required. The 20619// partner context by which the Floodlight group is being accessed. 20620func (c *FloodlightGroupsPatchCall) PartnerId(partnerId int64) *FloodlightGroupsPatchCall { 20621 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20622 return c 20623} 20624 20625// UpdateMask sets the optional parameter "updateMask": Required. The 20626// mask to control which fields to update. 20627func (c *FloodlightGroupsPatchCall) UpdateMask(updateMask string) *FloodlightGroupsPatchCall { 20628 c.urlParams_.Set("updateMask", updateMask) 20629 return c 20630} 20631 20632// Fields allows partial responses to be retrieved. See 20633// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20634// for more information. 20635func (c *FloodlightGroupsPatchCall) Fields(s ...googleapi.Field) *FloodlightGroupsPatchCall { 20636 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20637 return c 20638} 20639 20640// Context sets the context to be used in this call's Do method. Any 20641// pending HTTP request will be aborted if the provided context is 20642// canceled. 20643func (c *FloodlightGroupsPatchCall) Context(ctx context.Context) *FloodlightGroupsPatchCall { 20644 c.ctx_ = ctx 20645 return c 20646} 20647 20648// Header returns an http.Header that can be modified by the caller to 20649// add HTTP headers to the request. 20650func (c *FloodlightGroupsPatchCall) Header() http.Header { 20651 if c.header_ == nil { 20652 c.header_ = make(http.Header) 20653 } 20654 return c.header_ 20655} 20656 20657func (c *FloodlightGroupsPatchCall) doRequest(alt string) (*http.Response, error) { 20658 reqHeaders := make(http.Header) 20659 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20660 for k, v := range c.header_ { 20661 reqHeaders[k] = v 20662 } 20663 reqHeaders.Set("User-Agent", c.s.userAgent()) 20664 var body io.Reader = nil 20665 body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightgroup) 20666 if err != nil { 20667 return nil, err 20668 } 20669 reqHeaders.Set("Content-Type", "application/json") 20670 c.urlParams_.Set("alt", alt) 20671 c.urlParams_.Set("prettyPrint", "false") 20672 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/floodlightGroups/{floodlightGroupId}") 20673 urls += "?" + c.urlParams_.Encode() 20674 req, err := http.NewRequest("PATCH", urls, body) 20675 if err != nil { 20676 return nil, err 20677 } 20678 req.Header = reqHeaders 20679 googleapi.Expand(req.URL, map[string]string{ 20680 "floodlightGroupId": strconv.FormatInt(c.floodlightGroupId, 10), 20681 }) 20682 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20683} 20684 20685// Do executes the "displayvideo.floodlightGroups.patch" call. 20686// Exactly one of *FloodlightGroup or error will be non-nil. Any non-2xx 20687// status code is an error. Response headers are in either 20688// *FloodlightGroup.ServerResponse.Header or (if a response was returned 20689// at all) in error.(*googleapi.Error).Header. Use 20690// googleapi.IsNotModified to check whether the returned error was 20691// because http.StatusNotModified was returned. 20692func (c *FloodlightGroupsPatchCall) Do(opts ...googleapi.CallOption) (*FloodlightGroup, error) { 20693 gensupport.SetOptions(c.urlParams_, opts...) 20694 res, err := c.doRequest("json") 20695 if res != nil && res.StatusCode == http.StatusNotModified { 20696 if res.Body != nil { 20697 res.Body.Close() 20698 } 20699 return nil, &googleapi.Error{ 20700 Code: res.StatusCode, 20701 Header: res.Header, 20702 } 20703 } 20704 if err != nil { 20705 return nil, err 20706 } 20707 defer googleapi.CloseBody(res) 20708 if err := googleapi.CheckResponse(res); err != nil { 20709 return nil, err 20710 } 20711 ret := &FloodlightGroup{ 20712 ServerResponse: googleapi.ServerResponse{ 20713 Header: res.Header, 20714 HTTPStatusCode: res.StatusCode, 20715 }, 20716 } 20717 target := &ret 20718 if err := gensupport.DecodeResponse(target, res); err != nil { 20719 return nil, err 20720 } 20721 return ret, nil 20722 // { 20723 // "description": "Updates an existing Floodlight group.\nReturns the updated Floodlight group if successful.", 20724 // "flatPath": "v1/floodlightGroups/{floodlightGroupId}", 20725 // "httpMethod": "PATCH", 20726 // "id": "displayvideo.floodlightGroups.patch", 20727 // "parameterOrder": [ 20728 // "floodlightGroupId" 20729 // ], 20730 // "parameters": { 20731 // "floodlightGroupId": { 20732 // "description": "Output only. The unique ID of the Floodlight group. Assigned by the system.", 20733 // "format": "int64", 20734 // "location": "path", 20735 // "required": true, 20736 // "type": "string" 20737 // }, 20738 // "partnerId": { 20739 // "description": "Required. The partner context by which the Floodlight group is being accessed.", 20740 // "format": "int64", 20741 // "location": "query", 20742 // "type": "string" 20743 // }, 20744 // "updateMask": { 20745 // "description": "Required. The mask to control which fields to update.", 20746 // "format": "google-fieldmask", 20747 // "location": "query", 20748 // "type": "string" 20749 // } 20750 // }, 20751 // "path": "v1/floodlightGroups/{floodlightGroupId}", 20752 // "request": { 20753 // "$ref": "FloodlightGroup" 20754 // }, 20755 // "response": { 20756 // "$ref": "FloodlightGroup" 20757 // }, 20758 // "scopes": [ 20759 // "https://www.googleapis.com/auth/display-video" 20760 // ] 20761 // } 20762 20763} 20764 20765// method id "displayvideo.googleAudiences.get": 20766 20767type GoogleAudiencesGetCall struct { 20768 s *Service 20769 googleAudienceId int64 20770 urlParams_ gensupport.URLParams 20771 ifNoneMatch_ string 20772 ctx_ context.Context 20773 header_ http.Header 20774} 20775 20776// Get: Gets a Google audience. 20777func (r *GoogleAudiencesService) Get(googleAudienceId int64) *GoogleAudiencesGetCall { 20778 c := &GoogleAudiencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20779 c.googleAudienceId = googleAudienceId 20780 return c 20781} 20782 20783// AdvertiserId sets the optional parameter "advertiserId": The ID of 20784// the advertiser that has access to the fetched Google audience. 20785func (c *GoogleAudiencesGetCall) AdvertiserId(advertiserId int64) *GoogleAudiencesGetCall { 20786 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 20787 return c 20788} 20789 20790// PartnerId sets the optional parameter "partnerId": The ID of the 20791// partner that has access to the fetched Google audience. 20792func (c *GoogleAudiencesGetCall) PartnerId(partnerId int64) *GoogleAudiencesGetCall { 20793 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 20794 return c 20795} 20796 20797// Fields allows partial responses to be retrieved. See 20798// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 20799// for more information. 20800func (c *GoogleAudiencesGetCall) Fields(s ...googleapi.Field) *GoogleAudiencesGetCall { 20801 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 20802 return c 20803} 20804 20805// IfNoneMatch sets the optional parameter which makes the operation 20806// fail if the object's ETag matches the given value. This is useful for 20807// getting updates only after the object has changed since the last 20808// request. Use googleapi.IsNotModified to check whether the response 20809// error from Do is the result of In-None-Match. 20810func (c *GoogleAudiencesGetCall) IfNoneMatch(entityTag string) *GoogleAudiencesGetCall { 20811 c.ifNoneMatch_ = entityTag 20812 return c 20813} 20814 20815// Context sets the context to be used in this call's Do method. Any 20816// pending HTTP request will be aborted if the provided context is 20817// canceled. 20818func (c *GoogleAudiencesGetCall) Context(ctx context.Context) *GoogleAudiencesGetCall { 20819 c.ctx_ = ctx 20820 return c 20821} 20822 20823// Header returns an http.Header that can be modified by the caller to 20824// add HTTP headers to the request. 20825func (c *GoogleAudiencesGetCall) Header() http.Header { 20826 if c.header_ == nil { 20827 c.header_ = make(http.Header) 20828 } 20829 return c.header_ 20830} 20831 20832func (c *GoogleAudiencesGetCall) doRequest(alt string) (*http.Response, error) { 20833 reqHeaders := make(http.Header) 20834 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 20835 for k, v := range c.header_ { 20836 reqHeaders[k] = v 20837 } 20838 reqHeaders.Set("User-Agent", c.s.userAgent()) 20839 if c.ifNoneMatch_ != "" { 20840 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 20841 } 20842 var body io.Reader = nil 20843 c.urlParams_.Set("alt", alt) 20844 c.urlParams_.Set("prettyPrint", "false") 20845 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/googleAudiences/{+googleAudienceId}") 20846 urls += "?" + c.urlParams_.Encode() 20847 req, err := http.NewRequest("GET", urls, body) 20848 if err != nil { 20849 return nil, err 20850 } 20851 req.Header = reqHeaders 20852 googleapi.Expand(req.URL, map[string]string{ 20853 "googleAudienceId": strconv.FormatInt(c.googleAudienceId, 10), 20854 }) 20855 return gensupport.SendRequest(c.ctx_, c.s.client, req) 20856} 20857 20858// Do executes the "displayvideo.googleAudiences.get" call. 20859// Exactly one of *GoogleAudience or error will be non-nil. Any non-2xx 20860// status code is an error. Response headers are in either 20861// *GoogleAudience.ServerResponse.Header or (if a response was returned 20862// at all) in error.(*googleapi.Error).Header. Use 20863// googleapi.IsNotModified to check whether the returned error was 20864// because http.StatusNotModified was returned. 20865func (c *GoogleAudiencesGetCall) Do(opts ...googleapi.CallOption) (*GoogleAudience, error) { 20866 gensupport.SetOptions(c.urlParams_, opts...) 20867 res, err := c.doRequest("json") 20868 if res != nil && res.StatusCode == http.StatusNotModified { 20869 if res.Body != nil { 20870 res.Body.Close() 20871 } 20872 return nil, &googleapi.Error{ 20873 Code: res.StatusCode, 20874 Header: res.Header, 20875 } 20876 } 20877 if err != nil { 20878 return nil, err 20879 } 20880 defer googleapi.CloseBody(res) 20881 if err := googleapi.CheckResponse(res); err != nil { 20882 return nil, err 20883 } 20884 ret := &GoogleAudience{ 20885 ServerResponse: googleapi.ServerResponse{ 20886 Header: res.Header, 20887 HTTPStatusCode: res.StatusCode, 20888 }, 20889 } 20890 target := &ret 20891 if err := gensupport.DecodeResponse(target, res); err != nil { 20892 return nil, err 20893 } 20894 return ret, nil 20895 // { 20896 // "description": "Gets a Google audience.", 20897 // "flatPath": "v1/googleAudiences/{googleAudiencesId}", 20898 // "httpMethod": "GET", 20899 // "id": "displayvideo.googleAudiences.get", 20900 // "parameterOrder": [ 20901 // "googleAudienceId" 20902 // ], 20903 // "parameters": { 20904 // "advertiserId": { 20905 // "description": "The ID of the advertiser that has access to the fetched Google audience.", 20906 // "format": "int64", 20907 // "location": "query", 20908 // "type": "string" 20909 // }, 20910 // "googleAudienceId": { 20911 // "description": "Required. The ID of the Google audience to fetch.", 20912 // "format": "int64", 20913 // "location": "path", 20914 // "pattern": "^[^/]+$", 20915 // "required": true, 20916 // "type": "string" 20917 // }, 20918 // "partnerId": { 20919 // "description": "The ID of the partner that has access to the fetched Google audience.", 20920 // "format": "int64", 20921 // "location": "query", 20922 // "type": "string" 20923 // } 20924 // }, 20925 // "path": "v1/googleAudiences/{+googleAudienceId}", 20926 // "response": { 20927 // "$ref": "GoogleAudience" 20928 // }, 20929 // "scopes": [ 20930 // "https://www.googleapis.com/auth/display-video" 20931 // ] 20932 // } 20933 20934} 20935 20936// method id "displayvideo.googleAudiences.list": 20937 20938type GoogleAudiencesListCall struct { 20939 s *Service 20940 urlParams_ gensupport.URLParams 20941 ifNoneMatch_ string 20942 ctx_ context.Context 20943 header_ http.Header 20944} 20945 20946// List: Lists Google audiences. 20947// 20948// The order is defined by the order_by 20949// parameter. 20950func (r *GoogleAudiencesService) List() *GoogleAudiencesListCall { 20951 c := &GoogleAudiencesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 20952 return c 20953} 20954 20955// AdvertiserId sets the optional parameter "advertiserId": The ID of 20956// the advertiser that has access to the fetched Google audiences. 20957func (c *GoogleAudiencesListCall) AdvertiserId(advertiserId int64) *GoogleAudiencesListCall { 20958 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 20959 return c 20960} 20961 20962// Filter sets the optional parameter "filter": Allows filtering by 20963// Google audience fields. 20964// 20965// Supported syntax: 20966// 20967// * Filter expressions for Google audiences currently can only contain 20968// at 20969// most one restriction. 20970// * A restriction has the form of `{field} {operator} {value}`. 20971// * The operator must be `CONTAINS (:)`. 20972// * Supported fields: 20973// - `displayName` 20974// 20975// Examples: 20976// 20977// * All Google audiences for which the display name contains 20978// "Google": 20979// `displayName : "Google". 20980// 20981// The length of this field should be no more than 500 characters. 20982func (c *GoogleAudiencesListCall) Filter(filter string) *GoogleAudiencesListCall { 20983 c.urlParams_.Set("filter", filter) 20984 return c 20985} 20986 20987// OrderBy sets the optional parameter "orderBy": Field by which to sort 20988// the list. 20989// Acceptable values are: 20990// 20991// * `googleAudienceId` (default) 20992// * `displayName` 20993// 20994// The default sorting order is ascending. To specify descending order 20995// for 20996// a field, a suffix "desc" should be added to the field name. 20997// Example: 20998// `displayName desc`. 20999func (c *GoogleAudiencesListCall) OrderBy(orderBy string) *GoogleAudiencesListCall { 21000 c.urlParams_.Set("orderBy", orderBy) 21001 return c 21002} 21003 21004// PageSize sets the optional parameter "pageSize": Requested page size. 21005// Must be between `1` and `100`. If unspecified will 21006// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 21007// value 21008// is specified. 21009func (c *GoogleAudiencesListCall) PageSize(pageSize int64) *GoogleAudiencesListCall { 21010 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21011 return c 21012} 21013 21014// PageToken sets the optional parameter "pageToken": A token 21015// identifying a page of results the server should return. 21016// Typically, this is the value of 21017// next_page_token 21018// returned from the previous call to `ListGoogleAudiences` method. 21019// If not specified, the first page of results will be returned. 21020func (c *GoogleAudiencesListCall) PageToken(pageToken string) *GoogleAudiencesListCall { 21021 c.urlParams_.Set("pageToken", pageToken) 21022 return c 21023} 21024 21025// PartnerId sets the optional parameter "partnerId": The ID of the 21026// partner that has access to the fetched Google audiences. 21027func (c *GoogleAudiencesListCall) PartnerId(partnerId int64) *GoogleAudiencesListCall { 21028 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 21029 return c 21030} 21031 21032// Fields allows partial responses to be retrieved. See 21033// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21034// for more information. 21035func (c *GoogleAudiencesListCall) Fields(s ...googleapi.Field) *GoogleAudiencesListCall { 21036 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21037 return c 21038} 21039 21040// IfNoneMatch sets the optional parameter which makes the operation 21041// fail if the object's ETag matches the given value. This is useful for 21042// getting updates only after the object has changed since the last 21043// request. Use googleapi.IsNotModified to check whether the response 21044// error from Do is the result of In-None-Match. 21045func (c *GoogleAudiencesListCall) IfNoneMatch(entityTag string) *GoogleAudiencesListCall { 21046 c.ifNoneMatch_ = entityTag 21047 return c 21048} 21049 21050// Context sets the context to be used in this call's Do method. Any 21051// pending HTTP request will be aborted if the provided context is 21052// canceled. 21053func (c *GoogleAudiencesListCall) Context(ctx context.Context) *GoogleAudiencesListCall { 21054 c.ctx_ = ctx 21055 return c 21056} 21057 21058// Header returns an http.Header that can be modified by the caller to 21059// add HTTP headers to the request. 21060func (c *GoogleAudiencesListCall) Header() http.Header { 21061 if c.header_ == nil { 21062 c.header_ = make(http.Header) 21063 } 21064 return c.header_ 21065} 21066 21067func (c *GoogleAudiencesListCall) doRequest(alt string) (*http.Response, error) { 21068 reqHeaders := make(http.Header) 21069 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21070 for k, v := range c.header_ { 21071 reqHeaders[k] = v 21072 } 21073 reqHeaders.Set("User-Agent", c.s.userAgent()) 21074 if c.ifNoneMatch_ != "" { 21075 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21076 } 21077 var body io.Reader = nil 21078 c.urlParams_.Set("alt", alt) 21079 c.urlParams_.Set("prettyPrint", "false") 21080 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/googleAudiences") 21081 urls += "?" + c.urlParams_.Encode() 21082 req, err := http.NewRequest("GET", urls, body) 21083 if err != nil { 21084 return nil, err 21085 } 21086 req.Header = reqHeaders 21087 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21088} 21089 21090// Do executes the "displayvideo.googleAudiences.list" call. 21091// Exactly one of *ListGoogleAudiencesResponse or error will be non-nil. 21092// Any non-2xx status code is an error. Response headers are in either 21093// *ListGoogleAudiencesResponse.ServerResponse.Header or (if a response 21094// was returned at all) in error.(*googleapi.Error).Header. Use 21095// googleapi.IsNotModified to check whether the returned error was 21096// because http.StatusNotModified was returned. 21097func (c *GoogleAudiencesListCall) Do(opts ...googleapi.CallOption) (*ListGoogleAudiencesResponse, error) { 21098 gensupport.SetOptions(c.urlParams_, opts...) 21099 res, err := c.doRequest("json") 21100 if res != nil && res.StatusCode == http.StatusNotModified { 21101 if res.Body != nil { 21102 res.Body.Close() 21103 } 21104 return nil, &googleapi.Error{ 21105 Code: res.StatusCode, 21106 Header: res.Header, 21107 } 21108 } 21109 if err != nil { 21110 return nil, err 21111 } 21112 defer googleapi.CloseBody(res) 21113 if err := googleapi.CheckResponse(res); err != nil { 21114 return nil, err 21115 } 21116 ret := &ListGoogleAudiencesResponse{ 21117 ServerResponse: googleapi.ServerResponse{ 21118 Header: res.Header, 21119 HTTPStatusCode: res.StatusCode, 21120 }, 21121 } 21122 target := &ret 21123 if err := gensupport.DecodeResponse(target, res); err != nil { 21124 return nil, err 21125 } 21126 return ret, nil 21127 // { 21128 // "description": "Lists Google audiences.\n\nThe order is defined by the order_by\nparameter.", 21129 // "flatPath": "v1/googleAudiences", 21130 // "httpMethod": "GET", 21131 // "id": "displayvideo.googleAudiences.list", 21132 // "parameterOrder": [], 21133 // "parameters": { 21134 // "advertiserId": { 21135 // "description": "The ID of the advertiser that has access to the fetched Google audiences.", 21136 // "format": "int64", 21137 // "location": "query", 21138 // "type": "string" 21139 // }, 21140 // "filter": { 21141 // "description": "Allows filtering by Google audience fields.\n\nSupported syntax:\n\n* Filter expressions for Google audiences currently can only contain at\nmost one restriction.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `CONTAINS (:)`.\n* Supported fields:\n - `displayName`\n\nExamples:\n\n* All Google audiences for which the display name contains \"Google\":\n`displayName : \"Google\"`.\n\nThe length of this field should be no more than 500 characters.", 21142 // "location": "query", 21143 // "type": "string" 21144 // }, 21145 // "orderBy": { 21146 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `googleAudienceId` (default)\n* `displayName`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. Example:\n`displayName desc`.", 21147 // "location": "query", 21148 // "type": "string" 21149 // }, 21150 // "pageSize": { 21151 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 21152 // "format": "int32", 21153 // "location": "query", 21154 // "type": "integer" 21155 // }, 21156 // "pageToken": { 21157 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListGoogleAudiences` method.\nIf not specified, the first page of results will be returned.", 21158 // "location": "query", 21159 // "type": "string" 21160 // }, 21161 // "partnerId": { 21162 // "description": "The ID of the partner that has access to the fetched Google audiences.", 21163 // "format": "int64", 21164 // "location": "query", 21165 // "type": "string" 21166 // } 21167 // }, 21168 // "path": "v1/googleAudiences", 21169 // "response": { 21170 // "$ref": "ListGoogleAudiencesResponse" 21171 // }, 21172 // "scopes": [ 21173 // "https://www.googleapis.com/auth/display-video" 21174 // ] 21175 // } 21176 21177} 21178 21179// Pages invokes f for each page of results. 21180// A non-nil error returned from f will halt the iteration. 21181// The provided context supersedes any context provided to the Context method. 21182func (c *GoogleAudiencesListCall) Pages(ctx context.Context, f func(*ListGoogleAudiencesResponse) error) error { 21183 c.ctx_ = ctx 21184 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21185 for { 21186 x, err := c.Do() 21187 if err != nil { 21188 return err 21189 } 21190 if err := f(x); err != nil { 21191 return err 21192 } 21193 if x.NextPageToken == "" { 21194 return nil 21195 } 21196 c.PageToken(x.NextPageToken) 21197 } 21198} 21199 21200// method id "displayvideo.inventorySourceGroups.get": 21201 21202type InventorySourceGroupsGetCall struct { 21203 s *Service 21204 inventorySourceGroupId int64 21205 urlParams_ gensupport.URLParams 21206 ifNoneMatch_ string 21207 ctx_ context.Context 21208 header_ http.Header 21209} 21210 21211// Get: Gets an inventory source group. 21212func (r *InventorySourceGroupsService) Get(inventorySourceGroupId int64) *InventorySourceGroupsGetCall { 21213 c := &InventorySourceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21214 c.inventorySourceGroupId = inventorySourceGroupId 21215 return c 21216} 21217 21218// AdvertiserId sets the optional parameter "advertiserId": The ID of 21219// the advertiser that has access to the inventory source group. 21220// 21221// If an inventory source group is partner-owned, only advertisers to 21222// which 21223// the group is explicitly shared can access the group. 21224func (c *InventorySourceGroupsGetCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsGetCall { 21225 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 21226 return c 21227} 21228 21229// PartnerId sets the optional parameter "partnerId": The ID of the 21230// partner that has access to the inventory source group. 21231// 21232// A partner cannot access an advertiser-owned inventory source group. 21233func (c *InventorySourceGroupsGetCall) PartnerId(partnerId int64) *InventorySourceGroupsGetCall { 21234 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 21235 return c 21236} 21237 21238// Fields allows partial responses to be retrieved. See 21239// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21240// for more information. 21241func (c *InventorySourceGroupsGetCall) Fields(s ...googleapi.Field) *InventorySourceGroupsGetCall { 21242 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21243 return c 21244} 21245 21246// IfNoneMatch sets the optional parameter which makes the operation 21247// fail if the object's ETag matches the given value. This is useful for 21248// getting updates only after the object has changed since the last 21249// request. Use googleapi.IsNotModified to check whether the response 21250// error from Do is the result of In-None-Match. 21251func (c *InventorySourceGroupsGetCall) IfNoneMatch(entityTag string) *InventorySourceGroupsGetCall { 21252 c.ifNoneMatch_ = entityTag 21253 return c 21254} 21255 21256// Context sets the context to be used in this call's Do method. Any 21257// pending HTTP request will be aborted if the provided context is 21258// canceled. 21259func (c *InventorySourceGroupsGetCall) Context(ctx context.Context) *InventorySourceGroupsGetCall { 21260 c.ctx_ = ctx 21261 return c 21262} 21263 21264// Header returns an http.Header that can be modified by the caller to 21265// add HTTP headers to the request. 21266func (c *InventorySourceGroupsGetCall) Header() http.Header { 21267 if c.header_ == nil { 21268 c.header_ = make(http.Header) 21269 } 21270 return c.header_ 21271} 21272 21273func (c *InventorySourceGroupsGetCall) doRequest(alt string) (*http.Response, error) { 21274 reqHeaders := make(http.Header) 21275 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21276 for k, v := range c.header_ { 21277 reqHeaders[k] = v 21278 } 21279 reqHeaders.Set("User-Agent", c.s.userAgent()) 21280 if c.ifNoneMatch_ != "" { 21281 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21282 } 21283 var body io.Reader = nil 21284 c.urlParams_.Set("alt", alt) 21285 c.urlParams_.Set("prettyPrint", "false") 21286 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups/{+inventorySourceGroupId}") 21287 urls += "?" + c.urlParams_.Encode() 21288 req, err := http.NewRequest("GET", urls, body) 21289 if err != nil { 21290 return nil, err 21291 } 21292 req.Header = reqHeaders 21293 googleapi.Expand(req.URL, map[string]string{ 21294 "inventorySourceGroupId": strconv.FormatInt(c.inventorySourceGroupId, 10), 21295 }) 21296 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21297} 21298 21299// Do executes the "displayvideo.inventorySourceGroups.get" call. 21300// Exactly one of *InventorySourceGroup or error will be non-nil. Any 21301// non-2xx status code is an error. Response headers are in either 21302// *InventorySourceGroup.ServerResponse.Header or (if a response was 21303// returned at all) in error.(*googleapi.Error).Header. Use 21304// googleapi.IsNotModified to check whether the returned error was 21305// because http.StatusNotModified was returned. 21306func (c *InventorySourceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InventorySourceGroup, error) { 21307 gensupport.SetOptions(c.urlParams_, opts...) 21308 res, err := c.doRequest("json") 21309 if res != nil && res.StatusCode == http.StatusNotModified { 21310 if res.Body != nil { 21311 res.Body.Close() 21312 } 21313 return nil, &googleapi.Error{ 21314 Code: res.StatusCode, 21315 Header: res.Header, 21316 } 21317 } 21318 if err != nil { 21319 return nil, err 21320 } 21321 defer googleapi.CloseBody(res) 21322 if err := googleapi.CheckResponse(res); err != nil { 21323 return nil, err 21324 } 21325 ret := &InventorySourceGroup{ 21326 ServerResponse: googleapi.ServerResponse{ 21327 Header: res.Header, 21328 HTTPStatusCode: res.StatusCode, 21329 }, 21330 } 21331 target := &ret 21332 if err := gensupport.DecodeResponse(target, res); err != nil { 21333 return nil, err 21334 } 21335 return ret, nil 21336 // { 21337 // "description": "Gets an inventory source group.", 21338 // "flatPath": "v1/inventorySourceGroups/{inventorySourceGroupsId}", 21339 // "httpMethod": "GET", 21340 // "id": "displayvideo.inventorySourceGroups.get", 21341 // "parameterOrder": [ 21342 // "inventorySourceGroupId" 21343 // ], 21344 // "parameters": { 21345 // "advertiserId": { 21346 // "description": "The ID of the advertiser that has access to the inventory source group.\n\nIf an inventory source group is partner-owned, only advertisers to which\nthe group is explicitly shared can access the group.", 21347 // "format": "int64", 21348 // "location": "query", 21349 // "type": "string" 21350 // }, 21351 // "inventorySourceGroupId": { 21352 // "description": "Required. The ID of the inventory source group to fetch.", 21353 // "format": "int64", 21354 // "location": "path", 21355 // "pattern": "^[^/]+$", 21356 // "required": true, 21357 // "type": "string" 21358 // }, 21359 // "partnerId": { 21360 // "description": "The ID of the partner that has access to the inventory source group.\n\nA partner cannot access an advertiser-owned inventory source group.", 21361 // "format": "int64", 21362 // "location": "query", 21363 // "type": "string" 21364 // } 21365 // }, 21366 // "path": "v1/inventorySourceGroups/{+inventorySourceGroupId}", 21367 // "response": { 21368 // "$ref": "InventorySourceGroup" 21369 // }, 21370 // "scopes": [ 21371 // "https://www.googleapis.com/auth/display-video" 21372 // ] 21373 // } 21374 21375} 21376 21377// method id "displayvideo.inventorySourceGroups.list": 21378 21379type InventorySourceGroupsListCall struct { 21380 s *Service 21381 urlParams_ gensupport.URLParams 21382 ifNoneMatch_ string 21383 ctx_ context.Context 21384 header_ http.Header 21385} 21386 21387// List: Lists inventory source groups that are accessible to the 21388// current user. 21389// 21390// The order is defined by the 21391// order_by parameter. 21392func (r *InventorySourceGroupsService) List() *InventorySourceGroupsListCall { 21393 c := &InventorySourceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21394 return c 21395} 21396 21397// AdvertiserId sets the optional parameter "advertiserId": The ID of 21398// the advertiser that has access to the inventory source group. 21399// 21400// If an inventory source group is partner-owned, only advertisers to 21401// which 21402// the group is explicitly shared can access the group. 21403func (c *InventorySourceGroupsListCall) AdvertiserId(advertiserId int64) *InventorySourceGroupsListCall { 21404 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 21405 return c 21406} 21407 21408// Filter sets the optional parameter "filter": Allows filtering by 21409// inventory source group properties. 21410// 21411// Supported syntax: 21412// 21413// * Filter expressions are made up of one or more restrictions. 21414// * Restrictions can be combined by the logical operator `OR`. 21415// * A restriction has the form of `{field} {operator} {value}`. 21416// * The operator must be `EQUALS (=)`. 21417// * Supported fields: 21418// - `inventorySourceGroupId` 21419// 21420// The length of this field should be no more than 500 characters. 21421func (c *InventorySourceGroupsListCall) Filter(filter string) *InventorySourceGroupsListCall { 21422 c.urlParams_.Set("filter", filter) 21423 return c 21424} 21425 21426// OrderBy sets the optional parameter "orderBy": Field by which to sort 21427// the list. 21428// Acceptable values are: 21429// 21430// * `displayName` (default) 21431// * `inventorySourceGroupId` 21432// 21433// The default sorting order is ascending. To specify descending order 21434// for 21435// a field, a suffix "desc" should be added to the field name. For 21436// example, 21437// `displayName desc`. 21438func (c *InventorySourceGroupsListCall) OrderBy(orderBy string) *InventorySourceGroupsListCall { 21439 c.urlParams_.Set("orderBy", orderBy) 21440 return c 21441} 21442 21443// PageSize sets the optional parameter "pageSize": Requested page size. 21444// Must be between `1` and `100`. If unspecified will 21445// default to `100`. 21446func (c *InventorySourceGroupsListCall) PageSize(pageSize int64) *InventorySourceGroupsListCall { 21447 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21448 return c 21449} 21450 21451// PageToken sets the optional parameter "pageToken": A token 21452// identifying a page of results the server should return. 21453// Typically, this is the value of 21454// next_page_token 21455// returned from the previous call to `ListInventorySources` method. 21456// If not specified, the first page of results will be returned. 21457func (c *InventorySourceGroupsListCall) PageToken(pageToken string) *InventorySourceGroupsListCall { 21458 c.urlParams_.Set("pageToken", pageToken) 21459 return c 21460} 21461 21462// PartnerId sets the optional parameter "partnerId": The ID of the 21463// partner that has access to the inventory source group. 21464// 21465// A partner cannot access advertiser-owned inventory source groups. 21466func (c *InventorySourceGroupsListCall) PartnerId(partnerId int64) *InventorySourceGroupsListCall { 21467 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 21468 return c 21469} 21470 21471// Fields allows partial responses to be retrieved. See 21472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21473// for more information. 21474func (c *InventorySourceGroupsListCall) Fields(s ...googleapi.Field) *InventorySourceGroupsListCall { 21475 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21476 return c 21477} 21478 21479// IfNoneMatch sets the optional parameter which makes the operation 21480// fail if the object's ETag matches the given value. This is useful for 21481// getting updates only after the object has changed since the last 21482// request. Use googleapi.IsNotModified to check whether the response 21483// error from Do is the result of In-None-Match. 21484func (c *InventorySourceGroupsListCall) IfNoneMatch(entityTag string) *InventorySourceGroupsListCall { 21485 c.ifNoneMatch_ = entityTag 21486 return c 21487} 21488 21489// Context sets the context to be used in this call's Do method. Any 21490// pending HTTP request will be aborted if the provided context is 21491// canceled. 21492func (c *InventorySourceGroupsListCall) Context(ctx context.Context) *InventorySourceGroupsListCall { 21493 c.ctx_ = ctx 21494 return c 21495} 21496 21497// Header returns an http.Header that can be modified by the caller to 21498// add HTTP headers to the request. 21499func (c *InventorySourceGroupsListCall) Header() http.Header { 21500 if c.header_ == nil { 21501 c.header_ = make(http.Header) 21502 } 21503 return c.header_ 21504} 21505 21506func (c *InventorySourceGroupsListCall) doRequest(alt string) (*http.Response, error) { 21507 reqHeaders := make(http.Header) 21508 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21509 for k, v := range c.header_ { 21510 reqHeaders[k] = v 21511 } 21512 reqHeaders.Set("User-Agent", c.s.userAgent()) 21513 if c.ifNoneMatch_ != "" { 21514 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21515 } 21516 var body io.Reader = nil 21517 c.urlParams_.Set("alt", alt) 21518 c.urlParams_.Set("prettyPrint", "false") 21519 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySourceGroups") 21520 urls += "?" + c.urlParams_.Encode() 21521 req, err := http.NewRequest("GET", urls, body) 21522 if err != nil { 21523 return nil, err 21524 } 21525 req.Header = reqHeaders 21526 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21527} 21528 21529// Do executes the "displayvideo.inventorySourceGroups.list" call. 21530// Exactly one of *ListInventorySourceGroupsResponse or error will be 21531// non-nil. Any non-2xx status code is an error. Response headers are in 21532// either *ListInventorySourceGroupsResponse.ServerResponse.Header or 21533// (if a response was returned at all) in 21534// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 21535// whether the returned error was because http.StatusNotModified was 21536// returned. 21537func (c *InventorySourceGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourceGroupsResponse, error) { 21538 gensupport.SetOptions(c.urlParams_, opts...) 21539 res, err := c.doRequest("json") 21540 if res != nil && res.StatusCode == http.StatusNotModified { 21541 if res.Body != nil { 21542 res.Body.Close() 21543 } 21544 return nil, &googleapi.Error{ 21545 Code: res.StatusCode, 21546 Header: res.Header, 21547 } 21548 } 21549 if err != nil { 21550 return nil, err 21551 } 21552 defer googleapi.CloseBody(res) 21553 if err := googleapi.CheckResponse(res); err != nil { 21554 return nil, err 21555 } 21556 ret := &ListInventorySourceGroupsResponse{ 21557 ServerResponse: googleapi.ServerResponse{ 21558 Header: res.Header, 21559 HTTPStatusCode: res.StatusCode, 21560 }, 21561 } 21562 target := &ret 21563 if err := gensupport.DecodeResponse(target, res); err != nil { 21564 return nil, err 21565 } 21566 return ret, nil 21567 // { 21568 // "description": "Lists inventory source groups that are accessible to the current user.\n\nThe order is defined by the\norder_by parameter.", 21569 // "flatPath": "v1/inventorySourceGroups", 21570 // "httpMethod": "GET", 21571 // "id": "displayvideo.inventorySourceGroups.list", 21572 // "parameterOrder": [], 21573 // "parameters": { 21574 // "advertiserId": { 21575 // "description": "The ID of the advertiser that has access to the inventory source group.\n\nIf an inventory source group is partner-owned, only advertisers to which\nthe group is explicitly shared can access the group.", 21576 // "format": "int64", 21577 // "location": "query", 21578 // "type": "string" 21579 // }, 21580 // "filter": { 21581 // "description": "Allows filtering by inventory source group properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by the logical operator `OR`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `inventorySourceGroupId`\n\nThe length of this field should be no more than 500 characters.", 21582 // "location": "query", 21583 // "type": "string" 21584 // }, 21585 // "orderBy": { 21586 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `displayName` (default)\n* `inventorySourceGroupId`\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. For example,\n`displayName desc`.", 21587 // "location": "query", 21588 // "type": "string" 21589 // }, 21590 // "pageSize": { 21591 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`.", 21592 // "format": "int32", 21593 // "location": "query", 21594 // "type": "integer" 21595 // }, 21596 // "pageToken": { 21597 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListInventorySources` method.\nIf not specified, the first page of results will be returned.", 21598 // "location": "query", 21599 // "type": "string" 21600 // }, 21601 // "partnerId": { 21602 // "description": "The ID of the partner that has access to the inventory source group.\n\nA partner cannot access advertiser-owned inventory source groups.", 21603 // "format": "int64", 21604 // "location": "query", 21605 // "type": "string" 21606 // } 21607 // }, 21608 // "path": "v1/inventorySourceGroups", 21609 // "response": { 21610 // "$ref": "ListInventorySourceGroupsResponse" 21611 // }, 21612 // "scopes": [ 21613 // "https://www.googleapis.com/auth/display-video" 21614 // ] 21615 // } 21616 21617} 21618 21619// Pages invokes f for each page of results. 21620// A non-nil error returned from f will halt the iteration. 21621// The provided context supersedes any context provided to the Context method. 21622func (c *InventorySourceGroupsListCall) Pages(ctx context.Context, f func(*ListInventorySourceGroupsResponse) error) error { 21623 c.ctx_ = ctx 21624 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 21625 for { 21626 x, err := c.Do() 21627 if err != nil { 21628 return err 21629 } 21630 if err := f(x); err != nil { 21631 return err 21632 } 21633 if x.NextPageToken == "" { 21634 return nil 21635 } 21636 c.PageToken(x.NextPageToken) 21637 } 21638} 21639 21640// method id "displayvideo.inventorySources.get": 21641 21642type InventorySourcesGetCall struct { 21643 s *Service 21644 inventorySourceId int64 21645 urlParams_ gensupport.URLParams 21646 ifNoneMatch_ string 21647 ctx_ context.Context 21648 header_ http.Header 21649} 21650 21651// Get: Gets an inventory source. 21652func (r *InventorySourcesService) Get(inventorySourceId int64) *InventorySourcesGetCall { 21653 c := &InventorySourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21654 c.inventorySourceId = inventorySourceId 21655 return c 21656} 21657 21658// PartnerId sets the optional parameter "partnerId": Required. The ID 21659// of the DV360 partner to which the fetched inventory source 21660// is permissioned. 21661func (c *InventorySourcesGetCall) PartnerId(partnerId int64) *InventorySourcesGetCall { 21662 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 21663 return c 21664} 21665 21666// Fields allows partial responses to be retrieved. See 21667// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21668// for more information. 21669func (c *InventorySourcesGetCall) Fields(s ...googleapi.Field) *InventorySourcesGetCall { 21670 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21671 return c 21672} 21673 21674// IfNoneMatch sets the optional parameter which makes the operation 21675// fail if the object's ETag matches the given value. This is useful for 21676// getting updates only after the object has changed since the last 21677// request. Use googleapi.IsNotModified to check whether the response 21678// error from Do is the result of In-None-Match. 21679func (c *InventorySourcesGetCall) IfNoneMatch(entityTag string) *InventorySourcesGetCall { 21680 c.ifNoneMatch_ = entityTag 21681 return c 21682} 21683 21684// Context sets the context to be used in this call's Do method. Any 21685// pending HTTP request will be aborted if the provided context is 21686// canceled. 21687func (c *InventorySourcesGetCall) Context(ctx context.Context) *InventorySourcesGetCall { 21688 c.ctx_ = ctx 21689 return c 21690} 21691 21692// Header returns an http.Header that can be modified by the caller to 21693// add HTTP headers to the request. 21694func (c *InventorySourcesGetCall) Header() http.Header { 21695 if c.header_ == nil { 21696 c.header_ = make(http.Header) 21697 } 21698 return c.header_ 21699} 21700 21701func (c *InventorySourcesGetCall) doRequest(alt string) (*http.Response, error) { 21702 reqHeaders := make(http.Header) 21703 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21704 for k, v := range c.header_ { 21705 reqHeaders[k] = v 21706 } 21707 reqHeaders.Set("User-Agent", c.s.userAgent()) 21708 if c.ifNoneMatch_ != "" { 21709 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21710 } 21711 var body io.Reader = nil 21712 c.urlParams_.Set("alt", alt) 21713 c.urlParams_.Set("prettyPrint", "false") 21714 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources/{+inventorySourceId}") 21715 urls += "?" + c.urlParams_.Encode() 21716 req, err := http.NewRequest("GET", urls, body) 21717 if err != nil { 21718 return nil, err 21719 } 21720 req.Header = reqHeaders 21721 googleapi.Expand(req.URL, map[string]string{ 21722 "inventorySourceId": strconv.FormatInt(c.inventorySourceId, 10), 21723 }) 21724 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21725} 21726 21727// Do executes the "displayvideo.inventorySources.get" call. 21728// Exactly one of *InventorySource or error will be non-nil. Any non-2xx 21729// status code is an error. Response headers are in either 21730// *InventorySource.ServerResponse.Header or (if a response was returned 21731// at all) in error.(*googleapi.Error).Header. Use 21732// googleapi.IsNotModified to check whether the returned error was 21733// because http.StatusNotModified was returned. 21734func (c *InventorySourcesGetCall) Do(opts ...googleapi.CallOption) (*InventorySource, error) { 21735 gensupport.SetOptions(c.urlParams_, opts...) 21736 res, err := c.doRequest("json") 21737 if res != nil && res.StatusCode == http.StatusNotModified { 21738 if res.Body != nil { 21739 res.Body.Close() 21740 } 21741 return nil, &googleapi.Error{ 21742 Code: res.StatusCode, 21743 Header: res.Header, 21744 } 21745 } 21746 if err != nil { 21747 return nil, err 21748 } 21749 defer googleapi.CloseBody(res) 21750 if err := googleapi.CheckResponse(res); err != nil { 21751 return nil, err 21752 } 21753 ret := &InventorySource{ 21754 ServerResponse: googleapi.ServerResponse{ 21755 Header: res.Header, 21756 HTTPStatusCode: res.StatusCode, 21757 }, 21758 } 21759 target := &ret 21760 if err := gensupport.DecodeResponse(target, res); err != nil { 21761 return nil, err 21762 } 21763 return ret, nil 21764 // { 21765 // "description": "Gets an inventory source.", 21766 // "flatPath": "v1/inventorySources/{inventorySourcesId}", 21767 // "httpMethod": "GET", 21768 // "id": "displayvideo.inventorySources.get", 21769 // "parameterOrder": [ 21770 // "inventorySourceId" 21771 // ], 21772 // "parameters": { 21773 // "inventorySourceId": { 21774 // "description": "Required. The ID of the inventory source to fetch.", 21775 // "format": "int64", 21776 // "location": "path", 21777 // "pattern": "^[^/]+$", 21778 // "required": true, 21779 // "type": "string" 21780 // }, 21781 // "partnerId": { 21782 // "description": "Required. The ID of the DV360 partner to which the fetched inventory source\nis permissioned.", 21783 // "format": "int64", 21784 // "location": "query", 21785 // "type": "string" 21786 // } 21787 // }, 21788 // "path": "v1/inventorySources/{+inventorySourceId}", 21789 // "response": { 21790 // "$ref": "InventorySource" 21791 // }, 21792 // "scopes": [ 21793 // "https://www.googleapis.com/auth/display-video" 21794 // ] 21795 // } 21796 21797} 21798 21799// method id "displayvideo.inventorySources.list": 21800 21801type InventorySourcesListCall struct { 21802 s *Service 21803 urlParams_ gensupport.URLParams 21804 ifNoneMatch_ string 21805 ctx_ context.Context 21806 header_ http.Header 21807} 21808 21809// List: Lists inventory sources that are accessible to the current 21810// user. 21811// 21812// The order is defined by the 21813// order_by parameter. 21814// If a filter by 21815// entity_status is not 21816// specified, inventory sources with entity status 21817// `ENTITY_STATUS_ARCHIVED` 21818// will not be included in the results. 21819func (r *InventorySourcesService) List() *InventorySourcesListCall { 21820 c := &InventorySourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 21821 return c 21822} 21823 21824// AdvertiserId sets the optional parameter "advertiserId": The ID of 21825// the advertiser that has access to the inventory source. 21826func (c *InventorySourcesListCall) AdvertiserId(advertiserId int64) *InventorySourcesListCall { 21827 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 21828 return c 21829} 21830 21831// Filter sets the optional parameter "filter": Allows filtering by 21832// inventory source properties. 21833// 21834// Supported syntax: 21835// 21836// * Filter expressions are made up of one or more restrictions. 21837// * Restrictions can be combined by `AND` or `OR` logical operators. 21838// A 21839// sequence of restrictions implicitly uses `AND`. 21840// * A restriction has the form of `{field} {operator} {value}`. 21841// * The operator must be `EQUALS (=)`. 21842// * Supported fields: 21843// - `status.entityStatus` 21844// - `commitment` 21845// - `deliveryMethod` 21846// - `rateDetails.rateType` 21847// - `exchange` 21848// 21849// Examples: 21850// 21851// * All active inventory 21852// sources: 21853// `status.entityStatus="ENTITY_STATUS_ACTIVE" 21854// * Inventory sources belonging to Google Ad Manager or Rubicon 21855// exchanges: 21856// `exchange="EXCHANGE_GOOGLE_AD_MANAGER" OR 21857// exchange="EXCHANGE_RUBICON" 21858// 21859// The length of this field should be no more than 500 characters. 21860func (c *InventorySourcesListCall) Filter(filter string) *InventorySourcesListCall { 21861 c.urlParams_.Set("filter", filter) 21862 return c 21863} 21864 21865// OrderBy sets the optional parameter "orderBy": Field by which to sort 21866// the list. 21867// Acceptable values are: 21868// 21869// * `displayName` (default) 21870// 21871// The default sorting order is ascending. To specify descending order 21872// for 21873// a field, a suffix "desc" should be added to the field name. For 21874// example, 21875// `displayName desc`. 21876func (c *InventorySourcesListCall) OrderBy(orderBy string) *InventorySourcesListCall { 21877 c.urlParams_.Set("orderBy", orderBy) 21878 return c 21879} 21880 21881// PageSize sets the optional parameter "pageSize": Requested page size. 21882// Must be between `1` and `100`. If unspecified will 21883// default to `100`. 21884func (c *InventorySourcesListCall) PageSize(pageSize int64) *InventorySourcesListCall { 21885 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 21886 return c 21887} 21888 21889// PageToken sets the optional parameter "pageToken": A token 21890// identifying a page of results the server should return. 21891// Typically, this is the value of 21892// next_page_token 21893// returned from the previous call to `ListInventorySources` method. 21894// If not specified, the first page of results will be returned. 21895func (c *InventorySourcesListCall) PageToken(pageToken string) *InventorySourcesListCall { 21896 c.urlParams_.Set("pageToken", pageToken) 21897 return c 21898} 21899 21900// PartnerId sets the optional parameter "partnerId": The ID of the 21901// partner that has access to the inventory source. 21902func (c *InventorySourcesListCall) PartnerId(partnerId int64) *InventorySourcesListCall { 21903 c.urlParams_.Set("partnerId", fmt.Sprint(partnerId)) 21904 return c 21905} 21906 21907// Fields allows partial responses to be retrieved. See 21908// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 21909// for more information. 21910func (c *InventorySourcesListCall) Fields(s ...googleapi.Field) *InventorySourcesListCall { 21911 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 21912 return c 21913} 21914 21915// IfNoneMatch sets the optional parameter which makes the operation 21916// fail if the object's ETag matches the given value. This is useful for 21917// getting updates only after the object has changed since the last 21918// request. Use googleapi.IsNotModified to check whether the response 21919// error from Do is the result of In-None-Match. 21920func (c *InventorySourcesListCall) IfNoneMatch(entityTag string) *InventorySourcesListCall { 21921 c.ifNoneMatch_ = entityTag 21922 return c 21923} 21924 21925// Context sets the context to be used in this call's Do method. Any 21926// pending HTTP request will be aborted if the provided context is 21927// canceled. 21928func (c *InventorySourcesListCall) Context(ctx context.Context) *InventorySourcesListCall { 21929 c.ctx_ = ctx 21930 return c 21931} 21932 21933// Header returns an http.Header that can be modified by the caller to 21934// add HTTP headers to the request. 21935func (c *InventorySourcesListCall) Header() http.Header { 21936 if c.header_ == nil { 21937 c.header_ = make(http.Header) 21938 } 21939 return c.header_ 21940} 21941 21942func (c *InventorySourcesListCall) doRequest(alt string) (*http.Response, error) { 21943 reqHeaders := make(http.Header) 21944 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 21945 for k, v := range c.header_ { 21946 reqHeaders[k] = v 21947 } 21948 reqHeaders.Set("User-Agent", c.s.userAgent()) 21949 if c.ifNoneMatch_ != "" { 21950 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 21951 } 21952 var body io.Reader = nil 21953 c.urlParams_.Set("alt", alt) 21954 c.urlParams_.Set("prettyPrint", "false") 21955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/inventorySources") 21956 urls += "?" + c.urlParams_.Encode() 21957 req, err := http.NewRequest("GET", urls, body) 21958 if err != nil { 21959 return nil, err 21960 } 21961 req.Header = reqHeaders 21962 return gensupport.SendRequest(c.ctx_, c.s.client, req) 21963} 21964 21965// Do executes the "displayvideo.inventorySources.list" call. 21966// Exactly one of *ListInventorySourcesResponse or error will be 21967// non-nil. Any non-2xx status code is an error. Response headers are in 21968// either *ListInventorySourcesResponse.ServerResponse.Header or (if a 21969// response was returned at all) in error.(*googleapi.Error).Header. Use 21970// googleapi.IsNotModified to check whether the returned error was 21971// because http.StatusNotModified was returned. 21972func (c *InventorySourcesListCall) Do(opts ...googleapi.CallOption) (*ListInventorySourcesResponse, error) { 21973 gensupport.SetOptions(c.urlParams_, opts...) 21974 res, err := c.doRequest("json") 21975 if res != nil && res.StatusCode == http.StatusNotModified { 21976 if res.Body != nil { 21977 res.Body.Close() 21978 } 21979 return nil, &googleapi.Error{ 21980 Code: res.StatusCode, 21981 Header: res.Header, 21982 } 21983 } 21984 if err != nil { 21985 return nil, err 21986 } 21987 defer googleapi.CloseBody(res) 21988 if err := googleapi.CheckResponse(res); err != nil { 21989 return nil, err 21990 } 21991 ret := &ListInventorySourcesResponse{ 21992 ServerResponse: googleapi.ServerResponse{ 21993 Header: res.Header, 21994 HTTPStatusCode: res.StatusCode, 21995 }, 21996 } 21997 target := &ret 21998 if err := gensupport.DecodeResponse(target, res); err != nil { 21999 return nil, err 22000 } 22001 return ret, nil 22002 // { 22003 // "description": "Lists inventory sources that are accessible to the current user.\n\nThe order is defined by the\norder_by parameter.\nIf a filter by\nentity_status is not\nspecified, inventory sources with entity status `ENTITY_STATUS_ARCHIVED`\nwill not be included in the results.", 22004 // "flatPath": "v1/inventorySources", 22005 // "httpMethod": "GET", 22006 // "id": "displayvideo.inventorySources.list", 22007 // "parameterOrder": [], 22008 // "parameters": { 22009 // "advertiserId": { 22010 // "description": "The ID of the advertiser that has access to the inventory source.", 22011 // "format": "int64", 22012 // "location": "query", 22013 // "type": "string" 22014 // }, 22015 // "filter": { 22016 // "description": "Allows filtering by inventory source properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `AND` or `OR` logical operators. A\nsequence of restrictions implicitly uses `AND`.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `EQUALS (=)`.\n* Supported fields:\n - `status.entityStatus`\n - `commitment`\n - `deliveryMethod`\n - `rateDetails.rateType`\n - `exchange`\n\nExamples:\n\n* All active inventory sources:\n`status.entityStatus=\"ENTITY_STATUS_ACTIVE\"`\n* Inventory sources belonging to Google Ad Manager or Rubicon exchanges:\n`exchange=\"EXCHANGE_GOOGLE_AD_MANAGER\" OR exchange=\"EXCHANGE_RUBICON\"`\n\nThe length of this field should be no more than 500 characters.", 22017 // "location": "query", 22018 // "type": "string" 22019 // }, 22020 // "orderBy": { 22021 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `displayName` (default)\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name. For example,\n`displayName desc`.", 22022 // "location": "query", 22023 // "type": "string" 22024 // }, 22025 // "pageSize": { 22026 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`.", 22027 // "format": "int32", 22028 // "location": "query", 22029 // "type": "integer" 22030 // }, 22031 // "pageToken": { 22032 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListInventorySources` method.\nIf not specified, the first page of results will be returned.", 22033 // "location": "query", 22034 // "type": "string" 22035 // }, 22036 // "partnerId": { 22037 // "description": "The ID of the partner that has access to the inventory source.", 22038 // "format": "int64", 22039 // "location": "query", 22040 // "type": "string" 22041 // } 22042 // }, 22043 // "path": "v1/inventorySources", 22044 // "response": { 22045 // "$ref": "ListInventorySourcesResponse" 22046 // }, 22047 // "scopes": [ 22048 // "https://www.googleapis.com/auth/display-video" 22049 // ] 22050 // } 22051 22052} 22053 22054// Pages invokes f for each page of results. 22055// A non-nil error returned from f will halt the iteration. 22056// The provided context supersedes any context provided to the Context method. 22057func (c *InventorySourcesListCall) Pages(ctx context.Context, f func(*ListInventorySourcesResponse) error) error { 22058 c.ctx_ = ctx 22059 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22060 for { 22061 x, err := c.Do() 22062 if err != nil { 22063 return err 22064 } 22065 if err := f(x); err != nil { 22066 return err 22067 } 22068 if x.NextPageToken == "" { 22069 return nil 22070 } 22071 c.PageToken(x.NextPageToken) 22072 } 22073} 22074 22075// method id "displayvideo.media.download": 22076 22077type MediaDownloadCall struct { 22078 s *Service 22079 resourceName string 22080 urlParams_ gensupport.URLParams 22081 ifNoneMatch_ string 22082 ctx_ context.Context 22083 header_ http.Header 22084} 22085 22086// Download: Downloads media. Download is supported on the URI 22087// `/download/{resource_name=**}?alt=media.` 22088// 22089// **Note**: Download requests will not be successful without including 22090// `alt=media` query string. 22091func (r *MediaService) Download(resourceName string) *MediaDownloadCall { 22092 c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22093 c.resourceName = resourceName 22094 return c 22095} 22096 22097// Fields allows partial responses to be retrieved. See 22098// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22099// for more information. 22100func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall { 22101 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22102 return c 22103} 22104 22105// IfNoneMatch sets the optional parameter which makes the operation 22106// fail if the object's ETag matches the given value. This is useful for 22107// getting updates only after the object has changed since the last 22108// request. Use googleapi.IsNotModified to check whether the response 22109// error from Do is the result of In-None-Match. 22110func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall { 22111 c.ifNoneMatch_ = entityTag 22112 return c 22113} 22114 22115// Context sets the context to be used in this call's Do and Download 22116// methods. Any pending HTTP request will be aborted if the provided 22117// context is canceled. 22118func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall { 22119 c.ctx_ = ctx 22120 return c 22121} 22122 22123// Header returns an http.Header that can be modified by the caller to 22124// add HTTP headers to the request. 22125func (c *MediaDownloadCall) Header() http.Header { 22126 if c.header_ == nil { 22127 c.header_ = make(http.Header) 22128 } 22129 return c.header_ 22130} 22131 22132func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) { 22133 reqHeaders := make(http.Header) 22134 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22135 for k, v := range c.header_ { 22136 reqHeaders[k] = v 22137 } 22138 reqHeaders.Set("User-Agent", c.s.userAgent()) 22139 if c.ifNoneMatch_ != "" { 22140 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22141 } 22142 var body io.Reader = nil 22143 c.urlParams_.Set("alt", alt) 22144 c.urlParams_.Set("prettyPrint", "false") 22145 urls := googleapi.ResolveRelative(c.s.BasePath, "download/{+resourceName}") 22146 urls += "?" + c.urlParams_.Encode() 22147 req, err := http.NewRequest("GET", urls, body) 22148 if err != nil { 22149 return nil, err 22150 } 22151 req.Header = reqHeaders 22152 googleapi.Expand(req.URL, map[string]string{ 22153 "resourceName": c.resourceName, 22154 }) 22155 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22156} 22157 22158// Download fetches the API endpoint's "media" value, instead of the normal 22159// API response value. If the returned error is nil, the Response is guaranteed to 22160// have a 2xx status code. Callers must close the Response.Body as usual. 22161func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { 22162 gensupport.SetOptions(c.urlParams_, opts...) 22163 res, err := c.doRequest("media") 22164 if err != nil { 22165 return nil, err 22166 } 22167 if err := googleapi.CheckMediaResponse(res); err != nil { 22168 res.Body.Close() 22169 return nil, err 22170 } 22171 return res, nil 22172} 22173 22174// Do executes the "displayvideo.media.download" call. 22175// Exactly one of *GoogleBytestreamMedia or error will be non-nil. Any 22176// non-2xx status code is an error. Response headers are in either 22177// *GoogleBytestreamMedia.ServerResponse.Header or (if a response was 22178// returned at all) in error.(*googleapi.Error).Header. Use 22179// googleapi.IsNotModified to check whether the returned error was 22180// because http.StatusNotModified was returned. 22181func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) { 22182 gensupport.SetOptions(c.urlParams_, opts...) 22183 res, err := c.doRequest("json") 22184 if res != nil && res.StatusCode == http.StatusNotModified { 22185 if res.Body != nil { 22186 res.Body.Close() 22187 } 22188 return nil, &googleapi.Error{ 22189 Code: res.StatusCode, 22190 Header: res.Header, 22191 } 22192 } 22193 if err != nil { 22194 return nil, err 22195 } 22196 defer googleapi.CloseBody(res) 22197 if err := googleapi.CheckResponse(res); err != nil { 22198 return nil, err 22199 } 22200 ret := &GoogleBytestreamMedia{ 22201 ServerResponse: googleapi.ServerResponse{ 22202 Header: res.Header, 22203 HTTPStatusCode: res.StatusCode, 22204 }, 22205 } 22206 target := &ret 22207 if err := gensupport.DecodeResponse(target, res); err != nil { 22208 return nil, err 22209 } 22210 return ret, nil 22211 // { 22212 // "description": "Downloads media. Download is supported on the URI `/download/{resource_name=**}?alt=media.`\n\n**Note**: Download requests will not be successful without including `alt=media` query string.", 22213 // "flatPath": "download/{downloadId}", 22214 // "httpMethod": "GET", 22215 // "id": "displayvideo.media.download", 22216 // "parameterOrder": [ 22217 // "resourceName" 22218 // ], 22219 // "parameters": { 22220 // "resourceName": { 22221 // "description": "Name of the media that is being downloaded. See\nReadRequest.resource_name.", 22222 // "location": "path", 22223 // "pattern": "^.*$", 22224 // "required": true, 22225 // "type": "string" 22226 // } 22227 // }, 22228 // "path": "download/{+resourceName}", 22229 // "response": { 22230 // "$ref": "GoogleBytestreamMedia" 22231 // }, 22232 // "scopes": [ 22233 // "https://www.googleapis.com/auth/display-video", 22234 // "https://www.googleapis.com/auth/doubleclickbidmanager" 22235 // ], 22236 // "supportsMediaDownload": true 22237 // } 22238 22239} 22240 22241// method id "displayvideo.partners.channels.get": 22242 22243type PartnersChannelsGetCall struct { 22244 s *Service 22245 partnerId int64 22246 channelId int64 22247 urlParams_ gensupport.URLParams 22248 ifNoneMatch_ string 22249 ctx_ context.Context 22250 header_ http.Header 22251} 22252 22253// Get: Gets a channel for a partner or advertiser. 22254func (r *PartnersChannelsService) Get(partnerId int64, channelId int64) *PartnersChannelsGetCall { 22255 c := &PartnersChannelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22256 c.partnerId = partnerId 22257 c.channelId = channelId 22258 return c 22259} 22260 22261// AdvertiserId sets the optional parameter "advertiserId": The ID of 22262// the advertiser that owns the fetched channel. 22263func (c *PartnersChannelsGetCall) AdvertiserId(advertiserId int64) *PartnersChannelsGetCall { 22264 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 22265 return c 22266} 22267 22268// Fields allows partial responses to be retrieved. See 22269// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22270// for more information. 22271func (c *PartnersChannelsGetCall) Fields(s ...googleapi.Field) *PartnersChannelsGetCall { 22272 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22273 return c 22274} 22275 22276// IfNoneMatch sets the optional parameter which makes the operation 22277// fail if the object's ETag matches the given value. This is useful for 22278// getting updates only after the object has changed since the last 22279// request. Use googleapi.IsNotModified to check whether the response 22280// error from Do is the result of In-None-Match. 22281func (c *PartnersChannelsGetCall) IfNoneMatch(entityTag string) *PartnersChannelsGetCall { 22282 c.ifNoneMatch_ = entityTag 22283 return c 22284} 22285 22286// Context sets the context to be used in this call's Do method. Any 22287// pending HTTP request will be aborted if the provided context is 22288// canceled. 22289func (c *PartnersChannelsGetCall) Context(ctx context.Context) *PartnersChannelsGetCall { 22290 c.ctx_ = ctx 22291 return c 22292} 22293 22294// Header returns an http.Header that can be modified by the caller to 22295// add HTTP headers to the request. 22296func (c *PartnersChannelsGetCall) Header() http.Header { 22297 if c.header_ == nil { 22298 c.header_ = make(http.Header) 22299 } 22300 return c.header_ 22301} 22302 22303func (c *PartnersChannelsGetCall) doRequest(alt string) (*http.Response, error) { 22304 reqHeaders := make(http.Header) 22305 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22306 for k, v := range c.header_ { 22307 reqHeaders[k] = v 22308 } 22309 reqHeaders.Set("User-Agent", c.s.userAgent()) 22310 if c.ifNoneMatch_ != "" { 22311 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22312 } 22313 var body io.Reader = nil 22314 c.urlParams_.Set("alt", alt) 22315 c.urlParams_.Set("prettyPrint", "false") 22316 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels/{+channelId}") 22317 urls += "?" + c.urlParams_.Encode() 22318 req, err := http.NewRequest("GET", urls, body) 22319 if err != nil { 22320 return nil, err 22321 } 22322 req.Header = reqHeaders 22323 googleapi.Expand(req.URL, map[string]string{ 22324 "partnerId": strconv.FormatInt(c.partnerId, 10), 22325 "channelId": strconv.FormatInt(c.channelId, 10), 22326 }) 22327 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22328} 22329 22330// Do executes the "displayvideo.partners.channels.get" call. 22331// Exactly one of *Channel or error will be non-nil. Any non-2xx status 22332// code is an error. Response headers are in either 22333// *Channel.ServerResponse.Header or (if a response was returned at all) 22334// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 22335// check whether the returned error was because http.StatusNotModified 22336// was returned. 22337func (c *PartnersChannelsGetCall) Do(opts ...googleapi.CallOption) (*Channel, error) { 22338 gensupport.SetOptions(c.urlParams_, opts...) 22339 res, err := c.doRequest("json") 22340 if res != nil && res.StatusCode == http.StatusNotModified { 22341 if res.Body != nil { 22342 res.Body.Close() 22343 } 22344 return nil, &googleapi.Error{ 22345 Code: res.StatusCode, 22346 Header: res.Header, 22347 } 22348 } 22349 if err != nil { 22350 return nil, err 22351 } 22352 defer googleapi.CloseBody(res) 22353 if err := googleapi.CheckResponse(res); err != nil { 22354 return nil, err 22355 } 22356 ret := &Channel{ 22357 ServerResponse: googleapi.ServerResponse{ 22358 Header: res.Header, 22359 HTTPStatusCode: res.StatusCode, 22360 }, 22361 } 22362 target := &ret 22363 if err := gensupport.DecodeResponse(target, res); err != nil { 22364 return nil, err 22365 } 22366 return ret, nil 22367 // { 22368 // "description": "Gets a channel for a partner or advertiser.", 22369 // "flatPath": "v1/partners/{partnersId}/channels/{channelsId}", 22370 // "httpMethod": "GET", 22371 // "id": "displayvideo.partners.channels.get", 22372 // "parameterOrder": [ 22373 // "partnerId", 22374 // "channelId" 22375 // ], 22376 // "parameters": { 22377 // "advertiserId": { 22378 // "description": "The ID of the advertiser that owns the fetched channel.", 22379 // "format": "int64", 22380 // "location": "query", 22381 // "type": "string" 22382 // }, 22383 // "channelId": { 22384 // "description": "Required. The ID of the channel to fetch.", 22385 // "format": "int64", 22386 // "location": "path", 22387 // "pattern": "^[^/]+$", 22388 // "required": true, 22389 // "type": "string" 22390 // }, 22391 // "partnerId": { 22392 // "description": "The ID of the partner that owns the fetched channel.", 22393 // "format": "int64", 22394 // "location": "path", 22395 // "pattern": "^[^/]+$", 22396 // "required": true, 22397 // "type": "string" 22398 // } 22399 // }, 22400 // "path": "v1/partners/{+partnerId}/channels/{+channelId}", 22401 // "response": { 22402 // "$ref": "Channel" 22403 // }, 22404 // "scopes": [ 22405 // "https://www.googleapis.com/auth/display-video" 22406 // ] 22407 // } 22408 22409} 22410 22411// method id "displayvideo.partners.channels.list": 22412 22413type PartnersChannelsListCall struct { 22414 s *Service 22415 partnerId int64 22416 urlParams_ gensupport.URLParams 22417 ifNoneMatch_ string 22418 ctx_ context.Context 22419 header_ http.Header 22420} 22421 22422// List: Lists channels for a partner or advertiser. 22423func (r *PartnersChannelsService) List(partnerId int64) *PartnersChannelsListCall { 22424 c := &PartnersChannelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22425 c.partnerId = partnerId 22426 return c 22427} 22428 22429// AdvertiserId sets the optional parameter "advertiserId": The ID of 22430// the advertiser that owns the channels. 22431func (c *PartnersChannelsListCall) AdvertiserId(advertiserId int64) *PartnersChannelsListCall { 22432 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 22433 return c 22434} 22435 22436// Filter sets the optional parameter "filter": Allows filtering by 22437// channel fields. 22438// 22439// Supported syntax: 22440// 22441// * Filter expressions for channel currently can only contain at most 22442// one 22443// * restriction. 22444// * A restriction has the form of `{field} {operator} {value}`. 22445// * The operator must be `CONTAINS (:)`. 22446// * Supported fields: 22447// - `displayName` 22448// 22449// Examples: 22450// 22451// * All channels for which the display name contains 22452// "google": 22453// `displayName : "google". 22454// 22455// The length of this field should be no more than 500 characters. 22456func (c *PartnersChannelsListCall) Filter(filter string) *PartnersChannelsListCall { 22457 c.urlParams_.Set("filter", filter) 22458 return c 22459} 22460 22461// OrderBy sets the optional parameter "orderBy": Field by which to sort 22462// the list. 22463// Acceptable values are: 22464// 22465// * `displayName` (default) 22466// * `channelId` 22467// 22468// The default sorting order is ascending. To specify descending order 22469// for a 22470// field, a suffix " desc" should be added to the field name. 22471// Example: 22472// `displayName desc`. 22473func (c *PartnersChannelsListCall) OrderBy(orderBy string) *PartnersChannelsListCall { 22474 c.urlParams_.Set("orderBy", orderBy) 22475 return c 22476} 22477 22478// PageSize sets the optional parameter "pageSize": Requested page size. 22479// Must be between `1` and `100`. If unspecified will 22480// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 22481// value 22482// is specified. 22483func (c *PartnersChannelsListCall) PageSize(pageSize int64) *PartnersChannelsListCall { 22484 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 22485 return c 22486} 22487 22488// PageToken sets the optional parameter "pageToken": A token 22489// identifying a page of results the server should return. 22490// Typically, this is the value of 22491// next_page_token returned from the 22492// previous call to `ListChannels` method. If not specified, the first 22493// page 22494// of results will be returned. 22495func (c *PartnersChannelsListCall) PageToken(pageToken string) *PartnersChannelsListCall { 22496 c.urlParams_.Set("pageToken", pageToken) 22497 return c 22498} 22499 22500// Fields allows partial responses to be retrieved. See 22501// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22502// for more information. 22503func (c *PartnersChannelsListCall) Fields(s ...googleapi.Field) *PartnersChannelsListCall { 22504 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22505 return c 22506} 22507 22508// IfNoneMatch sets the optional parameter which makes the operation 22509// fail if the object's ETag matches the given value. This is useful for 22510// getting updates only after the object has changed since the last 22511// request. Use googleapi.IsNotModified to check whether the response 22512// error from Do is the result of In-None-Match. 22513func (c *PartnersChannelsListCall) IfNoneMatch(entityTag string) *PartnersChannelsListCall { 22514 c.ifNoneMatch_ = entityTag 22515 return c 22516} 22517 22518// Context sets the context to be used in this call's Do method. Any 22519// pending HTTP request will be aborted if the provided context is 22520// canceled. 22521func (c *PartnersChannelsListCall) Context(ctx context.Context) *PartnersChannelsListCall { 22522 c.ctx_ = ctx 22523 return c 22524} 22525 22526// Header returns an http.Header that can be modified by the caller to 22527// add HTTP headers to the request. 22528func (c *PartnersChannelsListCall) Header() http.Header { 22529 if c.header_ == nil { 22530 c.header_ = make(http.Header) 22531 } 22532 return c.header_ 22533} 22534 22535func (c *PartnersChannelsListCall) doRequest(alt string) (*http.Response, error) { 22536 reqHeaders := make(http.Header) 22537 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22538 for k, v := range c.header_ { 22539 reqHeaders[k] = v 22540 } 22541 reqHeaders.Set("User-Agent", c.s.userAgent()) 22542 if c.ifNoneMatch_ != "" { 22543 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22544 } 22545 var body io.Reader = nil 22546 c.urlParams_.Set("alt", alt) 22547 c.urlParams_.Set("prettyPrint", "false") 22548 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/partners/{+partnerId}/channels") 22549 urls += "?" + c.urlParams_.Encode() 22550 req, err := http.NewRequest("GET", urls, body) 22551 if err != nil { 22552 return nil, err 22553 } 22554 req.Header = reqHeaders 22555 googleapi.Expand(req.URL, map[string]string{ 22556 "partnerId": strconv.FormatInt(c.partnerId, 10), 22557 }) 22558 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22559} 22560 22561// Do executes the "displayvideo.partners.channels.list" call. 22562// Exactly one of *ListChannelsResponse or error will be non-nil. Any 22563// non-2xx status code is an error. Response headers are in either 22564// *ListChannelsResponse.ServerResponse.Header or (if a response was 22565// returned at all) in error.(*googleapi.Error).Header. Use 22566// googleapi.IsNotModified to check whether the returned error was 22567// because http.StatusNotModified was returned. 22568func (c *PartnersChannelsListCall) Do(opts ...googleapi.CallOption) (*ListChannelsResponse, error) { 22569 gensupport.SetOptions(c.urlParams_, opts...) 22570 res, err := c.doRequest("json") 22571 if res != nil && res.StatusCode == http.StatusNotModified { 22572 if res.Body != nil { 22573 res.Body.Close() 22574 } 22575 return nil, &googleapi.Error{ 22576 Code: res.StatusCode, 22577 Header: res.Header, 22578 } 22579 } 22580 if err != nil { 22581 return nil, err 22582 } 22583 defer googleapi.CloseBody(res) 22584 if err := googleapi.CheckResponse(res); err != nil { 22585 return nil, err 22586 } 22587 ret := &ListChannelsResponse{ 22588 ServerResponse: googleapi.ServerResponse{ 22589 Header: res.Header, 22590 HTTPStatusCode: res.StatusCode, 22591 }, 22592 } 22593 target := &ret 22594 if err := gensupport.DecodeResponse(target, res); err != nil { 22595 return nil, err 22596 } 22597 return ret, nil 22598 // { 22599 // "description": "Lists channels for a partner or advertiser.", 22600 // "flatPath": "v1/partners/{partnersId}/channels", 22601 // "httpMethod": "GET", 22602 // "id": "displayvideo.partners.channels.list", 22603 // "parameterOrder": [ 22604 // "partnerId" 22605 // ], 22606 // "parameters": { 22607 // "advertiserId": { 22608 // "description": "The ID of the advertiser that owns the channels.", 22609 // "format": "int64", 22610 // "location": "query", 22611 // "type": "string" 22612 // }, 22613 // "filter": { 22614 // "description": "Allows filtering by channel fields.\n\nSupported syntax:\n\n* Filter expressions for channel currently can only contain at most one\n* restriction.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be `CONTAINS (:)`.\n* Supported fields:\n - `displayName`\n\nExamples:\n\n* All channels for which the display name contains \"google\":\n`displayName : \"google\"`.\n\nThe length of this field should be no more than 500 characters.", 22615 // "location": "query", 22616 // "type": "string" 22617 // }, 22618 // "orderBy": { 22619 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `displayName` (default)\n* `channelId`\n\nThe default sorting order is ascending. To specify descending order for a\nfield, a suffix \" desc\" should be added to the field name. Example:\n`displayName desc`.", 22620 // "location": "query", 22621 // "type": "string" 22622 // }, 22623 // "pageSize": { 22624 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 22625 // "format": "int32", 22626 // "location": "query", 22627 // "type": "integer" 22628 // }, 22629 // "pageToken": { 22630 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token returned from the\nprevious call to `ListChannels` method. If not specified, the first page\nof results will be returned.", 22631 // "location": "query", 22632 // "type": "string" 22633 // }, 22634 // "partnerId": { 22635 // "description": "The ID of the partner that owns the channels.", 22636 // "format": "int64", 22637 // "location": "path", 22638 // "pattern": "^[^/]+$", 22639 // "required": true, 22640 // "type": "string" 22641 // } 22642 // }, 22643 // "path": "v1/partners/{+partnerId}/channels", 22644 // "response": { 22645 // "$ref": "ListChannelsResponse" 22646 // }, 22647 // "scopes": [ 22648 // "https://www.googleapis.com/auth/display-video" 22649 // ] 22650 // } 22651 22652} 22653 22654// Pages invokes f for each page of results. 22655// A non-nil error returned from f will halt the iteration. 22656// The provided context supersedes any context provided to the Context method. 22657func (c *PartnersChannelsListCall) Pages(ctx context.Context, f func(*ListChannelsResponse) error) error { 22658 c.ctx_ = ctx 22659 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 22660 for { 22661 x, err := c.Do() 22662 if err != nil { 22663 return err 22664 } 22665 if err := f(x); err != nil { 22666 return err 22667 } 22668 if x.NextPageToken == "" { 22669 return nil 22670 } 22671 c.PageToken(x.NextPageToken) 22672 } 22673} 22674 22675// method id "displayvideo.sdfdownloadtasks.create": 22676 22677type SdfdownloadtasksCreateCall struct { 22678 s *Service 22679 createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest 22680 urlParams_ gensupport.URLParams 22681 ctx_ context.Context 22682 header_ http.Header 22683} 22684 22685// Create: Creates an SDF Download Task. Returns an 22686// Operation. 22687// 22688// An SDF Download Task is a long-running, asynchronous operation. 22689// The 22690// metadata type of this operation is 22691// SdfDownloadTaskMetadata. If the request is successful, the 22692// response type of the operation is 22693// SdfDownloadTask. The response will not include the download 22694// files, 22695// which must be retrieved with 22696// media.download. The state of 22697// operation can be retrieved with 22698// sdfdownloadtask.operations.get. 22699// 22700// Any errors can be found in the 22701// error.message. Note 22702// that error.details is expected to be 22703// empty. 22704func (r *SdfdownloadtasksService) Create(createsdfdownloadtaskrequest *CreateSdfDownloadTaskRequest) *SdfdownloadtasksCreateCall { 22705 c := &SdfdownloadtasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22706 c.createsdfdownloadtaskrequest = createsdfdownloadtaskrequest 22707 return c 22708} 22709 22710// Fields allows partial responses to be retrieved. See 22711// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22712// for more information. 22713func (c *SdfdownloadtasksCreateCall) Fields(s ...googleapi.Field) *SdfdownloadtasksCreateCall { 22714 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22715 return c 22716} 22717 22718// Context sets the context to be used in this call's Do method. Any 22719// pending HTTP request will be aborted if the provided context is 22720// canceled. 22721func (c *SdfdownloadtasksCreateCall) Context(ctx context.Context) *SdfdownloadtasksCreateCall { 22722 c.ctx_ = ctx 22723 return c 22724} 22725 22726// Header returns an http.Header that can be modified by the caller to 22727// add HTTP headers to the request. 22728func (c *SdfdownloadtasksCreateCall) Header() http.Header { 22729 if c.header_ == nil { 22730 c.header_ = make(http.Header) 22731 } 22732 return c.header_ 22733} 22734 22735func (c *SdfdownloadtasksCreateCall) doRequest(alt string) (*http.Response, error) { 22736 reqHeaders := make(http.Header) 22737 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22738 for k, v := range c.header_ { 22739 reqHeaders[k] = v 22740 } 22741 reqHeaders.Set("User-Agent", c.s.userAgent()) 22742 var body io.Reader = nil 22743 body, err := googleapi.WithoutDataWrapper.JSONReader(c.createsdfdownloadtaskrequest) 22744 if err != nil { 22745 return nil, err 22746 } 22747 reqHeaders.Set("Content-Type", "application/json") 22748 c.urlParams_.Set("alt", alt) 22749 c.urlParams_.Set("prettyPrint", "false") 22750 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/sdfdownloadtasks") 22751 urls += "?" + c.urlParams_.Encode() 22752 req, err := http.NewRequest("POST", urls, body) 22753 if err != nil { 22754 return nil, err 22755 } 22756 req.Header = reqHeaders 22757 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22758} 22759 22760// Do executes the "displayvideo.sdfdownloadtasks.create" call. 22761// Exactly one of *Operation or error will be non-nil. Any non-2xx 22762// status code is an error. Response headers are in either 22763// *Operation.ServerResponse.Header or (if a response was returned at 22764// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 22765// to check whether the returned error was because 22766// http.StatusNotModified was returned. 22767func (c *SdfdownloadtasksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 22768 gensupport.SetOptions(c.urlParams_, opts...) 22769 res, err := c.doRequest("json") 22770 if res != nil && res.StatusCode == http.StatusNotModified { 22771 if res.Body != nil { 22772 res.Body.Close() 22773 } 22774 return nil, &googleapi.Error{ 22775 Code: res.StatusCode, 22776 Header: res.Header, 22777 } 22778 } 22779 if err != nil { 22780 return nil, err 22781 } 22782 defer googleapi.CloseBody(res) 22783 if err := googleapi.CheckResponse(res); err != nil { 22784 return nil, err 22785 } 22786 ret := &Operation{ 22787 ServerResponse: googleapi.ServerResponse{ 22788 Header: res.Header, 22789 HTTPStatusCode: res.StatusCode, 22790 }, 22791 } 22792 target := &ret 22793 if err := gensupport.DecodeResponse(target, res); err != nil { 22794 return nil, err 22795 } 22796 return ret, nil 22797 // { 22798 // "description": "Creates an SDF Download Task. Returns an\nOperation.\n\nAn SDF Download Task is a long-running, asynchronous operation. The\nmetadata type of this operation is\nSdfDownloadTaskMetadata. If the request is successful, the\nresponse type of the operation is\nSdfDownloadTask. The response will not include the download files,\nwhich must be retrieved with\nmedia.download. The state of\noperation can be retrieved with\nsdfdownloadtask.operations.get.\n\nAny errors can be found in the\nerror.message. Note\nthat error.details is expected to be\nempty.", 22799 // "flatPath": "v1/sdfdownloadtasks", 22800 // "httpMethod": "POST", 22801 // "id": "displayvideo.sdfdownloadtasks.create", 22802 // "parameterOrder": [], 22803 // "parameters": {}, 22804 // "path": "v1/sdfdownloadtasks", 22805 // "request": { 22806 // "$ref": "CreateSdfDownloadTaskRequest" 22807 // }, 22808 // "response": { 22809 // "$ref": "Operation" 22810 // }, 22811 // "scopes": [ 22812 // "https://www.googleapis.com/auth/display-video" 22813 // ] 22814 // } 22815 22816} 22817 22818// method id "displayvideo.sdfdownloadtasks.operations.get": 22819 22820type SdfdownloadtasksOperationsGetCall struct { 22821 s *Service 22822 name string 22823 urlParams_ gensupport.URLParams 22824 ifNoneMatch_ string 22825 ctx_ context.Context 22826 header_ http.Header 22827} 22828 22829// Get: Gets the latest state of an asynchronous SDF download task 22830// operation. Clients should poll this method at intervals of 30 22831// seconds. 22832func (r *SdfdownloadtasksOperationsService) Get(name string) *SdfdownloadtasksOperationsGetCall { 22833 c := &SdfdownloadtasksOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22834 c.name = name 22835 return c 22836} 22837 22838// Fields allows partial responses to be retrieved. See 22839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22840// for more information. 22841func (c *SdfdownloadtasksOperationsGetCall) Fields(s ...googleapi.Field) *SdfdownloadtasksOperationsGetCall { 22842 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22843 return c 22844} 22845 22846// IfNoneMatch sets the optional parameter which makes the operation 22847// fail if the object's ETag matches the given value. This is useful for 22848// getting updates only after the object has changed since the last 22849// request. Use googleapi.IsNotModified to check whether the response 22850// error from Do is the result of In-None-Match. 22851func (c *SdfdownloadtasksOperationsGetCall) IfNoneMatch(entityTag string) *SdfdownloadtasksOperationsGetCall { 22852 c.ifNoneMatch_ = entityTag 22853 return c 22854} 22855 22856// Context sets the context to be used in this call's Do method. Any 22857// pending HTTP request will be aborted if the provided context is 22858// canceled. 22859func (c *SdfdownloadtasksOperationsGetCall) Context(ctx context.Context) *SdfdownloadtasksOperationsGetCall { 22860 c.ctx_ = ctx 22861 return c 22862} 22863 22864// Header returns an http.Header that can be modified by the caller to 22865// add HTTP headers to the request. 22866func (c *SdfdownloadtasksOperationsGetCall) Header() http.Header { 22867 if c.header_ == nil { 22868 c.header_ = make(http.Header) 22869 } 22870 return c.header_ 22871} 22872 22873func (c *SdfdownloadtasksOperationsGetCall) doRequest(alt string) (*http.Response, error) { 22874 reqHeaders := make(http.Header) 22875 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 22876 for k, v := range c.header_ { 22877 reqHeaders[k] = v 22878 } 22879 reqHeaders.Set("User-Agent", c.s.userAgent()) 22880 if c.ifNoneMatch_ != "" { 22881 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 22882 } 22883 var body io.Reader = nil 22884 c.urlParams_.Set("alt", alt) 22885 c.urlParams_.Set("prettyPrint", "false") 22886 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 22887 urls += "?" + c.urlParams_.Encode() 22888 req, err := http.NewRequest("GET", urls, body) 22889 if err != nil { 22890 return nil, err 22891 } 22892 req.Header = reqHeaders 22893 googleapi.Expand(req.URL, map[string]string{ 22894 "name": c.name, 22895 }) 22896 return gensupport.SendRequest(c.ctx_, c.s.client, req) 22897} 22898 22899// Do executes the "displayvideo.sdfdownloadtasks.operations.get" call. 22900// Exactly one of *Operation or error will be non-nil. Any non-2xx 22901// status code is an error. Response headers are in either 22902// *Operation.ServerResponse.Header or (if a response was returned at 22903// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 22904// to check whether the returned error was because 22905// http.StatusNotModified was returned. 22906func (c *SdfdownloadtasksOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 22907 gensupport.SetOptions(c.urlParams_, opts...) 22908 res, err := c.doRequest("json") 22909 if res != nil && res.StatusCode == http.StatusNotModified { 22910 if res.Body != nil { 22911 res.Body.Close() 22912 } 22913 return nil, &googleapi.Error{ 22914 Code: res.StatusCode, 22915 Header: res.Header, 22916 } 22917 } 22918 if err != nil { 22919 return nil, err 22920 } 22921 defer googleapi.CloseBody(res) 22922 if err := googleapi.CheckResponse(res); err != nil { 22923 return nil, err 22924 } 22925 ret := &Operation{ 22926 ServerResponse: googleapi.ServerResponse{ 22927 Header: res.Header, 22928 HTTPStatusCode: res.StatusCode, 22929 }, 22930 } 22931 target := &ret 22932 if err := gensupport.DecodeResponse(target, res); err != nil { 22933 return nil, err 22934 } 22935 return ret, nil 22936 // { 22937 // "description": "Gets the latest state of an asynchronous SDF download task operation. Clients should poll this method at intervals of 30 seconds.", 22938 // "flatPath": "v1/sdfdownloadtasks/operations/{operationsId}", 22939 // "httpMethod": "GET", 22940 // "id": "displayvideo.sdfdownloadtasks.operations.get", 22941 // "parameterOrder": [ 22942 // "name" 22943 // ], 22944 // "parameters": { 22945 // "name": { 22946 // "description": "The name of the operation resource.", 22947 // "location": "path", 22948 // "pattern": "^sdfdownloadtasks/operations/[^/]+$", 22949 // "required": true, 22950 // "type": "string" 22951 // } 22952 // }, 22953 // "path": "v1/{+name}", 22954 // "response": { 22955 // "$ref": "Operation" 22956 // }, 22957 // "scopes": [ 22958 // "https://www.googleapis.com/auth/display-video", 22959 // "https://www.googleapis.com/auth/doubleclickbidmanager" 22960 // ] 22961 // } 22962 22963} 22964 22965// method id "displayvideo.targetingTypes.targetingOptions.get": 22966 22967type TargetingTypesTargetingOptionsGetCall struct { 22968 s *Service 22969 targetingType string 22970 targetingOptionId string 22971 urlParams_ gensupport.URLParams 22972 ifNoneMatch_ string 22973 ctx_ context.Context 22974 header_ http.Header 22975} 22976 22977// Get: Gets a single targeting option. 22978func (r *TargetingTypesTargetingOptionsService) Get(targetingType string, targetingOptionId string) *TargetingTypesTargetingOptionsGetCall { 22979 c := &TargetingTypesTargetingOptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 22980 c.targetingType = targetingType 22981 c.targetingOptionId = targetingOptionId 22982 return c 22983} 22984 22985// AdvertiserId sets the optional parameter "advertiserId": Required. 22986// The Advertiser this request is being made in the context of. 22987func (c *TargetingTypesTargetingOptionsGetCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsGetCall { 22988 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 22989 return c 22990} 22991 22992// Fields allows partial responses to be retrieved. See 22993// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 22994// for more information. 22995func (c *TargetingTypesTargetingOptionsGetCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsGetCall { 22996 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 22997 return c 22998} 22999 23000// IfNoneMatch sets the optional parameter which makes the operation 23001// fail if the object's ETag matches the given value. This is useful for 23002// getting updates only after the object has changed since the last 23003// request. Use googleapi.IsNotModified to check whether the response 23004// error from Do is the result of In-None-Match. 23005func (c *TargetingTypesTargetingOptionsGetCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsGetCall { 23006 c.ifNoneMatch_ = entityTag 23007 return c 23008} 23009 23010// Context sets the context to be used in this call's Do method. Any 23011// pending HTTP request will be aborted if the provided context is 23012// canceled. 23013func (c *TargetingTypesTargetingOptionsGetCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsGetCall { 23014 c.ctx_ = ctx 23015 return c 23016} 23017 23018// Header returns an http.Header that can be modified by the caller to 23019// add HTTP headers to the request. 23020func (c *TargetingTypesTargetingOptionsGetCall) Header() http.Header { 23021 if c.header_ == nil { 23022 c.header_ = make(http.Header) 23023 } 23024 return c.header_ 23025} 23026 23027func (c *TargetingTypesTargetingOptionsGetCall) doRequest(alt string) (*http.Response, error) { 23028 reqHeaders := make(http.Header) 23029 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23030 for k, v := range c.header_ { 23031 reqHeaders[k] = v 23032 } 23033 reqHeaders.Set("User-Agent", c.s.userAgent()) 23034 if c.ifNoneMatch_ != "" { 23035 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23036 } 23037 var body io.Reader = nil 23038 c.urlParams_.Set("alt", alt) 23039 c.urlParams_.Set("prettyPrint", "false") 23040 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/targetingTypes/{+targetingType}/targetingOptions/{+targetingOptionId}") 23041 urls += "?" + c.urlParams_.Encode() 23042 req, err := http.NewRequest("GET", urls, body) 23043 if err != nil { 23044 return nil, err 23045 } 23046 req.Header = reqHeaders 23047 googleapi.Expand(req.URL, map[string]string{ 23048 "targetingType": c.targetingType, 23049 "targetingOptionId": c.targetingOptionId, 23050 }) 23051 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23052} 23053 23054// Do executes the "displayvideo.targetingTypes.targetingOptions.get" call. 23055// Exactly one of *TargetingOption or error will be non-nil. Any non-2xx 23056// status code is an error. Response headers are in either 23057// *TargetingOption.ServerResponse.Header or (if a response was returned 23058// at all) in error.(*googleapi.Error).Header. Use 23059// googleapi.IsNotModified to check whether the returned error was 23060// because http.StatusNotModified was returned. 23061func (c *TargetingTypesTargetingOptionsGetCall) Do(opts ...googleapi.CallOption) (*TargetingOption, error) { 23062 gensupport.SetOptions(c.urlParams_, opts...) 23063 res, err := c.doRequest("json") 23064 if res != nil && res.StatusCode == http.StatusNotModified { 23065 if res.Body != nil { 23066 res.Body.Close() 23067 } 23068 return nil, &googleapi.Error{ 23069 Code: res.StatusCode, 23070 Header: res.Header, 23071 } 23072 } 23073 if err != nil { 23074 return nil, err 23075 } 23076 defer googleapi.CloseBody(res) 23077 if err := googleapi.CheckResponse(res); err != nil { 23078 return nil, err 23079 } 23080 ret := &TargetingOption{ 23081 ServerResponse: googleapi.ServerResponse{ 23082 Header: res.Header, 23083 HTTPStatusCode: res.StatusCode, 23084 }, 23085 } 23086 target := &ret 23087 if err := gensupport.DecodeResponse(target, res); err != nil { 23088 return nil, err 23089 } 23090 return ret, nil 23091 // { 23092 // "description": "Gets a single targeting option.", 23093 // "flatPath": "v1/targetingTypes/{targetingTypesId}/targetingOptions/{targetingOptionsId}", 23094 // "httpMethod": "GET", 23095 // "id": "displayvideo.targetingTypes.targetingOptions.get", 23096 // "parameterOrder": [ 23097 // "targetingType", 23098 // "targetingOptionId" 23099 // ], 23100 // "parameters": { 23101 // "advertiserId": { 23102 // "description": "Required. The Advertiser this request is being made in the context of.", 23103 // "format": "int64", 23104 // "location": "query", 23105 // "type": "string" 23106 // }, 23107 // "targetingOptionId": { 23108 // "description": "Required. The ID of the of targeting option to retrieve.", 23109 // "location": "path", 23110 // "pattern": "^[^/]+$", 23111 // "required": true, 23112 // "type": "string" 23113 // }, 23114 // "targetingType": { 23115 // "description": "Required. The type of targeting option to retrieve.", 23116 // "enum": [ 23117 // "TARGETING_TYPE_UNSPECIFIED", 23118 // "TARGETING_TYPE_CHANNEL", 23119 // "TARGETING_TYPE_APP_CATEGORY", 23120 // "TARGETING_TYPE_APP", 23121 // "TARGETING_TYPE_URL", 23122 // "TARGETING_TYPE_DAY_AND_TIME", 23123 // "TARGETING_TYPE_AGE_RANGE", 23124 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 23125 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 23126 // "TARGETING_TYPE_GENDER", 23127 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 23128 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 23129 // "TARGETING_TYPE_PARENTAL_STATUS", 23130 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 23131 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 23132 // "TARGETING_TYPE_DEVICE_TYPE", 23133 // "TARGETING_TYPE_AUDIENCE_GROUP", 23134 // "TARGETING_TYPE_BROWSER", 23135 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 23136 // "TARGETING_TYPE_ON_SCREEN_POSITION", 23137 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 23138 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 23139 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 23140 // "TARGETING_TYPE_ENVIRONMENT", 23141 // "TARGETING_TYPE_CARRIER_AND_ISP", 23142 // "TARGETING_TYPE_OPERATING_SYSTEM", 23143 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 23144 // "TARGETING_TYPE_KEYWORD", 23145 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 23146 // "TARGETING_TYPE_VIEWABILITY", 23147 // "TARGETING_TYPE_CATEGORY", 23148 // "TARGETING_TYPE_INVENTORY_SOURCE", 23149 // "TARGETING_TYPE_LANGUAGE", 23150 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 23151 // "TARGETING_TYPE_GEO_REGION", 23152 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 23153 // "TARGETING_TYPE_PROXIMITY_LOCATION", 23154 // "TARGETING_TYPE_EXCHANGE", 23155 // "TARGETING_TYPE_SUB_EXCHANGE" 23156 // ], 23157 // "location": "path", 23158 // "pattern": "^[^/]+$", 23159 // "required": true, 23160 // "type": "string" 23161 // } 23162 // }, 23163 // "path": "v1/targetingTypes/{+targetingType}/targetingOptions/{+targetingOptionId}", 23164 // "response": { 23165 // "$ref": "TargetingOption" 23166 // }, 23167 // "scopes": [ 23168 // "https://www.googleapis.com/auth/display-video" 23169 // ] 23170 // } 23171 23172} 23173 23174// method id "displayvideo.targetingTypes.targetingOptions.list": 23175 23176type TargetingTypesTargetingOptionsListCall struct { 23177 s *Service 23178 targetingType string 23179 urlParams_ gensupport.URLParams 23180 ifNoneMatch_ string 23181 ctx_ context.Context 23182 header_ http.Header 23183} 23184 23185// List: Lists targeting options of a given type. 23186func (r *TargetingTypesTargetingOptionsService) List(targetingType string) *TargetingTypesTargetingOptionsListCall { 23187 c := &TargetingTypesTargetingOptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 23188 c.targetingType = targetingType 23189 return c 23190} 23191 23192// AdvertiserId sets the optional parameter "advertiserId": Required. 23193// The Advertiser this request is being made in the context of. 23194func (c *TargetingTypesTargetingOptionsListCall) AdvertiserId(advertiserId int64) *TargetingTypesTargetingOptionsListCall { 23195 c.urlParams_.Set("advertiserId", fmt.Sprint(advertiserId)) 23196 return c 23197} 23198 23199// Filter sets the optional parameter "filter": Allows filtering by 23200// targeting option properties. 23201// 23202// Supported syntax: 23203// 23204// * Filter expressions are made up of one or more restrictions. 23205// * Restrictions can be combined by `OR` logical operators. 23206// * A restriction has the form of `{field} {operator} {value}`. 23207// * The operator must be "=" (equal sign). 23208// * Supported fields: 23209// - `targetingOptionId` 23210// 23211// The length of this field should be no more than 500 characters. 23212func (c *TargetingTypesTargetingOptionsListCall) Filter(filter string) *TargetingTypesTargetingOptionsListCall { 23213 c.urlParams_.Set("filter", filter) 23214 return c 23215} 23216 23217// OrderBy sets the optional parameter "orderBy": Field by which to sort 23218// the list. 23219// Acceptable values are: 23220// 23221// * `targetingOptionId` (default) 23222// 23223// The default sorting order is ascending. To specify descending order 23224// for 23225// a field, a suffix "desc" should be added to the field name. 23226// Example: `targetingOptionId desc`. 23227func (c *TargetingTypesTargetingOptionsListCall) OrderBy(orderBy string) *TargetingTypesTargetingOptionsListCall { 23228 c.urlParams_.Set("orderBy", orderBy) 23229 return c 23230} 23231 23232// PageSize sets the optional parameter "pageSize": Requested page size. 23233// Must be between `1` and `100`. If unspecified will 23234// default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid 23235// value 23236// is specified. 23237func (c *TargetingTypesTargetingOptionsListCall) PageSize(pageSize int64) *TargetingTypesTargetingOptionsListCall { 23238 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 23239 return c 23240} 23241 23242// PageToken sets the optional parameter "pageToken": A token 23243// identifying a page of results the server should return. 23244// Typically, this is the value of 23245// next_page_token 23246// returned from the previous call to `ListTargetingOptions` method. 23247// If not specified, the first page of results will be returned. 23248func (c *TargetingTypesTargetingOptionsListCall) PageToken(pageToken string) *TargetingTypesTargetingOptionsListCall { 23249 c.urlParams_.Set("pageToken", pageToken) 23250 return c 23251} 23252 23253// Fields allows partial responses to be retrieved. See 23254// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 23255// for more information. 23256func (c *TargetingTypesTargetingOptionsListCall) Fields(s ...googleapi.Field) *TargetingTypesTargetingOptionsListCall { 23257 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 23258 return c 23259} 23260 23261// IfNoneMatch sets the optional parameter which makes the operation 23262// fail if the object's ETag matches the given value. This is useful for 23263// getting updates only after the object has changed since the last 23264// request. Use googleapi.IsNotModified to check whether the response 23265// error from Do is the result of In-None-Match. 23266func (c *TargetingTypesTargetingOptionsListCall) IfNoneMatch(entityTag string) *TargetingTypesTargetingOptionsListCall { 23267 c.ifNoneMatch_ = entityTag 23268 return c 23269} 23270 23271// Context sets the context to be used in this call's Do method. Any 23272// pending HTTP request will be aborted if the provided context is 23273// canceled. 23274func (c *TargetingTypesTargetingOptionsListCall) Context(ctx context.Context) *TargetingTypesTargetingOptionsListCall { 23275 c.ctx_ = ctx 23276 return c 23277} 23278 23279// Header returns an http.Header that can be modified by the caller to 23280// add HTTP headers to the request. 23281func (c *TargetingTypesTargetingOptionsListCall) Header() http.Header { 23282 if c.header_ == nil { 23283 c.header_ = make(http.Header) 23284 } 23285 return c.header_ 23286} 23287 23288func (c *TargetingTypesTargetingOptionsListCall) doRequest(alt string) (*http.Response, error) { 23289 reqHeaders := make(http.Header) 23290 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503") 23291 for k, v := range c.header_ { 23292 reqHeaders[k] = v 23293 } 23294 reqHeaders.Set("User-Agent", c.s.userAgent()) 23295 if c.ifNoneMatch_ != "" { 23296 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 23297 } 23298 var body io.Reader = nil 23299 c.urlParams_.Set("alt", alt) 23300 c.urlParams_.Set("prettyPrint", "false") 23301 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/targetingTypes/{+targetingType}/targetingOptions") 23302 urls += "?" + c.urlParams_.Encode() 23303 req, err := http.NewRequest("GET", urls, body) 23304 if err != nil { 23305 return nil, err 23306 } 23307 req.Header = reqHeaders 23308 googleapi.Expand(req.URL, map[string]string{ 23309 "targetingType": c.targetingType, 23310 }) 23311 return gensupport.SendRequest(c.ctx_, c.s.client, req) 23312} 23313 23314// Do executes the "displayvideo.targetingTypes.targetingOptions.list" call. 23315// Exactly one of *ListTargetingOptionsResponse or error will be 23316// non-nil. Any non-2xx status code is an error. Response headers are in 23317// either *ListTargetingOptionsResponse.ServerResponse.Header or (if a 23318// response was returned at all) in error.(*googleapi.Error).Header. Use 23319// googleapi.IsNotModified to check whether the returned error was 23320// because http.StatusNotModified was returned. 23321func (c *TargetingTypesTargetingOptionsListCall) Do(opts ...googleapi.CallOption) (*ListTargetingOptionsResponse, error) { 23322 gensupport.SetOptions(c.urlParams_, opts...) 23323 res, err := c.doRequest("json") 23324 if res != nil && res.StatusCode == http.StatusNotModified { 23325 if res.Body != nil { 23326 res.Body.Close() 23327 } 23328 return nil, &googleapi.Error{ 23329 Code: res.StatusCode, 23330 Header: res.Header, 23331 } 23332 } 23333 if err != nil { 23334 return nil, err 23335 } 23336 defer googleapi.CloseBody(res) 23337 if err := googleapi.CheckResponse(res); err != nil { 23338 return nil, err 23339 } 23340 ret := &ListTargetingOptionsResponse{ 23341 ServerResponse: googleapi.ServerResponse{ 23342 Header: res.Header, 23343 HTTPStatusCode: res.StatusCode, 23344 }, 23345 } 23346 target := &ret 23347 if err := gensupport.DecodeResponse(target, res); err != nil { 23348 return nil, err 23349 } 23350 return ret, nil 23351 // { 23352 // "description": "Lists targeting options of a given type.", 23353 // "flatPath": "v1/targetingTypes/{targetingTypesId}/targetingOptions", 23354 // "httpMethod": "GET", 23355 // "id": "displayvideo.targetingTypes.targetingOptions.list", 23356 // "parameterOrder": [ 23357 // "targetingType" 23358 // ], 23359 // "parameters": { 23360 // "advertiserId": { 23361 // "description": "Required. The Advertiser this request is being made in the context of.", 23362 // "format": "int64", 23363 // "location": "query", 23364 // "type": "string" 23365 // }, 23366 // "filter": { 23367 // "description": "Allows filtering by targeting option properties.\n\nSupported syntax:\n\n* Filter expressions are made up of one or more restrictions.\n* Restrictions can be combined by `OR` logical operators.\n* A restriction has the form of `{field} {operator} {value}`.\n* The operator must be \"=\" (equal sign).\n* Supported fields:\n - `targetingOptionId`\n\nThe length of this field should be no more than 500 characters.", 23368 // "location": "query", 23369 // "type": "string" 23370 // }, 23371 // "orderBy": { 23372 // "description": "Field by which to sort the list.\nAcceptable values are:\n\n* `targetingOptionId` (default)\n\nThe default sorting order is ascending. To specify descending order for\na field, a suffix \"desc\" should be added to the field name.\nExample: `targetingOptionId desc`.", 23373 // "location": "query", 23374 // "type": "string" 23375 // }, 23376 // "pageSize": { 23377 // "description": "Requested page size. Must be between `1` and `100`. If unspecified will\ndefault to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value\nis specified.", 23378 // "format": "int32", 23379 // "location": "query", 23380 // "type": "integer" 23381 // }, 23382 // "pageToken": { 23383 // "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nnext_page_token\nreturned from the previous call to `ListTargetingOptions` method.\nIf not specified, the first page of results will be returned.", 23384 // "location": "query", 23385 // "type": "string" 23386 // }, 23387 // "targetingType": { 23388 // "description": "Required. The type of targeting option to be listed.", 23389 // "enum": [ 23390 // "TARGETING_TYPE_UNSPECIFIED", 23391 // "TARGETING_TYPE_CHANNEL", 23392 // "TARGETING_TYPE_APP_CATEGORY", 23393 // "TARGETING_TYPE_APP", 23394 // "TARGETING_TYPE_URL", 23395 // "TARGETING_TYPE_DAY_AND_TIME", 23396 // "TARGETING_TYPE_AGE_RANGE", 23397 // "TARGETING_TYPE_REGIONAL_LOCATION_LIST", 23398 // "TARGETING_TYPE_PROXIMITY_LOCATION_LIST", 23399 // "TARGETING_TYPE_GENDER", 23400 // "TARGETING_TYPE_VIDEO_PLAYER_SIZE", 23401 // "TARGETING_TYPE_USER_REWARDED_CONTENT", 23402 // "TARGETING_TYPE_PARENTAL_STATUS", 23403 // "TARGETING_TYPE_CONTENT_INSTREAM_POSITION", 23404 // "TARGETING_TYPE_CONTENT_OUTSTREAM_POSITION", 23405 // "TARGETING_TYPE_DEVICE_TYPE", 23406 // "TARGETING_TYPE_AUDIENCE_GROUP", 23407 // "TARGETING_TYPE_BROWSER", 23408 // "TARGETING_TYPE_HOUSEHOLD_INCOME", 23409 // "TARGETING_TYPE_ON_SCREEN_POSITION", 23410 // "TARGETING_TYPE_THIRD_PARTY_VERIFIER", 23411 // "TARGETING_TYPE_DIGITAL_CONTENT_LABEL_EXCLUSION", 23412 // "TARGETING_TYPE_SENSITIVE_CATEGORY_EXCLUSION", 23413 // "TARGETING_TYPE_ENVIRONMENT", 23414 // "TARGETING_TYPE_CARRIER_AND_ISP", 23415 // "TARGETING_TYPE_OPERATING_SYSTEM", 23416 // "TARGETING_TYPE_DEVICE_MAKE_MODEL", 23417 // "TARGETING_TYPE_KEYWORD", 23418 // "TARGETING_TYPE_NEGATIVE_KEYWORD_LIST", 23419 // "TARGETING_TYPE_VIEWABILITY", 23420 // "TARGETING_TYPE_CATEGORY", 23421 // "TARGETING_TYPE_INVENTORY_SOURCE", 23422 // "TARGETING_TYPE_LANGUAGE", 23423 // "TARGETING_TYPE_AUTHORIZED_SELLER_STATUS", 23424 // "TARGETING_TYPE_GEO_REGION", 23425 // "TARGETING_TYPE_INVENTORY_SOURCE_GROUP", 23426 // "TARGETING_TYPE_PROXIMITY_LOCATION", 23427 // "TARGETING_TYPE_EXCHANGE", 23428 // "TARGETING_TYPE_SUB_EXCHANGE" 23429 // ], 23430 // "location": "path", 23431 // "pattern": "^[^/]+$", 23432 // "required": true, 23433 // "type": "string" 23434 // } 23435 // }, 23436 // "path": "v1/targetingTypes/{+targetingType}/targetingOptions", 23437 // "response": { 23438 // "$ref": "ListTargetingOptionsResponse" 23439 // }, 23440 // "scopes": [ 23441 // "https://www.googleapis.com/auth/display-video" 23442 // ] 23443 // } 23444 23445} 23446 23447// Pages invokes f for each page of results. 23448// A non-nil error returned from f will halt the iteration. 23449// The provided context supersedes any context provided to the Context method. 23450func (c *TargetingTypesTargetingOptionsListCall) Pages(ctx context.Context, f func(*ListTargetingOptionsResponse) error) error { 23451 c.ctx_ = ctx 23452 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 23453 for { 23454 x, err := c.Do() 23455 if err != nil { 23456 return err 23457 } 23458 if err := f(x); err != nil { 23459 return err 23460 } 23461 if x.NextPageToken == "" { 23462 return nil 23463 } 23464 c.PageToken(x.NextPageToken) 23465 } 23466} 23467