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