| 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 adexchangebuyer2 provides access to the Ad Exchange Buyer API II. |
| 8 |
// |
| 9 |
// For product documentation, see: https://developers.google.com/authorized-buyers/apis/reference/rest/ |
| 10 |
// |
| 11 |
// # 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/adexchangebuyer2/v2beta1" |
| 27 |
// ... |
| 28 |
// ctx := context.Background() |
| 29 |
// adexchangebuyer2Service, err := adexchangebuyer2.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 |
// adexchangebuyer2Service, err := adexchangebuyer2.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 |
// adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) |
| 49 |
// |
| 50 |
// See [google.golang.org/api/option.ClientOption] for details on options. |
| 51 |
package adexchangebuyer2 // import "google.golang.org/api/adexchangebuyer2/v2beta1" |
| 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 = "adexchangebuyer2:v2beta1" |
| 93 |
const apiName = "adexchangebuyer2" |
| 94 |
const apiVersion = "v2beta1" |
| 95 |
const basePath = "https://adexchangebuyer.googleapis.com/" |
| 96 |
const basePathTemplate = "https://adexchangebuyer.UNIVERSE_DOMAIN/" |
| 97 |
const mtlsBasePath = "https://adexchangebuyer.mtls.googleapis.com/" |
| 98 |
|
| 99 |
// OAuth2 scopes used by this API. |
| 100 |
const ( |
| 101 |
// Manage your Ad Exchange buyer account configuration |
| 102 |
AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchange.buyer" |
| 103 |
) |
| 104 |
|
| 105 |
// NewService creates a new Service. |
| 106 |
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { |
| 107 |
scopesOption := internaloption.WithDefaultScopes( |
| 108 |
"https://www.googleapis.com/auth/adexchange.buyer", |
| 109 |
) |
| 110 |
// NOTE: prepend, so we don't override user-specified scopes. |
| 111 |
opts = append([]option.ClientOption{scopesOption}, opts...) |
| 112 |
opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) |
| 113 |
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) |
| 114 |
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) |
| 115 |
opts = append(opts, internaloption.EnableNewAuthLibrary()) |
| 116 |
client, endpoint, err := htransport.NewClient(ctx, opts...) |
| 117 |
if err != nil { |
| 118 |
return nil, err |
| 119 |
} |
| 120 |
s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} |
| 121 |
s.Accounts = NewAccountsService(s) |
| 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 |
Accounts *AccountsService |
| 149 |
|
| 150 |
Bidders *BiddersService |
| 151 |
|
| 152 |
Buyers *BuyersService |
| 153 |
} |
| 154 |
|
| 155 |
func (s *Service) userAgent() string { |
| 156 |
if s.UserAgent == "" { |
| 157 |
return googleapi.UserAgent |
| 158 |
} |
| 159 |
return googleapi.UserAgent + " " + s.UserAgent |
| 160 |
} |
| 161 |
|
| 162 |
func NewAccountsService(s *Service) *AccountsService { |
| 163 |
rs := &AccountsService{s: s} |
| 164 |
rs.Clients = NewAccountsClientsService(s) |
| 165 |
rs.Creatives = NewAccountsCreativesService(s) |
| 166 |
rs.FinalizedProposals = NewAccountsFinalizedProposalsService(s) |
| 167 |
rs.Products = NewAccountsProductsService(s) |
| 168 |
rs.Proposals = NewAccountsProposalsService(s) |
| 169 |
rs.PublisherProfiles = NewAccountsPublisherProfilesService(s) |
| 170 |
return rs |
| 171 |
} |
| 172 |
|
| 173 |
type AccountsService struct { |
| 174 |
s *Service |
| 175 |
|
| 176 |
Clients *AccountsClientsService |
| 177 |
|
| 178 |
Creatives *AccountsCreativesService |
| 179 |
|
| 180 |
FinalizedProposals *AccountsFinalizedProposalsService |
| 181 |
|
| 182 |
Products *AccountsProductsService |
| 183 |
|
| 184 |
Proposals *AccountsProposalsService |
| 185 |
|
| 186 |
PublisherProfiles *AccountsPublisherProfilesService |
| 187 |
} |
| 188 |
|
| 189 |
func NewAccountsClientsService(s *Service) *AccountsClientsService { |
| 190 |
rs := &AccountsClientsService{s: s} |
| 191 |
rs.Invitations = NewAccountsClientsInvitationsService(s) |
| 192 |
rs.Users = NewAccountsClientsUsersService(s) |
| 193 |
return rs |
| 194 |
} |
| 195 |
|
| 196 |
type AccountsClientsService struct { |
| 197 |
s *Service |
| 198 |
|
| 199 |
Invitations *AccountsClientsInvitationsService |
| 200 |
|
| 201 |
Users *AccountsClientsUsersService |
| 202 |
} |
| 203 |
|
| 204 |
func NewAccountsClientsInvitationsService(s *Service) *AccountsClientsInvitationsService { |
| 205 |
rs := &AccountsClientsInvitationsService{s: s} |
| 206 |
return rs |
| 207 |
} |
| 208 |
|
| 209 |
type AccountsClientsInvitationsService struct { |
| 210 |
s *Service |
| 211 |
} |
| 212 |
|
| 213 |
func NewAccountsClientsUsersService(s *Service) *AccountsClientsUsersService { |
| 214 |
rs := &AccountsClientsUsersService{s: s} |
| 215 |
return rs |
| 216 |
} |
| 217 |
|
| 218 |
type AccountsClientsUsersService struct { |
| 219 |
s *Service |
| 220 |
} |
| 221 |
|
| 222 |
func NewAccountsCreativesService(s *Service) *AccountsCreativesService { |
| 223 |
rs := &AccountsCreativesService{s: s} |
| 224 |
rs.DealAssociations = NewAccountsCreativesDealAssociationsService(s) |
| 225 |
return rs |
| 226 |
} |
| 227 |
|
| 228 |
type AccountsCreativesService struct { |
| 229 |
s *Service |
| 230 |
|
| 231 |
DealAssociations *AccountsCreativesDealAssociationsService |
| 232 |
} |
| 233 |
|
| 234 |
func NewAccountsCreativesDealAssociationsService(s *Service) *AccountsCreativesDealAssociationsService { |
| 235 |
rs := &AccountsCreativesDealAssociationsService{s: s} |
| 236 |
return rs |
| 237 |
} |
| 238 |
|
| 239 |
type AccountsCreativesDealAssociationsService struct { |
| 240 |
s *Service |
| 241 |
} |
| 242 |
|
| 243 |
func NewAccountsFinalizedProposalsService(s *Service) *AccountsFinalizedProposalsService { |
| 244 |
rs := &AccountsFinalizedProposalsService{s: s} |
| 245 |
return rs |
| 246 |
} |
| 247 |
|
| 248 |
type AccountsFinalizedProposalsService struct { |
| 249 |
s *Service |
| 250 |
} |
| 251 |
|
| 252 |
func NewAccountsProductsService(s *Service) *AccountsProductsService { |
| 253 |
rs := &AccountsProductsService{s: s} |
| 254 |
return rs |
| 255 |
} |
| 256 |
|
| 257 |
type AccountsProductsService struct { |
| 258 |
s *Service |
| 259 |
} |
| 260 |
|
| 261 |
func NewAccountsProposalsService(s *Service) *AccountsProposalsService { |
| 262 |
rs := &AccountsProposalsService{s: s} |
| 263 |
return rs |
| 264 |
} |
| 265 |
|
| 266 |
type AccountsProposalsService struct { |
| 267 |
s *Service |
| 268 |
} |
| 269 |
|
| 270 |
func NewAccountsPublisherProfilesService(s *Service) *AccountsPublisherProfilesService { |
| 271 |
rs := &AccountsPublisherProfilesService{s: s} |
| 272 |
return rs |
| 273 |
} |
| 274 |
|
| 275 |
type AccountsPublisherProfilesService struct { |
| 276 |
s *Service |
| 277 |
} |
| 278 |
|
| 279 |
func NewBiddersService(s *Service) *BiddersService { |
| 280 |
rs := &BiddersService{s: s} |
| 281 |
rs.Accounts = NewBiddersAccountsService(s) |
| 282 |
rs.FilterSets = NewBiddersFilterSetsService(s) |
| 283 |
return rs |
| 284 |
} |
| 285 |
|
| 286 |
type BiddersService struct { |
| 287 |
s *Service |
| 288 |
|
| 289 |
Accounts *BiddersAccountsService |
| 290 |
|
| 291 |
FilterSets *BiddersFilterSetsService |
| 292 |
} |
| 293 |
|
| 294 |
func NewBiddersAccountsService(s *Service) *BiddersAccountsService { |
| 295 |
rs := &BiddersAccountsService{s: s} |
| 296 |
rs.FilterSets = NewBiddersAccountsFilterSetsService(s) |
| 297 |
return rs |
| 298 |
} |
| 299 |
|
| 300 |
type BiddersAccountsService struct { |
| 301 |
s *Service |
| 302 |
|
| 303 |
FilterSets *BiddersAccountsFilterSetsService |
| 304 |
} |
| 305 |
|
| 306 |
func NewBiddersAccountsFilterSetsService(s *Service) *BiddersAccountsFilterSetsService { |
| 307 |
rs := &BiddersAccountsFilterSetsService{s: s} |
| 308 |
rs.BidMetrics = NewBiddersAccountsFilterSetsBidMetricsService(s) |
| 309 |
rs.BidResponseErrors = NewBiddersAccountsFilterSetsBidResponseErrorsService(s) |
| 310 |
rs.BidResponsesWithoutBids = NewBiddersAccountsFilterSetsBidResponsesWithoutBidsService(s) |
| 311 |
rs.FilteredBidRequests = NewBiddersAccountsFilterSetsFilteredBidRequestsService(s) |
| 312 |
rs.FilteredBids = NewBiddersAccountsFilterSetsFilteredBidsService(s) |
| 313 |
rs.ImpressionMetrics = NewBiddersAccountsFilterSetsImpressionMetricsService(s) |
| 314 |
rs.LosingBids = NewBiddersAccountsFilterSetsLosingBidsService(s) |
| 315 |
rs.NonBillableWinningBids = NewBiddersAccountsFilterSetsNonBillableWinningBidsService(s) |
| 316 |
return rs |
| 317 |
} |
| 318 |
|
| 319 |
type BiddersAccountsFilterSetsService struct { |
| 320 |
s *Service |
| 321 |
|
| 322 |
BidMetrics *BiddersAccountsFilterSetsBidMetricsService |
| 323 |
|
| 324 |
BidResponseErrors *BiddersAccountsFilterSetsBidResponseErrorsService |
| 325 |
|
| 326 |
BidResponsesWithoutBids *BiddersAccountsFilterSetsBidResponsesWithoutBidsService |
| 327 |
|
| 328 |
FilteredBidRequests *BiddersAccountsFilterSetsFilteredBidRequestsService |
| 329 |
|
| 330 |
FilteredBids *BiddersAccountsFilterSetsFilteredBidsService |
| 331 |
|
| 332 |
ImpressionMetrics *BiddersAccountsFilterSetsImpressionMetricsService |
| 333 |
|
| 334 |
LosingBids *BiddersAccountsFilterSetsLosingBidsService |
| 335 |
|
| 336 |
NonBillableWinningBids *BiddersAccountsFilterSetsNonBillableWinningBidsService |
| 337 |
} |
| 338 |
|
| 339 |
func NewBiddersAccountsFilterSetsBidMetricsService(s *Service) *BiddersAccountsFilterSetsBidMetricsService { |
| 340 |
rs := &BiddersAccountsFilterSetsBidMetricsService{s: s} |
| 341 |
return rs |
| 342 |
} |
| 343 |
|
| 344 |
type BiddersAccountsFilterSetsBidMetricsService struct { |
| 345 |
s *Service |
| 346 |
} |
| 347 |
|
| 348 |
func NewBiddersAccountsFilterSetsBidResponseErrorsService(s *Service) *BiddersAccountsFilterSetsBidResponseErrorsService { |
| 349 |
rs := &BiddersAccountsFilterSetsBidResponseErrorsService{s: s} |
| 350 |
return rs |
| 351 |
} |
| 352 |
|
| 353 |
type BiddersAccountsFilterSetsBidResponseErrorsService struct { |
| 354 |
s *Service |
| 355 |
} |
| 356 |
|
| 357 |
func NewBiddersAccountsFilterSetsBidResponsesWithoutBidsService(s *Service) *BiddersAccountsFilterSetsBidResponsesWithoutBidsService { |
| 358 |
rs := &BiddersAccountsFilterSetsBidResponsesWithoutBidsService{s: s} |
| 359 |
return rs |
| 360 |
} |
| 361 |
|
| 362 |
type BiddersAccountsFilterSetsBidResponsesWithoutBidsService struct { |
| 363 |
s *Service |
| 364 |
} |
| 365 |
|
| 366 |
func NewBiddersAccountsFilterSetsFilteredBidRequestsService(s *Service) *BiddersAccountsFilterSetsFilteredBidRequestsService { |
| 367 |
rs := &BiddersAccountsFilterSetsFilteredBidRequestsService{s: s} |
| 368 |
return rs |
| 369 |
} |
| 370 |
|
| 371 |
type BiddersAccountsFilterSetsFilteredBidRequestsService struct { |
| 372 |
s *Service |
| 373 |
} |
| 374 |
|
| 375 |
func NewBiddersAccountsFilterSetsFilteredBidsService(s *Service) *BiddersAccountsFilterSetsFilteredBidsService { |
| 376 |
rs := &BiddersAccountsFilterSetsFilteredBidsService{s: s} |
| 377 |
rs.Creatives = NewBiddersAccountsFilterSetsFilteredBidsCreativesService(s) |
| 378 |
rs.Details = NewBiddersAccountsFilterSetsFilteredBidsDetailsService(s) |
| 379 |
return rs |
| 380 |
} |
| 381 |
|
| 382 |
type BiddersAccountsFilterSetsFilteredBidsService struct { |
| 383 |
s *Service |
| 384 |
|
| 385 |
Creatives *BiddersAccountsFilterSetsFilteredBidsCreativesService |
| 386 |
|
| 387 |
Details *BiddersAccountsFilterSetsFilteredBidsDetailsService |
| 388 |
} |
| 389 |
|
| 390 |
func NewBiddersAccountsFilterSetsFilteredBidsCreativesService(s *Service) *BiddersAccountsFilterSetsFilteredBidsCreativesService { |
| 391 |
rs := &BiddersAccountsFilterSetsFilteredBidsCreativesService{s: s} |
| 392 |
return rs |
| 393 |
} |
| 394 |
|
| 395 |
type BiddersAccountsFilterSetsFilteredBidsCreativesService struct { |
| 396 |
s *Service |
| 397 |
} |
| 398 |
|
| 399 |
func NewBiddersAccountsFilterSetsFilteredBidsDetailsService(s *Service) *BiddersAccountsFilterSetsFilteredBidsDetailsService { |
| 400 |
rs := &BiddersAccountsFilterSetsFilteredBidsDetailsService{s: s} |
| 401 |
return rs |
| 402 |
} |
| 403 |
|
| 404 |
type BiddersAccountsFilterSetsFilteredBidsDetailsService struct { |
| 405 |
s *Service |
| 406 |
} |
| 407 |
|
| 408 |
func NewBiddersAccountsFilterSetsImpressionMetricsService(s *Service) *BiddersAccountsFilterSetsImpressionMetricsService { |
| 409 |
rs := &BiddersAccountsFilterSetsImpressionMetricsService{s: s} |
| 410 |
return rs |
| 411 |
} |
| 412 |
|
| 413 |
type BiddersAccountsFilterSetsImpressionMetricsService struct { |
| 414 |
s *Service |
| 415 |
} |
| 416 |
|
| 417 |
func NewBiddersAccountsFilterSetsLosingBidsService(s *Service) *BiddersAccountsFilterSetsLosingBidsService { |
| 418 |
rs := &BiddersAccountsFilterSetsLosingBidsService{s: s} |
| 419 |
return rs |
| 420 |
} |
| 421 |
|
| 422 |
type BiddersAccountsFilterSetsLosingBidsService struct { |
| 423 |
s *Service |
| 424 |
} |
| 425 |
|
| 426 |
func NewBiddersAccountsFilterSetsNonBillableWinningBidsService(s *Service) *BiddersAccountsFilterSetsNonBillableWinningBidsService { |
| 427 |
rs := &BiddersAccountsFilterSetsNonBillableWinningBidsService{s: s} |
| 428 |
return rs |
| 429 |
} |
| 430 |
|
| 431 |
type BiddersAccountsFilterSetsNonBillableWinningBidsService struct { |
| 432 |
s *Service |
| 433 |
} |
| 434 |
|
| 435 |
func NewBiddersFilterSetsService(s *Service) *BiddersFilterSetsService { |
| 436 |
rs := &BiddersFilterSetsService{s: s} |
| 437 |
rs.BidMetrics = NewBiddersFilterSetsBidMetricsService(s) |
| 438 |
rs.BidResponseErrors = NewBiddersFilterSetsBidResponseErrorsService(s) |
| 439 |
rs.BidResponsesWithoutBids = NewBiddersFilterSetsBidResponsesWithoutBidsService(s) |
| 440 |
rs.FilteredBidRequests = NewBiddersFilterSetsFilteredBidRequestsService(s) |
| 441 |
rs.FilteredBids = NewBiddersFilterSetsFilteredBidsService(s) |
| 442 |
rs.ImpressionMetrics = NewBiddersFilterSetsImpressionMetricsService(s) |
| 443 |
rs.LosingBids = NewBiddersFilterSetsLosingBidsService(s) |
| 444 |
rs.NonBillableWinningBids = NewBiddersFilterSetsNonBillableWinningBidsService(s) |
| 445 |
return rs |
| 446 |
} |
| 447 |
|
| 448 |
type BiddersFilterSetsService struct { |
| 449 |
s *Service |
| 450 |
|
| 451 |
BidMetrics *BiddersFilterSetsBidMetricsService |
| 452 |
|
| 453 |
BidResponseErrors *BiddersFilterSetsBidResponseErrorsService |
| 454 |
|
| 455 |
BidResponsesWithoutBids *BiddersFilterSetsBidResponsesWithoutBidsService |
| 456 |
|
| 457 |
FilteredBidRequests *BiddersFilterSetsFilteredBidRequestsService |
| 458 |
|
| 459 |
FilteredBids *BiddersFilterSetsFilteredBidsService |
| 460 |
|
| 461 |
ImpressionMetrics *BiddersFilterSetsImpressionMetricsService |
| 462 |
|
| 463 |
LosingBids *BiddersFilterSetsLosingBidsService |
| 464 |
|
| 465 |
NonBillableWinningBids *BiddersFilterSetsNonBillableWinningBidsService |
| 466 |
} |
| 467 |
|
| 468 |
func NewBiddersFilterSetsBidMetricsService(s *Service) *BiddersFilterSetsBidMetricsService { |
| 469 |
rs := &BiddersFilterSetsBidMetricsService{s: s} |
| 470 |
return rs |
| 471 |
} |
| 472 |
|
| 473 |
type BiddersFilterSetsBidMetricsService struct { |
| 474 |
s *Service |
| 475 |
} |
| 476 |
|
| 477 |
func NewBiddersFilterSetsBidResponseErrorsService(s *Service) *BiddersFilterSetsBidResponseErrorsService { |
| 478 |
rs := &BiddersFilterSetsBidResponseErrorsService{s: s} |
| 479 |
return rs |
| 480 |
} |
| 481 |
|
| 482 |
type BiddersFilterSetsBidResponseErrorsService struct { |
| 483 |
s *Service |
| 484 |
} |
| 485 |
|
| 486 |
func NewBiddersFilterSetsBidResponsesWithoutBidsService(s *Service) *BiddersFilterSetsBidResponsesWithoutBidsService { |
| 487 |
rs := &BiddersFilterSetsBidResponsesWithoutBidsService{s: s} |
| 488 |
return rs |
| 489 |
} |
| 490 |
|
| 491 |
type BiddersFilterSetsBidResponsesWithoutBidsService struct { |
| 492 |
s *Service |
| 493 |
} |
| 494 |
|
| 495 |
func NewBiddersFilterSetsFilteredBidRequestsService(s *Service) *BiddersFilterSetsFilteredBidRequestsService { |
| 496 |
rs := &BiddersFilterSetsFilteredBidRequestsService{s: s} |
| 497 |
return rs |
| 498 |
} |
| 499 |
|
| 500 |
type BiddersFilterSetsFilteredBidRequestsService struct { |
| 501 |
s *Service |
| 502 |
} |
| 503 |
|
| 504 |
func NewBiddersFilterSetsFilteredBidsService(s *Service) *BiddersFilterSetsFilteredBidsService { |
| 505 |
rs := &BiddersFilterSetsFilteredBidsService{s: s} |
| 506 |
rs.Creatives = NewBiddersFilterSetsFilteredBidsCreativesService(s) |
| 507 |
rs.Details = NewBiddersFilterSetsFilteredBidsDetailsService(s) |
| 508 |
return rs |
| 509 |
} |
| 510 |
|
| 511 |
type BiddersFilterSetsFilteredBidsService struct { |
| 512 |
s *Service |
| 513 |
|
| 514 |
Creatives *BiddersFilterSetsFilteredBidsCreativesService |
| 515 |
|
| 516 |
Details *BiddersFilterSetsFilteredBidsDetailsService |
| 517 |
} |
| 518 |
|
| 519 |
func NewBiddersFilterSetsFilteredBidsCreativesService(s *Service) *BiddersFilterSetsFilteredBidsCreativesService { |
| 520 |
rs := &BiddersFilterSetsFilteredBidsCreativesService{s: s} |
| 521 |
return rs |
| 522 |
} |
| 523 |
|
| 524 |
type BiddersFilterSetsFilteredBidsCreativesService struct { |
| 525 |
s *Service |
| 526 |
} |
| 527 |
|
| 528 |
func NewBiddersFilterSetsFilteredBidsDetailsService(s *Service) *BiddersFilterSetsFilteredBidsDetailsService { |
| 529 |
rs := &BiddersFilterSetsFilteredBidsDetailsService{s: s} |
| 530 |
return rs |
| 531 |
} |
| 532 |
|
| 533 |
type BiddersFilterSetsFilteredBidsDetailsService struct { |
| 534 |
s *Service |
| 535 |
} |
| 536 |
|
| 537 |
func NewBiddersFilterSetsImpressionMetricsService(s *Service) *BiddersFilterSetsImpressionMetricsService { |
| 538 |
rs := &BiddersFilterSetsImpressionMetricsService{s: s} |
| 539 |
return rs |
| 540 |
} |
| 541 |
|
| 542 |
type BiddersFilterSetsImpressionMetricsService struct { |
| 543 |
s *Service |
| 544 |
} |
| 545 |
|
| 546 |
func NewBiddersFilterSetsLosingBidsService(s *Service) *BiddersFilterSetsLosingBidsService { |
| 547 |
rs := &BiddersFilterSetsLosingBidsService{s: s} |
| 548 |
return rs |
| 549 |
} |
| 550 |
|
| 551 |
type BiddersFilterSetsLosingBidsService struct { |
| 552 |
s *Service |
| 553 |
} |
| 554 |
|
| 555 |
func NewBiddersFilterSetsNonBillableWinningBidsService(s *Service) *BiddersFilterSetsNonBillableWinningBidsService { |
| 556 |
rs := &BiddersFilterSetsNonBillableWinningBidsService{s: s} |
| 557 |
return rs |
| 558 |
} |
| 559 |
|
| 560 |
type BiddersFilterSetsNonBillableWinningBidsService struct { |
| 561 |
s *Service |
| 562 |
} |
| 563 |
|
| 564 |
func NewBuyersService(s *Service) *BuyersService { |
| 565 |
rs := &BuyersService{s: s} |
| 566 |
rs.FilterSets = NewBuyersFilterSetsService(s) |
| 567 |
return rs |
| 568 |
} |
| 569 |
|
| 570 |
type BuyersService struct { |
| 571 |
s *Service |
| 572 |
|
| 573 |
FilterSets *BuyersFilterSetsService |
| 574 |
} |
| 575 |
|
| 576 |
func NewBuyersFilterSetsService(s *Service) *BuyersFilterSetsService { |
| 577 |
rs := &BuyersFilterSetsService{s: s} |
| 578 |
rs.BidMetrics = NewBuyersFilterSetsBidMetricsService(s) |
| 579 |
rs.BidResponseErrors = NewBuyersFilterSetsBidResponseErrorsService(s) |
| 580 |
rs.BidResponsesWithoutBids = NewBuyersFilterSetsBidResponsesWithoutBidsService(s) |
| 581 |
rs.FilteredBidRequests = NewBuyersFilterSetsFilteredBidRequestsService(s) |
| 582 |
rs.FilteredBids = NewBuyersFilterSetsFilteredBidsService(s) |
| 583 |
rs.ImpressionMetrics = NewBuyersFilterSetsImpressionMetricsService(s) |
| 584 |
rs.LosingBids = NewBuyersFilterSetsLosingBidsService(s) |
| 585 |
rs.NonBillableWinningBids = NewBuyersFilterSetsNonBillableWinningBidsService(s) |
| 586 |
return rs |
| 587 |
} |
| 588 |
|
| 589 |
type BuyersFilterSetsService struct { |
| 590 |
s *Service |
| 591 |
|
| 592 |
BidMetrics *BuyersFilterSetsBidMetricsService |
| 593 |
|
| 594 |
BidResponseErrors *BuyersFilterSetsBidResponseErrorsService |
| 595 |
|
| 596 |
BidResponsesWithoutBids *BuyersFilterSetsBidResponsesWithoutBidsService |
| 597 |
|
| 598 |
FilteredBidRequests *BuyersFilterSetsFilteredBidRequestsService |
| 599 |
|
| 600 |
FilteredBids *BuyersFilterSetsFilteredBidsService |
| 601 |
|
| 602 |
ImpressionMetrics *BuyersFilterSetsImpressionMetricsService |
| 603 |
|
| 604 |
LosingBids *BuyersFilterSetsLosingBidsService |
| 605 |
|
| 606 |
NonBillableWinningBids *BuyersFilterSetsNonBillableWinningBidsService |
| 607 |
} |
| 608 |
|
| 609 |
func NewBuyersFilterSetsBidMetricsService(s *Service) *BuyersFilterSetsBidMetricsService { |
| 610 |
rs := &BuyersFilterSetsBidMetricsService{s: s} |
| 611 |
return rs |
| 612 |
} |
| 613 |
|
| 614 |
type BuyersFilterSetsBidMetricsService struct { |
| 615 |
s *Service |
| 616 |
} |
| 617 |
|
| 618 |
func NewBuyersFilterSetsBidResponseErrorsService(s *Service) *BuyersFilterSetsBidResponseErrorsService { |
| 619 |
rs := &BuyersFilterSetsBidResponseErrorsService{s: s} |
| 620 |
return rs |
| 621 |
} |
| 622 |
|
| 623 |
type BuyersFilterSetsBidResponseErrorsService struct { |
| 624 |
s *Service |
| 625 |
} |
| 626 |
|
| 627 |
func NewBuyersFilterSetsBidResponsesWithoutBidsService(s *Service) *BuyersFilterSetsBidResponsesWithoutBidsService { |
| 628 |
rs := &BuyersFilterSetsBidResponsesWithoutBidsService{s: s} |
| 629 |
return rs |
| 630 |
} |
| 631 |
|
| 632 |
type BuyersFilterSetsBidResponsesWithoutBidsService struct { |
| 633 |
s *Service |
| 634 |
} |
| 635 |
|
| 636 |
func NewBuyersFilterSetsFilteredBidRequestsService(s *Service) *BuyersFilterSetsFilteredBidRequestsService { |
| 637 |
rs := &BuyersFilterSetsFilteredBidRequestsService{s: s} |
| 638 |
return rs |
| 639 |
} |
| 640 |
|
| 641 |
type BuyersFilterSetsFilteredBidRequestsService struct { |
| 642 |
s *Service |
| 643 |
} |
| 644 |
|
| 645 |
func NewBuyersFilterSetsFilteredBidsService(s *Service) *BuyersFilterSetsFilteredBidsService { |
| 646 |
rs := &BuyersFilterSetsFilteredBidsService{s: s} |
| 647 |
rs.Creatives = NewBuyersFilterSetsFilteredBidsCreativesService(s) |
| 648 |
rs.Details = NewBuyersFilterSetsFilteredBidsDetailsService(s) |
| 649 |
return rs |
| 650 |
} |
| 651 |
|
| 652 |
type BuyersFilterSetsFilteredBidsService struct { |
| 653 |
s *Service |
| 654 |
|
| 655 |
Creatives *BuyersFilterSetsFilteredBidsCreativesService |
| 656 |
|
| 657 |
Details *BuyersFilterSetsFilteredBidsDetailsService |
| 658 |
} |
| 659 |
|
| 660 |
func NewBuyersFilterSetsFilteredBidsCreativesService(s *Service) *BuyersFilterSetsFilteredBidsCreativesService { |
| 661 |
rs := &BuyersFilterSetsFilteredBidsCreativesService{s: s} |
| 662 |
return rs |
| 663 |
} |
| 664 |
|
| 665 |
type BuyersFilterSetsFilteredBidsCreativesService struct { |
| 666 |
s *Service |
| 667 |
} |
| 668 |
|
| 669 |
func NewBuyersFilterSetsFilteredBidsDetailsService(s *Service) *BuyersFilterSetsFilteredBidsDetailsService { |
| 670 |
rs := &BuyersFilterSetsFilteredBidsDetailsService{s: s} |
| 671 |
return rs |
| 672 |
} |
| 673 |
|
| 674 |
type BuyersFilterSetsFilteredBidsDetailsService struct { |
| 675 |
s *Service |
| 676 |
} |
| 677 |
|
| 678 |
func NewBuyersFilterSetsImpressionMetricsService(s *Service) *BuyersFilterSetsImpressionMetricsService { |
| 679 |
rs := &BuyersFilterSetsImpressionMetricsService{s: s} |
| 680 |
return rs |
| 681 |
} |
| 682 |
|
| 683 |
type BuyersFilterSetsImpressionMetricsService struct { |
| 684 |
s *Service |
| 685 |
} |
| 686 |
|
| 687 |
func NewBuyersFilterSetsLosingBidsService(s *Service) *BuyersFilterSetsLosingBidsService { |
| 688 |
rs := &BuyersFilterSetsLosingBidsService{s: s} |
| 689 |
return rs |
| 690 |
} |
| 691 |
|
| 692 |
type BuyersFilterSetsLosingBidsService struct { |
| 693 |
s *Service |
| 694 |
} |
| 695 |
|
| 696 |
func NewBuyersFilterSetsNonBillableWinningBidsService(s *Service) *BuyersFilterSetsNonBillableWinningBidsService { |
| 697 |
rs := &BuyersFilterSetsNonBillableWinningBidsService{s: s} |
| 698 |
return rs |
| 699 |
} |
| 700 |
|
| 701 |
type BuyersFilterSetsNonBillableWinningBidsService struct { |
| 702 |
s *Service |
| 703 |
} |
| 704 |
|
| 705 |
// AbsoluteDateRange: An absolute date range, specified by its start date and |
| 706 |
// end date. The supported range of dates begins 30 days before today and ends |
| 707 |
// today. Validity checked upon filter set creation. If a filter set with an |
| 708 |
// absolute date range is run at a later date more than 30 days after |
| 709 |
// start_date, it will fail. |
| 710 |
type AbsoluteDateRange struct { |
| 711 |
// EndDate: The end date of the range (inclusive). Must be within the 30 days |
| 712 |
// leading up to current date, and must be equal to or after start_date. |
| 713 |
EndDate *Date `json:"endDate,omitempty"` |
| 714 |
// StartDate: The start date of the range (inclusive). Must be within the 30 |
| 715 |
// days leading up to current date, and must be equal to or before end_date. |
| 716 |
StartDate *Date `json:"startDate,omitempty"` |
| 717 |
// ForceSendFields is a list of field names (e.g. "EndDate") to unconditionally |
| 718 |
// include in API requests. By default, fields with empty or default values are |
| 719 |
// omitted from API requests. See |
| 720 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 721 |
// details. |
| 722 |
ForceSendFields []string `json:"-"` |
| 723 |
// NullFields is a list of field names (e.g. "EndDate") to include in API |
| 724 |
// requests with the JSON null value. By default, fields with empty values are |
| 725 |
// omitted from API requests. See |
| 726 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 727 |
NullFields []string `json:"-"` |
| 728 |
} |
| 729 |
|
| 730 |
func (s AbsoluteDateRange) MarshalJSON() ([]byte, error) { |
| 731 |
type NoMethod AbsoluteDateRange |
| 732 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 733 |
} |
| 734 |
|
| 735 |
// AcceptProposalRequest: Request to accept a proposal. |
| 736 |
type AcceptProposalRequest struct { |
| 737 |
// ProposalRevision: The last known client revision number of the proposal. |
| 738 |
ProposalRevision int64 `json:"proposalRevision,omitempty,string"` |
| 739 |
// ForceSendFields is a list of field names (e.g. "ProposalRevision") to |
| 740 |
// unconditionally include in API requests. By default, fields with empty or |
| 741 |
// default values are omitted from API requests. See |
| 742 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 743 |
// details. |
| 744 |
ForceSendFields []string `json:"-"` |
| 745 |
// NullFields is a list of field names (e.g. "ProposalRevision") to include in |
| 746 |
// API requests with the JSON null value. By default, fields with empty values |
| 747 |
// are omitted from API requests. See |
| 748 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 749 |
NullFields []string `json:"-"` |
| 750 |
} |
| 751 |
|
| 752 |
func (s AcceptProposalRequest) MarshalJSON() ([]byte, error) { |
| 753 |
type NoMethod AcceptProposalRequest |
| 754 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 755 |
} |
| 756 |
|
| 757 |
// AdSize: Represents size of a single ad slot, or a creative. |
| 758 |
type AdSize struct { |
| 759 |
// Height: The height of the ad slot in pixels. This field will be present only |
| 760 |
// when size type is `PIXEL`. |
| 761 |
Height int64 `json:"height,omitempty,string"` |
| 762 |
// SizeType: The size type of the ad slot. |
| 763 |
// |
| 764 |
// Possible values: |
| 765 |
// "SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined size type. |
| 766 |
// "PIXEL" - Ad slot with size specified by height and width in pixels. |
| 767 |
// "INTERSTITIAL" - Special size to describe an interstitial ad slot. |
| 768 |
// "NATIVE" - Native (mobile) ads rendered by the publisher. |
| 769 |
// "FLUID" - Fluid size (for example, responsive size) can be resized |
| 770 |
// automatically with the change of outside environment. |
| 771 |
SizeType string `json:"sizeType,omitempty"` |
| 772 |
// Width: The width of the ad slot in pixels. This field will be present only |
| 773 |
// when size type is `PIXEL`. |
| 774 |
Width int64 `json:"width,omitempty,string"` |
| 775 |
// ForceSendFields is a list of field names (e.g. "Height") to unconditionally |
| 776 |
// include in API requests. By default, fields with empty or default values are |
| 777 |
// omitted from API requests. See |
| 778 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 779 |
// details. |
| 780 |
ForceSendFields []string `json:"-"` |
| 781 |
// NullFields is a list of field names (e.g. "Height") to include in API |
| 782 |
// requests with the JSON null value. By default, fields with empty values are |
| 783 |
// omitted from API requests. See |
| 784 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 785 |
NullFields []string `json:"-"` |
| 786 |
} |
| 787 |
|
| 788 |
func (s AdSize) MarshalJSON() ([]byte, error) { |
| 789 |
type NoMethod AdSize |
| 790 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 791 |
} |
| 792 |
|
| 793 |
// AdTechnologyProviders: Detected ad technology provider information. |
| 794 |
type AdTechnologyProviders struct { |
| 795 |
// DetectedProviderIds: The detected ad technology provider IDs for this |
| 796 |
// creative. See |
| 797 |
// https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for |
| 798 |
// mapping of provider ID to provided name, a privacy policy URL, and a list of |
| 799 |
// domains which can be attributed to the provider. If the creative contains |
| 800 |
// provider IDs that are outside of those listed in the |
| 801 |
// `BidRequest.adslot.consented_providers_settings.consented_providers` field |
| 802 |
// on the (Google bid |
| 803 |
// protocol)[https://developers.google.com/authorized-buyers/rtb/downloads/realt |
| 804 |
// ime-bidding-proto] and the |
| 805 |
// `BidRequest.user.ext.consented_providers_settings.consented_providers` field |
| 806 |
// on the (OpenRTB |
| 807 |
// protocol)[https://developers.google.com/authorized-buyers/rtb/downloads/openr |
| 808 |
// tb-adx-proto], and a bid is submitted with that creative for an impression |
| 809 |
// that will serve to an EEA user, the bid will be filtered before the auction. |
| 810 |
DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"` |
| 811 |
// HasUnidentifiedProvider: Whether the creative contains an unidentified ad |
| 812 |
// technology provider. If true for a given creative, any bid submitted with |
| 813 |
// that creative for an impression that will serve to an EEA user will be |
| 814 |
// filtered before the auction. |
| 815 |
HasUnidentifiedProvider bool `json:"hasUnidentifiedProvider,omitempty"` |
| 816 |
// ForceSendFields is a list of field names (e.g. "DetectedProviderIds") to |
| 817 |
// unconditionally include in API requests. By default, fields with empty or |
| 818 |
// default values are omitted from API requests. See |
| 819 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 820 |
// details. |
| 821 |
ForceSendFields []string `json:"-"` |
| 822 |
// NullFields is a list of field names (e.g. "DetectedProviderIds") to include |
| 823 |
// in API requests with the JSON null value. By default, fields with empty |
| 824 |
// values are omitted from API requests. See |
| 825 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 826 |
NullFields []string `json:"-"` |
| 827 |
} |
| 828 |
|
| 829 |
func (s AdTechnologyProviders) MarshalJSON() ([]byte, error) { |
| 830 |
type NoMethod AdTechnologyProviders |
| 831 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 832 |
} |
| 833 |
|
| 834 |
// AddDealAssociationRequest: A request for associating a deal and a creative. |
| 835 |
type AddDealAssociationRequest struct { |
| 836 |
// Association: The association between a creative and a deal that should be |
| 837 |
// added. |
| 838 |
Association *CreativeDealAssociation `json:"association,omitempty"` |
| 839 |
// ForceSendFields is a list of field names (e.g. "Association") to |
| 840 |
// unconditionally include in API requests. By default, fields with empty or |
| 841 |
// default values are omitted from API requests. See |
| 842 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 843 |
// details. |
| 844 |
ForceSendFields []string `json:"-"` |
| 845 |
// NullFields is a list of field names (e.g. "Association") to include in API |
| 846 |
// requests with the JSON null value. By default, fields with empty values are |
| 847 |
// omitted from API requests. See |
| 848 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 849 |
NullFields []string `json:"-"` |
| 850 |
} |
| 851 |
|
| 852 |
func (s AddDealAssociationRequest) MarshalJSON() ([]byte, error) { |
| 853 |
type NoMethod AddDealAssociationRequest |
| 854 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 855 |
} |
| 856 |
|
| 857 |
// AddNoteRequest: Request message for adding a note to a given proposal. |
| 858 |
type AddNoteRequest struct { |
| 859 |
// Note: Details of the note to add. |
| 860 |
Note *Note `json:"note,omitempty"` |
| 861 |
// ForceSendFields is a list of field names (e.g. "Note") to unconditionally |
| 862 |
// include in API requests. By default, fields with empty or default values are |
| 863 |
// omitted from API requests. See |
| 864 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 865 |
// details. |
| 866 |
ForceSendFields []string `json:"-"` |
| 867 |
// NullFields is a list of field names (e.g. "Note") to include in API requests |
| 868 |
// with the JSON null value. By default, fields with empty values are omitted |
| 869 |
// from API requests. See |
| 870 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 871 |
NullFields []string `json:"-"` |
| 872 |
} |
| 873 |
|
| 874 |
func (s AddNoteRequest) MarshalJSON() ([]byte, error) { |
| 875 |
type NoMethod AddNoteRequest |
| 876 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 877 |
} |
| 878 |
|
| 879 |
// AppContext: Output only. The app type the restriction applies to for mobile |
| 880 |
// device. |
| 881 |
type AppContext struct { |
| 882 |
// AppTypes: The app types this restriction applies to. |
| 883 |
// |
| 884 |
// Possible values: |
| 885 |
// "NATIVE" - Native app context. |
| 886 |
// "WEB" - Mobile web app context. |
| 887 |
AppTypes []string `json:"appTypes,omitempty"` |
| 888 |
// ForceSendFields is a list of field names (e.g. "AppTypes") to |
| 889 |
// unconditionally include in API requests. By default, fields with empty or |
| 890 |
// default values are omitted from API requests. See |
| 891 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 892 |
// details. |
| 893 |
ForceSendFields []string `json:"-"` |
| 894 |
// NullFields is a list of field names (e.g. "AppTypes") to include in API |
| 895 |
// requests with the JSON null value. By default, fields with empty values are |
| 896 |
// omitted from API requests. See |
| 897 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 898 |
NullFields []string `json:"-"` |
| 899 |
} |
| 900 |
|
| 901 |
func (s AppContext) MarshalJSON() ([]byte, error) { |
| 902 |
type NoMethod AppContext |
| 903 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 904 |
} |
| 905 |
|
| 906 |
// AuctionContext: Output only. The auction type the restriction applies to. |
| 907 |
type AuctionContext struct { |
| 908 |
// AuctionTypes: The auction types this restriction applies to. |
| 909 |
// |
| 910 |
// Possible values: |
| 911 |
// "OPEN_AUCTION" - The restriction applies to open auction. |
| 912 |
// "DIRECT_DEALS" - The restriction applies to direct deals. |
| 913 |
AuctionTypes []string `json:"auctionTypes,omitempty"` |
| 914 |
// ForceSendFields is a list of field names (e.g. "AuctionTypes") to |
| 915 |
// unconditionally include in API requests. By default, fields with empty or |
| 916 |
// default values are omitted from API requests. See |
| 917 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 918 |
// details. |
| 919 |
ForceSendFields []string `json:"-"` |
| 920 |
// NullFields is a list of field names (e.g. "AuctionTypes") to include in API |
| 921 |
// requests with the JSON null value. By default, fields with empty values are |
| 922 |
// omitted from API requests. See |
| 923 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 924 |
NullFields []string `json:"-"` |
| 925 |
} |
| 926 |
|
| 927 |
func (s AuctionContext) MarshalJSON() ([]byte, error) { |
| 928 |
type NoMethod AuctionContext |
| 929 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 930 |
} |
| 931 |
|
| 932 |
// BidMetricsRow: The set of metrics that are measured in numbers of bids, |
| 933 |
// representing how many bids with the specified dimension values were |
| 934 |
// considered eligible at each stage of the bidding funnel; |
| 935 |
type BidMetricsRow struct { |
| 936 |
// Bids: The number of bids that Ad Exchange received from the buyer. |
| 937 |
Bids *MetricValue `json:"bids,omitempty"` |
| 938 |
// BidsInAuction: The number of bids that were permitted to compete in the |
| 939 |
// auction. |
| 940 |
BidsInAuction *MetricValue `json:"bidsInAuction,omitempty"` |
| 941 |
// BilledImpressions: The number of bids for which the buyer was billed. Also |
| 942 |
// called valid impressions as invalid impressions are not billed. |
| 943 |
BilledImpressions *MetricValue `json:"billedImpressions,omitempty"` |
| 944 |
// ImpressionsWon: The number of bids that won the auction. |
| 945 |
ImpressionsWon *MetricValue `json:"impressionsWon,omitempty"` |
| 946 |
// MeasurableImpressions: The number of bids for which the corresponding |
| 947 |
// impression was measurable for viewability (as defined by Active View). |
| 948 |
MeasurableImpressions *MetricValue `json:"measurableImpressions,omitempty"` |
| 949 |
// ReachedQueries: The number of bids that won the auction and also won the |
| 950 |
// mediation waterfall (if any). |
| 951 |
ReachedQueries *MetricValue `json:"reachedQueries,omitempty"` |
| 952 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 953 |
// this row. |
| 954 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 955 |
// ViewableImpressions: The number of bids for which the corresponding |
| 956 |
// impression was viewable (as defined by Active View). |
| 957 |
ViewableImpressions *MetricValue `json:"viewableImpressions,omitempty"` |
| 958 |
// ForceSendFields is a list of field names (e.g. "Bids") to unconditionally |
| 959 |
// include in API requests. By default, fields with empty or default values are |
| 960 |
// omitted from API requests. See |
| 961 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 962 |
// details. |
| 963 |
ForceSendFields []string `json:"-"` |
| 964 |
// NullFields is a list of field names (e.g. "Bids") to include in API requests |
| 965 |
// with the JSON null value. By default, fields with empty values are omitted |
| 966 |
// from API requests. See |
| 967 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 968 |
NullFields []string `json:"-"` |
| 969 |
} |
| 970 |
|
| 971 |
func (s BidMetricsRow) MarshalJSON() ([]byte, error) { |
| 972 |
type NoMethod BidMetricsRow |
| 973 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 974 |
} |
| 975 |
|
| 976 |
// BidResponseWithoutBidsStatusRow: The number of impressions with the |
| 977 |
// specified dimension values that were considered to have no applicable bids, |
| 978 |
// as described by the specified status. |
| 979 |
type BidResponseWithoutBidsStatusRow struct { |
| 980 |
// ImpressionCount: The number of impressions for which there was a bid |
| 981 |
// response with the specified status. |
| 982 |
ImpressionCount *MetricValue `json:"impressionCount,omitempty"` |
| 983 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 984 |
// this row. |
| 985 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 986 |
// Status: The status specifying why the bid responses were considered to have |
| 987 |
// no applicable bids. |
| 988 |
// |
| 989 |
// Possible values: |
| 990 |
// "STATUS_UNSPECIFIED" - A placeholder for an undefined status. This value |
| 991 |
// will never be returned in responses. |
| 992 |
// "RESPONSES_WITHOUT_BIDS" - The response had no bids. |
| 993 |
// "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT" - The response had no bids for the |
| 994 |
// specified account, though it may have included bids on behalf of other |
| 995 |
// accounts. Applies if: 1. Request is on behalf of a bidder and an account |
| 996 |
// filter is present. 2. Request is on behalf of a child seat. |
| 997 |
// "RESPONSES_WITHOUT_BIDS_FOR_DEAL" - The response had no bids for the |
| 998 |
// specified deal, though it may have included bids on other deals on behalf of |
| 999 |
// the account to which the deal belongs. If request is on behalf of a bidder |
| 1000 |
// and an account filter is not present, this also includes responses that have |
| 1001 |
// bids on behalf of accounts other than the account to which the deal belongs. |
| 1002 |
Status string `json:"status,omitempty"` |
| 1003 |
// ForceSendFields is a list of field names (e.g. "ImpressionCount") to |
| 1004 |
// unconditionally include in API requests. By default, fields with empty or |
| 1005 |
// default values are omitted from API requests. See |
| 1006 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1007 |
// details. |
| 1008 |
ForceSendFields []string `json:"-"` |
| 1009 |
// NullFields is a list of field names (e.g. "ImpressionCount") to include in |
| 1010 |
// API requests with the JSON null value. By default, fields with empty values |
| 1011 |
// are omitted from API requests. See |
| 1012 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1013 |
NullFields []string `json:"-"` |
| 1014 |
} |
| 1015 |
|
| 1016 |
func (s BidResponseWithoutBidsStatusRow) MarshalJSON() ([]byte, error) { |
| 1017 |
type NoMethod BidResponseWithoutBidsStatusRow |
| 1018 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1019 |
} |
| 1020 |
|
| 1021 |
// Buyer: Represents a buyer of inventory. Each buyer is identified by a unique |
| 1022 |
// Authorized Buyers account ID. |
| 1023 |
type Buyer struct { |
| 1024 |
// AccountId: Authorized Buyers account ID of the buyer. |
| 1025 |
AccountId string `json:"accountId,omitempty"` |
| 1026 |
// ForceSendFields is a list of field names (e.g. "AccountId") to |
| 1027 |
// unconditionally include in API requests. By default, fields with empty or |
| 1028 |
// default values are omitted from API requests. See |
| 1029 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1030 |
// details. |
| 1031 |
ForceSendFields []string `json:"-"` |
| 1032 |
// NullFields is a list of field names (e.g. "AccountId") to include in API |
| 1033 |
// requests with the JSON null value. By default, fields with empty values are |
| 1034 |
// omitted from API requests. See |
| 1035 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1036 |
NullFields []string `json:"-"` |
| 1037 |
} |
| 1038 |
|
| 1039 |
func (s Buyer) MarshalJSON() ([]byte, error) { |
| 1040 |
type NoMethod Buyer |
| 1041 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1042 |
} |
| 1043 |
|
| 1044 |
// CalloutStatusRow: The number of impressions with the specified dimension |
| 1045 |
// values where the corresponding bid request or bid response was not |
| 1046 |
// successful, as described by the specified callout status. |
| 1047 |
type CalloutStatusRow struct { |
| 1048 |
// CalloutStatusId: The ID of the callout status. See callout-status-codes |
| 1049 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes). |
| 1050 |
CalloutStatusId int64 `json:"calloutStatusId,omitempty"` |
| 1051 |
// ImpressionCount: The number of impressions for which there was a bid request |
| 1052 |
// or bid response with the specified callout status. |
| 1053 |
ImpressionCount *MetricValue `json:"impressionCount,omitempty"` |
| 1054 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 1055 |
// this row. |
| 1056 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 1057 |
// ForceSendFields is a list of field names (e.g. "CalloutStatusId") to |
| 1058 |
// unconditionally include in API requests. By default, fields with empty or |
| 1059 |
// default values are omitted from API requests. See |
| 1060 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1061 |
// details. |
| 1062 |
ForceSendFields []string `json:"-"` |
| 1063 |
// NullFields is a list of field names (e.g. "CalloutStatusId") to include in |
| 1064 |
// API requests with the JSON null value. By default, fields with empty values |
| 1065 |
// are omitted from API requests. See |
| 1066 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1067 |
NullFields []string `json:"-"` |
| 1068 |
} |
| 1069 |
|
| 1070 |
func (s CalloutStatusRow) MarshalJSON() ([]byte, error) { |
| 1071 |
type NoMethod CalloutStatusRow |
| 1072 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1073 |
} |
| 1074 |
|
| 1075 |
// CancelNegotiationRequest: Request to cancel an ongoing negotiation. |
| 1076 |
type CancelNegotiationRequest struct { |
| 1077 |
} |
| 1078 |
|
| 1079 |
// Client: A client resource represents a client buyer—an agency, a brand, or |
| 1080 |
// an advertiser customer of the sponsor buyer. Users associated with the |
| 1081 |
// client buyer have restricted access to the Marketplace and certain other |
| 1082 |
// sections of the Authorized Buyers UI based on the role granted to the client |
| 1083 |
// buyer. All fields are required unless otherwise specified. |
| 1084 |
type Client struct { |
| 1085 |
// ClientAccountId: The globally-unique numerical ID of the client. The value |
| 1086 |
// of this field is ignored in create and update operations. |
| 1087 |
ClientAccountId int64 `json:"clientAccountId,omitempty,string"` |
| 1088 |
// ClientName: Name used to represent this client to publishers. You may have |
| 1089 |
// multiple clients that map to the same entity, but for each client the |
| 1090 |
// combination of `clientName` and entity must be unique. You can specify this |
| 1091 |
// field as empty. Maximum length of 255 characters is allowed. |
| 1092 |
ClientName string `json:"clientName,omitempty"` |
| 1093 |
// EntityId: Numerical identifier of the client entity. The entity can be an |
| 1094 |
// advertiser, a brand, or an agency. This identifier is unique among all the |
| 1095 |
// entities with the same type. The value of this field is ignored if the |
| 1096 |
// entity type is not provided. A list of all known advertisers with their |
| 1097 |
// identifiers is available in the advertisers.txt |
| 1098 |
// (https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt) file. |
| 1099 |
// A list of all known brands with their identifiers is available in the |
| 1100 |
// brands.txt (https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt) |
| 1101 |
// file. A list of all known agencies with their identifiers is available in |
| 1102 |
// the agencies.txt |
| 1103 |
// (https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt) file. |
| 1104 |
EntityId int64 `json:"entityId,omitempty,string"` |
| 1105 |
// EntityName: The name of the entity. This field is automatically fetched |
| 1106 |
// based on the type and ID. The value of this field is ignored in create and |
| 1107 |
// update operations. |
| 1108 |
EntityName string `json:"entityName,omitempty"` |
| 1109 |
// EntityType: An optional field for specifying the type of the client entity: |
| 1110 |
// `ADVERTISER`, `BRAND`, or `AGENCY`. |
| 1111 |
// |
| 1112 |
// Possible values: |
| 1113 |
// "ENTITY_TYPE_UNSPECIFIED" - A placeholder for an undefined client entity |
| 1114 |
// type. Should not be used. |
| 1115 |
// "ADVERTISER" - An advertiser. |
| 1116 |
// "BRAND" - A brand. |
| 1117 |
// "AGENCY" - An advertising agency. |
| 1118 |
// "ENTITY_TYPE_UNCLASSIFIED" - An explicit value for a client that was not |
| 1119 |
// yet classified as any particular entity. |
| 1120 |
EntityType string `json:"entityType,omitempty"` |
| 1121 |
// PartnerClientId: Optional arbitrary unique identifier of this client buyer |
| 1122 |
// from the standpoint of its Ad Exchange sponsor buyer. This field can be used |
| 1123 |
// to associate a client buyer with the identifier in the namespace of its |
| 1124 |
// sponsor buyer, lookup client buyers by that identifier and verify whether an |
| 1125 |
// Ad Exchange counterpart of a given client buyer already exists. If present, |
| 1126 |
// must be unique among all the client buyers for its Ad Exchange sponsor |
| 1127 |
// buyer. |
| 1128 |
PartnerClientId string `json:"partnerClientId,omitempty"` |
| 1129 |
// Role: The role which is assigned to the client buyer. Each role implies a |
| 1130 |
// set of permissions granted to the client. Must be one of |
| 1131 |
// `CLIENT_DEAL_VIEWER`, `CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`. |
| 1132 |
// |
| 1133 |
// Possible values: |
| 1134 |
// "CLIENT_ROLE_UNSPECIFIED" - A placeholder for an undefined client role. |
| 1135 |
// "CLIENT_DEAL_VIEWER" - Users associated with this client can see publisher |
| 1136 |
// deal offers in the Marketplace. They can neither negotiate proposals nor |
| 1137 |
// approve deals. If this client is visible to publishers, they can send deal |
| 1138 |
// proposals to this client. |
| 1139 |
// "CLIENT_DEAL_NEGOTIATOR" - Users associated with this client can respond |
| 1140 |
// to deal proposals sent to them by publishers. They can also initiate deal |
| 1141 |
// proposals of their own. |
| 1142 |
// "CLIENT_DEAL_APPROVER" - Users associated with this client can approve |
| 1143 |
// eligible deals on your behalf. Some deals may still explicitly require |
| 1144 |
// publisher finalization. If this role is not selected, the sponsor buyer will |
| 1145 |
// need to manually approve each of their deals. |
| 1146 |
Role string `json:"role,omitempty"` |
| 1147 |
// Status: The status of the client buyer. |
| 1148 |
// |
| 1149 |
// Possible values: |
| 1150 |
// "CLIENT_STATUS_UNSPECIFIED" - A placeholder for an undefined client |
| 1151 |
// status. |
| 1152 |
// "DISABLED" - A client that is currently disabled. |
| 1153 |
// "ACTIVE" - A client that is currently active. |
| 1154 |
Status string `json:"status,omitempty"` |
| 1155 |
// VisibleToSeller: Whether the client buyer will be visible to sellers. |
| 1156 |
VisibleToSeller bool `json:"visibleToSeller,omitempty"` |
| 1157 |
|
| 1158 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 1159 |
googleapi.ServerResponse `json:"-"` |
| 1160 |
// ForceSendFields is a list of field names (e.g. "ClientAccountId") to |
| 1161 |
// unconditionally include in API requests. By default, fields with empty or |
| 1162 |
// default values are omitted from API requests. See |
| 1163 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1164 |
// details. |
| 1165 |
ForceSendFields []string `json:"-"` |
| 1166 |
// NullFields is a list of field names (e.g. "ClientAccountId") to include in |
| 1167 |
// API requests with the JSON null value. By default, fields with empty values |
| 1168 |
// are omitted from API requests. See |
| 1169 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1170 |
NullFields []string `json:"-"` |
| 1171 |
} |
| 1172 |
|
| 1173 |
func (s Client) MarshalJSON() ([]byte, error) { |
| 1174 |
type NoMethod Client |
| 1175 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1176 |
} |
| 1177 |
|
| 1178 |
// ClientUser: A client user is created under a client buyer and has restricted |
| 1179 |
// access to the Marketplace and certain other sections of the Authorized |
| 1180 |
// Buyers UI based on the role granted to the associated client buyer. The only |
| 1181 |
// way a new client user can be created is through accepting an email |
| 1182 |
// invitation (see the accounts.clients.invitations.create method). All fields |
| 1183 |
// are required unless otherwise specified. |
| 1184 |
type ClientUser struct { |
| 1185 |
// ClientAccountId: Numerical account ID of the client buyer with which the |
| 1186 |
// user is associated; the buyer must be a client of the current sponsor buyer. |
| 1187 |
// The value of this field is ignored in an update operation. |
| 1188 |
ClientAccountId int64 `json:"clientAccountId,omitempty,string"` |
| 1189 |
// Email: User's email address. The value of this field is ignored in an update |
| 1190 |
// operation. |
| 1191 |
Email string `json:"email,omitempty"` |
| 1192 |
// Status: The status of the client user. |
| 1193 |
// |
| 1194 |
// Possible values: |
| 1195 |
// "USER_STATUS_UNSPECIFIED" - A placeholder for an undefined user status. |
| 1196 |
// "PENDING" - A user who was already created but hasn't accepted the |
| 1197 |
// invitation yet. |
| 1198 |
// "ACTIVE" - A user that is currently active. |
| 1199 |
// "DISABLED" - A user that is currently disabled. |
| 1200 |
Status string `json:"status,omitempty"` |
| 1201 |
// UserId: The unique numerical ID of the client user that has accepted an |
| 1202 |
// invitation. The value of this field is ignored in an update operation. |
| 1203 |
UserId int64 `json:"userId,omitempty,string"` |
| 1204 |
|
| 1205 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 1206 |
googleapi.ServerResponse `json:"-"` |
| 1207 |
// ForceSendFields is a list of field names (e.g. "ClientAccountId") to |
| 1208 |
// unconditionally include in API requests. By default, fields with empty or |
| 1209 |
// default values are omitted from API requests. See |
| 1210 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1211 |
// details. |
| 1212 |
ForceSendFields []string `json:"-"` |
| 1213 |
// NullFields is a list of field names (e.g. "ClientAccountId") to include in |
| 1214 |
// API requests with the JSON null value. By default, fields with empty values |
| 1215 |
// are omitted from API requests. See |
| 1216 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1217 |
NullFields []string `json:"-"` |
| 1218 |
} |
| 1219 |
|
| 1220 |
func (s ClientUser) MarshalJSON() ([]byte, error) { |
| 1221 |
type NoMethod ClientUser |
| 1222 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1223 |
} |
| 1224 |
|
| 1225 |
// ClientUserInvitation: An invitation for a new client user to get access to |
| 1226 |
// the Authorized Buyers UI. All fields are required unless otherwise |
| 1227 |
// specified. |
| 1228 |
type ClientUserInvitation struct { |
| 1229 |
// ClientAccountId: Numerical account ID of the client buyer that the invited |
| 1230 |
// user is associated with. The value of this field is ignored in create |
| 1231 |
// operations. |
| 1232 |
ClientAccountId int64 `json:"clientAccountId,omitempty,string"` |
| 1233 |
// Email: The email address to which the invitation is sent. Email addresses |
| 1234 |
// should be unique among all client users under each sponsor buyer. |
| 1235 |
Email string `json:"email,omitempty"` |
| 1236 |
// InvitationId: The unique numerical ID of the invitation that is sent to the |
| 1237 |
// user. The value of this field is ignored in create operations. |
| 1238 |
InvitationId int64 `json:"invitationId,omitempty,string"` |
| 1239 |
|
| 1240 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 1241 |
googleapi.ServerResponse `json:"-"` |
| 1242 |
// ForceSendFields is a list of field names (e.g. "ClientAccountId") to |
| 1243 |
// unconditionally include in API requests. By default, fields with empty or |
| 1244 |
// default values are omitted from API requests. See |
| 1245 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1246 |
// details. |
| 1247 |
ForceSendFields []string `json:"-"` |
| 1248 |
// NullFields is a list of field names (e.g. "ClientAccountId") to include in |
| 1249 |
// API requests with the JSON null value. By default, fields with empty values |
| 1250 |
// are omitted from API requests. See |
| 1251 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1252 |
NullFields []string `json:"-"` |
| 1253 |
} |
| 1254 |
|
| 1255 |
func (s ClientUserInvitation) MarshalJSON() ([]byte, error) { |
| 1256 |
type NoMethod ClientUserInvitation |
| 1257 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1258 |
} |
| 1259 |
|
| 1260 |
// CompleteSetupRequest: Request message for indicating that the proposal's |
| 1261 |
// setup step is complete. |
| 1262 |
type CompleteSetupRequest struct { |
| 1263 |
} |
| 1264 |
|
| 1265 |
// ContactInformation: Contains information on how a buyer or seller can be |
| 1266 |
// reached. |
| 1267 |
type ContactInformation struct { |
| 1268 |
// Email: Email address for the contact. |
| 1269 |
Email string `json:"email,omitempty"` |
| 1270 |
// Name: The name of the contact. |
| 1271 |
Name string `json:"name,omitempty"` |
| 1272 |
// ForceSendFields is a list of field names (e.g. "Email") to unconditionally |
| 1273 |
// include in API requests. By default, fields with empty or default values are |
| 1274 |
// omitted from API requests. See |
| 1275 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1276 |
// details. |
| 1277 |
ForceSendFields []string `json:"-"` |
| 1278 |
// NullFields is a list of field names (e.g. "Email") to include in API |
| 1279 |
// requests with the JSON null value. By default, fields with empty values are |
| 1280 |
// omitted from API requests. See |
| 1281 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1282 |
NullFields []string `json:"-"` |
| 1283 |
} |
| 1284 |
|
| 1285 |
func (s ContactInformation) MarshalJSON() ([]byte, error) { |
| 1286 |
type NoMethod ContactInformation |
| 1287 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1288 |
} |
| 1289 |
|
| 1290 |
// Correction: Output only. Shows any corrections that were applied to this |
| 1291 |
// creative. |
| 1292 |
type Correction struct { |
| 1293 |
// Contexts: The contexts for the correction. |
| 1294 |
Contexts []*ServingContext `json:"contexts,omitempty"` |
| 1295 |
// Details: Additional details about what was corrected. |
| 1296 |
Details []string `json:"details,omitempty"` |
| 1297 |
// Type: The type of correction that was applied to the creative. |
| 1298 |
// |
| 1299 |
// Possible values: |
| 1300 |
// "CORRECTION_TYPE_UNSPECIFIED" - The correction type is unknown. Refer to |
| 1301 |
// the details for more information. |
| 1302 |
// "VENDOR_IDS_ADDED" - The ad's declared vendors did not match the vendors |
| 1303 |
// that were detected. The detected vendors were added. |
| 1304 |
// "SSL_ATTRIBUTE_REMOVED" - The ad had the SSL attribute declared but was |
| 1305 |
// not SSL-compliant. The SSL attribute was removed. |
| 1306 |
// "FLASH_FREE_ATTRIBUTE_REMOVED" - The ad was declared as Flash-free but |
| 1307 |
// contained Flash, so the Flash-free attribute was removed. |
| 1308 |
// "FLASH_FREE_ATTRIBUTE_ADDED" - The ad was not declared as Flash-free but |
| 1309 |
// it did not reference any flash content, so the Flash-free attribute was |
| 1310 |
// added. |
| 1311 |
// "REQUIRED_ATTRIBUTE_ADDED" - The ad did not declare a required creative |
| 1312 |
// attribute. The attribute was added. |
| 1313 |
// "REQUIRED_VENDOR_ADDED" - The ad did not declare a required technology |
| 1314 |
// vendor. The technology vendor was added. |
| 1315 |
// "SSL_ATTRIBUTE_ADDED" - The ad did not declare the SSL attribute but was |
| 1316 |
// SSL-compliant, so the SSL attribute was added. |
| 1317 |
// "IN_BANNER_VIDEO_ATTRIBUTE_ADDED" - Properties consistent with In-banner |
| 1318 |
// video were found, so an In-Banner Video attribute was added. |
| 1319 |
// "MRAID_ATTRIBUTE_ADDED" - The ad makes calls to the MRAID API so the MRAID |
| 1320 |
// attribute was added. |
| 1321 |
// "FLASH_ATTRIBUTE_REMOVED" - The ad unnecessarily declared the Flash |
| 1322 |
// attribute, so the Flash attribute was removed. |
| 1323 |
// "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" - The ad contains video content. |
| 1324 |
Type string `json:"type,omitempty"` |
| 1325 |
// ForceSendFields is a list of field names (e.g. "Contexts") to |
| 1326 |
// unconditionally include in API requests. By default, fields with empty or |
| 1327 |
// default values are omitted from API requests. See |
| 1328 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1329 |
// details. |
| 1330 |
ForceSendFields []string `json:"-"` |
| 1331 |
// NullFields is a list of field names (e.g. "Contexts") to include in API |
| 1332 |
// requests with the JSON null value. By default, fields with empty values are |
| 1333 |
// omitted from API requests. See |
| 1334 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1335 |
NullFields []string `json:"-"` |
| 1336 |
} |
| 1337 |
|
| 1338 |
func (s Correction) MarshalJSON() ([]byte, error) { |
| 1339 |
type NoMethod Correction |
| 1340 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1341 |
} |
| 1342 |
|
| 1343 |
// Creative: A creative and its classification data. |
| 1344 |
type Creative struct { |
| 1345 |
// AccountId: The account that this creative belongs to. Can be used to filter |
| 1346 |
// the response of the creatives.list method. |
| 1347 |
AccountId string `json:"accountId,omitempty"` |
| 1348 |
// AdChoicesDestinationUrl: The link to AdChoices destination page. |
| 1349 |
AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"` |
| 1350 |
// AdTechnologyProviders: Output only. The detected ad technology providers. |
| 1351 |
AdTechnologyProviders *AdTechnologyProviders `json:"adTechnologyProviders,omitempty"` |
| 1352 |
// AdvertiserName: The name of the company being advertised in the creative. |
| 1353 |
AdvertiserName string `json:"advertiserName,omitempty"` |
| 1354 |
// AgencyId: The agency ID for this creative. |
| 1355 |
AgencyId int64 `json:"agencyId,omitempty,string"` |
| 1356 |
// ApiUpdateTime: Output only. The last update timestamp of the creative |
| 1357 |
// through the API. |
| 1358 |
ApiUpdateTime string `json:"apiUpdateTime,omitempty"` |
| 1359 |
// Attributes: All attributes for the ads that may be shown from this creative. |
| 1360 |
// Can be used to filter the response of the creatives.list method. |
| 1361 |
// |
| 1362 |
// Possible values: |
| 1363 |
// "ATTRIBUTE_UNSPECIFIED" - Do not use. This is a placeholder value only. |
| 1364 |
// "IMAGE_RICH_MEDIA" - The creative is of type image/rich media. For |
| 1365 |
// pretargeting. |
| 1366 |
// "ADOBE_FLASH_FLV" - The creative is of video type Adobe Flash FLV. For |
| 1367 |
// pretargeting. |
| 1368 |
// "IS_TAGGED" - The creative is tagged. |
| 1369 |
// "IS_COOKIE_TARGETED" - The creative is cookie targeted. |
| 1370 |
// "IS_USER_INTEREST_TARGETED" - The creative is user interest targeted. |
| 1371 |
// "EXPANDING_DIRECTION_NONE" - The creative does not expand. |
| 1372 |
// "EXPANDING_DIRECTION_UP" - The creative expands up. |
| 1373 |
// "EXPANDING_DIRECTION_DOWN" - The creative expands down. |
| 1374 |
// "EXPANDING_DIRECTION_LEFT" - The creative expands left. |
| 1375 |
// "EXPANDING_DIRECTION_RIGHT" - The creative expands right. |
| 1376 |
// "EXPANDING_DIRECTION_UP_LEFT" - The creative expands up and left. |
| 1377 |
// "EXPANDING_DIRECTION_UP_RIGHT" - The creative expands up and right. |
| 1378 |
// "EXPANDING_DIRECTION_DOWN_LEFT" - The creative expands down and left. |
| 1379 |
// "EXPANDING_DIRECTION_DOWN_RIGHT" - The creative expands down and right. |
| 1380 |
// "CREATIVE_TYPE_HTML" - The creative type is HTML. |
| 1381 |
// "CREATIVE_TYPE_VAST_VIDEO" - The creative type is VAST video. |
| 1382 |
// "EXPANDING_DIRECTION_UP_OR_DOWN" - The creative expands up or down. |
| 1383 |
// "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - The creative expands left or right. |
| 1384 |
// "EXPANDING_DIRECTION_ANY_DIAGONAL" - The creative expands on any diagonal. |
| 1385 |
// "EXPANDING_ACTION_ROLLOVER_TO_EXPAND" - The creative expands when rolled |
| 1386 |
// over. |
| 1387 |
// "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH" - The instream vast video type is |
| 1388 |
// vpaid flash. |
| 1389 |
// "RICH_MEDIA_CAPABILITY_TYPE_MRAID" - The creative is MRAID. |
| 1390 |
// "RICH_MEDIA_CAPABILITY_TYPE_FLASH" - The creative is Flash. |
| 1391 |
// "RICH_MEDIA_CAPABILITY_TYPE_HTML5" - The creative is HTML5. |
| 1392 |
// "SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST video type |
| 1393 |
// of skippable instream video. For pretargeting. |
| 1394 |
// "RICH_MEDIA_CAPABILITY_TYPE_SSL" - The creative is SSL. |
| 1395 |
// "RICH_MEDIA_CAPABILITY_TYPE_NON_SSL" - The creative is non-SSL. |
| 1396 |
// "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL" - The creative is an |
| 1397 |
// interstitial. |
| 1398 |
// "NON_SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST video |
| 1399 |
// type of non-skippable instream video. For pretargeting. |
| 1400 |
// "NATIVE_ELIGIBILITY_ELIGIBLE" - The creative is eligible for native. |
| 1401 |
// "NON_VPAID" - The creative has an instream VAST video type of non-VPAID. |
| 1402 |
// For pretargeting. |
| 1403 |
// "NATIVE_ELIGIBILITY_NOT_ELIGIBLE" - The creative is not eligible for |
| 1404 |
// native. |
| 1405 |
// "ANY_INTERSTITIAL" - The creative has an interstitial size of any |
| 1406 |
// interstitial. For pretargeting. |
| 1407 |
// "NON_INTERSTITIAL" - The creative has an interstitial size of non |
| 1408 |
// interstitial. For pretargeting. |
| 1409 |
// "IN_BANNER_VIDEO" - The video type is in-banner video. |
| 1410 |
// "RENDERING_SIZELESS_ADX" - The creative can dynamically resize to fill a |
| 1411 |
// variety of slot sizes. |
| 1412 |
// "OMSDK_1_0" - The open measurement SDK is supported. |
| 1413 |
// "RENDERING_PLAYABLE" - The creative is considered a playable display |
| 1414 |
// creative. |
| 1415 |
Attributes []string `json:"attributes,omitempty"` |
| 1416 |
// ClickThroughUrls: The set of destination URLs for the creative. |
| 1417 |
ClickThroughUrls []string `json:"clickThroughUrls,omitempty"` |
| 1418 |
// Corrections: Output only. Shows any corrections that were applied to this |
| 1419 |
// creative. |
| 1420 |
Corrections []*Correction `json:"corrections,omitempty"` |
| 1421 |
// CreativeId: The buyer-defined creative ID of this creative. Can be used to |
| 1422 |
// filter the response of the creatives.list method. |
| 1423 |
CreativeId string `json:"creativeId,omitempty"` |
| 1424 |
// DealsStatus: Output only. The top-level deals status of this creative. If |
| 1425 |
// disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in |
| 1426 |
// serving_restrictions will also exist. Note that this may be nuanced with |
| 1427 |
// other contextual restrictions, in which case, it may be preferable to read |
| 1428 |
// from serving_restrictions directly. Can be used to filter the response of |
| 1429 |
// the creatives.list method. |
| 1430 |
// |
| 1431 |
// Possible values: |
| 1432 |
// "STATUS_UNSPECIFIED" - The status is unknown. |
| 1433 |
// "NOT_CHECKED" - The creative has not been checked. |
| 1434 |
// "CONDITIONALLY_APPROVED" - The creative has been conditionally approved. |
| 1435 |
// See serving_restrictions for details. |
| 1436 |
// "APPROVED" - The creative has been approved. |
| 1437 |
// "DISAPPROVED" - The creative has been disapproved. |
| 1438 |
// "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently not |
| 1439 |
// used. |
| 1440 |
// "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1. |
| 1441 |
// Currently not used. |
| 1442 |
DealsStatus string `json:"dealsStatus,omitempty"` |
| 1443 |
// DeclaredClickThroughUrls: The set of declared destination URLs for the |
| 1444 |
// creative. |
| 1445 |
DeclaredClickThroughUrls []string `json:"declaredClickThroughUrls,omitempty"` |
| 1446 |
// DetectedAdvertiserIds: Output only. Detected advertiser IDs, if any. |
| 1447 |
DetectedAdvertiserIds googleapi.Int64s `json:"detectedAdvertiserIds,omitempty"` |
| 1448 |
// DetectedDomains: Output only. The detected domains for this creative. |
| 1449 |
DetectedDomains []string `json:"detectedDomains,omitempty"` |
| 1450 |
// DetectedLanguages: Output only. The detected languages for this creative. |
| 1451 |
// The order is arbitrary. The codes are 2 or 5 characters and are documented |
| 1452 |
// at https://developers.google.com/adwords/api/docs/appendix/languagecodes. |
| 1453 |
DetectedLanguages []string `json:"detectedLanguages,omitempty"` |
| 1454 |
// DetectedProductCategories: Output only. Detected product categories, if any. |
| 1455 |
// See the ad-product-categories.txt file in the technical documentation for a |
| 1456 |
// list of IDs. |
| 1457 |
DetectedProductCategories []int64 `json:"detectedProductCategories,omitempty"` |
| 1458 |
// DetectedSensitiveCategories: Output only. Detected sensitive categories, if |
| 1459 |
// any. See the ad-sensitive-categories.txt file in the technical documentation |
| 1460 |
// for a list of IDs. You should use these IDs along with the |
| 1461 |
// excluded-sensitive-category field in the bid request to filter your bids. |
| 1462 |
DetectedSensitiveCategories []int64 `json:"detectedSensitiveCategories,omitempty"` |
| 1463 |
// Html: An HTML creative. |
| 1464 |
Html *HtmlContent `json:"html,omitempty"` |
| 1465 |
// ImpressionTrackingUrls: The set of URLs to be called to record an |
| 1466 |
// impression. |
| 1467 |
ImpressionTrackingUrls []string `json:"impressionTrackingUrls,omitempty"` |
| 1468 |
// Native: A native creative. |
| 1469 |
Native *NativeContent `json:"native,omitempty"` |
| 1470 |
// OpenAuctionStatus: Output only. The top-level open auction status of this |
| 1471 |
// creative. If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or |
| 1472 |
// 'ALL') in serving_restrictions will also exist. Note that this may be |
| 1473 |
// nuanced with other contextual restrictions, in which case, it may be |
| 1474 |
// preferable to read from serving_restrictions directly. Can be used to filter |
| 1475 |
// the response of the creatives.list method. |
| 1476 |
// |
| 1477 |
// Possible values: |
| 1478 |
// "STATUS_UNSPECIFIED" - The status is unknown. |
| 1479 |
// "NOT_CHECKED" - The creative has not been checked. |
| 1480 |
// "CONDITIONALLY_APPROVED" - The creative has been conditionally approved. |
| 1481 |
// See serving_restrictions for details. |
| 1482 |
// "APPROVED" - The creative has been approved. |
| 1483 |
// "DISAPPROVED" - The creative has been disapproved. |
| 1484 |
// "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently not |
| 1485 |
// used. |
| 1486 |
// "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1. |
| 1487 |
// Currently not used. |
| 1488 |
OpenAuctionStatus string `json:"openAuctionStatus,omitempty"` |
| 1489 |
// RestrictedCategories: All restricted categories for the ads that may be |
| 1490 |
// shown from this creative. |
| 1491 |
// |
| 1492 |
// Possible values: |
| 1493 |
// "NO_RESTRICTED_CATEGORIES" - The ad has no restricted categories |
| 1494 |
// "ALCOHOL" - The alcohol restricted category. |
| 1495 |
RestrictedCategories []string `json:"restrictedCategories,omitempty"` |
| 1496 |
// ServingRestrictions: Output only. The granular status of this ad in specific |
| 1497 |
// contexts. A context here relates to where something ultimately serves (for |
| 1498 |
// example, a physical location, a platform, an HTTPS versus HTTP request, or |
| 1499 |
// the type of auction). |
| 1500 |
ServingRestrictions []*ServingRestriction `json:"servingRestrictions,omitempty"` |
| 1501 |
// VendorIds: All vendor IDs for the ads that may be shown from this creative. |
| 1502 |
// See https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for |
| 1503 |
// possible values. |
| 1504 |
VendorIds []int64 `json:"vendorIds,omitempty"` |
| 1505 |
// Version: Output only. The version of this creative. |
| 1506 |
Version int64 `json:"version,omitempty"` |
| 1507 |
// Video: A video creative. |
| 1508 |
Video *VideoContent `json:"video,omitempty"` |
| 1509 |
|
| 1510 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 1511 |
googleapi.ServerResponse `json:"-"` |
| 1512 |
// ForceSendFields is a list of field names (e.g. "AccountId") to |
| 1513 |
// unconditionally include in API requests. By default, fields with empty or |
| 1514 |
// default values are omitted from API requests. See |
| 1515 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1516 |
// details. |
| 1517 |
ForceSendFields []string `json:"-"` |
| 1518 |
// NullFields is a list of field names (e.g. "AccountId") to include in API |
| 1519 |
// requests with the JSON null value. By default, fields with empty values are |
| 1520 |
// omitted from API requests. See |
| 1521 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1522 |
NullFields []string `json:"-"` |
| 1523 |
} |
| 1524 |
|
| 1525 |
func (s Creative) MarshalJSON() ([]byte, error) { |
| 1526 |
type NoMethod Creative |
| 1527 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1528 |
} |
| 1529 |
|
| 1530 |
// CreativeDealAssociation: The association between a creative and a deal. |
| 1531 |
type CreativeDealAssociation struct { |
| 1532 |
// AccountId: The account the creative belongs to. |
| 1533 |
AccountId string `json:"accountId,omitempty"` |
| 1534 |
// CreativeId: The ID of the creative associated with the deal. |
| 1535 |
CreativeId string `json:"creativeId,omitempty"` |
| 1536 |
// DealsId: The externalDealId for the deal associated with the creative. |
| 1537 |
DealsId string `json:"dealsId,omitempty"` |
| 1538 |
// ForceSendFields is a list of field names (e.g. "AccountId") to |
| 1539 |
// unconditionally include in API requests. By default, fields with empty or |
| 1540 |
// default values are omitted from API requests. See |
| 1541 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1542 |
// details. |
| 1543 |
ForceSendFields []string `json:"-"` |
| 1544 |
// NullFields is a list of field names (e.g. "AccountId") to include in API |
| 1545 |
// requests with the JSON null value. By default, fields with empty values are |
| 1546 |
// omitted from API requests. See |
| 1547 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1548 |
NullFields []string `json:"-"` |
| 1549 |
} |
| 1550 |
|
| 1551 |
func (s CreativeDealAssociation) MarshalJSON() ([]byte, error) { |
| 1552 |
type NoMethod CreativeDealAssociation |
| 1553 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1554 |
} |
| 1555 |
|
| 1556 |
// CreativeRestrictions: Represents creative restrictions associated to |
| 1557 |
// Programmatic Guaranteed/ Preferred Deal in Ad Manager. This doesn't apply to |
| 1558 |
// Private Auction and AdX Preferred Deals. |
| 1559 |
type CreativeRestrictions struct { |
| 1560 |
// CreativeFormat: The format of the environment that the creatives will be |
| 1561 |
// displayed in. |
| 1562 |
// |
| 1563 |
// Possible values: |
| 1564 |
// "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an undefined creative |
| 1565 |
// format. |
| 1566 |
// "DISPLAY" - A creative that will be displayed in environments such as a |
| 1567 |
// browser. |
| 1568 |
// "VIDEO" - A video creative that will be displayed in environments such as |
| 1569 |
// a video player. |
| 1570 |
CreativeFormat string `json:"creativeFormat,omitempty"` |
| 1571 |
CreativeSpecifications []*CreativeSpecification `json:"creativeSpecifications,omitempty"` |
| 1572 |
// SkippableAdType: Skippable video ads allow viewers to skip ads after 5 |
| 1573 |
// seconds. |
| 1574 |
// |
| 1575 |
// Possible values: |
| 1576 |
// "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined skippable |
| 1577 |
// ad type. |
| 1578 |
// "SKIPPABLE" - This video ad can be skipped after 5 seconds. |
| 1579 |
// "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds, and is |
| 1580 |
// counted as engaged view after 30 seconds. The creative is hosted on YouTube |
| 1581 |
// only, and viewcount of the YouTube video increments after the engaged view. |
| 1582 |
// "NOT_SKIPPABLE" - This video ad is not skippable. |
| 1583 |
SkippableAdType string `json:"skippableAdType,omitempty"` |
| 1584 |
// ForceSendFields is a list of field names (e.g. "CreativeFormat") to |
| 1585 |
// unconditionally include in API requests. By default, fields with empty or |
| 1586 |
// default values are omitted from API requests. See |
| 1587 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1588 |
// details. |
| 1589 |
ForceSendFields []string `json:"-"` |
| 1590 |
// NullFields is a list of field names (e.g. "CreativeFormat") to include in |
| 1591 |
// API requests with the JSON null value. By default, fields with empty values |
| 1592 |
// are omitted from API requests. See |
| 1593 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1594 |
NullFields []string `json:"-"` |
| 1595 |
} |
| 1596 |
|
| 1597 |
func (s CreativeRestrictions) MarshalJSON() ([]byte, error) { |
| 1598 |
type NoMethod CreativeRestrictions |
| 1599 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1600 |
} |
| 1601 |
|
| 1602 |
// CreativeSize: Specifies the size of the creative. |
| 1603 |
type CreativeSize struct { |
| 1604 |
// AllowedFormats: What formats are allowed by the publisher. If this repeated |
| 1605 |
// field is empty then all formats are allowed. For example, if this field |
| 1606 |
// contains AllowedFormatType.AUDIO then the publisher only allows an audio ad |
| 1607 |
// (without any video). |
| 1608 |
// |
| 1609 |
// Possible values: |
| 1610 |
// "UNKNOWN" - A placeholder for an undefined allowed format. |
| 1611 |
// "AUDIO" - An audio-only ad (without any video). |
| 1612 |
AllowedFormats []string `json:"allowedFormats,omitempty"` |
| 1613 |
// CompanionSizes: For video creatives specifies the sizes of companion ads (if |
| 1614 |
// present). Companion sizes may be filled in only when creative_size_type = |
| 1615 |
// VIDEO |
| 1616 |
CompanionSizes []*Size `json:"companionSizes,omitempty"` |
| 1617 |
// CreativeSizeType: The creative size type. |
| 1618 |
// |
| 1619 |
// Possible values: |
| 1620 |
// "CREATIVE_SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined creative |
| 1621 |
// size type. |
| 1622 |
// "REGULAR" - The creative is a regular desktop creative. |
| 1623 |
// "INTERSTITIAL" - The creative is an interstitial creative. |
| 1624 |
// "VIDEO" - The creative is a video creative. |
| 1625 |
// "NATIVE" - The creative is a native (mobile) creative. |
| 1626 |
CreativeSizeType string `json:"creativeSizeType,omitempty"` |
| 1627 |
// NativeTemplate: Output only. The native template for this creative. It will |
| 1628 |
// have a value only if creative_size_type = CreativeSizeType.NATIVE. |
| 1629 |
// |
| 1630 |
// Possible values: |
| 1631 |
// "UNKNOWN_NATIVE_TEMPLATE" - A placeholder for an undefined native |
| 1632 |
// template. |
| 1633 |
// "NATIVE_CONTENT_AD" - The creative is linked to native content ad. |
| 1634 |
// "NATIVE_APP_INSTALL_AD" - The creative is linked to native app install ad. |
| 1635 |
// "NATIVE_VIDEO_CONTENT_AD" - The creative is linked to native video content |
| 1636 |
// ad. |
| 1637 |
// "NATIVE_VIDEO_APP_INSTALL_AD" - The creative is linked to native video app |
| 1638 |
// install ad. |
| 1639 |
NativeTemplate string `json:"nativeTemplate,omitempty"` |
| 1640 |
// Size: For regular or video creative size type, specifies the size of the |
| 1641 |
// creative |
| 1642 |
Size *Size `json:"size,omitempty"` |
| 1643 |
// SkippableAdType: The type of skippable ad for this creative. It will have a |
| 1644 |
// value only if creative_size_type = CreativeSizeType.VIDEO. |
| 1645 |
// |
| 1646 |
// Possible values: |
| 1647 |
// "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined skippable |
| 1648 |
// ad type. |
| 1649 |
// "GENERIC" - This video ad can be skipped after 5 seconds. |
| 1650 |
// "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds, and |
| 1651 |
// count as engaged view after 30 seconds. The creative is hosted on YouTube |
| 1652 |
// only, and viewcount of the YouTube video increments after the engaged view. |
| 1653 |
// "NOT_SKIPPABLE" - This video ad is not skippable. |
| 1654 |
SkippableAdType string `json:"skippableAdType,omitempty"` |
| 1655 |
// ForceSendFields is a list of field names (e.g. "AllowedFormats") to |
| 1656 |
// unconditionally include in API requests. By default, fields with empty or |
| 1657 |
// default values are omitted from API requests. See |
| 1658 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1659 |
// details. |
| 1660 |
ForceSendFields []string `json:"-"` |
| 1661 |
// NullFields is a list of field names (e.g. "AllowedFormats") to include in |
| 1662 |
// API requests with the JSON null value. By default, fields with empty values |
| 1663 |
// are omitted from API requests. See |
| 1664 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1665 |
NullFields []string `json:"-"` |
| 1666 |
} |
| 1667 |
|
| 1668 |
func (s CreativeSize) MarshalJSON() ([]byte, error) { |
| 1669 |
type NoMethod CreativeSize |
| 1670 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1671 |
} |
| 1672 |
|
| 1673 |
// CreativeSpecification: Represents information for a creative that is |
| 1674 |
// associated with a Programmatic Guaranteed/Preferred Deal in Ad Manager. |
| 1675 |
type CreativeSpecification struct { |
| 1676 |
// CreativeCompanionSizes: Companion sizes may be filled in only when this is a |
| 1677 |
// video creative. |
| 1678 |
CreativeCompanionSizes []*AdSize `json:"creativeCompanionSizes,omitempty"` |
| 1679 |
// CreativeSize: The size of the creative. |
| 1680 |
CreativeSize *AdSize `json:"creativeSize,omitempty"` |
| 1681 |
// ForceSendFields is a list of field names (e.g. "CreativeCompanionSizes") to |
| 1682 |
// unconditionally include in API requests. By default, fields with empty or |
| 1683 |
// default values are omitted from API requests. See |
| 1684 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1685 |
// details. |
| 1686 |
ForceSendFields []string `json:"-"` |
| 1687 |
// NullFields is a list of field names (e.g. "CreativeCompanionSizes") to |
| 1688 |
// include in API requests with the JSON null value. By default, fields with |
| 1689 |
// empty values are omitted from API requests. See |
| 1690 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1691 |
NullFields []string `json:"-"` |
| 1692 |
} |
| 1693 |
|
| 1694 |
func (s CreativeSpecification) MarshalJSON() ([]byte, error) { |
| 1695 |
type NoMethod CreativeSpecification |
| 1696 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1697 |
} |
| 1698 |
|
| 1699 |
// CreativeStatusRow: The number of bids with the specified dimension values |
| 1700 |
// that did not win the auction (either were filtered pre-auction or lost the |
| 1701 |
// auction), as described by the specified creative status. |
| 1702 |
type CreativeStatusRow struct { |
| 1703 |
// BidCount: The number of bids with the specified status. |
| 1704 |
BidCount *MetricValue `json:"bidCount,omitempty"` |
| 1705 |
// CreativeStatusId: The ID of the creative status. See creative-status-codes |
| 1706 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 1707 |
CreativeStatusId int64 `json:"creativeStatusId,omitempty"` |
| 1708 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 1709 |
// this row. |
| 1710 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 1711 |
// ForceSendFields is a list of field names (e.g. "BidCount") to |
| 1712 |
// unconditionally include in API requests. By default, fields with empty or |
| 1713 |
// default values are omitted from API requests. See |
| 1714 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1715 |
// details. |
| 1716 |
ForceSendFields []string `json:"-"` |
| 1717 |
// NullFields is a list of field names (e.g. "BidCount") to include in API |
| 1718 |
// requests with the JSON null value. By default, fields with empty values are |
| 1719 |
// omitted from API requests. See |
| 1720 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1721 |
NullFields []string `json:"-"` |
| 1722 |
} |
| 1723 |
|
| 1724 |
func (s CreativeStatusRow) MarshalJSON() ([]byte, error) { |
| 1725 |
type NoMethod CreativeStatusRow |
| 1726 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1727 |
} |
| 1728 |
|
| 1729 |
// CriteriaTargeting: Generic targeting used for targeting dimensions that |
| 1730 |
// contains a list of included and excluded numeric IDs. |
| 1731 |
type CriteriaTargeting struct { |
| 1732 |
// ExcludedCriteriaIds: A list of numeric IDs to be excluded. |
| 1733 |
ExcludedCriteriaIds googleapi.Int64s `json:"excludedCriteriaIds,omitempty"` |
| 1734 |
// TargetedCriteriaIds: A list of numeric IDs to be included. |
| 1735 |
TargetedCriteriaIds googleapi.Int64s `json:"targetedCriteriaIds,omitempty"` |
| 1736 |
// ForceSendFields is a list of field names (e.g. "ExcludedCriteriaIds") to |
| 1737 |
// unconditionally include in API requests. By default, fields with empty or |
| 1738 |
// default values are omitted from API requests. See |
| 1739 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1740 |
// details. |
| 1741 |
ForceSendFields []string `json:"-"` |
| 1742 |
// NullFields is a list of field names (e.g. "ExcludedCriteriaIds") to include |
| 1743 |
// in API requests with the JSON null value. By default, fields with empty |
| 1744 |
// values are omitted from API requests. See |
| 1745 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1746 |
NullFields []string `json:"-"` |
| 1747 |
} |
| 1748 |
|
| 1749 |
func (s CriteriaTargeting) MarshalJSON() ([]byte, error) { |
| 1750 |
type NoMethod CriteriaTargeting |
| 1751 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1752 |
} |
| 1753 |
|
| 1754 |
// Date: Represents a whole or partial calendar date, such as a birthday. The |
| 1755 |
// time of day and time zone are either specified elsewhere or are |
| 1756 |
// insignificant. The date is relative to the Gregorian Calendar. This can |
| 1757 |
// represent one of the following: * A full date, with non-zero year, month, |
| 1758 |
// and day values. * A month and day, with a zero year (for example, an |
| 1759 |
// anniversary). * A year on its own, with a zero month and a zero day. * A |
| 1760 |
// year and month, with a zero day (for example, a credit card expiration |
| 1761 |
// date). Related types: * google.type.TimeOfDay * google.type.DateTime * |
| 1762 |
// google.protobuf.Timestamp |
| 1763 |
type Date struct { |
| 1764 |
// Day: Day of a month. Must be from 1 to 31 and valid for the year and month, |
| 1765 |
// or 0 to specify a year by itself or a year and month where the day isn't |
| 1766 |
// significant. |
| 1767 |
Day int64 `json:"day,omitempty"` |
| 1768 |
// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without |
| 1769 |
// a month and day. |
| 1770 |
Month int64 `json:"month,omitempty"` |
| 1771 |
// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date |
| 1772 |
// without a year. |
| 1773 |
Year int64 `json:"year,omitempty"` |
| 1774 |
// ForceSendFields is a list of field names (e.g. "Day") to unconditionally |
| 1775 |
// include in API requests. By default, fields with empty or default values are |
| 1776 |
// omitted from API requests. See |
| 1777 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1778 |
// details. |
| 1779 |
ForceSendFields []string `json:"-"` |
| 1780 |
// NullFields is a list of field names (e.g. "Day") to include in API requests |
| 1781 |
// with the JSON null value. By default, fields with empty values are omitted |
| 1782 |
// from API requests. See |
| 1783 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1784 |
NullFields []string `json:"-"` |
| 1785 |
} |
| 1786 |
|
| 1787 |
func (s Date) MarshalJSON() ([]byte, error) { |
| 1788 |
type NoMethod Date |
| 1789 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1790 |
} |
| 1791 |
|
| 1792 |
// DayPart: Daypart targeting message that specifies if the ad can be shown |
| 1793 |
// only during certain parts of a day/week. |
| 1794 |
type DayPart struct { |
| 1795 |
// DayOfWeek: The day of the week to target. If unspecified, applicable to all |
| 1796 |
// days. |
| 1797 |
// |
| 1798 |
// Possible values: |
| 1799 |
// "DAY_OF_WEEK_UNSPECIFIED" - A placeholder for when the day of the week is |
| 1800 |
// not specified. |
| 1801 |
// "MONDAY" - Monday |
| 1802 |
// "TUESDAY" - Tuesday |
| 1803 |
// "WEDNESDAY" - Wednesday |
| 1804 |
// "THURSDAY" - Thursday |
| 1805 |
// "FRIDAY" - Friday |
| 1806 |
// "SATURDAY" - Saturday |
| 1807 |
// "SUNDAY" - Sunday |
| 1808 |
DayOfWeek string `json:"dayOfWeek,omitempty"` |
| 1809 |
// EndTime: The ending time of the day for the ad to show (minute level |
| 1810 |
// granularity). The end time is exclusive. This field is not available for |
| 1811 |
// filtering in PQL queries. |
| 1812 |
EndTime *TimeOfDay `json:"endTime,omitempty"` |
| 1813 |
// StartTime: The starting time of day for the ad to show (minute level |
| 1814 |
// granularity). The start time is inclusive. This field is not available for |
| 1815 |
// filtering in PQL queries. |
| 1816 |
StartTime *TimeOfDay `json:"startTime,omitempty"` |
| 1817 |
// ForceSendFields is a list of field names (e.g. "DayOfWeek") to |
| 1818 |
// unconditionally include in API requests. By default, fields with empty or |
| 1819 |
// default values are omitted from API requests. See |
| 1820 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1821 |
// details. |
| 1822 |
ForceSendFields []string `json:"-"` |
| 1823 |
// NullFields is a list of field names (e.g. "DayOfWeek") to include in API |
| 1824 |
// requests with the JSON null value. By default, fields with empty values are |
| 1825 |
// omitted from API requests. See |
| 1826 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1827 |
NullFields []string `json:"-"` |
| 1828 |
} |
| 1829 |
|
| 1830 |
func (s DayPart) MarshalJSON() ([]byte, error) { |
| 1831 |
type NoMethod DayPart |
| 1832 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1833 |
} |
| 1834 |
|
| 1835 |
// DayPartTargeting: Specifies the day part targeting criteria. |
| 1836 |
type DayPartTargeting struct { |
| 1837 |
// DayParts: A list of day part targeting criterion. |
| 1838 |
DayParts []*DayPart `json:"dayParts,omitempty"` |
| 1839 |
// TimeZoneType: The timezone to use for interpreting the day part targeting. |
| 1840 |
// |
| 1841 |
// Possible values: |
| 1842 |
// "TIME_ZONE_SOURCE_UNSPECIFIED" - A placeholder for an undefined time zone |
| 1843 |
// source. |
| 1844 |
// "PUBLISHER" - Use publisher's time zone setting. |
| 1845 |
// "USER" - Use the user's time zone setting. |
| 1846 |
TimeZoneType string `json:"timeZoneType,omitempty"` |
| 1847 |
// ForceSendFields is a list of field names (e.g. "DayParts") to |
| 1848 |
// unconditionally include in API requests. By default, fields with empty or |
| 1849 |
// default values are omitted from API requests. See |
| 1850 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1851 |
// details. |
| 1852 |
ForceSendFields []string `json:"-"` |
| 1853 |
// NullFields is a list of field names (e.g. "DayParts") to include in API |
| 1854 |
// requests with the JSON null value. By default, fields with empty values are |
| 1855 |
// omitted from API requests. See |
| 1856 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1857 |
NullFields []string `json:"-"` |
| 1858 |
} |
| 1859 |
|
| 1860 |
func (s DayPartTargeting) MarshalJSON() ([]byte, error) { |
| 1861 |
type NoMethod DayPartTargeting |
| 1862 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1863 |
} |
| 1864 |
|
| 1865 |
// Deal: A deal represents a segment of inventory for displaying ads on. A |
| 1866 |
// proposal can contain multiple deals. A deal contains the terms and targeting |
| 1867 |
// information that is used for serving. |
| 1868 |
type Deal struct { |
| 1869 |
// AvailableEndTime: Proposed flight end time of the deal. This will generally |
| 1870 |
// be stored in a granularity of a second. A value is not required for Private |
| 1871 |
// Auction deals or Preferred Deals. |
| 1872 |
AvailableEndTime string `json:"availableEndTime,omitempty"` |
| 1873 |
// AvailableStartTime: Optional. Proposed flight start time of the deal. This |
| 1874 |
// will generally be stored in the granularity of one second since deal serving |
| 1875 |
// starts at seconds boundary. Any time specified with more granularity (for |
| 1876 |
// example, in milliseconds) will be truncated towards the start of time in |
| 1877 |
// seconds. |
| 1878 |
AvailableStartTime string `json:"availableStartTime,omitempty"` |
| 1879 |
// BuyerPrivateData: Buyer private data (hidden from seller). |
| 1880 |
BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` |
| 1881 |
// CreateProductId: The product ID from which this deal was created. Note: This |
| 1882 |
// field may be set only when creating the resource. Modifying this field while |
| 1883 |
// updating the resource will result in an error. |
| 1884 |
CreateProductId string `json:"createProductId,omitempty"` |
| 1885 |
// CreateProductRevision: Optional. Revision number of the product that the |
| 1886 |
// deal was created from. If present on create, and the server |
| 1887 |
// `product_revision` has advanced since the passed-in |
| 1888 |
// `create_product_revision`, an `ABORTED` error will be returned. Note: This |
| 1889 |
// field may be set only when creating the resource. Modifying this field while |
| 1890 |
// updating the resource will result in an error. |
| 1891 |
CreateProductRevision int64 `json:"createProductRevision,omitempty,string"` |
| 1892 |
// CreateTime: Output only. The time of the deal creation. |
| 1893 |
CreateTime string `json:"createTime,omitempty"` |
| 1894 |
// CreativePreApprovalPolicy: Output only. Specifies the creative pre-approval |
| 1895 |
// policy. |
| 1896 |
// |
| 1897 |
// Possible values: |
| 1898 |
// "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" - A placeholder for an |
| 1899 |
// undefined creative pre-approval policy. |
| 1900 |
// "SELLER_PRE_APPROVAL_REQUIRED" - The seller needs to approve each creative |
| 1901 |
// before it can serve. |
| 1902 |
// "SELLER_PRE_APPROVAL_NOT_REQUIRED" - The seller does not need to approve |
| 1903 |
// each creative before it can serve. |
| 1904 |
CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"` |
| 1905 |
// CreativeRestrictions: Output only. Restricitions about the creatives |
| 1906 |
// associated with the deal (for example, size) This is available for |
| 1907 |
// Programmatic Guaranteed/Preferred Deals in Ad Manager. |
| 1908 |
CreativeRestrictions *CreativeRestrictions `json:"creativeRestrictions,omitempty"` |
| 1909 |
// CreativeSafeFrameCompatibility: Output only. Specifies whether the creative |
| 1910 |
// is safeFrame compatible. |
| 1911 |
// |
| 1912 |
// Possible values: |
| 1913 |
// "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" - A placeholder for an |
| 1914 |
// undefined creative safe-frame compatibility. |
| 1915 |
// "COMPATIBLE" - The creatives need to be compatible with the safe frame |
| 1916 |
// option. |
| 1917 |
// "INCOMPATIBLE" - The creatives can be incompatible with the safe frame |
| 1918 |
// option. |
| 1919 |
CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"` |
| 1920 |
// DealId: Output only. A unique deal ID for the deal (server-assigned). |
| 1921 |
DealId string `json:"dealId,omitempty"` |
| 1922 |
// DealServingMetadata: Output only. Metadata about the serving status of this |
| 1923 |
// deal. |
| 1924 |
DealServingMetadata *DealServingMetadata `json:"dealServingMetadata,omitempty"` |
| 1925 |
// DealTerms: The negotiable terms of the deal. |
| 1926 |
DealTerms *DealTerms `json:"dealTerms,omitempty"` |
| 1927 |
// DeliveryControl: The set of fields around delivery control that are |
| 1928 |
// interesting for a buyer to see but are non-negotiable. These are set by the |
| 1929 |
// publisher. |
| 1930 |
DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"` |
| 1931 |
// Description: Description for the deal terms. |
| 1932 |
Description string `json:"description,omitempty"` |
| 1933 |
// DisplayName: The name of the deal. |
| 1934 |
DisplayName string `json:"displayName,omitempty"` |
| 1935 |
// ExternalDealId: Output only. The external deal ID assigned to this deal once |
| 1936 |
// the deal is finalized. This is the deal ID that shows up in |
| 1937 |
// serving/reporting etc. |
| 1938 |
ExternalDealId string `json:"externalDealId,omitempty"` |
| 1939 |
// IsSetupComplete: Output only. True, if the buyside inventory setup is |
| 1940 |
// complete for this deal. |
| 1941 |
IsSetupComplete bool `json:"isSetupComplete,omitempty"` |
| 1942 |
// ProgrammaticCreativeSource: Output only. Specifies the creative source for |
| 1943 |
// programmatic deals. PUBLISHER means creative is provided by seller and |
| 1944 |
// ADVERTISER means creative is provided by buyer. |
| 1945 |
// |
| 1946 |
// Possible values: |
| 1947 |
// "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" - A placeholder for an |
| 1948 |
// undefined programmatic creative source. |
| 1949 |
// "ADVERTISER" - The advertiser provides the creatives. |
| 1950 |
// "PUBLISHER" - The publisher provides the creatives to be served. |
| 1951 |
ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"` |
| 1952 |
// ProposalId: Output only. ID of the proposal that this deal is part of. |
| 1953 |
ProposalId string `json:"proposalId,omitempty"` |
| 1954 |
// SellerContacts: Output only. Seller contact information for the deal. |
| 1955 |
SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"` |
| 1956 |
// SyndicationProduct: The syndication product associated with the deal. Note: |
| 1957 |
// This field may be set only when creating the resource. Modifying this field |
| 1958 |
// while updating the resource will result in an error. |
| 1959 |
// |
| 1960 |
// Possible values: |
| 1961 |
// "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined |
| 1962 |
// syndication product. |
| 1963 |
// "CONTENT" - This typically represents a web page. |
| 1964 |
// "MOBILE" - This represents a mobile property. |
| 1965 |
// "VIDEO" - This represents video ad formats. |
| 1966 |
// "GAMES" - This represents ads shown within games. |
| 1967 |
SyndicationProduct string `json:"syndicationProduct,omitempty"` |
| 1968 |
// Targeting: Output only. Specifies the subset of inventory targeted by the |
| 1969 |
// deal. |
| 1970 |
Targeting *MarketplaceTargeting `json:"targeting,omitempty"` |
| 1971 |
// TargetingCriterion: The shared targeting visible to buyers and sellers. Each |
| 1972 |
// shared targeting entity is AND'd together. |
| 1973 |
TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"` |
| 1974 |
// UpdateTime: Output only. The time when the deal was last updated. |
| 1975 |
UpdateTime string `json:"updateTime,omitempty"` |
| 1976 |
// WebPropertyCode: The web property code for the seller copied over from the |
| 1977 |
// product. |
| 1978 |
WebPropertyCode string `json:"webPropertyCode,omitempty"` |
| 1979 |
// ForceSendFields is a list of field names (e.g. "AvailableEndTime") to |
| 1980 |
// unconditionally include in API requests. By default, fields with empty or |
| 1981 |
// default values are omitted from API requests. See |
| 1982 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 1983 |
// details. |
| 1984 |
ForceSendFields []string `json:"-"` |
| 1985 |
// NullFields is a list of field names (e.g. "AvailableEndTime") to include in |
| 1986 |
// API requests with the JSON null value. By default, fields with empty values |
| 1987 |
// are omitted from API requests. See |
| 1988 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 1989 |
NullFields []string `json:"-"` |
| 1990 |
} |
| 1991 |
|
| 1992 |
func (s Deal) MarshalJSON() ([]byte, error) { |
| 1993 |
type NoMethod Deal |
| 1994 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 1995 |
} |
| 1996 |
|
| 1997 |
// DealPauseStatus: Tracks which parties (if any) have paused a deal. The deal |
| 1998 |
// is considered paused if either hasBuyerPaused or hasSellPaused is true. |
| 1999 |
type DealPauseStatus struct { |
| 2000 |
// BuyerPauseReason: The buyer's reason for pausing, if the buyer paused the |
| 2001 |
// deal. |
| 2002 |
BuyerPauseReason string `json:"buyerPauseReason,omitempty"` |
| 2003 |
// FirstPausedBy: The role of the person who first paused this deal. |
| 2004 |
// |
| 2005 |
// Possible values: |
| 2006 |
// "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined |
| 2007 |
// buyer/seller role. |
| 2008 |
// "BUYER" - Specifies the role as buyer. |
| 2009 |
// "SELLER" - Specifies the role as seller. |
| 2010 |
FirstPausedBy string `json:"firstPausedBy,omitempty"` |
| 2011 |
// HasBuyerPaused: True, if the buyer has paused the deal unilaterally. |
| 2012 |
HasBuyerPaused bool `json:"hasBuyerPaused,omitempty"` |
| 2013 |
// HasSellerPaused: True, if the seller has paused the deal unilaterally. |
| 2014 |
HasSellerPaused bool `json:"hasSellerPaused,omitempty"` |
| 2015 |
// SellerPauseReason: The seller's reason for pausing, if the seller paused the |
| 2016 |
// deal. |
| 2017 |
SellerPauseReason string `json:"sellerPauseReason,omitempty"` |
| 2018 |
// ForceSendFields is a list of field names (e.g. "BuyerPauseReason") to |
| 2019 |
// unconditionally include in API requests. By default, fields with empty or |
| 2020 |
// default values are omitted from API requests. See |
| 2021 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2022 |
// details. |
| 2023 |
ForceSendFields []string `json:"-"` |
| 2024 |
// NullFields is a list of field names (e.g. "BuyerPauseReason") to include in |
| 2025 |
// API requests with the JSON null value. By default, fields with empty values |
| 2026 |
// are omitted from API requests. See |
| 2027 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2028 |
NullFields []string `json:"-"` |
| 2029 |
} |
| 2030 |
|
| 2031 |
func (s DealPauseStatus) MarshalJSON() ([]byte, error) { |
| 2032 |
type NoMethod DealPauseStatus |
| 2033 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2034 |
} |
| 2035 |
|
| 2036 |
// DealServingMetadata: Message captures metadata about the serving status of a |
| 2037 |
// deal. |
| 2038 |
type DealServingMetadata struct { |
| 2039 |
// DealPauseStatus: Output only. Tracks which parties (if any) have paused a |
| 2040 |
// deal. |
| 2041 |
DealPauseStatus *DealPauseStatus `json:"dealPauseStatus,omitempty"` |
| 2042 |
// ForceSendFields is a list of field names (e.g. "DealPauseStatus") to |
| 2043 |
// unconditionally include in API requests. By default, fields with empty or |
| 2044 |
// default values are omitted from API requests. See |
| 2045 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2046 |
// details. |
| 2047 |
ForceSendFields []string `json:"-"` |
| 2048 |
// NullFields is a list of field names (e.g. "DealPauseStatus") to include in |
| 2049 |
// API requests with the JSON null value. By default, fields with empty values |
| 2050 |
// are omitted from API requests. See |
| 2051 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2052 |
NullFields []string `json:"-"` |
| 2053 |
} |
| 2054 |
|
| 2055 |
func (s DealServingMetadata) MarshalJSON() ([]byte, error) { |
| 2056 |
type NoMethod DealServingMetadata |
| 2057 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2058 |
} |
| 2059 |
|
| 2060 |
// DealTerms: The deal terms specify the details of a Product/deal. They |
| 2061 |
// specify things like price per buyer, the type of pricing model (for example, |
| 2062 |
// fixed price, auction) and expected impressions from the publisher. |
| 2063 |
type DealTerms struct { |
| 2064 |
// BrandingType: Visibility of the URL in bid requests. (default: BRANDED) |
| 2065 |
// |
| 2066 |
// Possible values: |
| 2067 |
// "BRANDING_TYPE_UNSPECIFIED" - A placeholder for an undefined branding |
| 2068 |
// type. |
| 2069 |
// "BRANDED" - Full URL is included in bid requests. |
| 2070 |
// "SEMI_TRANSPARENT" - A TopLevelDomain or masked URL is sent in bid |
| 2071 |
// requests rather than the full one. |
| 2072 |
BrandingType string `json:"brandingType,omitempty"` |
| 2073 |
// Description: Publisher provided description for the terms. |
| 2074 |
Description string `json:"description,omitempty"` |
| 2075 |
// EstimatedGrossSpend: Non-binding estimate of the estimated gross spend for |
| 2076 |
// this deal. Can be set by buyer or seller. |
| 2077 |
EstimatedGrossSpend *Price `json:"estimatedGrossSpend,omitempty"` |
| 2078 |
// EstimatedImpressionsPerDay: Non-binding estimate of the impressions served |
| 2079 |
// per day. Can be set by buyer or seller. |
| 2080 |
EstimatedImpressionsPerDay int64 `json:"estimatedImpressionsPerDay,omitempty,string"` |
| 2081 |
// GuaranteedFixedPriceTerms: The terms for guaranteed fixed price deals. |
| 2082 |
GuaranteedFixedPriceTerms *GuaranteedFixedPriceTerms `json:"guaranteedFixedPriceTerms,omitempty"` |
| 2083 |
// NonGuaranteedAuctionTerms: The terms for non-guaranteed auction deals. |
| 2084 |
NonGuaranteedAuctionTerms *NonGuaranteedAuctionTerms `json:"nonGuaranteedAuctionTerms,omitempty"` |
| 2085 |
// NonGuaranteedFixedPriceTerms: The terms for non-guaranteed fixed price |
| 2086 |
// deals. |
| 2087 |
NonGuaranteedFixedPriceTerms *NonGuaranteedFixedPriceTerms `json:"nonGuaranteedFixedPriceTerms,omitempty"` |
| 2088 |
// SellerTimeZone: The time zone name. For deals with Cost Per Day billing, |
| 2089 |
// defines the time zone used to mark the boundaries of a day. It should be an |
| 2090 |
// IANA TZ name, such as "America/Los_Angeles". For more information, see |
| 2091 |
// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. |
| 2092 |
SellerTimeZone string `json:"sellerTimeZone,omitempty"` |
| 2093 |
// ForceSendFields is a list of field names (e.g. "BrandingType") to |
| 2094 |
// unconditionally include in API requests. By default, fields with empty or |
| 2095 |
// default values are omitted from API requests. See |
| 2096 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2097 |
// details. |
| 2098 |
ForceSendFields []string `json:"-"` |
| 2099 |
// NullFields is a list of field names (e.g. "BrandingType") to include in API |
| 2100 |
// requests with the JSON null value. By default, fields with empty values are |
| 2101 |
// omitted from API requests. See |
| 2102 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2103 |
NullFields []string `json:"-"` |
| 2104 |
} |
| 2105 |
|
| 2106 |
func (s DealTerms) MarshalJSON() ([]byte, error) { |
| 2107 |
type NoMethod DealTerms |
| 2108 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2109 |
} |
| 2110 |
|
| 2111 |
// DeliveryControl: Message contains details about how the deals will be paced. |
| 2112 |
type DeliveryControl struct { |
| 2113 |
// CreativeBlockingLevel: Output only. Specified the creative blocking levels |
| 2114 |
// to be applied. |
| 2115 |
// |
| 2116 |
// Possible values: |
| 2117 |
// "CREATIVE_BLOCKING_LEVEL_UNSPECIFIED" - A placeholder for an undefined |
| 2118 |
// creative blocking level. |
| 2119 |
// "PUBLISHER_BLOCKING_RULES" - Publisher blocking rules will be applied. |
| 2120 |
// "ADX_POLICY_BLOCKING_ONLY" - The Ad Exchange policy blocking rules will be |
| 2121 |
// applied. |
| 2122 |
CreativeBlockingLevel string `json:"creativeBlockingLevel,omitempty"` |
| 2123 |
// DeliveryRateType: Output only. Specifies how the impression delivery will be |
| 2124 |
// paced. |
| 2125 |
// |
| 2126 |
// Possible values: |
| 2127 |
// "DELIVERY_RATE_TYPE_UNSPECIFIED" - A placeholder for an undefined delivery |
| 2128 |
// rate type. |
| 2129 |
// "EVENLY" - Impressions are served uniformly over the life of the deal. |
| 2130 |
// "FRONT_LOADED" - Impressions are served front-loaded. |
| 2131 |
// "AS_FAST_AS_POSSIBLE" - Impressions are served as fast as possible. |
| 2132 |
DeliveryRateType string `json:"deliveryRateType,omitempty"` |
| 2133 |
// FrequencyCaps: Output only. Specifies any frequency caps. |
| 2134 |
FrequencyCaps []*FrequencyCap `json:"frequencyCaps,omitempty"` |
| 2135 |
// ForceSendFields is a list of field names (e.g. "CreativeBlockingLevel") to |
| 2136 |
// unconditionally include in API requests. By default, fields with empty or |
| 2137 |
// default values are omitted from API requests. See |
| 2138 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2139 |
// details. |
| 2140 |
ForceSendFields []string `json:"-"` |
| 2141 |
// NullFields is a list of field names (e.g. "CreativeBlockingLevel") to |
| 2142 |
// include in API requests with the JSON null value. By default, fields with |
| 2143 |
// empty values are omitted from API requests. See |
| 2144 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2145 |
NullFields []string `json:"-"` |
| 2146 |
} |
| 2147 |
|
| 2148 |
func (s DeliveryControl) MarshalJSON() ([]byte, error) { |
| 2149 |
type NoMethod DeliveryControl |
| 2150 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2151 |
} |
| 2152 |
|
| 2153 |
// Disapproval: Output only. The reason and details for a disapproval. |
| 2154 |
type Disapproval struct { |
| 2155 |
// Details: Additional details about the reason for disapproval. |
| 2156 |
Details []string `json:"details,omitempty"` |
| 2157 |
// Reason: The categorized reason for disapproval. |
| 2158 |
// |
| 2159 |
// Possible values: |
| 2160 |
// "LENGTH_OF_IMAGE_ANIMATION" - The length of the image animation is longer |
| 2161 |
// than allowed. |
| 2162 |
// "BROKEN_URL" - The click through URL doesn't work properly. |
| 2163 |
// "MEDIA_NOT_FUNCTIONAL" - Something is wrong with the creative itself. |
| 2164 |
// "INVALID_FOURTH_PARTY_CALL" - The ad makes a fourth party call to an |
| 2165 |
// unapproved vendor. |
| 2166 |
// "INCORRECT_REMARKETING_DECLARATION" - The ad targets consumers using |
| 2167 |
// remarketing lists and/or collects data for subsequent use in retargeting, |
| 2168 |
// but does not correctly declare that use. |
| 2169 |
// "LANDING_PAGE_ERROR" - Clicking on the ad leads to an error page. |
| 2170 |
// "AD_SIZE_DOES_NOT_MATCH_AD_SLOT" - The ad size when rendered does not |
| 2171 |
// match the declaration. |
| 2172 |
// "NO_BORDER" - Ads with a white background require a border, which was |
| 2173 |
// missing. |
| 2174 |
// "FOURTH_PARTY_BROWSER_COOKIES" - The creative attempts to set cookies from |
| 2175 |
// a fourth party that is not certified. |
| 2176 |
// "LSO_OBJECTS" - The creative sets an LSO object. |
| 2177 |
// "BLANK_CREATIVE" - The ad serves a blank. |
| 2178 |
// "DESTINATION_URLS_UNDECLARED" - The ad uses rotation, but not all |
| 2179 |
// destination URLs were declared. |
| 2180 |
// "PROBLEM_WITH_CLICK_MACRO" - There is a problem with the way the click |
| 2181 |
// macro is used. |
| 2182 |
// "INCORRECT_AD_TECHNOLOGY_DECLARATION" - The ad technology declaration is |
| 2183 |
// not accurate. |
| 2184 |
// "INCORRECT_DESTINATION_URL_DECLARATION" - The actual destination URL does |
| 2185 |
// not match the declared destination URL. |
| 2186 |
// "EXPANDABLE_INCORRECT_DIRECTION" - The declared expanding direction does |
| 2187 |
// not match the actual direction. |
| 2188 |
// "EXPANDABLE_DIRECTION_NOT_SUPPORTED" - The ad does not expand in a |
| 2189 |
// supported direction. |
| 2190 |
// "EXPANDABLE_INVALID_VENDOR" - The ad uses an expandable vendor that is not |
| 2191 |
// supported. |
| 2192 |
// "EXPANDABLE_FUNCTIONALITY" - There was an issue with the expandable ad. |
| 2193 |
// "VIDEO_INVALID_VENDOR" - The ad uses a video vendor that is not supported. |
| 2194 |
// "VIDEO_UNSUPPORTED_LENGTH" - The length of the video ad is not supported. |
| 2195 |
// "VIDEO_UNSUPPORTED_FORMAT" - The format of the video ad is not supported. |
| 2196 |
// "VIDEO_FUNCTIONALITY" - There was an issue with the video ad. |
| 2197 |
// "LANDING_PAGE_DISABLED" - The landing page does not conform to Ad Exchange |
| 2198 |
// policy. |
| 2199 |
// "MALWARE_SUSPECTED" - The ad or the landing page may contain malware. |
| 2200 |
// "ADULT_IMAGE_OR_VIDEO" - The ad contains adult images or video content. |
| 2201 |
// "INACCURATE_AD_TEXT" - The ad contains text that is unclear or inaccurate. |
| 2202 |
// "COUNTERFEIT_DESIGNER_GOODS" - The ad promotes counterfeit designer goods. |
| 2203 |
// "POP_UP" - The ad causes a popup window to appear. |
| 2204 |
// "INVALID_RTB_PROTOCOL_USAGE" - The creative does not follow policies set |
| 2205 |
// for the RTB protocol. |
| 2206 |
// "RAW_IP_ADDRESS_IN_SNIPPET" - The ad contains a URL that uses a numeric IP |
| 2207 |
// address for the domain. |
| 2208 |
// "UNACCEPTABLE_CONTENT_SOFTWARE" - The ad or landing page contains |
| 2209 |
// unacceptable content because it initiated a software or executable download. |
| 2210 |
// "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN" - The ad set an unauthorized cookie |
| 2211 |
// on a Google domain. |
| 2212 |
// "UNDECLARED_FLASH_OBJECTS" - Flash content found when no flash was |
| 2213 |
// declared. |
| 2214 |
// "INVALID_SSL_DECLARATION" - SSL support declared but not working |
| 2215 |
// correctly. |
| 2216 |
// "DIRECT_DOWNLOAD_IN_AD" - Rich Media - Direct Download in Ad (ex. PDF |
| 2217 |
// download). |
| 2218 |
// "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED" - Maximum download size exceeded. |
| 2219 |
// "DESTINATION_URL_SITE_NOT_CRAWLABLE" - Bad Destination URL: Site Not |
| 2220 |
// Crawlable. |
| 2221 |
// "BAD_URL_LEGAL_DISAPPROVAL" - Bad URL: Legal disapproval. |
| 2222 |
// "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED" - Pharmaceuticals, Gambling, Alcohol |
| 2223 |
// not allowed and at least one was detected. |
| 2224 |
// "DYNAMIC_DNS_AT_DESTINATION_URL" - Dynamic DNS at Destination URL. |
| 2225 |
// "POOR_IMAGE_OR_VIDEO_QUALITY" - Poor Image / Video Quality. |
| 2226 |
// "UNACCEPTABLE_IMAGE_CONTENT" - For example, Image Trick to Click. |
| 2227 |
// "INCORRECT_IMAGE_LAYOUT" - Incorrect Image Layout. |
| 2228 |
// "IRRELEVANT_IMAGE_OR_VIDEO" - Irrelevant Image / Video. |
| 2229 |
// "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK" - Broken back button. |
| 2230 |
// "MISLEADING_CLAIMS_IN_AD" - Misleading/Inaccurate claims in ads. |
| 2231 |
// "RESTRICTED_PRODUCTS" - Restricted Products. |
| 2232 |
// "UNACCEPTABLE_CONTENT" - Unacceptable content. For example, malware. |
| 2233 |
// "AUTOMATED_AD_CLICKING" - The ad automatically redirects to the |
| 2234 |
// destination site without a click, or reports a click when none were made. |
| 2235 |
// "INVALID_URL_PROTOCOL" - The ad uses URL protocols that do not exist or |
| 2236 |
// are not allowed on AdX. |
| 2237 |
// "UNDECLARED_RESTRICTED_CONTENT" - Restricted content (for example, |
| 2238 |
// alcohol) was found in the ad but not declared. |
| 2239 |
// "INVALID_REMARKETING_LIST_USAGE" - Violation of the remarketing list |
| 2240 |
// policy. |
| 2241 |
// "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT" - The destination site's |
| 2242 |
// robot.txt file prevents it from being crawled. |
| 2243 |
// "CLICK_TO_DOWNLOAD_NOT_AN_APP" - Click to download must link to an app. |
| 2244 |
// "INACCURATE_REVIEW_EXTENSION" - A review extension must be an accurate |
| 2245 |
// review. |
| 2246 |
// "SEXUALLY_EXPLICIT_CONTENT" - Sexually explicit content. |
| 2247 |
// "GAINING_AN_UNFAIR_ADVANTAGE" - The ad tries to gain an unfair traffic |
| 2248 |
// advantage. |
| 2249 |
// "GAMING_THE_GOOGLE_NETWORK" - The ad tries to circumvent Google's |
| 2250 |
// advertising systems. |
| 2251 |
// "DANGEROUS_PRODUCTS_KNIVES" - The ad promotes dangerous knives. |
| 2252 |
// "DANGEROUS_PRODUCTS_EXPLOSIVES" - The ad promotes explosives. |
| 2253 |
// "DANGEROUS_PRODUCTS_GUNS" - The ad promotes guns & parts. |
| 2254 |
// "DANGEROUS_PRODUCTS_DRUGS" - The ad promotes recreational drugs/services & |
| 2255 |
// related equipment. |
| 2256 |
// "DANGEROUS_PRODUCTS_TOBACCO" - The ad promotes tobacco products/services & |
| 2257 |
// related equipment. |
| 2258 |
// "DANGEROUS_PRODUCTS_WEAPONS" - The ad promotes weapons. |
| 2259 |
// "UNCLEAR_OR_IRRELEVANT_AD" - The ad is unclear or irrelevant to the |
| 2260 |
// destination site. |
| 2261 |
// "PROFESSIONAL_STANDARDS" - The ad does not meet professional standards. |
| 2262 |
// "DYSFUNCTIONAL_PROMOTION" - The promotion is unnecessarily difficult to |
| 2263 |
// navigate. |
| 2264 |
// "INVALID_INTEREST_BASED_AD" - Violation of Google's policy for |
| 2265 |
// interest-based ads. |
| 2266 |
// "MISUSE_OF_PERSONAL_INFORMATION" - Misuse of personal information. |
| 2267 |
// "OMISSION_OF_RELEVANT_INFORMATION" - Omission of relevant information. |
| 2268 |
// "UNAVAILABLE_PROMOTIONS" - Unavailable promotions. |
| 2269 |
// "MISLEADING_PROMOTIONS" - Misleading or unrealistic promotions. |
| 2270 |
// "INAPPROPRIATE_CONTENT" - Offensive or inappropriate content. |
| 2271 |
// "SENSITIVE_EVENTS" - Capitalizing on sensitive events. |
| 2272 |
// "SHOCKING_CONTENT" - Shocking content. |
| 2273 |
// "ENABLING_DISHONEST_BEHAVIOR" - Products & Services that enable dishonest |
| 2274 |
// behavior. |
| 2275 |
// "TECHNICAL_REQUIREMENTS" - The ad does not meet technical requirements. |
| 2276 |
// "RESTRICTED_POLITICAL_CONTENT" - Restricted political content. |
| 2277 |
// "UNSUPPORTED_CONTENT" - Unsupported content. |
| 2278 |
// "INVALID_BIDDING_METHOD" - Invalid bidding method. |
| 2279 |
// "VIDEO_TOO_LONG" - Video length exceeds limits. |
| 2280 |
// "VIOLATES_JAPANESE_PHARMACY_LAW" - Unacceptable content: Japanese |
| 2281 |
// healthcare. |
| 2282 |
// "UNACCREDITED_PET_PHARMACY" - Online pharmacy ID required. |
| 2283 |
// "ABORTION" - Unacceptable content: Abortion. |
| 2284 |
// "CONTRACEPTIVES" - Unacceptable content: Birth control. |
| 2285 |
// "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA" - Restricted in China. |
| 2286 |
// "KCDSP_REGISTRATION" - Unacceptable content: Korean healthcare. |
| 2287 |
// "NOT_FAMILY_SAFE" - Non-family safe or adult content. |
| 2288 |
// "CLINICAL_TRIAL_RECRUITMENT" - Clinical trial recruitment. |
| 2289 |
// "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED" - Maximum number of HTTP calls |
| 2290 |
// exceeded. |
| 2291 |
// "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED" - Maximum number of cookies exceeded. |
| 2292 |
// "PERSONAL_LOANS" - Financial service ad does not adhere to specifications. |
| 2293 |
// "UNSUPPORTED_FLASH_CONTENT" - Flash content was found in an unsupported |
| 2294 |
// context. |
| 2295 |
// "MISUSE_BY_OMID_SCRIPT" - Misuse by an Open Measurement SDK script. |
| 2296 |
// "NON_WHITELISTED_OMID_VENDOR" - Use of an Open Measurement SDK vendor not |
| 2297 |
// on approved vendor list. |
| 2298 |
// "DESTINATION_EXPERIENCE" - Unacceptable landing page. |
| 2299 |
// "UNSUPPORTED_LANGUAGE" - Unsupported language. |
| 2300 |
// "NON_SSL_COMPLIANT" - Non-SSL compliant. |
| 2301 |
// "TEMPORARY_PAUSE" - Temporary pausing of creative. |
| 2302 |
// "BAIL_BONDS" - Promotes services related to bail bonds. |
| 2303 |
// "EXPERIMENTAL_MEDICAL_TREATMENT" - Promotes speculative and/or |
| 2304 |
// experimental medical treatments. |
| 2305 |
Reason string `json:"reason,omitempty"` |
| 2306 |
// ForceSendFields is a list of field names (e.g. "Details") to unconditionally |
| 2307 |
// include in API requests. By default, fields with empty or default values are |
| 2308 |
// omitted from API requests. See |
| 2309 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2310 |
// details. |
| 2311 |
ForceSendFields []string `json:"-"` |
| 2312 |
// NullFields is a list of field names (e.g. "Details") to include in API |
| 2313 |
// requests with the JSON null value. By default, fields with empty values are |
| 2314 |
// omitted from API requests. See |
| 2315 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2316 |
NullFields []string `json:"-"` |
| 2317 |
} |
| 2318 |
|
| 2319 |
func (s Disapproval) MarshalJSON() ([]byte, error) { |
| 2320 |
type NoMethod Disapproval |
| 2321 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2322 |
} |
| 2323 |
|
| 2324 |
// Empty: A generic empty message that you can re-use to avoid defining |
| 2325 |
// duplicated empty messages in your APIs. A typical example is to use it as |
| 2326 |
// the request or the response type of an API method. For instance: service Foo |
| 2327 |
// { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
| 2328 |
type Empty struct { |
| 2329 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2330 |
googleapi.ServerResponse `json:"-"` |
| 2331 |
} |
| 2332 |
|
| 2333 |
// FilterSet: A set of filters that is applied to a request for data. Within a |
| 2334 |
// filter set, an AND operation is performed across the filters represented by |
| 2335 |
// each field. An OR operation is performed across the filters represented by |
| 2336 |
// the multiple values of a repeated field, for example, "format=VIDEO AND |
| 2337 |
// deal_id=12 AND (seller_network_id=34 OR seller_network_id=56)". |
| 2338 |
type FilterSet struct { |
| 2339 |
// AbsoluteDateRange: An absolute date range, defined by a start date and an |
| 2340 |
// end date. Interpreted relative to Pacific time zone. |
| 2341 |
AbsoluteDateRange *AbsoluteDateRange `json:"absoluteDateRange,omitempty"` |
| 2342 |
// BreakdownDimensions: The set of dimensions along which to break down the |
| 2343 |
// response; may be empty. If multiple dimensions are requested, the breakdown |
| 2344 |
// is along the Cartesian product of the requested dimensions. |
| 2345 |
// |
| 2346 |
// Possible values: |
| 2347 |
// "BREAKDOWN_DIMENSION_UNSPECIFIED" - A placeholder for an unspecified |
| 2348 |
// dimension; should not be used. |
| 2349 |
// "PUBLISHER_IDENTIFIER" - The response should be broken down by publisher |
| 2350 |
// identifier. This option is available only for Open Bidding buyers. |
| 2351 |
BreakdownDimensions []string `json:"breakdownDimensions,omitempty"` |
| 2352 |
// CreativeId: The ID of the creative on which to filter; optional. This field |
| 2353 |
// may be set only for a filter set that accesses account-level troubleshooting |
| 2354 |
// data, for example, one whose name matches the |
| 2355 |
// `bidders/*/accounts/*/filterSets/*` pattern. |
| 2356 |
CreativeId string `json:"creativeId,omitempty"` |
| 2357 |
// DealId: The ID of the deal on which to filter; optional. This field may be |
| 2358 |
// set only for a filter set that accesses account-level troubleshooting data, |
| 2359 |
// for example, one whose name matches the `bidders/*/accounts/*/filterSets/*` |
| 2360 |
// pattern. |
| 2361 |
DealId int64 `json:"dealId,omitempty,string"` |
| 2362 |
// Environment: The environment on which to filter; optional. |
| 2363 |
// |
| 2364 |
// Possible values: |
| 2365 |
// "ENVIRONMENT_UNSPECIFIED" - A placeholder for an undefined environment; |
| 2366 |
// indicates that no environment filter will be applied. |
| 2367 |
// "WEB" - The ad impression appears on the web. |
| 2368 |
// "APP" - The ad impression appears in an app. |
| 2369 |
Environment string `json:"environment,omitempty"` |
| 2370 |
// Format: Creative format bidded on or allowed to bid on, can be empty. |
| 2371 |
// |
| 2372 |
// Possible values: |
| 2373 |
// "FORMAT_UNSPECIFIED" - A placeholder for an undefined format; indicates |
| 2374 |
// that no format filter will be applied. |
| 2375 |
// "NATIVE_DISPLAY" - The ad impression is a native ad, and display (for |
| 2376 |
// example, image) format. |
| 2377 |
// "NATIVE_VIDEO" - The ad impression is a native ad, and video format. |
| 2378 |
// "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and display |
| 2379 |
// (for example, image) format. |
| 2380 |
// "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and video |
| 2381 |
// format. |
| 2382 |
Format string `json:"format,omitempty"` |
| 2383 |
// Formats: Creative formats bidded on or allowed to bid on, can be empty. |
| 2384 |
// Although this field is a list, it can only be populated with a single item. |
| 2385 |
// A HTTP 400 bad request error will be returned in the response if you specify |
| 2386 |
// multiple items. |
| 2387 |
// |
| 2388 |
// Possible values: |
| 2389 |
// "FORMAT_UNSPECIFIED" - A placeholder for an undefined format; indicates |
| 2390 |
// that no format filter will be applied. |
| 2391 |
// "NATIVE_DISPLAY" - The ad impression is a native ad, and display (for |
| 2392 |
// example, image) format. |
| 2393 |
// "NATIVE_VIDEO" - The ad impression is a native ad, and video format. |
| 2394 |
// "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and display |
| 2395 |
// (for example, image) format. |
| 2396 |
// "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and video |
| 2397 |
// format. |
| 2398 |
Formats []string `json:"formats,omitempty"` |
| 2399 |
// Name: A user-defined name of the filter set. Filter set names must be unique |
| 2400 |
// globally and match one of the patterns: - `bidders/*/filterSets/*` (for |
| 2401 |
// accessing bidder-level troubleshooting data) - |
| 2402 |
// `bidders/*/accounts/*/filterSets/*` (for accessing account-level |
| 2403 |
// troubleshooting data) This field is required in create operations. |
| 2404 |
Name string `json:"name,omitempty"` |
| 2405 |
// Platforms: The list of platforms on which to filter; may be empty. The |
| 2406 |
// filters represented by multiple platforms are ORed together (for example, if |
| 2407 |
// non-empty, results must match any one of the platforms). |
| 2408 |
// |
| 2409 |
// Possible values: |
| 2410 |
// "PLATFORM_UNSPECIFIED" - A placeholder for an undefined platform; |
| 2411 |
// indicates that no platform filter will be applied. |
| 2412 |
// "DESKTOP" - The ad impression appears on a desktop. |
| 2413 |
// "TABLET" - The ad impression appears on a tablet. |
| 2414 |
// "MOBILE" - The ad impression appears on a mobile device. |
| 2415 |
Platforms []string `json:"platforms,omitempty"` |
| 2416 |
// PublisherIdentifiers: For Open Bidding partners only. The list of publisher |
| 2417 |
// identifiers on which to filter; may be empty. The filters represented by |
| 2418 |
// multiple publisher identifiers are ORed together. |
| 2419 |
PublisherIdentifiers []string `json:"publisherIdentifiers,omitempty"` |
| 2420 |
// RealtimeTimeRange: An open-ended realtime time range, defined by the |
| 2421 |
// aggregation start timestamp. |
| 2422 |
RealtimeTimeRange *RealtimeTimeRange `json:"realtimeTimeRange,omitempty"` |
| 2423 |
// RelativeDateRange: A relative date range, defined by an offset from today |
| 2424 |
// and a duration. Interpreted relative to Pacific time zone. |
| 2425 |
RelativeDateRange *RelativeDateRange `json:"relativeDateRange,omitempty"` |
| 2426 |
// SellerNetworkIds: For Authorized Buyers only. The list of IDs of the seller |
| 2427 |
// (publisher) networks on which to filter; may be empty. The filters |
| 2428 |
// represented by multiple seller network IDs are ORed together (for example, |
| 2429 |
// if non-empty, results must match any one of the publisher networks). See |
| 2430 |
// seller-network-ids |
| 2431 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/seller-network-ids) |
| 2432 |
// file for the set of existing seller network IDs. |
| 2433 |
SellerNetworkIds []int64 `json:"sellerNetworkIds,omitempty"` |
| 2434 |
// TimeSeriesGranularity: The granularity of time intervals if a time series |
| 2435 |
// breakdown is preferred; optional. |
| 2436 |
// |
| 2437 |
// Possible values: |
| 2438 |
// "TIME_SERIES_GRANULARITY_UNSPECIFIED" - A placeholder for an unspecified |
| 2439 |
// interval; no time series is applied. All rows in response will contain data |
| 2440 |
// for the entire requested time range. |
| 2441 |
// "HOURLY" - Indicates that data will be broken down by the hour. |
| 2442 |
// "DAILY" - Indicates that data will be broken down by the day. |
| 2443 |
TimeSeriesGranularity string `json:"timeSeriesGranularity,omitempty"` |
| 2444 |
|
| 2445 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2446 |
googleapi.ServerResponse `json:"-"` |
| 2447 |
// ForceSendFields is a list of field names (e.g. "AbsoluteDateRange") to |
| 2448 |
// unconditionally include in API requests. By default, fields with empty or |
| 2449 |
// default values are omitted from API requests. See |
| 2450 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2451 |
// details. |
| 2452 |
ForceSendFields []string `json:"-"` |
| 2453 |
// NullFields is a list of field names (e.g. "AbsoluteDateRange") to include in |
| 2454 |
// API requests with the JSON null value. By default, fields with empty values |
| 2455 |
// are omitted from API requests. See |
| 2456 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2457 |
NullFields []string `json:"-"` |
| 2458 |
} |
| 2459 |
|
| 2460 |
func (s FilterSet) MarshalJSON() ([]byte, error) { |
| 2461 |
type NoMethod FilterSet |
| 2462 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2463 |
} |
| 2464 |
|
| 2465 |
// FilteredBidCreativeRow: The number of filtered bids with the specified |
| 2466 |
// dimension values that have the specified creative. |
| 2467 |
type FilteredBidCreativeRow struct { |
| 2468 |
// BidCount: The number of bids with the specified creative. |
| 2469 |
BidCount *MetricValue `json:"bidCount,omitempty"` |
| 2470 |
// CreativeId: The ID of the creative. |
| 2471 |
CreativeId string `json:"creativeId,omitempty"` |
| 2472 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 2473 |
// this row. |
| 2474 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 2475 |
// ForceSendFields is a list of field names (e.g. "BidCount") to |
| 2476 |
// unconditionally include in API requests. By default, fields with empty or |
| 2477 |
// default values are omitted from API requests. See |
| 2478 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2479 |
// details. |
| 2480 |
ForceSendFields []string `json:"-"` |
| 2481 |
// NullFields is a list of field names (e.g. "BidCount") to include in API |
| 2482 |
// requests with the JSON null value. By default, fields with empty values are |
| 2483 |
// omitted from API requests. See |
| 2484 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2485 |
NullFields []string `json:"-"` |
| 2486 |
} |
| 2487 |
|
| 2488 |
func (s FilteredBidCreativeRow) MarshalJSON() ([]byte, error) { |
| 2489 |
type NoMethod FilteredBidCreativeRow |
| 2490 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2491 |
} |
| 2492 |
|
| 2493 |
// FilteredBidDetailRow: The number of filtered bids with the specified |
| 2494 |
// dimension values, among those filtered due to the requested filtering reason |
| 2495 |
// (for example, creative status), that have the specified detail. |
| 2496 |
type FilteredBidDetailRow struct { |
| 2497 |
// BidCount: The number of bids with the specified detail. |
| 2498 |
BidCount *MetricValue `json:"bidCount,omitempty"` |
| 2499 |
// Detail: The ID of the detail, can be numeric or text. The associated value |
| 2500 |
// can be looked up in the dictionary file corresponding to the DetailType in |
| 2501 |
// the response message. |
| 2502 |
Detail string `json:"detail,omitempty"` |
| 2503 |
// DetailId: Note: this field will be deprecated, use "detail" field instead. |
| 2504 |
// When "detail" field represents an integer value, this field is populated as |
| 2505 |
// the same integer value "detail" field represents, otherwise this field will |
| 2506 |
// be 0. The ID of the detail. The associated value can be looked up in the |
| 2507 |
// dictionary file corresponding to the DetailType in the response message. |
| 2508 |
DetailId int64 `json:"detailId,omitempty"` |
| 2509 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 2510 |
// this row. |
| 2511 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 2512 |
// ForceSendFields is a list of field names (e.g. "BidCount") to |
| 2513 |
// unconditionally include in API requests. By default, fields with empty or |
| 2514 |
// default values are omitted from API requests. See |
| 2515 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2516 |
// details. |
| 2517 |
ForceSendFields []string `json:"-"` |
| 2518 |
// NullFields is a list of field names (e.g. "BidCount") to include in API |
| 2519 |
// requests with the JSON null value. By default, fields with empty values are |
| 2520 |
// omitted from API requests. See |
| 2521 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2522 |
NullFields []string `json:"-"` |
| 2523 |
} |
| 2524 |
|
| 2525 |
func (s FilteredBidDetailRow) MarshalJSON() ([]byte, error) { |
| 2526 |
type NoMethod FilteredBidDetailRow |
| 2527 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2528 |
} |
| 2529 |
|
| 2530 |
// FirstPartyMobileApplicationTargeting: Represents a list of targeted and |
| 2531 |
// excluded mobile application IDs that publishers own. Mobile application IDs |
| 2532 |
// are from App Store and Google Play Store. Android App ID, for example, |
| 2533 |
// com.google.android.apps.maps, can be found in Google Play Store URL. iOS App |
| 2534 |
// ID (which is a number) can be found at the end of iTunes store URL. First |
| 2535 |
// party mobile applications is either included or excluded. |
| 2536 |
type FirstPartyMobileApplicationTargeting struct { |
| 2537 |
// ExcludedAppIds: A list of application IDs to be excluded. |
| 2538 |
ExcludedAppIds []string `json:"excludedAppIds,omitempty"` |
| 2539 |
// TargetedAppIds: A list of application IDs to be included. |
| 2540 |
TargetedAppIds []string `json:"targetedAppIds,omitempty"` |
| 2541 |
// ForceSendFields is a list of field names (e.g. "ExcludedAppIds") to |
| 2542 |
// unconditionally include in API requests. By default, fields with empty or |
| 2543 |
// default values are omitted from API requests. See |
| 2544 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2545 |
// details. |
| 2546 |
ForceSendFields []string `json:"-"` |
| 2547 |
// NullFields is a list of field names (e.g. "ExcludedAppIds") to include in |
| 2548 |
// API requests with the JSON null value. By default, fields with empty values |
| 2549 |
// are omitted from API requests. See |
| 2550 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2551 |
NullFields []string `json:"-"` |
| 2552 |
} |
| 2553 |
|
| 2554 |
func (s FirstPartyMobileApplicationTargeting) MarshalJSON() ([]byte, error) { |
| 2555 |
type NoMethod FirstPartyMobileApplicationTargeting |
| 2556 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2557 |
} |
| 2558 |
|
| 2559 |
// FrequencyCap: Frequency cap. |
| 2560 |
type FrequencyCap struct { |
| 2561 |
// MaxImpressions: The maximum number of impressions that can be served to a |
| 2562 |
// user within the specified time period. |
| 2563 |
MaxImpressions int64 `json:"maxImpressions,omitempty"` |
| 2564 |
// NumTimeUnits: The amount of time, in the units specified by time_unit_type. |
| 2565 |
// Defines the amount of time over which impressions per user are counted and |
| 2566 |
// capped. |
| 2567 |
NumTimeUnits int64 `json:"numTimeUnits,omitempty"` |
| 2568 |
// TimeUnitType: The time unit. Along with num_time_units defines the amount of |
| 2569 |
// time over which impressions per user are counted and capped. |
| 2570 |
// |
| 2571 |
// Possible values: |
| 2572 |
// "TIME_UNIT_TYPE_UNSPECIFIED" - A placeholder for an undefined time unit |
| 2573 |
// type. This just indicates the variable with this value hasn't been |
| 2574 |
// initialized. |
| 2575 |
// "MINUTE" - Minute |
| 2576 |
// "HOUR" - Hour |
| 2577 |
// "DAY" - Day |
| 2578 |
// "WEEK" - Week |
| 2579 |
// "MONTH" - Month |
| 2580 |
// "LIFETIME" - Lifetime |
| 2581 |
// "POD" - Pod |
| 2582 |
// "STREAM" - Stream |
| 2583 |
TimeUnitType string `json:"timeUnitType,omitempty"` |
| 2584 |
// ForceSendFields is a list of field names (e.g. "MaxImpressions") to |
| 2585 |
// unconditionally include in API requests. By default, fields with empty or |
| 2586 |
// default values are omitted from API requests. See |
| 2587 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2588 |
// details. |
| 2589 |
ForceSendFields []string `json:"-"` |
| 2590 |
// NullFields is a list of field names (e.g. "MaxImpressions") to include in |
| 2591 |
// API requests with the JSON null value. By default, fields with empty values |
| 2592 |
// are omitted from API requests. See |
| 2593 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2594 |
NullFields []string `json:"-"` |
| 2595 |
} |
| 2596 |
|
| 2597 |
func (s FrequencyCap) MarshalJSON() ([]byte, error) { |
| 2598 |
type NoMethod FrequencyCap |
| 2599 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2600 |
} |
| 2601 |
|
| 2602 |
// GuaranteedFixedPriceTerms: Terms for Programmatic Guaranteed Deals. |
| 2603 |
type GuaranteedFixedPriceTerms struct { |
| 2604 |
// FixedPrices: Fixed price for the specified buyer. |
| 2605 |
FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"` |
| 2606 |
// GuaranteedImpressions: Guaranteed impressions as a percentage. This is the |
| 2607 |
// percentage of guaranteed looks that the buyer is guaranteeing to buy. |
| 2608 |
GuaranteedImpressions int64 `json:"guaranteedImpressions,omitempty,string"` |
| 2609 |
// GuaranteedLooks: Count of guaranteed looks. Required for deal, optional for |
| 2610 |
// product. For CPD deals, buyer changes to guaranteed_looks will be ignored. |
| 2611 |
GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"` |
| 2612 |
// ImpressionCap: The lifetime impression cap for CPM sponsorship deals. The |
| 2613 |
// deal will stop serving when the cap is reached. |
| 2614 |
ImpressionCap int64 `json:"impressionCap,omitempty,string"` |
| 2615 |
// MinimumDailyLooks: Daily minimum looks for CPD deal types. For CPD deals, |
| 2616 |
// buyer should negotiate on this field instead of guaranteed_looks. |
| 2617 |
MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"` |
| 2618 |
// PercentShareOfVoice: For sponsorship deals, this is the percentage of the |
| 2619 |
// seller's eligible impressions that the deal will serve until the cap is |
| 2620 |
// reached. |
| 2621 |
PercentShareOfVoice int64 `json:"percentShareOfVoice,omitempty,string"` |
| 2622 |
// ReservationType: The reservation type for a Programmatic Guaranteed deal. |
| 2623 |
// This indicates whether the number of impressions is fixed, or a percent of |
| 2624 |
// available impressions. If not specified, the default reservation type is |
| 2625 |
// STANDARD. |
| 2626 |
// |
| 2627 |
// Possible values: |
| 2628 |
// "RESERVATION_TYPE_UNSPECIFIED" - An unspecified reservation type. |
| 2629 |
// "STANDARD" - Non-sponsorship deal. |
| 2630 |
// "SPONSORSHIP" - Sponsorship deals don't have impression goal |
| 2631 |
// (guaranteed_looks) and they are served based on the flight dates. For CPM |
| 2632 |
// Sponsorship deals, impression_cap is the lifetime impression limit. |
| 2633 |
ReservationType string `json:"reservationType,omitempty"` |
| 2634 |
// ForceSendFields is a list of field names (e.g. "FixedPrices") to |
| 2635 |
// unconditionally include in API requests. By default, fields with empty or |
| 2636 |
// default values are omitted from API requests. See |
| 2637 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2638 |
// details. |
| 2639 |
ForceSendFields []string `json:"-"` |
| 2640 |
// NullFields is a list of field names (e.g. "FixedPrices") to include in API |
| 2641 |
// requests with the JSON null value. By default, fields with empty values are |
| 2642 |
// omitted from API requests. See |
| 2643 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2644 |
NullFields []string `json:"-"` |
| 2645 |
} |
| 2646 |
|
| 2647 |
func (s GuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) { |
| 2648 |
type NoMethod GuaranteedFixedPriceTerms |
| 2649 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2650 |
} |
| 2651 |
|
| 2652 |
// HtmlContent: HTML content for a creative. |
| 2653 |
type HtmlContent struct { |
| 2654 |
// Height: The height of the HTML snippet in pixels. |
| 2655 |
Height int64 `json:"height,omitempty"` |
| 2656 |
// Snippet: The HTML snippet that displays the ad when inserted in the web |
| 2657 |
// page. |
| 2658 |
Snippet string `json:"snippet,omitempty"` |
| 2659 |
// Width: The width of the HTML snippet in pixels. |
| 2660 |
Width int64 `json:"width,omitempty"` |
| 2661 |
// ForceSendFields is a list of field names (e.g. "Height") to unconditionally |
| 2662 |
// include in API requests. By default, fields with empty or default values are |
| 2663 |
// omitted from API requests. See |
| 2664 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2665 |
// details. |
| 2666 |
ForceSendFields []string `json:"-"` |
| 2667 |
// NullFields is a list of field names (e.g. "Height") to include in API |
| 2668 |
// requests with the JSON null value. By default, fields with empty values are |
| 2669 |
// omitted from API requests. See |
| 2670 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2671 |
NullFields []string `json:"-"` |
| 2672 |
} |
| 2673 |
|
| 2674 |
func (s HtmlContent) MarshalJSON() ([]byte, error) { |
| 2675 |
type NoMethod HtmlContent |
| 2676 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2677 |
} |
| 2678 |
|
| 2679 |
// Image: An image resource. You may provide a larger image than was requested, |
| 2680 |
// so long as the aspect ratio is preserved. |
| 2681 |
type Image struct { |
| 2682 |
// Height: Image height in pixels. |
| 2683 |
Height int64 `json:"height,omitempty"` |
| 2684 |
// Url: The URL of the image. |
| 2685 |
Url string `json:"url,omitempty"` |
| 2686 |
// Width: Image width in pixels. |
| 2687 |
Width int64 `json:"width,omitempty"` |
| 2688 |
// ForceSendFields is a list of field names (e.g. "Height") to unconditionally |
| 2689 |
// include in API requests. By default, fields with empty or default values are |
| 2690 |
// omitted from API requests. See |
| 2691 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2692 |
// details. |
| 2693 |
ForceSendFields []string `json:"-"` |
| 2694 |
// NullFields is a list of field names (e.g. "Height") to include in API |
| 2695 |
// requests with the JSON null value. By default, fields with empty values are |
| 2696 |
// omitted from API requests. See |
| 2697 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2698 |
NullFields []string `json:"-"` |
| 2699 |
} |
| 2700 |
|
| 2701 |
func (s Image) MarshalJSON() ([]byte, error) { |
| 2702 |
type NoMethod Image |
| 2703 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2704 |
} |
| 2705 |
|
| 2706 |
// ImpressionMetricsRow: The set of metrics that are measured in numbers of |
| 2707 |
// impressions, representing how many impressions with the specified dimension |
| 2708 |
// values were considered eligible at each stage of the bidding funnel. |
| 2709 |
type ImpressionMetricsRow struct { |
| 2710 |
// AvailableImpressions: The number of impressions available to the buyer on Ad |
| 2711 |
// Exchange. In some cases this value may be unavailable. |
| 2712 |
AvailableImpressions *MetricValue `json:"availableImpressions,omitempty"` |
| 2713 |
// BidRequests: The number of impressions for which Ad Exchange sent the buyer |
| 2714 |
// a bid request. |
| 2715 |
BidRequests *MetricValue `json:"bidRequests,omitempty"` |
| 2716 |
// InventoryMatches: The number of impressions that match the buyer's inventory |
| 2717 |
// pretargeting. |
| 2718 |
InventoryMatches *MetricValue `json:"inventoryMatches,omitempty"` |
| 2719 |
// ResponsesWithBids: The number of impressions for which Ad Exchange received |
| 2720 |
// a response from the buyer that contained at least one applicable bid. |
| 2721 |
ResponsesWithBids *MetricValue `json:"responsesWithBids,omitempty"` |
| 2722 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 2723 |
// this row. |
| 2724 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 2725 |
// SuccessfulResponses: The number of impressions for which the buyer |
| 2726 |
// successfully sent a response to Ad Exchange. |
| 2727 |
SuccessfulResponses *MetricValue `json:"successfulResponses,omitempty"` |
| 2728 |
// ForceSendFields is a list of field names (e.g. "AvailableImpressions") to |
| 2729 |
// unconditionally include in API requests. By default, fields with empty or |
| 2730 |
// default values are omitted from API requests. See |
| 2731 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2732 |
// details. |
| 2733 |
ForceSendFields []string `json:"-"` |
| 2734 |
// NullFields is a list of field names (e.g. "AvailableImpressions") to include |
| 2735 |
// in API requests with the JSON null value. By default, fields with empty |
| 2736 |
// values are omitted from API requests. See |
| 2737 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2738 |
NullFields []string `json:"-"` |
| 2739 |
} |
| 2740 |
|
| 2741 |
func (s ImpressionMetricsRow) MarshalJSON() ([]byte, error) { |
| 2742 |
type NoMethod ImpressionMetricsRow |
| 2743 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2744 |
} |
| 2745 |
|
| 2746 |
// InventorySizeTargeting: Represents the size of an ad unit that can be |
| 2747 |
// targeted on an ad request. It only applies to Private Auction, AdX Preferred |
| 2748 |
// Deals and Auction Packages. This targeting does not apply to Programmatic |
| 2749 |
// Guaranteed and Preferred Deals in Ad Manager. |
| 2750 |
type InventorySizeTargeting struct { |
| 2751 |
// ExcludedInventorySizes: A list of inventory sizes to be excluded. |
| 2752 |
ExcludedInventorySizes []*AdSize `json:"excludedInventorySizes,omitempty"` |
| 2753 |
// TargetedInventorySizes: A list of inventory sizes to be included. |
| 2754 |
TargetedInventorySizes []*AdSize `json:"targetedInventorySizes,omitempty"` |
| 2755 |
// ForceSendFields is a list of field names (e.g. "ExcludedInventorySizes") to |
| 2756 |
// unconditionally include in API requests. By default, fields with empty or |
| 2757 |
// default values are omitted from API requests. See |
| 2758 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2759 |
// details. |
| 2760 |
ForceSendFields []string `json:"-"` |
| 2761 |
// NullFields is a list of field names (e.g. "ExcludedInventorySizes") to |
| 2762 |
// include in API requests with the JSON null value. By default, fields with |
| 2763 |
// empty values are omitted from API requests. See |
| 2764 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2765 |
NullFields []string `json:"-"` |
| 2766 |
} |
| 2767 |
|
| 2768 |
func (s InventorySizeTargeting) MarshalJSON() ([]byte, error) { |
| 2769 |
type NoMethod InventorySizeTargeting |
| 2770 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2771 |
} |
| 2772 |
|
| 2773 |
// ListBidMetricsResponse: Response message for listing the metrics that are |
| 2774 |
// measured in number of bids. |
| 2775 |
type ListBidMetricsResponse struct { |
| 2776 |
// BidMetricsRows: List of rows, each containing a set of bid metrics. |
| 2777 |
BidMetricsRows []*BidMetricsRow `json:"bidMetricsRows,omitempty"` |
| 2778 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2779 |
// in the ListBidMetricsRequest.pageToken field in the subsequent call to the |
| 2780 |
// bidMetrics.list method to retrieve the next page of results. |
| 2781 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2782 |
|
| 2783 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2784 |
googleapi.ServerResponse `json:"-"` |
| 2785 |
// ForceSendFields is a list of field names (e.g. "BidMetricsRows") to |
| 2786 |
// unconditionally include in API requests. By default, fields with empty or |
| 2787 |
// default values are omitted from API requests. See |
| 2788 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2789 |
// details. |
| 2790 |
ForceSendFields []string `json:"-"` |
| 2791 |
// NullFields is a list of field names (e.g. "BidMetricsRows") to include in |
| 2792 |
// API requests with the JSON null value. By default, fields with empty values |
| 2793 |
// are omitted from API requests. See |
| 2794 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2795 |
NullFields []string `json:"-"` |
| 2796 |
} |
| 2797 |
|
| 2798 |
func (s ListBidMetricsResponse) MarshalJSON() ([]byte, error) { |
| 2799 |
type NoMethod ListBidMetricsResponse |
| 2800 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2801 |
} |
| 2802 |
|
| 2803 |
// ListBidResponseErrorsResponse: Response message for listing all reasons that |
| 2804 |
// bid responses resulted in an error. |
| 2805 |
type ListBidResponseErrorsResponse struct { |
| 2806 |
// CalloutStatusRows: List of rows, with counts of bid responses aggregated by |
| 2807 |
// callout status. |
| 2808 |
CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"` |
| 2809 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2810 |
// in the ListBidResponseErrorsRequest.pageToken field in the subsequent call |
| 2811 |
// to the bidResponseErrors.list method to retrieve the next page of results. |
| 2812 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2813 |
|
| 2814 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2815 |
googleapi.ServerResponse `json:"-"` |
| 2816 |
// ForceSendFields is a list of field names (e.g. "CalloutStatusRows") to |
| 2817 |
// unconditionally include in API requests. By default, fields with empty or |
| 2818 |
// default values are omitted from API requests. See |
| 2819 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2820 |
// details. |
| 2821 |
ForceSendFields []string `json:"-"` |
| 2822 |
// NullFields is a list of field names (e.g. "CalloutStatusRows") to include in |
| 2823 |
// API requests with the JSON null value. By default, fields with empty values |
| 2824 |
// are omitted from API requests. See |
| 2825 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2826 |
NullFields []string `json:"-"` |
| 2827 |
} |
| 2828 |
|
| 2829 |
func (s ListBidResponseErrorsResponse) MarshalJSON() ([]byte, error) { |
| 2830 |
type NoMethod ListBidResponseErrorsResponse |
| 2831 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2832 |
} |
| 2833 |
|
| 2834 |
// ListBidResponsesWithoutBidsResponse: Response message for listing all |
| 2835 |
// reasons that bid responses were considered to have no applicable bids. |
| 2836 |
type ListBidResponsesWithoutBidsResponse struct { |
| 2837 |
// BidResponseWithoutBidsStatusRows: List of rows, with counts of bid responses |
| 2838 |
// without bids aggregated by status. |
| 2839 |
BidResponseWithoutBidsStatusRows []*BidResponseWithoutBidsStatusRow `json:"bidResponseWithoutBidsStatusRows,omitempty"` |
| 2840 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2841 |
// in the ListBidResponsesWithoutBidsRequest.pageToken field in the subsequent |
| 2842 |
// call to the bidResponsesWithoutBids.list method to retrieve the next page of |
| 2843 |
// results. |
| 2844 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2845 |
|
| 2846 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2847 |
googleapi.ServerResponse `json:"-"` |
| 2848 |
// ForceSendFields is a list of field names (e.g. |
| 2849 |
// "BidResponseWithoutBidsStatusRows") to unconditionally include in API |
| 2850 |
// requests. By default, fields with empty or default values are omitted from |
| 2851 |
// API requests. See |
| 2852 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2853 |
// details. |
| 2854 |
ForceSendFields []string `json:"-"` |
| 2855 |
// NullFields is a list of field names (e.g. |
| 2856 |
// "BidResponseWithoutBidsStatusRows") to include in API requests with the JSON |
| 2857 |
// null value. By default, fields with empty values are omitted from API |
| 2858 |
// requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for |
| 2859 |
// more details. |
| 2860 |
NullFields []string `json:"-"` |
| 2861 |
} |
| 2862 |
|
| 2863 |
func (s ListBidResponsesWithoutBidsResponse) MarshalJSON() ([]byte, error) { |
| 2864 |
type NoMethod ListBidResponsesWithoutBidsResponse |
| 2865 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2866 |
} |
| 2867 |
|
| 2868 |
type ListClientUserInvitationsResponse struct { |
| 2869 |
// Invitations: The returned list of client users. |
| 2870 |
Invitations []*ClientUserInvitation `json:"invitations,omitempty"` |
| 2871 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2872 |
// in the ListClientUserInvitationsRequest.pageToken field in the subsequent |
| 2873 |
// call to the clients.invitations.list method to retrieve the next page of |
| 2874 |
// results. |
| 2875 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2876 |
|
| 2877 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2878 |
googleapi.ServerResponse `json:"-"` |
| 2879 |
// ForceSendFields is a list of field names (e.g. "Invitations") to |
| 2880 |
// unconditionally include in API requests. By default, fields with empty or |
| 2881 |
// default values are omitted from API requests. See |
| 2882 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2883 |
// details. |
| 2884 |
ForceSendFields []string `json:"-"` |
| 2885 |
// NullFields is a list of field names (e.g. "Invitations") to include in API |
| 2886 |
// requests with the JSON null value. By default, fields with empty values are |
| 2887 |
// omitted from API requests. See |
| 2888 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2889 |
NullFields []string `json:"-"` |
| 2890 |
} |
| 2891 |
|
| 2892 |
func (s ListClientUserInvitationsResponse) MarshalJSON() ([]byte, error) { |
| 2893 |
type NoMethod ListClientUserInvitationsResponse |
| 2894 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2895 |
} |
| 2896 |
|
| 2897 |
type ListClientUsersResponse struct { |
| 2898 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2899 |
// in the ListClientUsersRequest.pageToken field in the subsequent call to the |
| 2900 |
// clients.invitations.list method to retrieve the next page of results. |
| 2901 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2902 |
// Users: The returned list of client users. |
| 2903 |
Users []*ClientUser `json:"users,omitempty"` |
| 2904 |
|
| 2905 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2906 |
googleapi.ServerResponse `json:"-"` |
| 2907 |
// ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| 2908 |
// unconditionally include in API requests. By default, fields with empty or |
| 2909 |
// default values are omitted from API requests. See |
| 2910 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2911 |
// details. |
| 2912 |
ForceSendFields []string `json:"-"` |
| 2913 |
// NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| 2914 |
// requests with the JSON null value. By default, fields with empty values are |
| 2915 |
// omitted from API requests. See |
| 2916 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2917 |
NullFields []string `json:"-"` |
| 2918 |
} |
| 2919 |
|
| 2920 |
func (s ListClientUsersResponse) MarshalJSON() ([]byte, error) { |
| 2921 |
type NoMethod ListClientUsersResponse |
| 2922 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2923 |
} |
| 2924 |
|
| 2925 |
type ListClientsResponse struct { |
| 2926 |
// Clients: The returned list of clients. |
| 2927 |
Clients []*Client `json:"clients,omitempty"` |
| 2928 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2929 |
// in the ListClientsRequest.pageToken field in the subsequent call to the |
| 2930 |
// accounts.clients.list method to retrieve the next page of results. |
| 2931 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2932 |
|
| 2933 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2934 |
googleapi.ServerResponse `json:"-"` |
| 2935 |
// ForceSendFields is a list of field names (e.g. "Clients") to unconditionally |
| 2936 |
// include in API requests. By default, fields with empty or default values are |
| 2937 |
// omitted from API requests. See |
| 2938 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2939 |
// details. |
| 2940 |
ForceSendFields []string `json:"-"` |
| 2941 |
// NullFields is a list of field names (e.g. "Clients") to include in API |
| 2942 |
// requests with the JSON null value. By default, fields with empty values are |
| 2943 |
// omitted from API requests. See |
| 2944 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2945 |
NullFields []string `json:"-"` |
| 2946 |
} |
| 2947 |
|
| 2948 |
func (s ListClientsResponse) MarshalJSON() ([]byte, error) { |
| 2949 |
type NoMethod ListClientsResponse |
| 2950 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2951 |
} |
| 2952 |
|
| 2953 |
// ListCreativeStatusBreakdownByCreativeResponse: Response message for listing |
| 2954 |
// all creatives associated with a given filtered bid reason. |
| 2955 |
type ListCreativeStatusBreakdownByCreativeResponse struct { |
| 2956 |
// FilteredBidCreativeRows: List of rows, with counts of bids with a given |
| 2957 |
// creative status aggregated by creative. |
| 2958 |
FilteredBidCreativeRows []*FilteredBidCreativeRow `json:"filteredBidCreativeRows,omitempty"` |
| 2959 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 2960 |
// in the ListCreativeStatusBreakdownByCreativeRequest.pageToken field in the |
| 2961 |
// subsequent call to the filteredBids.creatives.list method to retrieve the |
| 2962 |
// next page of results. |
| 2963 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 2964 |
|
| 2965 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 2966 |
googleapi.ServerResponse `json:"-"` |
| 2967 |
// ForceSendFields is a list of field names (e.g. "FilteredBidCreativeRows") to |
| 2968 |
// unconditionally include in API requests. By default, fields with empty or |
| 2969 |
// default values are omitted from API requests. See |
| 2970 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 2971 |
// details. |
| 2972 |
ForceSendFields []string `json:"-"` |
| 2973 |
// NullFields is a list of field names (e.g. "FilteredBidCreativeRows") to |
| 2974 |
// include in API requests with the JSON null value. By default, fields with |
| 2975 |
// empty values are omitted from API requests. See |
| 2976 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 2977 |
NullFields []string `json:"-"` |
| 2978 |
} |
| 2979 |
|
| 2980 |
func (s ListCreativeStatusBreakdownByCreativeResponse) MarshalJSON() ([]byte, error) { |
| 2981 |
type NoMethod ListCreativeStatusBreakdownByCreativeResponse |
| 2982 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 2983 |
} |
| 2984 |
|
| 2985 |
// ListCreativeStatusBreakdownByDetailResponse: Response message for listing |
| 2986 |
// all details associated with a given filtered bid reason. |
| 2987 |
type ListCreativeStatusBreakdownByDetailResponse struct { |
| 2988 |
// DetailType: The type of detail that the detail IDs represent. |
| 2989 |
// |
| 2990 |
// Possible values: |
| 2991 |
// "DETAIL_TYPE_UNSPECIFIED" - A placeholder for an undefined status. This |
| 2992 |
// value will never be returned in responses. |
| 2993 |
// "CREATIVE_ATTRIBUTE" - Indicates that the detail ID refers to a creative |
| 2994 |
// attribute; see |
| 2995 |
// [publisher-excludable-creative-attributes](https://developers.google.com/auth |
| 2996 |
// orized-buyers/rtb/downloads/publisher-excludable-creative-attributes). |
| 2997 |
// "VENDOR" - Indicates that the detail ID refers to a vendor; see |
| 2998 |
// [vendors](https://developers.google.com/authorized-buyers/rtb/downloads/vendo |
| 2999 |
// rs). This namespace is different from that of the `ATP_VENDOR` detail type. |
| 3000 |
// "SENSITIVE_CATEGORY" - Indicates that the detail ID refers to a sensitive |
| 3001 |
// category; see |
| 3002 |
// [ad-sensitive-categories](https://developers.google.com/authorized-buyers/rtb |
| 3003 |
// /downloads/ad-sensitive-categories). |
| 3004 |
// "PRODUCT_CATEGORY" - Indicates that the detail ID refers to a product |
| 3005 |
// category; see |
| 3006 |
// [ad-product-categories](https://developers.google.com/authorized-buyers/rtb/d |
| 3007 |
// ownloads/ad-product-categories). |
| 3008 |
// "DISAPPROVAL_REASON" - Indicates that the detail ID refers to a |
| 3009 |
// disapproval reason; see DisapprovalReason enum in |
| 3010 |
// [snippet-status-report-proto](https://developers.google.com/authorized-buyers |
| 3011 |
// /rtb/downloads/snippet-status-report-proto). |
| 3012 |
// "POLICY_TOPIC" - Indicates that the detail ID refers to a policy topic. |
| 3013 |
// "ATP_VENDOR" - Indicates that the detail ID refers to an ad technology |
| 3014 |
// provider (ATP); see [providers] |
| 3015 |
// (https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv). This |
| 3016 |
// namespace is different from the `VENDOR` detail type; see [ad technology |
| 3017 |
// providers](https://support.google.com/admanager/answer/9012903) for more |
| 3018 |
// information. |
| 3019 |
// "VENDOR_DOMAIN" - Indicates that the detail string refers the domain of an |
| 3020 |
// unknown vendor. |
| 3021 |
// "GVL_ID" - Indicates that the detail ID refers an IAB GVL ID which Google |
| 3022 |
// did not detect in the latest TCF Vendor List. See [Global Vendor List] |
| 3023 |
// (https://vendor-list.consensu.org/v2/vendor-list.json) |
| 3024 |
DetailType string `json:"detailType,omitempty"` |
| 3025 |
// FilteredBidDetailRows: List of rows, with counts of bids with a given |
| 3026 |
// creative status aggregated by detail. |
| 3027 |
FilteredBidDetailRows []*FilteredBidDetailRow `json:"filteredBidDetailRows,omitempty"` |
| 3028 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3029 |
// in the ListCreativeStatusBreakdownByDetailRequest.pageToken field in the |
| 3030 |
// subsequent call to the filteredBids.details.list method to retrieve the next |
| 3031 |
// page of results. |
| 3032 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3033 |
|
| 3034 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3035 |
googleapi.ServerResponse `json:"-"` |
| 3036 |
// ForceSendFields is a list of field names (e.g. "DetailType") to |
| 3037 |
// unconditionally include in API requests. By default, fields with empty or |
| 3038 |
// default values are omitted from API requests. See |
| 3039 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3040 |
// details. |
| 3041 |
ForceSendFields []string `json:"-"` |
| 3042 |
// NullFields is a list of field names (e.g. "DetailType") to include in API |
| 3043 |
// requests with the JSON null value. By default, fields with empty values are |
| 3044 |
// omitted from API requests. See |
| 3045 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3046 |
NullFields []string `json:"-"` |
| 3047 |
} |
| 3048 |
|
| 3049 |
func (s ListCreativeStatusBreakdownByDetailResponse) MarshalJSON() ([]byte, error) { |
| 3050 |
type NoMethod ListCreativeStatusBreakdownByDetailResponse |
| 3051 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3052 |
} |
| 3053 |
|
| 3054 |
// ListCreativesResponse: A response for listing creatives. |
| 3055 |
type ListCreativesResponse struct { |
| 3056 |
// Creatives: The list of creatives. |
| 3057 |
Creatives []*Creative `json:"creatives,omitempty"` |
| 3058 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3059 |
// in the ListCreativesRequest.page_token field in the subsequent call to |
| 3060 |
// `ListCreatives` method to retrieve the next page of results. |
| 3061 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3062 |
|
| 3063 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3064 |
googleapi.ServerResponse `json:"-"` |
| 3065 |
// ForceSendFields is a list of field names (e.g. "Creatives") to |
| 3066 |
// unconditionally include in API requests. By default, fields with empty or |
| 3067 |
// default values are omitted from API requests. See |
| 3068 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3069 |
// details. |
| 3070 |
ForceSendFields []string `json:"-"` |
| 3071 |
// NullFields is a list of field names (e.g. "Creatives") to include in API |
| 3072 |
// requests with the JSON null value. By default, fields with empty values are |
| 3073 |
// omitted from API requests. See |
| 3074 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3075 |
NullFields []string `json:"-"` |
| 3076 |
} |
| 3077 |
|
| 3078 |
func (s ListCreativesResponse) MarshalJSON() ([]byte, error) { |
| 3079 |
type NoMethod ListCreativesResponse |
| 3080 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3081 |
} |
| 3082 |
|
| 3083 |
// ListDealAssociationsResponse: A response for listing creative and deal |
| 3084 |
// associations |
| 3085 |
type ListDealAssociationsResponse struct { |
| 3086 |
// Associations: The list of associations. |
| 3087 |
Associations []*CreativeDealAssociation `json:"associations,omitempty"` |
| 3088 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3089 |
// in the ListDealAssociationsRequest.page_token field in the subsequent call |
| 3090 |
// to 'ListDealAssociation' method to retrieve the next page of results. |
| 3091 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3092 |
|
| 3093 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3094 |
googleapi.ServerResponse `json:"-"` |
| 3095 |
// ForceSendFields is a list of field names (e.g. "Associations") to |
| 3096 |
// unconditionally include in API requests. By default, fields with empty or |
| 3097 |
// default values are omitted from API requests. See |
| 3098 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3099 |
// details. |
| 3100 |
ForceSendFields []string `json:"-"` |
| 3101 |
// NullFields is a list of field names (e.g. "Associations") to include in API |
| 3102 |
// requests with the JSON null value. By default, fields with empty values are |
| 3103 |
// omitted from API requests. See |
| 3104 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3105 |
NullFields []string `json:"-"` |
| 3106 |
} |
| 3107 |
|
| 3108 |
func (s ListDealAssociationsResponse) MarshalJSON() ([]byte, error) { |
| 3109 |
type NoMethod ListDealAssociationsResponse |
| 3110 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3111 |
} |
| 3112 |
|
| 3113 |
// ListFilterSetsResponse: Response message for listing filter sets. |
| 3114 |
type ListFilterSetsResponse struct { |
| 3115 |
// FilterSets: The filter sets belonging to the buyer. |
| 3116 |
FilterSets []*FilterSet `json:"filterSets,omitempty"` |
| 3117 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3118 |
// in the ListFilterSetsRequest.pageToken field in the subsequent call to the |
| 3119 |
// accounts.filterSets.list method to retrieve the next page of results. |
| 3120 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3121 |
|
| 3122 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3123 |
googleapi.ServerResponse `json:"-"` |
| 3124 |
// ForceSendFields is a list of field names (e.g. "FilterSets") to |
| 3125 |
// unconditionally include in API requests. By default, fields with empty or |
| 3126 |
// default values are omitted from API requests. See |
| 3127 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3128 |
// details. |
| 3129 |
ForceSendFields []string `json:"-"` |
| 3130 |
// NullFields is a list of field names (e.g. "FilterSets") to include in API |
| 3131 |
// requests with the JSON null value. By default, fields with empty values are |
| 3132 |
// omitted from API requests. See |
| 3133 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3134 |
NullFields []string `json:"-"` |
| 3135 |
} |
| 3136 |
|
| 3137 |
func (s ListFilterSetsResponse) MarshalJSON() ([]byte, error) { |
| 3138 |
type NoMethod ListFilterSetsResponse |
| 3139 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3140 |
} |
| 3141 |
|
| 3142 |
// ListFilteredBidRequestsResponse: Response message for listing all reasons |
| 3143 |
// that bid requests were filtered and not sent to the buyer. |
| 3144 |
type ListFilteredBidRequestsResponse struct { |
| 3145 |
// CalloutStatusRows: List of rows, with counts of filtered bid requests |
| 3146 |
// aggregated by callout status. |
| 3147 |
CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"` |
| 3148 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3149 |
// in the ListFilteredBidRequestsRequest.pageToken field in the subsequent call |
| 3150 |
// to the filteredBidRequests.list method to retrieve the next page of results. |
| 3151 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3152 |
|
| 3153 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3154 |
googleapi.ServerResponse `json:"-"` |
| 3155 |
// ForceSendFields is a list of field names (e.g. "CalloutStatusRows") to |
| 3156 |
// unconditionally include in API requests. By default, fields with empty or |
| 3157 |
// default values are omitted from API requests. See |
| 3158 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3159 |
// details. |
| 3160 |
ForceSendFields []string `json:"-"` |
| 3161 |
// NullFields is a list of field names (e.g. "CalloutStatusRows") to include in |
| 3162 |
// API requests with the JSON null value. By default, fields with empty values |
| 3163 |
// are omitted from API requests. See |
| 3164 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3165 |
NullFields []string `json:"-"` |
| 3166 |
} |
| 3167 |
|
| 3168 |
func (s ListFilteredBidRequestsResponse) MarshalJSON() ([]byte, error) { |
| 3169 |
type NoMethod ListFilteredBidRequestsResponse |
| 3170 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3171 |
} |
| 3172 |
|
| 3173 |
// ListFilteredBidsResponse: Response message for listing all reasons that bids |
| 3174 |
// were filtered from the auction. |
| 3175 |
type ListFilteredBidsResponse struct { |
| 3176 |
// CreativeStatusRows: List of rows, with counts of filtered bids aggregated by |
| 3177 |
// filtering reason (for example, creative status). |
| 3178 |
CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"` |
| 3179 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3180 |
// in the ListFilteredBidsRequest.pageToken field in the subsequent call to the |
| 3181 |
// filteredBids.list method to retrieve the next page of results. |
| 3182 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3183 |
|
| 3184 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3185 |
googleapi.ServerResponse `json:"-"` |
| 3186 |
// ForceSendFields is a list of field names (e.g. "CreativeStatusRows") to |
| 3187 |
// unconditionally include in API requests. By default, fields with empty or |
| 3188 |
// default values are omitted from API requests. See |
| 3189 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3190 |
// details. |
| 3191 |
ForceSendFields []string `json:"-"` |
| 3192 |
// NullFields is a list of field names (e.g. "CreativeStatusRows") to include |
| 3193 |
// in API requests with the JSON null value. By default, fields with empty |
| 3194 |
// values are omitted from API requests. See |
| 3195 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3196 |
NullFields []string `json:"-"` |
| 3197 |
} |
| 3198 |
|
| 3199 |
func (s ListFilteredBidsResponse) MarshalJSON() ([]byte, error) { |
| 3200 |
type NoMethod ListFilteredBidsResponse |
| 3201 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3202 |
} |
| 3203 |
|
| 3204 |
// ListImpressionMetricsResponse: Response message for listing the metrics that |
| 3205 |
// are measured in number of impressions. |
| 3206 |
type ListImpressionMetricsResponse struct { |
| 3207 |
// ImpressionMetricsRows: List of rows, each containing a set of impression |
| 3208 |
// metrics. |
| 3209 |
ImpressionMetricsRows []*ImpressionMetricsRow `json:"impressionMetricsRows,omitempty"` |
| 3210 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3211 |
// in the ListImpressionMetricsRequest.pageToken field in the subsequent call |
| 3212 |
// to the impressionMetrics.list method to retrieve the next page of results. |
| 3213 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3214 |
|
| 3215 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3216 |
googleapi.ServerResponse `json:"-"` |
| 3217 |
// ForceSendFields is a list of field names (e.g. "ImpressionMetricsRows") to |
| 3218 |
// unconditionally include in API requests. By default, fields with empty or |
| 3219 |
// default values are omitted from API requests. See |
| 3220 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3221 |
// details. |
| 3222 |
ForceSendFields []string `json:"-"` |
| 3223 |
// NullFields is a list of field names (e.g. "ImpressionMetricsRows") to |
| 3224 |
// include in API requests with the JSON null value. By default, fields with |
| 3225 |
// empty values are omitted from API requests. See |
| 3226 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3227 |
NullFields []string `json:"-"` |
| 3228 |
} |
| 3229 |
|
| 3230 |
func (s ListImpressionMetricsResponse) MarshalJSON() ([]byte, error) { |
| 3231 |
type NoMethod ListImpressionMetricsResponse |
| 3232 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3233 |
} |
| 3234 |
|
| 3235 |
// ListLosingBidsResponse: Response message for listing all reasons that bids |
| 3236 |
// lost in the auction. |
| 3237 |
type ListLosingBidsResponse struct { |
| 3238 |
// CreativeStatusRows: List of rows, with counts of losing bids aggregated by |
| 3239 |
// loss reason (for example, creative status). |
| 3240 |
CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"` |
| 3241 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3242 |
// in the ListLosingBidsRequest.pageToken field in the subsequent call to the |
| 3243 |
// losingBids.list method to retrieve the next page of results. |
| 3244 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3245 |
|
| 3246 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3247 |
googleapi.ServerResponse `json:"-"` |
| 3248 |
// ForceSendFields is a list of field names (e.g. "CreativeStatusRows") to |
| 3249 |
// unconditionally include in API requests. By default, fields with empty or |
| 3250 |
// default values are omitted from API requests. See |
| 3251 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3252 |
// details. |
| 3253 |
ForceSendFields []string `json:"-"` |
| 3254 |
// NullFields is a list of field names (e.g. "CreativeStatusRows") to include |
| 3255 |
// in API requests with the JSON null value. By default, fields with empty |
| 3256 |
// values are omitted from API requests. See |
| 3257 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3258 |
NullFields []string `json:"-"` |
| 3259 |
} |
| 3260 |
|
| 3261 |
func (s ListLosingBidsResponse) MarshalJSON() ([]byte, error) { |
| 3262 |
type NoMethod ListLosingBidsResponse |
| 3263 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3264 |
} |
| 3265 |
|
| 3266 |
// ListNonBillableWinningBidsResponse: Response message for listing all reasons |
| 3267 |
// for which a buyer was not billed for a winning bid. |
| 3268 |
type ListNonBillableWinningBidsResponse struct { |
| 3269 |
// NextPageToken: A token to retrieve the next page of results. Pass this value |
| 3270 |
// in the ListNonBillableWinningBidsRequest.pageToken field in the subsequent |
| 3271 |
// call to the nonBillableWinningBids.list method to retrieve the next page of |
| 3272 |
// results. |
| 3273 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3274 |
// NonBillableWinningBidStatusRows: List of rows, with counts of bids not |
| 3275 |
// billed aggregated by reason. |
| 3276 |
NonBillableWinningBidStatusRows []*NonBillableWinningBidStatusRow `json:"nonBillableWinningBidStatusRows,omitempty"` |
| 3277 |
|
| 3278 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3279 |
googleapi.ServerResponse `json:"-"` |
| 3280 |
// ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| 3281 |
// unconditionally include in API requests. By default, fields with empty or |
| 3282 |
// default values are omitted from API requests. See |
| 3283 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3284 |
// details. |
| 3285 |
ForceSendFields []string `json:"-"` |
| 3286 |
// NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| 3287 |
// requests with the JSON null value. By default, fields with empty values are |
| 3288 |
// omitted from API requests. See |
| 3289 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3290 |
NullFields []string `json:"-"` |
| 3291 |
} |
| 3292 |
|
| 3293 |
func (s ListNonBillableWinningBidsResponse) MarshalJSON() ([]byte, error) { |
| 3294 |
type NoMethod ListNonBillableWinningBidsResponse |
| 3295 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3296 |
} |
| 3297 |
|
| 3298 |
// ListProductsResponse: Response message for listing products visible to the |
| 3299 |
// buyer. |
| 3300 |
type ListProductsResponse struct { |
| 3301 |
// NextPageToken: List pagination support. |
| 3302 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3303 |
// Products: The list of matching products at their head revision number. |
| 3304 |
Products []*Product `json:"products,omitempty"` |
| 3305 |
|
| 3306 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3307 |
googleapi.ServerResponse `json:"-"` |
| 3308 |
// ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| 3309 |
// unconditionally include in API requests. By default, fields with empty or |
| 3310 |
// default values are omitted from API requests. See |
| 3311 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3312 |
// details. |
| 3313 |
ForceSendFields []string `json:"-"` |
| 3314 |
// NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| 3315 |
// requests with the JSON null value. By default, fields with empty values are |
| 3316 |
// omitted from API requests. See |
| 3317 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3318 |
NullFields []string `json:"-"` |
| 3319 |
} |
| 3320 |
|
| 3321 |
func (s ListProductsResponse) MarshalJSON() ([]byte, error) { |
| 3322 |
type NoMethod ListProductsResponse |
| 3323 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3324 |
} |
| 3325 |
|
| 3326 |
// ListProposalsResponse: Response message for listing proposals. |
| 3327 |
type ListProposalsResponse struct { |
| 3328 |
// NextPageToken: Continuation token for fetching the next page of results. |
| 3329 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3330 |
// Proposals: The list of proposals. |
| 3331 |
Proposals []*Proposal `json:"proposals,omitempty"` |
| 3332 |
|
| 3333 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3334 |
googleapi.ServerResponse `json:"-"` |
| 3335 |
// ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| 3336 |
// unconditionally include in API requests. By default, fields with empty or |
| 3337 |
// default values are omitted from API requests. See |
| 3338 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3339 |
// details. |
| 3340 |
ForceSendFields []string `json:"-"` |
| 3341 |
// NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| 3342 |
// requests with the JSON null value. By default, fields with empty values are |
| 3343 |
// omitted from API requests. See |
| 3344 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3345 |
NullFields []string `json:"-"` |
| 3346 |
} |
| 3347 |
|
| 3348 |
func (s ListProposalsResponse) MarshalJSON() ([]byte, error) { |
| 3349 |
type NoMethod ListProposalsResponse |
| 3350 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3351 |
} |
| 3352 |
|
| 3353 |
// ListPublisherProfilesResponse: Response message for profiles visible to the |
| 3354 |
// buyer. |
| 3355 |
type ListPublisherProfilesResponse struct { |
| 3356 |
// NextPageToken: List pagination support |
| 3357 |
NextPageToken string `json:"nextPageToken,omitempty"` |
| 3358 |
// PublisherProfiles: The list of matching publisher profiles. |
| 3359 |
PublisherProfiles []*PublisherProfile `json:"publisherProfiles,omitempty"` |
| 3360 |
|
| 3361 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3362 |
googleapi.ServerResponse `json:"-"` |
| 3363 |
// ForceSendFields is a list of field names (e.g. "NextPageToken") to |
| 3364 |
// unconditionally include in API requests. By default, fields with empty or |
| 3365 |
// default values are omitted from API requests. See |
| 3366 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3367 |
// details. |
| 3368 |
ForceSendFields []string `json:"-"` |
| 3369 |
// NullFields is a list of field names (e.g. "NextPageToken") to include in API |
| 3370 |
// requests with the JSON null value. By default, fields with empty values are |
| 3371 |
// omitted from API requests. See |
| 3372 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3373 |
NullFields []string `json:"-"` |
| 3374 |
} |
| 3375 |
|
| 3376 |
func (s ListPublisherProfilesResponse) MarshalJSON() ([]byte, error) { |
| 3377 |
type NoMethod ListPublisherProfilesResponse |
| 3378 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3379 |
} |
| 3380 |
|
| 3381 |
// LocationContext: Output only. The Geo criteria the restriction applies to. |
| 3382 |
type LocationContext struct { |
| 3383 |
// GeoCriteriaIds: IDs representing the geo location for this context. Refer to |
| 3384 |
// the geo-table.csv |
| 3385 |
// (https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv) file for |
| 3386 |
// different geo criteria IDs. |
| 3387 |
GeoCriteriaIds []int64 `json:"geoCriteriaIds,omitempty"` |
| 3388 |
// ForceSendFields is a list of field names (e.g. "GeoCriteriaIds") to |
| 3389 |
// unconditionally include in API requests. By default, fields with empty or |
| 3390 |
// default values are omitted from API requests. See |
| 3391 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3392 |
// details. |
| 3393 |
ForceSendFields []string `json:"-"` |
| 3394 |
// NullFields is a list of field names (e.g. "GeoCriteriaIds") to include in |
| 3395 |
// API requests with the JSON null value. By default, fields with empty values |
| 3396 |
// are omitted from API requests. See |
| 3397 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3398 |
NullFields []string `json:"-"` |
| 3399 |
} |
| 3400 |
|
| 3401 |
func (s LocationContext) MarshalJSON() ([]byte, error) { |
| 3402 |
type NoMethod LocationContext |
| 3403 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3404 |
} |
| 3405 |
|
| 3406 |
// MarketplaceTargeting: Targeting represents different criteria that can be |
| 3407 |
// used by advertisers to target ad inventory. For example, they can choose to |
| 3408 |
// target ad requests only if the user is in the US. Multiple types of |
| 3409 |
// targeting are always applied as a logical AND, unless noted otherwise. |
| 3410 |
type MarketplaceTargeting struct { |
| 3411 |
// GeoTargeting: Geo criteria IDs to be included/excluded. |
| 3412 |
GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"` |
| 3413 |
// InventorySizeTargeting: Inventory sizes to be included/excluded. |
| 3414 |
InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"` |
| 3415 |
// PlacementTargeting: Placement targeting information, for example, URL, |
| 3416 |
// mobile applications. |
| 3417 |
PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"` |
| 3418 |
// TechnologyTargeting: Technology targeting information, for example, |
| 3419 |
// operating system, device category. |
| 3420 |
TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"` |
| 3421 |
// VideoTargeting: Video targeting information. |
| 3422 |
VideoTargeting *VideoTargeting `json:"videoTargeting,omitempty"` |
| 3423 |
// ForceSendFields is a list of field names (e.g. "GeoTargeting") to |
| 3424 |
// unconditionally include in API requests. By default, fields with empty or |
| 3425 |
// default values are omitted from API requests. See |
| 3426 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3427 |
// details. |
| 3428 |
ForceSendFields []string `json:"-"` |
| 3429 |
// NullFields is a list of field names (e.g. "GeoTargeting") to include in API |
| 3430 |
// requests with the JSON null value. By default, fields with empty values are |
| 3431 |
// omitted from API requests. See |
| 3432 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3433 |
NullFields []string `json:"-"` |
| 3434 |
} |
| 3435 |
|
| 3436 |
func (s MarketplaceTargeting) MarshalJSON() ([]byte, error) { |
| 3437 |
type NoMethod MarketplaceTargeting |
| 3438 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3439 |
} |
| 3440 |
|
| 3441 |
// MetricValue: A metric value, with an expected value and a variance; |
| 3442 |
// represents a count that may be either exact or estimated (for example, when |
| 3443 |
// sampled). |
| 3444 |
type MetricValue struct { |
| 3445 |
// Value: The expected value of the metric. |
| 3446 |
Value int64 `json:"value,omitempty,string"` |
| 3447 |
// Variance: The variance (for example, square of the standard deviation) of |
| 3448 |
// the metric value. If value is exact, variance is 0. Can be used to calculate |
| 3449 |
// margin of error as a percentage of value, using the following formula, where |
| 3450 |
// Z is the standard constant that depends on the preferred size of the |
| 3451 |
// confidence interval (for example, for 90% confidence interval, use Z = |
| 3452 |
// 1.645): marginOfError = 100 * Z * sqrt(variance) / value |
| 3453 |
Variance int64 `json:"variance,omitempty,string"` |
| 3454 |
// ForceSendFields is a list of field names (e.g. "Value") to unconditionally |
| 3455 |
// include in API requests. By default, fields with empty or default values are |
| 3456 |
// omitted from API requests. See |
| 3457 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3458 |
// details. |
| 3459 |
ForceSendFields []string `json:"-"` |
| 3460 |
// NullFields is a list of field names (e.g. "Value") to include in API |
| 3461 |
// requests with the JSON null value. By default, fields with empty values are |
| 3462 |
// omitted from API requests. See |
| 3463 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3464 |
NullFields []string `json:"-"` |
| 3465 |
} |
| 3466 |
|
| 3467 |
func (s MetricValue) MarshalJSON() ([]byte, error) { |
| 3468 |
type NoMethod MetricValue |
| 3469 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3470 |
} |
| 3471 |
|
| 3472 |
// MobileApplicationTargeting: Mobile application targeting settings. |
| 3473 |
type MobileApplicationTargeting struct { |
| 3474 |
// FirstPartyTargeting: Publisher owned apps to be targeted or excluded by the |
| 3475 |
// publisher to display the ads in. |
| 3476 |
FirstPartyTargeting *FirstPartyMobileApplicationTargeting `json:"firstPartyTargeting,omitempty"` |
| 3477 |
// ForceSendFields is a list of field names (e.g. "FirstPartyTargeting") to |
| 3478 |
// unconditionally include in API requests. By default, fields with empty or |
| 3479 |
// default values are omitted from API requests. See |
| 3480 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3481 |
// details. |
| 3482 |
ForceSendFields []string `json:"-"` |
| 3483 |
// NullFields is a list of field names (e.g. "FirstPartyTargeting") to include |
| 3484 |
// in API requests with the JSON null value. By default, fields with empty |
| 3485 |
// values are omitted from API requests. See |
| 3486 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3487 |
NullFields []string `json:"-"` |
| 3488 |
} |
| 3489 |
|
| 3490 |
func (s MobileApplicationTargeting) MarshalJSON() ([]byte, error) { |
| 3491 |
type NoMethod MobileApplicationTargeting |
| 3492 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3493 |
} |
| 3494 |
|
| 3495 |
// Money: Represents an amount of money with its currency type. |
| 3496 |
type Money struct { |
| 3497 |
// CurrencyCode: The three-letter currency code defined in ISO 4217. |
| 3498 |
CurrencyCode string `json:"currencyCode,omitempty"` |
| 3499 |
// Nanos: Number of nano (10^-9) units of the amount. The value must be between |
| 3500 |
// -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` |
| 3501 |
// must be positive or zero. If `units` is zero, `nanos` can be positive, zero, |
| 3502 |
// or negative. If `units` is negative, `nanos` must be negative or zero. For |
| 3503 |
// example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. |
| 3504 |
Nanos int64 `json:"nanos,omitempty"` |
| 3505 |
// Units: The whole units of the amount. For example if `currencyCode` is |
| 3506 |
// "USD", then 1 unit is one US dollar. |
| 3507 |
Units int64 `json:"units,omitempty,string"` |
| 3508 |
// ForceSendFields is a list of field names (e.g. "CurrencyCode") to |
| 3509 |
// unconditionally include in API requests. By default, fields with empty or |
| 3510 |
// default values are omitted from API requests. See |
| 3511 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3512 |
// details. |
| 3513 |
ForceSendFields []string `json:"-"` |
| 3514 |
// NullFields is a list of field names (e.g. "CurrencyCode") to include in API |
| 3515 |
// requests with the JSON null value. By default, fields with empty values are |
| 3516 |
// omitted from API requests. See |
| 3517 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3518 |
NullFields []string `json:"-"` |
| 3519 |
} |
| 3520 |
|
| 3521 |
func (s Money) MarshalJSON() ([]byte, error) { |
| 3522 |
type NoMethod Money |
| 3523 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3524 |
} |
| 3525 |
|
| 3526 |
// NativeContent: Native content for a creative. |
| 3527 |
type NativeContent struct { |
| 3528 |
// AdvertiserName: The name of the advertiser or sponsor, to be displayed in |
| 3529 |
// the ad creative. |
| 3530 |
AdvertiserName string `json:"advertiserName,omitempty"` |
| 3531 |
// AppIcon: The app icon, for app download ads. |
| 3532 |
AppIcon *Image `json:"appIcon,omitempty"` |
| 3533 |
// Body: A long description of the ad. |
| 3534 |
Body string `json:"body,omitempty"` |
| 3535 |
// CallToAction: A label for the button that the user is supposed to click. |
| 3536 |
CallToAction string `json:"callToAction,omitempty"` |
| 3537 |
// ClickLinkUrl: The URL that the browser/SDK will load when the user clicks |
| 3538 |
// the ad. |
| 3539 |
ClickLinkUrl string `json:"clickLinkUrl,omitempty"` |
| 3540 |
// ClickTrackingUrl: The URL to use for click tracking. |
| 3541 |
ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"` |
| 3542 |
// Headline: A short title for the ad. |
| 3543 |
Headline string `json:"headline,omitempty"` |
| 3544 |
// Image: A large image. |
| 3545 |
Image *Image `json:"image,omitempty"` |
| 3546 |
// Logo: A smaller image, for the advertiser's logo. |
| 3547 |
Logo *Image `json:"logo,omitempty"` |
| 3548 |
// PriceDisplayText: The price of the promoted app including currency info. |
| 3549 |
PriceDisplayText string `json:"priceDisplayText,omitempty"` |
| 3550 |
// StarRating: The app rating in the app store. Must be in the range [0-5]. |
| 3551 |
StarRating float64 `json:"starRating,omitempty"` |
| 3552 |
// StoreUrl: The URL to the app store to purchase/download the promoted app. |
| 3553 |
StoreUrl string `json:"storeUrl,omitempty"` |
| 3554 |
// VideoUrl: The URL to fetch a native video ad. |
| 3555 |
VideoUrl string `json:"videoUrl,omitempty"` |
| 3556 |
// ForceSendFields is a list of field names (e.g. "AdvertiserName") to |
| 3557 |
// unconditionally include in API requests. By default, fields with empty or |
| 3558 |
// default values are omitted from API requests. See |
| 3559 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3560 |
// details. |
| 3561 |
ForceSendFields []string `json:"-"` |
| 3562 |
// NullFields is a list of field names (e.g. "AdvertiserName") to include in |
| 3563 |
// API requests with the JSON null value. By default, fields with empty values |
| 3564 |
// are omitted from API requests. See |
| 3565 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3566 |
NullFields []string `json:"-"` |
| 3567 |
} |
| 3568 |
|
| 3569 |
func (s NativeContent) MarshalJSON() ([]byte, error) { |
| 3570 |
type NoMethod NativeContent |
| 3571 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3572 |
} |
| 3573 |
|
| 3574 |
func (s *NativeContent) UnmarshalJSON(data []byte) error { |
| 3575 |
type NoMethod NativeContent |
| 3576 |
var s1 struct { |
| 3577 |
StarRating gensupport.JSONFloat64 `json:"starRating"` |
| 3578 |
*NoMethod |
| 3579 |
} |
| 3580 |
s1.NoMethod = (*NoMethod)(s) |
| 3581 |
if err := json.Unmarshal(data, &s1); err != nil { |
| 3582 |
return err |
| 3583 |
} |
| 3584 |
s.StarRating = float64(s1.StarRating) |
| 3585 |
return nil |
| 3586 |
} |
| 3587 |
|
| 3588 |
// NonBillableWinningBidStatusRow: The number of winning bids with the |
| 3589 |
// specified dimension values for which the buyer was not billed, as described |
| 3590 |
// by the specified status. |
| 3591 |
type NonBillableWinningBidStatusRow struct { |
| 3592 |
// BidCount: The number of bids with the specified status. |
| 3593 |
BidCount *MetricValue `json:"bidCount,omitempty"` |
| 3594 |
// RowDimensions: The values of all dimensions associated with metric values in |
| 3595 |
// this row. |
| 3596 |
RowDimensions *RowDimensions `json:"rowDimensions,omitempty"` |
| 3597 |
// Status: The status specifying why the winning bids were not billed. |
| 3598 |
// |
| 3599 |
// Possible values: |
| 3600 |
// "STATUS_UNSPECIFIED" - A placeholder for an undefined status. This value |
| 3601 |
// will never be returned in responses. |
| 3602 |
// "AD_NOT_RENDERED" - The buyer was not billed because the ad was not |
| 3603 |
// rendered by the publisher. |
| 3604 |
// "INVALID_IMPRESSION" - The buyer was not billed because the impression won |
| 3605 |
// by the bid was determined to be invalid. |
| 3606 |
// "FATAL_VAST_ERROR" - A video impression was served but a fatal error was |
| 3607 |
// reported from the client during playback. |
| 3608 |
// "LOST_IN_MEDIATION" - The buyer was not billed because the ad was |
| 3609 |
// outplaced in the mediation waterfall. |
| 3610 |
// "OVERDELIVERED_IMPRESSION" - The impression was not billed because it |
| 3611 |
// exceeded a guaranteed deal delivery goal. |
| 3612 |
Status string `json:"status,omitempty"` |
| 3613 |
// ForceSendFields is a list of field names (e.g. "BidCount") to |
| 3614 |
// unconditionally include in API requests. By default, fields with empty or |
| 3615 |
// default values are omitted from API requests. See |
| 3616 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3617 |
// details. |
| 3618 |
ForceSendFields []string `json:"-"` |
| 3619 |
// NullFields is a list of field names (e.g. "BidCount") to include in API |
| 3620 |
// requests with the JSON null value. By default, fields with empty values are |
| 3621 |
// omitted from API requests. See |
| 3622 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3623 |
NullFields []string `json:"-"` |
| 3624 |
} |
| 3625 |
|
| 3626 |
func (s NonBillableWinningBidStatusRow) MarshalJSON() ([]byte, error) { |
| 3627 |
type NoMethod NonBillableWinningBidStatusRow |
| 3628 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3629 |
} |
| 3630 |
|
| 3631 |
// NonGuaranteedAuctionTerms: Terms for Private Auctions. Note that Private |
| 3632 |
// Auctions can be created only by the seller, but they can be returned in a |
| 3633 |
// get or list request. |
| 3634 |
type NonGuaranteedAuctionTerms struct { |
| 3635 |
// AutoOptimizePrivateAuction: True if open auction buyers are allowed to |
| 3636 |
// compete with invited buyers in this private auction. |
| 3637 |
AutoOptimizePrivateAuction bool `json:"autoOptimizePrivateAuction,omitempty"` |
| 3638 |
// ReservePricesPerBuyer: Reserve price for the specified buyer. |
| 3639 |
ReservePricesPerBuyer []*PricePerBuyer `json:"reservePricesPerBuyer,omitempty"` |
| 3640 |
// ForceSendFields is a list of field names (e.g. "AutoOptimizePrivateAuction") |
| 3641 |
// to unconditionally include in API requests. By default, fields with empty or |
| 3642 |
// default values are omitted from API requests. See |
| 3643 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3644 |
// details. |
| 3645 |
ForceSendFields []string `json:"-"` |
| 3646 |
// NullFields is a list of field names (e.g. "AutoOptimizePrivateAuction") to |
| 3647 |
// include in API requests with the JSON null value. By default, fields with |
| 3648 |
// empty values are omitted from API requests. See |
| 3649 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3650 |
NullFields []string `json:"-"` |
| 3651 |
} |
| 3652 |
|
| 3653 |
func (s NonGuaranteedAuctionTerms) MarshalJSON() ([]byte, error) { |
| 3654 |
type NoMethod NonGuaranteedAuctionTerms |
| 3655 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3656 |
} |
| 3657 |
|
| 3658 |
// NonGuaranteedFixedPriceTerms: Terms for Preferred Deals. |
| 3659 |
type NonGuaranteedFixedPriceTerms struct { |
| 3660 |
// FixedPrices: Fixed price for the specified buyer. |
| 3661 |
FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"` |
| 3662 |
// ForceSendFields is a list of field names (e.g. "FixedPrices") to |
| 3663 |
// unconditionally include in API requests. By default, fields with empty or |
| 3664 |
// default values are omitted from API requests. See |
| 3665 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3666 |
// details. |
| 3667 |
ForceSendFields []string `json:"-"` |
| 3668 |
// NullFields is a list of field names (e.g. "FixedPrices") to include in API |
| 3669 |
// requests with the JSON null value. By default, fields with empty values are |
| 3670 |
// omitted from API requests. See |
| 3671 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3672 |
NullFields []string `json:"-"` |
| 3673 |
} |
| 3674 |
|
| 3675 |
func (s NonGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) { |
| 3676 |
type NoMethod NonGuaranteedFixedPriceTerms |
| 3677 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3678 |
} |
| 3679 |
|
| 3680 |
// Note: A proposal may be associated to several notes. |
| 3681 |
type Note struct { |
| 3682 |
// CreateTime: Output only. The timestamp for when this note was created. |
| 3683 |
CreateTime string `json:"createTime,omitempty"` |
| 3684 |
// CreatorRole: Output only. The role of the person (buyer/seller) creating the |
| 3685 |
// note. |
| 3686 |
// |
| 3687 |
// Possible values: |
| 3688 |
// "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined |
| 3689 |
// buyer/seller role. |
| 3690 |
// "BUYER" - Specifies the role as buyer. |
| 3691 |
// "SELLER" - Specifies the role as seller. |
| 3692 |
CreatorRole string `json:"creatorRole,omitempty"` |
| 3693 |
// Note: The actual note to attach. (max-length: 1024 unicode code units) Note: |
| 3694 |
// This field may be set only when creating the resource. Modifying this field |
| 3695 |
// while updating the resource will result in an error. |
| 3696 |
Note string `json:"note,omitempty"` |
| 3697 |
// NoteId: Output only. The unique ID for the note. |
| 3698 |
NoteId string `json:"noteId,omitempty"` |
| 3699 |
// ProposalRevision: Output only. The revision number of the proposal when the |
| 3700 |
// note is created. |
| 3701 |
ProposalRevision int64 `json:"proposalRevision,omitempty,string"` |
| 3702 |
|
| 3703 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 3704 |
googleapi.ServerResponse `json:"-"` |
| 3705 |
// ForceSendFields is a list of field names (e.g. "CreateTime") to |
| 3706 |
// unconditionally include in API requests. By default, fields with empty or |
| 3707 |
// default values are omitted from API requests. See |
| 3708 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3709 |
// details. |
| 3710 |
ForceSendFields []string `json:"-"` |
| 3711 |
// NullFields is a list of field names (e.g. "CreateTime") to include in API |
| 3712 |
// requests with the JSON null value. By default, fields with empty values are |
| 3713 |
// omitted from API requests. See |
| 3714 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3715 |
NullFields []string `json:"-"` |
| 3716 |
} |
| 3717 |
|
| 3718 |
func (s Note) MarshalJSON() ([]byte, error) { |
| 3719 |
type NoMethod Note |
| 3720 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3721 |
} |
| 3722 |
|
| 3723 |
// OperatingSystemTargeting: Represents targeting information for operating |
| 3724 |
// systems. |
| 3725 |
type OperatingSystemTargeting struct { |
| 3726 |
// OperatingSystemCriteria: IDs of operating systems to be included/excluded. |
| 3727 |
OperatingSystemCriteria *CriteriaTargeting `json:"operatingSystemCriteria,omitempty"` |
| 3728 |
// OperatingSystemVersionCriteria: IDs of operating system versions to be |
| 3729 |
// included/excluded. |
| 3730 |
OperatingSystemVersionCriteria *CriteriaTargeting `json:"operatingSystemVersionCriteria,omitempty"` |
| 3731 |
// ForceSendFields is a list of field names (e.g. "OperatingSystemCriteria") to |
| 3732 |
// unconditionally include in API requests. By default, fields with empty or |
| 3733 |
// default values are omitted from API requests. See |
| 3734 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3735 |
// details. |
| 3736 |
ForceSendFields []string `json:"-"` |
| 3737 |
// NullFields is a list of field names (e.g. "OperatingSystemCriteria") to |
| 3738 |
// include in API requests with the JSON null value. By default, fields with |
| 3739 |
// empty values are omitted from API requests. See |
| 3740 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3741 |
NullFields []string `json:"-"` |
| 3742 |
} |
| 3743 |
|
| 3744 |
func (s OperatingSystemTargeting) MarshalJSON() ([]byte, error) { |
| 3745 |
type NoMethod OperatingSystemTargeting |
| 3746 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3747 |
} |
| 3748 |
|
| 3749 |
// PauseProposalDealsRequest: Request message to pause serving for finalized |
| 3750 |
// deals. |
| 3751 |
type PauseProposalDealsRequest struct { |
| 3752 |
// ExternalDealIds: The external_deal_id's of the deals to be paused. If empty, |
| 3753 |
// all the deals in the proposal will be paused. |
| 3754 |
ExternalDealIds []string `json:"externalDealIds,omitempty"` |
| 3755 |
// Reason: The reason why the deals are being paused. This human readable |
| 3756 |
// message will be displayed in the seller's UI. (Max length: 1000 unicode code |
| 3757 |
// units.) |
| 3758 |
Reason string `json:"reason,omitempty"` |
| 3759 |
// ForceSendFields is a list of field names (e.g. "ExternalDealIds") to |
| 3760 |
// unconditionally include in API requests. By default, fields with empty or |
| 3761 |
// default values are omitted from API requests. See |
| 3762 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3763 |
// details. |
| 3764 |
ForceSendFields []string `json:"-"` |
| 3765 |
// NullFields is a list of field names (e.g. "ExternalDealIds") to include in |
| 3766 |
// API requests with the JSON null value. By default, fields with empty values |
| 3767 |
// are omitted from API requests. See |
| 3768 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3769 |
NullFields []string `json:"-"` |
| 3770 |
} |
| 3771 |
|
| 3772 |
func (s PauseProposalDealsRequest) MarshalJSON() ([]byte, error) { |
| 3773 |
type NoMethod PauseProposalDealsRequest |
| 3774 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3775 |
} |
| 3776 |
|
| 3777 |
// PauseProposalRequest: Request message to pause serving for an |
| 3778 |
// already-finalized proposal. |
| 3779 |
type PauseProposalRequest struct { |
| 3780 |
// Reason: The reason why the proposal is being paused. This human readable |
| 3781 |
// message will be displayed in the seller's UI. (Max length: 1000 unicode code |
| 3782 |
// units.) |
| 3783 |
Reason string `json:"reason,omitempty"` |
| 3784 |
// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally |
| 3785 |
// include in API requests. By default, fields with empty or default values are |
| 3786 |
// omitted from API requests. See |
| 3787 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3788 |
// details. |
| 3789 |
ForceSendFields []string `json:"-"` |
| 3790 |
// NullFields is a list of field names (e.g. "Reason") to include in API |
| 3791 |
// requests with the JSON null value. By default, fields with empty values are |
| 3792 |
// omitted from API requests. See |
| 3793 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3794 |
NullFields []string `json:"-"` |
| 3795 |
} |
| 3796 |
|
| 3797 |
func (s PauseProposalRequest) MarshalJSON() ([]byte, error) { |
| 3798 |
type NoMethod PauseProposalRequest |
| 3799 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3800 |
} |
| 3801 |
|
| 3802 |
// PlacementTargeting: Represents targeting about where the ads can appear, for |
| 3803 |
// example, certain sites or mobile applications. Different placement targeting |
| 3804 |
// types will be logically OR'ed. |
| 3805 |
type PlacementTargeting struct { |
| 3806 |
// MobileApplicationTargeting: Mobile application targeting information in a |
| 3807 |
// deal. This doesn't apply to Auction Packages. |
| 3808 |
MobileApplicationTargeting *MobileApplicationTargeting `json:"mobileApplicationTargeting,omitempty"` |
| 3809 |
// UrlTargeting: URLs to be included/excluded. |
| 3810 |
UrlTargeting *UrlTargeting `json:"urlTargeting,omitempty"` |
| 3811 |
// ForceSendFields is a list of field names (e.g. "MobileApplicationTargeting") |
| 3812 |
// to unconditionally include in API requests. By default, fields with empty or |
| 3813 |
// default values are omitted from API requests. See |
| 3814 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3815 |
// details. |
| 3816 |
ForceSendFields []string `json:"-"` |
| 3817 |
// NullFields is a list of field names (e.g. "MobileApplicationTargeting") to |
| 3818 |
// include in API requests with the JSON null value. By default, fields with |
| 3819 |
// empty values are omitted from API requests. See |
| 3820 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3821 |
NullFields []string `json:"-"` |
| 3822 |
} |
| 3823 |
|
| 3824 |
func (s PlacementTargeting) MarshalJSON() ([]byte, error) { |
| 3825 |
type NoMethod PlacementTargeting |
| 3826 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3827 |
} |
| 3828 |
|
| 3829 |
// PlatformContext: Output only. The type of platform the restriction applies |
| 3830 |
// to. |
| 3831 |
type PlatformContext struct { |
| 3832 |
// Platforms: The platforms this restriction applies to. |
| 3833 |
// |
| 3834 |
// Possible values: |
| 3835 |
// "DESKTOP" - Desktop platform. |
| 3836 |
// "ANDROID" - Android platform. |
| 3837 |
// "IOS" - iOS platform. |
| 3838 |
Platforms []string `json:"platforms,omitempty"` |
| 3839 |
// ForceSendFields is a list of field names (e.g. "Platforms") to |
| 3840 |
// unconditionally include in API requests. By default, fields with empty or |
| 3841 |
// default values are omitted from API requests. See |
| 3842 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3843 |
// details. |
| 3844 |
ForceSendFields []string `json:"-"` |
| 3845 |
// NullFields is a list of field names (e.g. "Platforms") to include in API |
| 3846 |
// requests with the JSON null value. By default, fields with empty values are |
| 3847 |
// omitted from API requests. See |
| 3848 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3849 |
NullFields []string `json:"-"` |
| 3850 |
} |
| 3851 |
|
| 3852 |
func (s PlatformContext) MarshalJSON() ([]byte, error) { |
| 3853 |
type NoMethod PlatformContext |
| 3854 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3855 |
} |
| 3856 |
|
| 3857 |
// Price: Represents a price and a pricing type for a product / deal. |
| 3858 |
type Price struct { |
| 3859 |
// Amount: The actual price with currency specified. |
| 3860 |
Amount *Money `json:"amount,omitempty"` |
| 3861 |
// PricingType: The pricing type for the deal/product. (default: CPM) |
| 3862 |
// |
| 3863 |
// Possible values: |
| 3864 |
// "PRICING_TYPE_UNSPECIFIED" - A placeholder for an undefined pricing type. |
| 3865 |
// If the pricing type is unspecified, `COST_PER_MILLE` will be used instead. |
| 3866 |
// "COST_PER_MILLE" - Cost per thousand impressions. |
| 3867 |
// "COST_PER_DAY" - Cost per day |
| 3868 |
PricingType string `json:"pricingType,omitempty"` |
| 3869 |
// ForceSendFields is a list of field names (e.g. "Amount") to unconditionally |
| 3870 |
// include in API requests. By default, fields with empty or default values are |
| 3871 |
// omitted from API requests. See |
| 3872 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3873 |
// details. |
| 3874 |
ForceSendFields []string `json:"-"` |
| 3875 |
// NullFields is a list of field names (e.g. "Amount") to include in API |
| 3876 |
// requests with the JSON null value. By default, fields with empty values are |
| 3877 |
// omitted from API requests. See |
| 3878 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3879 |
NullFields []string `json:"-"` |
| 3880 |
} |
| 3881 |
|
| 3882 |
func (s Price) MarshalJSON() ([]byte, error) { |
| 3883 |
type NoMethod Price |
| 3884 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3885 |
} |
| 3886 |
|
| 3887 |
// PricePerBuyer: Used to specify pricing rules for buyers/advertisers. Each |
| 3888 |
// PricePerBuyer in a product can become 0 or 1 deals. To check if there is a |
| 3889 |
// PricePerBuyer for a particular buyer or buyer/advertiser pair, we look for |
| 3890 |
// the most specific matching rule - we first look for a rule matching the |
| 3891 |
// buyer and advertiser, next a rule with the buyer but an empty advertiser |
| 3892 |
// list, and otherwise look for a matching rule where no buyer is set. |
| 3893 |
type PricePerBuyer struct { |
| 3894 |
// AdvertiserIds: The list of advertisers for this price when associated with |
| 3895 |
// this buyer. If empty, all advertisers with this buyer pay this price. |
| 3896 |
AdvertiserIds []string `json:"advertiserIds,omitempty"` |
| 3897 |
// Buyer: The buyer who will pay this price. If unset, all buyers can pay this |
| 3898 |
// price (if the advertisers match, and there's no more specific rule matching |
| 3899 |
// the buyer). |
| 3900 |
Buyer *Buyer `json:"buyer,omitempty"` |
| 3901 |
// Price: The specified price. |
| 3902 |
Price *Price `json:"price,omitempty"` |
| 3903 |
// ForceSendFields is a list of field names (e.g. "AdvertiserIds") to |
| 3904 |
// unconditionally include in API requests. By default, fields with empty or |
| 3905 |
// default values are omitted from API requests. See |
| 3906 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3907 |
// details. |
| 3908 |
ForceSendFields []string `json:"-"` |
| 3909 |
// NullFields is a list of field names (e.g. "AdvertiserIds") to include in API |
| 3910 |
// requests with the JSON null value. By default, fields with empty values are |
| 3911 |
// omitted from API requests. See |
| 3912 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3913 |
NullFields []string `json:"-"` |
| 3914 |
} |
| 3915 |
|
| 3916 |
func (s PricePerBuyer) MarshalJSON() ([]byte, error) { |
| 3917 |
type NoMethod PricePerBuyer |
| 3918 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3919 |
} |
| 3920 |
|
| 3921 |
// PrivateData: Buyers are allowed to store certain types of private data in a |
| 3922 |
// proposal/deal. |
| 3923 |
type PrivateData struct { |
| 3924 |
// ReferenceId: A buyer or seller specified reference ID. This can be queried |
| 3925 |
// in the list operations (max-length: 1024 unicode code units). |
| 3926 |
ReferenceId string `json:"referenceId,omitempty"` |
| 3927 |
// ForceSendFields is a list of field names (e.g. "ReferenceId") to |
| 3928 |
// unconditionally include in API requests. By default, fields with empty or |
| 3929 |
// default values are omitted from API requests. See |
| 3930 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 3931 |
// details. |
| 3932 |
ForceSendFields []string `json:"-"` |
| 3933 |
// NullFields is a list of field names (e.g. "ReferenceId") to include in API |
| 3934 |
// requests with the JSON null value. By default, fields with empty values are |
| 3935 |
// omitted from API requests. See |
| 3936 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 3937 |
NullFields []string `json:"-"` |
| 3938 |
} |
| 3939 |
|
| 3940 |
func (s PrivateData) MarshalJSON() ([]byte, error) { |
| 3941 |
type NoMethod PrivateData |
| 3942 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 3943 |
} |
| 3944 |
|
| 3945 |
// Product: A product is a segment of inventory that a seller wants to sell. It |
| 3946 |
// is associated with certain terms and targeting information which helps the |
| 3947 |
// buyer know more about the inventory. |
| 3948 |
type Product struct { |
| 3949 |
// AvailableEndTime: The proposed end time for the deal. The field will be |
| 3950 |
// truncated to the order of seconds during serving. |
| 3951 |
AvailableEndTime string `json:"availableEndTime,omitempty"` |
| 3952 |
// AvailableStartTime: Inventory availability dates. The start time will be |
| 3953 |
// truncated to seconds during serving. Thus, a field specified as 3:23:34.456 |
| 3954 |
// (HH:mm:ss.SSS) will be truncated to 3:23:34 when serving. |
| 3955 |
AvailableStartTime string `json:"availableStartTime,omitempty"` |
| 3956 |
// CreateTime: Creation time. |
| 3957 |
CreateTime string `json:"createTime,omitempty"` |
| 3958 |
// CreatorContacts: Optional contact information for the creator of this |
| 3959 |
// product. |
| 3960 |
CreatorContacts []*ContactInformation `json:"creatorContacts,omitempty"` |
| 3961 |
// DisplayName: The display name for this product as set by the seller. |
| 3962 |
DisplayName string `json:"displayName,omitempty"` |
| 3963 |
// HasCreatorSignedOff: If the creator has already signed off on the product, |
| 3964 |
// then the buyer can finalize the deal by accepting the product as is. When |
| 3965 |
// copying to a proposal, if any of the terms are changed, then auto_finalize |
| 3966 |
// is automatically set to false. |
| 3967 |
HasCreatorSignedOff bool `json:"hasCreatorSignedOff,omitempty"` |
| 3968 |
// ProductId: The unique ID for the product. |
| 3969 |
ProductId string `json:"productId,omitempty"` |
| 3970 |
// ProductRevision: The revision number of the product (auto-assigned by |
| 3971 |
// Marketplace). |
| 3972 |
ProductRevision int64 `json:"productRevision,omitempty,string"` |
| 3973 |
// PublisherProfileId: An ID which can be used by the Publisher Profile API to |
| 3974 |
// get more information about the seller that created this product. |
| 3975 |
PublisherProfileId string `json:"publisherProfileId,omitempty"` |
| 3976 |
// Seller: Information about the seller that created this product. |
| 3977 |
Seller *Seller `json:"seller,omitempty"` |
| 3978 |
// SyndicationProduct: The syndication product associated with the deal. |
| 3979 |
// |
| 3980 |
// Possible values: |
| 3981 |
// "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined |
| 3982 |
// syndication product. |
| 3983 |
// "CONTENT" - This typically represents a web page. |
| 3984 |
// "MOBILE" - This represents a mobile property. |
| 3985 |
// "VIDEO" - This represents video ad formats. |
| 3986 |
// "GAMES" - This represents ads shown within games. |
| 3987 |
SyndicationProduct string `json:"syndicationProduct,omitempty"` |
| 3988 |
// TargetingCriterion: Targeting that is shared between the buyer and the |
| 3989 |
// seller. Each targeting criterion has a specified key and for each key there |
| 3990 |
// is a list of inclusion value or exclusion values. |
| 3991 |
TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"` |
| 3992 |
// Terms: The negotiable terms of the deal. |
| 3993 |
Terms *DealTerms `json:"terms,omitempty"` |
| 3994 |
// UpdateTime: Time of last update. |
| 3995 |
UpdateTime string `json:"updateTime,omitempty"` |
| 3996 |
// WebPropertyCode: The web-property code for the seller. This needs to be |
| 3997 |
// copied as is when adding a new deal to a proposal. |
| 3998 |
WebPropertyCode string `json:"webPropertyCode,omitempty"` |
| 3999 |
|
| 4000 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 4001 |
googleapi.ServerResponse `json:"-"` |
| 4002 |
// ForceSendFields is a list of field names (e.g. "AvailableEndTime") to |
| 4003 |
// unconditionally include in API requests. By default, fields with empty or |
| 4004 |
// default values are omitted from API requests. See |
| 4005 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4006 |
// details. |
| 4007 |
ForceSendFields []string `json:"-"` |
| 4008 |
// NullFields is a list of field names (e.g. "AvailableEndTime") to include in |
| 4009 |
// API requests with the JSON null value. By default, fields with empty values |
| 4010 |
// are omitted from API requests. See |
| 4011 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4012 |
NullFields []string `json:"-"` |
| 4013 |
} |
| 4014 |
|
| 4015 |
func (s Product) MarshalJSON() ([]byte, error) { |
| 4016 |
type NoMethod Product |
| 4017 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4018 |
} |
| 4019 |
|
| 4020 |
// Proposal: Represents a proposal in the Marketplace. A proposal is the unit |
| 4021 |
// of negotiation between a seller and a buyer and contains deals which are |
| 4022 |
// served. Note: You can't update, create, or otherwise modify Private Auction |
| 4023 |
// deals through the API. Fields are updatable unless noted otherwise. |
| 4024 |
type Proposal struct { |
| 4025 |
// BilledBuyer: Output only. Reference to the buyer that will get billed for |
| 4026 |
// this proposal. |
| 4027 |
BilledBuyer *Buyer `json:"billedBuyer,omitempty"` |
| 4028 |
// Buyer: Reference to the buyer on the proposal. Note: This field may be set |
| 4029 |
// only when creating the resource. Modifying this field while updating the |
| 4030 |
// resource will result in an error. |
| 4031 |
Buyer *Buyer `json:"buyer,omitempty"` |
| 4032 |
// BuyerContacts: Contact information for the buyer. |
| 4033 |
BuyerContacts []*ContactInformation `json:"buyerContacts,omitempty"` |
| 4034 |
// BuyerPrivateData: Private data for buyer. (hidden from seller). |
| 4035 |
BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` |
| 4036 |
// Deals: The deals associated with this proposal. For Private Auction |
| 4037 |
// proposals (whose deals have NonGuaranteedAuctionTerms), there will only be |
| 4038 |
// one deal. |
| 4039 |
Deals []*Deal `json:"deals,omitempty"` |
| 4040 |
// DisplayName: The name for the proposal. |
| 4041 |
DisplayName string `json:"displayName,omitempty"` |
| 4042 |
// IsRenegotiating: Output only. True if the proposal is being renegotiated. |
| 4043 |
IsRenegotiating bool `json:"isRenegotiating,omitempty"` |
| 4044 |
// IsSetupComplete: Output only. True, if the buyside inventory setup is |
| 4045 |
// complete for this proposal. |
| 4046 |
IsSetupComplete bool `json:"isSetupComplete,omitempty"` |
| 4047 |
// LastUpdaterOrCommentorRole: Output only. The role of the last user that |
| 4048 |
// either updated the proposal or left a comment. |
| 4049 |
// |
| 4050 |
// Possible values: |
| 4051 |
// "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined |
| 4052 |
// buyer/seller role. |
| 4053 |
// "BUYER" - Specifies the role as buyer. |
| 4054 |
// "SELLER" - Specifies the role as seller. |
| 4055 |
LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"` |
| 4056 |
// Notes: Output only. The notes associated with this proposal. |
| 4057 |
Notes []*Note `json:"notes,omitempty"` |
| 4058 |
// OriginatorRole: Output only. Indicates whether the buyer/seller created the |
| 4059 |
// proposal. |
| 4060 |
// |
| 4061 |
// Possible values: |
| 4062 |
// "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined |
| 4063 |
// buyer/seller role. |
| 4064 |
// "BUYER" - Specifies the role as buyer. |
| 4065 |
// "SELLER" - Specifies the role as seller. |
| 4066 |
OriginatorRole string `json:"originatorRole,omitempty"` |
| 4067 |
// PrivateAuctionId: Output only. Private auction ID if this proposal is a |
| 4068 |
// private auction proposal. |
| 4069 |
PrivateAuctionId string `json:"privateAuctionId,omitempty"` |
| 4070 |
// ProposalId: Output only. The unique ID of the proposal. |
| 4071 |
ProposalId string `json:"proposalId,omitempty"` |
| 4072 |
// ProposalRevision: Output only. The revision number for the proposal. Each |
| 4073 |
// update to the proposal or the deal causes the proposal revision number to |
| 4074 |
// auto-increment. The buyer keeps track of the last revision number they know |
| 4075 |
// of and pass it in when making an update. If the head revision number on the |
| 4076 |
// server has since incremented, then an ABORTED error is returned during the |
| 4077 |
// update operation to let the buyer know that a subsequent update was made. |
| 4078 |
ProposalRevision int64 `json:"proposalRevision,omitempty,string"` |
| 4079 |
// ProposalState: Output only. The current state of the proposal. |
| 4080 |
// |
| 4081 |
// Possible values: |
| 4082 |
// "PROPOSAL_STATE_UNSPECIFIED" - A placeholder for an undefined proposal |
| 4083 |
// state. |
| 4084 |
// "PROPOSED" - The proposal is under negotiation or renegotiation. |
| 4085 |
// "BUYER_ACCEPTED" - The proposal has been accepted by the buyer. |
| 4086 |
// "SELLER_ACCEPTED" - The proposal has been accepted by the seller. |
| 4087 |
// "CANCELED" - The negotiations on the proposal were canceled and the |
| 4088 |
// proposal was never finalized. |
| 4089 |
// "FINALIZED" - The proposal is finalized. During renegotiation, the |
| 4090 |
// proposal may not be in this state. |
| 4091 |
ProposalState string `json:"proposalState,omitempty"` |
| 4092 |
// Seller: Reference to the seller on the proposal. Note: This field may be set |
| 4093 |
// only when creating the resource. Modifying this field while updating the |
| 4094 |
// resource will result in an error. |
| 4095 |
Seller *Seller `json:"seller,omitempty"` |
| 4096 |
// SellerContacts: Output only. Contact information for the seller. |
| 4097 |
SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"` |
| 4098 |
// TermsAndConditions: Output only. The terms and conditions set by the |
| 4099 |
// publisher for this proposal. |
| 4100 |
TermsAndConditions string `json:"termsAndConditions,omitempty"` |
| 4101 |
// UpdateTime: Output only. The time when the proposal was last revised. |
| 4102 |
UpdateTime string `json:"updateTime,omitempty"` |
| 4103 |
|
| 4104 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 4105 |
googleapi.ServerResponse `json:"-"` |
| 4106 |
// ForceSendFields is a list of field names (e.g. "BilledBuyer") to |
| 4107 |
// unconditionally include in API requests. By default, fields with empty or |
| 4108 |
// default values are omitted from API requests. See |
| 4109 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4110 |
// details. |
| 4111 |
ForceSendFields []string `json:"-"` |
| 4112 |
// NullFields is a list of field names (e.g. "BilledBuyer") to include in API |
| 4113 |
// requests with the JSON null value. By default, fields with empty values are |
| 4114 |
// omitted from API requests. See |
| 4115 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4116 |
NullFields []string `json:"-"` |
| 4117 |
} |
| 4118 |
|
| 4119 |
func (s Proposal) MarshalJSON() ([]byte, error) { |
| 4120 |
type NoMethod Proposal |
| 4121 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4122 |
} |
| 4123 |
|
| 4124 |
// PublisherProfile: Represents a publisher profile |
| 4125 |
// (https://support.google.com/admanager/answer/6035806) in Marketplace. All |
| 4126 |
// fields are read only. All string fields are free-form text entered by the |
| 4127 |
// publisher unless noted otherwise. |
| 4128 |
type PublisherProfile struct { |
| 4129 |
// AudienceDescription: Description on the publisher's audience. |
| 4130 |
AudienceDescription string `json:"audienceDescription,omitempty"` |
| 4131 |
// BuyerPitchStatement: Statement explaining what's unique about publisher's |
| 4132 |
// business, and why buyers should partner with the publisher. |
| 4133 |
BuyerPitchStatement string `json:"buyerPitchStatement,omitempty"` |
| 4134 |
// DirectDealsContact: Contact information for direct reservation deals. This |
| 4135 |
// is free text entered by the publisher and may include information like |
| 4136 |
// names, phone numbers and email addresses. |
| 4137 |
DirectDealsContact string `json:"directDealsContact,omitempty"` |
| 4138 |
// DisplayName: Name of the publisher profile. |
| 4139 |
DisplayName string `json:"displayName,omitempty"` |
| 4140 |
// Domains: The list of domains represented in this publisher profile. Empty if |
| 4141 |
// this is a parent profile. These are top private domains, meaning that these |
| 4142 |
// will not contain a string like "photos.google.co.uk/123", but will instead |
| 4143 |
// contain "google.co.uk". |
| 4144 |
Domains []string `json:"domains,omitempty"` |
| 4145 |
// GooglePlusUrl: URL to publisher's Google+ page. |
| 4146 |
GooglePlusUrl string `json:"googlePlusUrl,omitempty"` |
| 4147 |
// IsParent: Indicates if this profile is the parent profile of the seller. A |
| 4148 |
// parent profile represents all the inventory from the seller, as opposed to |
| 4149 |
// child profile that is created to brand a portion of inventory. One seller |
| 4150 |
// should have only one parent publisher profile, and can have multiple child |
| 4151 |
// profiles. Publisher profiles for the same seller will have same value of |
| 4152 |
// field google.ads.adexchange.buyer.v2beta1.PublisherProfile.seller. See |
| 4153 |
// https://support.google.com/admanager/answer/6035806 for details. |
| 4154 |
IsParent bool `json:"isParent,omitempty"` |
| 4155 |
// LogoUrl: A Google public URL to the logo for this publisher profile. The |
| 4156 |
// logo is stored as a PNG, JPG, or GIF image. |
| 4157 |
LogoUrl string `json:"logoUrl,omitempty"` |
| 4158 |
// MediaKitUrl: URL to additional marketing and sales materials. |
| 4159 |
MediaKitUrl string `json:"mediaKitUrl,omitempty"` |
| 4160 |
// MobileApps: The list of apps represented in this publisher profile. Empty if |
| 4161 |
// this is a parent profile. |
| 4162 |
MobileApps []*PublisherProfileMobileApplication `json:"mobileApps,omitempty"` |
| 4163 |
// Overview: Overview of the publisher. |
| 4164 |
Overview string `json:"overview,omitempty"` |
| 4165 |
// ProgrammaticDealsContact: Contact information for programmatic deals. This |
| 4166 |
// is free text entered by the publisher and may include information like |
| 4167 |
// names, phone numbers and email addresses. |
| 4168 |
ProgrammaticDealsContact string `json:"programmaticDealsContact,omitempty"` |
| 4169 |
// PublisherProfileId: Unique ID for publisher profile. |
| 4170 |
PublisherProfileId string `json:"publisherProfileId,omitempty"` |
| 4171 |
// RateCardInfoUrl: URL to a publisher rate card. |
| 4172 |
RateCardInfoUrl string `json:"rateCardInfoUrl,omitempty"` |
| 4173 |
// SamplePageUrl: URL to a sample content page. |
| 4174 |
SamplePageUrl string `json:"samplePageUrl,omitempty"` |
| 4175 |
// Seller: Seller of the publisher profile. |
| 4176 |
Seller *Seller `json:"seller,omitempty"` |
| 4177 |
// TopHeadlines: Up to three key metrics and rankings. Max 100 characters each. |
| 4178 |
// For example "#1 Mobile News Site for 20 Straight Months". |
| 4179 |
TopHeadlines []string `json:"topHeadlines,omitempty"` |
| 4180 |
|
| 4181 |
// ServerResponse contains the HTTP response code and headers from the server. |
| 4182 |
googleapi.ServerResponse `json:"-"` |
| 4183 |
// ForceSendFields is a list of field names (e.g. "AudienceDescription") to |
| 4184 |
// unconditionally include in API requests. By default, fields with empty or |
| 4185 |
// default values are omitted from API requests. See |
| 4186 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4187 |
// details. |
| 4188 |
ForceSendFields []string `json:"-"` |
| 4189 |
// NullFields is a list of field names (e.g. "AudienceDescription") to include |
| 4190 |
// in API requests with the JSON null value. By default, fields with empty |
| 4191 |
// values are omitted from API requests. See |
| 4192 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4193 |
NullFields []string `json:"-"` |
| 4194 |
} |
| 4195 |
|
| 4196 |
func (s PublisherProfile) MarshalJSON() ([]byte, error) { |
| 4197 |
type NoMethod PublisherProfile |
| 4198 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4199 |
} |
| 4200 |
|
| 4201 |
// PublisherProfileMobileApplication: A mobile application that contains a |
| 4202 |
// external app ID, name, and app store. |
| 4203 |
type PublisherProfileMobileApplication struct { |
| 4204 |
// AppStore: The app store the app belongs to. |
| 4205 |
// |
| 4206 |
// Possible values: |
| 4207 |
// "APP_STORE_TYPE_UNSPECIFIED" - A placeholder for an unknown app store. |
| 4208 |
// "APPLE_ITUNES" - Apple iTunes |
| 4209 |
// "GOOGLE_PLAY" - Google Play |
| 4210 |
// "ROKU" - Roku |
| 4211 |
// "AMAZON_FIRETV" - Amazon Fire TV |
| 4212 |
// "PLAYSTATION" - Playstation |
| 4213 |
// "XBOX" - Xbox |
| 4214 |
// "SAMSUNG_TV" - Samsung TV |
| 4215 |
// "AMAZON" - Amazon Appstore |
| 4216 |
// "OPPO" - OPPO App Market |
| 4217 |
// "SAMSUNG" - Samsung Galaxy Store |
| 4218 |
// "VIVO" - VIVO App Store |
| 4219 |
// "XIAOMI" - Xiaomi GetApps |
| 4220 |
// "LG_TV" - LG TV |
| 4221 |
AppStore string `json:"appStore,omitempty"` |
| 4222 |
// ExternalAppId: The external ID for the app from its app store. |
| 4223 |
ExternalAppId string `json:"externalAppId,omitempty"` |
| 4224 |
// Name: The name of the app. |
| 4225 |
Name string `json:"name,omitempty"` |
| 4226 |
// ForceSendFields is a list of field names (e.g. "AppStore") to |
| 4227 |
// unconditionally include in API requests. By default, fields with empty or |
| 4228 |
// default values are omitted from API requests. See |
| 4229 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4230 |
// details. |
| 4231 |
ForceSendFields []string `json:"-"` |
| 4232 |
// NullFields is a list of field names (e.g. "AppStore") to include in API |
| 4233 |
// requests with the JSON null value. By default, fields with empty values are |
| 4234 |
// omitted from API requests. See |
| 4235 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4236 |
NullFields []string `json:"-"` |
| 4237 |
} |
| 4238 |
|
| 4239 |
func (s PublisherProfileMobileApplication) MarshalJSON() ([]byte, error) { |
| 4240 |
type NoMethod PublisherProfileMobileApplication |
| 4241 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4242 |
} |
| 4243 |
|
| 4244 |
// RealtimeTimeRange: An open-ended realtime time range specified by the start |
| 4245 |
// timestamp. For filter sets that specify a realtime time range RTB metrics |
| 4246 |
// continue to be aggregated throughout the lifetime of the filter set. |
| 4247 |
type RealtimeTimeRange struct { |
| 4248 |
// StartTimestamp: The start timestamp of the real-time RTB metrics |
| 4249 |
// aggregation. |
| 4250 |
StartTimestamp string `json:"startTimestamp,omitempty"` |
| 4251 |
// ForceSendFields is a list of field names (e.g. "StartTimestamp") to |
| 4252 |
// unconditionally include in API requests. By default, fields with empty or |
| 4253 |
// default values are omitted from API requests. See |
| 4254 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4255 |
// details. |
| 4256 |
ForceSendFields []string `json:"-"` |
| 4257 |
// NullFields is a list of field names (e.g. "StartTimestamp") to include in |
| 4258 |
// API requests with the JSON null value. By default, fields with empty values |
| 4259 |
// are omitted from API requests. See |
| 4260 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4261 |
NullFields []string `json:"-"` |
| 4262 |
} |
| 4263 |
|
| 4264 |
func (s RealtimeTimeRange) MarshalJSON() ([]byte, error) { |
| 4265 |
type NoMethod RealtimeTimeRange |
| 4266 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4267 |
} |
| 4268 |
|
| 4269 |
// RelativeDateRange: A relative date range, specified by an offset and a |
| 4270 |
// duration. The supported range of dates begins 30 days before today and ends |
| 4271 |
// today, for example, the limits for these values are: offset_days >= 0 |
| 4272 |
// duration_days >= 1 offset_days + duration_days <= 30 |
| 4273 |
type RelativeDateRange struct { |
| 4274 |
// DurationDays: The number of days in the requested date range, for example, |
| 4275 |
// for a range spanning today: 1. For a range spanning the last 7 days: 7. |
| 4276 |
DurationDays int64 `json:"durationDays,omitempty"` |
| 4277 |
// OffsetDays: The end date of the filter set, specified as the number of days |
| 4278 |
// before today, for example, for a range where the last date is today: 0. |
| 4279 |
OffsetDays int64 `json:"offsetDays,omitempty"` |
| 4280 |
// ForceSendFields is a list of field names (e.g. "DurationDays") to |
| 4281 |
// unconditionally include in API requests. By default, fields with empty or |
| 4282 |
// default values are omitted from API requests. See |
| 4283 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4284 |
// details. |
| 4285 |
ForceSendFields []string `json:"-"` |
| 4286 |
// NullFields is a list of field names (e.g. "DurationDays") to include in API |
| 4287 |
// requests with the JSON null value. By default, fields with empty values are |
| 4288 |
// omitted from API requests. See |
| 4289 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4290 |
NullFields []string `json:"-"` |
| 4291 |
} |
| 4292 |
|
| 4293 |
func (s RelativeDateRange) MarshalJSON() ([]byte, error) { |
| 4294 |
type NoMethod RelativeDateRange |
| 4295 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4296 |
} |
| 4297 |
|
| 4298 |
// RemoveDealAssociationRequest: A request for removing the association between |
| 4299 |
// a deal and a creative. |
| 4300 |
type RemoveDealAssociationRequest struct { |
| 4301 |
// Association: The association between a creative and a deal that should be |
| 4302 |
// removed. |
| 4303 |
Association *CreativeDealAssociation `json:"association,omitempty"` |
| 4304 |
// ForceSendFields is a list of field names (e.g. "Association") to |
| 4305 |
// unconditionally include in API requests. By default, fields with empty or |
| 4306 |
// default values are omitted from API requests. See |
| 4307 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4308 |
// details. |
| 4309 |
ForceSendFields []string `json:"-"` |
| 4310 |
// NullFields is a list of field names (e.g. "Association") to include in API |
| 4311 |
// requests with the JSON null value. By default, fields with empty values are |
| 4312 |
// omitted from API requests. See |
| 4313 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4314 |
NullFields []string `json:"-"` |
| 4315 |
} |
| 4316 |
|
| 4317 |
func (s RemoveDealAssociationRequest) MarshalJSON() ([]byte, error) { |
| 4318 |
type NoMethod RemoveDealAssociationRequest |
| 4319 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4320 |
} |
| 4321 |
|
| 4322 |
// ResumeProposalDealsRequest: Request message to resume (unpause) serving for |
| 4323 |
// already-finalized deals. |
| 4324 |
type ResumeProposalDealsRequest struct { |
| 4325 |
// ExternalDealIds: The external_deal_id's of the deals to resume. If empty, |
| 4326 |
// all the deals in the proposal will be resumed. |
| 4327 |
ExternalDealIds []string `json:"externalDealIds,omitempty"` |
| 4328 |
// ForceSendFields is a list of field names (e.g. "ExternalDealIds") to |
| 4329 |
// unconditionally include in API requests. By default, fields with empty or |
| 4330 |
// default values are omitted from API requests. See |
| 4331 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4332 |
// details. |
| 4333 |
ForceSendFields []string `json:"-"` |
| 4334 |
// NullFields is a list of field names (e.g. "ExternalDealIds") to include in |
| 4335 |
// API requests with the JSON null value. By default, fields with empty values |
| 4336 |
// are omitted from API requests. See |
| 4337 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4338 |
NullFields []string `json:"-"` |
| 4339 |
} |
| 4340 |
|
| 4341 |
func (s ResumeProposalDealsRequest) MarshalJSON() ([]byte, error) { |
| 4342 |
type NoMethod ResumeProposalDealsRequest |
| 4343 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4344 |
} |
| 4345 |
|
| 4346 |
// ResumeProposalRequest: Request message to resume (unpause) serving for an |
| 4347 |
// already-finalized proposal. |
| 4348 |
type ResumeProposalRequest struct { |
| 4349 |
} |
| 4350 |
|
| 4351 |
// RowDimensions: A response may include multiple rows, breaking down along |
| 4352 |
// various dimensions. Encapsulates the values of all dimensions for a given |
| 4353 |
// row. |
| 4354 |
type RowDimensions struct { |
| 4355 |
// PublisherIdentifier: The publisher identifier for this row, if a breakdown |
| 4356 |
// by BreakdownDimension.PUBLISHER_IDENTIFIER |
| 4357 |
// (https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.filterSets#FilterSet.BreakdownDimension) |
| 4358 |
// was requested. |
| 4359 |
PublisherIdentifier string `json:"publisherIdentifier,omitempty"` |
| 4360 |
// TimeInterval: The time interval that this row represents. |
| 4361 |
TimeInterval *TimeInterval `json:"timeInterval,omitempty"` |
| 4362 |
// ForceSendFields is a list of field names (e.g. "PublisherIdentifier") to |
| 4363 |
// unconditionally include in API requests. By default, fields with empty or |
| 4364 |
// default values are omitted from API requests. See |
| 4365 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4366 |
// details. |
| 4367 |
ForceSendFields []string `json:"-"` |
| 4368 |
// NullFields is a list of field names (e.g. "PublisherIdentifier") to include |
| 4369 |
// in API requests with the JSON null value. By default, fields with empty |
| 4370 |
// values are omitted from API requests. See |
| 4371 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4372 |
NullFields []string `json:"-"` |
| 4373 |
} |
| 4374 |
|
| 4375 |
func (s RowDimensions) MarshalJSON() ([]byte, error) { |
| 4376 |
type NoMethod RowDimensions |
| 4377 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4378 |
} |
| 4379 |
|
| 4380 |
// SecurityContext: Output only. A security context. |
| 4381 |
type SecurityContext struct { |
| 4382 |
// Securities: The security types in this context. |
| 4383 |
// |
| 4384 |
// Possible values: |
| 4385 |
// "INSECURE" - Matches impressions that require insecure compatibility. |
| 4386 |
// "SSL" - Matches impressions that require SSL compatibility. |
| 4387 |
Securities []string `json:"securities,omitempty"` |
| 4388 |
// ForceSendFields is a list of field names (e.g. "Securities") to |
| 4389 |
// unconditionally include in API requests. By default, fields with empty or |
| 4390 |
// default values are omitted from API requests. See |
| 4391 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4392 |
// details. |
| 4393 |
ForceSendFields []string `json:"-"` |
| 4394 |
// NullFields is a list of field names (e.g. "Securities") to include in API |
| 4395 |
// requests with the JSON null value. By default, fields with empty values are |
| 4396 |
// omitted from API requests. See |
| 4397 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4398 |
NullFields []string `json:"-"` |
| 4399 |
} |
| 4400 |
|
| 4401 |
func (s SecurityContext) MarshalJSON() ([]byte, error) { |
| 4402 |
type NoMethod SecurityContext |
| 4403 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4404 |
} |
| 4405 |
|
| 4406 |
// Seller: Represents a seller of inventory. Each seller is identified by a |
| 4407 |
// unique Ad Manager account ID. |
| 4408 |
type Seller struct { |
| 4409 |
// AccountId: The unique ID for the seller. The seller fills in this field. The |
| 4410 |
// seller account ID is then available to buyer in the product. |
| 4411 |
AccountId string `json:"accountId,omitempty"` |
| 4412 |
// SubAccountId: Output only. Ad manager network code for the seller. |
| 4413 |
SubAccountId string `json:"subAccountId,omitempty"` |
| 4414 |
// ForceSendFields is a list of field names (e.g. "AccountId") to |
| 4415 |
// unconditionally include in API requests. By default, fields with empty or |
| 4416 |
// default values are omitted from API requests. See |
| 4417 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4418 |
// details. |
| 4419 |
ForceSendFields []string `json:"-"` |
| 4420 |
// NullFields is a list of field names (e.g. "AccountId") to include in API |
| 4421 |
// requests with the JSON null value. By default, fields with empty values are |
| 4422 |
// omitted from API requests. See |
| 4423 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4424 |
NullFields []string `json:"-"` |
| 4425 |
} |
| 4426 |
|
| 4427 |
func (s Seller) MarshalJSON() ([]byte, error) { |
| 4428 |
type NoMethod Seller |
| 4429 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4430 |
} |
| 4431 |
|
| 4432 |
// ServingContext: The serving context for this restriction. |
| 4433 |
type ServingContext struct { |
| 4434 |
// All: Matches all contexts. |
| 4435 |
// |
| 4436 |
// Possible values: |
| 4437 |
// "SIMPLE_CONTEXT" - A simple context. |
| 4438 |
All string `json:"all,omitempty"` |
| 4439 |
// AppType: Matches impressions for a particular app type. |
| 4440 |
AppType *AppContext `json:"appType,omitempty"` |
| 4441 |
// AuctionType: Matches impressions for a particular auction type. |
| 4442 |
AuctionType *AuctionContext `json:"auctionType,omitempty"` |
| 4443 |
// Location: Matches impressions coming from users *or* publishers in a |
| 4444 |
// specific location. |
| 4445 |
Location *LocationContext `json:"location,omitempty"` |
| 4446 |
// Platform: Matches impressions coming from a particular platform. |
| 4447 |
Platform *PlatformContext `json:"platform,omitempty"` |
| 4448 |
// SecurityType: Matches impressions for a particular security type. |
| 4449 |
SecurityType *SecurityContext `json:"securityType,omitempty"` |
| 4450 |
// ForceSendFields is a list of field names (e.g. "All") to unconditionally |
| 4451 |
// include in API requests. By default, fields with empty or default values are |
| 4452 |
// omitted from API requests. See |
| 4453 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4454 |
// details. |
| 4455 |
ForceSendFields []string `json:"-"` |
| 4456 |
// NullFields is a list of field names (e.g. "All") to include in API requests |
| 4457 |
// with the JSON null value. By default, fields with empty values are omitted |
| 4458 |
// from API requests. See |
| 4459 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4460 |
NullFields []string `json:"-"` |
| 4461 |
} |
| 4462 |
|
| 4463 |
func (s ServingContext) MarshalJSON() ([]byte, error) { |
| 4464 |
type NoMethod ServingContext |
| 4465 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4466 |
} |
| 4467 |
|
| 4468 |
// ServingRestriction: Output only. A representation of the status of an ad in |
| 4469 |
// a specific context. A context here relates to where something ultimately |
| 4470 |
// serves (for example, a user or publisher geo, a platform, an HTTPS versus |
| 4471 |
// HTTP request, or the type of auction). |
| 4472 |
type ServingRestriction struct { |
| 4473 |
// Contexts: The contexts for the restriction. |
| 4474 |
Contexts []*ServingContext `json:"contexts,omitempty"` |
| 4475 |
// Disapproval: Disapproval bound to this restriction. Only present if |
| 4476 |
// status=DISAPPROVED. Can be used to filter the response of the creatives.list |
| 4477 |
// method. |
| 4478 |
Disapproval *Disapproval `json:"disapproval,omitempty"` |
| 4479 |
// DisapprovalReasons: Any disapprovals bound to this restriction. Only present |
| 4480 |
// if status=DISAPPROVED. Can be used to filter the response of the |
| 4481 |
// creatives.list method. Deprecated; use disapproval field instead. |
| 4482 |
DisapprovalReasons []*Disapproval `json:"disapprovalReasons,omitempty"` |
| 4483 |
// Status: The status of the creative in this context (for example, it has been |
| 4484 |
// explicitly disapproved or is pending review). |
| 4485 |
// |
| 4486 |
// Possible values: |
| 4487 |
// "STATUS_UNSPECIFIED" - The status is not known. |
| 4488 |
// "DISAPPROVAL" - The ad was disapproved in this context. |
| 4489 |
// "PENDING_REVIEW" - The ad is pending review in this context. |
| 4490 |
Status string `json:"status,omitempty"` |
| 4491 |
// ForceSendFields is a list of field names (e.g. "Contexts") to |
| 4492 |
// unconditionally include in API requests. By default, fields with empty or |
| 4493 |
// default values are omitted from API requests. See |
| 4494 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4495 |
// details. |
| 4496 |
ForceSendFields []string `json:"-"` |
| 4497 |
// NullFields is a list of field names (e.g. "Contexts") to include in API |
| 4498 |
// requests with the JSON null value. By default, fields with empty values are |
| 4499 |
// omitted from API requests. See |
| 4500 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4501 |
NullFields []string `json:"-"` |
| 4502 |
} |
| 4503 |
|
| 4504 |
func (s ServingRestriction) MarshalJSON() ([]byte, error) { |
| 4505 |
type NoMethod ServingRestriction |
| 4506 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4507 |
} |
| 4508 |
|
| 4509 |
// Size: Message depicting the size of the creative. The units of width and |
| 4510 |
// height depend on the type of the targeting. |
| 4511 |
type Size struct { |
| 4512 |
// Height: The height of the creative. |
| 4513 |
Height int64 `json:"height,omitempty"` |
| 4514 |
// Width: The width of the creative |
| 4515 |
Width int64 `json:"width,omitempty"` |
| 4516 |
// ForceSendFields is a list of field names (e.g. "Height") to unconditionally |
| 4517 |
// include in API requests. By default, fields with empty or default values are |
| 4518 |
// omitted from API requests. See |
| 4519 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4520 |
// details. |
| 4521 |
ForceSendFields []string `json:"-"` |
| 4522 |
// NullFields is a list of field names (e.g. "Height") to include in API |
| 4523 |
// requests with the JSON null value. By default, fields with empty values are |
| 4524 |
// omitted from API requests. See |
| 4525 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4526 |
NullFields []string `json:"-"` |
| 4527 |
} |
| 4528 |
|
| 4529 |
func (s Size) MarshalJSON() ([]byte, error) { |
| 4530 |
type NoMethod Size |
| 4531 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4532 |
} |
| 4533 |
|
| 4534 |
// StopWatchingCreativeRequest: A request for stopping notifications for |
| 4535 |
// changes to creative Status. |
| 4536 |
type StopWatchingCreativeRequest struct { |
| 4537 |
} |
| 4538 |
|
| 4539 |
// TargetingCriteria: Advertisers can target different attributes of an ad |
| 4540 |
// slot. For example, they can choose to show ads only if the user is in the |
| 4541 |
// U.S. Such targeting criteria can be specified as part of Shared Targeting. |
| 4542 |
type TargetingCriteria struct { |
| 4543 |
// Exclusions: The list of values to exclude from targeting. Each value is |
| 4544 |
// AND'd together. |
| 4545 |
Exclusions []*TargetingValue `json:"exclusions,omitempty"` |
| 4546 |
// Inclusions: The list of value to include as part of the targeting. Each |
| 4547 |
// value is OR'd together. |
| 4548 |
Inclusions []*TargetingValue `json:"inclusions,omitempty"` |
| 4549 |
// Key: The key representing the shared targeting criterion. Targeting criteria |
| 4550 |
// defined by Google ad servers will begin with GOOG_. Third parties may define |
| 4551 |
// their own keys. A list of permissible keys along with the acceptable values |
| 4552 |
// will be provided as part of the external documentation. |
| 4553 |
Key string `json:"key,omitempty"` |
| 4554 |
// ForceSendFields is a list of field names (e.g. "Exclusions") to |
| 4555 |
// unconditionally include in API requests. By default, fields with empty or |
| 4556 |
// default values are omitted from API requests. See |
| 4557 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4558 |
// details. |
| 4559 |
ForceSendFields []string `json:"-"` |
| 4560 |
// NullFields is a list of field names (e.g. "Exclusions") to include in API |
| 4561 |
// requests with the JSON null value. By default, fields with empty values are |
| 4562 |
// omitted from API requests. See |
| 4563 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4564 |
NullFields []string `json:"-"` |
| 4565 |
} |
| 4566 |
|
| 4567 |
func (s TargetingCriteria) MarshalJSON() ([]byte, error) { |
| 4568 |
type NoMethod TargetingCriteria |
| 4569 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4570 |
} |
| 4571 |
|
| 4572 |
// TargetingValue: A polymorphic targeting value used as part of Shared |
| 4573 |
// Targeting. |
| 4574 |
type TargetingValue struct { |
| 4575 |
// CreativeSizeValue: The creative size value to include/exclude. Filled in |
| 4576 |
// when key = GOOG_CREATIVE_SIZE |
| 4577 |
CreativeSizeValue *CreativeSize `json:"creativeSizeValue,omitempty"` |
| 4578 |
// DayPartTargetingValue: The daypart targeting to include / exclude. Filled in |
| 4579 |
// when the key is GOOG_DAYPART_TARGETING. The definition of this targeting is |
| 4580 |
// derived from the structure used by Ad Manager. |
| 4581 |
DayPartTargetingValue *DayPartTargeting `json:"dayPartTargetingValue,omitempty"` |
| 4582 |
// LongValue: The long value to include/exclude. |
| 4583 |
LongValue int64 `json:"longValue,omitempty,string"` |
| 4584 |
// StringValue: The string value to include/exclude. |
| 4585 |
StringValue string `json:"stringValue,omitempty"` |
| 4586 |
// ForceSendFields is a list of field names (e.g. "CreativeSizeValue") to |
| 4587 |
// unconditionally include in API requests. By default, fields with empty or |
| 4588 |
// default values are omitted from API requests. See |
| 4589 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4590 |
// details. |
| 4591 |
ForceSendFields []string `json:"-"` |
| 4592 |
// NullFields is a list of field names (e.g. "CreativeSizeValue") to include in |
| 4593 |
// API requests with the JSON null value. By default, fields with empty values |
| 4594 |
// are omitted from API requests. See |
| 4595 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4596 |
NullFields []string `json:"-"` |
| 4597 |
} |
| 4598 |
|
| 4599 |
func (s TargetingValue) MarshalJSON() ([]byte, error) { |
| 4600 |
type NoMethod TargetingValue |
| 4601 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4602 |
} |
| 4603 |
|
| 4604 |
// TechnologyTargeting: Represents targeting about various types of technology. |
| 4605 |
type TechnologyTargeting struct { |
| 4606 |
// DeviceCapabilityTargeting: IDs of device capabilities to be |
| 4607 |
// included/excluded. |
| 4608 |
DeviceCapabilityTargeting *CriteriaTargeting `json:"deviceCapabilityTargeting,omitempty"` |
| 4609 |
// DeviceCategoryTargeting: IDs of device categories to be included/excluded. |
| 4610 |
DeviceCategoryTargeting *CriteriaTargeting `json:"deviceCategoryTargeting,omitempty"` |
| 4611 |
// OperatingSystemTargeting: Operating system related targeting information. |
| 4612 |
OperatingSystemTargeting *OperatingSystemTargeting `json:"operatingSystemTargeting,omitempty"` |
| 4613 |
// ForceSendFields is a list of field names (e.g. "DeviceCapabilityTargeting") |
| 4614 |
// to unconditionally include in API requests. By default, fields with empty or |
| 4615 |
// default values are omitted from API requests. See |
| 4616 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4617 |
// details. |
| 4618 |
ForceSendFields []string `json:"-"` |
| 4619 |
// NullFields is a list of field names (e.g. "DeviceCapabilityTargeting") to |
| 4620 |
// include in API requests with the JSON null value. By default, fields with |
| 4621 |
// empty values are omitted from API requests. See |
| 4622 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4623 |
NullFields []string `json:"-"` |
| 4624 |
} |
| 4625 |
|
| 4626 |
func (s TechnologyTargeting) MarshalJSON() ([]byte, error) { |
| 4627 |
type NoMethod TechnologyTargeting |
| 4628 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4629 |
} |
| 4630 |
|
| 4631 |
// TimeInterval: An interval of time, with an absolute start and end. |
| 4632 |
type TimeInterval struct { |
| 4633 |
// EndTime: The timestamp marking the end of the range (exclusive) for which |
| 4634 |
// data is included. |
| 4635 |
EndTime string `json:"endTime,omitempty"` |
| 4636 |
// StartTime: The timestamp marking the start of the range (inclusive) for |
| 4637 |
// which data is included. |
| 4638 |
StartTime string `json:"startTime,omitempty"` |
| 4639 |
// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally |
| 4640 |
// include in API requests. By default, fields with empty or default values are |
| 4641 |
// omitted from API requests. See |
| 4642 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4643 |
// details. |
| 4644 |
ForceSendFields []string `json:"-"` |
| 4645 |
// NullFields is a list of field names (e.g. "EndTime") to include in API |
| 4646 |
// requests with the JSON null value. By default, fields with empty values are |
| 4647 |
// omitted from API requests. See |
| 4648 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4649 |
NullFields []string `json:"-"` |
| 4650 |
} |
| 4651 |
|
| 4652 |
func (s TimeInterval) MarshalJSON() ([]byte, error) { |
| 4653 |
type NoMethod TimeInterval |
| 4654 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4655 |
} |
| 4656 |
|
| 4657 |
// TimeOfDay: Represents a time of day. The date and time zone are either not |
| 4658 |
// significant or are specified elsewhere. An API may choose to allow leap |
| 4659 |
// seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. |
| 4660 |
type TimeOfDay struct { |
| 4661 |
// Hours: Hours of a day in 24 hour format. Must be greater than or equal to 0 |
| 4662 |
// and typically must be less than or equal to 23. An API may choose to allow |
| 4663 |
// the value "24:00:00" for scenarios like business closing time. |
| 4664 |
Hours int64 `json:"hours,omitempty"` |
| 4665 |
// Minutes: Minutes of an hour. Must be greater than or equal to 0 and less |
| 4666 |
// than or equal to 59. |
| 4667 |
Minutes int64 `json:"minutes,omitempty"` |
| 4668 |
// Nanos: Fractions of seconds, in nanoseconds. Must be greater than or equal |
| 4669 |
// to 0 and less than or equal to 999,999,999. |
| 4670 |
Nanos int64 `json:"nanos,omitempty"` |
| 4671 |
// Seconds: Seconds of a minute. Must be greater than or equal to 0 and |
| 4672 |
// typically must be less than or equal to 59. An API may allow the value 60 if |
| 4673 |
// it allows leap-seconds. |
| 4674 |
Seconds int64 `json:"seconds,omitempty"` |
| 4675 |
// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally |
| 4676 |
// include in API requests. By default, fields with empty or default values are |
| 4677 |
// omitted from API requests. See |
| 4678 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4679 |
// details. |
| 4680 |
ForceSendFields []string `json:"-"` |
| 4681 |
// NullFields is a list of field names (e.g. "Hours") to include in API |
| 4682 |
// requests with the JSON null value. By default, fields with empty values are |
| 4683 |
// omitted from API requests. See |
| 4684 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4685 |
NullFields []string `json:"-"` |
| 4686 |
} |
| 4687 |
|
| 4688 |
func (s TimeOfDay) MarshalJSON() ([]byte, error) { |
| 4689 |
type NoMethod TimeOfDay |
| 4690 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4691 |
} |
| 4692 |
|
| 4693 |
// UrlTargeting: Represents a list of targeted and excluded URLs (for example, |
| 4694 |
// google.com). For Private Auction and AdX Preferred Deals, URLs are either |
| 4695 |
// included or excluded. For Programmatic Guaranteed and Preferred Deals, this |
| 4696 |
// doesn't apply. |
| 4697 |
type UrlTargeting struct { |
| 4698 |
// ExcludedUrls: A list of URLs to be excluded. |
| 4699 |
ExcludedUrls []string `json:"excludedUrls,omitempty"` |
| 4700 |
// TargetedUrls: A list of URLs to be included. |
| 4701 |
TargetedUrls []string `json:"targetedUrls,omitempty"` |
| 4702 |
// ForceSendFields is a list of field names (e.g. "ExcludedUrls") to |
| 4703 |
// unconditionally include in API requests. By default, fields with empty or |
| 4704 |
// default values are omitted from API requests. See |
| 4705 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4706 |
// details. |
| 4707 |
ForceSendFields []string `json:"-"` |
| 4708 |
// NullFields is a list of field names (e.g. "ExcludedUrls") to include in API |
| 4709 |
// requests with the JSON null value. By default, fields with empty values are |
| 4710 |
// omitted from API requests. See |
| 4711 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4712 |
NullFields []string `json:"-"` |
| 4713 |
} |
| 4714 |
|
| 4715 |
func (s UrlTargeting) MarshalJSON() ([]byte, error) { |
| 4716 |
type NoMethod UrlTargeting |
| 4717 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4718 |
} |
| 4719 |
|
| 4720 |
// VideoContent: Video content for a creative. |
| 4721 |
type VideoContent struct { |
| 4722 |
// VideoUrl: The URL to fetch a video ad. |
| 4723 |
VideoUrl string `json:"videoUrl,omitempty"` |
| 4724 |
// VideoVastXml: The contents of a VAST document for a video ad. This document |
| 4725 |
// should conform to the VAST 2.0 or 3.0 standard. |
| 4726 |
VideoVastXml string `json:"videoVastXml,omitempty"` |
| 4727 |
// ForceSendFields is a list of field names (e.g. "VideoUrl") to |
| 4728 |
// unconditionally include in API requests. By default, fields with empty or |
| 4729 |
// default values are omitted from API requests. See |
| 4730 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4731 |
// details. |
| 4732 |
ForceSendFields []string `json:"-"` |
| 4733 |
// NullFields is a list of field names (e.g. "VideoUrl") to include in API |
| 4734 |
// requests with the JSON null value. By default, fields with empty values are |
| 4735 |
// omitted from API requests. See |
| 4736 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4737 |
NullFields []string `json:"-"` |
| 4738 |
} |
| 4739 |
|
| 4740 |
func (s VideoContent) MarshalJSON() ([]byte, error) { |
| 4741 |
type NoMethod VideoContent |
| 4742 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4743 |
} |
| 4744 |
|
| 4745 |
// VideoTargeting: Represents targeting information about video. |
| 4746 |
type VideoTargeting struct { |
| 4747 |
// ExcludedPositionTypes: A list of video positions to be excluded. Position |
| 4748 |
// types can either be included or excluded (XOR). |
| 4749 |
// |
| 4750 |
// Possible values: |
| 4751 |
// "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video |
| 4752 |
// position. |
| 4753 |
// "PREROLL" - Ad is played before the video. |
| 4754 |
// "MIDROLL" - Ad is played during the video. |
| 4755 |
// "POSTROLL" - Ad is played after the video. |
| 4756 |
ExcludedPositionTypes []string `json:"excludedPositionTypes,omitempty"` |
| 4757 |
// TargetedPositionTypes: A list of video positions to be included. When the |
| 4758 |
// included list is present, the excluded list must be empty. When the excluded |
| 4759 |
// list is present, the included list must be empty. |
| 4760 |
// |
| 4761 |
// Possible values: |
| 4762 |
// "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video |
| 4763 |
// position. |
| 4764 |
// "PREROLL" - Ad is played before the video. |
| 4765 |
// "MIDROLL" - Ad is played during the video. |
| 4766 |
// "POSTROLL" - Ad is played after the video. |
| 4767 |
TargetedPositionTypes []string `json:"targetedPositionTypes,omitempty"` |
| 4768 |
// ForceSendFields is a list of field names (e.g. "ExcludedPositionTypes") to |
| 4769 |
// unconditionally include in API requests. By default, fields with empty or |
| 4770 |
// default values are omitted from API requests. See |
| 4771 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4772 |
// details. |
| 4773 |
ForceSendFields []string `json:"-"` |
| 4774 |
// NullFields is a list of field names (e.g. "ExcludedPositionTypes") to |
| 4775 |
// include in API requests with the JSON null value. By default, fields with |
| 4776 |
// empty values are omitted from API requests. See |
| 4777 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4778 |
NullFields []string `json:"-"` |
| 4779 |
} |
| 4780 |
|
| 4781 |
func (s VideoTargeting) MarshalJSON() ([]byte, error) { |
| 4782 |
type NoMethod VideoTargeting |
| 4783 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4784 |
} |
| 4785 |
|
| 4786 |
// WatchCreativeRequest: A request for watching changes to creative Status. |
| 4787 |
type WatchCreativeRequest struct { |
| 4788 |
// Topic: The Pub/Sub topic to publish notifications to. This topic must |
| 4789 |
// already exist and must give permission to |
| 4790 |
// [email protected] to write to the topic. This should be |
| 4791 |
// the full resource name in "projects/{project_id}/topics/{topic_id}" format. |
| 4792 |
Topic string `json:"topic,omitempty"` |
| 4793 |
// ForceSendFields is a list of field names (e.g. "Topic") to unconditionally |
| 4794 |
// include in API requests. By default, fields with empty or default values are |
| 4795 |
// omitted from API requests. See |
| 4796 |
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more |
| 4797 |
// details. |
| 4798 |
ForceSendFields []string `json:"-"` |
| 4799 |
// NullFields is a list of field names (e.g. "Topic") to include in API |
| 4800 |
// requests with the JSON null value. By default, fields with empty values are |
| 4801 |
// omitted from API requests. See |
| 4802 |
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. |
| 4803 |
NullFields []string `json:"-"` |
| 4804 |
} |
| 4805 |
|
| 4806 |
func (s WatchCreativeRequest) MarshalJSON() ([]byte, error) { |
| 4807 |
type NoMethod WatchCreativeRequest |
| 4808 |
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) |
| 4809 |
} |
| 4810 |
|
| 4811 |
type AccountsClientsCreateCall struct { |
| 4812 |
s *Service |
| 4813 |
accountId int64 |
| 4814 |
client *Client |
| 4815 |
urlParams_ gensupport.URLParams |
| 4816 |
ctx_ context.Context |
| 4817 |
header_ http.Header |
| 4818 |
} |
| 4819 |
|
| 4820 |
// Create: Creates a new client buyer. |
| 4821 |
// |
| 4822 |
// - accountId: Unique numerical account ID for the buyer of which the client |
| 4823 |
// buyer is a customer; the sponsor buyer to create a client for. (required). |
| 4824 |
func (r *AccountsClientsService) Create(accountId int64, client *Client) *AccountsClientsCreateCall { |
| 4825 |
c := &AccountsClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 4826 |
c.accountId = accountId |
| 4827 |
c.client = client |
| 4828 |
return c |
| 4829 |
} |
| 4830 |
|
| 4831 |
// Fields allows partial responses to be retrieved. See |
| 4832 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 4833 |
// details. |
| 4834 |
func (c *AccountsClientsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsCreateCall { |
| 4835 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 4836 |
return c |
| 4837 |
} |
| 4838 |
|
| 4839 |
// Context sets the context to be used in this call's Do method. |
| 4840 |
func (c *AccountsClientsCreateCall) Context(ctx context.Context) *AccountsClientsCreateCall { |
| 4841 |
c.ctx_ = ctx |
| 4842 |
return c |
| 4843 |
} |
| 4844 |
|
| 4845 |
// Header returns a http.Header that can be modified by the caller to add |
| 4846 |
// headers to the request. |
| 4847 |
func (c *AccountsClientsCreateCall) Header() http.Header { |
| 4848 |
if c.header_ == nil { |
| 4849 |
c.header_ = make(http.Header) |
| 4850 |
} |
| 4851 |
return c.header_ |
| 4852 |
} |
| 4853 |
|
| 4854 |
func (c *AccountsClientsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 4855 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 4856 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.client) |
| 4857 |
if err != nil { |
| 4858 |
return nil, err |
| 4859 |
} |
| 4860 |
c.urlParams_.Set("alt", alt) |
| 4861 |
c.urlParams_.Set("prettyPrint", "false") |
| 4862 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients") |
| 4863 |
urls += "?" + c.urlParams_.Encode() |
| 4864 |
req, err := http.NewRequest("POST", urls, body) |
| 4865 |
if err != nil { |
| 4866 |
return nil, err |
| 4867 |
} |
| 4868 |
req.Header = reqHeaders |
| 4869 |
googleapi.Expand(req.URL, map[string]string{ |
| 4870 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 4871 |
}) |
| 4872 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 4873 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 4874 |
} |
| 4875 |
|
| 4876 |
// Do executes the "adexchangebuyer2.accounts.clients.create" call. |
| 4877 |
// Any non-2xx status code is an error. Response headers are in either |
| 4878 |
// *Client.ServerResponse.Header or (if a response was returned at all) in |
| 4879 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 4880 |
// whether the returned error was because http.StatusNotModified was returned. |
| 4881 |
func (c *AccountsClientsCreateCall) Do(opts ...googleapi.CallOption) (*Client, error) { |
| 4882 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 4883 |
res, err := c.doRequest("json") |
| 4884 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 4885 |
if res.Body != nil { |
| 4886 |
res.Body.Close() |
| 4887 |
} |
| 4888 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 4889 |
Code: res.StatusCode, |
| 4890 |
Header: res.Header, |
| 4891 |
}) |
| 4892 |
} |
| 4893 |
if err != nil { |
| 4894 |
return nil, err |
| 4895 |
} |
| 4896 |
defer googleapi.CloseBody(res) |
| 4897 |
if err := googleapi.CheckResponse(res); err != nil { |
| 4898 |
return nil, gensupport.WrapError(err) |
| 4899 |
} |
| 4900 |
ret := &Client{ |
| 4901 |
ServerResponse: googleapi.ServerResponse{ |
| 4902 |
Header: res.Header, |
| 4903 |
HTTPStatusCode: res.StatusCode, |
| 4904 |
}, |
| 4905 |
} |
| 4906 |
target := &ret |
| 4907 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 4908 |
if err != nil { |
| 4909 |
return nil, err |
| 4910 |
} |
| 4911 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.create", "response", internallog.HTTPResponse(res, b)) |
| 4912 |
return ret, nil |
| 4913 |
} |
| 4914 |
|
| 4915 |
type AccountsClientsGetCall struct { |
| 4916 |
s *Service |
| 4917 |
accountId int64 |
| 4918 |
clientAccountId int64 |
| 4919 |
urlParams_ gensupport.URLParams |
| 4920 |
ifNoneMatch_ string |
| 4921 |
ctx_ context.Context |
| 4922 |
header_ http.Header |
| 4923 |
} |
| 4924 |
|
| 4925 |
// Get: Gets a client buyer with a given client account ID. |
| 4926 |
// |
| 4927 |
// - accountId: Numerical account ID of the client's sponsor buyer. (required). |
| 4928 |
// - clientAccountId: Numerical account ID of the client buyer to retrieve. |
| 4929 |
// (required). |
| 4930 |
func (r *AccountsClientsService) Get(accountId int64, clientAccountId int64) *AccountsClientsGetCall { |
| 4931 |
c := &AccountsClientsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 4932 |
c.accountId = accountId |
| 4933 |
c.clientAccountId = clientAccountId |
| 4934 |
return c |
| 4935 |
} |
| 4936 |
|
| 4937 |
// Fields allows partial responses to be retrieved. See |
| 4938 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 4939 |
// details. |
| 4940 |
func (c *AccountsClientsGetCall) Fields(s ...googleapi.Field) *AccountsClientsGetCall { |
| 4941 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 4942 |
return c |
| 4943 |
} |
| 4944 |
|
| 4945 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 4946 |
// object's ETag matches the given value. This is useful for getting updates |
| 4947 |
// only after the object has changed since the last request. |
| 4948 |
func (c *AccountsClientsGetCall) IfNoneMatch(entityTag string) *AccountsClientsGetCall { |
| 4949 |
c.ifNoneMatch_ = entityTag |
| 4950 |
return c |
| 4951 |
} |
| 4952 |
|
| 4953 |
// Context sets the context to be used in this call's Do method. |
| 4954 |
func (c *AccountsClientsGetCall) Context(ctx context.Context) *AccountsClientsGetCall { |
| 4955 |
c.ctx_ = ctx |
| 4956 |
return c |
| 4957 |
} |
| 4958 |
|
| 4959 |
// Header returns a http.Header that can be modified by the caller to add |
| 4960 |
// headers to the request. |
| 4961 |
func (c *AccountsClientsGetCall) Header() http.Header { |
| 4962 |
if c.header_ == nil { |
| 4963 |
c.header_ = make(http.Header) |
| 4964 |
} |
| 4965 |
return c.header_ |
| 4966 |
} |
| 4967 |
|
| 4968 |
func (c *AccountsClientsGetCall) doRequest(alt string) (*http.Response, error) { |
| 4969 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 4970 |
if c.ifNoneMatch_ != "" { |
| 4971 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 4972 |
} |
| 4973 |
c.urlParams_.Set("alt", alt) |
| 4974 |
c.urlParams_.Set("prettyPrint", "false") |
| 4975 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}") |
| 4976 |
urls += "?" + c.urlParams_.Encode() |
| 4977 |
req, err := http.NewRequest("GET", urls, nil) |
| 4978 |
if err != nil { |
| 4979 |
return nil, err |
| 4980 |
} |
| 4981 |
req.Header = reqHeaders |
| 4982 |
googleapi.Expand(req.URL, map[string]string{ |
| 4983 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 4984 |
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10), |
| 4985 |
}) |
| 4986 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.get", "request", internallog.HTTPRequest(req, nil)) |
| 4987 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 4988 |
} |
| 4989 |
|
| 4990 |
// Do executes the "adexchangebuyer2.accounts.clients.get" call. |
| 4991 |
// Any non-2xx status code is an error. Response headers are in either |
| 4992 |
// *Client.ServerResponse.Header or (if a response was returned at all) in |
| 4993 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 4994 |
// whether the returned error was because http.StatusNotModified was returned. |
| 4995 |
func (c *AccountsClientsGetCall) Do(opts ...googleapi.CallOption) (*Client, error) { |
| 4996 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 4997 |
res, err := c.doRequest("json") |
| 4998 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 4999 |
if res.Body != nil { |
| 5000 |
res.Body.Close() |
| 5001 |
} |
| 5002 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5003 |
Code: res.StatusCode, |
| 5004 |
Header: res.Header, |
| 5005 |
}) |
| 5006 |
} |
| 5007 |
if err != nil { |
| 5008 |
return nil, err |
| 5009 |
} |
| 5010 |
defer googleapi.CloseBody(res) |
| 5011 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5012 |
return nil, gensupport.WrapError(err) |
| 5013 |
} |
| 5014 |
ret := &Client{ |
| 5015 |
ServerResponse: googleapi.ServerResponse{ |
| 5016 |
Header: res.Header, |
| 5017 |
HTTPStatusCode: res.StatusCode, |
| 5018 |
}, |
| 5019 |
} |
| 5020 |
target := &ret |
| 5021 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5022 |
if err != nil { |
| 5023 |
return nil, err |
| 5024 |
} |
| 5025 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.get", "response", internallog.HTTPResponse(res, b)) |
| 5026 |
return ret, nil |
| 5027 |
} |
| 5028 |
|
| 5029 |
type AccountsClientsListCall struct { |
| 5030 |
s *Service |
| 5031 |
accountId int64 |
| 5032 |
urlParams_ gensupport.URLParams |
| 5033 |
ifNoneMatch_ string |
| 5034 |
ctx_ context.Context |
| 5035 |
header_ http.Header |
| 5036 |
} |
| 5037 |
|
| 5038 |
// List: Lists all the clients for the current sponsor buyer. |
| 5039 |
// |
| 5040 |
// - accountId: Unique numerical account ID of the sponsor buyer to list the |
| 5041 |
// clients for. |
| 5042 |
func (r *AccountsClientsService) List(accountId int64) *AccountsClientsListCall { |
| 5043 |
c := &AccountsClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5044 |
c.accountId = accountId |
| 5045 |
return c |
| 5046 |
} |
| 5047 |
|
| 5048 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 5049 |
// server may return fewer clients than requested. If unspecified, the server |
| 5050 |
// will pick an appropriate default. |
| 5051 |
func (c *AccountsClientsListCall) PageSize(pageSize int64) *AccountsClientsListCall { |
| 5052 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 5053 |
return c |
| 5054 |
} |
| 5055 |
|
| 5056 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 5057 |
// page of results the server should return. Typically, this is the value of |
| 5058 |
// ListClientsResponse.nextPageToken returned from the previous call to the |
| 5059 |
// accounts.clients.list method. |
| 5060 |
func (c *AccountsClientsListCall) PageToken(pageToken string) *AccountsClientsListCall { |
| 5061 |
c.urlParams_.Set("pageToken", pageToken) |
| 5062 |
return c |
| 5063 |
} |
| 5064 |
|
| 5065 |
// PartnerClientId sets the optional parameter "partnerClientId": Optional |
| 5066 |
// unique identifier (from the standpoint of an Ad Exchange sponsor buyer |
| 5067 |
// partner) of the client to return. If specified, at most one client will be |
| 5068 |
// returned in the response. |
| 5069 |
func (c *AccountsClientsListCall) PartnerClientId(partnerClientId string) *AccountsClientsListCall { |
| 5070 |
c.urlParams_.Set("partnerClientId", partnerClientId) |
| 5071 |
return c |
| 5072 |
} |
| 5073 |
|
| 5074 |
// Fields allows partial responses to be retrieved. See |
| 5075 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5076 |
// details. |
| 5077 |
func (c *AccountsClientsListCall) Fields(s ...googleapi.Field) *AccountsClientsListCall { |
| 5078 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5079 |
return c |
| 5080 |
} |
| 5081 |
|
| 5082 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5083 |
// object's ETag matches the given value. This is useful for getting updates |
| 5084 |
// only after the object has changed since the last request. |
| 5085 |
func (c *AccountsClientsListCall) IfNoneMatch(entityTag string) *AccountsClientsListCall { |
| 5086 |
c.ifNoneMatch_ = entityTag |
| 5087 |
return c |
| 5088 |
} |
| 5089 |
|
| 5090 |
// Context sets the context to be used in this call's Do method. |
| 5091 |
func (c *AccountsClientsListCall) Context(ctx context.Context) *AccountsClientsListCall { |
| 5092 |
c.ctx_ = ctx |
| 5093 |
return c |
| 5094 |
} |
| 5095 |
|
| 5096 |
// Header returns a http.Header that can be modified by the caller to add |
| 5097 |
// headers to the request. |
| 5098 |
func (c *AccountsClientsListCall) Header() http.Header { |
| 5099 |
if c.header_ == nil { |
| 5100 |
c.header_ = make(http.Header) |
| 5101 |
} |
| 5102 |
return c.header_ |
| 5103 |
} |
| 5104 |
|
| 5105 |
func (c *AccountsClientsListCall) doRequest(alt string) (*http.Response, error) { |
| 5106 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5107 |
if c.ifNoneMatch_ != "" { |
| 5108 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5109 |
} |
| 5110 |
c.urlParams_.Set("alt", alt) |
| 5111 |
c.urlParams_.Set("prettyPrint", "false") |
| 5112 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients") |
| 5113 |
urls += "?" + c.urlParams_.Encode() |
| 5114 |
req, err := http.NewRequest("GET", urls, nil) |
| 5115 |
if err != nil { |
| 5116 |
return nil, err |
| 5117 |
} |
| 5118 |
req.Header = reqHeaders |
| 5119 |
googleapi.Expand(req.URL, map[string]string{ |
| 5120 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5121 |
}) |
| 5122 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.list", "request", internallog.HTTPRequest(req, nil)) |
| 5123 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5124 |
} |
| 5125 |
|
| 5126 |
// Do executes the "adexchangebuyer2.accounts.clients.list" call. |
| 5127 |
// Any non-2xx status code is an error. Response headers are in either |
| 5128 |
// *ListClientsResponse.ServerResponse.Header or (if a response was returned at |
| 5129 |
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 5130 |
// check whether the returned error was because http.StatusNotModified was |
| 5131 |
// returned. |
| 5132 |
func (c *AccountsClientsListCall) Do(opts ...googleapi.CallOption) (*ListClientsResponse, error) { |
| 5133 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5134 |
res, err := c.doRequest("json") |
| 5135 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5136 |
if res.Body != nil { |
| 5137 |
res.Body.Close() |
| 5138 |
} |
| 5139 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5140 |
Code: res.StatusCode, |
| 5141 |
Header: res.Header, |
| 5142 |
}) |
| 5143 |
} |
| 5144 |
if err != nil { |
| 5145 |
return nil, err |
| 5146 |
} |
| 5147 |
defer googleapi.CloseBody(res) |
| 5148 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5149 |
return nil, gensupport.WrapError(err) |
| 5150 |
} |
| 5151 |
ret := &ListClientsResponse{ |
| 5152 |
ServerResponse: googleapi.ServerResponse{ |
| 5153 |
Header: res.Header, |
| 5154 |
HTTPStatusCode: res.StatusCode, |
| 5155 |
}, |
| 5156 |
} |
| 5157 |
target := &ret |
| 5158 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5159 |
if err != nil { |
| 5160 |
return nil, err |
| 5161 |
} |
| 5162 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.list", "response", internallog.HTTPResponse(res, b)) |
| 5163 |
return ret, nil |
| 5164 |
} |
| 5165 |
|
| 5166 |
// Pages invokes f for each page of results. |
| 5167 |
// A non-nil error returned from f will halt the iteration. |
| 5168 |
// The provided context supersedes any context provided to the Context method. |
| 5169 |
func (c *AccountsClientsListCall) Pages(ctx context.Context, f func(*ListClientsResponse) error) error { |
| 5170 |
c.ctx_ = ctx |
| 5171 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 5172 |
for { |
| 5173 |
x, err := c.Do() |
| 5174 |
if err != nil { |
| 5175 |
return err |
| 5176 |
} |
| 5177 |
if err := f(x); err != nil { |
| 5178 |
return err |
| 5179 |
} |
| 5180 |
if x.NextPageToken == "" { |
| 5181 |
return nil |
| 5182 |
} |
| 5183 |
c.PageToken(x.NextPageToken) |
| 5184 |
} |
| 5185 |
} |
| 5186 |
|
| 5187 |
type AccountsClientsUpdateCall struct { |
| 5188 |
s *Service |
| 5189 |
accountId int64 |
| 5190 |
clientAccountId int64 |
| 5191 |
client *Client |
| 5192 |
urlParams_ gensupport.URLParams |
| 5193 |
ctx_ context.Context |
| 5194 |
header_ http.Header |
| 5195 |
} |
| 5196 |
|
| 5197 |
// Update: Updates an existing client buyer. |
| 5198 |
// |
| 5199 |
// - accountId: Unique numerical account ID for the buyer of which the client |
| 5200 |
// buyer is a customer; the sponsor buyer to update a client for. (required). |
| 5201 |
// - clientAccountId: Unique numerical account ID of the client to update. |
| 5202 |
// (required). |
| 5203 |
func (r *AccountsClientsService) Update(accountId int64, clientAccountId int64, client *Client) *AccountsClientsUpdateCall { |
| 5204 |
c := &AccountsClientsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5205 |
c.accountId = accountId |
| 5206 |
c.clientAccountId = clientAccountId |
| 5207 |
c.client = client |
| 5208 |
return c |
| 5209 |
} |
| 5210 |
|
| 5211 |
// Fields allows partial responses to be retrieved. See |
| 5212 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5213 |
// details. |
| 5214 |
func (c *AccountsClientsUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUpdateCall { |
| 5215 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5216 |
return c |
| 5217 |
} |
| 5218 |
|
| 5219 |
// Context sets the context to be used in this call's Do method. |
| 5220 |
func (c *AccountsClientsUpdateCall) Context(ctx context.Context) *AccountsClientsUpdateCall { |
| 5221 |
c.ctx_ = ctx |
| 5222 |
return c |
| 5223 |
} |
| 5224 |
|
| 5225 |
// Header returns a http.Header that can be modified by the caller to add |
| 5226 |
// headers to the request. |
| 5227 |
func (c *AccountsClientsUpdateCall) Header() http.Header { |
| 5228 |
if c.header_ == nil { |
| 5229 |
c.header_ = make(http.Header) |
| 5230 |
} |
| 5231 |
return c.header_ |
| 5232 |
} |
| 5233 |
|
| 5234 |
func (c *AccountsClientsUpdateCall) doRequest(alt string) (*http.Response, error) { |
| 5235 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 5236 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.client) |
| 5237 |
if err != nil { |
| 5238 |
return nil, err |
| 5239 |
} |
| 5240 |
c.urlParams_.Set("alt", alt) |
| 5241 |
c.urlParams_.Set("prettyPrint", "false") |
| 5242 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}") |
| 5243 |
urls += "?" + c.urlParams_.Encode() |
| 5244 |
req, err := http.NewRequest("PUT", urls, body) |
| 5245 |
if err != nil { |
| 5246 |
return nil, err |
| 5247 |
} |
| 5248 |
req.Header = reqHeaders |
| 5249 |
googleapi.Expand(req.URL, map[string]string{ |
| 5250 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5251 |
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10), |
| 5252 |
}) |
| 5253 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.update", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 5254 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5255 |
} |
| 5256 |
|
| 5257 |
// Do executes the "adexchangebuyer2.accounts.clients.update" call. |
| 5258 |
// Any non-2xx status code is an error. Response headers are in either |
| 5259 |
// *Client.ServerResponse.Header or (if a response was returned at all) in |
| 5260 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5261 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5262 |
func (c *AccountsClientsUpdateCall) Do(opts ...googleapi.CallOption) (*Client, error) { |
| 5263 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5264 |
res, err := c.doRequest("json") |
| 5265 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5266 |
if res.Body != nil { |
| 5267 |
res.Body.Close() |
| 5268 |
} |
| 5269 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5270 |
Code: res.StatusCode, |
| 5271 |
Header: res.Header, |
| 5272 |
}) |
| 5273 |
} |
| 5274 |
if err != nil { |
| 5275 |
return nil, err |
| 5276 |
} |
| 5277 |
defer googleapi.CloseBody(res) |
| 5278 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5279 |
return nil, gensupport.WrapError(err) |
| 5280 |
} |
| 5281 |
ret := &Client{ |
| 5282 |
ServerResponse: googleapi.ServerResponse{ |
| 5283 |
Header: res.Header, |
| 5284 |
HTTPStatusCode: res.StatusCode, |
| 5285 |
}, |
| 5286 |
} |
| 5287 |
target := &ret |
| 5288 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5289 |
if err != nil { |
| 5290 |
return nil, err |
| 5291 |
} |
| 5292 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.update", "response", internallog.HTTPResponse(res, b)) |
| 5293 |
return ret, nil |
| 5294 |
} |
| 5295 |
|
| 5296 |
type AccountsClientsInvitationsCreateCall struct { |
| 5297 |
s *Service |
| 5298 |
accountId int64 |
| 5299 |
clientAccountId int64 |
| 5300 |
clientuserinvitation *ClientUserInvitation |
| 5301 |
urlParams_ gensupport.URLParams |
| 5302 |
ctx_ context.Context |
| 5303 |
header_ http.Header |
| 5304 |
} |
| 5305 |
|
| 5306 |
// Create: Creates and sends out an email invitation to access an Ad Exchange |
| 5307 |
// client buyer account. |
| 5308 |
// |
| 5309 |
// - accountId: Numerical account ID of the client's sponsor buyer. (required). |
| 5310 |
// - clientAccountId: Numerical account ID of the client buyer that the user |
| 5311 |
// should be associated with. (required). |
| 5312 |
func (r *AccountsClientsInvitationsService) Create(accountId int64, clientAccountId int64, clientuserinvitation *ClientUserInvitation) *AccountsClientsInvitationsCreateCall { |
| 5313 |
c := &AccountsClientsInvitationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5314 |
c.accountId = accountId |
| 5315 |
c.clientAccountId = clientAccountId |
| 5316 |
c.clientuserinvitation = clientuserinvitation |
| 5317 |
return c |
| 5318 |
} |
| 5319 |
|
| 5320 |
// Fields allows partial responses to be retrieved. See |
| 5321 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5322 |
// details. |
| 5323 |
func (c *AccountsClientsInvitationsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsCreateCall { |
| 5324 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5325 |
return c |
| 5326 |
} |
| 5327 |
|
| 5328 |
// Context sets the context to be used in this call's Do method. |
| 5329 |
func (c *AccountsClientsInvitationsCreateCall) Context(ctx context.Context) *AccountsClientsInvitationsCreateCall { |
| 5330 |
c.ctx_ = ctx |
| 5331 |
return c |
| 5332 |
} |
| 5333 |
|
| 5334 |
// Header returns a http.Header that can be modified by the caller to add |
| 5335 |
// headers to the request. |
| 5336 |
func (c *AccountsClientsInvitationsCreateCall) Header() http.Header { |
| 5337 |
if c.header_ == nil { |
| 5338 |
c.header_ = make(http.Header) |
| 5339 |
} |
| 5340 |
return c.header_ |
| 5341 |
} |
| 5342 |
|
| 5343 |
func (c *AccountsClientsInvitationsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 5344 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 5345 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.clientuserinvitation) |
| 5346 |
if err != nil { |
| 5347 |
return nil, err |
| 5348 |
} |
| 5349 |
c.urlParams_.Set("alt", alt) |
| 5350 |
c.urlParams_.Set("prettyPrint", "false") |
| 5351 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations") |
| 5352 |
urls += "?" + c.urlParams_.Encode() |
| 5353 |
req, err := http.NewRequest("POST", urls, body) |
| 5354 |
if err != nil { |
| 5355 |
return nil, err |
| 5356 |
} |
| 5357 |
req.Header = reqHeaders |
| 5358 |
googleapi.Expand(req.URL, map[string]string{ |
| 5359 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5360 |
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10), |
| 5361 |
}) |
| 5362 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.invitations.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 5363 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5364 |
} |
| 5365 |
|
| 5366 |
// Do executes the "adexchangebuyer2.accounts.clients.invitations.create" call. |
| 5367 |
// Any non-2xx status code is an error. Response headers are in either |
| 5368 |
// *ClientUserInvitation.ServerResponse.Header or (if a response was returned |
| 5369 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 5370 |
// check whether the returned error was because http.StatusNotModified was |
| 5371 |
// returned. |
| 5372 |
func (c *AccountsClientsInvitationsCreateCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) { |
| 5373 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5374 |
res, err := c.doRequest("json") |
| 5375 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5376 |
if res.Body != nil { |
| 5377 |
res.Body.Close() |
| 5378 |
} |
| 5379 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5380 |
Code: res.StatusCode, |
| 5381 |
Header: res.Header, |
| 5382 |
}) |
| 5383 |
} |
| 5384 |
if err != nil { |
| 5385 |
return nil, err |
| 5386 |
} |
| 5387 |
defer googleapi.CloseBody(res) |
| 5388 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5389 |
return nil, gensupport.WrapError(err) |
| 5390 |
} |
| 5391 |
ret := &ClientUserInvitation{ |
| 5392 |
ServerResponse: googleapi.ServerResponse{ |
| 5393 |
Header: res.Header, |
| 5394 |
HTTPStatusCode: res.StatusCode, |
| 5395 |
}, |
| 5396 |
} |
| 5397 |
target := &ret |
| 5398 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5399 |
if err != nil { |
| 5400 |
return nil, err |
| 5401 |
} |
| 5402 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.invitations.create", "response", internallog.HTTPResponse(res, b)) |
| 5403 |
return ret, nil |
| 5404 |
} |
| 5405 |
|
| 5406 |
type AccountsClientsInvitationsGetCall struct { |
| 5407 |
s *Service |
| 5408 |
accountId int64 |
| 5409 |
clientAccountId int64 |
| 5410 |
invitationId int64 |
| 5411 |
urlParams_ gensupport.URLParams |
| 5412 |
ifNoneMatch_ string |
| 5413 |
ctx_ context.Context |
| 5414 |
header_ http.Header |
| 5415 |
} |
| 5416 |
|
| 5417 |
// Get: Retrieves an existing client user invitation. |
| 5418 |
// |
| 5419 |
// - accountId: Numerical account ID of the client's sponsor buyer. (required). |
| 5420 |
// - clientAccountId: Numerical account ID of the client buyer that the user |
| 5421 |
// invitation to be retrieved is associated with. (required). |
| 5422 |
// - invitationId: Numerical identifier of the user invitation to retrieve. |
| 5423 |
// (required). |
| 5424 |
func (r *AccountsClientsInvitationsService) Get(accountId int64, clientAccountId int64, invitationId int64) *AccountsClientsInvitationsGetCall { |
| 5425 |
c := &AccountsClientsInvitationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5426 |
c.accountId = accountId |
| 5427 |
c.clientAccountId = clientAccountId |
| 5428 |
c.invitationId = invitationId |
| 5429 |
return c |
| 5430 |
} |
| 5431 |
|
| 5432 |
// Fields allows partial responses to be retrieved. See |
| 5433 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5434 |
// details. |
| 5435 |
func (c *AccountsClientsInvitationsGetCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsGetCall { |
| 5436 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5437 |
return c |
| 5438 |
} |
| 5439 |
|
| 5440 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5441 |
// object's ETag matches the given value. This is useful for getting updates |
| 5442 |
// only after the object has changed since the last request. |
| 5443 |
func (c *AccountsClientsInvitationsGetCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsGetCall { |
| 5444 |
c.ifNoneMatch_ = entityTag |
| 5445 |
return c |
| 5446 |
} |
| 5447 |
|
| 5448 |
// Context sets the context to be used in this call's Do method. |
| 5449 |
func (c *AccountsClientsInvitationsGetCall) Context(ctx context.Context) *AccountsClientsInvitationsGetCall { |
| 5450 |
c.ctx_ = ctx |
| 5451 |
return c |
| 5452 |
} |
| 5453 |
|
| 5454 |
// Header returns a http.Header that can be modified by the caller to add |
| 5455 |
// headers to the request. |
| 5456 |
func (c *AccountsClientsInvitationsGetCall) Header() http.Header { |
| 5457 |
if c.header_ == nil { |
| 5458 |
c.header_ = make(http.Header) |
| 5459 |
} |
| 5460 |
return c.header_ |
| 5461 |
} |
| 5462 |
|
| 5463 |
func (c *AccountsClientsInvitationsGetCall) doRequest(alt string) (*http.Response, error) { |
| 5464 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5465 |
if c.ifNoneMatch_ != "" { |
| 5466 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5467 |
} |
| 5468 |
c.urlParams_.Set("alt", alt) |
| 5469 |
c.urlParams_.Set("prettyPrint", "false") |
| 5470 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}") |
| 5471 |
urls += "?" + c.urlParams_.Encode() |
| 5472 |
req, err := http.NewRequest("GET", urls, nil) |
| 5473 |
if err != nil { |
| 5474 |
return nil, err |
| 5475 |
} |
| 5476 |
req.Header = reqHeaders |
| 5477 |
googleapi.Expand(req.URL, map[string]string{ |
| 5478 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5479 |
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10), |
| 5480 |
"invitationId": strconv.FormatInt(c.invitationId, 10), |
| 5481 |
}) |
| 5482 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.invitations.get", "request", internallog.HTTPRequest(req, nil)) |
| 5483 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5484 |
} |
| 5485 |
|
| 5486 |
// Do executes the "adexchangebuyer2.accounts.clients.invitations.get" call. |
| 5487 |
// Any non-2xx status code is an error. Response headers are in either |
| 5488 |
// *ClientUserInvitation.ServerResponse.Header or (if a response was returned |
| 5489 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 5490 |
// check whether the returned error was because http.StatusNotModified was |
| 5491 |
// returned. |
| 5492 |
func (c *AccountsClientsInvitationsGetCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) { |
| 5493 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5494 |
res, err := c.doRequest("json") |
| 5495 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5496 |
if res.Body != nil { |
| 5497 |
res.Body.Close() |
| 5498 |
} |
| 5499 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5500 |
Code: res.StatusCode, |
| 5501 |
Header: res.Header, |
| 5502 |
}) |
| 5503 |
} |
| 5504 |
if err != nil { |
| 5505 |
return nil, err |
| 5506 |
} |
| 5507 |
defer googleapi.CloseBody(res) |
| 5508 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5509 |
return nil, gensupport.WrapError(err) |
| 5510 |
} |
| 5511 |
ret := &ClientUserInvitation{ |
| 5512 |
ServerResponse: googleapi.ServerResponse{ |
| 5513 |
Header: res.Header, |
| 5514 |
HTTPStatusCode: res.StatusCode, |
| 5515 |
}, |
| 5516 |
} |
| 5517 |
target := &ret |
| 5518 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5519 |
if err != nil { |
| 5520 |
return nil, err |
| 5521 |
} |
| 5522 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.invitations.get", "response", internallog.HTTPResponse(res, b)) |
| 5523 |
return ret, nil |
| 5524 |
} |
| 5525 |
|
| 5526 |
type AccountsClientsInvitationsListCall struct { |
| 5527 |
s *Service |
| 5528 |
accountId int64 |
| 5529 |
clientAccountId string |
| 5530 |
urlParams_ gensupport.URLParams |
| 5531 |
ifNoneMatch_ string |
| 5532 |
ctx_ context.Context |
| 5533 |
header_ http.Header |
| 5534 |
} |
| 5535 |
|
| 5536 |
// List: Lists all the client users invitations for a client with a given |
| 5537 |
// account ID. |
| 5538 |
// |
| 5539 |
// - accountId: Numerical account ID of the client's sponsor buyer. (required). |
| 5540 |
// - clientAccountId: Numerical account ID of the client buyer to list |
| 5541 |
// invitations for. (required) You must either specify a string |
| 5542 |
// representation of a numerical account identifier or the `-` character to |
| 5543 |
// list all the invitations for all the clients of a given sponsor buyer. |
| 5544 |
func (r *AccountsClientsInvitationsService) List(accountId int64, clientAccountId string) *AccountsClientsInvitationsListCall { |
| 5545 |
c := &AccountsClientsInvitationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5546 |
c.accountId = accountId |
| 5547 |
c.clientAccountId = clientAccountId |
| 5548 |
return c |
| 5549 |
} |
| 5550 |
|
| 5551 |
// PageSize sets the optional parameter "pageSize": Requested page size. Server |
| 5552 |
// may return fewer clients than requested. If unspecified, server will pick an |
| 5553 |
// appropriate default. |
| 5554 |
func (c *AccountsClientsInvitationsListCall) PageSize(pageSize int64) *AccountsClientsInvitationsListCall { |
| 5555 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 5556 |
return c |
| 5557 |
} |
| 5558 |
|
| 5559 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 5560 |
// page of results the server should return. Typically, this is the value of |
| 5561 |
// ListClientUserInvitationsResponse.nextPageToken returned from the previous |
| 5562 |
// call to the clients.invitations.list method. |
| 5563 |
func (c *AccountsClientsInvitationsListCall) PageToken(pageToken string) *AccountsClientsInvitationsListCall { |
| 5564 |
c.urlParams_.Set("pageToken", pageToken) |
| 5565 |
return c |
| 5566 |
} |
| 5567 |
|
| 5568 |
// Fields allows partial responses to be retrieved. See |
| 5569 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5570 |
// details. |
| 5571 |
func (c *AccountsClientsInvitationsListCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsListCall { |
| 5572 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5573 |
return c |
| 5574 |
} |
| 5575 |
|
| 5576 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5577 |
// object's ETag matches the given value. This is useful for getting updates |
| 5578 |
// only after the object has changed since the last request. |
| 5579 |
func (c *AccountsClientsInvitationsListCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsListCall { |
| 5580 |
c.ifNoneMatch_ = entityTag |
| 5581 |
return c |
| 5582 |
} |
| 5583 |
|
| 5584 |
// Context sets the context to be used in this call's Do method. |
| 5585 |
func (c *AccountsClientsInvitationsListCall) Context(ctx context.Context) *AccountsClientsInvitationsListCall { |
| 5586 |
c.ctx_ = ctx |
| 5587 |
return c |
| 5588 |
} |
| 5589 |
|
| 5590 |
// Header returns a http.Header that can be modified by the caller to add |
| 5591 |
// headers to the request. |
| 5592 |
func (c *AccountsClientsInvitationsListCall) Header() http.Header { |
| 5593 |
if c.header_ == nil { |
| 5594 |
c.header_ = make(http.Header) |
| 5595 |
} |
| 5596 |
return c.header_ |
| 5597 |
} |
| 5598 |
|
| 5599 |
func (c *AccountsClientsInvitationsListCall) doRequest(alt string) (*http.Response, error) { |
| 5600 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5601 |
if c.ifNoneMatch_ != "" { |
| 5602 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5603 |
} |
| 5604 |
c.urlParams_.Set("alt", alt) |
| 5605 |
c.urlParams_.Set("prettyPrint", "false") |
| 5606 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations") |
| 5607 |
urls += "?" + c.urlParams_.Encode() |
| 5608 |
req, err := http.NewRequest("GET", urls, nil) |
| 5609 |
if err != nil { |
| 5610 |
return nil, err |
| 5611 |
} |
| 5612 |
req.Header = reqHeaders |
| 5613 |
googleapi.Expand(req.URL, map[string]string{ |
| 5614 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5615 |
"clientAccountId": c.clientAccountId, |
| 5616 |
}) |
| 5617 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.invitations.list", "request", internallog.HTTPRequest(req, nil)) |
| 5618 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5619 |
} |
| 5620 |
|
| 5621 |
// Do executes the "adexchangebuyer2.accounts.clients.invitations.list" call. |
| 5622 |
// Any non-2xx status code is an error. Response headers are in either |
| 5623 |
// *ListClientUserInvitationsResponse.ServerResponse.Header or (if a response |
| 5624 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 5625 |
// googleapi.IsNotModified to check whether the returned error was because |
| 5626 |
// http.StatusNotModified was returned. |
| 5627 |
func (c *AccountsClientsInvitationsListCall) Do(opts ...googleapi.CallOption) (*ListClientUserInvitationsResponse, error) { |
| 5628 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5629 |
res, err := c.doRequest("json") |
| 5630 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5631 |
if res.Body != nil { |
| 5632 |
res.Body.Close() |
| 5633 |
} |
| 5634 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5635 |
Code: res.StatusCode, |
| 5636 |
Header: res.Header, |
| 5637 |
}) |
| 5638 |
} |
| 5639 |
if err != nil { |
| 5640 |
return nil, err |
| 5641 |
} |
| 5642 |
defer googleapi.CloseBody(res) |
| 5643 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5644 |
return nil, gensupport.WrapError(err) |
| 5645 |
} |
| 5646 |
ret := &ListClientUserInvitationsResponse{ |
| 5647 |
ServerResponse: googleapi.ServerResponse{ |
| 5648 |
Header: res.Header, |
| 5649 |
HTTPStatusCode: res.StatusCode, |
| 5650 |
}, |
| 5651 |
} |
| 5652 |
target := &ret |
| 5653 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5654 |
if err != nil { |
| 5655 |
return nil, err |
| 5656 |
} |
| 5657 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.invitations.list", "response", internallog.HTTPResponse(res, b)) |
| 5658 |
return ret, nil |
| 5659 |
} |
| 5660 |
|
| 5661 |
// Pages invokes f for each page of results. |
| 5662 |
// A non-nil error returned from f will halt the iteration. |
| 5663 |
// The provided context supersedes any context provided to the Context method. |
| 5664 |
func (c *AccountsClientsInvitationsListCall) Pages(ctx context.Context, f func(*ListClientUserInvitationsResponse) error) error { |
| 5665 |
c.ctx_ = ctx |
| 5666 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 5667 |
for { |
| 5668 |
x, err := c.Do() |
| 5669 |
if err != nil { |
| 5670 |
return err |
| 5671 |
} |
| 5672 |
if err := f(x); err != nil { |
| 5673 |
return err |
| 5674 |
} |
| 5675 |
if x.NextPageToken == "" { |
| 5676 |
return nil |
| 5677 |
} |
| 5678 |
c.PageToken(x.NextPageToken) |
| 5679 |
} |
| 5680 |
} |
| 5681 |
|
| 5682 |
type AccountsClientsUsersGetCall struct { |
| 5683 |
s *Service |
| 5684 |
accountId int64 |
| 5685 |
clientAccountId int64 |
| 5686 |
userId int64 |
| 5687 |
urlParams_ gensupport.URLParams |
| 5688 |
ifNoneMatch_ string |
| 5689 |
ctx_ context.Context |
| 5690 |
header_ http.Header |
| 5691 |
} |
| 5692 |
|
| 5693 |
// Get: Retrieves an existing client user. |
| 5694 |
// |
| 5695 |
// - accountId: Numerical account ID of the client's sponsor buyer. (required). |
| 5696 |
// - clientAccountId: Numerical account ID of the client buyer that the user to |
| 5697 |
// be retrieved is associated with. (required). |
| 5698 |
// - userId: Numerical identifier of the user to retrieve. (required). |
| 5699 |
func (r *AccountsClientsUsersService) Get(accountId int64, clientAccountId int64, userId int64) *AccountsClientsUsersGetCall { |
| 5700 |
c := &AccountsClientsUsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5701 |
c.accountId = accountId |
| 5702 |
c.clientAccountId = clientAccountId |
| 5703 |
c.userId = userId |
| 5704 |
return c |
| 5705 |
} |
| 5706 |
|
| 5707 |
// Fields allows partial responses to be retrieved. See |
| 5708 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5709 |
// details. |
| 5710 |
func (c *AccountsClientsUsersGetCall) Fields(s ...googleapi.Field) *AccountsClientsUsersGetCall { |
| 5711 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5712 |
return c |
| 5713 |
} |
| 5714 |
|
| 5715 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5716 |
// object's ETag matches the given value. This is useful for getting updates |
| 5717 |
// only after the object has changed since the last request. |
| 5718 |
func (c *AccountsClientsUsersGetCall) IfNoneMatch(entityTag string) *AccountsClientsUsersGetCall { |
| 5719 |
c.ifNoneMatch_ = entityTag |
| 5720 |
return c |
| 5721 |
} |
| 5722 |
|
| 5723 |
// Context sets the context to be used in this call's Do method. |
| 5724 |
func (c *AccountsClientsUsersGetCall) Context(ctx context.Context) *AccountsClientsUsersGetCall { |
| 5725 |
c.ctx_ = ctx |
| 5726 |
return c |
| 5727 |
} |
| 5728 |
|
| 5729 |
// Header returns a http.Header that can be modified by the caller to add |
| 5730 |
// headers to the request. |
| 5731 |
func (c *AccountsClientsUsersGetCall) Header() http.Header { |
| 5732 |
if c.header_ == nil { |
| 5733 |
c.header_ = make(http.Header) |
| 5734 |
} |
| 5735 |
return c.header_ |
| 5736 |
} |
| 5737 |
|
| 5738 |
func (c *AccountsClientsUsersGetCall) doRequest(alt string) (*http.Response, error) { |
| 5739 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5740 |
if c.ifNoneMatch_ != "" { |
| 5741 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5742 |
} |
| 5743 |
c.urlParams_.Set("alt", alt) |
| 5744 |
c.urlParams_.Set("prettyPrint", "false") |
| 5745 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}") |
| 5746 |
urls += "?" + c.urlParams_.Encode() |
| 5747 |
req, err := http.NewRequest("GET", urls, nil) |
| 5748 |
if err != nil { |
| 5749 |
return nil, err |
| 5750 |
} |
| 5751 |
req.Header = reqHeaders |
| 5752 |
googleapi.Expand(req.URL, map[string]string{ |
| 5753 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5754 |
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10), |
| 5755 |
"userId": strconv.FormatInt(c.userId, 10), |
| 5756 |
}) |
| 5757 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.users.get", "request", internallog.HTTPRequest(req, nil)) |
| 5758 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5759 |
} |
| 5760 |
|
| 5761 |
// Do executes the "adexchangebuyer2.accounts.clients.users.get" call. |
| 5762 |
// Any non-2xx status code is an error. Response headers are in either |
| 5763 |
// *ClientUser.ServerResponse.Header or (if a response was returned at all) in |
| 5764 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 5765 |
// whether the returned error was because http.StatusNotModified was returned. |
| 5766 |
func (c *AccountsClientsUsersGetCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) { |
| 5767 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5768 |
res, err := c.doRequest("json") |
| 5769 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5770 |
if res.Body != nil { |
| 5771 |
res.Body.Close() |
| 5772 |
} |
| 5773 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5774 |
Code: res.StatusCode, |
| 5775 |
Header: res.Header, |
| 5776 |
}) |
| 5777 |
} |
| 5778 |
if err != nil { |
| 5779 |
return nil, err |
| 5780 |
} |
| 5781 |
defer googleapi.CloseBody(res) |
| 5782 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5783 |
return nil, gensupport.WrapError(err) |
| 5784 |
} |
| 5785 |
ret := &ClientUser{ |
| 5786 |
ServerResponse: googleapi.ServerResponse{ |
| 5787 |
Header: res.Header, |
| 5788 |
HTTPStatusCode: res.StatusCode, |
| 5789 |
}, |
| 5790 |
} |
| 5791 |
target := &ret |
| 5792 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5793 |
if err != nil { |
| 5794 |
return nil, err |
| 5795 |
} |
| 5796 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.users.get", "response", internallog.HTTPResponse(res, b)) |
| 5797 |
return ret, nil |
| 5798 |
} |
| 5799 |
|
| 5800 |
type AccountsClientsUsersListCall struct { |
| 5801 |
s *Service |
| 5802 |
accountId int64 |
| 5803 |
clientAccountId string |
| 5804 |
urlParams_ gensupport.URLParams |
| 5805 |
ifNoneMatch_ string |
| 5806 |
ctx_ context.Context |
| 5807 |
header_ http.Header |
| 5808 |
} |
| 5809 |
|
| 5810 |
// List: Lists all the known client users for a specified sponsor buyer account |
| 5811 |
// ID. |
| 5812 |
// |
| 5813 |
// - accountId: Numerical account ID of the sponsor buyer of the client to list |
| 5814 |
// users for. (required). |
| 5815 |
// - clientAccountId: The account ID of the client buyer to list users for. |
| 5816 |
// (required) You must specify either a string representation of a numerical |
| 5817 |
// account identifier or the `-` character to list all the client users for |
| 5818 |
// all the clients of a given sponsor buyer. |
| 5819 |
func (r *AccountsClientsUsersService) List(accountId int64, clientAccountId string) *AccountsClientsUsersListCall { |
| 5820 |
c := &AccountsClientsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5821 |
c.accountId = accountId |
| 5822 |
c.clientAccountId = clientAccountId |
| 5823 |
return c |
| 5824 |
} |
| 5825 |
|
| 5826 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 5827 |
// server may return fewer clients than requested. If unspecified, the server |
| 5828 |
// will pick an appropriate default. |
| 5829 |
func (c *AccountsClientsUsersListCall) PageSize(pageSize int64) *AccountsClientsUsersListCall { |
| 5830 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 5831 |
return c |
| 5832 |
} |
| 5833 |
|
| 5834 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 5835 |
// page of results the server should return. Typically, this is the value of |
| 5836 |
// ListClientUsersResponse.nextPageToken returned from the previous call to the |
| 5837 |
// accounts.clients.users.list method. |
| 5838 |
func (c *AccountsClientsUsersListCall) PageToken(pageToken string) *AccountsClientsUsersListCall { |
| 5839 |
c.urlParams_.Set("pageToken", pageToken) |
| 5840 |
return c |
| 5841 |
} |
| 5842 |
|
| 5843 |
// Fields allows partial responses to be retrieved. See |
| 5844 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5845 |
// details. |
| 5846 |
func (c *AccountsClientsUsersListCall) Fields(s ...googleapi.Field) *AccountsClientsUsersListCall { |
| 5847 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5848 |
return c |
| 5849 |
} |
| 5850 |
|
| 5851 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 5852 |
// object's ETag matches the given value. This is useful for getting updates |
| 5853 |
// only after the object has changed since the last request. |
| 5854 |
func (c *AccountsClientsUsersListCall) IfNoneMatch(entityTag string) *AccountsClientsUsersListCall { |
| 5855 |
c.ifNoneMatch_ = entityTag |
| 5856 |
return c |
| 5857 |
} |
| 5858 |
|
| 5859 |
// Context sets the context to be used in this call's Do method. |
| 5860 |
func (c *AccountsClientsUsersListCall) Context(ctx context.Context) *AccountsClientsUsersListCall { |
| 5861 |
c.ctx_ = ctx |
| 5862 |
return c |
| 5863 |
} |
| 5864 |
|
| 5865 |
// Header returns a http.Header that can be modified by the caller to add |
| 5866 |
// headers to the request. |
| 5867 |
func (c *AccountsClientsUsersListCall) Header() http.Header { |
| 5868 |
if c.header_ == nil { |
| 5869 |
c.header_ = make(http.Header) |
| 5870 |
} |
| 5871 |
return c.header_ |
| 5872 |
} |
| 5873 |
|
| 5874 |
func (c *AccountsClientsUsersListCall) doRequest(alt string) (*http.Response, error) { |
| 5875 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 5876 |
if c.ifNoneMatch_ != "" { |
| 5877 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 5878 |
} |
| 5879 |
c.urlParams_.Set("alt", alt) |
| 5880 |
c.urlParams_.Set("prettyPrint", "false") |
| 5881 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users") |
| 5882 |
urls += "?" + c.urlParams_.Encode() |
| 5883 |
req, err := http.NewRequest("GET", urls, nil) |
| 5884 |
if err != nil { |
| 5885 |
return nil, err |
| 5886 |
} |
| 5887 |
req.Header = reqHeaders |
| 5888 |
googleapi.Expand(req.URL, map[string]string{ |
| 5889 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 5890 |
"clientAccountId": c.clientAccountId, |
| 5891 |
}) |
| 5892 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.users.list", "request", internallog.HTTPRequest(req, nil)) |
| 5893 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 5894 |
} |
| 5895 |
|
| 5896 |
// Do executes the "adexchangebuyer2.accounts.clients.users.list" call. |
| 5897 |
// Any non-2xx status code is an error. Response headers are in either |
| 5898 |
// *ListClientUsersResponse.ServerResponse.Header or (if a response was |
| 5899 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 5900 |
// googleapi.IsNotModified to check whether the returned error was because |
| 5901 |
// http.StatusNotModified was returned. |
| 5902 |
func (c *AccountsClientsUsersListCall) Do(opts ...googleapi.CallOption) (*ListClientUsersResponse, error) { |
| 5903 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 5904 |
res, err := c.doRequest("json") |
| 5905 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 5906 |
if res.Body != nil { |
| 5907 |
res.Body.Close() |
| 5908 |
} |
| 5909 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 5910 |
Code: res.StatusCode, |
| 5911 |
Header: res.Header, |
| 5912 |
}) |
| 5913 |
} |
| 5914 |
if err != nil { |
| 5915 |
return nil, err |
| 5916 |
} |
| 5917 |
defer googleapi.CloseBody(res) |
| 5918 |
if err := googleapi.CheckResponse(res); err != nil { |
| 5919 |
return nil, gensupport.WrapError(err) |
| 5920 |
} |
| 5921 |
ret := &ListClientUsersResponse{ |
| 5922 |
ServerResponse: googleapi.ServerResponse{ |
| 5923 |
Header: res.Header, |
| 5924 |
HTTPStatusCode: res.StatusCode, |
| 5925 |
}, |
| 5926 |
} |
| 5927 |
target := &ret |
| 5928 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 5929 |
if err != nil { |
| 5930 |
return nil, err |
| 5931 |
} |
| 5932 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.users.list", "response", internallog.HTTPResponse(res, b)) |
| 5933 |
return ret, nil |
| 5934 |
} |
| 5935 |
|
| 5936 |
// Pages invokes f for each page of results. |
| 5937 |
// A non-nil error returned from f will halt the iteration. |
| 5938 |
// The provided context supersedes any context provided to the Context method. |
| 5939 |
func (c *AccountsClientsUsersListCall) Pages(ctx context.Context, f func(*ListClientUsersResponse) error) error { |
| 5940 |
c.ctx_ = ctx |
| 5941 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 5942 |
for { |
| 5943 |
x, err := c.Do() |
| 5944 |
if err != nil { |
| 5945 |
return err |
| 5946 |
} |
| 5947 |
if err := f(x); err != nil { |
| 5948 |
return err |
| 5949 |
} |
| 5950 |
if x.NextPageToken == "" { |
| 5951 |
return nil |
| 5952 |
} |
| 5953 |
c.PageToken(x.NextPageToken) |
| 5954 |
} |
| 5955 |
} |
| 5956 |
|
| 5957 |
type AccountsClientsUsersUpdateCall struct { |
| 5958 |
s *Service |
| 5959 |
accountId int64 |
| 5960 |
clientAccountId int64 |
| 5961 |
userId int64 |
| 5962 |
clientuser *ClientUser |
| 5963 |
urlParams_ gensupport.URLParams |
| 5964 |
ctx_ context.Context |
| 5965 |
header_ http.Header |
| 5966 |
} |
| 5967 |
|
| 5968 |
// Update: Updates an existing client user. Only the user status can be changed |
| 5969 |
// on update. |
| 5970 |
// |
| 5971 |
// - accountId: Numerical account ID of the client's sponsor buyer. (required). |
| 5972 |
// - clientAccountId: Numerical account ID of the client buyer that the user to |
| 5973 |
// be retrieved is associated with. (required). |
| 5974 |
// - userId: Numerical identifier of the user to retrieve. (required). |
| 5975 |
func (r *AccountsClientsUsersService) Update(accountId int64, clientAccountId int64, userId int64, clientuser *ClientUser) *AccountsClientsUsersUpdateCall { |
| 5976 |
c := &AccountsClientsUsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 5977 |
c.accountId = accountId |
| 5978 |
c.clientAccountId = clientAccountId |
| 5979 |
c.userId = userId |
| 5980 |
c.clientuser = clientuser |
| 5981 |
return c |
| 5982 |
} |
| 5983 |
|
| 5984 |
// Fields allows partial responses to be retrieved. See |
| 5985 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 5986 |
// details. |
| 5987 |
func (c *AccountsClientsUsersUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUsersUpdateCall { |
| 5988 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 5989 |
return c |
| 5990 |
} |
| 5991 |
|
| 5992 |
// Context sets the context to be used in this call's Do method. |
| 5993 |
func (c *AccountsClientsUsersUpdateCall) Context(ctx context.Context) *AccountsClientsUsersUpdateCall { |
| 5994 |
c.ctx_ = ctx |
| 5995 |
return c |
| 5996 |
} |
| 5997 |
|
| 5998 |
// Header returns a http.Header that can be modified by the caller to add |
| 5999 |
// headers to the request. |
| 6000 |
func (c *AccountsClientsUsersUpdateCall) Header() http.Header { |
| 6001 |
if c.header_ == nil { |
| 6002 |
c.header_ = make(http.Header) |
| 6003 |
} |
| 6004 |
return c.header_ |
| 6005 |
} |
| 6006 |
|
| 6007 |
func (c *AccountsClientsUsersUpdateCall) doRequest(alt string) (*http.Response, error) { |
| 6008 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6009 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.clientuser) |
| 6010 |
if err != nil { |
| 6011 |
return nil, err |
| 6012 |
} |
| 6013 |
c.urlParams_.Set("alt", alt) |
| 6014 |
c.urlParams_.Set("prettyPrint", "false") |
| 6015 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}") |
| 6016 |
urls += "?" + c.urlParams_.Encode() |
| 6017 |
req, err := http.NewRequest("PUT", urls, body) |
| 6018 |
if err != nil { |
| 6019 |
return nil, err |
| 6020 |
} |
| 6021 |
req.Header = reqHeaders |
| 6022 |
googleapi.Expand(req.URL, map[string]string{ |
| 6023 |
"accountId": strconv.FormatInt(c.accountId, 10), |
| 6024 |
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10), |
| 6025 |
"userId": strconv.FormatInt(c.userId, 10), |
| 6026 |
}) |
| 6027 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.users.update", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6028 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6029 |
} |
| 6030 |
|
| 6031 |
// Do executes the "adexchangebuyer2.accounts.clients.users.update" call. |
| 6032 |
// Any non-2xx status code is an error. Response headers are in either |
| 6033 |
// *ClientUser.ServerResponse.Header or (if a response was returned at all) in |
| 6034 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6035 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6036 |
func (c *AccountsClientsUsersUpdateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) { |
| 6037 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6038 |
res, err := c.doRequest("json") |
| 6039 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6040 |
if res.Body != nil { |
| 6041 |
res.Body.Close() |
| 6042 |
} |
| 6043 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6044 |
Code: res.StatusCode, |
| 6045 |
Header: res.Header, |
| 6046 |
}) |
| 6047 |
} |
| 6048 |
if err != nil { |
| 6049 |
return nil, err |
| 6050 |
} |
| 6051 |
defer googleapi.CloseBody(res) |
| 6052 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6053 |
return nil, gensupport.WrapError(err) |
| 6054 |
} |
| 6055 |
ret := &ClientUser{ |
| 6056 |
ServerResponse: googleapi.ServerResponse{ |
| 6057 |
Header: res.Header, |
| 6058 |
HTTPStatusCode: res.StatusCode, |
| 6059 |
}, |
| 6060 |
} |
| 6061 |
target := &ret |
| 6062 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6063 |
if err != nil { |
| 6064 |
return nil, err |
| 6065 |
} |
| 6066 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.clients.users.update", "response", internallog.HTTPResponse(res, b)) |
| 6067 |
return ret, nil |
| 6068 |
} |
| 6069 |
|
| 6070 |
type AccountsCreativesCreateCall struct { |
| 6071 |
s *Service |
| 6072 |
accountId string |
| 6073 |
creative *Creative |
| 6074 |
urlParams_ gensupport.URLParams |
| 6075 |
ctx_ context.Context |
| 6076 |
header_ http.Header |
| 6077 |
} |
| 6078 |
|
| 6079 |
// Create: Creates a creative. |
| 6080 |
// |
| 6081 |
// - accountId: The account that this creative belongs to. Can be used to |
| 6082 |
// filter the response of the creatives.list method. |
| 6083 |
func (r *AccountsCreativesService) Create(accountId string, creative *Creative) *AccountsCreativesCreateCall { |
| 6084 |
c := &AccountsCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6085 |
c.accountId = accountId |
| 6086 |
c.creative = creative |
| 6087 |
return c |
| 6088 |
} |
| 6089 |
|
| 6090 |
// DuplicateIdMode sets the optional parameter "duplicateIdMode": Indicates if |
| 6091 |
// multiple creatives can share an ID or not. Default is NO_DUPLICATES (one ID |
| 6092 |
// per creative). |
| 6093 |
// |
| 6094 |
// Possible values: |
| 6095 |
// |
| 6096 |
// "NO_DUPLICATES" - Recommended. This means that an ID will be unique to a |
| 6097 |
// |
| 6098 |
// single creative. Multiple creatives will not share an ID. |
| 6099 |
// |
| 6100 |
// "FORCE_ENABLE_DUPLICATE_IDS" - Not recommended. Using this option will |
| 6101 |
// |
| 6102 |
// allow multiple creatives to share the same ID. Get and Update requests will |
| 6103 |
// not be possible for any ID that has more than one creative associated. (List |
| 6104 |
// will still function.) This is only intended for backwards compatibility in |
| 6105 |
// cases where a single ID is already shared by multiple creatives from |
| 6106 |
// previous APIs. |
| 6107 |
func (c *AccountsCreativesCreateCall) DuplicateIdMode(duplicateIdMode string) *AccountsCreativesCreateCall { |
| 6108 |
c.urlParams_.Set("duplicateIdMode", duplicateIdMode) |
| 6109 |
return c |
| 6110 |
} |
| 6111 |
|
| 6112 |
// Fields allows partial responses to be retrieved. See |
| 6113 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6114 |
// details. |
| 6115 |
func (c *AccountsCreativesCreateCall) Fields(s ...googleapi.Field) *AccountsCreativesCreateCall { |
| 6116 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6117 |
return c |
| 6118 |
} |
| 6119 |
|
| 6120 |
// Context sets the context to be used in this call's Do method. |
| 6121 |
func (c *AccountsCreativesCreateCall) Context(ctx context.Context) *AccountsCreativesCreateCall { |
| 6122 |
c.ctx_ = ctx |
| 6123 |
return c |
| 6124 |
} |
| 6125 |
|
| 6126 |
// Header returns a http.Header that can be modified by the caller to add |
| 6127 |
// headers to the request. |
| 6128 |
func (c *AccountsCreativesCreateCall) Header() http.Header { |
| 6129 |
if c.header_ == nil { |
| 6130 |
c.header_ = make(http.Header) |
| 6131 |
} |
| 6132 |
return c.header_ |
| 6133 |
} |
| 6134 |
|
| 6135 |
func (c *AccountsCreativesCreateCall) doRequest(alt string) (*http.Response, error) { |
| 6136 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6137 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) |
| 6138 |
if err != nil { |
| 6139 |
return nil, err |
| 6140 |
} |
| 6141 |
c.urlParams_.Set("alt", alt) |
| 6142 |
c.urlParams_.Set("prettyPrint", "false") |
| 6143 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives") |
| 6144 |
urls += "?" + c.urlParams_.Encode() |
| 6145 |
req, err := http.NewRequest("POST", urls, body) |
| 6146 |
if err != nil { |
| 6147 |
return nil, err |
| 6148 |
} |
| 6149 |
req.Header = reqHeaders |
| 6150 |
googleapi.Expand(req.URL, map[string]string{ |
| 6151 |
"accountId": c.accountId, |
| 6152 |
}) |
| 6153 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6154 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6155 |
} |
| 6156 |
|
| 6157 |
// Do executes the "adexchangebuyer2.accounts.creatives.create" call. |
| 6158 |
// Any non-2xx status code is an error. Response headers are in either |
| 6159 |
// *Creative.ServerResponse.Header or (if a response was returned at all) in |
| 6160 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6161 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6162 |
func (c *AccountsCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { |
| 6163 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6164 |
res, err := c.doRequest("json") |
| 6165 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6166 |
if res.Body != nil { |
| 6167 |
res.Body.Close() |
| 6168 |
} |
| 6169 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6170 |
Code: res.StatusCode, |
| 6171 |
Header: res.Header, |
| 6172 |
}) |
| 6173 |
} |
| 6174 |
if err != nil { |
| 6175 |
return nil, err |
| 6176 |
} |
| 6177 |
defer googleapi.CloseBody(res) |
| 6178 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6179 |
return nil, gensupport.WrapError(err) |
| 6180 |
} |
| 6181 |
ret := &Creative{ |
| 6182 |
ServerResponse: googleapi.ServerResponse{ |
| 6183 |
Header: res.Header, |
| 6184 |
HTTPStatusCode: res.StatusCode, |
| 6185 |
}, |
| 6186 |
} |
| 6187 |
target := &ret |
| 6188 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6189 |
if err != nil { |
| 6190 |
return nil, err |
| 6191 |
} |
| 6192 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.create", "response", internallog.HTTPResponse(res, b)) |
| 6193 |
return ret, nil |
| 6194 |
} |
| 6195 |
|
| 6196 |
type AccountsCreativesGetCall struct { |
| 6197 |
s *Service |
| 6198 |
accountId string |
| 6199 |
creativeId string |
| 6200 |
urlParams_ gensupport.URLParams |
| 6201 |
ifNoneMatch_ string |
| 6202 |
ctx_ context.Context |
| 6203 |
header_ http.Header |
| 6204 |
} |
| 6205 |
|
| 6206 |
// Get: Gets a creative. |
| 6207 |
// |
| 6208 |
// - accountId: The account the creative belongs to. |
| 6209 |
// - creativeId: The ID of the creative to retrieve. |
| 6210 |
func (r *AccountsCreativesService) Get(accountId string, creativeId string) *AccountsCreativesGetCall { |
| 6211 |
c := &AccountsCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6212 |
c.accountId = accountId |
| 6213 |
c.creativeId = creativeId |
| 6214 |
return c |
| 6215 |
} |
| 6216 |
|
| 6217 |
// Fields allows partial responses to be retrieved. See |
| 6218 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6219 |
// details. |
| 6220 |
func (c *AccountsCreativesGetCall) Fields(s ...googleapi.Field) *AccountsCreativesGetCall { |
| 6221 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6222 |
return c |
| 6223 |
} |
| 6224 |
|
| 6225 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 6226 |
// object's ETag matches the given value. This is useful for getting updates |
| 6227 |
// only after the object has changed since the last request. |
| 6228 |
func (c *AccountsCreativesGetCall) IfNoneMatch(entityTag string) *AccountsCreativesGetCall { |
| 6229 |
c.ifNoneMatch_ = entityTag |
| 6230 |
return c |
| 6231 |
} |
| 6232 |
|
| 6233 |
// Context sets the context to be used in this call's Do method. |
| 6234 |
func (c *AccountsCreativesGetCall) Context(ctx context.Context) *AccountsCreativesGetCall { |
| 6235 |
c.ctx_ = ctx |
| 6236 |
return c |
| 6237 |
} |
| 6238 |
|
| 6239 |
// Header returns a http.Header that can be modified by the caller to add |
| 6240 |
// headers to the request. |
| 6241 |
func (c *AccountsCreativesGetCall) Header() http.Header { |
| 6242 |
if c.header_ == nil { |
| 6243 |
c.header_ = make(http.Header) |
| 6244 |
} |
| 6245 |
return c.header_ |
| 6246 |
} |
| 6247 |
|
| 6248 |
func (c *AccountsCreativesGetCall) doRequest(alt string) (*http.Response, error) { |
| 6249 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 6250 |
if c.ifNoneMatch_ != "" { |
| 6251 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 6252 |
} |
| 6253 |
c.urlParams_.Set("alt", alt) |
| 6254 |
c.urlParams_.Set("prettyPrint", "false") |
| 6255 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}") |
| 6256 |
urls += "?" + c.urlParams_.Encode() |
| 6257 |
req, err := http.NewRequest("GET", urls, nil) |
| 6258 |
if err != nil { |
| 6259 |
return nil, err |
| 6260 |
} |
| 6261 |
req.Header = reqHeaders |
| 6262 |
googleapi.Expand(req.URL, map[string]string{ |
| 6263 |
"accountId": c.accountId, |
| 6264 |
"creativeId": c.creativeId, |
| 6265 |
}) |
| 6266 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.get", "request", internallog.HTTPRequest(req, nil)) |
| 6267 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6268 |
} |
| 6269 |
|
| 6270 |
// Do executes the "adexchangebuyer2.accounts.creatives.get" call. |
| 6271 |
// Any non-2xx status code is an error. Response headers are in either |
| 6272 |
// *Creative.ServerResponse.Header or (if a response was returned at all) in |
| 6273 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6274 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6275 |
func (c *AccountsCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) { |
| 6276 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6277 |
res, err := c.doRequest("json") |
| 6278 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6279 |
if res.Body != nil { |
| 6280 |
res.Body.Close() |
| 6281 |
} |
| 6282 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6283 |
Code: res.StatusCode, |
| 6284 |
Header: res.Header, |
| 6285 |
}) |
| 6286 |
} |
| 6287 |
if err != nil { |
| 6288 |
return nil, err |
| 6289 |
} |
| 6290 |
defer googleapi.CloseBody(res) |
| 6291 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6292 |
return nil, gensupport.WrapError(err) |
| 6293 |
} |
| 6294 |
ret := &Creative{ |
| 6295 |
ServerResponse: googleapi.ServerResponse{ |
| 6296 |
Header: res.Header, |
| 6297 |
HTTPStatusCode: res.StatusCode, |
| 6298 |
}, |
| 6299 |
} |
| 6300 |
target := &ret |
| 6301 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6302 |
if err != nil { |
| 6303 |
return nil, err |
| 6304 |
} |
| 6305 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.get", "response", internallog.HTTPResponse(res, b)) |
| 6306 |
return ret, nil |
| 6307 |
} |
| 6308 |
|
| 6309 |
type AccountsCreativesListCall struct { |
| 6310 |
s *Service |
| 6311 |
accountId string |
| 6312 |
urlParams_ gensupport.URLParams |
| 6313 |
ifNoneMatch_ string |
| 6314 |
ctx_ context.Context |
| 6315 |
header_ http.Header |
| 6316 |
} |
| 6317 |
|
| 6318 |
// List: Lists creatives. |
| 6319 |
// |
| 6320 |
// - accountId: The account to list the creatives from. Specify "-" to list all |
| 6321 |
// creatives the current user has access to. |
| 6322 |
func (r *AccountsCreativesService) List(accountId string) *AccountsCreativesListCall { |
| 6323 |
c := &AccountsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6324 |
c.accountId = accountId |
| 6325 |
return c |
| 6326 |
} |
| 6327 |
|
| 6328 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 6329 |
// server may return fewer creatives than requested (due to timeout constraint) |
| 6330 |
// even if more are available through another call. If unspecified, server will |
| 6331 |
// pick an appropriate default. Acceptable values are 1 to 1000, inclusive. |
| 6332 |
func (c *AccountsCreativesListCall) PageSize(pageSize int64) *AccountsCreativesListCall { |
| 6333 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 6334 |
return c |
| 6335 |
} |
| 6336 |
|
| 6337 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 6338 |
// page of results the server should return. Typically, this is the value of |
| 6339 |
// ListCreativesResponse.next_page_token returned from the previous call to |
| 6340 |
// 'ListCreatives' method. |
| 6341 |
func (c *AccountsCreativesListCall) PageToken(pageToken string) *AccountsCreativesListCall { |
| 6342 |
c.urlParams_.Set("pageToken", pageToken) |
| 6343 |
return c |
| 6344 |
} |
| 6345 |
|
| 6346 |
// Query sets the optional parameter "query": An optional query string to |
| 6347 |
// filter creatives. If no filter is specified, all active creatives will be |
| 6348 |
// returned. Supported queries are: - accountId=*account_id_string* - |
| 6349 |
// creativeId=*creative_id_string* - dealsStatus: {approved, |
| 6350 |
// conditionally_approved, disapproved, not_checked} - openAuctionStatus: |
| 6351 |
// {approved, conditionally_approved, disapproved, not_checked} - attribute: {a |
| 6352 |
// numeric attribute from the list of attributes} - disapprovalReason: {a |
| 6353 |
// reason from DisapprovalReason} Example: 'accountId=12345 AND |
| 6354 |
// (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) OR |
| 6355 |
// attribute:47' |
| 6356 |
func (c *AccountsCreativesListCall) Query(query string) *AccountsCreativesListCall { |
| 6357 |
c.urlParams_.Set("query", query) |
| 6358 |
return c |
| 6359 |
} |
| 6360 |
|
| 6361 |
// Fields allows partial responses to be retrieved. See |
| 6362 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6363 |
// details. |
| 6364 |
func (c *AccountsCreativesListCall) Fields(s ...googleapi.Field) *AccountsCreativesListCall { |
| 6365 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6366 |
return c |
| 6367 |
} |
| 6368 |
|
| 6369 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 6370 |
// object's ETag matches the given value. This is useful for getting updates |
| 6371 |
// only after the object has changed since the last request. |
| 6372 |
func (c *AccountsCreativesListCall) IfNoneMatch(entityTag string) *AccountsCreativesListCall { |
| 6373 |
c.ifNoneMatch_ = entityTag |
| 6374 |
return c |
| 6375 |
} |
| 6376 |
|
| 6377 |
// Context sets the context to be used in this call's Do method. |
| 6378 |
func (c *AccountsCreativesListCall) Context(ctx context.Context) *AccountsCreativesListCall { |
| 6379 |
c.ctx_ = ctx |
| 6380 |
return c |
| 6381 |
} |
| 6382 |
|
| 6383 |
// Header returns a http.Header that can be modified by the caller to add |
| 6384 |
// headers to the request. |
| 6385 |
func (c *AccountsCreativesListCall) Header() http.Header { |
| 6386 |
if c.header_ == nil { |
| 6387 |
c.header_ = make(http.Header) |
| 6388 |
} |
| 6389 |
return c.header_ |
| 6390 |
} |
| 6391 |
|
| 6392 |
func (c *AccountsCreativesListCall) doRequest(alt string) (*http.Response, error) { |
| 6393 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 6394 |
if c.ifNoneMatch_ != "" { |
| 6395 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 6396 |
} |
| 6397 |
c.urlParams_.Set("alt", alt) |
| 6398 |
c.urlParams_.Set("prettyPrint", "false") |
| 6399 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives") |
| 6400 |
urls += "?" + c.urlParams_.Encode() |
| 6401 |
req, err := http.NewRequest("GET", urls, nil) |
| 6402 |
if err != nil { |
| 6403 |
return nil, err |
| 6404 |
} |
| 6405 |
req.Header = reqHeaders |
| 6406 |
googleapi.Expand(req.URL, map[string]string{ |
| 6407 |
"accountId": c.accountId, |
| 6408 |
}) |
| 6409 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.list", "request", internallog.HTTPRequest(req, nil)) |
| 6410 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6411 |
} |
| 6412 |
|
| 6413 |
// Do executes the "adexchangebuyer2.accounts.creatives.list" call. |
| 6414 |
// Any non-2xx status code is an error. Response headers are in either |
| 6415 |
// *ListCreativesResponse.ServerResponse.Header or (if a response was returned |
| 6416 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 6417 |
// check whether the returned error was because http.StatusNotModified was |
| 6418 |
// returned. |
| 6419 |
func (c *AccountsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) { |
| 6420 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6421 |
res, err := c.doRequest("json") |
| 6422 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6423 |
if res.Body != nil { |
| 6424 |
res.Body.Close() |
| 6425 |
} |
| 6426 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6427 |
Code: res.StatusCode, |
| 6428 |
Header: res.Header, |
| 6429 |
}) |
| 6430 |
} |
| 6431 |
if err != nil { |
| 6432 |
return nil, err |
| 6433 |
} |
| 6434 |
defer googleapi.CloseBody(res) |
| 6435 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6436 |
return nil, gensupport.WrapError(err) |
| 6437 |
} |
| 6438 |
ret := &ListCreativesResponse{ |
| 6439 |
ServerResponse: googleapi.ServerResponse{ |
| 6440 |
Header: res.Header, |
| 6441 |
HTTPStatusCode: res.StatusCode, |
| 6442 |
}, |
| 6443 |
} |
| 6444 |
target := &ret |
| 6445 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6446 |
if err != nil { |
| 6447 |
return nil, err |
| 6448 |
} |
| 6449 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.list", "response", internallog.HTTPResponse(res, b)) |
| 6450 |
return ret, nil |
| 6451 |
} |
| 6452 |
|
| 6453 |
// Pages invokes f for each page of results. |
| 6454 |
// A non-nil error returned from f will halt the iteration. |
| 6455 |
// The provided context supersedes any context provided to the Context method. |
| 6456 |
func (c *AccountsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error { |
| 6457 |
c.ctx_ = ctx |
| 6458 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 6459 |
for { |
| 6460 |
x, err := c.Do() |
| 6461 |
if err != nil { |
| 6462 |
return err |
| 6463 |
} |
| 6464 |
if err := f(x); err != nil { |
| 6465 |
return err |
| 6466 |
} |
| 6467 |
if x.NextPageToken == "" { |
| 6468 |
return nil |
| 6469 |
} |
| 6470 |
c.PageToken(x.NextPageToken) |
| 6471 |
} |
| 6472 |
} |
| 6473 |
|
| 6474 |
type AccountsCreativesStopWatchingCall struct { |
| 6475 |
s *Service |
| 6476 |
accountId string |
| 6477 |
creativeId string |
| 6478 |
stopwatchingcreativerequest *StopWatchingCreativeRequest |
| 6479 |
urlParams_ gensupport.URLParams |
| 6480 |
ctx_ context.Context |
| 6481 |
header_ http.Header |
| 6482 |
} |
| 6483 |
|
| 6484 |
// StopWatching: Stops watching a creative. Will stop push notifications being |
| 6485 |
// sent to the topics when the creative changes status. |
| 6486 |
// |
| 6487 |
// - accountId: The account of the creative to stop notifications for. |
| 6488 |
// - creativeId: The creative ID of the creative to stop notifications for. |
| 6489 |
// Specify "-" to specify stopping account level notifications. |
| 6490 |
func (r *AccountsCreativesService) StopWatching(accountId string, creativeId string, stopwatchingcreativerequest *StopWatchingCreativeRequest) *AccountsCreativesStopWatchingCall { |
| 6491 |
c := &AccountsCreativesStopWatchingCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6492 |
c.accountId = accountId |
| 6493 |
c.creativeId = creativeId |
| 6494 |
c.stopwatchingcreativerequest = stopwatchingcreativerequest |
| 6495 |
return c |
| 6496 |
} |
| 6497 |
|
| 6498 |
// Fields allows partial responses to be retrieved. See |
| 6499 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6500 |
// details. |
| 6501 |
func (c *AccountsCreativesStopWatchingCall) Fields(s ...googleapi.Field) *AccountsCreativesStopWatchingCall { |
| 6502 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6503 |
return c |
| 6504 |
} |
| 6505 |
|
| 6506 |
// Context sets the context to be used in this call's Do method. |
| 6507 |
func (c *AccountsCreativesStopWatchingCall) Context(ctx context.Context) *AccountsCreativesStopWatchingCall { |
| 6508 |
c.ctx_ = ctx |
| 6509 |
return c |
| 6510 |
} |
| 6511 |
|
| 6512 |
// Header returns a http.Header that can be modified by the caller to add |
| 6513 |
// headers to the request. |
| 6514 |
func (c *AccountsCreativesStopWatchingCall) Header() http.Header { |
| 6515 |
if c.header_ == nil { |
| 6516 |
c.header_ = make(http.Header) |
| 6517 |
} |
| 6518 |
return c.header_ |
| 6519 |
} |
| 6520 |
|
| 6521 |
func (c *AccountsCreativesStopWatchingCall) doRequest(alt string) (*http.Response, error) { |
| 6522 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6523 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.stopwatchingcreativerequest) |
| 6524 |
if err != nil { |
| 6525 |
return nil, err |
| 6526 |
} |
| 6527 |
c.urlParams_.Set("alt", alt) |
| 6528 |
c.urlParams_.Set("prettyPrint", "false") |
| 6529 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching") |
| 6530 |
urls += "?" + c.urlParams_.Encode() |
| 6531 |
req, err := http.NewRequest("POST", urls, body) |
| 6532 |
if err != nil { |
| 6533 |
return nil, err |
| 6534 |
} |
| 6535 |
req.Header = reqHeaders |
| 6536 |
googleapi.Expand(req.URL, map[string]string{ |
| 6537 |
"accountId": c.accountId, |
| 6538 |
"creativeId": c.creativeId, |
| 6539 |
}) |
| 6540 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.stopWatching", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6541 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6542 |
} |
| 6543 |
|
| 6544 |
// Do executes the "adexchangebuyer2.accounts.creatives.stopWatching" call. |
| 6545 |
// Any non-2xx status code is an error. Response headers are in either |
| 6546 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 6547 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6548 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6549 |
func (c *AccountsCreativesStopWatchingCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 6550 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6551 |
res, err := c.doRequest("json") |
| 6552 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6553 |
if res.Body != nil { |
| 6554 |
res.Body.Close() |
| 6555 |
} |
| 6556 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6557 |
Code: res.StatusCode, |
| 6558 |
Header: res.Header, |
| 6559 |
}) |
| 6560 |
} |
| 6561 |
if err != nil { |
| 6562 |
return nil, err |
| 6563 |
} |
| 6564 |
defer googleapi.CloseBody(res) |
| 6565 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6566 |
return nil, gensupport.WrapError(err) |
| 6567 |
} |
| 6568 |
ret := &Empty{ |
| 6569 |
ServerResponse: googleapi.ServerResponse{ |
| 6570 |
Header: res.Header, |
| 6571 |
HTTPStatusCode: res.StatusCode, |
| 6572 |
}, |
| 6573 |
} |
| 6574 |
target := &ret |
| 6575 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6576 |
if err != nil { |
| 6577 |
return nil, err |
| 6578 |
} |
| 6579 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.stopWatching", "response", internallog.HTTPResponse(res, b)) |
| 6580 |
return ret, nil |
| 6581 |
} |
| 6582 |
|
| 6583 |
type AccountsCreativesUpdateCall struct { |
| 6584 |
s *Service |
| 6585 |
accountId string |
| 6586 |
creativeId string |
| 6587 |
creative *Creative |
| 6588 |
urlParams_ gensupport.URLParams |
| 6589 |
ctx_ context.Context |
| 6590 |
header_ http.Header |
| 6591 |
} |
| 6592 |
|
| 6593 |
// Update: Updates a creative. |
| 6594 |
// |
| 6595 |
// - accountId: The account that this creative belongs to. Can be used to |
| 6596 |
// filter the response of the creatives.list method. |
| 6597 |
// - creativeId: The buyer-defined creative ID of this creative. Can be used to |
| 6598 |
// filter the response of the creatives.list method. |
| 6599 |
func (r *AccountsCreativesService) Update(accountId string, creativeId string, creative *Creative) *AccountsCreativesUpdateCall { |
| 6600 |
c := &AccountsCreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6601 |
c.accountId = accountId |
| 6602 |
c.creativeId = creativeId |
| 6603 |
c.creative = creative |
| 6604 |
return c |
| 6605 |
} |
| 6606 |
|
| 6607 |
// Fields allows partial responses to be retrieved. See |
| 6608 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6609 |
// details. |
| 6610 |
func (c *AccountsCreativesUpdateCall) Fields(s ...googleapi.Field) *AccountsCreativesUpdateCall { |
| 6611 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6612 |
return c |
| 6613 |
} |
| 6614 |
|
| 6615 |
// Context sets the context to be used in this call's Do method. |
| 6616 |
func (c *AccountsCreativesUpdateCall) Context(ctx context.Context) *AccountsCreativesUpdateCall { |
| 6617 |
c.ctx_ = ctx |
| 6618 |
return c |
| 6619 |
} |
| 6620 |
|
| 6621 |
// Header returns a http.Header that can be modified by the caller to add |
| 6622 |
// headers to the request. |
| 6623 |
func (c *AccountsCreativesUpdateCall) Header() http.Header { |
| 6624 |
if c.header_ == nil { |
| 6625 |
c.header_ = make(http.Header) |
| 6626 |
} |
| 6627 |
return c.header_ |
| 6628 |
} |
| 6629 |
|
| 6630 |
func (c *AccountsCreativesUpdateCall) doRequest(alt string) (*http.Response, error) { |
| 6631 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6632 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.creative) |
| 6633 |
if err != nil { |
| 6634 |
return nil, err |
| 6635 |
} |
| 6636 |
c.urlParams_.Set("alt", alt) |
| 6637 |
c.urlParams_.Set("prettyPrint", "false") |
| 6638 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}") |
| 6639 |
urls += "?" + c.urlParams_.Encode() |
| 6640 |
req, err := http.NewRequest("PUT", urls, body) |
| 6641 |
if err != nil { |
| 6642 |
return nil, err |
| 6643 |
} |
| 6644 |
req.Header = reqHeaders |
| 6645 |
googleapi.Expand(req.URL, map[string]string{ |
| 6646 |
"accountId": c.accountId, |
| 6647 |
"creativeId": c.creativeId, |
| 6648 |
}) |
| 6649 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.update", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6650 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6651 |
} |
| 6652 |
|
| 6653 |
// Do executes the "adexchangebuyer2.accounts.creatives.update" call. |
| 6654 |
// Any non-2xx status code is an error. Response headers are in either |
| 6655 |
// *Creative.ServerResponse.Header or (if a response was returned at all) in |
| 6656 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6657 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6658 |
func (c *AccountsCreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) { |
| 6659 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6660 |
res, err := c.doRequest("json") |
| 6661 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6662 |
if res.Body != nil { |
| 6663 |
res.Body.Close() |
| 6664 |
} |
| 6665 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6666 |
Code: res.StatusCode, |
| 6667 |
Header: res.Header, |
| 6668 |
}) |
| 6669 |
} |
| 6670 |
if err != nil { |
| 6671 |
return nil, err |
| 6672 |
} |
| 6673 |
defer googleapi.CloseBody(res) |
| 6674 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6675 |
return nil, gensupport.WrapError(err) |
| 6676 |
} |
| 6677 |
ret := &Creative{ |
| 6678 |
ServerResponse: googleapi.ServerResponse{ |
| 6679 |
Header: res.Header, |
| 6680 |
HTTPStatusCode: res.StatusCode, |
| 6681 |
}, |
| 6682 |
} |
| 6683 |
target := &ret |
| 6684 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6685 |
if err != nil { |
| 6686 |
return nil, err |
| 6687 |
} |
| 6688 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.update", "response", internallog.HTTPResponse(res, b)) |
| 6689 |
return ret, nil |
| 6690 |
} |
| 6691 |
|
| 6692 |
type AccountsCreativesWatchCall struct { |
| 6693 |
s *Service |
| 6694 |
accountId string |
| 6695 |
creativeId string |
| 6696 |
watchcreativerequest *WatchCreativeRequest |
| 6697 |
urlParams_ gensupport.URLParams |
| 6698 |
ctx_ context.Context |
| 6699 |
header_ http.Header |
| 6700 |
} |
| 6701 |
|
| 6702 |
// Watch: Watches a creative. Will result in push notifications being sent to |
| 6703 |
// the topic when the creative changes status. |
| 6704 |
// |
| 6705 |
// - accountId: The account of the creative to watch. |
| 6706 |
// - creativeId: The creative ID to watch for status changes. Specify "-" to |
| 6707 |
// watch all creatives under the above account. If both creative-level and |
| 6708 |
// account-level notifications are sent, only a single notification will be |
| 6709 |
// sent to the creative-level notification topic. |
| 6710 |
func (r *AccountsCreativesService) Watch(accountId string, creativeId string, watchcreativerequest *WatchCreativeRequest) *AccountsCreativesWatchCall { |
| 6711 |
c := &AccountsCreativesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6712 |
c.accountId = accountId |
| 6713 |
c.creativeId = creativeId |
| 6714 |
c.watchcreativerequest = watchcreativerequest |
| 6715 |
return c |
| 6716 |
} |
| 6717 |
|
| 6718 |
// Fields allows partial responses to be retrieved. See |
| 6719 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6720 |
// details. |
| 6721 |
func (c *AccountsCreativesWatchCall) Fields(s ...googleapi.Field) *AccountsCreativesWatchCall { |
| 6722 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6723 |
return c |
| 6724 |
} |
| 6725 |
|
| 6726 |
// Context sets the context to be used in this call's Do method. |
| 6727 |
func (c *AccountsCreativesWatchCall) Context(ctx context.Context) *AccountsCreativesWatchCall { |
| 6728 |
c.ctx_ = ctx |
| 6729 |
return c |
| 6730 |
} |
| 6731 |
|
| 6732 |
// Header returns a http.Header that can be modified by the caller to add |
| 6733 |
// headers to the request. |
| 6734 |
func (c *AccountsCreativesWatchCall) Header() http.Header { |
| 6735 |
if c.header_ == nil { |
| 6736 |
c.header_ = make(http.Header) |
| 6737 |
} |
| 6738 |
return c.header_ |
| 6739 |
} |
| 6740 |
|
| 6741 |
func (c *AccountsCreativesWatchCall) doRequest(alt string) (*http.Response, error) { |
| 6742 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6743 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.watchcreativerequest) |
| 6744 |
if err != nil { |
| 6745 |
return nil, err |
| 6746 |
} |
| 6747 |
c.urlParams_.Set("alt", alt) |
| 6748 |
c.urlParams_.Set("prettyPrint", "false") |
| 6749 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch") |
| 6750 |
urls += "?" + c.urlParams_.Encode() |
| 6751 |
req, err := http.NewRequest("POST", urls, body) |
| 6752 |
if err != nil { |
| 6753 |
return nil, err |
| 6754 |
} |
| 6755 |
req.Header = reqHeaders |
| 6756 |
googleapi.Expand(req.URL, map[string]string{ |
| 6757 |
"accountId": c.accountId, |
| 6758 |
"creativeId": c.creativeId, |
| 6759 |
}) |
| 6760 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.watch", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6761 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6762 |
} |
| 6763 |
|
| 6764 |
// Do executes the "adexchangebuyer2.accounts.creatives.watch" call. |
| 6765 |
// Any non-2xx status code is an error. Response headers are in either |
| 6766 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 6767 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6768 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6769 |
func (c *AccountsCreativesWatchCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{ |
| 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", "adexchangebuyer2.accounts.creatives.watch", "response", internallog.HTTPResponse(res, b)) |
| 6800 |
return ret, nil |
| 6801 |
} |
| 6802 |
|
| 6803 |
type AccountsCreativesDealAssociationsAddCall struct { |
| 6804 |
s *Service |
| 6805 |
accountId string |
| 6806 |
creativeId string |
| 6807 |
adddealassociationrequest *AddDealAssociationRequest |
| 6808 |
urlParams_ gensupport.URLParams |
| 6809 |
ctx_ context.Context |
| 6810 |
header_ http.Header |
| 6811 |
} |
| 6812 |
|
| 6813 |
// Add: Associate an existing deal with a creative. |
| 6814 |
// |
| 6815 |
// - accountId: The account the creative belongs to. |
| 6816 |
// - creativeId: The ID of the creative associated with the deal. |
| 6817 |
func (r *AccountsCreativesDealAssociationsService) Add(accountId string, creativeId string, adddealassociationrequest *AddDealAssociationRequest) *AccountsCreativesDealAssociationsAddCall { |
| 6818 |
c := &AccountsCreativesDealAssociationsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6819 |
c.accountId = accountId |
| 6820 |
c.creativeId = creativeId |
| 6821 |
c.adddealassociationrequest = adddealassociationrequest |
| 6822 |
return c |
| 6823 |
} |
| 6824 |
|
| 6825 |
// Fields allows partial responses to be retrieved. See |
| 6826 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6827 |
// details. |
| 6828 |
func (c *AccountsCreativesDealAssociationsAddCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsAddCall { |
| 6829 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6830 |
return c |
| 6831 |
} |
| 6832 |
|
| 6833 |
// Context sets the context to be used in this call's Do method. |
| 6834 |
func (c *AccountsCreativesDealAssociationsAddCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsAddCall { |
| 6835 |
c.ctx_ = ctx |
| 6836 |
return c |
| 6837 |
} |
| 6838 |
|
| 6839 |
// Header returns a http.Header that can be modified by the caller to add |
| 6840 |
// headers to the request. |
| 6841 |
func (c *AccountsCreativesDealAssociationsAddCall) Header() http.Header { |
| 6842 |
if c.header_ == nil { |
| 6843 |
c.header_ = make(http.Header) |
| 6844 |
} |
| 6845 |
return c.header_ |
| 6846 |
} |
| 6847 |
|
| 6848 |
func (c *AccountsCreativesDealAssociationsAddCall) doRequest(alt string) (*http.Response, error) { |
| 6849 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 6850 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.adddealassociationrequest) |
| 6851 |
if err != nil { |
| 6852 |
return nil, err |
| 6853 |
} |
| 6854 |
c.urlParams_.Set("alt", alt) |
| 6855 |
c.urlParams_.Set("prettyPrint", "false") |
| 6856 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add") |
| 6857 |
urls += "?" + c.urlParams_.Encode() |
| 6858 |
req, err := http.NewRequest("POST", urls, body) |
| 6859 |
if err != nil { |
| 6860 |
return nil, err |
| 6861 |
} |
| 6862 |
req.Header = reqHeaders |
| 6863 |
googleapi.Expand(req.URL, map[string]string{ |
| 6864 |
"accountId": c.accountId, |
| 6865 |
"creativeId": c.creativeId, |
| 6866 |
}) |
| 6867 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.dealAssociations.add", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 6868 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 6869 |
} |
| 6870 |
|
| 6871 |
// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.add" call. |
| 6872 |
// Any non-2xx status code is an error. Response headers are in either |
| 6873 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 6874 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 6875 |
// whether the returned error was because http.StatusNotModified was returned. |
| 6876 |
func (c *AccountsCreativesDealAssociationsAddCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 6877 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 6878 |
res, err := c.doRequest("json") |
| 6879 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 6880 |
if res.Body != nil { |
| 6881 |
res.Body.Close() |
| 6882 |
} |
| 6883 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 6884 |
Code: res.StatusCode, |
| 6885 |
Header: res.Header, |
| 6886 |
}) |
| 6887 |
} |
| 6888 |
if err != nil { |
| 6889 |
return nil, err |
| 6890 |
} |
| 6891 |
defer googleapi.CloseBody(res) |
| 6892 |
if err := googleapi.CheckResponse(res); err != nil { |
| 6893 |
return nil, gensupport.WrapError(err) |
| 6894 |
} |
| 6895 |
ret := &Empty{ |
| 6896 |
ServerResponse: googleapi.ServerResponse{ |
| 6897 |
Header: res.Header, |
| 6898 |
HTTPStatusCode: res.StatusCode, |
| 6899 |
}, |
| 6900 |
} |
| 6901 |
target := &ret |
| 6902 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 6903 |
if err != nil { |
| 6904 |
return nil, err |
| 6905 |
} |
| 6906 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.dealAssociations.add", "response", internallog.HTTPResponse(res, b)) |
| 6907 |
return ret, nil |
| 6908 |
} |
| 6909 |
|
| 6910 |
type AccountsCreativesDealAssociationsListCall struct { |
| 6911 |
s *Service |
| 6912 |
accountId string |
| 6913 |
creativeId string |
| 6914 |
urlParams_ gensupport.URLParams |
| 6915 |
ifNoneMatch_ string |
| 6916 |
ctx_ context.Context |
| 6917 |
header_ http.Header |
| 6918 |
} |
| 6919 |
|
| 6920 |
// List: List all creative-deal associations. |
| 6921 |
// |
| 6922 |
// - accountId: The account to list the associations from. Specify "-" to list |
| 6923 |
// all creatives the current user has access to. |
| 6924 |
// - creativeId: The creative ID to list the associations from. Specify "-" to |
| 6925 |
// list all creatives under the above account. |
| 6926 |
func (r *AccountsCreativesDealAssociationsService) List(accountId string, creativeId string) *AccountsCreativesDealAssociationsListCall { |
| 6927 |
c := &AccountsCreativesDealAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 6928 |
c.accountId = accountId |
| 6929 |
c.creativeId = creativeId |
| 6930 |
return c |
| 6931 |
} |
| 6932 |
|
| 6933 |
// PageSize sets the optional parameter "pageSize": Requested page size. Server |
| 6934 |
// may return fewer associations than requested. If unspecified, server will |
| 6935 |
// pick an appropriate default. |
| 6936 |
func (c *AccountsCreativesDealAssociationsListCall) PageSize(pageSize int64) *AccountsCreativesDealAssociationsListCall { |
| 6937 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 6938 |
return c |
| 6939 |
} |
| 6940 |
|
| 6941 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 6942 |
// page of results the server should return. Typically, this is the value of |
| 6943 |
// ListDealAssociationsResponse.next_page_token returned from the previous call |
| 6944 |
// to 'ListDealAssociations' method. |
| 6945 |
func (c *AccountsCreativesDealAssociationsListCall) PageToken(pageToken string) *AccountsCreativesDealAssociationsListCall { |
| 6946 |
c.urlParams_.Set("pageToken", pageToken) |
| 6947 |
return c |
| 6948 |
} |
| 6949 |
|
| 6950 |
// Query sets the optional parameter "query": An optional query string to |
| 6951 |
// filter deal associations. If no filter is specified, all associations will |
| 6952 |
// be returned. Supported queries are: - accountId=*account_id_string* - |
| 6953 |
// creativeId=*creative_id_string* - dealsId=*deals_id_string* - |
| 6954 |
// dealsStatus:{approved, conditionally_approved, disapproved, not_checked} - |
| 6955 |
// openAuctionStatus:{approved, conditionally_approved, disapproved, |
| 6956 |
// not_checked} Example: 'dealsId=12345 AND dealsStatus:disapproved' |
| 6957 |
func (c *AccountsCreativesDealAssociationsListCall) Query(query string) *AccountsCreativesDealAssociationsListCall { |
| 6958 |
c.urlParams_.Set("query", query) |
| 6959 |
return c |
| 6960 |
} |
| 6961 |
|
| 6962 |
// Fields allows partial responses to be retrieved. See |
| 6963 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 6964 |
// details. |
| 6965 |
func (c *AccountsCreativesDealAssociationsListCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsListCall { |
| 6966 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 6967 |
return c |
| 6968 |
} |
| 6969 |
|
| 6970 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 6971 |
// object's ETag matches the given value. This is useful for getting updates |
| 6972 |
// only after the object has changed since the last request. |
| 6973 |
func (c *AccountsCreativesDealAssociationsListCall) IfNoneMatch(entityTag string) *AccountsCreativesDealAssociationsListCall { |
| 6974 |
c.ifNoneMatch_ = entityTag |
| 6975 |
return c |
| 6976 |
} |
| 6977 |
|
| 6978 |
// Context sets the context to be used in this call's Do method. |
| 6979 |
func (c *AccountsCreativesDealAssociationsListCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsListCall { |
| 6980 |
c.ctx_ = ctx |
| 6981 |
return c |
| 6982 |
} |
| 6983 |
|
| 6984 |
// Header returns a http.Header that can be modified by the caller to add |
| 6985 |
// headers to the request. |
| 6986 |
func (c *AccountsCreativesDealAssociationsListCall) Header() http.Header { |
| 6987 |
if c.header_ == nil { |
| 6988 |
c.header_ = make(http.Header) |
| 6989 |
} |
| 6990 |
return c.header_ |
| 6991 |
} |
| 6992 |
|
| 6993 |
func (c *AccountsCreativesDealAssociationsListCall) doRequest(alt string) (*http.Response, error) { |
| 6994 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 6995 |
if c.ifNoneMatch_ != "" { |
| 6996 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 6997 |
} |
| 6998 |
c.urlParams_.Set("alt", alt) |
| 6999 |
c.urlParams_.Set("prettyPrint", "false") |
| 7000 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations") |
| 7001 |
urls += "?" + c.urlParams_.Encode() |
| 7002 |
req, err := http.NewRequest("GET", urls, nil) |
| 7003 |
if err != nil { |
| 7004 |
return nil, err |
| 7005 |
} |
| 7006 |
req.Header = reqHeaders |
| 7007 |
googleapi.Expand(req.URL, map[string]string{ |
| 7008 |
"accountId": c.accountId, |
| 7009 |
"creativeId": c.creativeId, |
| 7010 |
}) |
| 7011 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.dealAssociations.list", "request", internallog.HTTPRequest(req, nil)) |
| 7012 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7013 |
} |
| 7014 |
|
| 7015 |
// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.list" call. |
| 7016 |
// Any non-2xx status code is an error. Response headers are in either |
| 7017 |
// *ListDealAssociationsResponse.ServerResponse.Header or (if a response was |
| 7018 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 7019 |
// googleapi.IsNotModified to check whether the returned error was because |
| 7020 |
// http.StatusNotModified was returned. |
| 7021 |
func (c *AccountsCreativesDealAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListDealAssociationsResponse, error) { |
| 7022 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7023 |
res, err := c.doRequest("json") |
| 7024 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7025 |
if res.Body != nil { |
| 7026 |
res.Body.Close() |
| 7027 |
} |
| 7028 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7029 |
Code: res.StatusCode, |
| 7030 |
Header: res.Header, |
| 7031 |
}) |
| 7032 |
} |
| 7033 |
if err != nil { |
| 7034 |
return nil, err |
| 7035 |
} |
| 7036 |
defer googleapi.CloseBody(res) |
| 7037 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7038 |
return nil, gensupport.WrapError(err) |
| 7039 |
} |
| 7040 |
ret := &ListDealAssociationsResponse{ |
| 7041 |
ServerResponse: googleapi.ServerResponse{ |
| 7042 |
Header: res.Header, |
| 7043 |
HTTPStatusCode: res.StatusCode, |
| 7044 |
}, |
| 7045 |
} |
| 7046 |
target := &ret |
| 7047 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7048 |
if err != nil { |
| 7049 |
return nil, err |
| 7050 |
} |
| 7051 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.dealAssociations.list", "response", internallog.HTTPResponse(res, b)) |
| 7052 |
return ret, nil |
| 7053 |
} |
| 7054 |
|
| 7055 |
// Pages invokes f for each page of results. |
| 7056 |
// A non-nil error returned from f will halt the iteration. |
| 7057 |
// The provided context supersedes any context provided to the Context method. |
| 7058 |
func (c *AccountsCreativesDealAssociationsListCall) Pages(ctx context.Context, f func(*ListDealAssociationsResponse) error) error { |
| 7059 |
c.ctx_ = ctx |
| 7060 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 7061 |
for { |
| 7062 |
x, err := c.Do() |
| 7063 |
if err != nil { |
| 7064 |
return err |
| 7065 |
} |
| 7066 |
if err := f(x); err != nil { |
| 7067 |
return err |
| 7068 |
} |
| 7069 |
if x.NextPageToken == "" { |
| 7070 |
return nil |
| 7071 |
} |
| 7072 |
c.PageToken(x.NextPageToken) |
| 7073 |
} |
| 7074 |
} |
| 7075 |
|
| 7076 |
type AccountsCreativesDealAssociationsRemoveCall struct { |
| 7077 |
s *Service |
| 7078 |
accountId string |
| 7079 |
creativeId string |
| 7080 |
removedealassociationrequest *RemoveDealAssociationRequest |
| 7081 |
urlParams_ gensupport.URLParams |
| 7082 |
ctx_ context.Context |
| 7083 |
header_ http.Header |
| 7084 |
} |
| 7085 |
|
| 7086 |
// Remove: Remove the association between a deal and a creative. |
| 7087 |
// |
| 7088 |
// - accountId: The account the creative belongs to. |
| 7089 |
// - creativeId: The ID of the creative associated with the deal. |
| 7090 |
func (r *AccountsCreativesDealAssociationsService) Remove(accountId string, creativeId string, removedealassociationrequest *RemoveDealAssociationRequest) *AccountsCreativesDealAssociationsRemoveCall { |
| 7091 |
c := &AccountsCreativesDealAssociationsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7092 |
c.accountId = accountId |
| 7093 |
c.creativeId = creativeId |
| 7094 |
c.removedealassociationrequest = removedealassociationrequest |
| 7095 |
return c |
| 7096 |
} |
| 7097 |
|
| 7098 |
// Fields allows partial responses to be retrieved. See |
| 7099 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7100 |
// details. |
| 7101 |
func (c *AccountsCreativesDealAssociationsRemoveCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsRemoveCall { |
| 7102 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7103 |
return c |
| 7104 |
} |
| 7105 |
|
| 7106 |
// Context sets the context to be used in this call's Do method. |
| 7107 |
func (c *AccountsCreativesDealAssociationsRemoveCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsRemoveCall { |
| 7108 |
c.ctx_ = ctx |
| 7109 |
return c |
| 7110 |
} |
| 7111 |
|
| 7112 |
// Header returns a http.Header that can be modified by the caller to add |
| 7113 |
// headers to the request. |
| 7114 |
func (c *AccountsCreativesDealAssociationsRemoveCall) Header() http.Header { |
| 7115 |
if c.header_ == nil { |
| 7116 |
c.header_ = make(http.Header) |
| 7117 |
} |
| 7118 |
return c.header_ |
| 7119 |
} |
| 7120 |
|
| 7121 |
func (c *AccountsCreativesDealAssociationsRemoveCall) doRequest(alt string) (*http.Response, error) { |
| 7122 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7123 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removedealassociationrequest) |
| 7124 |
if err != nil { |
| 7125 |
return nil, err |
| 7126 |
} |
| 7127 |
c.urlParams_.Set("alt", alt) |
| 7128 |
c.urlParams_.Set("prettyPrint", "false") |
| 7129 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove") |
| 7130 |
urls += "?" + c.urlParams_.Encode() |
| 7131 |
req, err := http.NewRequest("POST", urls, body) |
| 7132 |
if err != nil { |
| 7133 |
return nil, err |
| 7134 |
} |
| 7135 |
req.Header = reqHeaders |
| 7136 |
googleapi.Expand(req.URL, map[string]string{ |
| 7137 |
"accountId": c.accountId, |
| 7138 |
"creativeId": c.creativeId, |
| 7139 |
}) |
| 7140 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.dealAssociations.remove", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7141 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7142 |
} |
| 7143 |
|
| 7144 |
// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.remove" call. |
| 7145 |
// Any non-2xx status code is an error. Response headers are in either |
| 7146 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 7147 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7148 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7149 |
func (c *AccountsCreativesDealAssociationsRemoveCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 7150 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7151 |
res, err := c.doRequest("json") |
| 7152 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7153 |
if res.Body != nil { |
| 7154 |
res.Body.Close() |
| 7155 |
} |
| 7156 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7157 |
Code: res.StatusCode, |
| 7158 |
Header: res.Header, |
| 7159 |
}) |
| 7160 |
} |
| 7161 |
if err != nil { |
| 7162 |
return nil, err |
| 7163 |
} |
| 7164 |
defer googleapi.CloseBody(res) |
| 7165 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7166 |
return nil, gensupport.WrapError(err) |
| 7167 |
} |
| 7168 |
ret := &Empty{ |
| 7169 |
ServerResponse: googleapi.ServerResponse{ |
| 7170 |
Header: res.Header, |
| 7171 |
HTTPStatusCode: res.StatusCode, |
| 7172 |
}, |
| 7173 |
} |
| 7174 |
target := &ret |
| 7175 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7176 |
if err != nil { |
| 7177 |
return nil, err |
| 7178 |
} |
| 7179 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.creatives.dealAssociations.remove", "response", internallog.HTTPResponse(res, b)) |
| 7180 |
return ret, nil |
| 7181 |
} |
| 7182 |
|
| 7183 |
type AccountsFinalizedProposalsListCall struct { |
| 7184 |
s *Service |
| 7185 |
accountId string |
| 7186 |
urlParams_ gensupport.URLParams |
| 7187 |
ifNoneMatch_ string |
| 7188 |
ctx_ context.Context |
| 7189 |
header_ http.Header |
| 7190 |
} |
| 7191 |
|
| 7192 |
// List: List finalized proposals, regardless if a proposal is being |
| 7193 |
// renegotiated. A filter expression (PQL query) may be specified to filter the |
| 7194 |
// results. The notes will not be returned. |
| 7195 |
// |
| 7196 |
// - accountId: Account ID of the buyer. |
| 7197 |
func (r *AccountsFinalizedProposalsService) List(accountId string) *AccountsFinalizedProposalsListCall { |
| 7198 |
c := &AccountsFinalizedProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7199 |
c.accountId = accountId |
| 7200 |
return c |
| 7201 |
} |
| 7202 |
|
| 7203 |
// Filter sets the optional parameter "filter": An optional PQL filter query |
| 7204 |
// used to query for proposals. Nested repeated fields, such as |
| 7205 |
// proposal.deals.targetingCriterion, cannot be filtered. |
| 7206 |
func (c *AccountsFinalizedProposalsListCall) Filter(filter string) *AccountsFinalizedProposalsListCall { |
| 7207 |
c.urlParams_.Set("filter", filter) |
| 7208 |
return c |
| 7209 |
} |
| 7210 |
|
| 7211 |
// FilterSyntax sets the optional parameter "filterSyntax": Syntax the filter |
| 7212 |
// is written in. Current implementation defaults to PQL but in the future it |
| 7213 |
// will be LIST_FILTER. |
| 7214 |
// |
| 7215 |
// Possible values: |
| 7216 |
// |
| 7217 |
// "FILTER_SYNTAX_UNSPECIFIED" - A placeholder for an undefined filter |
| 7218 |
// |
| 7219 |
// syntax. |
| 7220 |
// |
| 7221 |
// "PQL" - PQL query syntax. Visit |
| 7222 |
// |
| 7223 |
// https://developers.google.com/ad-manager/api/pqlreference for PQL |
| 7224 |
// documentation and examples. |
| 7225 |
// |
| 7226 |
// "LIST_FILTER" - API list filtering syntax. Read about syntax and usage at |
| 7227 |
// |
| 7228 |
// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters. |
| 7229 |
func (c *AccountsFinalizedProposalsListCall) FilterSyntax(filterSyntax string) *AccountsFinalizedProposalsListCall { |
| 7230 |
c.urlParams_.Set("filterSyntax", filterSyntax) |
| 7231 |
return c |
| 7232 |
} |
| 7233 |
|
| 7234 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 7235 |
// server may return fewer results than requested. If unspecified, the server |
| 7236 |
// will pick an appropriate default. |
| 7237 |
func (c *AccountsFinalizedProposalsListCall) PageSize(pageSize int64) *AccountsFinalizedProposalsListCall { |
| 7238 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 7239 |
return c |
| 7240 |
} |
| 7241 |
|
| 7242 |
// PageToken sets the optional parameter "pageToken": The page token as |
| 7243 |
// returned from ListProposalsResponse. |
| 7244 |
func (c *AccountsFinalizedProposalsListCall) PageToken(pageToken string) *AccountsFinalizedProposalsListCall { |
| 7245 |
c.urlParams_.Set("pageToken", pageToken) |
| 7246 |
return c |
| 7247 |
} |
| 7248 |
|
| 7249 |
// Fields allows partial responses to be retrieved. See |
| 7250 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7251 |
// details. |
| 7252 |
func (c *AccountsFinalizedProposalsListCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsListCall { |
| 7253 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7254 |
return c |
| 7255 |
} |
| 7256 |
|
| 7257 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 7258 |
// object's ETag matches the given value. This is useful for getting updates |
| 7259 |
// only after the object has changed since the last request. |
| 7260 |
func (c *AccountsFinalizedProposalsListCall) IfNoneMatch(entityTag string) *AccountsFinalizedProposalsListCall { |
| 7261 |
c.ifNoneMatch_ = entityTag |
| 7262 |
return c |
| 7263 |
} |
| 7264 |
|
| 7265 |
// Context sets the context to be used in this call's Do method. |
| 7266 |
func (c *AccountsFinalizedProposalsListCall) Context(ctx context.Context) *AccountsFinalizedProposalsListCall { |
| 7267 |
c.ctx_ = ctx |
| 7268 |
return c |
| 7269 |
} |
| 7270 |
|
| 7271 |
// Header returns a http.Header that can be modified by the caller to add |
| 7272 |
// headers to the request. |
| 7273 |
func (c *AccountsFinalizedProposalsListCall) Header() http.Header { |
| 7274 |
if c.header_ == nil { |
| 7275 |
c.header_ = make(http.Header) |
| 7276 |
} |
| 7277 |
return c.header_ |
| 7278 |
} |
| 7279 |
|
| 7280 |
func (c *AccountsFinalizedProposalsListCall) doRequest(alt string) (*http.Response, error) { |
| 7281 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7282 |
if c.ifNoneMatch_ != "" { |
| 7283 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7284 |
} |
| 7285 |
c.urlParams_.Set("alt", alt) |
| 7286 |
c.urlParams_.Set("prettyPrint", "false") |
| 7287 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals") |
| 7288 |
urls += "?" + c.urlParams_.Encode() |
| 7289 |
req, err := http.NewRequest("GET", urls, nil) |
| 7290 |
if err != nil { |
| 7291 |
return nil, err |
| 7292 |
} |
| 7293 |
req.Header = reqHeaders |
| 7294 |
googleapi.Expand(req.URL, map[string]string{ |
| 7295 |
"accountId": c.accountId, |
| 7296 |
}) |
| 7297 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.finalizedProposals.list", "request", internallog.HTTPRequest(req, nil)) |
| 7298 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7299 |
} |
| 7300 |
|
| 7301 |
// Do executes the "adexchangebuyer2.accounts.finalizedProposals.list" call. |
| 7302 |
// Any non-2xx status code is an error. Response headers are in either |
| 7303 |
// *ListProposalsResponse.ServerResponse.Header or (if a response was returned |
| 7304 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 7305 |
// check whether the returned error was because http.StatusNotModified was |
| 7306 |
// returned. |
| 7307 |
func (c *AccountsFinalizedProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) { |
| 7308 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7309 |
res, err := c.doRequest("json") |
| 7310 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7311 |
if res.Body != nil { |
| 7312 |
res.Body.Close() |
| 7313 |
} |
| 7314 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7315 |
Code: res.StatusCode, |
| 7316 |
Header: res.Header, |
| 7317 |
}) |
| 7318 |
} |
| 7319 |
if err != nil { |
| 7320 |
return nil, err |
| 7321 |
} |
| 7322 |
defer googleapi.CloseBody(res) |
| 7323 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7324 |
return nil, gensupport.WrapError(err) |
| 7325 |
} |
| 7326 |
ret := &ListProposalsResponse{ |
| 7327 |
ServerResponse: googleapi.ServerResponse{ |
| 7328 |
Header: res.Header, |
| 7329 |
HTTPStatusCode: res.StatusCode, |
| 7330 |
}, |
| 7331 |
} |
| 7332 |
target := &ret |
| 7333 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7334 |
if err != nil { |
| 7335 |
return nil, err |
| 7336 |
} |
| 7337 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.finalizedProposals.list", "response", internallog.HTTPResponse(res, b)) |
| 7338 |
return ret, nil |
| 7339 |
} |
| 7340 |
|
| 7341 |
// Pages invokes f for each page of results. |
| 7342 |
// A non-nil error returned from f will halt the iteration. |
| 7343 |
// The provided context supersedes any context provided to the Context method. |
| 7344 |
func (c *AccountsFinalizedProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error { |
| 7345 |
c.ctx_ = ctx |
| 7346 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 7347 |
for { |
| 7348 |
x, err := c.Do() |
| 7349 |
if err != nil { |
| 7350 |
return err |
| 7351 |
} |
| 7352 |
if err := f(x); err != nil { |
| 7353 |
return err |
| 7354 |
} |
| 7355 |
if x.NextPageToken == "" { |
| 7356 |
return nil |
| 7357 |
} |
| 7358 |
c.PageToken(x.NextPageToken) |
| 7359 |
} |
| 7360 |
} |
| 7361 |
|
| 7362 |
type AccountsFinalizedProposalsPauseCall struct { |
| 7363 |
s *Service |
| 7364 |
accountId string |
| 7365 |
proposalId string |
| 7366 |
pauseproposaldealsrequest *PauseProposalDealsRequest |
| 7367 |
urlParams_ gensupport.URLParams |
| 7368 |
ctx_ context.Context |
| 7369 |
header_ http.Header |
| 7370 |
} |
| 7371 |
|
| 7372 |
// Pause: Update given deals to pause serving. This method will set the |
| 7373 |
// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all |
| 7374 |
// listed deals in the request. Currently, this method only applies to PG and |
| 7375 |
// PD deals. For PA deals, call accounts.proposals.pause endpoint. It is a |
| 7376 |
// no-op to pause already-paused deals. It is an error to call |
| 7377 |
// PauseProposalDeals for deals which are not part of the proposal of |
| 7378 |
// proposal_id or which are not finalized or renegotiating. |
| 7379 |
// |
| 7380 |
// - accountId: Account ID of the buyer. |
| 7381 |
// - proposalId: The proposal_id of the proposal containing the deals. |
| 7382 |
func (r *AccountsFinalizedProposalsService) Pause(accountId string, proposalId string, pauseproposaldealsrequest *PauseProposalDealsRequest) *AccountsFinalizedProposalsPauseCall { |
| 7383 |
c := &AccountsFinalizedProposalsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7384 |
c.accountId = accountId |
| 7385 |
c.proposalId = proposalId |
| 7386 |
c.pauseproposaldealsrequest = pauseproposaldealsrequest |
| 7387 |
return c |
| 7388 |
} |
| 7389 |
|
| 7390 |
// Fields allows partial responses to be retrieved. See |
| 7391 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7392 |
// details. |
| 7393 |
func (c *AccountsFinalizedProposalsPauseCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsPauseCall { |
| 7394 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7395 |
return c |
| 7396 |
} |
| 7397 |
|
| 7398 |
// Context sets the context to be used in this call's Do method. |
| 7399 |
func (c *AccountsFinalizedProposalsPauseCall) Context(ctx context.Context) *AccountsFinalizedProposalsPauseCall { |
| 7400 |
c.ctx_ = ctx |
| 7401 |
return c |
| 7402 |
} |
| 7403 |
|
| 7404 |
// Header returns a http.Header that can be modified by the caller to add |
| 7405 |
// headers to the request. |
| 7406 |
func (c *AccountsFinalizedProposalsPauseCall) Header() http.Header { |
| 7407 |
if c.header_ == nil { |
| 7408 |
c.header_ = make(http.Header) |
| 7409 |
} |
| 7410 |
return c.header_ |
| 7411 |
} |
| 7412 |
|
| 7413 |
func (c *AccountsFinalizedProposalsPauseCall) doRequest(alt string) (*http.Response, error) { |
| 7414 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7415 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pauseproposaldealsrequest) |
| 7416 |
if err != nil { |
| 7417 |
return nil, err |
| 7418 |
} |
| 7419 |
c.urlParams_.Set("alt", alt) |
| 7420 |
c.urlParams_.Set("prettyPrint", "false") |
| 7421 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:pause") |
| 7422 |
urls += "?" + c.urlParams_.Encode() |
| 7423 |
req, err := http.NewRequest("POST", urls, body) |
| 7424 |
if err != nil { |
| 7425 |
return nil, err |
| 7426 |
} |
| 7427 |
req.Header = reqHeaders |
| 7428 |
googleapi.Expand(req.URL, map[string]string{ |
| 7429 |
"accountId": c.accountId, |
| 7430 |
"proposalId": c.proposalId, |
| 7431 |
}) |
| 7432 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.finalizedProposals.pause", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7433 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7434 |
} |
| 7435 |
|
| 7436 |
// Do executes the "adexchangebuyer2.accounts.finalizedProposals.pause" call. |
| 7437 |
// Any non-2xx status code is an error. Response headers are in either |
| 7438 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 7439 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7440 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7441 |
func (c *AccountsFinalizedProposalsPauseCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 7442 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7443 |
res, err := c.doRequest("json") |
| 7444 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7445 |
if res.Body != nil { |
| 7446 |
res.Body.Close() |
| 7447 |
} |
| 7448 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7449 |
Code: res.StatusCode, |
| 7450 |
Header: res.Header, |
| 7451 |
}) |
| 7452 |
} |
| 7453 |
if err != nil { |
| 7454 |
return nil, err |
| 7455 |
} |
| 7456 |
defer googleapi.CloseBody(res) |
| 7457 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7458 |
return nil, gensupport.WrapError(err) |
| 7459 |
} |
| 7460 |
ret := &Proposal{ |
| 7461 |
ServerResponse: googleapi.ServerResponse{ |
| 7462 |
Header: res.Header, |
| 7463 |
HTTPStatusCode: res.StatusCode, |
| 7464 |
}, |
| 7465 |
} |
| 7466 |
target := &ret |
| 7467 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7468 |
if err != nil { |
| 7469 |
return nil, err |
| 7470 |
} |
| 7471 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.finalizedProposals.pause", "response", internallog.HTTPResponse(res, b)) |
| 7472 |
return ret, nil |
| 7473 |
} |
| 7474 |
|
| 7475 |
type AccountsFinalizedProposalsResumeCall struct { |
| 7476 |
s *Service |
| 7477 |
accountId string |
| 7478 |
proposalId string |
| 7479 |
resumeproposaldealsrequest *ResumeProposalDealsRequest |
| 7480 |
urlParams_ gensupport.URLParams |
| 7481 |
ctx_ context.Context |
| 7482 |
header_ http.Header |
| 7483 |
} |
| 7484 |
|
| 7485 |
// Resume: Update given deals to resume serving. This method will set the |
| 7486 |
// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all |
| 7487 |
// listed deals in the request. Currently, this method only applies to PG and |
| 7488 |
// PD deals. For PA deals, call accounts.proposals.resume endpoint. It is a |
| 7489 |
// no-op to resume running deals or deals paused by the other party. It is an |
| 7490 |
// error to call ResumeProposalDeals for deals which are not part of the |
| 7491 |
// proposal of proposal_id or which are not finalized or renegotiating. |
| 7492 |
// |
| 7493 |
// - accountId: Account ID of the buyer. |
| 7494 |
// - proposalId: The proposal_id of the proposal containing the deals. |
| 7495 |
func (r *AccountsFinalizedProposalsService) Resume(accountId string, proposalId string, resumeproposaldealsrequest *ResumeProposalDealsRequest) *AccountsFinalizedProposalsResumeCall { |
| 7496 |
c := &AccountsFinalizedProposalsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7497 |
c.accountId = accountId |
| 7498 |
c.proposalId = proposalId |
| 7499 |
c.resumeproposaldealsrequest = resumeproposaldealsrequest |
| 7500 |
return c |
| 7501 |
} |
| 7502 |
|
| 7503 |
// Fields allows partial responses to be retrieved. See |
| 7504 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7505 |
// details. |
| 7506 |
func (c *AccountsFinalizedProposalsResumeCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsResumeCall { |
| 7507 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7508 |
return c |
| 7509 |
} |
| 7510 |
|
| 7511 |
// Context sets the context to be used in this call's Do method. |
| 7512 |
func (c *AccountsFinalizedProposalsResumeCall) Context(ctx context.Context) *AccountsFinalizedProposalsResumeCall { |
| 7513 |
c.ctx_ = ctx |
| 7514 |
return c |
| 7515 |
} |
| 7516 |
|
| 7517 |
// Header returns a http.Header that can be modified by the caller to add |
| 7518 |
// headers to the request. |
| 7519 |
func (c *AccountsFinalizedProposalsResumeCall) Header() http.Header { |
| 7520 |
if c.header_ == nil { |
| 7521 |
c.header_ = make(http.Header) |
| 7522 |
} |
| 7523 |
return c.header_ |
| 7524 |
} |
| 7525 |
|
| 7526 |
func (c *AccountsFinalizedProposalsResumeCall) doRequest(alt string) (*http.Response, error) { |
| 7527 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7528 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resumeproposaldealsrequest) |
| 7529 |
if err != nil { |
| 7530 |
return nil, err |
| 7531 |
} |
| 7532 |
c.urlParams_.Set("alt", alt) |
| 7533 |
c.urlParams_.Set("prettyPrint", "false") |
| 7534 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:resume") |
| 7535 |
urls += "?" + c.urlParams_.Encode() |
| 7536 |
req, err := http.NewRequest("POST", urls, body) |
| 7537 |
if err != nil { |
| 7538 |
return nil, err |
| 7539 |
} |
| 7540 |
req.Header = reqHeaders |
| 7541 |
googleapi.Expand(req.URL, map[string]string{ |
| 7542 |
"accountId": c.accountId, |
| 7543 |
"proposalId": c.proposalId, |
| 7544 |
}) |
| 7545 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.finalizedProposals.resume", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7546 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7547 |
} |
| 7548 |
|
| 7549 |
// Do executes the "adexchangebuyer2.accounts.finalizedProposals.resume" call. |
| 7550 |
// Any non-2xx status code is an error. Response headers are in either |
| 7551 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 7552 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7553 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7554 |
func (c *AccountsFinalizedProposalsResumeCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 7555 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7556 |
res, err := c.doRequest("json") |
| 7557 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7558 |
if res.Body != nil { |
| 7559 |
res.Body.Close() |
| 7560 |
} |
| 7561 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7562 |
Code: res.StatusCode, |
| 7563 |
Header: res.Header, |
| 7564 |
}) |
| 7565 |
} |
| 7566 |
if err != nil { |
| 7567 |
return nil, err |
| 7568 |
} |
| 7569 |
defer googleapi.CloseBody(res) |
| 7570 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7571 |
return nil, gensupport.WrapError(err) |
| 7572 |
} |
| 7573 |
ret := &Proposal{ |
| 7574 |
ServerResponse: googleapi.ServerResponse{ |
| 7575 |
Header: res.Header, |
| 7576 |
HTTPStatusCode: res.StatusCode, |
| 7577 |
}, |
| 7578 |
} |
| 7579 |
target := &ret |
| 7580 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7581 |
if err != nil { |
| 7582 |
return nil, err |
| 7583 |
} |
| 7584 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.finalizedProposals.resume", "response", internallog.HTTPResponse(res, b)) |
| 7585 |
return ret, nil |
| 7586 |
} |
| 7587 |
|
| 7588 |
type AccountsProductsGetCall struct { |
| 7589 |
s *Service |
| 7590 |
accountId string |
| 7591 |
productId string |
| 7592 |
urlParams_ gensupport.URLParams |
| 7593 |
ifNoneMatch_ string |
| 7594 |
ctx_ context.Context |
| 7595 |
header_ http.Header |
| 7596 |
} |
| 7597 |
|
| 7598 |
// Get: Gets the requested product by ID. |
| 7599 |
// |
| 7600 |
// - accountId: Account ID of the buyer. |
| 7601 |
// - productId: The ID for the product to get the head revision for. |
| 7602 |
func (r *AccountsProductsService) Get(accountId string, productId string) *AccountsProductsGetCall { |
| 7603 |
c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7604 |
c.accountId = accountId |
| 7605 |
c.productId = productId |
| 7606 |
return c |
| 7607 |
} |
| 7608 |
|
| 7609 |
// Fields allows partial responses to be retrieved. See |
| 7610 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7611 |
// details. |
| 7612 |
func (c *AccountsProductsGetCall) Fields(s ...googleapi.Field) *AccountsProductsGetCall { |
| 7613 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7614 |
return c |
| 7615 |
} |
| 7616 |
|
| 7617 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 7618 |
// object's ETag matches the given value. This is useful for getting updates |
| 7619 |
// only after the object has changed since the last request. |
| 7620 |
func (c *AccountsProductsGetCall) IfNoneMatch(entityTag string) *AccountsProductsGetCall { |
| 7621 |
c.ifNoneMatch_ = entityTag |
| 7622 |
return c |
| 7623 |
} |
| 7624 |
|
| 7625 |
// Context sets the context to be used in this call's Do method. |
| 7626 |
func (c *AccountsProductsGetCall) Context(ctx context.Context) *AccountsProductsGetCall { |
| 7627 |
c.ctx_ = ctx |
| 7628 |
return c |
| 7629 |
} |
| 7630 |
|
| 7631 |
// Header returns a http.Header that can be modified by the caller to add |
| 7632 |
// headers to the request. |
| 7633 |
func (c *AccountsProductsGetCall) Header() http.Header { |
| 7634 |
if c.header_ == nil { |
| 7635 |
c.header_ = make(http.Header) |
| 7636 |
} |
| 7637 |
return c.header_ |
| 7638 |
} |
| 7639 |
|
| 7640 |
func (c *AccountsProductsGetCall) doRequest(alt string) (*http.Response, error) { |
| 7641 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7642 |
if c.ifNoneMatch_ != "" { |
| 7643 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7644 |
} |
| 7645 |
c.urlParams_.Set("alt", alt) |
| 7646 |
c.urlParams_.Set("prettyPrint", "false") |
| 7647 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products/{productId}") |
| 7648 |
urls += "?" + c.urlParams_.Encode() |
| 7649 |
req, err := http.NewRequest("GET", urls, nil) |
| 7650 |
if err != nil { |
| 7651 |
return nil, err |
| 7652 |
} |
| 7653 |
req.Header = reqHeaders |
| 7654 |
googleapi.Expand(req.URL, map[string]string{ |
| 7655 |
"accountId": c.accountId, |
| 7656 |
"productId": c.productId, |
| 7657 |
}) |
| 7658 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.products.get", "request", internallog.HTTPRequest(req, nil)) |
| 7659 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7660 |
} |
| 7661 |
|
| 7662 |
// Do executes the "adexchangebuyer2.accounts.products.get" call. |
| 7663 |
// Any non-2xx status code is an error. Response headers are in either |
| 7664 |
// *Product.ServerResponse.Header or (if a response was returned at all) in |
| 7665 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7666 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7667 |
func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) { |
| 7668 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7669 |
res, err := c.doRequest("json") |
| 7670 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7671 |
if res.Body != nil { |
| 7672 |
res.Body.Close() |
| 7673 |
} |
| 7674 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7675 |
Code: res.StatusCode, |
| 7676 |
Header: res.Header, |
| 7677 |
}) |
| 7678 |
} |
| 7679 |
if err != nil { |
| 7680 |
return nil, err |
| 7681 |
} |
| 7682 |
defer googleapi.CloseBody(res) |
| 7683 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7684 |
return nil, gensupport.WrapError(err) |
| 7685 |
} |
| 7686 |
ret := &Product{ |
| 7687 |
ServerResponse: googleapi.ServerResponse{ |
| 7688 |
Header: res.Header, |
| 7689 |
HTTPStatusCode: res.StatusCode, |
| 7690 |
}, |
| 7691 |
} |
| 7692 |
target := &ret |
| 7693 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7694 |
if err != nil { |
| 7695 |
return nil, err |
| 7696 |
} |
| 7697 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.products.get", "response", internallog.HTTPResponse(res, b)) |
| 7698 |
return ret, nil |
| 7699 |
} |
| 7700 |
|
| 7701 |
type AccountsProductsListCall struct { |
| 7702 |
s *Service |
| 7703 |
accountId string |
| 7704 |
urlParams_ gensupport.URLParams |
| 7705 |
ifNoneMatch_ string |
| 7706 |
ctx_ context.Context |
| 7707 |
header_ http.Header |
| 7708 |
} |
| 7709 |
|
| 7710 |
// List: List all products visible to the buyer (optionally filtered by the |
| 7711 |
// specified PQL query). |
| 7712 |
// |
| 7713 |
// - accountId: Account ID of the buyer. |
| 7714 |
func (r *AccountsProductsService) List(accountId string) *AccountsProductsListCall { |
| 7715 |
c := &AccountsProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7716 |
c.accountId = accountId |
| 7717 |
return c |
| 7718 |
} |
| 7719 |
|
| 7720 |
// Filter sets the optional parameter "filter": An optional PQL query used to |
| 7721 |
// query for products. See |
| 7722 |
// https://developers.google.com/ad-manager/docs/pqlreference for documentation |
| 7723 |
// about PQL and examples. Nested repeated fields, such as |
| 7724 |
// product.targetingCriterion.inclusions, cannot be filtered. |
| 7725 |
func (c *AccountsProductsListCall) Filter(filter string) *AccountsProductsListCall { |
| 7726 |
c.urlParams_.Set("filter", filter) |
| 7727 |
return c |
| 7728 |
} |
| 7729 |
|
| 7730 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 7731 |
// server may return fewer results than requested. If unspecified, the server |
| 7732 |
// will pick an appropriate default. |
| 7733 |
func (c *AccountsProductsListCall) PageSize(pageSize int64) *AccountsProductsListCall { |
| 7734 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 7735 |
return c |
| 7736 |
} |
| 7737 |
|
| 7738 |
// PageToken sets the optional parameter "pageToken": The page token as |
| 7739 |
// returned from ListProductsResponse. |
| 7740 |
func (c *AccountsProductsListCall) PageToken(pageToken string) *AccountsProductsListCall { |
| 7741 |
c.urlParams_.Set("pageToken", pageToken) |
| 7742 |
return c |
| 7743 |
} |
| 7744 |
|
| 7745 |
// Fields allows partial responses to be retrieved. See |
| 7746 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7747 |
// details. |
| 7748 |
func (c *AccountsProductsListCall) Fields(s ...googleapi.Field) *AccountsProductsListCall { |
| 7749 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7750 |
return c |
| 7751 |
} |
| 7752 |
|
| 7753 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 7754 |
// object's ETag matches the given value. This is useful for getting updates |
| 7755 |
// only after the object has changed since the last request. |
| 7756 |
func (c *AccountsProductsListCall) IfNoneMatch(entityTag string) *AccountsProductsListCall { |
| 7757 |
c.ifNoneMatch_ = entityTag |
| 7758 |
return c |
| 7759 |
} |
| 7760 |
|
| 7761 |
// Context sets the context to be used in this call's Do method. |
| 7762 |
func (c *AccountsProductsListCall) Context(ctx context.Context) *AccountsProductsListCall { |
| 7763 |
c.ctx_ = ctx |
| 7764 |
return c |
| 7765 |
} |
| 7766 |
|
| 7767 |
// Header returns a http.Header that can be modified by the caller to add |
| 7768 |
// headers to the request. |
| 7769 |
func (c *AccountsProductsListCall) Header() http.Header { |
| 7770 |
if c.header_ == nil { |
| 7771 |
c.header_ = make(http.Header) |
| 7772 |
} |
| 7773 |
return c.header_ |
| 7774 |
} |
| 7775 |
|
| 7776 |
func (c *AccountsProductsListCall) doRequest(alt string) (*http.Response, error) { |
| 7777 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 7778 |
if c.ifNoneMatch_ != "" { |
| 7779 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 7780 |
} |
| 7781 |
c.urlParams_.Set("alt", alt) |
| 7782 |
c.urlParams_.Set("prettyPrint", "false") |
| 7783 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products") |
| 7784 |
urls += "?" + c.urlParams_.Encode() |
| 7785 |
req, err := http.NewRequest("GET", urls, nil) |
| 7786 |
if err != nil { |
| 7787 |
return nil, err |
| 7788 |
} |
| 7789 |
req.Header = reqHeaders |
| 7790 |
googleapi.Expand(req.URL, map[string]string{ |
| 7791 |
"accountId": c.accountId, |
| 7792 |
}) |
| 7793 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.products.list", "request", internallog.HTTPRequest(req, nil)) |
| 7794 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7795 |
} |
| 7796 |
|
| 7797 |
// Do executes the "adexchangebuyer2.accounts.products.list" call. |
| 7798 |
// Any non-2xx status code is an error. Response headers are in either |
| 7799 |
// *ListProductsResponse.ServerResponse.Header or (if a response was returned |
| 7800 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 7801 |
// check whether the returned error was because http.StatusNotModified was |
| 7802 |
// returned. |
| 7803 |
func (c *AccountsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error) { |
| 7804 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7805 |
res, err := c.doRequest("json") |
| 7806 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7807 |
if res.Body != nil { |
| 7808 |
res.Body.Close() |
| 7809 |
} |
| 7810 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7811 |
Code: res.StatusCode, |
| 7812 |
Header: res.Header, |
| 7813 |
}) |
| 7814 |
} |
| 7815 |
if err != nil { |
| 7816 |
return nil, err |
| 7817 |
} |
| 7818 |
defer googleapi.CloseBody(res) |
| 7819 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7820 |
return nil, gensupport.WrapError(err) |
| 7821 |
} |
| 7822 |
ret := &ListProductsResponse{ |
| 7823 |
ServerResponse: googleapi.ServerResponse{ |
| 7824 |
Header: res.Header, |
| 7825 |
HTTPStatusCode: res.StatusCode, |
| 7826 |
}, |
| 7827 |
} |
| 7828 |
target := &ret |
| 7829 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7830 |
if err != nil { |
| 7831 |
return nil, err |
| 7832 |
} |
| 7833 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.products.list", "response", internallog.HTTPResponse(res, b)) |
| 7834 |
return ret, nil |
| 7835 |
} |
| 7836 |
|
| 7837 |
// Pages invokes f for each page of results. |
| 7838 |
// A non-nil error returned from f will halt the iteration. |
| 7839 |
// The provided context supersedes any context provided to the Context method. |
| 7840 |
func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error { |
| 7841 |
c.ctx_ = ctx |
| 7842 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 7843 |
for { |
| 7844 |
x, err := c.Do() |
| 7845 |
if err != nil { |
| 7846 |
return err |
| 7847 |
} |
| 7848 |
if err := f(x); err != nil { |
| 7849 |
return err |
| 7850 |
} |
| 7851 |
if x.NextPageToken == "" { |
| 7852 |
return nil |
| 7853 |
} |
| 7854 |
c.PageToken(x.NextPageToken) |
| 7855 |
} |
| 7856 |
} |
| 7857 |
|
| 7858 |
type AccountsProposalsAcceptCall struct { |
| 7859 |
s *Service |
| 7860 |
accountId string |
| 7861 |
proposalId string |
| 7862 |
acceptproposalrequest *AcceptProposalRequest |
| 7863 |
urlParams_ gensupport.URLParams |
| 7864 |
ctx_ context.Context |
| 7865 |
header_ http.Header |
| 7866 |
} |
| 7867 |
|
| 7868 |
// Accept: Mark the proposal as accepted at the given revision number. If the |
| 7869 |
// number does not match the server's revision number an `ABORTED` error |
| 7870 |
// message will be returned. This call updates the proposal_state from |
| 7871 |
// `PROPOSED` to `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`. |
| 7872 |
// Upon calling this endpoint, the buyer implicitly agrees to the terms and |
| 7873 |
// conditions optionally set within the proposal by the publisher. |
| 7874 |
// |
| 7875 |
// - accountId: Account ID of the buyer. |
| 7876 |
// - proposalId: The ID of the proposal to accept. |
| 7877 |
func (r *AccountsProposalsService) Accept(accountId string, proposalId string, acceptproposalrequest *AcceptProposalRequest) *AccountsProposalsAcceptCall { |
| 7878 |
c := &AccountsProposalsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7879 |
c.accountId = accountId |
| 7880 |
c.proposalId = proposalId |
| 7881 |
c.acceptproposalrequest = acceptproposalrequest |
| 7882 |
return c |
| 7883 |
} |
| 7884 |
|
| 7885 |
// Fields allows partial responses to be retrieved. See |
| 7886 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7887 |
// details. |
| 7888 |
func (c *AccountsProposalsAcceptCall) Fields(s ...googleapi.Field) *AccountsProposalsAcceptCall { |
| 7889 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7890 |
return c |
| 7891 |
} |
| 7892 |
|
| 7893 |
// Context sets the context to be used in this call's Do method. |
| 7894 |
func (c *AccountsProposalsAcceptCall) Context(ctx context.Context) *AccountsProposalsAcceptCall { |
| 7895 |
c.ctx_ = ctx |
| 7896 |
return c |
| 7897 |
} |
| 7898 |
|
| 7899 |
// Header returns a http.Header that can be modified by the caller to add |
| 7900 |
// headers to the request. |
| 7901 |
func (c *AccountsProposalsAcceptCall) Header() http.Header { |
| 7902 |
if c.header_ == nil { |
| 7903 |
c.header_ = make(http.Header) |
| 7904 |
} |
| 7905 |
return c.header_ |
| 7906 |
} |
| 7907 |
|
| 7908 |
func (c *AccountsProposalsAcceptCall) doRequest(alt string) (*http.Response, error) { |
| 7909 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 7910 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.acceptproposalrequest) |
| 7911 |
if err != nil { |
| 7912 |
return nil, err |
| 7913 |
} |
| 7914 |
c.urlParams_.Set("alt", alt) |
| 7915 |
c.urlParams_.Set("prettyPrint", "false") |
| 7916 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept") |
| 7917 |
urls += "?" + c.urlParams_.Encode() |
| 7918 |
req, err := http.NewRequest("POST", urls, body) |
| 7919 |
if err != nil { |
| 7920 |
return nil, err |
| 7921 |
} |
| 7922 |
req.Header = reqHeaders |
| 7923 |
googleapi.Expand(req.URL, map[string]string{ |
| 7924 |
"accountId": c.accountId, |
| 7925 |
"proposalId": c.proposalId, |
| 7926 |
}) |
| 7927 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.accept", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 7928 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 7929 |
} |
| 7930 |
|
| 7931 |
// Do executes the "adexchangebuyer2.accounts.proposals.accept" call. |
| 7932 |
// Any non-2xx status code is an error. Response headers are in either |
| 7933 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 7934 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 7935 |
// whether the returned error was because http.StatusNotModified was returned. |
| 7936 |
func (c *AccountsProposalsAcceptCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 7937 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 7938 |
res, err := c.doRequest("json") |
| 7939 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 7940 |
if res.Body != nil { |
| 7941 |
res.Body.Close() |
| 7942 |
} |
| 7943 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 7944 |
Code: res.StatusCode, |
| 7945 |
Header: res.Header, |
| 7946 |
}) |
| 7947 |
} |
| 7948 |
if err != nil { |
| 7949 |
return nil, err |
| 7950 |
} |
| 7951 |
defer googleapi.CloseBody(res) |
| 7952 |
if err := googleapi.CheckResponse(res); err != nil { |
| 7953 |
return nil, gensupport.WrapError(err) |
| 7954 |
} |
| 7955 |
ret := &Proposal{ |
| 7956 |
ServerResponse: googleapi.ServerResponse{ |
| 7957 |
Header: res.Header, |
| 7958 |
HTTPStatusCode: res.StatusCode, |
| 7959 |
}, |
| 7960 |
} |
| 7961 |
target := &ret |
| 7962 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 7963 |
if err != nil { |
| 7964 |
return nil, err |
| 7965 |
} |
| 7966 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.accept", "response", internallog.HTTPResponse(res, b)) |
| 7967 |
return ret, nil |
| 7968 |
} |
| 7969 |
|
| 7970 |
type AccountsProposalsAddNoteCall struct { |
| 7971 |
s *Service |
| 7972 |
accountId string |
| 7973 |
proposalId string |
| 7974 |
addnoterequest *AddNoteRequest |
| 7975 |
urlParams_ gensupport.URLParams |
| 7976 |
ctx_ context.Context |
| 7977 |
header_ http.Header |
| 7978 |
} |
| 7979 |
|
| 7980 |
// AddNote: Create a new note and attach it to the proposal. The note is |
| 7981 |
// assigned a unique ID by the server. The proposal revision number will not |
| 7982 |
// increase when associated with a new note. |
| 7983 |
// |
| 7984 |
// - accountId: Account ID of the buyer. |
| 7985 |
// - proposalId: The ID of the proposal to attach the note to. |
| 7986 |
func (r *AccountsProposalsService) AddNote(accountId string, proposalId string, addnoterequest *AddNoteRequest) *AccountsProposalsAddNoteCall { |
| 7987 |
c := &AccountsProposalsAddNoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 7988 |
c.accountId = accountId |
| 7989 |
c.proposalId = proposalId |
| 7990 |
c.addnoterequest = addnoterequest |
| 7991 |
return c |
| 7992 |
} |
| 7993 |
|
| 7994 |
// Fields allows partial responses to be retrieved. See |
| 7995 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 7996 |
// details. |
| 7997 |
func (c *AccountsProposalsAddNoteCall) Fields(s ...googleapi.Field) *AccountsProposalsAddNoteCall { |
| 7998 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 7999 |
return c |
| 8000 |
} |
| 8001 |
|
| 8002 |
// Context sets the context to be used in this call's Do method. |
| 8003 |
func (c *AccountsProposalsAddNoteCall) Context(ctx context.Context) *AccountsProposalsAddNoteCall { |
| 8004 |
c.ctx_ = ctx |
| 8005 |
return c |
| 8006 |
} |
| 8007 |
|
| 8008 |
// Header returns a http.Header that can be modified by the caller to add |
| 8009 |
// headers to the request. |
| 8010 |
func (c *AccountsProposalsAddNoteCall) Header() http.Header { |
| 8011 |
if c.header_ == nil { |
| 8012 |
c.header_ = make(http.Header) |
| 8013 |
} |
| 8014 |
return c.header_ |
| 8015 |
} |
| 8016 |
|
| 8017 |
func (c *AccountsProposalsAddNoteCall) doRequest(alt string) (*http.Response, error) { |
| 8018 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8019 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.addnoterequest) |
| 8020 |
if err != nil { |
| 8021 |
return nil, err |
| 8022 |
} |
| 8023 |
c.urlParams_.Set("alt", alt) |
| 8024 |
c.urlParams_.Set("prettyPrint", "false") |
| 8025 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote") |
| 8026 |
urls += "?" + c.urlParams_.Encode() |
| 8027 |
req, err := http.NewRequest("POST", urls, body) |
| 8028 |
if err != nil { |
| 8029 |
return nil, err |
| 8030 |
} |
| 8031 |
req.Header = reqHeaders |
| 8032 |
googleapi.Expand(req.URL, map[string]string{ |
| 8033 |
"accountId": c.accountId, |
| 8034 |
"proposalId": c.proposalId, |
| 8035 |
}) |
| 8036 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.addNote", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8037 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8038 |
} |
| 8039 |
|
| 8040 |
// Do executes the "adexchangebuyer2.accounts.proposals.addNote" call. |
| 8041 |
// Any non-2xx status code is an error. Response headers are in either |
| 8042 |
// *Note.ServerResponse.Header or (if a response was returned at all) in |
| 8043 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8044 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8045 |
func (c *AccountsProposalsAddNoteCall) Do(opts ...googleapi.CallOption) (*Note, error) { |
| 8046 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8047 |
res, err := c.doRequest("json") |
| 8048 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8049 |
if res.Body != nil { |
| 8050 |
res.Body.Close() |
| 8051 |
} |
| 8052 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8053 |
Code: res.StatusCode, |
| 8054 |
Header: res.Header, |
| 8055 |
}) |
| 8056 |
} |
| 8057 |
if err != nil { |
| 8058 |
return nil, err |
| 8059 |
} |
| 8060 |
defer googleapi.CloseBody(res) |
| 8061 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8062 |
return nil, gensupport.WrapError(err) |
| 8063 |
} |
| 8064 |
ret := &Note{ |
| 8065 |
ServerResponse: googleapi.ServerResponse{ |
| 8066 |
Header: res.Header, |
| 8067 |
HTTPStatusCode: res.StatusCode, |
| 8068 |
}, |
| 8069 |
} |
| 8070 |
target := &ret |
| 8071 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8072 |
if err != nil { |
| 8073 |
return nil, err |
| 8074 |
} |
| 8075 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.addNote", "response", internallog.HTTPResponse(res, b)) |
| 8076 |
return ret, nil |
| 8077 |
} |
| 8078 |
|
| 8079 |
type AccountsProposalsCancelNegotiationCall struct { |
| 8080 |
s *Service |
| 8081 |
accountId string |
| 8082 |
proposalId string |
| 8083 |
cancelnegotiationrequest *CancelNegotiationRequest |
| 8084 |
urlParams_ gensupport.URLParams |
| 8085 |
ctx_ context.Context |
| 8086 |
header_ http.Header |
| 8087 |
} |
| 8088 |
|
| 8089 |
// CancelNegotiation: Cancel an ongoing negotiation on a proposal. This does |
| 8090 |
// not cancel or end serving for the deals if the proposal has been finalized, |
| 8091 |
// but only cancels a negotiation unilaterally. |
| 8092 |
// |
| 8093 |
// - accountId: Account ID of the buyer. |
| 8094 |
// - proposalId: The ID of the proposal to cancel negotiation for. |
| 8095 |
func (r *AccountsProposalsService) CancelNegotiation(accountId string, proposalId string, cancelnegotiationrequest *CancelNegotiationRequest) *AccountsProposalsCancelNegotiationCall { |
| 8096 |
c := &AccountsProposalsCancelNegotiationCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8097 |
c.accountId = accountId |
| 8098 |
c.proposalId = proposalId |
| 8099 |
c.cancelnegotiationrequest = cancelnegotiationrequest |
| 8100 |
return c |
| 8101 |
} |
| 8102 |
|
| 8103 |
// Fields allows partial responses to be retrieved. See |
| 8104 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8105 |
// details. |
| 8106 |
func (c *AccountsProposalsCancelNegotiationCall) Fields(s ...googleapi.Field) *AccountsProposalsCancelNegotiationCall { |
| 8107 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8108 |
return c |
| 8109 |
} |
| 8110 |
|
| 8111 |
// Context sets the context to be used in this call's Do method. |
| 8112 |
func (c *AccountsProposalsCancelNegotiationCall) Context(ctx context.Context) *AccountsProposalsCancelNegotiationCall { |
| 8113 |
c.ctx_ = ctx |
| 8114 |
return c |
| 8115 |
} |
| 8116 |
|
| 8117 |
// Header returns a http.Header that can be modified by the caller to add |
| 8118 |
// headers to the request. |
| 8119 |
func (c *AccountsProposalsCancelNegotiationCall) Header() http.Header { |
| 8120 |
if c.header_ == nil { |
| 8121 |
c.header_ = make(http.Header) |
| 8122 |
} |
| 8123 |
return c.header_ |
| 8124 |
} |
| 8125 |
|
| 8126 |
func (c *AccountsProposalsCancelNegotiationCall) doRequest(alt string) (*http.Response, error) { |
| 8127 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8128 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cancelnegotiationrequest) |
| 8129 |
if err != nil { |
| 8130 |
return nil, err |
| 8131 |
} |
| 8132 |
c.urlParams_.Set("alt", alt) |
| 8133 |
c.urlParams_.Set("prettyPrint", "false") |
| 8134 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation") |
| 8135 |
urls += "?" + c.urlParams_.Encode() |
| 8136 |
req, err := http.NewRequest("POST", urls, body) |
| 8137 |
if err != nil { |
| 8138 |
return nil, err |
| 8139 |
} |
| 8140 |
req.Header = reqHeaders |
| 8141 |
googleapi.Expand(req.URL, map[string]string{ |
| 8142 |
"accountId": c.accountId, |
| 8143 |
"proposalId": c.proposalId, |
| 8144 |
}) |
| 8145 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.cancelNegotiation", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8146 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8147 |
} |
| 8148 |
|
| 8149 |
// Do executes the "adexchangebuyer2.accounts.proposals.cancelNegotiation" call. |
| 8150 |
// Any non-2xx status code is an error. Response headers are in either |
| 8151 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 8152 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8153 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8154 |
func (c *AccountsProposalsCancelNegotiationCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 8155 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8156 |
res, err := c.doRequest("json") |
| 8157 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8158 |
if res.Body != nil { |
| 8159 |
res.Body.Close() |
| 8160 |
} |
| 8161 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8162 |
Code: res.StatusCode, |
| 8163 |
Header: res.Header, |
| 8164 |
}) |
| 8165 |
} |
| 8166 |
if err != nil { |
| 8167 |
return nil, err |
| 8168 |
} |
| 8169 |
defer googleapi.CloseBody(res) |
| 8170 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8171 |
return nil, gensupport.WrapError(err) |
| 8172 |
} |
| 8173 |
ret := &Proposal{ |
| 8174 |
ServerResponse: googleapi.ServerResponse{ |
| 8175 |
Header: res.Header, |
| 8176 |
HTTPStatusCode: res.StatusCode, |
| 8177 |
}, |
| 8178 |
} |
| 8179 |
target := &ret |
| 8180 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8181 |
if err != nil { |
| 8182 |
return nil, err |
| 8183 |
} |
| 8184 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.cancelNegotiation", "response", internallog.HTTPResponse(res, b)) |
| 8185 |
return ret, nil |
| 8186 |
} |
| 8187 |
|
| 8188 |
type AccountsProposalsCompleteSetupCall struct { |
| 8189 |
s *Service |
| 8190 |
accountId string |
| 8191 |
proposalId string |
| 8192 |
completesetuprequest *CompleteSetupRequest |
| 8193 |
urlParams_ gensupport.URLParams |
| 8194 |
ctx_ context.Context |
| 8195 |
header_ http.Header |
| 8196 |
} |
| 8197 |
|
| 8198 |
// CompleteSetup: You can opt-in to manually update proposals to indicate that |
| 8199 |
// setup is complete. By default, proposal setup is automatically completed |
| 8200 |
// after their deals are finalized. Contact your Technical Account Manager to |
| 8201 |
// opt in. Buyers can call this method when the proposal has been finalized, |
| 8202 |
// and all the required creatives have been uploaded using the Creatives API. |
| 8203 |
// This call updates the `is_setup_completed` field on the deals in the |
| 8204 |
// proposal, and notifies the seller. The server then advances the revision |
| 8205 |
// number of the most recent proposal. To mark an individual deal as ready to |
| 8206 |
// serve, call `buyers.finalizedDeals.setReadyToServe` in the Marketplace API. |
| 8207 |
// |
| 8208 |
// - accountId: Account ID of the buyer. |
| 8209 |
// - proposalId: The ID of the proposal to mark as setup completed. |
| 8210 |
func (r *AccountsProposalsService) CompleteSetup(accountId string, proposalId string, completesetuprequest *CompleteSetupRequest) *AccountsProposalsCompleteSetupCall { |
| 8211 |
c := &AccountsProposalsCompleteSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8212 |
c.accountId = accountId |
| 8213 |
c.proposalId = proposalId |
| 8214 |
c.completesetuprequest = completesetuprequest |
| 8215 |
return c |
| 8216 |
} |
| 8217 |
|
| 8218 |
// Fields allows partial responses to be retrieved. See |
| 8219 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8220 |
// details. |
| 8221 |
func (c *AccountsProposalsCompleteSetupCall) Fields(s ...googleapi.Field) *AccountsProposalsCompleteSetupCall { |
| 8222 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8223 |
return c |
| 8224 |
} |
| 8225 |
|
| 8226 |
// Context sets the context to be used in this call's Do method. |
| 8227 |
func (c *AccountsProposalsCompleteSetupCall) Context(ctx context.Context) *AccountsProposalsCompleteSetupCall { |
| 8228 |
c.ctx_ = ctx |
| 8229 |
return c |
| 8230 |
} |
| 8231 |
|
| 8232 |
// Header returns a http.Header that can be modified by the caller to add |
| 8233 |
// headers to the request. |
| 8234 |
func (c *AccountsProposalsCompleteSetupCall) Header() http.Header { |
| 8235 |
if c.header_ == nil { |
| 8236 |
c.header_ = make(http.Header) |
| 8237 |
} |
| 8238 |
return c.header_ |
| 8239 |
} |
| 8240 |
|
| 8241 |
func (c *AccountsProposalsCompleteSetupCall) doRequest(alt string) (*http.Response, error) { |
| 8242 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8243 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.completesetuprequest) |
| 8244 |
if err != nil { |
| 8245 |
return nil, err |
| 8246 |
} |
| 8247 |
c.urlParams_.Set("alt", alt) |
| 8248 |
c.urlParams_.Set("prettyPrint", "false") |
| 8249 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup") |
| 8250 |
urls += "?" + c.urlParams_.Encode() |
| 8251 |
req, err := http.NewRequest("POST", urls, body) |
| 8252 |
if err != nil { |
| 8253 |
return nil, err |
| 8254 |
} |
| 8255 |
req.Header = reqHeaders |
| 8256 |
googleapi.Expand(req.URL, map[string]string{ |
| 8257 |
"accountId": c.accountId, |
| 8258 |
"proposalId": c.proposalId, |
| 8259 |
}) |
| 8260 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.completeSetup", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8261 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8262 |
} |
| 8263 |
|
| 8264 |
// Do executes the "adexchangebuyer2.accounts.proposals.completeSetup" call. |
| 8265 |
// Any non-2xx status code is an error. Response headers are in either |
| 8266 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 8267 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8268 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8269 |
func (c *AccountsProposalsCompleteSetupCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 8270 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8271 |
res, err := c.doRequest("json") |
| 8272 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8273 |
if res.Body != nil { |
| 8274 |
res.Body.Close() |
| 8275 |
} |
| 8276 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8277 |
Code: res.StatusCode, |
| 8278 |
Header: res.Header, |
| 8279 |
}) |
| 8280 |
} |
| 8281 |
if err != nil { |
| 8282 |
return nil, err |
| 8283 |
} |
| 8284 |
defer googleapi.CloseBody(res) |
| 8285 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8286 |
return nil, gensupport.WrapError(err) |
| 8287 |
} |
| 8288 |
ret := &Proposal{ |
| 8289 |
ServerResponse: googleapi.ServerResponse{ |
| 8290 |
Header: res.Header, |
| 8291 |
HTTPStatusCode: res.StatusCode, |
| 8292 |
}, |
| 8293 |
} |
| 8294 |
target := &ret |
| 8295 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8296 |
if err != nil { |
| 8297 |
return nil, err |
| 8298 |
} |
| 8299 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.completeSetup", "response", internallog.HTTPResponse(res, b)) |
| 8300 |
return ret, nil |
| 8301 |
} |
| 8302 |
|
| 8303 |
type AccountsProposalsCreateCall struct { |
| 8304 |
s *Service |
| 8305 |
accountId string |
| 8306 |
proposal *Proposal |
| 8307 |
urlParams_ gensupport.URLParams |
| 8308 |
ctx_ context.Context |
| 8309 |
header_ http.Header |
| 8310 |
} |
| 8311 |
|
| 8312 |
// Create: Create the given proposal. Each created proposal and any deals it |
| 8313 |
// contains are assigned a unique ID by the server. |
| 8314 |
// |
| 8315 |
// - accountId: Account ID of the buyer. |
| 8316 |
func (r *AccountsProposalsService) Create(accountId string, proposal *Proposal) *AccountsProposalsCreateCall { |
| 8317 |
c := &AccountsProposalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8318 |
c.accountId = accountId |
| 8319 |
c.proposal = proposal |
| 8320 |
return c |
| 8321 |
} |
| 8322 |
|
| 8323 |
// Fields allows partial responses to be retrieved. See |
| 8324 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8325 |
// details. |
| 8326 |
func (c *AccountsProposalsCreateCall) Fields(s ...googleapi.Field) *AccountsProposalsCreateCall { |
| 8327 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8328 |
return c |
| 8329 |
} |
| 8330 |
|
| 8331 |
// Context sets the context to be used in this call's Do method. |
| 8332 |
func (c *AccountsProposalsCreateCall) Context(ctx context.Context) *AccountsProposalsCreateCall { |
| 8333 |
c.ctx_ = ctx |
| 8334 |
return c |
| 8335 |
} |
| 8336 |
|
| 8337 |
// Header returns a http.Header that can be modified by the caller to add |
| 8338 |
// headers to the request. |
| 8339 |
func (c *AccountsProposalsCreateCall) Header() http.Header { |
| 8340 |
if c.header_ == nil { |
| 8341 |
c.header_ = make(http.Header) |
| 8342 |
} |
| 8343 |
return c.header_ |
| 8344 |
} |
| 8345 |
|
| 8346 |
func (c *AccountsProposalsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 8347 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8348 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.proposal) |
| 8349 |
if err != nil { |
| 8350 |
return nil, err |
| 8351 |
} |
| 8352 |
c.urlParams_.Set("alt", alt) |
| 8353 |
c.urlParams_.Set("prettyPrint", "false") |
| 8354 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals") |
| 8355 |
urls += "?" + c.urlParams_.Encode() |
| 8356 |
req, err := http.NewRequest("POST", urls, body) |
| 8357 |
if err != nil { |
| 8358 |
return nil, err |
| 8359 |
} |
| 8360 |
req.Header = reqHeaders |
| 8361 |
googleapi.Expand(req.URL, map[string]string{ |
| 8362 |
"accountId": c.accountId, |
| 8363 |
}) |
| 8364 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8365 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8366 |
} |
| 8367 |
|
| 8368 |
// Do executes the "adexchangebuyer2.accounts.proposals.create" call. |
| 8369 |
// Any non-2xx status code is an error. Response headers are in either |
| 8370 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 8371 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8372 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8373 |
func (c *AccountsProposalsCreateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 8374 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8375 |
res, err := c.doRequest("json") |
| 8376 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8377 |
if res.Body != nil { |
| 8378 |
res.Body.Close() |
| 8379 |
} |
| 8380 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8381 |
Code: res.StatusCode, |
| 8382 |
Header: res.Header, |
| 8383 |
}) |
| 8384 |
} |
| 8385 |
if err != nil { |
| 8386 |
return nil, err |
| 8387 |
} |
| 8388 |
defer googleapi.CloseBody(res) |
| 8389 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8390 |
return nil, gensupport.WrapError(err) |
| 8391 |
} |
| 8392 |
ret := &Proposal{ |
| 8393 |
ServerResponse: googleapi.ServerResponse{ |
| 8394 |
Header: res.Header, |
| 8395 |
HTTPStatusCode: res.StatusCode, |
| 8396 |
}, |
| 8397 |
} |
| 8398 |
target := &ret |
| 8399 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8400 |
if err != nil { |
| 8401 |
return nil, err |
| 8402 |
} |
| 8403 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.create", "response", internallog.HTTPResponse(res, b)) |
| 8404 |
return ret, nil |
| 8405 |
} |
| 8406 |
|
| 8407 |
type AccountsProposalsGetCall struct { |
| 8408 |
s *Service |
| 8409 |
accountId string |
| 8410 |
proposalId string |
| 8411 |
urlParams_ gensupport.URLParams |
| 8412 |
ifNoneMatch_ string |
| 8413 |
ctx_ context.Context |
| 8414 |
header_ http.Header |
| 8415 |
} |
| 8416 |
|
| 8417 |
// Get: Gets a proposal given its ID. The proposal is returned at its head |
| 8418 |
// revision. |
| 8419 |
// |
| 8420 |
// - accountId: Account ID of the buyer. |
| 8421 |
// - proposalId: The unique ID of the proposal. |
| 8422 |
func (r *AccountsProposalsService) Get(accountId string, proposalId string) *AccountsProposalsGetCall { |
| 8423 |
c := &AccountsProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8424 |
c.accountId = accountId |
| 8425 |
c.proposalId = proposalId |
| 8426 |
return c |
| 8427 |
} |
| 8428 |
|
| 8429 |
// Fields allows partial responses to be retrieved. See |
| 8430 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8431 |
// details. |
| 8432 |
func (c *AccountsProposalsGetCall) Fields(s ...googleapi.Field) *AccountsProposalsGetCall { |
| 8433 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8434 |
return c |
| 8435 |
} |
| 8436 |
|
| 8437 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 8438 |
// object's ETag matches the given value. This is useful for getting updates |
| 8439 |
// only after the object has changed since the last request. |
| 8440 |
func (c *AccountsProposalsGetCall) IfNoneMatch(entityTag string) *AccountsProposalsGetCall { |
| 8441 |
c.ifNoneMatch_ = entityTag |
| 8442 |
return c |
| 8443 |
} |
| 8444 |
|
| 8445 |
// Context sets the context to be used in this call's Do method. |
| 8446 |
func (c *AccountsProposalsGetCall) Context(ctx context.Context) *AccountsProposalsGetCall { |
| 8447 |
c.ctx_ = ctx |
| 8448 |
return c |
| 8449 |
} |
| 8450 |
|
| 8451 |
// Header returns a http.Header that can be modified by the caller to add |
| 8452 |
// headers to the request. |
| 8453 |
func (c *AccountsProposalsGetCall) Header() http.Header { |
| 8454 |
if c.header_ == nil { |
| 8455 |
c.header_ = make(http.Header) |
| 8456 |
} |
| 8457 |
return c.header_ |
| 8458 |
} |
| 8459 |
|
| 8460 |
func (c *AccountsProposalsGetCall) doRequest(alt string) (*http.Response, error) { |
| 8461 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 8462 |
if c.ifNoneMatch_ != "" { |
| 8463 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 8464 |
} |
| 8465 |
c.urlParams_.Set("alt", alt) |
| 8466 |
c.urlParams_.Set("prettyPrint", "false") |
| 8467 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}") |
| 8468 |
urls += "?" + c.urlParams_.Encode() |
| 8469 |
req, err := http.NewRequest("GET", urls, nil) |
| 8470 |
if err != nil { |
| 8471 |
return nil, err |
| 8472 |
} |
| 8473 |
req.Header = reqHeaders |
| 8474 |
googleapi.Expand(req.URL, map[string]string{ |
| 8475 |
"accountId": c.accountId, |
| 8476 |
"proposalId": c.proposalId, |
| 8477 |
}) |
| 8478 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.get", "request", internallog.HTTPRequest(req, nil)) |
| 8479 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8480 |
} |
| 8481 |
|
| 8482 |
// Do executes the "adexchangebuyer2.accounts.proposals.get" call. |
| 8483 |
// Any non-2xx status code is an error. Response headers are in either |
| 8484 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 8485 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8486 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8487 |
func (c *AccountsProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 8488 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8489 |
res, err := c.doRequest("json") |
| 8490 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8491 |
if res.Body != nil { |
| 8492 |
res.Body.Close() |
| 8493 |
} |
| 8494 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8495 |
Code: res.StatusCode, |
| 8496 |
Header: res.Header, |
| 8497 |
}) |
| 8498 |
} |
| 8499 |
if err != nil { |
| 8500 |
return nil, err |
| 8501 |
} |
| 8502 |
defer googleapi.CloseBody(res) |
| 8503 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8504 |
return nil, gensupport.WrapError(err) |
| 8505 |
} |
| 8506 |
ret := &Proposal{ |
| 8507 |
ServerResponse: googleapi.ServerResponse{ |
| 8508 |
Header: res.Header, |
| 8509 |
HTTPStatusCode: res.StatusCode, |
| 8510 |
}, |
| 8511 |
} |
| 8512 |
target := &ret |
| 8513 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8514 |
if err != nil { |
| 8515 |
return nil, err |
| 8516 |
} |
| 8517 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.get", "response", internallog.HTTPResponse(res, b)) |
| 8518 |
return ret, nil |
| 8519 |
} |
| 8520 |
|
| 8521 |
type AccountsProposalsListCall struct { |
| 8522 |
s *Service |
| 8523 |
accountId string |
| 8524 |
urlParams_ gensupport.URLParams |
| 8525 |
ifNoneMatch_ string |
| 8526 |
ctx_ context.Context |
| 8527 |
header_ http.Header |
| 8528 |
} |
| 8529 |
|
| 8530 |
// List: List proposals. A filter expression (PQL query) may be specified to |
| 8531 |
// filter the results. To retrieve all finalized proposals, regardless if a |
| 8532 |
// proposal is being renegotiated, see the FinalizedProposals resource. Note |
| 8533 |
// that Bidder/ChildSeat relationships differ from the usual behavior. A Bidder |
| 8534 |
// account can only see its child seats' proposals by specifying the |
| 8535 |
// ChildSeat's accountId in the request path. |
| 8536 |
// |
| 8537 |
// - accountId: Account ID of the buyer. |
| 8538 |
func (r *AccountsProposalsService) List(accountId string) *AccountsProposalsListCall { |
| 8539 |
c := &AccountsProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8540 |
c.accountId = accountId |
| 8541 |
return c |
| 8542 |
} |
| 8543 |
|
| 8544 |
// Filter sets the optional parameter "filter": An optional PQL filter query |
| 8545 |
// used to query for proposals. Nested repeated fields, such as |
| 8546 |
// proposal.deals.targetingCriterion, cannot be filtered. |
| 8547 |
func (c *AccountsProposalsListCall) Filter(filter string) *AccountsProposalsListCall { |
| 8548 |
c.urlParams_.Set("filter", filter) |
| 8549 |
return c |
| 8550 |
} |
| 8551 |
|
| 8552 |
// FilterSyntax sets the optional parameter "filterSyntax": Syntax the filter |
| 8553 |
// is written in. Current implementation defaults to PQL but in the future it |
| 8554 |
// will be LIST_FILTER. |
| 8555 |
// |
| 8556 |
// Possible values: |
| 8557 |
// |
| 8558 |
// "FILTER_SYNTAX_UNSPECIFIED" - A placeholder for an undefined filter |
| 8559 |
// |
| 8560 |
// syntax. |
| 8561 |
// |
| 8562 |
// "PQL" - PQL query syntax. Visit |
| 8563 |
// |
| 8564 |
// https://developers.google.com/ad-manager/api/pqlreference for PQL |
| 8565 |
// documentation and examples. |
| 8566 |
// |
| 8567 |
// "LIST_FILTER" - API list filtering syntax. Read about syntax and usage at |
| 8568 |
// |
| 8569 |
// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters. |
| 8570 |
func (c *AccountsProposalsListCall) FilterSyntax(filterSyntax string) *AccountsProposalsListCall { |
| 8571 |
c.urlParams_.Set("filterSyntax", filterSyntax) |
| 8572 |
return c |
| 8573 |
} |
| 8574 |
|
| 8575 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 8576 |
// server may return fewer results than requested. If unspecified, the server |
| 8577 |
// will pick an appropriate default. |
| 8578 |
func (c *AccountsProposalsListCall) PageSize(pageSize int64) *AccountsProposalsListCall { |
| 8579 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 8580 |
return c |
| 8581 |
} |
| 8582 |
|
| 8583 |
// PageToken sets the optional parameter "pageToken": The page token as |
| 8584 |
// returned from ListProposalsResponse. |
| 8585 |
func (c *AccountsProposalsListCall) PageToken(pageToken string) *AccountsProposalsListCall { |
| 8586 |
c.urlParams_.Set("pageToken", pageToken) |
| 8587 |
return c |
| 8588 |
} |
| 8589 |
|
| 8590 |
// Fields allows partial responses to be retrieved. See |
| 8591 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8592 |
// details. |
| 8593 |
func (c *AccountsProposalsListCall) Fields(s ...googleapi.Field) *AccountsProposalsListCall { |
| 8594 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8595 |
return c |
| 8596 |
} |
| 8597 |
|
| 8598 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 8599 |
// object's ETag matches the given value. This is useful for getting updates |
| 8600 |
// only after the object has changed since the last request. |
| 8601 |
func (c *AccountsProposalsListCall) IfNoneMatch(entityTag string) *AccountsProposalsListCall { |
| 8602 |
c.ifNoneMatch_ = entityTag |
| 8603 |
return c |
| 8604 |
} |
| 8605 |
|
| 8606 |
// Context sets the context to be used in this call's Do method. |
| 8607 |
func (c *AccountsProposalsListCall) Context(ctx context.Context) *AccountsProposalsListCall { |
| 8608 |
c.ctx_ = ctx |
| 8609 |
return c |
| 8610 |
} |
| 8611 |
|
| 8612 |
// Header returns a http.Header that can be modified by the caller to add |
| 8613 |
// headers to the request. |
| 8614 |
func (c *AccountsProposalsListCall) Header() http.Header { |
| 8615 |
if c.header_ == nil { |
| 8616 |
c.header_ = make(http.Header) |
| 8617 |
} |
| 8618 |
return c.header_ |
| 8619 |
} |
| 8620 |
|
| 8621 |
func (c *AccountsProposalsListCall) doRequest(alt string) (*http.Response, error) { |
| 8622 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 8623 |
if c.ifNoneMatch_ != "" { |
| 8624 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 8625 |
} |
| 8626 |
c.urlParams_.Set("alt", alt) |
| 8627 |
c.urlParams_.Set("prettyPrint", "false") |
| 8628 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals") |
| 8629 |
urls += "?" + c.urlParams_.Encode() |
| 8630 |
req, err := http.NewRequest("GET", urls, nil) |
| 8631 |
if err != nil { |
| 8632 |
return nil, err |
| 8633 |
} |
| 8634 |
req.Header = reqHeaders |
| 8635 |
googleapi.Expand(req.URL, map[string]string{ |
| 8636 |
"accountId": c.accountId, |
| 8637 |
}) |
| 8638 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.list", "request", internallog.HTTPRequest(req, nil)) |
| 8639 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8640 |
} |
| 8641 |
|
| 8642 |
// Do executes the "adexchangebuyer2.accounts.proposals.list" call. |
| 8643 |
// Any non-2xx status code is an error. Response headers are in either |
| 8644 |
// *ListProposalsResponse.ServerResponse.Header or (if a response was returned |
| 8645 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 8646 |
// check whether the returned error was because http.StatusNotModified was |
| 8647 |
// returned. |
| 8648 |
func (c *AccountsProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) { |
| 8649 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8650 |
res, err := c.doRequest("json") |
| 8651 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8652 |
if res.Body != nil { |
| 8653 |
res.Body.Close() |
| 8654 |
} |
| 8655 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8656 |
Code: res.StatusCode, |
| 8657 |
Header: res.Header, |
| 8658 |
}) |
| 8659 |
} |
| 8660 |
if err != nil { |
| 8661 |
return nil, err |
| 8662 |
} |
| 8663 |
defer googleapi.CloseBody(res) |
| 8664 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8665 |
return nil, gensupport.WrapError(err) |
| 8666 |
} |
| 8667 |
ret := &ListProposalsResponse{ |
| 8668 |
ServerResponse: googleapi.ServerResponse{ |
| 8669 |
Header: res.Header, |
| 8670 |
HTTPStatusCode: res.StatusCode, |
| 8671 |
}, |
| 8672 |
} |
| 8673 |
target := &ret |
| 8674 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8675 |
if err != nil { |
| 8676 |
return nil, err |
| 8677 |
} |
| 8678 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.list", "response", internallog.HTTPResponse(res, b)) |
| 8679 |
return ret, nil |
| 8680 |
} |
| 8681 |
|
| 8682 |
// Pages invokes f for each page of results. |
| 8683 |
// A non-nil error returned from f will halt the iteration. |
| 8684 |
// The provided context supersedes any context provided to the Context method. |
| 8685 |
func (c *AccountsProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error { |
| 8686 |
c.ctx_ = ctx |
| 8687 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 8688 |
for { |
| 8689 |
x, err := c.Do() |
| 8690 |
if err != nil { |
| 8691 |
return err |
| 8692 |
} |
| 8693 |
if err := f(x); err != nil { |
| 8694 |
return err |
| 8695 |
} |
| 8696 |
if x.NextPageToken == "" { |
| 8697 |
return nil |
| 8698 |
} |
| 8699 |
c.PageToken(x.NextPageToken) |
| 8700 |
} |
| 8701 |
} |
| 8702 |
|
| 8703 |
type AccountsProposalsPauseCall struct { |
| 8704 |
s *Service |
| 8705 |
accountId string |
| 8706 |
proposalId string |
| 8707 |
pauseproposalrequest *PauseProposalRequest |
| 8708 |
urlParams_ gensupport.URLParams |
| 8709 |
ctx_ context.Context |
| 8710 |
header_ http.Header |
| 8711 |
} |
| 8712 |
|
| 8713 |
// Pause: Update the given proposal to pause serving. This method will set the |
| 8714 |
// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all |
| 8715 |
// deals in the proposal. It is a no-op to pause an already-paused proposal. It |
| 8716 |
// is an error to call PauseProposal for a proposal that is not finalized or |
| 8717 |
// renegotiating. |
| 8718 |
// |
| 8719 |
// - accountId: Account ID of the buyer. |
| 8720 |
// - proposalId: The ID of the proposal to pause. |
| 8721 |
func (r *AccountsProposalsService) Pause(accountId string, proposalId string, pauseproposalrequest *PauseProposalRequest) *AccountsProposalsPauseCall { |
| 8722 |
c := &AccountsProposalsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8723 |
c.accountId = accountId |
| 8724 |
c.proposalId = proposalId |
| 8725 |
c.pauseproposalrequest = pauseproposalrequest |
| 8726 |
return c |
| 8727 |
} |
| 8728 |
|
| 8729 |
// Fields allows partial responses to be retrieved. See |
| 8730 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8731 |
// details. |
| 8732 |
func (c *AccountsProposalsPauseCall) Fields(s ...googleapi.Field) *AccountsProposalsPauseCall { |
| 8733 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8734 |
return c |
| 8735 |
} |
| 8736 |
|
| 8737 |
// Context sets the context to be used in this call's Do method. |
| 8738 |
func (c *AccountsProposalsPauseCall) Context(ctx context.Context) *AccountsProposalsPauseCall { |
| 8739 |
c.ctx_ = ctx |
| 8740 |
return c |
| 8741 |
} |
| 8742 |
|
| 8743 |
// Header returns a http.Header that can be modified by the caller to add |
| 8744 |
// headers to the request. |
| 8745 |
func (c *AccountsProposalsPauseCall) Header() http.Header { |
| 8746 |
if c.header_ == nil { |
| 8747 |
c.header_ = make(http.Header) |
| 8748 |
} |
| 8749 |
return c.header_ |
| 8750 |
} |
| 8751 |
|
| 8752 |
func (c *AccountsProposalsPauseCall) doRequest(alt string) (*http.Response, error) { |
| 8753 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8754 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.pauseproposalrequest) |
| 8755 |
if err != nil { |
| 8756 |
return nil, err |
| 8757 |
} |
| 8758 |
c.urlParams_.Set("alt", alt) |
| 8759 |
c.urlParams_.Set("prettyPrint", "false") |
| 8760 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause") |
| 8761 |
urls += "?" + c.urlParams_.Encode() |
| 8762 |
req, err := http.NewRequest("POST", urls, body) |
| 8763 |
if err != nil { |
| 8764 |
return nil, err |
| 8765 |
} |
| 8766 |
req.Header = reqHeaders |
| 8767 |
googleapi.Expand(req.URL, map[string]string{ |
| 8768 |
"accountId": c.accountId, |
| 8769 |
"proposalId": c.proposalId, |
| 8770 |
}) |
| 8771 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.pause", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8772 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8773 |
} |
| 8774 |
|
| 8775 |
// Do executes the "adexchangebuyer2.accounts.proposals.pause" call. |
| 8776 |
// Any non-2xx status code is an error. Response headers are in either |
| 8777 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 8778 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8779 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8780 |
func (c *AccountsProposalsPauseCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 8781 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8782 |
res, err := c.doRequest("json") |
| 8783 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8784 |
if res.Body != nil { |
| 8785 |
res.Body.Close() |
| 8786 |
} |
| 8787 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8788 |
Code: res.StatusCode, |
| 8789 |
Header: res.Header, |
| 8790 |
}) |
| 8791 |
} |
| 8792 |
if err != nil { |
| 8793 |
return nil, err |
| 8794 |
} |
| 8795 |
defer googleapi.CloseBody(res) |
| 8796 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8797 |
return nil, gensupport.WrapError(err) |
| 8798 |
} |
| 8799 |
ret := &Proposal{ |
| 8800 |
ServerResponse: googleapi.ServerResponse{ |
| 8801 |
Header: res.Header, |
| 8802 |
HTTPStatusCode: res.StatusCode, |
| 8803 |
}, |
| 8804 |
} |
| 8805 |
target := &ret |
| 8806 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8807 |
if err != nil { |
| 8808 |
return nil, err |
| 8809 |
} |
| 8810 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.pause", "response", internallog.HTTPResponse(res, b)) |
| 8811 |
return ret, nil |
| 8812 |
} |
| 8813 |
|
| 8814 |
type AccountsProposalsResumeCall struct { |
| 8815 |
s *Service |
| 8816 |
accountId string |
| 8817 |
proposalId string |
| 8818 |
resumeproposalrequest *ResumeProposalRequest |
| 8819 |
urlParams_ gensupport.URLParams |
| 8820 |
ctx_ context.Context |
| 8821 |
header_ http.Header |
| 8822 |
} |
| 8823 |
|
| 8824 |
// Resume: Update the given proposal to resume serving. This method will set |
| 8825 |
// the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for |
| 8826 |
// all deals in the proposal. Note that if the `has_seller_paused` bit is also |
| 8827 |
// set, serving will not resume until the seller also resumes. It is a no-op to |
| 8828 |
// resume an already-running proposal. It is an error to call ResumeProposal |
| 8829 |
// for a proposal that is not finalized or renegotiating. |
| 8830 |
// |
| 8831 |
// - accountId: Account ID of the buyer. |
| 8832 |
// - proposalId: The ID of the proposal to resume. |
| 8833 |
func (r *AccountsProposalsService) Resume(accountId string, proposalId string, resumeproposalrequest *ResumeProposalRequest) *AccountsProposalsResumeCall { |
| 8834 |
c := &AccountsProposalsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8835 |
c.accountId = accountId |
| 8836 |
c.proposalId = proposalId |
| 8837 |
c.resumeproposalrequest = resumeproposalrequest |
| 8838 |
return c |
| 8839 |
} |
| 8840 |
|
| 8841 |
// Fields allows partial responses to be retrieved. See |
| 8842 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8843 |
// details. |
| 8844 |
func (c *AccountsProposalsResumeCall) Fields(s ...googleapi.Field) *AccountsProposalsResumeCall { |
| 8845 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8846 |
return c |
| 8847 |
} |
| 8848 |
|
| 8849 |
// Context sets the context to be used in this call's Do method. |
| 8850 |
func (c *AccountsProposalsResumeCall) Context(ctx context.Context) *AccountsProposalsResumeCall { |
| 8851 |
c.ctx_ = ctx |
| 8852 |
return c |
| 8853 |
} |
| 8854 |
|
| 8855 |
// Header returns a http.Header that can be modified by the caller to add |
| 8856 |
// headers to the request. |
| 8857 |
func (c *AccountsProposalsResumeCall) Header() http.Header { |
| 8858 |
if c.header_ == nil { |
| 8859 |
c.header_ = make(http.Header) |
| 8860 |
} |
| 8861 |
return c.header_ |
| 8862 |
} |
| 8863 |
|
| 8864 |
func (c *AccountsProposalsResumeCall) doRequest(alt string) (*http.Response, error) { |
| 8865 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8866 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resumeproposalrequest) |
| 8867 |
if err != nil { |
| 8868 |
return nil, err |
| 8869 |
} |
| 8870 |
c.urlParams_.Set("alt", alt) |
| 8871 |
c.urlParams_.Set("prettyPrint", "false") |
| 8872 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume") |
| 8873 |
urls += "?" + c.urlParams_.Encode() |
| 8874 |
req, err := http.NewRequest("POST", urls, body) |
| 8875 |
if err != nil { |
| 8876 |
return nil, err |
| 8877 |
} |
| 8878 |
req.Header = reqHeaders |
| 8879 |
googleapi.Expand(req.URL, map[string]string{ |
| 8880 |
"accountId": c.accountId, |
| 8881 |
"proposalId": c.proposalId, |
| 8882 |
}) |
| 8883 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.resume", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 8884 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 8885 |
} |
| 8886 |
|
| 8887 |
// Do executes the "adexchangebuyer2.accounts.proposals.resume" call. |
| 8888 |
// Any non-2xx status code is an error. Response headers are in either |
| 8889 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 8890 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 8891 |
// whether the returned error was because http.StatusNotModified was returned. |
| 8892 |
func (c *AccountsProposalsResumeCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 8893 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 8894 |
res, err := c.doRequest("json") |
| 8895 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 8896 |
if res.Body != nil { |
| 8897 |
res.Body.Close() |
| 8898 |
} |
| 8899 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 8900 |
Code: res.StatusCode, |
| 8901 |
Header: res.Header, |
| 8902 |
}) |
| 8903 |
} |
| 8904 |
if err != nil { |
| 8905 |
return nil, err |
| 8906 |
} |
| 8907 |
defer googleapi.CloseBody(res) |
| 8908 |
if err := googleapi.CheckResponse(res); err != nil { |
| 8909 |
return nil, gensupport.WrapError(err) |
| 8910 |
} |
| 8911 |
ret := &Proposal{ |
| 8912 |
ServerResponse: googleapi.ServerResponse{ |
| 8913 |
Header: res.Header, |
| 8914 |
HTTPStatusCode: res.StatusCode, |
| 8915 |
}, |
| 8916 |
} |
| 8917 |
target := &ret |
| 8918 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 8919 |
if err != nil { |
| 8920 |
return nil, err |
| 8921 |
} |
| 8922 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.resume", "response", internallog.HTTPResponse(res, b)) |
| 8923 |
return ret, nil |
| 8924 |
} |
| 8925 |
|
| 8926 |
type AccountsProposalsUpdateCall struct { |
| 8927 |
s *Service |
| 8928 |
accountId string |
| 8929 |
proposalId string |
| 8930 |
proposal *Proposal |
| 8931 |
urlParams_ gensupport.URLParams |
| 8932 |
ctx_ context.Context |
| 8933 |
header_ http.Header |
| 8934 |
} |
| 8935 |
|
| 8936 |
// Update: Update the given proposal at the client known revision number. If |
| 8937 |
// the server revision has advanced since the passed-in |
| 8938 |
// `proposal.proposal_revision`, an `ABORTED` error message will be returned. |
| 8939 |
// Only the buyer-modifiable fields of the proposal will be updated. Note that |
| 8940 |
// the deals in the proposal will be updated to match the passed-in copy. If a |
| 8941 |
// passed-in deal does not have a `deal_id`, the server will assign a new |
| 8942 |
// unique ID and create the deal. If passed-in deal has a `deal_id`, it will be |
| 8943 |
// updated to match the passed-in copy. Any existing deals not present in the |
| 8944 |
// passed-in proposal will be deleted. It is an error to pass in a deal with a |
| 8945 |
// `deal_id` not present at head. |
| 8946 |
// |
| 8947 |
// - accountId: Account ID of the buyer. |
| 8948 |
// - proposalId: The unique ID of the proposal. |
| 8949 |
func (r *AccountsProposalsService) Update(accountId string, proposalId string, proposal *Proposal) *AccountsProposalsUpdateCall { |
| 8950 |
c := &AccountsProposalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 8951 |
c.accountId = accountId |
| 8952 |
c.proposalId = proposalId |
| 8953 |
c.proposal = proposal |
| 8954 |
return c |
| 8955 |
} |
| 8956 |
|
| 8957 |
// Fields allows partial responses to be retrieved. See |
| 8958 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 8959 |
// details. |
| 8960 |
func (c *AccountsProposalsUpdateCall) Fields(s ...googleapi.Field) *AccountsProposalsUpdateCall { |
| 8961 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 8962 |
return c |
| 8963 |
} |
| 8964 |
|
| 8965 |
// Context sets the context to be used in this call's Do method. |
| 8966 |
func (c *AccountsProposalsUpdateCall) Context(ctx context.Context) *AccountsProposalsUpdateCall { |
| 8967 |
c.ctx_ = ctx |
| 8968 |
return c |
| 8969 |
} |
| 8970 |
|
| 8971 |
// Header returns a http.Header that can be modified by the caller to add |
| 8972 |
// headers to the request. |
| 8973 |
func (c *AccountsProposalsUpdateCall) Header() http.Header { |
| 8974 |
if c.header_ == nil { |
| 8975 |
c.header_ = make(http.Header) |
| 8976 |
} |
| 8977 |
return c.header_ |
| 8978 |
} |
| 8979 |
|
| 8980 |
func (c *AccountsProposalsUpdateCall) doRequest(alt string) (*http.Response, error) { |
| 8981 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 8982 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.proposal) |
| 8983 |
if err != nil { |
| 8984 |
return nil, err |
| 8985 |
} |
| 8986 |
c.urlParams_.Set("alt", alt) |
| 8987 |
c.urlParams_.Set("prettyPrint", "false") |
| 8988 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}") |
| 8989 |
urls += "?" + c.urlParams_.Encode() |
| 8990 |
req, err := http.NewRequest("PUT", urls, body) |
| 8991 |
if err != nil { |
| 8992 |
return nil, err |
| 8993 |
} |
| 8994 |
req.Header = reqHeaders |
| 8995 |
googleapi.Expand(req.URL, map[string]string{ |
| 8996 |
"accountId": c.accountId, |
| 8997 |
"proposalId": c.proposalId, |
| 8998 |
}) |
| 8999 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.update", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 9000 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9001 |
} |
| 9002 |
|
| 9003 |
// Do executes the "adexchangebuyer2.accounts.proposals.update" call. |
| 9004 |
// Any non-2xx status code is an error. Response headers are in either |
| 9005 |
// *Proposal.ServerResponse.Header or (if a response was returned at all) in |
| 9006 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 9007 |
// whether the returned error was because http.StatusNotModified was returned. |
| 9008 |
func (c *AccountsProposalsUpdateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) { |
| 9009 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9010 |
res, err := c.doRequest("json") |
| 9011 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9012 |
if res.Body != nil { |
| 9013 |
res.Body.Close() |
| 9014 |
} |
| 9015 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9016 |
Code: res.StatusCode, |
| 9017 |
Header: res.Header, |
| 9018 |
}) |
| 9019 |
} |
| 9020 |
if err != nil { |
| 9021 |
return nil, err |
| 9022 |
} |
| 9023 |
defer googleapi.CloseBody(res) |
| 9024 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9025 |
return nil, gensupport.WrapError(err) |
| 9026 |
} |
| 9027 |
ret := &Proposal{ |
| 9028 |
ServerResponse: googleapi.ServerResponse{ |
| 9029 |
Header: res.Header, |
| 9030 |
HTTPStatusCode: res.StatusCode, |
| 9031 |
}, |
| 9032 |
} |
| 9033 |
target := &ret |
| 9034 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9035 |
if err != nil { |
| 9036 |
return nil, err |
| 9037 |
} |
| 9038 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.proposals.update", "response", internallog.HTTPResponse(res, b)) |
| 9039 |
return ret, nil |
| 9040 |
} |
| 9041 |
|
| 9042 |
type AccountsPublisherProfilesGetCall struct { |
| 9043 |
s *Service |
| 9044 |
accountId string |
| 9045 |
publisherProfileId string |
| 9046 |
urlParams_ gensupport.URLParams |
| 9047 |
ifNoneMatch_ string |
| 9048 |
ctx_ context.Context |
| 9049 |
header_ http.Header |
| 9050 |
} |
| 9051 |
|
| 9052 |
// Get: Gets the requested publisher profile by id. |
| 9053 |
// |
| 9054 |
// - accountId: Account ID of the buyer. |
| 9055 |
// - publisherProfileId: The id for the publisher profile to get. |
| 9056 |
func (r *AccountsPublisherProfilesService) Get(accountId string, publisherProfileId string) *AccountsPublisherProfilesGetCall { |
| 9057 |
c := &AccountsPublisherProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9058 |
c.accountId = accountId |
| 9059 |
c.publisherProfileId = publisherProfileId |
| 9060 |
return c |
| 9061 |
} |
| 9062 |
|
| 9063 |
// Fields allows partial responses to be retrieved. See |
| 9064 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9065 |
// details. |
| 9066 |
func (c *AccountsPublisherProfilesGetCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesGetCall { |
| 9067 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9068 |
return c |
| 9069 |
} |
| 9070 |
|
| 9071 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 9072 |
// object's ETag matches the given value. This is useful for getting updates |
| 9073 |
// only after the object has changed since the last request. |
| 9074 |
func (c *AccountsPublisherProfilesGetCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesGetCall { |
| 9075 |
c.ifNoneMatch_ = entityTag |
| 9076 |
return c |
| 9077 |
} |
| 9078 |
|
| 9079 |
// Context sets the context to be used in this call's Do method. |
| 9080 |
func (c *AccountsPublisherProfilesGetCall) Context(ctx context.Context) *AccountsPublisherProfilesGetCall { |
| 9081 |
c.ctx_ = ctx |
| 9082 |
return c |
| 9083 |
} |
| 9084 |
|
| 9085 |
// Header returns a http.Header that can be modified by the caller to add |
| 9086 |
// headers to the request. |
| 9087 |
func (c *AccountsPublisherProfilesGetCall) Header() http.Header { |
| 9088 |
if c.header_ == nil { |
| 9089 |
c.header_ = make(http.Header) |
| 9090 |
} |
| 9091 |
return c.header_ |
| 9092 |
} |
| 9093 |
|
| 9094 |
func (c *AccountsPublisherProfilesGetCall) doRequest(alt string) (*http.Response, error) { |
| 9095 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 9096 |
if c.ifNoneMatch_ != "" { |
| 9097 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 9098 |
} |
| 9099 |
c.urlParams_.Set("alt", alt) |
| 9100 |
c.urlParams_.Set("prettyPrint", "false") |
| 9101 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}") |
| 9102 |
urls += "?" + c.urlParams_.Encode() |
| 9103 |
req, err := http.NewRequest("GET", urls, nil) |
| 9104 |
if err != nil { |
| 9105 |
return nil, err |
| 9106 |
} |
| 9107 |
req.Header = reqHeaders |
| 9108 |
googleapi.Expand(req.URL, map[string]string{ |
| 9109 |
"accountId": c.accountId, |
| 9110 |
"publisherProfileId": c.publisherProfileId, |
| 9111 |
}) |
| 9112 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.publisherProfiles.get", "request", internallog.HTTPRequest(req, nil)) |
| 9113 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9114 |
} |
| 9115 |
|
| 9116 |
// Do executes the "adexchangebuyer2.accounts.publisherProfiles.get" call. |
| 9117 |
// Any non-2xx status code is an error. Response headers are in either |
| 9118 |
// *PublisherProfile.ServerResponse.Header or (if a response was returned at |
| 9119 |
// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 9120 |
// check whether the returned error was because http.StatusNotModified was |
| 9121 |
// returned. |
| 9122 |
func (c *AccountsPublisherProfilesGetCall) Do(opts ...googleapi.CallOption) (*PublisherProfile, error) { |
| 9123 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9124 |
res, err := c.doRequest("json") |
| 9125 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9126 |
if res.Body != nil { |
| 9127 |
res.Body.Close() |
| 9128 |
} |
| 9129 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9130 |
Code: res.StatusCode, |
| 9131 |
Header: res.Header, |
| 9132 |
}) |
| 9133 |
} |
| 9134 |
if err != nil { |
| 9135 |
return nil, err |
| 9136 |
} |
| 9137 |
defer googleapi.CloseBody(res) |
| 9138 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9139 |
return nil, gensupport.WrapError(err) |
| 9140 |
} |
| 9141 |
ret := &PublisherProfile{ |
| 9142 |
ServerResponse: googleapi.ServerResponse{ |
| 9143 |
Header: res.Header, |
| 9144 |
HTTPStatusCode: res.StatusCode, |
| 9145 |
}, |
| 9146 |
} |
| 9147 |
target := &ret |
| 9148 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9149 |
if err != nil { |
| 9150 |
return nil, err |
| 9151 |
} |
| 9152 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.publisherProfiles.get", "response", internallog.HTTPResponse(res, b)) |
| 9153 |
return ret, nil |
| 9154 |
} |
| 9155 |
|
| 9156 |
type AccountsPublisherProfilesListCall struct { |
| 9157 |
s *Service |
| 9158 |
accountId string |
| 9159 |
urlParams_ gensupport.URLParams |
| 9160 |
ifNoneMatch_ string |
| 9161 |
ctx_ context.Context |
| 9162 |
header_ http.Header |
| 9163 |
} |
| 9164 |
|
| 9165 |
// List: List all publisher profiles visible to the buyer |
| 9166 |
// |
| 9167 |
// - accountId: Account ID of the buyer. |
| 9168 |
func (r *AccountsPublisherProfilesService) List(accountId string) *AccountsPublisherProfilesListCall { |
| 9169 |
c := &AccountsPublisherProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9170 |
c.accountId = accountId |
| 9171 |
return c |
| 9172 |
} |
| 9173 |
|
| 9174 |
// PageSize sets the optional parameter "pageSize": Specify the number of |
| 9175 |
// results to include per page. |
| 9176 |
func (c *AccountsPublisherProfilesListCall) PageSize(pageSize int64) *AccountsPublisherProfilesListCall { |
| 9177 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 9178 |
return c |
| 9179 |
} |
| 9180 |
|
| 9181 |
// PageToken sets the optional parameter "pageToken": The page token as return |
| 9182 |
// from ListPublisherProfilesResponse. |
| 9183 |
func (c *AccountsPublisherProfilesListCall) PageToken(pageToken string) *AccountsPublisherProfilesListCall { |
| 9184 |
c.urlParams_.Set("pageToken", pageToken) |
| 9185 |
return c |
| 9186 |
} |
| 9187 |
|
| 9188 |
// Fields allows partial responses to be retrieved. See |
| 9189 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9190 |
// details. |
| 9191 |
func (c *AccountsPublisherProfilesListCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesListCall { |
| 9192 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9193 |
return c |
| 9194 |
} |
| 9195 |
|
| 9196 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 9197 |
// object's ETag matches the given value. This is useful for getting updates |
| 9198 |
// only after the object has changed since the last request. |
| 9199 |
func (c *AccountsPublisherProfilesListCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesListCall { |
| 9200 |
c.ifNoneMatch_ = entityTag |
| 9201 |
return c |
| 9202 |
} |
| 9203 |
|
| 9204 |
// Context sets the context to be used in this call's Do method. |
| 9205 |
func (c *AccountsPublisherProfilesListCall) Context(ctx context.Context) *AccountsPublisherProfilesListCall { |
| 9206 |
c.ctx_ = ctx |
| 9207 |
return c |
| 9208 |
} |
| 9209 |
|
| 9210 |
// Header returns a http.Header that can be modified by the caller to add |
| 9211 |
// headers to the request. |
| 9212 |
func (c *AccountsPublisherProfilesListCall) Header() http.Header { |
| 9213 |
if c.header_ == nil { |
| 9214 |
c.header_ = make(http.Header) |
| 9215 |
} |
| 9216 |
return c.header_ |
| 9217 |
} |
| 9218 |
|
| 9219 |
func (c *AccountsPublisherProfilesListCall) doRequest(alt string) (*http.Response, error) { |
| 9220 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 9221 |
if c.ifNoneMatch_ != "" { |
| 9222 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 9223 |
} |
| 9224 |
c.urlParams_.Set("alt", alt) |
| 9225 |
c.urlParams_.Set("prettyPrint", "false") |
| 9226 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles") |
| 9227 |
urls += "?" + c.urlParams_.Encode() |
| 9228 |
req, err := http.NewRequest("GET", urls, nil) |
| 9229 |
if err != nil { |
| 9230 |
return nil, err |
| 9231 |
} |
| 9232 |
req.Header = reqHeaders |
| 9233 |
googleapi.Expand(req.URL, map[string]string{ |
| 9234 |
"accountId": c.accountId, |
| 9235 |
}) |
| 9236 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.publisherProfiles.list", "request", internallog.HTTPRequest(req, nil)) |
| 9237 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9238 |
} |
| 9239 |
|
| 9240 |
// Do executes the "adexchangebuyer2.accounts.publisherProfiles.list" call. |
| 9241 |
// Any non-2xx status code is an error. Response headers are in either |
| 9242 |
// *ListPublisherProfilesResponse.ServerResponse.Header or (if a response was |
| 9243 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 9244 |
// googleapi.IsNotModified to check whether the returned error was because |
| 9245 |
// http.StatusNotModified was returned. |
| 9246 |
func (c *AccountsPublisherProfilesListCall) Do(opts ...googleapi.CallOption) (*ListPublisherProfilesResponse, error) { |
| 9247 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9248 |
res, err := c.doRequest("json") |
| 9249 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9250 |
if res.Body != nil { |
| 9251 |
res.Body.Close() |
| 9252 |
} |
| 9253 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9254 |
Code: res.StatusCode, |
| 9255 |
Header: res.Header, |
| 9256 |
}) |
| 9257 |
} |
| 9258 |
if err != nil { |
| 9259 |
return nil, err |
| 9260 |
} |
| 9261 |
defer googleapi.CloseBody(res) |
| 9262 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9263 |
return nil, gensupport.WrapError(err) |
| 9264 |
} |
| 9265 |
ret := &ListPublisherProfilesResponse{ |
| 9266 |
ServerResponse: googleapi.ServerResponse{ |
| 9267 |
Header: res.Header, |
| 9268 |
HTTPStatusCode: res.StatusCode, |
| 9269 |
}, |
| 9270 |
} |
| 9271 |
target := &ret |
| 9272 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9273 |
if err != nil { |
| 9274 |
return nil, err |
| 9275 |
} |
| 9276 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.accounts.publisherProfiles.list", "response", internallog.HTTPResponse(res, b)) |
| 9277 |
return ret, nil |
| 9278 |
} |
| 9279 |
|
| 9280 |
// Pages invokes f for each page of results. |
| 9281 |
// A non-nil error returned from f will halt the iteration. |
| 9282 |
// The provided context supersedes any context provided to the Context method. |
| 9283 |
func (c *AccountsPublisherProfilesListCall) Pages(ctx context.Context, f func(*ListPublisherProfilesResponse) error) error { |
| 9284 |
c.ctx_ = ctx |
| 9285 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 9286 |
for { |
| 9287 |
x, err := c.Do() |
| 9288 |
if err != nil { |
| 9289 |
return err |
| 9290 |
} |
| 9291 |
if err := f(x); err != nil { |
| 9292 |
return err |
| 9293 |
} |
| 9294 |
if x.NextPageToken == "" { |
| 9295 |
return nil |
| 9296 |
} |
| 9297 |
c.PageToken(x.NextPageToken) |
| 9298 |
} |
| 9299 |
} |
| 9300 |
|
| 9301 |
type BiddersAccountsFilterSetsCreateCall struct { |
| 9302 |
s *Service |
| 9303 |
ownerName string |
| 9304 |
filterset *FilterSet |
| 9305 |
urlParams_ gensupport.URLParams |
| 9306 |
ctx_ context.Context |
| 9307 |
header_ http.Header |
| 9308 |
} |
| 9309 |
|
| 9310 |
// Create: Creates the specified filter set for the account with the given |
| 9311 |
// account ID. |
| 9312 |
// |
| 9313 |
// - ownerName: Name of the owner (bidder or account) of the filter set to be |
| 9314 |
// created. For example: - For a bidder-level filter set for bidder 123: |
| 9315 |
// `bidders/123` - For an account-level filter set for the buyer account |
| 9316 |
// representing bidder 123: `bidders/123/accounts/123` - For an account-level |
| 9317 |
// filter set for the child seat buyer account 456 whose bidder is 123: |
| 9318 |
// `bidders/123/accounts/456`. |
| 9319 |
func (r *BiddersAccountsFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersAccountsFilterSetsCreateCall { |
| 9320 |
c := &BiddersAccountsFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9321 |
c.ownerName = ownerName |
| 9322 |
c.filterset = filterset |
| 9323 |
return c |
| 9324 |
} |
| 9325 |
|
| 9326 |
// IsTransient sets the optional parameter "isTransient": Whether the filter |
| 9327 |
// set is transient, or should be persisted indefinitely. By default, filter |
| 9328 |
// sets are not transient. If transient, it will be available for at least 1 |
| 9329 |
// hour after creation. |
| 9330 |
func (c *BiddersAccountsFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersAccountsFilterSetsCreateCall { |
| 9331 |
c.urlParams_.Set("isTransient", fmt.Sprint(isTransient)) |
| 9332 |
return c |
| 9333 |
} |
| 9334 |
|
| 9335 |
// Fields allows partial responses to be retrieved. See |
| 9336 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9337 |
// details. |
| 9338 |
func (c *BiddersAccountsFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsCreateCall { |
| 9339 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9340 |
return c |
| 9341 |
} |
| 9342 |
|
| 9343 |
// Context sets the context to be used in this call's Do method. |
| 9344 |
func (c *BiddersAccountsFilterSetsCreateCall) Context(ctx context.Context) *BiddersAccountsFilterSetsCreateCall { |
| 9345 |
c.ctx_ = ctx |
| 9346 |
return c |
| 9347 |
} |
| 9348 |
|
| 9349 |
// Header returns a http.Header that can be modified by the caller to add |
| 9350 |
// headers to the request. |
| 9351 |
func (c *BiddersAccountsFilterSetsCreateCall) Header() http.Header { |
| 9352 |
if c.header_ == nil { |
| 9353 |
c.header_ = make(http.Header) |
| 9354 |
} |
| 9355 |
return c.header_ |
| 9356 |
} |
| 9357 |
|
| 9358 |
func (c *BiddersAccountsFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 9359 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 9360 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.filterset) |
| 9361 |
if err != nil { |
| 9362 |
return nil, err |
| 9363 |
} |
| 9364 |
c.urlParams_.Set("alt", alt) |
| 9365 |
c.urlParams_.Set("prettyPrint", "false") |
| 9366 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") |
| 9367 |
urls += "?" + c.urlParams_.Encode() |
| 9368 |
req, err := http.NewRequest("POST", urls, body) |
| 9369 |
if err != nil { |
| 9370 |
return nil, err |
| 9371 |
} |
| 9372 |
req.Header = reqHeaders |
| 9373 |
googleapi.Expand(req.URL, map[string]string{ |
| 9374 |
"ownerName": c.ownerName, |
| 9375 |
}) |
| 9376 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 9377 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9378 |
} |
| 9379 |
|
| 9380 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.create" call. |
| 9381 |
// Any non-2xx status code is an error. Response headers are in either |
| 9382 |
// *FilterSet.ServerResponse.Header or (if a response was returned at all) in |
| 9383 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 9384 |
// whether the returned error was because http.StatusNotModified was returned. |
| 9385 |
func (c *BiddersAccountsFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { |
| 9386 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9387 |
res, err := c.doRequest("json") |
| 9388 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9389 |
if res.Body != nil { |
| 9390 |
res.Body.Close() |
| 9391 |
} |
| 9392 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9393 |
Code: res.StatusCode, |
| 9394 |
Header: res.Header, |
| 9395 |
}) |
| 9396 |
} |
| 9397 |
if err != nil { |
| 9398 |
return nil, err |
| 9399 |
} |
| 9400 |
defer googleapi.CloseBody(res) |
| 9401 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9402 |
return nil, gensupport.WrapError(err) |
| 9403 |
} |
| 9404 |
ret := &FilterSet{ |
| 9405 |
ServerResponse: googleapi.ServerResponse{ |
| 9406 |
Header: res.Header, |
| 9407 |
HTTPStatusCode: res.StatusCode, |
| 9408 |
}, |
| 9409 |
} |
| 9410 |
target := &ret |
| 9411 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9412 |
if err != nil { |
| 9413 |
return nil, err |
| 9414 |
} |
| 9415 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.create", "response", internallog.HTTPResponse(res, b)) |
| 9416 |
return ret, nil |
| 9417 |
} |
| 9418 |
|
| 9419 |
type BiddersAccountsFilterSetsDeleteCall struct { |
| 9420 |
s *Service |
| 9421 |
name string |
| 9422 |
urlParams_ gensupport.URLParams |
| 9423 |
ctx_ context.Context |
| 9424 |
header_ http.Header |
| 9425 |
} |
| 9426 |
|
| 9427 |
// Delete: Deletes the requested filter set from the account with the given |
| 9428 |
// account ID. |
| 9429 |
// |
| 9430 |
// - name: Full name of the resource to delete. For example: - For a |
| 9431 |
// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For |
| 9432 |
// an account-level filter set for the buyer account representing bidder 123: |
| 9433 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 9434 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 9435 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 9436 |
func (r *BiddersAccountsFilterSetsService) Delete(name string) *BiddersAccountsFilterSetsDeleteCall { |
| 9437 |
c := &BiddersAccountsFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9438 |
c.name = name |
| 9439 |
return c |
| 9440 |
} |
| 9441 |
|
| 9442 |
// Fields allows partial responses to be retrieved. See |
| 9443 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9444 |
// details. |
| 9445 |
func (c *BiddersAccountsFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsDeleteCall { |
| 9446 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9447 |
return c |
| 9448 |
} |
| 9449 |
|
| 9450 |
// Context sets the context to be used in this call's Do method. |
| 9451 |
func (c *BiddersAccountsFilterSetsDeleteCall) Context(ctx context.Context) *BiddersAccountsFilterSetsDeleteCall { |
| 9452 |
c.ctx_ = ctx |
| 9453 |
return c |
| 9454 |
} |
| 9455 |
|
| 9456 |
// Header returns a http.Header that can be modified by the caller to add |
| 9457 |
// headers to the request. |
| 9458 |
func (c *BiddersAccountsFilterSetsDeleteCall) Header() http.Header { |
| 9459 |
if c.header_ == nil { |
| 9460 |
c.header_ = make(http.Header) |
| 9461 |
} |
| 9462 |
return c.header_ |
| 9463 |
} |
| 9464 |
|
| 9465 |
func (c *BiddersAccountsFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| 9466 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 9467 |
c.urlParams_.Set("alt", alt) |
| 9468 |
c.urlParams_.Set("prettyPrint", "false") |
| 9469 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") |
| 9470 |
urls += "?" + c.urlParams_.Encode() |
| 9471 |
req, err := http.NewRequest("DELETE", urls, nil) |
| 9472 |
if err != nil { |
| 9473 |
return nil, err |
| 9474 |
} |
| 9475 |
req.Header = reqHeaders |
| 9476 |
googleapi.Expand(req.URL, map[string]string{ |
| 9477 |
"name": c.name, |
| 9478 |
}) |
| 9479 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.delete", "request", internallog.HTTPRequest(req, nil)) |
| 9480 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9481 |
} |
| 9482 |
|
| 9483 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.delete" call. |
| 9484 |
// Any non-2xx status code is an error. Response headers are in either |
| 9485 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 9486 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 9487 |
// whether the returned error was because http.StatusNotModified was returned. |
| 9488 |
func (c *BiddersAccountsFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 9489 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9490 |
res, err := c.doRequest("json") |
| 9491 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9492 |
if res.Body != nil { |
| 9493 |
res.Body.Close() |
| 9494 |
} |
| 9495 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9496 |
Code: res.StatusCode, |
| 9497 |
Header: res.Header, |
| 9498 |
}) |
| 9499 |
} |
| 9500 |
if err != nil { |
| 9501 |
return nil, err |
| 9502 |
} |
| 9503 |
defer googleapi.CloseBody(res) |
| 9504 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9505 |
return nil, gensupport.WrapError(err) |
| 9506 |
} |
| 9507 |
ret := &Empty{ |
| 9508 |
ServerResponse: googleapi.ServerResponse{ |
| 9509 |
Header: res.Header, |
| 9510 |
HTTPStatusCode: res.StatusCode, |
| 9511 |
}, |
| 9512 |
} |
| 9513 |
target := &ret |
| 9514 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9515 |
if err != nil { |
| 9516 |
return nil, err |
| 9517 |
} |
| 9518 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.delete", "response", internallog.HTTPResponse(res, b)) |
| 9519 |
return ret, nil |
| 9520 |
} |
| 9521 |
|
| 9522 |
type BiddersAccountsFilterSetsGetCall struct { |
| 9523 |
s *Service |
| 9524 |
name string |
| 9525 |
urlParams_ gensupport.URLParams |
| 9526 |
ifNoneMatch_ string |
| 9527 |
ctx_ context.Context |
| 9528 |
header_ http.Header |
| 9529 |
} |
| 9530 |
|
| 9531 |
// Get: Retrieves the requested filter set for the account with the given |
| 9532 |
// account ID. |
| 9533 |
// |
| 9534 |
// - name: Full name of the resource being requested. For example: - For a |
| 9535 |
// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For |
| 9536 |
// an account-level filter set for the buyer account representing bidder 123: |
| 9537 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 9538 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 9539 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 9540 |
func (r *BiddersAccountsFilterSetsService) Get(name string) *BiddersAccountsFilterSetsGetCall { |
| 9541 |
c := &BiddersAccountsFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9542 |
c.name = name |
| 9543 |
return c |
| 9544 |
} |
| 9545 |
|
| 9546 |
// Fields allows partial responses to be retrieved. See |
| 9547 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9548 |
// details. |
| 9549 |
func (c *BiddersAccountsFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsGetCall { |
| 9550 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9551 |
return c |
| 9552 |
} |
| 9553 |
|
| 9554 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 9555 |
// object's ETag matches the given value. This is useful for getting updates |
| 9556 |
// only after the object has changed since the last request. |
| 9557 |
func (c *BiddersAccountsFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsGetCall { |
| 9558 |
c.ifNoneMatch_ = entityTag |
| 9559 |
return c |
| 9560 |
} |
| 9561 |
|
| 9562 |
// Context sets the context to be used in this call's Do method. |
| 9563 |
func (c *BiddersAccountsFilterSetsGetCall) Context(ctx context.Context) *BiddersAccountsFilterSetsGetCall { |
| 9564 |
c.ctx_ = ctx |
| 9565 |
return c |
| 9566 |
} |
| 9567 |
|
| 9568 |
// Header returns a http.Header that can be modified by the caller to add |
| 9569 |
// headers to the request. |
| 9570 |
func (c *BiddersAccountsFilterSetsGetCall) Header() http.Header { |
| 9571 |
if c.header_ == nil { |
| 9572 |
c.header_ = make(http.Header) |
| 9573 |
} |
| 9574 |
return c.header_ |
| 9575 |
} |
| 9576 |
|
| 9577 |
func (c *BiddersAccountsFilterSetsGetCall) doRequest(alt string) (*http.Response, error) { |
| 9578 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 9579 |
if c.ifNoneMatch_ != "" { |
| 9580 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 9581 |
} |
| 9582 |
c.urlParams_.Set("alt", alt) |
| 9583 |
c.urlParams_.Set("prettyPrint", "false") |
| 9584 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") |
| 9585 |
urls += "?" + c.urlParams_.Encode() |
| 9586 |
req, err := http.NewRequest("GET", urls, nil) |
| 9587 |
if err != nil { |
| 9588 |
return nil, err |
| 9589 |
} |
| 9590 |
req.Header = reqHeaders |
| 9591 |
googleapi.Expand(req.URL, map[string]string{ |
| 9592 |
"name": c.name, |
| 9593 |
}) |
| 9594 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.get", "request", internallog.HTTPRequest(req, nil)) |
| 9595 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9596 |
} |
| 9597 |
|
| 9598 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.get" call. |
| 9599 |
// Any non-2xx status code is an error. Response headers are in either |
| 9600 |
// *FilterSet.ServerResponse.Header or (if a response was returned at all) in |
| 9601 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 9602 |
// whether the returned error was because http.StatusNotModified was returned. |
| 9603 |
func (c *BiddersAccountsFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { |
| 9604 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9605 |
res, err := c.doRequest("json") |
| 9606 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9607 |
if res.Body != nil { |
| 9608 |
res.Body.Close() |
| 9609 |
} |
| 9610 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9611 |
Code: res.StatusCode, |
| 9612 |
Header: res.Header, |
| 9613 |
}) |
| 9614 |
} |
| 9615 |
if err != nil { |
| 9616 |
return nil, err |
| 9617 |
} |
| 9618 |
defer googleapi.CloseBody(res) |
| 9619 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9620 |
return nil, gensupport.WrapError(err) |
| 9621 |
} |
| 9622 |
ret := &FilterSet{ |
| 9623 |
ServerResponse: googleapi.ServerResponse{ |
| 9624 |
Header: res.Header, |
| 9625 |
HTTPStatusCode: res.StatusCode, |
| 9626 |
}, |
| 9627 |
} |
| 9628 |
target := &ret |
| 9629 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9630 |
if err != nil { |
| 9631 |
return nil, err |
| 9632 |
} |
| 9633 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.get", "response", internallog.HTTPResponse(res, b)) |
| 9634 |
return ret, nil |
| 9635 |
} |
| 9636 |
|
| 9637 |
type BiddersAccountsFilterSetsListCall struct { |
| 9638 |
s *Service |
| 9639 |
ownerName string |
| 9640 |
urlParams_ gensupport.URLParams |
| 9641 |
ifNoneMatch_ string |
| 9642 |
ctx_ context.Context |
| 9643 |
header_ http.Header |
| 9644 |
} |
| 9645 |
|
| 9646 |
// List: Lists all filter sets for the account with the given account ID. |
| 9647 |
// |
| 9648 |
// - ownerName: Name of the owner (bidder or account) of the filter sets to be |
| 9649 |
// listed. For example: - For a bidder-level filter set for bidder 123: |
| 9650 |
// `bidders/123` - For an account-level filter set for the buyer account |
| 9651 |
// representing bidder 123: `bidders/123/accounts/123` - For an account-level |
| 9652 |
// filter set for the child seat buyer account 456 whose bidder is 123: |
| 9653 |
// `bidders/123/accounts/456`. |
| 9654 |
func (r *BiddersAccountsFilterSetsService) List(ownerName string) *BiddersAccountsFilterSetsListCall { |
| 9655 |
c := &BiddersAccountsFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9656 |
c.ownerName = ownerName |
| 9657 |
return c |
| 9658 |
} |
| 9659 |
|
| 9660 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 9661 |
// server may return fewer results than requested. If unspecified, the server |
| 9662 |
// will pick an appropriate default. |
| 9663 |
func (c *BiddersAccountsFilterSetsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsListCall { |
| 9664 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 9665 |
return c |
| 9666 |
} |
| 9667 |
|
| 9668 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 9669 |
// page of results the server should return. Typically, this is the value of |
| 9670 |
// ListFilterSetsResponse.nextPageToken returned from the previous call to the |
| 9671 |
// accounts.filterSets.list method. |
| 9672 |
func (c *BiddersAccountsFilterSetsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsListCall { |
| 9673 |
c.urlParams_.Set("pageToken", pageToken) |
| 9674 |
return c |
| 9675 |
} |
| 9676 |
|
| 9677 |
// Fields allows partial responses to be retrieved. See |
| 9678 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9679 |
// details. |
| 9680 |
func (c *BiddersAccountsFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsListCall { |
| 9681 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9682 |
return c |
| 9683 |
} |
| 9684 |
|
| 9685 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 9686 |
// object's ETag matches the given value. This is useful for getting updates |
| 9687 |
// only after the object has changed since the last request. |
| 9688 |
func (c *BiddersAccountsFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsListCall { |
| 9689 |
c.ifNoneMatch_ = entityTag |
| 9690 |
return c |
| 9691 |
} |
| 9692 |
|
| 9693 |
// Context sets the context to be used in this call's Do method. |
| 9694 |
func (c *BiddersAccountsFilterSetsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsListCall { |
| 9695 |
c.ctx_ = ctx |
| 9696 |
return c |
| 9697 |
} |
| 9698 |
|
| 9699 |
// Header returns a http.Header that can be modified by the caller to add |
| 9700 |
// headers to the request. |
| 9701 |
func (c *BiddersAccountsFilterSetsListCall) Header() http.Header { |
| 9702 |
if c.header_ == nil { |
| 9703 |
c.header_ = make(http.Header) |
| 9704 |
} |
| 9705 |
return c.header_ |
| 9706 |
} |
| 9707 |
|
| 9708 |
func (c *BiddersAccountsFilterSetsListCall) doRequest(alt string) (*http.Response, error) { |
| 9709 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 9710 |
if c.ifNoneMatch_ != "" { |
| 9711 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 9712 |
} |
| 9713 |
c.urlParams_.Set("alt", alt) |
| 9714 |
c.urlParams_.Set("prettyPrint", "false") |
| 9715 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") |
| 9716 |
urls += "?" + c.urlParams_.Encode() |
| 9717 |
req, err := http.NewRequest("GET", urls, nil) |
| 9718 |
if err != nil { |
| 9719 |
return nil, err |
| 9720 |
} |
| 9721 |
req.Header = reqHeaders |
| 9722 |
googleapi.Expand(req.URL, map[string]string{ |
| 9723 |
"ownerName": c.ownerName, |
| 9724 |
}) |
| 9725 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.list", "request", internallog.HTTPRequest(req, nil)) |
| 9726 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9727 |
} |
| 9728 |
|
| 9729 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.list" call. |
| 9730 |
// Any non-2xx status code is an error. Response headers are in either |
| 9731 |
// *ListFilterSetsResponse.ServerResponse.Header or (if a response was returned |
| 9732 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 9733 |
// check whether the returned error was because http.StatusNotModified was |
| 9734 |
// returned. |
| 9735 |
func (c *BiddersAccountsFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) { |
| 9736 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9737 |
res, err := c.doRequest("json") |
| 9738 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9739 |
if res.Body != nil { |
| 9740 |
res.Body.Close() |
| 9741 |
} |
| 9742 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9743 |
Code: res.StatusCode, |
| 9744 |
Header: res.Header, |
| 9745 |
}) |
| 9746 |
} |
| 9747 |
if err != nil { |
| 9748 |
return nil, err |
| 9749 |
} |
| 9750 |
defer googleapi.CloseBody(res) |
| 9751 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9752 |
return nil, gensupport.WrapError(err) |
| 9753 |
} |
| 9754 |
ret := &ListFilterSetsResponse{ |
| 9755 |
ServerResponse: googleapi.ServerResponse{ |
| 9756 |
Header: res.Header, |
| 9757 |
HTTPStatusCode: res.StatusCode, |
| 9758 |
}, |
| 9759 |
} |
| 9760 |
target := &ret |
| 9761 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9762 |
if err != nil { |
| 9763 |
return nil, err |
| 9764 |
} |
| 9765 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.list", "response", internallog.HTTPResponse(res, b)) |
| 9766 |
return ret, nil |
| 9767 |
} |
| 9768 |
|
| 9769 |
// Pages invokes f for each page of results. |
| 9770 |
// A non-nil error returned from f will halt the iteration. |
| 9771 |
// The provided context supersedes any context provided to the Context method. |
| 9772 |
func (c *BiddersAccountsFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error { |
| 9773 |
c.ctx_ = ctx |
| 9774 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 9775 |
for { |
| 9776 |
x, err := c.Do() |
| 9777 |
if err != nil { |
| 9778 |
return err |
| 9779 |
} |
| 9780 |
if err := f(x); err != nil { |
| 9781 |
return err |
| 9782 |
} |
| 9783 |
if x.NextPageToken == "" { |
| 9784 |
return nil |
| 9785 |
} |
| 9786 |
c.PageToken(x.NextPageToken) |
| 9787 |
} |
| 9788 |
} |
| 9789 |
|
| 9790 |
type BiddersAccountsFilterSetsBidMetricsListCall struct { |
| 9791 |
s *Service |
| 9792 |
filterSetName string |
| 9793 |
urlParams_ gensupport.URLParams |
| 9794 |
ifNoneMatch_ string |
| 9795 |
ctx_ context.Context |
| 9796 |
header_ http.Header |
| 9797 |
} |
| 9798 |
|
| 9799 |
// List: Lists all metrics that are measured in terms of number of bids. |
| 9800 |
// |
| 9801 |
// - filterSetName: Name of the filter set that should be applied to the |
| 9802 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 9803 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 9804 |
// the buyer account representing bidder 123: |
| 9805 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 9806 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 9807 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 9808 |
func (r *BiddersAccountsFilterSetsBidMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsBidMetricsListCall { |
| 9809 |
c := &BiddersAccountsFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9810 |
c.filterSetName = filterSetName |
| 9811 |
return c |
| 9812 |
} |
| 9813 |
|
| 9814 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 9815 |
// server may return fewer results than requested. If unspecified, the server |
| 9816 |
// will pick an appropriate default. |
| 9817 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidMetricsListCall { |
| 9818 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 9819 |
return c |
| 9820 |
} |
| 9821 |
|
| 9822 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 9823 |
// page of results the server should return. Typically, this is the value of |
| 9824 |
// ListBidMetricsResponse.nextPageToken returned from the previous call to the |
| 9825 |
// bidMetrics.list method. |
| 9826 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidMetricsListCall { |
| 9827 |
c.urlParams_.Set("pageToken", pageToken) |
| 9828 |
return c |
| 9829 |
} |
| 9830 |
|
| 9831 |
// Fields allows partial responses to be retrieved. See |
| 9832 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9833 |
// details. |
| 9834 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidMetricsListCall { |
| 9835 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9836 |
return c |
| 9837 |
} |
| 9838 |
|
| 9839 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 9840 |
// object's ETag matches the given value. This is useful for getting updates |
| 9841 |
// only after the object has changed since the last request. |
| 9842 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidMetricsListCall { |
| 9843 |
c.ifNoneMatch_ = entityTag |
| 9844 |
return c |
| 9845 |
} |
| 9846 |
|
| 9847 |
// Context sets the context to be used in this call's Do method. |
| 9848 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidMetricsListCall { |
| 9849 |
c.ctx_ = ctx |
| 9850 |
return c |
| 9851 |
} |
| 9852 |
|
| 9853 |
// Header returns a http.Header that can be modified by the caller to add |
| 9854 |
// headers to the request. |
| 9855 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) Header() http.Header { |
| 9856 |
if c.header_ == nil { |
| 9857 |
c.header_ = make(http.Header) |
| 9858 |
} |
| 9859 |
return c.header_ |
| 9860 |
} |
| 9861 |
|
| 9862 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) { |
| 9863 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 9864 |
if c.ifNoneMatch_ != "" { |
| 9865 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 9866 |
} |
| 9867 |
c.urlParams_.Set("alt", alt) |
| 9868 |
c.urlParams_.Set("prettyPrint", "false") |
| 9869 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics") |
| 9870 |
urls += "?" + c.urlParams_.Encode() |
| 9871 |
req, err := http.NewRequest("GET", urls, nil) |
| 9872 |
if err != nil { |
| 9873 |
return nil, err |
| 9874 |
} |
| 9875 |
req.Header = reqHeaders |
| 9876 |
googleapi.Expand(req.URL, map[string]string{ |
| 9877 |
"filterSetName": c.filterSetName, |
| 9878 |
}) |
| 9879 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list", "request", internallog.HTTPRequest(req, nil)) |
| 9880 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 9881 |
} |
| 9882 |
|
| 9883 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list" call. |
| 9884 |
// Any non-2xx status code is an error. Response headers are in either |
| 9885 |
// *ListBidMetricsResponse.ServerResponse.Header or (if a response was returned |
| 9886 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 9887 |
// check whether the returned error was because http.StatusNotModified was |
| 9888 |
// returned. |
| 9889 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) { |
| 9890 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 9891 |
res, err := c.doRequest("json") |
| 9892 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 9893 |
if res.Body != nil { |
| 9894 |
res.Body.Close() |
| 9895 |
} |
| 9896 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 9897 |
Code: res.StatusCode, |
| 9898 |
Header: res.Header, |
| 9899 |
}) |
| 9900 |
} |
| 9901 |
if err != nil { |
| 9902 |
return nil, err |
| 9903 |
} |
| 9904 |
defer googleapi.CloseBody(res) |
| 9905 |
if err := googleapi.CheckResponse(res); err != nil { |
| 9906 |
return nil, gensupport.WrapError(err) |
| 9907 |
} |
| 9908 |
ret := &ListBidMetricsResponse{ |
| 9909 |
ServerResponse: googleapi.ServerResponse{ |
| 9910 |
Header: res.Header, |
| 9911 |
HTTPStatusCode: res.StatusCode, |
| 9912 |
}, |
| 9913 |
} |
| 9914 |
target := &ret |
| 9915 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 9916 |
if err != nil { |
| 9917 |
return nil, err |
| 9918 |
} |
| 9919 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list", "response", internallog.HTTPResponse(res, b)) |
| 9920 |
return ret, nil |
| 9921 |
} |
| 9922 |
|
| 9923 |
// Pages invokes f for each page of results. |
| 9924 |
// A non-nil error returned from f will halt the iteration. |
| 9925 |
// The provided context supersedes any context provided to the Context method. |
| 9926 |
func (c *BiddersAccountsFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error { |
| 9927 |
c.ctx_ = ctx |
| 9928 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 9929 |
for { |
| 9930 |
x, err := c.Do() |
| 9931 |
if err != nil { |
| 9932 |
return err |
| 9933 |
} |
| 9934 |
if err := f(x); err != nil { |
| 9935 |
return err |
| 9936 |
} |
| 9937 |
if x.NextPageToken == "" { |
| 9938 |
return nil |
| 9939 |
} |
| 9940 |
c.PageToken(x.NextPageToken) |
| 9941 |
} |
| 9942 |
} |
| 9943 |
|
| 9944 |
type BiddersAccountsFilterSetsBidResponseErrorsListCall struct { |
| 9945 |
s *Service |
| 9946 |
filterSetName string |
| 9947 |
urlParams_ gensupport.URLParams |
| 9948 |
ifNoneMatch_ string |
| 9949 |
ctx_ context.Context |
| 9950 |
header_ http.Header |
| 9951 |
} |
| 9952 |
|
| 9953 |
// List: List all errors that occurred in bid responses, with the number of bid |
| 9954 |
// responses affected for each reason. |
| 9955 |
// |
| 9956 |
// - filterSetName: Name of the filter set that should be applied to the |
| 9957 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 9958 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 9959 |
// the buyer account representing bidder 123: |
| 9960 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 9961 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 9962 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 9963 |
func (r *BiddersAccountsFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponseErrorsListCall { |
| 9964 |
c := &BiddersAccountsFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 9965 |
c.filterSetName = filterSetName |
| 9966 |
return c |
| 9967 |
} |
| 9968 |
|
| 9969 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 9970 |
// server may return fewer results than requested. If unspecified, the server |
| 9971 |
// will pick an appropriate default. |
| 9972 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponseErrorsListCall { |
| 9973 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 9974 |
return c |
| 9975 |
} |
| 9976 |
|
| 9977 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 9978 |
// page of results the server should return. Typically, this is the value of |
| 9979 |
// ListBidResponseErrorsResponse.nextPageToken returned from the previous call |
| 9980 |
// to the bidResponseErrors.list method. |
| 9981 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponseErrorsListCall { |
| 9982 |
c.urlParams_.Set("pageToken", pageToken) |
| 9983 |
return c |
| 9984 |
} |
| 9985 |
|
| 9986 |
// Fields allows partial responses to be retrieved. See |
| 9987 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 9988 |
// details. |
| 9989 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponseErrorsListCall { |
| 9990 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 9991 |
return c |
| 9992 |
} |
| 9993 |
|
| 9994 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 9995 |
// object's ETag matches the given value. This is useful for getting updates |
| 9996 |
// only after the object has changed since the last request. |
| 9997 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponseErrorsListCall { |
| 9998 |
c.ifNoneMatch_ = entityTag |
| 9999 |
return c |
| 10000 |
} |
| 10001 |
|
| 10002 |
// Context sets the context to be used in this call's Do method. |
| 10003 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponseErrorsListCall { |
| 10004 |
c.ctx_ = ctx |
| 10005 |
return c |
| 10006 |
} |
| 10007 |
|
| 10008 |
// Header returns a http.Header that can be modified by the caller to add |
| 10009 |
// headers to the request. |
| 10010 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Header() http.Header { |
| 10011 |
if c.header_ == nil { |
| 10012 |
c.header_ = make(http.Header) |
| 10013 |
} |
| 10014 |
return c.header_ |
| 10015 |
} |
| 10016 |
|
| 10017 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) { |
| 10018 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10019 |
if c.ifNoneMatch_ != "" { |
| 10020 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10021 |
} |
| 10022 |
c.urlParams_.Set("alt", alt) |
| 10023 |
c.urlParams_.Set("prettyPrint", "false") |
| 10024 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors") |
| 10025 |
urls += "?" + c.urlParams_.Encode() |
| 10026 |
req, err := http.NewRequest("GET", urls, nil) |
| 10027 |
if err != nil { |
| 10028 |
return nil, err |
| 10029 |
} |
| 10030 |
req.Header = reqHeaders |
| 10031 |
googleapi.Expand(req.URL, map[string]string{ |
| 10032 |
"filterSetName": c.filterSetName, |
| 10033 |
}) |
| 10034 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list", "request", internallog.HTTPRequest(req, nil)) |
| 10035 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10036 |
} |
| 10037 |
|
| 10038 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list" call. |
| 10039 |
// Any non-2xx status code is an error. Response headers are in either |
| 10040 |
// *ListBidResponseErrorsResponse.ServerResponse.Header or (if a response was |
| 10041 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 10042 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10043 |
// http.StatusNotModified was returned. |
| 10044 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) { |
| 10045 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10046 |
res, err := c.doRequest("json") |
| 10047 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10048 |
if res.Body != nil { |
| 10049 |
res.Body.Close() |
| 10050 |
} |
| 10051 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10052 |
Code: res.StatusCode, |
| 10053 |
Header: res.Header, |
| 10054 |
}) |
| 10055 |
} |
| 10056 |
if err != nil { |
| 10057 |
return nil, err |
| 10058 |
} |
| 10059 |
defer googleapi.CloseBody(res) |
| 10060 |
if err := googleapi.CheckResponse(res); err != nil { |
| 10061 |
return nil, gensupport.WrapError(err) |
| 10062 |
} |
| 10063 |
ret := &ListBidResponseErrorsResponse{ |
| 10064 |
ServerResponse: googleapi.ServerResponse{ |
| 10065 |
Header: res.Header, |
| 10066 |
HTTPStatusCode: res.StatusCode, |
| 10067 |
}, |
| 10068 |
} |
| 10069 |
target := &ret |
| 10070 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 10071 |
if err != nil { |
| 10072 |
return nil, err |
| 10073 |
} |
| 10074 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list", "response", internallog.HTTPResponse(res, b)) |
| 10075 |
return ret, nil |
| 10076 |
} |
| 10077 |
|
| 10078 |
// Pages invokes f for each page of results. |
| 10079 |
// A non-nil error returned from f will halt the iteration. |
| 10080 |
// The provided context supersedes any context provided to the Context method. |
| 10081 |
func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error { |
| 10082 |
c.ctx_ = ctx |
| 10083 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 10084 |
for { |
| 10085 |
x, err := c.Do() |
| 10086 |
if err != nil { |
| 10087 |
return err |
| 10088 |
} |
| 10089 |
if err := f(x); err != nil { |
| 10090 |
return err |
| 10091 |
} |
| 10092 |
if x.NextPageToken == "" { |
| 10093 |
return nil |
| 10094 |
} |
| 10095 |
c.PageToken(x.NextPageToken) |
| 10096 |
} |
| 10097 |
} |
| 10098 |
|
| 10099 |
type BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall struct { |
| 10100 |
s *Service |
| 10101 |
filterSetName string |
| 10102 |
urlParams_ gensupport.URLParams |
| 10103 |
ifNoneMatch_ string |
| 10104 |
ctx_ context.Context |
| 10105 |
header_ http.Header |
| 10106 |
} |
| 10107 |
|
| 10108 |
// List: List all reasons for which bid responses were considered to have no |
| 10109 |
// applicable bids, with the number of bid responses affected for each reason. |
| 10110 |
// |
| 10111 |
// - filterSetName: Name of the filter set that should be applied to the |
| 10112 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 10113 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 10114 |
// the buyer account representing bidder 123: |
| 10115 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 10116 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 10117 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 10118 |
func (r *BiddersAccountsFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { |
| 10119 |
c := &BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 10120 |
c.filterSetName = filterSetName |
| 10121 |
return c |
| 10122 |
} |
| 10123 |
|
| 10124 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 10125 |
// server may return fewer results than requested. If unspecified, the server |
| 10126 |
// will pick an appropriate default. |
| 10127 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { |
| 10128 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 10129 |
return c |
| 10130 |
} |
| 10131 |
|
| 10132 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 10133 |
// page of results the server should return. Typically, this is the value of |
| 10134 |
// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous |
| 10135 |
// call to the bidResponsesWithoutBids.list method. |
| 10136 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { |
| 10137 |
c.urlParams_.Set("pageToken", pageToken) |
| 10138 |
return c |
| 10139 |
} |
| 10140 |
|
| 10141 |
// Fields allows partial responses to be retrieved. See |
| 10142 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 10143 |
// details. |
| 10144 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { |
| 10145 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 10146 |
return c |
| 10147 |
} |
| 10148 |
|
| 10149 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 10150 |
// object's ETag matches the given value. This is useful for getting updates |
| 10151 |
// only after the object has changed since the last request. |
| 10152 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { |
| 10153 |
c.ifNoneMatch_ = entityTag |
| 10154 |
return c |
| 10155 |
} |
| 10156 |
|
| 10157 |
// Context sets the context to be used in this call's Do method. |
| 10158 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall { |
| 10159 |
c.ctx_ = ctx |
| 10160 |
return c |
| 10161 |
} |
| 10162 |
|
| 10163 |
// Header returns a http.Header that can be modified by the caller to add |
| 10164 |
// headers to the request. |
| 10165 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header { |
| 10166 |
if c.header_ == nil { |
| 10167 |
c.header_ = make(http.Header) |
| 10168 |
} |
| 10169 |
return c.header_ |
| 10170 |
} |
| 10171 |
|
| 10172 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 10173 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10174 |
if c.ifNoneMatch_ != "" { |
| 10175 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10176 |
} |
| 10177 |
c.urlParams_.Set("alt", alt) |
| 10178 |
c.urlParams_.Set("prettyPrint", "false") |
| 10179 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids") |
| 10180 |
urls += "?" + c.urlParams_.Encode() |
| 10181 |
req, err := http.NewRequest("GET", urls, nil) |
| 10182 |
if err != nil { |
| 10183 |
return nil, err |
| 10184 |
} |
| 10185 |
req.Header = reqHeaders |
| 10186 |
googleapi.Expand(req.URL, map[string]string{ |
| 10187 |
"filterSetName": c.filterSetName, |
| 10188 |
}) |
| 10189 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 10190 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10191 |
} |
| 10192 |
|
| 10193 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list" call. |
| 10194 |
// Any non-2xx status code is an error. Response headers are in either |
| 10195 |
// *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or (if a response |
| 10196 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 10197 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10198 |
// http.StatusNotModified was returned. |
| 10199 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) { |
| 10200 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10201 |
res, err := c.doRequest("json") |
| 10202 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10203 |
if res.Body != nil { |
| 10204 |
res.Body.Close() |
| 10205 |
} |
| 10206 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10207 |
Code: res.StatusCode, |
| 10208 |
Header: res.Header, |
| 10209 |
}) |
| 10210 |
} |
| 10211 |
if err != nil { |
| 10212 |
return nil, err |
| 10213 |
} |
| 10214 |
defer googleapi.CloseBody(res) |
| 10215 |
if err := googleapi.CheckResponse(res); err != nil { |
| 10216 |
return nil, gensupport.WrapError(err) |
| 10217 |
} |
| 10218 |
ret := &ListBidResponsesWithoutBidsResponse{ |
| 10219 |
ServerResponse: googleapi.ServerResponse{ |
| 10220 |
Header: res.Header, |
| 10221 |
HTTPStatusCode: res.StatusCode, |
| 10222 |
}, |
| 10223 |
} |
| 10224 |
target := &ret |
| 10225 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 10226 |
if err != nil { |
| 10227 |
return nil, err |
| 10228 |
} |
| 10229 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list", "response", internallog.HTTPResponse(res, b)) |
| 10230 |
return ret, nil |
| 10231 |
} |
| 10232 |
|
| 10233 |
// Pages invokes f for each page of results. |
| 10234 |
// A non-nil error returned from f will halt the iteration. |
| 10235 |
// The provided context supersedes any context provided to the Context method. |
| 10236 |
func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error { |
| 10237 |
c.ctx_ = ctx |
| 10238 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 10239 |
for { |
| 10240 |
x, err := c.Do() |
| 10241 |
if err != nil { |
| 10242 |
return err |
| 10243 |
} |
| 10244 |
if err := f(x); err != nil { |
| 10245 |
return err |
| 10246 |
} |
| 10247 |
if x.NextPageToken == "" { |
| 10248 |
return nil |
| 10249 |
} |
| 10250 |
c.PageToken(x.NextPageToken) |
| 10251 |
} |
| 10252 |
} |
| 10253 |
|
| 10254 |
type BiddersAccountsFilterSetsFilteredBidRequestsListCall struct { |
| 10255 |
s *Service |
| 10256 |
filterSetName string |
| 10257 |
urlParams_ gensupport.URLParams |
| 10258 |
ifNoneMatch_ string |
| 10259 |
ctx_ context.Context |
| 10260 |
header_ http.Header |
| 10261 |
} |
| 10262 |
|
| 10263 |
// List: List all reasons that caused a bid request not to be sent for an |
| 10264 |
// impression, with the number of bid requests not sent for each reason. |
| 10265 |
// |
| 10266 |
// - filterSetName: Name of the filter set that should be applied to the |
| 10267 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 10268 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 10269 |
// the buyer account representing bidder 123: |
| 10270 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 10271 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 10272 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 10273 |
func (r *BiddersAccountsFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { |
| 10274 |
c := &BiddersAccountsFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 10275 |
c.filterSetName = filterSetName |
| 10276 |
return c |
| 10277 |
} |
| 10278 |
|
| 10279 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 10280 |
// server may return fewer results than requested. If unspecified, the server |
| 10281 |
// will pick an appropriate default. |
| 10282 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { |
| 10283 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 10284 |
return c |
| 10285 |
} |
| 10286 |
|
| 10287 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 10288 |
// page of results the server should return. Typically, this is the value of |
| 10289 |
// ListFilteredBidRequestsResponse.nextPageToken returned from the previous |
| 10290 |
// call to the filteredBidRequests.list method. |
| 10291 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { |
| 10292 |
c.urlParams_.Set("pageToken", pageToken) |
| 10293 |
return c |
| 10294 |
} |
| 10295 |
|
| 10296 |
// Fields allows partial responses to be retrieved. See |
| 10297 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 10298 |
// details. |
| 10299 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { |
| 10300 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 10301 |
return c |
| 10302 |
} |
| 10303 |
|
| 10304 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 10305 |
// object's ETag matches the given value. This is useful for getting updates |
| 10306 |
// only after the object has changed since the last request. |
| 10307 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { |
| 10308 |
c.ifNoneMatch_ = entityTag |
| 10309 |
return c |
| 10310 |
} |
| 10311 |
|
| 10312 |
// Context sets the context to be used in this call's Do method. |
| 10313 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidRequestsListCall { |
| 10314 |
c.ctx_ = ctx |
| 10315 |
return c |
| 10316 |
} |
| 10317 |
|
| 10318 |
// Header returns a http.Header that can be modified by the caller to add |
| 10319 |
// headers to the request. |
| 10320 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Header() http.Header { |
| 10321 |
if c.header_ == nil { |
| 10322 |
c.header_ = make(http.Header) |
| 10323 |
} |
| 10324 |
return c.header_ |
| 10325 |
} |
| 10326 |
|
| 10327 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) { |
| 10328 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10329 |
if c.ifNoneMatch_ != "" { |
| 10330 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10331 |
} |
| 10332 |
c.urlParams_.Set("alt", alt) |
| 10333 |
c.urlParams_.Set("prettyPrint", "false") |
| 10334 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests") |
| 10335 |
urls += "?" + c.urlParams_.Encode() |
| 10336 |
req, err := http.NewRequest("GET", urls, nil) |
| 10337 |
if err != nil { |
| 10338 |
return nil, err |
| 10339 |
} |
| 10340 |
req.Header = reqHeaders |
| 10341 |
googleapi.Expand(req.URL, map[string]string{ |
| 10342 |
"filterSetName": c.filterSetName, |
| 10343 |
}) |
| 10344 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list", "request", internallog.HTTPRequest(req, nil)) |
| 10345 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10346 |
} |
| 10347 |
|
| 10348 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list" call. |
| 10349 |
// Any non-2xx status code is an error. Response headers are in either |
| 10350 |
// *ListFilteredBidRequestsResponse.ServerResponse.Header or (if a response was |
| 10351 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 10352 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10353 |
// http.StatusNotModified was returned. |
| 10354 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) { |
| 10355 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10356 |
res, err := c.doRequest("json") |
| 10357 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10358 |
if res.Body != nil { |
| 10359 |
res.Body.Close() |
| 10360 |
} |
| 10361 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10362 |
Code: res.StatusCode, |
| 10363 |
Header: res.Header, |
| 10364 |
}) |
| 10365 |
} |
| 10366 |
if err != nil { |
| 10367 |
return nil, err |
| 10368 |
} |
| 10369 |
defer googleapi.CloseBody(res) |
| 10370 |
if err := googleapi.CheckResponse(res); err != nil { |
| 10371 |
return nil, gensupport.WrapError(err) |
| 10372 |
} |
| 10373 |
ret := &ListFilteredBidRequestsResponse{ |
| 10374 |
ServerResponse: googleapi.ServerResponse{ |
| 10375 |
Header: res.Header, |
| 10376 |
HTTPStatusCode: res.StatusCode, |
| 10377 |
}, |
| 10378 |
} |
| 10379 |
target := &ret |
| 10380 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 10381 |
if err != nil { |
| 10382 |
return nil, err |
| 10383 |
} |
| 10384 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list", "response", internallog.HTTPResponse(res, b)) |
| 10385 |
return ret, nil |
| 10386 |
} |
| 10387 |
|
| 10388 |
// Pages invokes f for each page of results. |
| 10389 |
// A non-nil error returned from f will halt the iteration. |
| 10390 |
// The provided context supersedes any context provided to the Context method. |
| 10391 |
func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error { |
| 10392 |
c.ctx_ = ctx |
| 10393 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 10394 |
for { |
| 10395 |
x, err := c.Do() |
| 10396 |
if err != nil { |
| 10397 |
return err |
| 10398 |
} |
| 10399 |
if err := f(x); err != nil { |
| 10400 |
return err |
| 10401 |
} |
| 10402 |
if x.NextPageToken == "" { |
| 10403 |
return nil |
| 10404 |
} |
| 10405 |
c.PageToken(x.NextPageToken) |
| 10406 |
} |
| 10407 |
} |
| 10408 |
|
| 10409 |
type BiddersAccountsFilterSetsFilteredBidsListCall struct { |
| 10410 |
s *Service |
| 10411 |
filterSetName string |
| 10412 |
urlParams_ gensupport.URLParams |
| 10413 |
ifNoneMatch_ string |
| 10414 |
ctx_ context.Context |
| 10415 |
header_ http.Header |
| 10416 |
} |
| 10417 |
|
| 10418 |
// List: List all reasons for which bids were filtered, with the number of bids |
| 10419 |
// filtered for each reason. |
| 10420 |
// |
| 10421 |
// - filterSetName: Name of the filter set that should be applied to the |
| 10422 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 10423 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 10424 |
// the buyer account representing bidder 123: |
| 10425 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 10426 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 10427 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 10428 |
func (r *BiddersAccountsFilterSetsFilteredBidsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidsListCall { |
| 10429 |
c := &BiddersAccountsFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 10430 |
c.filterSetName = filterSetName |
| 10431 |
return c |
| 10432 |
} |
| 10433 |
|
| 10434 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 10435 |
// server may return fewer results than requested. If unspecified, the server |
| 10436 |
// will pick an appropriate default. |
| 10437 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsListCall { |
| 10438 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 10439 |
return c |
| 10440 |
} |
| 10441 |
|
| 10442 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 10443 |
// page of results the server should return. Typically, this is the value of |
| 10444 |
// ListFilteredBidsResponse.nextPageToken returned from the previous call to |
| 10445 |
// the filteredBids.list method. |
| 10446 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsListCall { |
| 10447 |
c.urlParams_.Set("pageToken", pageToken) |
| 10448 |
return c |
| 10449 |
} |
| 10450 |
|
| 10451 |
// Fields allows partial responses to be retrieved. See |
| 10452 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 10453 |
// details. |
| 10454 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsListCall { |
| 10455 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 10456 |
return c |
| 10457 |
} |
| 10458 |
|
| 10459 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 10460 |
// object's ETag matches the given value. This is useful for getting updates |
| 10461 |
// only after the object has changed since the last request. |
| 10462 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsListCall { |
| 10463 |
c.ifNoneMatch_ = entityTag |
| 10464 |
return c |
| 10465 |
} |
| 10466 |
|
| 10467 |
// Context sets the context to be used in this call's Do method. |
| 10468 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsListCall { |
| 10469 |
c.ctx_ = ctx |
| 10470 |
return c |
| 10471 |
} |
| 10472 |
|
| 10473 |
// Header returns a http.Header that can be modified by the caller to add |
| 10474 |
// headers to the request. |
| 10475 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Header() http.Header { |
| 10476 |
if c.header_ == nil { |
| 10477 |
c.header_ = make(http.Header) |
| 10478 |
} |
| 10479 |
return c.header_ |
| 10480 |
} |
| 10481 |
|
| 10482 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 10483 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10484 |
if c.ifNoneMatch_ != "" { |
| 10485 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10486 |
} |
| 10487 |
c.urlParams_.Set("alt", alt) |
| 10488 |
c.urlParams_.Set("prettyPrint", "false") |
| 10489 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids") |
| 10490 |
urls += "?" + c.urlParams_.Encode() |
| 10491 |
req, err := http.NewRequest("GET", urls, nil) |
| 10492 |
if err != nil { |
| 10493 |
return nil, err |
| 10494 |
} |
| 10495 |
req.Header = reqHeaders |
| 10496 |
googleapi.Expand(req.URL, map[string]string{ |
| 10497 |
"filterSetName": c.filterSetName, |
| 10498 |
}) |
| 10499 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 10500 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10501 |
} |
| 10502 |
|
| 10503 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list" call. |
| 10504 |
// Any non-2xx status code is an error. Response headers are in either |
| 10505 |
// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was |
| 10506 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 10507 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10508 |
// http.StatusNotModified was returned. |
| 10509 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) { |
| 10510 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10511 |
res, err := c.doRequest("json") |
| 10512 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10513 |
if res.Body != nil { |
| 10514 |
res.Body.Close() |
| 10515 |
} |
| 10516 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10517 |
Code: res.StatusCode, |
| 10518 |
Header: res.Header, |
| 10519 |
}) |
| 10520 |
} |
| 10521 |
if err != nil { |
| 10522 |
return nil, err |
| 10523 |
} |
| 10524 |
defer googleapi.CloseBody(res) |
| 10525 |
if err := googleapi.CheckResponse(res); err != nil { |
| 10526 |
return nil, gensupport.WrapError(err) |
| 10527 |
} |
| 10528 |
ret := &ListFilteredBidsResponse{ |
| 10529 |
ServerResponse: googleapi.ServerResponse{ |
| 10530 |
Header: res.Header, |
| 10531 |
HTTPStatusCode: res.StatusCode, |
| 10532 |
}, |
| 10533 |
} |
| 10534 |
target := &ret |
| 10535 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 10536 |
if err != nil { |
| 10537 |
return nil, err |
| 10538 |
} |
| 10539 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list", "response", internallog.HTTPResponse(res, b)) |
| 10540 |
return ret, nil |
| 10541 |
} |
| 10542 |
|
| 10543 |
// Pages invokes f for each page of results. |
| 10544 |
// A non-nil error returned from f will halt the iteration. |
| 10545 |
// The provided context supersedes any context provided to the Context method. |
| 10546 |
func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error { |
| 10547 |
c.ctx_ = ctx |
| 10548 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 10549 |
for { |
| 10550 |
x, err := c.Do() |
| 10551 |
if err != nil { |
| 10552 |
return err |
| 10553 |
} |
| 10554 |
if err := f(x); err != nil { |
| 10555 |
return err |
| 10556 |
} |
| 10557 |
if x.NextPageToken == "" { |
| 10558 |
return nil |
| 10559 |
} |
| 10560 |
c.PageToken(x.NextPageToken) |
| 10561 |
} |
| 10562 |
} |
| 10563 |
|
| 10564 |
type BiddersAccountsFilterSetsFilteredBidsCreativesListCall struct { |
| 10565 |
s *Service |
| 10566 |
filterSetName string |
| 10567 |
creativeStatusId int64 |
| 10568 |
urlParams_ gensupport.URLParams |
| 10569 |
ifNoneMatch_ string |
| 10570 |
ctx_ context.Context |
| 10571 |
header_ http.Header |
| 10572 |
} |
| 10573 |
|
| 10574 |
// List: List all creatives associated with a specific reason for which bids |
| 10575 |
// were filtered, with the number of bids filtered for each creative. |
| 10576 |
// |
| 10577 |
// - creativeStatusId: The ID of the creative status for which to retrieve a |
| 10578 |
// breakdown by creative. See creative-status-codes |
| 10579 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 10580 |
// - filterSetName: Name of the filter set that should be applied to the |
| 10581 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 10582 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 10583 |
// the buyer account representing bidder 123: |
| 10584 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 10585 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 10586 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 10587 |
func (r *BiddersAccountsFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { |
| 10588 |
c := &BiddersAccountsFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 10589 |
c.filterSetName = filterSetName |
| 10590 |
c.creativeStatusId = creativeStatusId |
| 10591 |
return c |
| 10592 |
} |
| 10593 |
|
| 10594 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 10595 |
// server may return fewer results than requested. If unspecified, the server |
| 10596 |
// will pick an appropriate default. |
| 10597 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { |
| 10598 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 10599 |
return c |
| 10600 |
} |
| 10601 |
|
| 10602 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 10603 |
// page of results the server should return. Typically, this is the value of |
| 10604 |
// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from |
| 10605 |
// the previous call to the filteredBids.creatives.list method. |
| 10606 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { |
| 10607 |
c.urlParams_.Set("pageToken", pageToken) |
| 10608 |
return c |
| 10609 |
} |
| 10610 |
|
| 10611 |
// Fields allows partial responses to be retrieved. See |
| 10612 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 10613 |
// details. |
| 10614 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { |
| 10615 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 10616 |
return c |
| 10617 |
} |
| 10618 |
|
| 10619 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 10620 |
// object's ETag matches the given value. This is useful for getting updates |
| 10621 |
// only after the object has changed since the last request. |
| 10622 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { |
| 10623 |
c.ifNoneMatch_ = entityTag |
| 10624 |
return c |
| 10625 |
} |
| 10626 |
|
| 10627 |
// Context sets the context to be used in this call's Do method. |
| 10628 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall { |
| 10629 |
c.ctx_ = ctx |
| 10630 |
return c |
| 10631 |
} |
| 10632 |
|
| 10633 |
// Header returns a http.Header that can be modified by the caller to add |
| 10634 |
// headers to the request. |
| 10635 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Header() http.Header { |
| 10636 |
if c.header_ == nil { |
| 10637 |
c.header_ = make(http.Header) |
| 10638 |
} |
| 10639 |
return c.header_ |
| 10640 |
} |
| 10641 |
|
| 10642 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) { |
| 10643 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10644 |
if c.ifNoneMatch_ != "" { |
| 10645 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10646 |
} |
| 10647 |
c.urlParams_.Set("alt", alt) |
| 10648 |
c.urlParams_.Set("prettyPrint", "false") |
| 10649 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives") |
| 10650 |
urls += "?" + c.urlParams_.Encode() |
| 10651 |
req, err := http.NewRequest("GET", urls, nil) |
| 10652 |
if err != nil { |
| 10653 |
return nil, err |
| 10654 |
} |
| 10655 |
req.Header = reqHeaders |
| 10656 |
googleapi.Expand(req.URL, map[string]string{ |
| 10657 |
"filterSetName": c.filterSetName, |
| 10658 |
"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), |
| 10659 |
}) |
| 10660 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list", "request", internallog.HTTPRequest(req, nil)) |
| 10661 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10662 |
} |
| 10663 |
|
| 10664 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list" call. |
| 10665 |
// Any non-2xx status code is an error. Response headers are in either |
| 10666 |
// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header or (if |
| 10667 |
// a response was returned at all) in error.(*googleapi.Error).Header. Use |
| 10668 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10669 |
// http.StatusNotModified was returned. |
| 10670 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) { |
| 10671 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10672 |
res, err := c.doRequest("json") |
| 10673 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10674 |
if res.Body != nil { |
| 10675 |
res.Body.Close() |
| 10676 |
} |
| 10677 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10678 |
Code: res.StatusCode, |
| 10679 |
Header: res.Header, |
| 10680 |
}) |
| 10681 |
} |
| 10682 |
if err != nil { |
| 10683 |
return nil, err |
| 10684 |
} |
| 10685 |
defer googleapi.CloseBody(res) |
| 10686 |
if err := googleapi.CheckResponse(res); err != nil { |
| 10687 |
return nil, gensupport.WrapError(err) |
| 10688 |
} |
| 10689 |
ret := &ListCreativeStatusBreakdownByCreativeResponse{ |
| 10690 |
ServerResponse: googleapi.ServerResponse{ |
| 10691 |
Header: res.Header, |
| 10692 |
HTTPStatusCode: res.StatusCode, |
| 10693 |
}, |
| 10694 |
} |
| 10695 |
target := &ret |
| 10696 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 10697 |
if err != nil { |
| 10698 |
return nil, err |
| 10699 |
} |
| 10700 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list", "response", internallog.HTTPResponse(res, b)) |
| 10701 |
return ret, nil |
| 10702 |
} |
| 10703 |
|
| 10704 |
// Pages invokes f for each page of results. |
| 10705 |
// A non-nil error returned from f will halt the iteration. |
| 10706 |
// The provided context supersedes any context provided to the Context method. |
| 10707 |
func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error { |
| 10708 |
c.ctx_ = ctx |
| 10709 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 10710 |
for { |
| 10711 |
x, err := c.Do() |
| 10712 |
if err != nil { |
| 10713 |
return err |
| 10714 |
} |
| 10715 |
if err := f(x); err != nil { |
| 10716 |
return err |
| 10717 |
} |
| 10718 |
if x.NextPageToken == "" { |
| 10719 |
return nil |
| 10720 |
} |
| 10721 |
c.PageToken(x.NextPageToken) |
| 10722 |
} |
| 10723 |
} |
| 10724 |
|
| 10725 |
type BiddersAccountsFilterSetsFilteredBidsDetailsListCall struct { |
| 10726 |
s *Service |
| 10727 |
filterSetName string |
| 10728 |
creativeStatusId int64 |
| 10729 |
urlParams_ gensupport.URLParams |
| 10730 |
ifNoneMatch_ string |
| 10731 |
ctx_ context.Context |
| 10732 |
header_ http.Header |
| 10733 |
} |
| 10734 |
|
| 10735 |
// List: List all details associated with a specific reason for which bids were |
| 10736 |
// filtered, with the number of bids filtered for each detail. |
| 10737 |
// |
| 10738 |
// - creativeStatusId: The ID of the creative status for which to retrieve a |
| 10739 |
// breakdown by detail. See creative-status-codes |
| 10740 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 10741 |
// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and |
| 10742 |
// 87. |
| 10743 |
// - filterSetName: Name of the filter set that should be applied to the |
| 10744 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 10745 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 10746 |
// the buyer account representing bidder 123: |
| 10747 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 10748 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 10749 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 10750 |
func (r *BiddersAccountsFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { |
| 10751 |
c := &BiddersAccountsFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 10752 |
c.filterSetName = filterSetName |
| 10753 |
c.creativeStatusId = creativeStatusId |
| 10754 |
return c |
| 10755 |
} |
| 10756 |
|
| 10757 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 10758 |
// server may return fewer results than requested. If unspecified, the server |
| 10759 |
// will pick an appropriate default. |
| 10760 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { |
| 10761 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 10762 |
return c |
| 10763 |
} |
| 10764 |
|
| 10765 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 10766 |
// page of results the server should return. Typically, this is the value of |
| 10767 |
// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the |
| 10768 |
// previous call to the filteredBids.details.list method. |
| 10769 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { |
| 10770 |
c.urlParams_.Set("pageToken", pageToken) |
| 10771 |
return c |
| 10772 |
} |
| 10773 |
|
| 10774 |
// Fields allows partial responses to be retrieved. See |
| 10775 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 10776 |
// details. |
| 10777 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { |
| 10778 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 10779 |
return c |
| 10780 |
} |
| 10781 |
|
| 10782 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 10783 |
// object's ETag matches the given value. This is useful for getting updates |
| 10784 |
// only after the object has changed since the last request. |
| 10785 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { |
| 10786 |
c.ifNoneMatch_ = entityTag |
| 10787 |
return c |
| 10788 |
} |
| 10789 |
|
| 10790 |
// Context sets the context to be used in this call's Do method. |
| 10791 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall { |
| 10792 |
c.ctx_ = ctx |
| 10793 |
return c |
| 10794 |
} |
| 10795 |
|
| 10796 |
// Header returns a http.Header that can be modified by the caller to add |
| 10797 |
// headers to the request. |
| 10798 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Header() http.Header { |
| 10799 |
if c.header_ == nil { |
| 10800 |
c.header_ = make(http.Header) |
| 10801 |
} |
| 10802 |
return c.header_ |
| 10803 |
} |
| 10804 |
|
| 10805 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) { |
| 10806 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10807 |
if c.ifNoneMatch_ != "" { |
| 10808 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10809 |
} |
| 10810 |
c.urlParams_.Set("alt", alt) |
| 10811 |
c.urlParams_.Set("prettyPrint", "false") |
| 10812 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details") |
| 10813 |
urls += "?" + c.urlParams_.Encode() |
| 10814 |
req, err := http.NewRequest("GET", urls, nil) |
| 10815 |
if err != nil { |
| 10816 |
return nil, err |
| 10817 |
} |
| 10818 |
req.Header = reqHeaders |
| 10819 |
googleapi.Expand(req.URL, map[string]string{ |
| 10820 |
"filterSetName": c.filterSetName, |
| 10821 |
"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), |
| 10822 |
}) |
| 10823 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list", "request", internallog.HTTPRequest(req, nil)) |
| 10824 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10825 |
} |
| 10826 |
|
| 10827 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list" call. |
| 10828 |
// Any non-2xx status code is an error. Response headers are in either |
| 10829 |
// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or (if a |
| 10830 |
// response was returned at all) in error.(*googleapi.Error).Header. Use |
| 10831 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10832 |
// http.StatusNotModified was returned. |
| 10833 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) { |
| 10834 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10835 |
res, err := c.doRequest("json") |
| 10836 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10837 |
if res.Body != nil { |
| 10838 |
res.Body.Close() |
| 10839 |
} |
| 10840 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10841 |
Code: res.StatusCode, |
| 10842 |
Header: res.Header, |
| 10843 |
}) |
| 10844 |
} |
| 10845 |
if err != nil { |
| 10846 |
return nil, err |
| 10847 |
} |
| 10848 |
defer googleapi.CloseBody(res) |
| 10849 |
if err := googleapi.CheckResponse(res); err != nil { |
| 10850 |
return nil, gensupport.WrapError(err) |
| 10851 |
} |
| 10852 |
ret := &ListCreativeStatusBreakdownByDetailResponse{ |
| 10853 |
ServerResponse: googleapi.ServerResponse{ |
| 10854 |
Header: res.Header, |
| 10855 |
HTTPStatusCode: res.StatusCode, |
| 10856 |
}, |
| 10857 |
} |
| 10858 |
target := &ret |
| 10859 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 10860 |
if err != nil { |
| 10861 |
return nil, err |
| 10862 |
} |
| 10863 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list", "response", internallog.HTTPResponse(res, b)) |
| 10864 |
return ret, nil |
| 10865 |
} |
| 10866 |
|
| 10867 |
// Pages invokes f for each page of results. |
| 10868 |
// A non-nil error returned from f will halt the iteration. |
| 10869 |
// The provided context supersedes any context provided to the Context method. |
| 10870 |
func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error { |
| 10871 |
c.ctx_ = ctx |
| 10872 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 10873 |
for { |
| 10874 |
x, err := c.Do() |
| 10875 |
if err != nil { |
| 10876 |
return err |
| 10877 |
} |
| 10878 |
if err := f(x); err != nil { |
| 10879 |
return err |
| 10880 |
} |
| 10881 |
if x.NextPageToken == "" { |
| 10882 |
return nil |
| 10883 |
} |
| 10884 |
c.PageToken(x.NextPageToken) |
| 10885 |
} |
| 10886 |
} |
| 10887 |
|
| 10888 |
type BiddersAccountsFilterSetsImpressionMetricsListCall struct { |
| 10889 |
s *Service |
| 10890 |
filterSetName string |
| 10891 |
urlParams_ gensupport.URLParams |
| 10892 |
ifNoneMatch_ string |
| 10893 |
ctx_ context.Context |
| 10894 |
header_ http.Header |
| 10895 |
} |
| 10896 |
|
| 10897 |
// List: Lists all metrics that are measured in terms of number of impressions. |
| 10898 |
// |
| 10899 |
// - filterSetName: Name of the filter set that should be applied to the |
| 10900 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 10901 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 10902 |
// the buyer account representing bidder 123: |
| 10903 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 10904 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 10905 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 10906 |
func (r *BiddersAccountsFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsImpressionMetricsListCall { |
| 10907 |
c := &BiddersAccountsFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 10908 |
c.filterSetName = filterSetName |
| 10909 |
return c |
| 10910 |
} |
| 10911 |
|
| 10912 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 10913 |
// server may return fewer results than requested. If unspecified, the server |
| 10914 |
// will pick an appropriate default. |
| 10915 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsImpressionMetricsListCall { |
| 10916 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 10917 |
return c |
| 10918 |
} |
| 10919 |
|
| 10920 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 10921 |
// page of results the server should return. Typically, this is the value of |
| 10922 |
// ListImpressionMetricsResponse.nextPageToken returned from the previous call |
| 10923 |
// to the impressionMetrics.list method. |
| 10924 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsImpressionMetricsListCall { |
| 10925 |
c.urlParams_.Set("pageToken", pageToken) |
| 10926 |
return c |
| 10927 |
} |
| 10928 |
|
| 10929 |
// Fields allows partial responses to be retrieved. See |
| 10930 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 10931 |
// details. |
| 10932 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsImpressionMetricsListCall { |
| 10933 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 10934 |
return c |
| 10935 |
} |
| 10936 |
|
| 10937 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 10938 |
// object's ETag matches the given value. This is useful for getting updates |
| 10939 |
// only after the object has changed since the last request. |
| 10940 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsImpressionMetricsListCall { |
| 10941 |
c.ifNoneMatch_ = entityTag |
| 10942 |
return c |
| 10943 |
} |
| 10944 |
|
| 10945 |
// Context sets the context to be used in this call's Do method. |
| 10946 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsImpressionMetricsListCall { |
| 10947 |
c.ctx_ = ctx |
| 10948 |
return c |
| 10949 |
} |
| 10950 |
|
| 10951 |
// Header returns a http.Header that can be modified by the caller to add |
| 10952 |
// headers to the request. |
| 10953 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Header() http.Header { |
| 10954 |
if c.header_ == nil { |
| 10955 |
c.header_ = make(http.Header) |
| 10956 |
} |
| 10957 |
return c.header_ |
| 10958 |
} |
| 10959 |
|
| 10960 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) { |
| 10961 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 10962 |
if c.ifNoneMatch_ != "" { |
| 10963 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 10964 |
} |
| 10965 |
c.urlParams_.Set("alt", alt) |
| 10966 |
c.urlParams_.Set("prettyPrint", "false") |
| 10967 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics") |
| 10968 |
urls += "?" + c.urlParams_.Encode() |
| 10969 |
req, err := http.NewRequest("GET", urls, nil) |
| 10970 |
if err != nil { |
| 10971 |
return nil, err |
| 10972 |
} |
| 10973 |
req.Header = reqHeaders |
| 10974 |
googleapi.Expand(req.URL, map[string]string{ |
| 10975 |
"filterSetName": c.filterSetName, |
| 10976 |
}) |
| 10977 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list", "request", internallog.HTTPRequest(req, nil)) |
| 10978 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 10979 |
} |
| 10980 |
|
| 10981 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list" call. |
| 10982 |
// Any non-2xx status code is an error. Response headers are in either |
| 10983 |
// *ListImpressionMetricsResponse.ServerResponse.Header or (if a response was |
| 10984 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 10985 |
// googleapi.IsNotModified to check whether the returned error was because |
| 10986 |
// http.StatusNotModified was returned. |
| 10987 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) { |
| 10988 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 10989 |
res, err := c.doRequest("json") |
| 10990 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 10991 |
if res.Body != nil { |
| 10992 |
res.Body.Close() |
| 10993 |
} |
| 10994 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 10995 |
Code: res.StatusCode, |
| 10996 |
Header: res.Header, |
| 10997 |
}) |
| 10998 |
} |
| 10999 |
if err != nil { |
| 11000 |
return nil, err |
| 11001 |
} |
| 11002 |
defer googleapi.CloseBody(res) |
| 11003 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11004 |
return nil, gensupport.WrapError(err) |
| 11005 |
} |
| 11006 |
ret := &ListImpressionMetricsResponse{ |
| 11007 |
ServerResponse: googleapi.ServerResponse{ |
| 11008 |
Header: res.Header, |
| 11009 |
HTTPStatusCode: res.StatusCode, |
| 11010 |
}, |
| 11011 |
} |
| 11012 |
target := &ret |
| 11013 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11014 |
if err != nil { |
| 11015 |
return nil, err |
| 11016 |
} |
| 11017 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list", "response", internallog.HTTPResponse(res, b)) |
| 11018 |
return ret, nil |
| 11019 |
} |
| 11020 |
|
| 11021 |
// Pages invokes f for each page of results. |
| 11022 |
// A non-nil error returned from f will halt the iteration. |
| 11023 |
// The provided context supersedes any context provided to the Context method. |
| 11024 |
func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error { |
| 11025 |
c.ctx_ = ctx |
| 11026 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 11027 |
for { |
| 11028 |
x, err := c.Do() |
| 11029 |
if err != nil { |
| 11030 |
return err |
| 11031 |
} |
| 11032 |
if err := f(x); err != nil { |
| 11033 |
return err |
| 11034 |
} |
| 11035 |
if x.NextPageToken == "" { |
| 11036 |
return nil |
| 11037 |
} |
| 11038 |
c.PageToken(x.NextPageToken) |
| 11039 |
} |
| 11040 |
} |
| 11041 |
|
| 11042 |
type BiddersAccountsFilterSetsLosingBidsListCall struct { |
| 11043 |
s *Service |
| 11044 |
filterSetName string |
| 11045 |
urlParams_ gensupport.URLParams |
| 11046 |
ifNoneMatch_ string |
| 11047 |
ctx_ context.Context |
| 11048 |
header_ http.Header |
| 11049 |
} |
| 11050 |
|
| 11051 |
// List: List all reasons for which bids lost in the auction, with the number |
| 11052 |
// of bids that lost for each reason. |
| 11053 |
// |
| 11054 |
// - filterSetName: Name of the filter set that should be applied to the |
| 11055 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 11056 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 11057 |
// the buyer account representing bidder 123: |
| 11058 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 11059 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 11060 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 11061 |
func (r *BiddersAccountsFilterSetsLosingBidsService) List(filterSetName string) *BiddersAccountsFilterSetsLosingBidsListCall { |
| 11062 |
c := &BiddersAccountsFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11063 |
c.filterSetName = filterSetName |
| 11064 |
return c |
| 11065 |
} |
| 11066 |
|
| 11067 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 11068 |
// server may return fewer results than requested. If unspecified, the server |
| 11069 |
// will pick an appropriate default. |
| 11070 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsLosingBidsListCall { |
| 11071 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 11072 |
return c |
| 11073 |
} |
| 11074 |
|
| 11075 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 11076 |
// page of results the server should return. Typically, this is the value of |
| 11077 |
// ListLosingBidsResponse.nextPageToken returned from the previous call to the |
| 11078 |
// losingBids.list method. |
| 11079 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsLosingBidsListCall { |
| 11080 |
c.urlParams_.Set("pageToken", pageToken) |
| 11081 |
return c |
| 11082 |
} |
| 11083 |
|
| 11084 |
// Fields allows partial responses to be retrieved. See |
| 11085 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11086 |
// details. |
| 11087 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsLosingBidsListCall { |
| 11088 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11089 |
return c |
| 11090 |
} |
| 11091 |
|
| 11092 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 11093 |
// object's ETag matches the given value. This is useful for getting updates |
| 11094 |
// only after the object has changed since the last request. |
| 11095 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsLosingBidsListCall { |
| 11096 |
c.ifNoneMatch_ = entityTag |
| 11097 |
return c |
| 11098 |
} |
| 11099 |
|
| 11100 |
// Context sets the context to be used in this call's Do method. |
| 11101 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsLosingBidsListCall { |
| 11102 |
c.ctx_ = ctx |
| 11103 |
return c |
| 11104 |
} |
| 11105 |
|
| 11106 |
// Header returns a http.Header that can be modified by the caller to add |
| 11107 |
// headers to the request. |
| 11108 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) Header() http.Header { |
| 11109 |
if c.header_ == nil { |
| 11110 |
c.header_ = make(http.Header) |
| 11111 |
} |
| 11112 |
return c.header_ |
| 11113 |
} |
| 11114 |
|
| 11115 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 11116 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 11117 |
if c.ifNoneMatch_ != "" { |
| 11118 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 11119 |
} |
| 11120 |
c.urlParams_.Set("alt", alt) |
| 11121 |
c.urlParams_.Set("prettyPrint", "false") |
| 11122 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids") |
| 11123 |
urls += "?" + c.urlParams_.Encode() |
| 11124 |
req, err := http.NewRequest("GET", urls, nil) |
| 11125 |
if err != nil { |
| 11126 |
return nil, err |
| 11127 |
} |
| 11128 |
req.Header = reqHeaders |
| 11129 |
googleapi.Expand(req.URL, map[string]string{ |
| 11130 |
"filterSetName": c.filterSetName, |
| 11131 |
}) |
| 11132 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 11133 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11134 |
} |
| 11135 |
|
| 11136 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list" call. |
| 11137 |
// Any non-2xx status code is an error. Response headers are in either |
| 11138 |
// *ListLosingBidsResponse.ServerResponse.Header or (if a response was returned |
| 11139 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 11140 |
// check whether the returned error was because http.StatusNotModified was |
| 11141 |
// returned. |
| 11142 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) { |
| 11143 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11144 |
res, err := c.doRequest("json") |
| 11145 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11146 |
if res.Body != nil { |
| 11147 |
res.Body.Close() |
| 11148 |
} |
| 11149 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11150 |
Code: res.StatusCode, |
| 11151 |
Header: res.Header, |
| 11152 |
}) |
| 11153 |
} |
| 11154 |
if err != nil { |
| 11155 |
return nil, err |
| 11156 |
} |
| 11157 |
defer googleapi.CloseBody(res) |
| 11158 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11159 |
return nil, gensupport.WrapError(err) |
| 11160 |
} |
| 11161 |
ret := &ListLosingBidsResponse{ |
| 11162 |
ServerResponse: googleapi.ServerResponse{ |
| 11163 |
Header: res.Header, |
| 11164 |
HTTPStatusCode: res.StatusCode, |
| 11165 |
}, |
| 11166 |
} |
| 11167 |
target := &ret |
| 11168 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11169 |
if err != nil { |
| 11170 |
return nil, err |
| 11171 |
} |
| 11172 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list", "response", internallog.HTTPResponse(res, b)) |
| 11173 |
return ret, nil |
| 11174 |
} |
| 11175 |
|
| 11176 |
// Pages invokes f for each page of results. |
| 11177 |
// A non-nil error returned from f will halt the iteration. |
| 11178 |
// The provided context supersedes any context provided to the Context method. |
| 11179 |
func (c *BiddersAccountsFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error { |
| 11180 |
c.ctx_ = ctx |
| 11181 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 11182 |
for { |
| 11183 |
x, err := c.Do() |
| 11184 |
if err != nil { |
| 11185 |
return err |
| 11186 |
} |
| 11187 |
if err := f(x); err != nil { |
| 11188 |
return err |
| 11189 |
} |
| 11190 |
if x.NextPageToken == "" { |
| 11191 |
return nil |
| 11192 |
} |
| 11193 |
c.PageToken(x.NextPageToken) |
| 11194 |
} |
| 11195 |
} |
| 11196 |
|
| 11197 |
type BiddersAccountsFilterSetsNonBillableWinningBidsListCall struct { |
| 11198 |
s *Service |
| 11199 |
filterSetName string |
| 11200 |
urlParams_ gensupport.URLParams |
| 11201 |
ifNoneMatch_ string |
| 11202 |
ctx_ context.Context |
| 11203 |
header_ http.Header |
| 11204 |
} |
| 11205 |
|
| 11206 |
// List: List all reasons for which winning bids were not billable, with the |
| 11207 |
// number of bids not billed for each reason. |
| 11208 |
// |
| 11209 |
// - filterSetName: Name of the filter set that should be applied to the |
| 11210 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 11211 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 11212 |
// the buyer account representing bidder 123: |
| 11213 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 11214 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 11215 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 11216 |
func (r *BiddersAccountsFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { |
| 11217 |
c := &BiddersAccountsFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11218 |
c.filterSetName = filterSetName |
| 11219 |
return c |
| 11220 |
} |
| 11221 |
|
| 11222 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 11223 |
// server may return fewer results than requested. If unspecified, the server |
| 11224 |
// will pick an appropriate default. |
| 11225 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { |
| 11226 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 11227 |
return c |
| 11228 |
} |
| 11229 |
|
| 11230 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 11231 |
// page of results the server should return. Typically, this is the value of |
| 11232 |
// ListNonBillableWinningBidsResponse.nextPageToken returned from the previous |
| 11233 |
// call to the nonBillableWinningBids.list method. |
| 11234 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { |
| 11235 |
c.urlParams_.Set("pageToken", pageToken) |
| 11236 |
return c |
| 11237 |
} |
| 11238 |
|
| 11239 |
// Fields allows partial responses to be retrieved. See |
| 11240 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11241 |
// details. |
| 11242 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { |
| 11243 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11244 |
return c |
| 11245 |
} |
| 11246 |
|
| 11247 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 11248 |
// object's ETag matches the given value. This is useful for getting updates |
| 11249 |
// only after the object has changed since the last request. |
| 11250 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { |
| 11251 |
c.ifNoneMatch_ = entityTag |
| 11252 |
return c |
| 11253 |
} |
| 11254 |
|
| 11255 |
// Context sets the context to be used in this call's Do method. |
| 11256 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall { |
| 11257 |
c.ctx_ = ctx |
| 11258 |
return c |
| 11259 |
} |
| 11260 |
|
| 11261 |
// Header returns a http.Header that can be modified by the caller to add |
| 11262 |
// headers to the request. |
| 11263 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Header() http.Header { |
| 11264 |
if c.header_ == nil { |
| 11265 |
c.header_ = make(http.Header) |
| 11266 |
} |
| 11267 |
return c.header_ |
| 11268 |
} |
| 11269 |
|
| 11270 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 11271 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 11272 |
if c.ifNoneMatch_ != "" { |
| 11273 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 11274 |
} |
| 11275 |
c.urlParams_.Set("alt", alt) |
| 11276 |
c.urlParams_.Set("prettyPrint", "false") |
| 11277 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids") |
| 11278 |
urls += "?" + c.urlParams_.Encode() |
| 11279 |
req, err := http.NewRequest("GET", urls, nil) |
| 11280 |
if err != nil { |
| 11281 |
return nil, err |
| 11282 |
} |
| 11283 |
req.Header = reqHeaders |
| 11284 |
googleapi.Expand(req.URL, map[string]string{ |
| 11285 |
"filterSetName": c.filterSetName, |
| 11286 |
}) |
| 11287 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 11288 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11289 |
} |
| 11290 |
|
| 11291 |
// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list" call. |
| 11292 |
// Any non-2xx status code is an error. Response headers are in either |
| 11293 |
// *ListNonBillableWinningBidsResponse.ServerResponse.Header or (if a response |
| 11294 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 11295 |
// googleapi.IsNotModified to check whether the returned error was because |
| 11296 |
// http.StatusNotModified was returned. |
| 11297 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) { |
| 11298 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11299 |
res, err := c.doRequest("json") |
| 11300 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11301 |
if res.Body != nil { |
| 11302 |
res.Body.Close() |
| 11303 |
} |
| 11304 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11305 |
Code: res.StatusCode, |
| 11306 |
Header: res.Header, |
| 11307 |
}) |
| 11308 |
} |
| 11309 |
if err != nil { |
| 11310 |
return nil, err |
| 11311 |
} |
| 11312 |
defer googleapi.CloseBody(res) |
| 11313 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11314 |
return nil, gensupport.WrapError(err) |
| 11315 |
} |
| 11316 |
ret := &ListNonBillableWinningBidsResponse{ |
| 11317 |
ServerResponse: googleapi.ServerResponse{ |
| 11318 |
Header: res.Header, |
| 11319 |
HTTPStatusCode: res.StatusCode, |
| 11320 |
}, |
| 11321 |
} |
| 11322 |
target := &ret |
| 11323 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11324 |
if err != nil { |
| 11325 |
return nil, err |
| 11326 |
} |
| 11327 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list", "response", internallog.HTTPResponse(res, b)) |
| 11328 |
return ret, nil |
| 11329 |
} |
| 11330 |
|
| 11331 |
// Pages invokes f for each page of results. |
| 11332 |
// A non-nil error returned from f will halt the iteration. |
| 11333 |
// The provided context supersedes any context provided to the Context method. |
| 11334 |
func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error { |
| 11335 |
c.ctx_ = ctx |
| 11336 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 11337 |
for { |
| 11338 |
x, err := c.Do() |
| 11339 |
if err != nil { |
| 11340 |
return err |
| 11341 |
} |
| 11342 |
if err := f(x); err != nil { |
| 11343 |
return err |
| 11344 |
} |
| 11345 |
if x.NextPageToken == "" { |
| 11346 |
return nil |
| 11347 |
} |
| 11348 |
c.PageToken(x.NextPageToken) |
| 11349 |
} |
| 11350 |
} |
| 11351 |
|
| 11352 |
type BiddersFilterSetsCreateCall struct { |
| 11353 |
s *Service |
| 11354 |
ownerName string |
| 11355 |
filterset *FilterSet |
| 11356 |
urlParams_ gensupport.URLParams |
| 11357 |
ctx_ context.Context |
| 11358 |
header_ http.Header |
| 11359 |
} |
| 11360 |
|
| 11361 |
// Create: Creates the specified filter set for the account with the given |
| 11362 |
// account ID. |
| 11363 |
// |
| 11364 |
// - ownerName: Name of the owner (bidder or account) of the filter set to be |
| 11365 |
// created. For example: - For a bidder-level filter set for bidder 123: |
| 11366 |
// `bidders/123` - For an account-level filter set for the buyer account |
| 11367 |
// representing bidder 123: `bidders/123/accounts/123` - For an account-level |
| 11368 |
// filter set for the child seat buyer account 456 whose bidder is 123: |
| 11369 |
// `bidders/123/accounts/456`. |
| 11370 |
func (r *BiddersFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersFilterSetsCreateCall { |
| 11371 |
c := &BiddersFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11372 |
c.ownerName = ownerName |
| 11373 |
c.filterset = filterset |
| 11374 |
return c |
| 11375 |
} |
| 11376 |
|
| 11377 |
// IsTransient sets the optional parameter "isTransient": Whether the filter |
| 11378 |
// set is transient, or should be persisted indefinitely. By default, filter |
| 11379 |
// sets are not transient. If transient, it will be available for at least 1 |
| 11380 |
// hour after creation. |
| 11381 |
func (c *BiddersFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersFilterSetsCreateCall { |
| 11382 |
c.urlParams_.Set("isTransient", fmt.Sprint(isTransient)) |
| 11383 |
return c |
| 11384 |
} |
| 11385 |
|
| 11386 |
// Fields allows partial responses to be retrieved. See |
| 11387 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11388 |
// details. |
| 11389 |
func (c *BiddersFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersFilterSetsCreateCall { |
| 11390 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11391 |
return c |
| 11392 |
} |
| 11393 |
|
| 11394 |
// Context sets the context to be used in this call's Do method. |
| 11395 |
func (c *BiddersFilterSetsCreateCall) Context(ctx context.Context) *BiddersFilterSetsCreateCall { |
| 11396 |
c.ctx_ = ctx |
| 11397 |
return c |
| 11398 |
} |
| 11399 |
|
| 11400 |
// Header returns a http.Header that can be modified by the caller to add |
| 11401 |
// headers to the request. |
| 11402 |
func (c *BiddersFilterSetsCreateCall) Header() http.Header { |
| 11403 |
if c.header_ == nil { |
| 11404 |
c.header_ = make(http.Header) |
| 11405 |
} |
| 11406 |
return c.header_ |
| 11407 |
} |
| 11408 |
|
| 11409 |
func (c *BiddersFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 11410 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 11411 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.filterset) |
| 11412 |
if err != nil { |
| 11413 |
return nil, err |
| 11414 |
} |
| 11415 |
c.urlParams_.Set("alt", alt) |
| 11416 |
c.urlParams_.Set("prettyPrint", "false") |
| 11417 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") |
| 11418 |
urls += "?" + c.urlParams_.Encode() |
| 11419 |
req, err := http.NewRequest("POST", urls, body) |
| 11420 |
if err != nil { |
| 11421 |
return nil, err |
| 11422 |
} |
| 11423 |
req.Header = reqHeaders |
| 11424 |
googleapi.Expand(req.URL, map[string]string{ |
| 11425 |
"ownerName": c.ownerName, |
| 11426 |
}) |
| 11427 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 11428 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11429 |
} |
| 11430 |
|
| 11431 |
// Do executes the "adexchangebuyer2.bidders.filterSets.create" call. |
| 11432 |
// Any non-2xx status code is an error. Response headers are in either |
| 11433 |
// *FilterSet.ServerResponse.Header or (if a response was returned at all) in |
| 11434 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 11435 |
// whether the returned error was because http.StatusNotModified was returned. |
| 11436 |
func (c *BiddersFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { |
| 11437 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11438 |
res, err := c.doRequest("json") |
| 11439 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11440 |
if res.Body != nil { |
| 11441 |
res.Body.Close() |
| 11442 |
} |
| 11443 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11444 |
Code: res.StatusCode, |
| 11445 |
Header: res.Header, |
| 11446 |
}) |
| 11447 |
} |
| 11448 |
if err != nil { |
| 11449 |
return nil, err |
| 11450 |
} |
| 11451 |
defer googleapi.CloseBody(res) |
| 11452 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11453 |
return nil, gensupport.WrapError(err) |
| 11454 |
} |
| 11455 |
ret := &FilterSet{ |
| 11456 |
ServerResponse: googleapi.ServerResponse{ |
| 11457 |
Header: res.Header, |
| 11458 |
HTTPStatusCode: res.StatusCode, |
| 11459 |
}, |
| 11460 |
} |
| 11461 |
target := &ret |
| 11462 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11463 |
if err != nil { |
| 11464 |
return nil, err |
| 11465 |
} |
| 11466 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.create", "response", internallog.HTTPResponse(res, b)) |
| 11467 |
return ret, nil |
| 11468 |
} |
| 11469 |
|
| 11470 |
type BiddersFilterSetsDeleteCall struct { |
| 11471 |
s *Service |
| 11472 |
name string |
| 11473 |
urlParams_ gensupport.URLParams |
| 11474 |
ctx_ context.Context |
| 11475 |
header_ http.Header |
| 11476 |
} |
| 11477 |
|
| 11478 |
// Delete: Deletes the requested filter set from the account with the given |
| 11479 |
// account ID. |
| 11480 |
// |
| 11481 |
// - name: Full name of the resource to delete. For example: - For a |
| 11482 |
// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For |
| 11483 |
// an account-level filter set for the buyer account representing bidder 123: |
| 11484 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 11485 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 11486 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 11487 |
func (r *BiddersFilterSetsService) Delete(name string) *BiddersFilterSetsDeleteCall { |
| 11488 |
c := &BiddersFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11489 |
c.name = name |
| 11490 |
return c |
| 11491 |
} |
| 11492 |
|
| 11493 |
// Fields allows partial responses to be retrieved. See |
| 11494 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11495 |
// details. |
| 11496 |
func (c *BiddersFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersFilterSetsDeleteCall { |
| 11497 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11498 |
return c |
| 11499 |
} |
| 11500 |
|
| 11501 |
// Context sets the context to be used in this call's Do method. |
| 11502 |
func (c *BiddersFilterSetsDeleteCall) Context(ctx context.Context) *BiddersFilterSetsDeleteCall { |
| 11503 |
c.ctx_ = ctx |
| 11504 |
return c |
| 11505 |
} |
| 11506 |
|
| 11507 |
// Header returns a http.Header that can be modified by the caller to add |
| 11508 |
// headers to the request. |
| 11509 |
func (c *BiddersFilterSetsDeleteCall) Header() http.Header { |
| 11510 |
if c.header_ == nil { |
| 11511 |
c.header_ = make(http.Header) |
| 11512 |
} |
| 11513 |
return c.header_ |
| 11514 |
} |
| 11515 |
|
| 11516 |
func (c *BiddersFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| 11517 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 11518 |
c.urlParams_.Set("alt", alt) |
| 11519 |
c.urlParams_.Set("prettyPrint", "false") |
| 11520 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") |
| 11521 |
urls += "?" + c.urlParams_.Encode() |
| 11522 |
req, err := http.NewRequest("DELETE", urls, nil) |
| 11523 |
if err != nil { |
| 11524 |
return nil, err |
| 11525 |
} |
| 11526 |
req.Header = reqHeaders |
| 11527 |
googleapi.Expand(req.URL, map[string]string{ |
| 11528 |
"name": c.name, |
| 11529 |
}) |
| 11530 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.delete", "request", internallog.HTTPRequest(req, nil)) |
| 11531 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11532 |
} |
| 11533 |
|
| 11534 |
// Do executes the "adexchangebuyer2.bidders.filterSets.delete" call. |
| 11535 |
// Any non-2xx status code is an error. Response headers are in either |
| 11536 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 11537 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 11538 |
// whether the returned error was because http.StatusNotModified was returned. |
| 11539 |
func (c *BiddersFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 11540 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11541 |
res, err := c.doRequest("json") |
| 11542 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11543 |
if res.Body != nil { |
| 11544 |
res.Body.Close() |
| 11545 |
} |
| 11546 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11547 |
Code: res.StatusCode, |
| 11548 |
Header: res.Header, |
| 11549 |
}) |
| 11550 |
} |
| 11551 |
if err != nil { |
| 11552 |
return nil, err |
| 11553 |
} |
| 11554 |
defer googleapi.CloseBody(res) |
| 11555 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11556 |
return nil, gensupport.WrapError(err) |
| 11557 |
} |
| 11558 |
ret := &Empty{ |
| 11559 |
ServerResponse: googleapi.ServerResponse{ |
| 11560 |
Header: res.Header, |
| 11561 |
HTTPStatusCode: res.StatusCode, |
| 11562 |
}, |
| 11563 |
} |
| 11564 |
target := &ret |
| 11565 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11566 |
if err != nil { |
| 11567 |
return nil, err |
| 11568 |
} |
| 11569 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.delete", "response", internallog.HTTPResponse(res, b)) |
| 11570 |
return ret, nil |
| 11571 |
} |
| 11572 |
|
| 11573 |
type BiddersFilterSetsGetCall struct { |
| 11574 |
s *Service |
| 11575 |
name string |
| 11576 |
urlParams_ gensupport.URLParams |
| 11577 |
ifNoneMatch_ string |
| 11578 |
ctx_ context.Context |
| 11579 |
header_ http.Header |
| 11580 |
} |
| 11581 |
|
| 11582 |
// Get: Retrieves the requested filter set for the account with the given |
| 11583 |
// account ID. |
| 11584 |
// |
| 11585 |
// - name: Full name of the resource being requested. For example: - For a |
| 11586 |
// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For |
| 11587 |
// an account-level filter set for the buyer account representing bidder 123: |
| 11588 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 11589 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 11590 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 11591 |
func (r *BiddersFilterSetsService) Get(name string) *BiddersFilterSetsGetCall { |
| 11592 |
c := &BiddersFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11593 |
c.name = name |
| 11594 |
return c |
| 11595 |
} |
| 11596 |
|
| 11597 |
// Fields allows partial responses to be retrieved. See |
| 11598 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11599 |
// details. |
| 11600 |
func (c *BiddersFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersFilterSetsGetCall { |
| 11601 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11602 |
return c |
| 11603 |
} |
| 11604 |
|
| 11605 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 11606 |
// object's ETag matches the given value. This is useful for getting updates |
| 11607 |
// only after the object has changed since the last request. |
| 11608 |
func (c *BiddersFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersFilterSetsGetCall { |
| 11609 |
c.ifNoneMatch_ = entityTag |
| 11610 |
return c |
| 11611 |
} |
| 11612 |
|
| 11613 |
// Context sets the context to be used in this call's Do method. |
| 11614 |
func (c *BiddersFilterSetsGetCall) Context(ctx context.Context) *BiddersFilterSetsGetCall { |
| 11615 |
c.ctx_ = ctx |
| 11616 |
return c |
| 11617 |
} |
| 11618 |
|
| 11619 |
// Header returns a http.Header that can be modified by the caller to add |
| 11620 |
// headers to the request. |
| 11621 |
func (c *BiddersFilterSetsGetCall) Header() http.Header { |
| 11622 |
if c.header_ == nil { |
| 11623 |
c.header_ = make(http.Header) |
| 11624 |
} |
| 11625 |
return c.header_ |
| 11626 |
} |
| 11627 |
|
| 11628 |
func (c *BiddersFilterSetsGetCall) doRequest(alt string) (*http.Response, error) { |
| 11629 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 11630 |
if c.ifNoneMatch_ != "" { |
| 11631 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 11632 |
} |
| 11633 |
c.urlParams_.Set("alt", alt) |
| 11634 |
c.urlParams_.Set("prettyPrint", "false") |
| 11635 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") |
| 11636 |
urls += "?" + c.urlParams_.Encode() |
| 11637 |
req, err := http.NewRequest("GET", urls, nil) |
| 11638 |
if err != nil { |
| 11639 |
return nil, err |
| 11640 |
} |
| 11641 |
req.Header = reqHeaders |
| 11642 |
googleapi.Expand(req.URL, map[string]string{ |
| 11643 |
"name": c.name, |
| 11644 |
}) |
| 11645 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.get", "request", internallog.HTTPRequest(req, nil)) |
| 11646 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11647 |
} |
| 11648 |
|
| 11649 |
// Do executes the "adexchangebuyer2.bidders.filterSets.get" call. |
| 11650 |
// Any non-2xx status code is an error. Response headers are in either |
| 11651 |
// *FilterSet.ServerResponse.Header or (if a response was returned at all) in |
| 11652 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 11653 |
// whether the returned error was because http.StatusNotModified was returned. |
| 11654 |
func (c *BiddersFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { |
| 11655 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11656 |
res, err := c.doRequest("json") |
| 11657 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11658 |
if res.Body != nil { |
| 11659 |
res.Body.Close() |
| 11660 |
} |
| 11661 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11662 |
Code: res.StatusCode, |
| 11663 |
Header: res.Header, |
| 11664 |
}) |
| 11665 |
} |
| 11666 |
if err != nil { |
| 11667 |
return nil, err |
| 11668 |
} |
| 11669 |
defer googleapi.CloseBody(res) |
| 11670 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11671 |
return nil, gensupport.WrapError(err) |
| 11672 |
} |
| 11673 |
ret := &FilterSet{ |
| 11674 |
ServerResponse: googleapi.ServerResponse{ |
| 11675 |
Header: res.Header, |
| 11676 |
HTTPStatusCode: res.StatusCode, |
| 11677 |
}, |
| 11678 |
} |
| 11679 |
target := &ret |
| 11680 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11681 |
if err != nil { |
| 11682 |
return nil, err |
| 11683 |
} |
| 11684 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.get", "response", internallog.HTTPResponse(res, b)) |
| 11685 |
return ret, nil |
| 11686 |
} |
| 11687 |
|
| 11688 |
type BiddersFilterSetsListCall struct { |
| 11689 |
s *Service |
| 11690 |
ownerName string |
| 11691 |
urlParams_ gensupport.URLParams |
| 11692 |
ifNoneMatch_ string |
| 11693 |
ctx_ context.Context |
| 11694 |
header_ http.Header |
| 11695 |
} |
| 11696 |
|
| 11697 |
// List: Lists all filter sets for the account with the given account ID. |
| 11698 |
// |
| 11699 |
// - ownerName: Name of the owner (bidder or account) of the filter sets to be |
| 11700 |
// listed. For example: - For a bidder-level filter set for bidder 123: |
| 11701 |
// `bidders/123` - For an account-level filter set for the buyer account |
| 11702 |
// representing bidder 123: `bidders/123/accounts/123` - For an account-level |
| 11703 |
// filter set for the child seat buyer account 456 whose bidder is 123: |
| 11704 |
// `bidders/123/accounts/456`. |
| 11705 |
func (r *BiddersFilterSetsService) List(ownerName string) *BiddersFilterSetsListCall { |
| 11706 |
c := &BiddersFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11707 |
c.ownerName = ownerName |
| 11708 |
return c |
| 11709 |
} |
| 11710 |
|
| 11711 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 11712 |
// server may return fewer results than requested. If unspecified, the server |
| 11713 |
// will pick an appropriate default. |
| 11714 |
func (c *BiddersFilterSetsListCall) PageSize(pageSize int64) *BiddersFilterSetsListCall { |
| 11715 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 11716 |
return c |
| 11717 |
} |
| 11718 |
|
| 11719 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 11720 |
// page of results the server should return. Typically, this is the value of |
| 11721 |
// ListFilterSetsResponse.nextPageToken returned from the previous call to the |
| 11722 |
// accounts.filterSets.list method. |
| 11723 |
func (c *BiddersFilterSetsListCall) PageToken(pageToken string) *BiddersFilterSetsListCall { |
| 11724 |
c.urlParams_.Set("pageToken", pageToken) |
| 11725 |
return c |
| 11726 |
} |
| 11727 |
|
| 11728 |
// Fields allows partial responses to be retrieved. See |
| 11729 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11730 |
// details. |
| 11731 |
func (c *BiddersFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsListCall { |
| 11732 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11733 |
return c |
| 11734 |
} |
| 11735 |
|
| 11736 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 11737 |
// object's ETag matches the given value. This is useful for getting updates |
| 11738 |
// only after the object has changed since the last request. |
| 11739 |
func (c *BiddersFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsListCall { |
| 11740 |
c.ifNoneMatch_ = entityTag |
| 11741 |
return c |
| 11742 |
} |
| 11743 |
|
| 11744 |
// Context sets the context to be used in this call's Do method. |
| 11745 |
func (c *BiddersFilterSetsListCall) Context(ctx context.Context) *BiddersFilterSetsListCall { |
| 11746 |
c.ctx_ = ctx |
| 11747 |
return c |
| 11748 |
} |
| 11749 |
|
| 11750 |
// Header returns a http.Header that can be modified by the caller to add |
| 11751 |
// headers to the request. |
| 11752 |
func (c *BiddersFilterSetsListCall) Header() http.Header { |
| 11753 |
if c.header_ == nil { |
| 11754 |
c.header_ = make(http.Header) |
| 11755 |
} |
| 11756 |
return c.header_ |
| 11757 |
} |
| 11758 |
|
| 11759 |
func (c *BiddersFilterSetsListCall) doRequest(alt string) (*http.Response, error) { |
| 11760 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 11761 |
if c.ifNoneMatch_ != "" { |
| 11762 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 11763 |
} |
| 11764 |
c.urlParams_.Set("alt", alt) |
| 11765 |
c.urlParams_.Set("prettyPrint", "false") |
| 11766 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") |
| 11767 |
urls += "?" + c.urlParams_.Encode() |
| 11768 |
req, err := http.NewRequest("GET", urls, nil) |
| 11769 |
if err != nil { |
| 11770 |
return nil, err |
| 11771 |
} |
| 11772 |
req.Header = reqHeaders |
| 11773 |
googleapi.Expand(req.URL, map[string]string{ |
| 11774 |
"ownerName": c.ownerName, |
| 11775 |
}) |
| 11776 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.list", "request", internallog.HTTPRequest(req, nil)) |
| 11777 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11778 |
} |
| 11779 |
|
| 11780 |
// Do executes the "adexchangebuyer2.bidders.filterSets.list" call. |
| 11781 |
// Any non-2xx status code is an error. Response headers are in either |
| 11782 |
// *ListFilterSetsResponse.ServerResponse.Header or (if a response was returned |
| 11783 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 11784 |
// check whether the returned error was because http.StatusNotModified was |
| 11785 |
// returned. |
| 11786 |
func (c *BiddersFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) { |
| 11787 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11788 |
res, err := c.doRequest("json") |
| 11789 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11790 |
if res.Body != nil { |
| 11791 |
res.Body.Close() |
| 11792 |
} |
| 11793 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11794 |
Code: res.StatusCode, |
| 11795 |
Header: res.Header, |
| 11796 |
}) |
| 11797 |
} |
| 11798 |
if err != nil { |
| 11799 |
return nil, err |
| 11800 |
} |
| 11801 |
defer googleapi.CloseBody(res) |
| 11802 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11803 |
return nil, gensupport.WrapError(err) |
| 11804 |
} |
| 11805 |
ret := &ListFilterSetsResponse{ |
| 11806 |
ServerResponse: googleapi.ServerResponse{ |
| 11807 |
Header: res.Header, |
| 11808 |
HTTPStatusCode: res.StatusCode, |
| 11809 |
}, |
| 11810 |
} |
| 11811 |
target := &ret |
| 11812 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11813 |
if err != nil { |
| 11814 |
return nil, err |
| 11815 |
} |
| 11816 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.list", "response", internallog.HTTPResponse(res, b)) |
| 11817 |
return ret, nil |
| 11818 |
} |
| 11819 |
|
| 11820 |
// Pages invokes f for each page of results. |
| 11821 |
// A non-nil error returned from f will halt the iteration. |
| 11822 |
// The provided context supersedes any context provided to the Context method. |
| 11823 |
func (c *BiddersFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error { |
| 11824 |
c.ctx_ = ctx |
| 11825 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 11826 |
for { |
| 11827 |
x, err := c.Do() |
| 11828 |
if err != nil { |
| 11829 |
return err |
| 11830 |
} |
| 11831 |
if err := f(x); err != nil { |
| 11832 |
return err |
| 11833 |
} |
| 11834 |
if x.NextPageToken == "" { |
| 11835 |
return nil |
| 11836 |
} |
| 11837 |
c.PageToken(x.NextPageToken) |
| 11838 |
} |
| 11839 |
} |
| 11840 |
|
| 11841 |
type BiddersFilterSetsBidMetricsListCall struct { |
| 11842 |
s *Service |
| 11843 |
filterSetName string |
| 11844 |
urlParams_ gensupport.URLParams |
| 11845 |
ifNoneMatch_ string |
| 11846 |
ctx_ context.Context |
| 11847 |
header_ http.Header |
| 11848 |
} |
| 11849 |
|
| 11850 |
// List: Lists all metrics that are measured in terms of number of bids. |
| 11851 |
// |
| 11852 |
// - filterSetName: Name of the filter set that should be applied to the |
| 11853 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 11854 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 11855 |
// the buyer account representing bidder 123: |
| 11856 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 11857 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 11858 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 11859 |
func (r *BiddersFilterSetsBidMetricsService) List(filterSetName string) *BiddersFilterSetsBidMetricsListCall { |
| 11860 |
c := &BiddersFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 11861 |
c.filterSetName = filterSetName |
| 11862 |
return c |
| 11863 |
} |
| 11864 |
|
| 11865 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 11866 |
// server may return fewer results than requested. If unspecified, the server |
| 11867 |
// will pick an appropriate default. |
| 11868 |
func (c *BiddersFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidMetricsListCall { |
| 11869 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 11870 |
return c |
| 11871 |
} |
| 11872 |
|
| 11873 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 11874 |
// page of results the server should return. Typically, this is the value of |
| 11875 |
// ListBidMetricsResponse.nextPageToken returned from the previous call to the |
| 11876 |
// bidMetrics.list method. |
| 11877 |
func (c *BiddersFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsBidMetricsListCall { |
| 11878 |
c.urlParams_.Set("pageToken", pageToken) |
| 11879 |
return c |
| 11880 |
} |
| 11881 |
|
| 11882 |
// Fields allows partial responses to be retrieved. See |
| 11883 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 11884 |
// details. |
| 11885 |
func (c *BiddersFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidMetricsListCall { |
| 11886 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 11887 |
return c |
| 11888 |
} |
| 11889 |
|
| 11890 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 11891 |
// object's ETag matches the given value. This is useful for getting updates |
| 11892 |
// only after the object has changed since the last request. |
| 11893 |
func (c *BiddersFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidMetricsListCall { |
| 11894 |
c.ifNoneMatch_ = entityTag |
| 11895 |
return c |
| 11896 |
} |
| 11897 |
|
| 11898 |
// Context sets the context to be used in this call's Do method. |
| 11899 |
func (c *BiddersFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsBidMetricsListCall { |
| 11900 |
c.ctx_ = ctx |
| 11901 |
return c |
| 11902 |
} |
| 11903 |
|
| 11904 |
// Header returns a http.Header that can be modified by the caller to add |
| 11905 |
// headers to the request. |
| 11906 |
func (c *BiddersFilterSetsBidMetricsListCall) Header() http.Header { |
| 11907 |
if c.header_ == nil { |
| 11908 |
c.header_ = make(http.Header) |
| 11909 |
} |
| 11910 |
return c.header_ |
| 11911 |
} |
| 11912 |
|
| 11913 |
func (c *BiddersFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) { |
| 11914 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 11915 |
if c.ifNoneMatch_ != "" { |
| 11916 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 11917 |
} |
| 11918 |
c.urlParams_.Set("alt", alt) |
| 11919 |
c.urlParams_.Set("prettyPrint", "false") |
| 11920 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics") |
| 11921 |
urls += "?" + c.urlParams_.Encode() |
| 11922 |
req, err := http.NewRequest("GET", urls, nil) |
| 11923 |
if err != nil { |
| 11924 |
return nil, err |
| 11925 |
} |
| 11926 |
req.Header = reqHeaders |
| 11927 |
googleapi.Expand(req.URL, map[string]string{ |
| 11928 |
"filterSetName": c.filterSetName, |
| 11929 |
}) |
| 11930 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.bidMetrics.list", "request", internallog.HTTPRequest(req, nil)) |
| 11931 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 11932 |
} |
| 11933 |
|
| 11934 |
// Do executes the "adexchangebuyer2.bidders.filterSets.bidMetrics.list" call. |
| 11935 |
// Any non-2xx status code is an error. Response headers are in either |
| 11936 |
// *ListBidMetricsResponse.ServerResponse.Header or (if a response was returned |
| 11937 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 11938 |
// check whether the returned error was because http.StatusNotModified was |
| 11939 |
// returned. |
| 11940 |
func (c *BiddersFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) { |
| 11941 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 11942 |
res, err := c.doRequest("json") |
| 11943 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 11944 |
if res.Body != nil { |
| 11945 |
res.Body.Close() |
| 11946 |
} |
| 11947 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 11948 |
Code: res.StatusCode, |
| 11949 |
Header: res.Header, |
| 11950 |
}) |
| 11951 |
} |
| 11952 |
if err != nil { |
| 11953 |
return nil, err |
| 11954 |
} |
| 11955 |
defer googleapi.CloseBody(res) |
| 11956 |
if err := googleapi.CheckResponse(res); err != nil { |
| 11957 |
return nil, gensupport.WrapError(err) |
| 11958 |
} |
| 11959 |
ret := &ListBidMetricsResponse{ |
| 11960 |
ServerResponse: googleapi.ServerResponse{ |
| 11961 |
Header: res.Header, |
| 11962 |
HTTPStatusCode: res.StatusCode, |
| 11963 |
}, |
| 11964 |
} |
| 11965 |
target := &ret |
| 11966 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 11967 |
if err != nil { |
| 11968 |
return nil, err |
| 11969 |
} |
| 11970 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.bidMetrics.list", "response", internallog.HTTPResponse(res, b)) |
| 11971 |
return ret, nil |
| 11972 |
} |
| 11973 |
|
| 11974 |
// Pages invokes f for each page of results. |
| 11975 |
// A non-nil error returned from f will halt the iteration. |
| 11976 |
// The provided context supersedes any context provided to the Context method. |
| 11977 |
func (c *BiddersFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error { |
| 11978 |
c.ctx_ = ctx |
| 11979 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 11980 |
for { |
| 11981 |
x, err := c.Do() |
| 11982 |
if err != nil { |
| 11983 |
return err |
| 11984 |
} |
| 11985 |
if err := f(x); err != nil { |
| 11986 |
return err |
| 11987 |
} |
| 11988 |
if x.NextPageToken == "" { |
| 11989 |
return nil |
| 11990 |
} |
| 11991 |
c.PageToken(x.NextPageToken) |
| 11992 |
} |
| 11993 |
} |
| 11994 |
|
| 11995 |
type BiddersFilterSetsBidResponseErrorsListCall struct { |
| 11996 |
s *Service |
| 11997 |
filterSetName string |
| 11998 |
urlParams_ gensupport.URLParams |
| 11999 |
ifNoneMatch_ string |
| 12000 |
ctx_ context.Context |
| 12001 |
header_ http.Header |
| 12002 |
} |
| 12003 |
|
| 12004 |
// List: List all errors that occurred in bid responses, with the number of bid |
| 12005 |
// responses affected for each reason. |
| 12006 |
// |
| 12007 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12008 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12009 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12010 |
// the buyer account representing bidder 123: |
| 12011 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12012 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12013 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12014 |
func (r *BiddersFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersFilterSetsBidResponseErrorsListCall { |
| 12015 |
c := &BiddersFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12016 |
c.filterSetName = filterSetName |
| 12017 |
return c |
| 12018 |
} |
| 12019 |
|
| 12020 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12021 |
// server may return fewer results than requested. If unspecified, the server |
| 12022 |
// will pick an appropriate default. |
| 12023 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponseErrorsListCall { |
| 12024 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12025 |
return c |
| 12026 |
} |
| 12027 |
|
| 12028 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12029 |
// page of results the server should return. Typically, this is the value of |
| 12030 |
// ListBidResponseErrorsResponse.nextPageToken returned from the previous call |
| 12031 |
// to the bidResponseErrors.list method. |
| 12032 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponseErrorsListCall { |
| 12033 |
c.urlParams_.Set("pageToken", pageToken) |
| 12034 |
return c |
| 12035 |
} |
| 12036 |
|
| 12037 |
// Fields allows partial responses to be retrieved. See |
| 12038 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12039 |
// details. |
| 12040 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponseErrorsListCall { |
| 12041 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12042 |
return c |
| 12043 |
} |
| 12044 |
|
| 12045 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12046 |
// object's ETag matches the given value. This is useful for getting updates |
| 12047 |
// only after the object has changed since the last request. |
| 12048 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponseErrorsListCall { |
| 12049 |
c.ifNoneMatch_ = entityTag |
| 12050 |
return c |
| 12051 |
} |
| 12052 |
|
| 12053 |
// Context sets the context to be used in this call's Do method. |
| 12054 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponseErrorsListCall { |
| 12055 |
c.ctx_ = ctx |
| 12056 |
return c |
| 12057 |
} |
| 12058 |
|
| 12059 |
// Header returns a http.Header that can be modified by the caller to add |
| 12060 |
// headers to the request. |
| 12061 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) Header() http.Header { |
| 12062 |
if c.header_ == nil { |
| 12063 |
c.header_ = make(http.Header) |
| 12064 |
} |
| 12065 |
return c.header_ |
| 12066 |
} |
| 12067 |
|
| 12068 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) { |
| 12069 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 12070 |
if c.ifNoneMatch_ != "" { |
| 12071 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 12072 |
} |
| 12073 |
c.urlParams_.Set("alt", alt) |
| 12074 |
c.urlParams_.Set("prettyPrint", "false") |
| 12075 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors") |
| 12076 |
urls += "?" + c.urlParams_.Encode() |
| 12077 |
req, err := http.NewRequest("GET", urls, nil) |
| 12078 |
if err != nil { |
| 12079 |
return nil, err |
| 12080 |
} |
| 12081 |
req.Header = reqHeaders |
| 12082 |
googleapi.Expand(req.URL, map[string]string{ |
| 12083 |
"filterSetName": c.filterSetName, |
| 12084 |
}) |
| 12085 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list", "request", internallog.HTTPRequest(req, nil)) |
| 12086 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 12087 |
} |
| 12088 |
|
| 12089 |
// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list" call. |
| 12090 |
// Any non-2xx status code is an error. Response headers are in either |
| 12091 |
// *ListBidResponseErrorsResponse.ServerResponse.Header or (if a response was |
| 12092 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 12093 |
// googleapi.IsNotModified to check whether the returned error was because |
| 12094 |
// http.StatusNotModified was returned. |
| 12095 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) { |
| 12096 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 12097 |
res, err := c.doRequest("json") |
| 12098 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 12099 |
if res.Body != nil { |
| 12100 |
res.Body.Close() |
| 12101 |
} |
| 12102 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 12103 |
Code: res.StatusCode, |
| 12104 |
Header: res.Header, |
| 12105 |
}) |
| 12106 |
} |
| 12107 |
if err != nil { |
| 12108 |
return nil, err |
| 12109 |
} |
| 12110 |
defer googleapi.CloseBody(res) |
| 12111 |
if err := googleapi.CheckResponse(res); err != nil { |
| 12112 |
return nil, gensupport.WrapError(err) |
| 12113 |
} |
| 12114 |
ret := &ListBidResponseErrorsResponse{ |
| 12115 |
ServerResponse: googleapi.ServerResponse{ |
| 12116 |
Header: res.Header, |
| 12117 |
HTTPStatusCode: res.StatusCode, |
| 12118 |
}, |
| 12119 |
} |
| 12120 |
target := &ret |
| 12121 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 12122 |
if err != nil { |
| 12123 |
return nil, err |
| 12124 |
} |
| 12125 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list", "response", internallog.HTTPResponse(res, b)) |
| 12126 |
return ret, nil |
| 12127 |
} |
| 12128 |
|
| 12129 |
// Pages invokes f for each page of results. |
| 12130 |
// A non-nil error returned from f will halt the iteration. |
| 12131 |
// The provided context supersedes any context provided to the Context method. |
| 12132 |
func (c *BiddersFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error { |
| 12133 |
c.ctx_ = ctx |
| 12134 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 12135 |
for { |
| 12136 |
x, err := c.Do() |
| 12137 |
if err != nil { |
| 12138 |
return err |
| 12139 |
} |
| 12140 |
if err := f(x); err != nil { |
| 12141 |
return err |
| 12142 |
} |
| 12143 |
if x.NextPageToken == "" { |
| 12144 |
return nil |
| 12145 |
} |
| 12146 |
c.PageToken(x.NextPageToken) |
| 12147 |
} |
| 12148 |
} |
| 12149 |
|
| 12150 |
type BiddersFilterSetsBidResponsesWithoutBidsListCall struct { |
| 12151 |
s *Service |
| 12152 |
filterSetName string |
| 12153 |
urlParams_ gensupport.URLParams |
| 12154 |
ifNoneMatch_ string |
| 12155 |
ctx_ context.Context |
| 12156 |
header_ http.Header |
| 12157 |
} |
| 12158 |
|
| 12159 |
// List: List all reasons for which bid responses were considered to have no |
| 12160 |
// applicable bids, with the number of bid responses affected for each reason. |
| 12161 |
// |
| 12162 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12163 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12164 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12165 |
// the buyer account representing bidder 123: |
| 12166 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12167 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12168 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12169 |
func (r *BiddersFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersFilterSetsBidResponsesWithoutBidsListCall { |
| 12170 |
c := &BiddersFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12171 |
c.filterSetName = filterSetName |
| 12172 |
return c |
| 12173 |
} |
| 12174 |
|
| 12175 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12176 |
// server may return fewer results than requested. If unspecified, the server |
| 12177 |
// will pick an appropriate default. |
| 12178 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponsesWithoutBidsListCall { |
| 12179 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12180 |
return c |
| 12181 |
} |
| 12182 |
|
| 12183 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12184 |
// page of results the server should return. Typically, this is the value of |
| 12185 |
// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous |
| 12186 |
// call to the bidResponsesWithoutBids.list method. |
| 12187 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponsesWithoutBidsListCall { |
| 12188 |
c.urlParams_.Set("pageToken", pageToken) |
| 12189 |
return c |
| 12190 |
} |
| 12191 |
|
| 12192 |
// Fields allows partial responses to be retrieved. See |
| 12193 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12194 |
// details. |
| 12195 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponsesWithoutBidsListCall { |
| 12196 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12197 |
return c |
| 12198 |
} |
| 12199 |
|
| 12200 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12201 |
// object's ETag matches the given value. This is useful for getting updates |
| 12202 |
// only after the object has changed since the last request. |
| 12203 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponsesWithoutBidsListCall { |
| 12204 |
c.ifNoneMatch_ = entityTag |
| 12205 |
return c |
| 12206 |
} |
| 12207 |
|
| 12208 |
// Context sets the context to be used in this call's Do method. |
| 12209 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponsesWithoutBidsListCall { |
| 12210 |
c.ctx_ = ctx |
| 12211 |
return c |
| 12212 |
} |
| 12213 |
|
| 12214 |
// Header returns a http.Header that can be modified by the caller to add |
| 12215 |
// headers to the request. |
| 12216 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header { |
| 12217 |
if c.header_ == nil { |
| 12218 |
c.header_ = make(http.Header) |
| 12219 |
} |
| 12220 |
return c.header_ |
| 12221 |
} |
| 12222 |
|
| 12223 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 12224 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 12225 |
if c.ifNoneMatch_ != "" { |
| 12226 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 12227 |
} |
| 12228 |
c.urlParams_.Set("alt", alt) |
| 12229 |
c.urlParams_.Set("prettyPrint", "false") |
| 12230 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids") |
| 12231 |
urls += "?" + c.urlParams_.Encode() |
| 12232 |
req, err := http.NewRequest("GET", urls, nil) |
| 12233 |
if err != nil { |
| 12234 |
return nil, err |
| 12235 |
} |
| 12236 |
req.Header = reqHeaders |
| 12237 |
googleapi.Expand(req.URL, map[string]string{ |
| 12238 |
"filterSetName": c.filterSetName, |
| 12239 |
}) |
| 12240 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 12241 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 12242 |
} |
| 12243 |
|
| 12244 |
// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list" call. |
| 12245 |
// Any non-2xx status code is an error. Response headers are in either |
| 12246 |
// *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or (if a response |
| 12247 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 12248 |
// googleapi.IsNotModified to check whether the returned error was because |
| 12249 |
// http.StatusNotModified was returned. |
| 12250 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) { |
| 12251 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 12252 |
res, err := c.doRequest("json") |
| 12253 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 12254 |
if res.Body != nil { |
| 12255 |
res.Body.Close() |
| 12256 |
} |
| 12257 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 12258 |
Code: res.StatusCode, |
| 12259 |
Header: res.Header, |
| 12260 |
}) |
| 12261 |
} |
| 12262 |
if err != nil { |
| 12263 |
return nil, err |
| 12264 |
} |
| 12265 |
defer googleapi.CloseBody(res) |
| 12266 |
if err := googleapi.CheckResponse(res); err != nil { |
| 12267 |
return nil, gensupport.WrapError(err) |
| 12268 |
} |
| 12269 |
ret := &ListBidResponsesWithoutBidsResponse{ |
| 12270 |
ServerResponse: googleapi.ServerResponse{ |
| 12271 |
Header: res.Header, |
| 12272 |
HTTPStatusCode: res.StatusCode, |
| 12273 |
}, |
| 12274 |
} |
| 12275 |
target := &ret |
| 12276 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 12277 |
if err != nil { |
| 12278 |
return nil, err |
| 12279 |
} |
| 12280 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list", "response", internallog.HTTPResponse(res, b)) |
| 12281 |
return ret, nil |
| 12282 |
} |
| 12283 |
|
| 12284 |
// Pages invokes f for each page of results. |
| 12285 |
// A non-nil error returned from f will halt the iteration. |
| 12286 |
// The provided context supersedes any context provided to the Context method. |
| 12287 |
func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error { |
| 12288 |
c.ctx_ = ctx |
| 12289 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 12290 |
for { |
| 12291 |
x, err := c.Do() |
| 12292 |
if err != nil { |
| 12293 |
return err |
| 12294 |
} |
| 12295 |
if err := f(x); err != nil { |
| 12296 |
return err |
| 12297 |
} |
| 12298 |
if x.NextPageToken == "" { |
| 12299 |
return nil |
| 12300 |
} |
| 12301 |
c.PageToken(x.NextPageToken) |
| 12302 |
} |
| 12303 |
} |
| 12304 |
|
| 12305 |
type BiddersFilterSetsFilteredBidRequestsListCall struct { |
| 12306 |
s *Service |
| 12307 |
filterSetName string |
| 12308 |
urlParams_ gensupport.URLParams |
| 12309 |
ifNoneMatch_ string |
| 12310 |
ctx_ context.Context |
| 12311 |
header_ http.Header |
| 12312 |
} |
| 12313 |
|
| 12314 |
// List: List all reasons that caused a bid request not to be sent for an |
| 12315 |
// impression, with the number of bid requests not sent for each reason. |
| 12316 |
// |
| 12317 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12318 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12319 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12320 |
// the buyer account representing bidder 123: |
| 12321 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12322 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12323 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12324 |
func (r *BiddersFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersFilterSetsFilteredBidRequestsListCall { |
| 12325 |
c := &BiddersFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12326 |
c.filterSetName = filterSetName |
| 12327 |
return c |
| 12328 |
} |
| 12329 |
|
| 12330 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12331 |
// server may return fewer results than requested. If unspecified, the server |
| 12332 |
// will pick an appropriate default. |
| 12333 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidRequestsListCall { |
| 12334 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12335 |
return c |
| 12336 |
} |
| 12337 |
|
| 12338 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12339 |
// page of results the server should return. Typically, this is the value of |
| 12340 |
// ListFilteredBidRequestsResponse.nextPageToken returned from the previous |
| 12341 |
// call to the filteredBidRequests.list method. |
| 12342 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidRequestsListCall { |
| 12343 |
c.urlParams_.Set("pageToken", pageToken) |
| 12344 |
return c |
| 12345 |
} |
| 12346 |
|
| 12347 |
// Fields allows partial responses to be retrieved. See |
| 12348 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12349 |
// details. |
| 12350 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidRequestsListCall { |
| 12351 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12352 |
return c |
| 12353 |
} |
| 12354 |
|
| 12355 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12356 |
// object's ETag matches the given value. This is useful for getting updates |
| 12357 |
// only after the object has changed since the last request. |
| 12358 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidRequestsListCall { |
| 12359 |
c.ifNoneMatch_ = entityTag |
| 12360 |
return c |
| 12361 |
} |
| 12362 |
|
| 12363 |
// Context sets the context to be used in this call's Do method. |
| 12364 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidRequestsListCall { |
| 12365 |
c.ctx_ = ctx |
| 12366 |
return c |
| 12367 |
} |
| 12368 |
|
| 12369 |
// Header returns a http.Header that can be modified by the caller to add |
| 12370 |
// headers to the request. |
| 12371 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) Header() http.Header { |
| 12372 |
if c.header_ == nil { |
| 12373 |
c.header_ = make(http.Header) |
| 12374 |
} |
| 12375 |
return c.header_ |
| 12376 |
} |
| 12377 |
|
| 12378 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) { |
| 12379 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 12380 |
if c.ifNoneMatch_ != "" { |
| 12381 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 12382 |
} |
| 12383 |
c.urlParams_.Set("alt", alt) |
| 12384 |
c.urlParams_.Set("prettyPrint", "false") |
| 12385 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests") |
| 12386 |
urls += "?" + c.urlParams_.Encode() |
| 12387 |
req, err := http.NewRequest("GET", urls, nil) |
| 12388 |
if err != nil { |
| 12389 |
return nil, err |
| 12390 |
} |
| 12391 |
req.Header = reqHeaders |
| 12392 |
googleapi.Expand(req.URL, map[string]string{ |
| 12393 |
"filterSetName": c.filterSetName, |
| 12394 |
}) |
| 12395 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list", "request", internallog.HTTPRequest(req, nil)) |
| 12396 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 12397 |
} |
| 12398 |
|
| 12399 |
// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list" call. |
| 12400 |
// Any non-2xx status code is an error. Response headers are in either |
| 12401 |
// *ListFilteredBidRequestsResponse.ServerResponse.Header or (if a response was |
| 12402 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 12403 |
// googleapi.IsNotModified to check whether the returned error was because |
| 12404 |
// http.StatusNotModified was returned. |
| 12405 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) { |
| 12406 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 12407 |
res, err := c.doRequest("json") |
| 12408 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 12409 |
if res.Body != nil { |
| 12410 |
res.Body.Close() |
| 12411 |
} |
| 12412 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 12413 |
Code: res.StatusCode, |
| 12414 |
Header: res.Header, |
| 12415 |
}) |
| 12416 |
} |
| 12417 |
if err != nil { |
| 12418 |
return nil, err |
| 12419 |
} |
| 12420 |
defer googleapi.CloseBody(res) |
| 12421 |
if err := googleapi.CheckResponse(res); err != nil { |
| 12422 |
return nil, gensupport.WrapError(err) |
| 12423 |
} |
| 12424 |
ret := &ListFilteredBidRequestsResponse{ |
| 12425 |
ServerResponse: googleapi.ServerResponse{ |
| 12426 |
Header: res.Header, |
| 12427 |
HTTPStatusCode: res.StatusCode, |
| 12428 |
}, |
| 12429 |
} |
| 12430 |
target := &ret |
| 12431 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 12432 |
if err != nil { |
| 12433 |
return nil, err |
| 12434 |
} |
| 12435 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list", "response", internallog.HTTPResponse(res, b)) |
| 12436 |
return ret, nil |
| 12437 |
} |
| 12438 |
|
| 12439 |
// Pages invokes f for each page of results. |
| 12440 |
// A non-nil error returned from f will halt the iteration. |
| 12441 |
// The provided context supersedes any context provided to the Context method. |
| 12442 |
func (c *BiddersFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error { |
| 12443 |
c.ctx_ = ctx |
| 12444 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 12445 |
for { |
| 12446 |
x, err := c.Do() |
| 12447 |
if err != nil { |
| 12448 |
return err |
| 12449 |
} |
| 12450 |
if err := f(x); err != nil { |
| 12451 |
return err |
| 12452 |
} |
| 12453 |
if x.NextPageToken == "" { |
| 12454 |
return nil |
| 12455 |
} |
| 12456 |
c.PageToken(x.NextPageToken) |
| 12457 |
} |
| 12458 |
} |
| 12459 |
|
| 12460 |
type BiddersFilterSetsFilteredBidsListCall struct { |
| 12461 |
s *Service |
| 12462 |
filterSetName string |
| 12463 |
urlParams_ gensupport.URLParams |
| 12464 |
ifNoneMatch_ string |
| 12465 |
ctx_ context.Context |
| 12466 |
header_ http.Header |
| 12467 |
} |
| 12468 |
|
| 12469 |
// List: List all reasons for which bids were filtered, with the number of bids |
| 12470 |
// filtered for each reason. |
| 12471 |
// |
| 12472 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12473 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12474 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12475 |
// the buyer account representing bidder 123: |
| 12476 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12477 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12478 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12479 |
func (r *BiddersFilterSetsFilteredBidsService) List(filterSetName string) *BiddersFilterSetsFilteredBidsListCall { |
| 12480 |
c := &BiddersFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12481 |
c.filterSetName = filterSetName |
| 12482 |
return c |
| 12483 |
} |
| 12484 |
|
| 12485 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12486 |
// server may return fewer results than requested. If unspecified, the server |
| 12487 |
// will pick an appropriate default. |
| 12488 |
func (c *BiddersFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsListCall { |
| 12489 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12490 |
return c |
| 12491 |
} |
| 12492 |
|
| 12493 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12494 |
// page of results the server should return. Typically, this is the value of |
| 12495 |
// ListFilteredBidsResponse.nextPageToken returned from the previous call to |
| 12496 |
// the filteredBids.list method. |
| 12497 |
func (c *BiddersFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsListCall { |
| 12498 |
c.urlParams_.Set("pageToken", pageToken) |
| 12499 |
return c |
| 12500 |
} |
| 12501 |
|
| 12502 |
// Fields allows partial responses to be retrieved. See |
| 12503 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12504 |
// details. |
| 12505 |
func (c *BiddersFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsListCall { |
| 12506 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12507 |
return c |
| 12508 |
} |
| 12509 |
|
| 12510 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12511 |
// object's ETag matches the given value. This is useful for getting updates |
| 12512 |
// only after the object has changed since the last request. |
| 12513 |
func (c *BiddersFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsListCall { |
| 12514 |
c.ifNoneMatch_ = entityTag |
| 12515 |
return c |
| 12516 |
} |
| 12517 |
|
| 12518 |
// Context sets the context to be used in this call's Do method. |
| 12519 |
func (c *BiddersFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsListCall { |
| 12520 |
c.ctx_ = ctx |
| 12521 |
return c |
| 12522 |
} |
| 12523 |
|
| 12524 |
// Header returns a http.Header that can be modified by the caller to add |
| 12525 |
// headers to the request. |
| 12526 |
func (c *BiddersFilterSetsFilteredBidsListCall) Header() http.Header { |
| 12527 |
if c.header_ == nil { |
| 12528 |
c.header_ = make(http.Header) |
| 12529 |
} |
| 12530 |
return c.header_ |
| 12531 |
} |
| 12532 |
|
| 12533 |
func (c *BiddersFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 12534 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 12535 |
if c.ifNoneMatch_ != "" { |
| 12536 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 12537 |
} |
| 12538 |
c.urlParams_.Set("alt", alt) |
| 12539 |
c.urlParams_.Set("prettyPrint", "false") |
| 12540 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids") |
| 12541 |
urls += "?" + c.urlParams_.Encode() |
| 12542 |
req, err := http.NewRequest("GET", urls, nil) |
| 12543 |
if err != nil { |
| 12544 |
return nil, err |
| 12545 |
} |
| 12546 |
req.Header = reqHeaders |
| 12547 |
googleapi.Expand(req.URL, map[string]string{ |
| 12548 |
"filterSetName": c.filterSetName, |
| 12549 |
}) |
| 12550 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 12551 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 12552 |
} |
| 12553 |
|
| 12554 |
// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.list" call. |
| 12555 |
// Any non-2xx status code is an error. Response headers are in either |
| 12556 |
// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was |
| 12557 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 12558 |
// googleapi.IsNotModified to check whether the returned error was because |
| 12559 |
// http.StatusNotModified was returned. |
| 12560 |
func (c *BiddersFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) { |
| 12561 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 12562 |
res, err := c.doRequest("json") |
| 12563 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 12564 |
if res.Body != nil { |
| 12565 |
res.Body.Close() |
| 12566 |
} |
| 12567 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 12568 |
Code: res.StatusCode, |
| 12569 |
Header: res.Header, |
| 12570 |
}) |
| 12571 |
} |
| 12572 |
if err != nil { |
| 12573 |
return nil, err |
| 12574 |
} |
| 12575 |
defer googleapi.CloseBody(res) |
| 12576 |
if err := googleapi.CheckResponse(res); err != nil { |
| 12577 |
return nil, gensupport.WrapError(err) |
| 12578 |
} |
| 12579 |
ret := &ListFilteredBidsResponse{ |
| 12580 |
ServerResponse: googleapi.ServerResponse{ |
| 12581 |
Header: res.Header, |
| 12582 |
HTTPStatusCode: res.StatusCode, |
| 12583 |
}, |
| 12584 |
} |
| 12585 |
target := &ret |
| 12586 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 12587 |
if err != nil { |
| 12588 |
return nil, err |
| 12589 |
} |
| 12590 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBids.list", "response", internallog.HTTPResponse(res, b)) |
| 12591 |
return ret, nil |
| 12592 |
} |
| 12593 |
|
| 12594 |
// Pages invokes f for each page of results. |
| 12595 |
// A non-nil error returned from f will halt the iteration. |
| 12596 |
// The provided context supersedes any context provided to the Context method. |
| 12597 |
func (c *BiddersFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error { |
| 12598 |
c.ctx_ = ctx |
| 12599 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 12600 |
for { |
| 12601 |
x, err := c.Do() |
| 12602 |
if err != nil { |
| 12603 |
return err |
| 12604 |
} |
| 12605 |
if err := f(x); err != nil { |
| 12606 |
return err |
| 12607 |
} |
| 12608 |
if x.NextPageToken == "" { |
| 12609 |
return nil |
| 12610 |
} |
| 12611 |
c.PageToken(x.NextPageToken) |
| 12612 |
} |
| 12613 |
} |
| 12614 |
|
| 12615 |
type BiddersFilterSetsFilteredBidsCreativesListCall struct { |
| 12616 |
s *Service |
| 12617 |
filterSetName string |
| 12618 |
creativeStatusId int64 |
| 12619 |
urlParams_ gensupport.URLParams |
| 12620 |
ifNoneMatch_ string |
| 12621 |
ctx_ context.Context |
| 12622 |
header_ http.Header |
| 12623 |
} |
| 12624 |
|
| 12625 |
// List: List all creatives associated with a specific reason for which bids |
| 12626 |
// were filtered, with the number of bids filtered for each creative. |
| 12627 |
// |
| 12628 |
// - creativeStatusId: The ID of the creative status for which to retrieve a |
| 12629 |
// breakdown by creative. See creative-status-codes |
| 12630 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 12631 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12632 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12633 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12634 |
// the buyer account representing bidder 123: |
| 12635 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12636 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12637 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12638 |
func (r *BiddersFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsCreativesListCall { |
| 12639 |
c := &BiddersFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12640 |
c.filterSetName = filterSetName |
| 12641 |
c.creativeStatusId = creativeStatusId |
| 12642 |
return c |
| 12643 |
} |
| 12644 |
|
| 12645 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12646 |
// server may return fewer results than requested. If unspecified, the server |
| 12647 |
// will pick an appropriate default. |
| 12648 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsCreativesListCall { |
| 12649 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12650 |
return c |
| 12651 |
} |
| 12652 |
|
| 12653 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12654 |
// page of results the server should return. Typically, this is the value of |
| 12655 |
// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from |
| 12656 |
// the previous call to the filteredBids.creatives.list method. |
| 12657 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsCreativesListCall { |
| 12658 |
c.urlParams_.Set("pageToken", pageToken) |
| 12659 |
return c |
| 12660 |
} |
| 12661 |
|
| 12662 |
// Fields allows partial responses to be retrieved. See |
| 12663 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12664 |
// details. |
| 12665 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsCreativesListCall { |
| 12666 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12667 |
return c |
| 12668 |
} |
| 12669 |
|
| 12670 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12671 |
// object's ETag matches the given value. This is useful for getting updates |
| 12672 |
// only after the object has changed since the last request. |
| 12673 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsCreativesListCall { |
| 12674 |
c.ifNoneMatch_ = entityTag |
| 12675 |
return c |
| 12676 |
} |
| 12677 |
|
| 12678 |
// Context sets the context to be used in this call's Do method. |
| 12679 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsCreativesListCall { |
| 12680 |
c.ctx_ = ctx |
| 12681 |
return c |
| 12682 |
} |
| 12683 |
|
| 12684 |
// Header returns a http.Header that can be modified by the caller to add |
| 12685 |
// headers to the request. |
| 12686 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Header() http.Header { |
| 12687 |
if c.header_ == nil { |
| 12688 |
c.header_ = make(http.Header) |
| 12689 |
} |
| 12690 |
return c.header_ |
| 12691 |
} |
| 12692 |
|
| 12693 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) { |
| 12694 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 12695 |
if c.ifNoneMatch_ != "" { |
| 12696 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 12697 |
} |
| 12698 |
c.urlParams_.Set("alt", alt) |
| 12699 |
c.urlParams_.Set("prettyPrint", "false") |
| 12700 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives") |
| 12701 |
urls += "?" + c.urlParams_.Encode() |
| 12702 |
req, err := http.NewRequest("GET", urls, nil) |
| 12703 |
if err != nil { |
| 12704 |
return nil, err |
| 12705 |
} |
| 12706 |
req.Header = reqHeaders |
| 12707 |
googleapi.Expand(req.URL, map[string]string{ |
| 12708 |
"filterSetName": c.filterSetName, |
| 12709 |
"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), |
| 12710 |
}) |
| 12711 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list", "request", internallog.HTTPRequest(req, nil)) |
| 12712 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 12713 |
} |
| 12714 |
|
| 12715 |
// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list" call. |
| 12716 |
// Any non-2xx status code is an error. Response headers are in either |
| 12717 |
// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header or (if |
| 12718 |
// a response was returned at all) in error.(*googleapi.Error).Header. Use |
| 12719 |
// googleapi.IsNotModified to check whether the returned error was because |
| 12720 |
// http.StatusNotModified was returned. |
| 12721 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) { |
| 12722 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 12723 |
res, err := c.doRequest("json") |
| 12724 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 12725 |
if res.Body != nil { |
| 12726 |
res.Body.Close() |
| 12727 |
} |
| 12728 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 12729 |
Code: res.StatusCode, |
| 12730 |
Header: res.Header, |
| 12731 |
}) |
| 12732 |
} |
| 12733 |
if err != nil { |
| 12734 |
return nil, err |
| 12735 |
} |
| 12736 |
defer googleapi.CloseBody(res) |
| 12737 |
if err := googleapi.CheckResponse(res); err != nil { |
| 12738 |
return nil, gensupport.WrapError(err) |
| 12739 |
} |
| 12740 |
ret := &ListCreativeStatusBreakdownByCreativeResponse{ |
| 12741 |
ServerResponse: googleapi.ServerResponse{ |
| 12742 |
Header: res.Header, |
| 12743 |
HTTPStatusCode: res.StatusCode, |
| 12744 |
}, |
| 12745 |
} |
| 12746 |
target := &ret |
| 12747 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 12748 |
if err != nil { |
| 12749 |
return nil, err |
| 12750 |
} |
| 12751 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list", "response", internallog.HTTPResponse(res, b)) |
| 12752 |
return ret, nil |
| 12753 |
} |
| 12754 |
|
| 12755 |
// Pages invokes f for each page of results. |
| 12756 |
// A non-nil error returned from f will halt the iteration. |
| 12757 |
// The provided context supersedes any context provided to the Context method. |
| 12758 |
func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error { |
| 12759 |
c.ctx_ = ctx |
| 12760 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 12761 |
for { |
| 12762 |
x, err := c.Do() |
| 12763 |
if err != nil { |
| 12764 |
return err |
| 12765 |
} |
| 12766 |
if err := f(x); err != nil { |
| 12767 |
return err |
| 12768 |
} |
| 12769 |
if x.NextPageToken == "" { |
| 12770 |
return nil |
| 12771 |
} |
| 12772 |
c.PageToken(x.NextPageToken) |
| 12773 |
} |
| 12774 |
} |
| 12775 |
|
| 12776 |
type BiddersFilterSetsFilteredBidsDetailsListCall struct { |
| 12777 |
s *Service |
| 12778 |
filterSetName string |
| 12779 |
creativeStatusId int64 |
| 12780 |
urlParams_ gensupport.URLParams |
| 12781 |
ifNoneMatch_ string |
| 12782 |
ctx_ context.Context |
| 12783 |
header_ http.Header |
| 12784 |
} |
| 12785 |
|
| 12786 |
// List: List all details associated with a specific reason for which bids were |
| 12787 |
// filtered, with the number of bids filtered for each detail. |
| 12788 |
// |
| 12789 |
// - creativeStatusId: The ID of the creative status for which to retrieve a |
| 12790 |
// breakdown by detail. See creative-status-codes |
| 12791 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 12792 |
// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and |
| 12793 |
// 87. |
| 12794 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12795 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12796 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12797 |
// the buyer account representing bidder 123: |
| 12798 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12799 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12800 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12801 |
func (r *BiddersFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsDetailsListCall { |
| 12802 |
c := &BiddersFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12803 |
c.filterSetName = filterSetName |
| 12804 |
c.creativeStatusId = creativeStatusId |
| 12805 |
return c |
| 12806 |
} |
| 12807 |
|
| 12808 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12809 |
// server may return fewer results than requested. If unspecified, the server |
| 12810 |
// will pick an appropriate default. |
| 12811 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsDetailsListCall { |
| 12812 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12813 |
return c |
| 12814 |
} |
| 12815 |
|
| 12816 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12817 |
// page of results the server should return. Typically, this is the value of |
| 12818 |
// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the |
| 12819 |
// previous call to the filteredBids.details.list method. |
| 12820 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsDetailsListCall { |
| 12821 |
c.urlParams_.Set("pageToken", pageToken) |
| 12822 |
return c |
| 12823 |
} |
| 12824 |
|
| 12825 |
// Fields allows partial responses to be retrieved. See |
| 12826 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12827 |
// details. |
| 12828 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsDetailsListCall { |
| 12829 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12830 |
return c |
| 12831 |
} |
| 12832 |
|
| 12833 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12834 |
// object's ETag matches the given value. This is useful for getting updates |
| 12835 |
// only after the object has changed since the last request. |
| 12836 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsDetailsListCall { |
| 12837 |
c.ifNoneMatch_ = entityTag |
| 12838 |
return c |
| 12839 |
} |
| 12840 |
|
| 12841 |
// Context sets the context to be used in this call's Do method. |
| 12842 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsDetailsListCall { |
| 12843 |
c.ctx_ = ctx |
| 12844 |
return c |
| 12845 |
} |
| 12846 |
|
| 12847 |
// Header returns a http.Header that can be modified by the caller to add |
| 12848 |
// headers to the request. |
| 12849 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Header() http.Header { |
| 12850 |
if c.header_ == nil { |
| 12851 |
c.header_ = make(http.Header) |
| 12852 |
} |
| 12853 |
return c.header_ |
| 12854 |
} |
| 12855 |
|
| 12856 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) { |
| 12857 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 12858 |
if c.ifNoneMatch_ != "" { |
| 12859 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 12860 |
} |
| 12861 |
c.urlParams_.Set("alt", alt) |
| 12862 |
c.urlParams_.Set("prettyPrint", "false") |
| 12863 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details") |
| 12864 |
urls += "?" + c.urlParams_.Encode() |
| 12865 |
req, err := http.NewRequest("GET", urls, nil) |
| 12866 |
if err != nil { |
| 12867 |
return nil, err |
| 12868 |
} |
| 12869 |
req.Header = reqHeaders |
| 12870 |
googleapi.Expand(req.URL, map[string]string{ |
| 12871 |
"filterSetName": c.filterSetName, |
| 12872 |
"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), |
| 12873 |
}) |
| 12874 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBids.details.list", "request", internallog.HTTPRequest(req, nil)) |
| 12875 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 12876 |
} |
| 12877 |
|
| 12878 |
// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.details.list" call. |
| 12879 |
// Any non-2xx status code is an error. Response headers are in either |
| 12880 |
// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or (if a |
| 12881 |
// response was returned at all) in error.(*googleapi.Error).Header. Use |
| 12882 |
// googleapi.IsNotModified to check whether the returned error was because |
| 12883 |
// http.StatusNotModified was returned. |
| 12884 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) { |
| 12885 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 12886 |
res, err := c.doRequest("json") |
| 12887 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 12888 |
if res.Body != nil { |
| 12889 |
res.Body.Close() |
| 12890 |
} |
| 12891 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 12892 |
Code: res.StatusCode, |
| 12893 |
Header: res.Header, |
| 12894 |
}) |
| 12895 |
} |
| 12896 |
if err != nil { |
| 12897 |
return nil, err |
| 12898 |
} |
| 12899 |
defer googleapi.CloseBody(res) |
| 12900 |
if err := googleapi.CheckResponse(res); err != nil { |
| 12901 |
return nil, gensupport.WrapError(err) |
| 12902 |
} |
| 12903 |
ret := &ListCreativeStatusBreakdownByDetailResponse{ |
| 12904 |
ServerResponse: googleapi.ServerResponse{ |
| 12905 |
Header: res.Header, |
| 12906 |
HTTPStatusCode: res.StatusCode, |
| 12907 |
}, |
| 12908 |
} |
| 12909 |
target := &ret |
| 12910 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 12911 |
if err != nil { |
| 12912 |
return nil, err |
| 12913 |
} |
| 12914 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.filteredBids.details.list", "response", internallog.HTTPResponse(res, b)) |
| 12915 |
return ret, nil |
| 12916 |
} |
| 12917 |
|
| 12918 |
// Pages invokes f for each page of results. |
| 12919 |
// A non-nil error returned from f will halt the iteration. |
| 12920 |
// The provided context supersedes any context provided to the Context method. |
| 12921 |
func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error { |
| 12922 |
c.ctx_ = ctx |
| 12923 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 12924 |
for { |
| 12925 |
x, err := c.Do() |
| 12926 |
if err != nil { |
| 12927 |
return err |
| 12928 |
} |
| 12929 |
if err := f(x); err != nil { |
| 12930 |
return err |
| 12931 |
} |
| 12932 |
if x.NextPageToken == "" { |
| 12933 |
return nil |
| 12934 |
} |
| 12935 |
c.PageToken(x.NextPageToken) |
| 12936 |
} |
| 12937 |
} |
| 12938 |
|
| 12939 |
type BiddersFilterSetsImpressionMetricsListCall struct { |
| 12940 |
s *Service |
| 12941 |
filterSetName string |
| 12942 |
urlParams_ gensupport.URLParams |
| 12943 |
ifNoneMatch_ string |
| 12944 |
ctx_ context.Context |
| 12945 |
header_ http.Header |
| 12946 |
} |
| 12947 |
|
| 12948 |
// List: Lists all metrics that are measured in terms of number of impressions. |
| 12949 |
// |
| 12950 |
// - filterSetName: Name of the filter set that should be applied to the |
| 12951 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 12952 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 12953 |
// the buyer account representing bidder 123: |
| 12954 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 12955 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 12956 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 12957 |
func (r *BiddersFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersFilterSetsImpressionMetricsListCall { |
| 12958 |
c := &BiddersFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 12959 |
c.filterSetName = filterSetName |
| 12960 |
return c |
| 12961 |
} |
| 12962 |
|
| 12963 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 12964 |
// server may return fewer results than requested. If unspecified, the server |
| 12965 |
// will pick an appropriate default. |
| 12966 |
func (c *BiddersFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsImpressionMetricsListCall { |
| 12967 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 12968 |
return c |
| 12969 |
} |
| 12970 |
|
| 12971 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 12972 |
// page of results the server should return. Typically, this is the value of |
| 12973 |
// ListImpressionMetricsResponse.nextPageToken returned from the previous call |
| 12974 |
// to the impressionMetrics.list method. |
| 12975 |
func (c *BiddersFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsImpressionMetricsListCall { |
| 12976 |
c.urlParams_.Set("pageToken", pageToken) |
| 12977 |
return c |
| 12978 |
} |
| 12979 |
|
| 12980 |
// Fields allows partial responses to be retrieved. See |
| 12981 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 12982 |
// details. |
| 12983 |
func (c *BiddersFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsImpressionMetricsListCall { |
| 12984 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 12985 |
return c |
| 12986 |
} |
| 12987 |
|
| 12988 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 12989 |
// object's ETag matches the given value. This is useful for getting updates |
| 12990 |
// only after the object has changed since the last request. |
| 12991 |
func (c *BiddersFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsImpressionMetricsListCall { |
| 12992 |
c.ifNoneMatch_ = entityTag |
| 12993 |
return c |
| 12994 |
} |
| 12995 |
|
| 12996 |
// Context sets the context to be used in this call's Do method. |
| 12997 |
func (c *BiddersFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsImpressionMetricsListCall { |
| 12998 |
c.ctx_ = ctx |
| 12999 |
return c |
| 13000 |
} |
| 13001 |
|
| 13002 |
// Header returns a http.Header that can be modified by the caller to add |
| 13003 |
// headers to the request. |
| 13004 |
func (c *BiddersFilterSetsImpressionMetricsListCall) Header() http.Header { |
| 13005 |
if c.header_ == nil { |
| 13006 |
c.header_ = make(http.Header) |
| 13007 |
} |
| 13008 |
return c.header_ |
| 13009 |
} |
| 13010 |
|
| 13011 |
func (c *BiddersFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) { |
| 13012 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13013 |
if c.ifNoneMatch_ != "" { |
| 13014 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 13015 |
} |
| 13016 |
c.urlParams_.Set("alt", alt) |
| 13017 |
c.urlParams_.Set("prettyPrint", "false") |
| 13018 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics") |
| 13019 |
urls += "?" + c.urlParams_.Encode() |
| 13020 |
req, err := http.NewRequest("GET", urls, nil) |
| 13021 |
if err != nil { |
| 13022 |
return nil, err |
| 13023 |
} |
| 13024 |
req.Header = reqHeaders |
| 13025 |
googleapi.Expand(req.URL, map[string]string{ |
| 13026 |
"filterSetName": c.filterSetName, |
| 13027 |
}) |
| 13028 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.impressionMetrics.list", "request", internallog.HTTPRequest(req, nil)) |
| 13029 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13030 |
} |
| 13031 |
|
| 13032 |
// Do executes the "adexchangebuyer2.bidders.filterSets.impressionMetrics.list" call. |
| 13033 |
// Any non-2xx status code is an error. Response headers are in either |
| 13034 |
// *ListImpressionMetricsResponse.ServerResponse.Header or (if a response was |
| 13035 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 13036 |
// googleapi.IsNotModified to check whether the returned error was because |
| 13037 |
// http.StatusNotModified was returned. |
| 13038 |
func (c *BiddersFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) { |
| 13039 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13040 |
res, err := c.doRequest("json") |
| 13041 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13042 |
if res.Body != nil { |
| 13043 |
res.Body.Close() |
| 13044 |
} |
| 13045 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13046 |
Code: res.StatusCode, |
| 13047 |
Header: res.Header, |
| 13048 |
}) |
| 13049 |
} |
| 13050 |
if err != nil { |
| 13051 |
return nil, err |
| 13052 |
} |
| 13053 |
defer googleapi.CloseBody(res) |
| 13054 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13055 |
return nil, gensupport.WrapError(err) |
| 13056 |
} |
| 13057 |
ret := &ListImpressionMetricsResponse{ |
| 13058 |
ServerResponse: googleapi.ServerResponse{ |
| 13059 |
Header: res.Header, |
| 13060 |
HTTPStatusCode: res.StatusCode, |
| 13061 |
}, |
| 13062 |
} |
| 13063 |
target := &ret |
| 13064 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13065 |
if err != nil { |
| 13066 |
return nil, err |
| 13067 |
} |
| 13068 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.impressionMetrics.list", "response", internallog.HTTPResponse(res, b)) |
| 13069 |
return ret, nil |
| 13070 |
} |
| 13071 |
|
| 13072 |
// Pages invokes f for each page of results. |
| 13073 |
// A non-nil error returned from f will halt the iteration. |
| 13074 |
// The provided context supersedes any context provided to the Context method. |
| 13075 |
func (c *BiddersFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error { |
| 13076 |
c.ctx_ = ctx |
| 13077 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 13078 |
for { |
| 13079 |
x, err := c.Do() |
| 13080 |
if err != nil { |
| 13081 |
return err |
| 13082 |
} |
| 13083 |
if err := f(x); err != nil { |
| 13084 |
return err |
| 13085 |
} |
| 13086 |
if x.NextPageToken == "" { |
| 13087 |
return nil |
| 13088 |
} |
| 13089 |
c.PageToken(x.NextPageToken) |
| 13090 |
} |
| 13091 |
} |
| 13092 |
|
| 13093 |
type BiddersFilterSetsLosingBidsListCall struct { |
| 13094 |
s *Service |
| 13095 |
filterSetName string |
| 13096 |
urlParams_ gensupport.URLParams |
| 13097 |
ifNoneMatch_ string |
| 13098 |
ctx_ context.Context |
| 13099 |
header_ http.Header |
| 13100 |
} |
| 13101 |
|
| 13102 |
// List: List all reasons for which bids lost in the auction, with the number |
| 13103 |
// of bids that lost for each reason. |
| 13104 |
// |
| 13105 |
// - filterSetName: Name of the filter set that should be applied to the |
| 13106 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 13107 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 13108 |
// the buyer account representing bidder 123: |
| 13109 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 13110 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 13111 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 13112 |
func (r *BiddersFilterSetsLosingBidsService) List(filterSetName string) *BiddersFilterSetsLosingBidsListCall { |
| 13113 |
c := &BiddersFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13114 |
c.filterSetName = filterSetName |
| 13115 |
return c |
| 13116 |
} |
| 13117 |
|
| 13118 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 13119 |
// server may return fewer results than requested. If unspecified, the server |
| 13120 |
// will pick an appropriate default. |
| 13121 |
func (c *BiddersFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsLosingBidsListCall { |
| 13122 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 13123 |
return c |
| 13124 |
} |
| 13125 |
|
| 13126 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 13127 |
// page of results the server should return. Typically, this is the value of |
| 13128 |
// ListLosingBidsResponse.nextPageToken returned from the previous call to the |
| 13129 |
// losingBids.list method. |
| 13130 |
func (c *BiddersFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersFilterSetsLosingBidsListCall { |
| 13131 |
c.urlParams_.Set("pageToken", pageToken) |
| 13132 |
return c |
| 13133 |
} |
| 13134 |
|
| 13135 |
// Fields allows partial responses to be retrieved. See |
| 13136 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13137 |
// details. |
| 13138 |
func (c *BiddersFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsLosingBidsListCall { |
| 13139 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13140 |
return c |
| 13141 |
} |
| 13142 |
|
| 13143 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 13144 |
// object's ETag matches the given value. This is useful for getting updates |
| 13145 |
// only after the object has changed since the last request. |
| 13146 |
func (c *BiddersFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsLosingBidsListCall { |
| 13147 |
c.ifNoneMatch_ = entityTag |
| 13148 |
return c |
| 13149 |
} |
| 13150 |
|
| 13151 |
// Context sets the context to be used in this call's Do method. |
| 13152 |
func (c *BiddersFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersFilterSetsLosingBidsListCall { |
| 13153 |
c.ctx_ = ctx |
| 13154 |
return c |
| 13155 |
} |
| 13156 |
|
| 13157 |
// Header returns a http.Header that can be modified by the caller to add |
| 13158 |
// headers to the request. |
| 13159 |
func (c *BiddersFilterSetsLosingBidsListCall) Header() http.Header { |
| 13160 |
if c.header_ == nil { |
| 13161 |
c.header_ = make(http.Header) |
| 13162 |
} |
| 13163 |
return c.header_ |
| 13164 |
} |
| 13165 |
|
| 13166 |
func (c *BiddersFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 13167 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13168 |
if c.ifNoneMatch_ != "" { |
| 13169 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 13170 |
} |
| 13171 |
c.urlParams_.Set("alt", alt) |
| 13172 |
c.urlParams_.Set("prettyPrint", "false") |
| 13173 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids") |
| 13174 |
urls += "?" + c.urlParams_.Encode() |
| 13175 |
req, err := http.NewRequest("GET", urls, nil) |
| 13176 |
if err != nil { |
| 13177 |
return nil, err |
| 13178 |
} |
| 13179 |
req.Header = reqHeaders |
| 13180 |
googleapi.Expand(req.URL, map[string]string{ |
| 13181 |
"filterSetName": c.filterSetName, |
| 13182 |
}) |
| 13183 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.losingBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 13184 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13185 |
} |
| 13186 |
|
| 13187 |
// Do executes the "adexchangebuyer2.bidders.filterSets.losingBids.list" call. |
| 13188 |
// Any non-2xx status code is an error. Response headers are in either |
| 13189 |
// *ListLosingBidsResponse.ServerResponse.Header or (if a response was returned |
| 13190 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 13191 |
// check whether the returned error was because http.StatusNotModified was |
| 13192 |
// returned. |
| 13193 |
func (c *BiddersFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) { |
| 13194 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13195 |
res, err := c.doRequest("json") |
| 13196 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13197 |
if res.Body != nil { |
| 13198 |
res.Body.Close() |
| 13199 |
} |
| 13200 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13201 |
Code: res.StatusCode, |
| 13202 |
Header: res.Header, |
| 13203 |
}) |
| 13204 |
} |
| 13205 |
if err != nil { |
| 13206 |
return nil, err |
| 13207 |
} |
| 13208 |
defer googleapi.CloseBody(res) |
| 13209 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13210 |
return nil, gensupport.WrapError(err) |
| 13211 |
} |
| 13212 |
ret := &ListLosingBidsResponse{ |
| 13213 |
ServerResponse: googleapi.ServerResponse{ |
| 13214 |
Header: res.Header, |
| 13215 |
HTTPStatusCode: res.StatusCode, |
| 13216 |
}, |
| 13217 |
} |
| 13218 |
target := &ret |
| 13219 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13220 |
if err != nil { |
| 13221 |
return nil, err |
| 13222 |
} |
| 13223 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.losingBids.list", "response", internallog.HTTPResponse(res, b)) |
| 13224 |
return ret, nil |
| 13225 |
} |
| 13226 |
|
| 13227 |
// Pages invokes f for each page of results. |
| 13228 |
// A non-nil error returned from f will halt the iteration. |
| 13229 |
// The provided context supersedes any context provided to the Context method. |
| 13230 |
func (c *BiddersFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error { |
| 13231 |
c.ctx_ = ctx |
| 13232 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 13233 |
for { |
| 13234 |
x, err := c.Do() |
| 13235 |
if err != nil { |
| 13236 |
return err |
| 13237 |
} |
| 13238 |
if err := f(x); err != nil { |
| 13239 |
return err |
| 13240 |
} |
| 13241 |
if x.NextPageToken == "" { |
| 13242 |
return nil |
| 13243 |
} |
| 13244 |
c.PageToken(x.NextPageToken) |
| 13245 |
} |
| 13246 |
} |
| 13247 |
|
| 13248 |
type BiddersFilterSetsNonBillableWinningBidsListCall struct { |
| 13249 |
s *Service |
| 13250 |
filterSetName string |
| 13251 |
urlParams_ gensupport.URLParams |
| 13252 |
ifNoneMatch_ string |
| 13253 |
ctx_ context.Context |
| 13254 |
header_ http.Header |
| 13255 |
} |
| 13256 |
|
| 13257 |
// List: List all reasons for which winning bids were not billable, with the |
| 13258 |
// number of bids not billed for each reason. |
| 13259 |
// |
| 13260 |
// - filterSetName: Name of the filter set that should be applied to the |
| 13261 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 13262 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 13263 |
// the buyer account representing bidder 123: |
| 13264 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 13265 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 13266 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 13267 |
func (r *BiddersFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersFilterSetsNonBillableWinningBidsListCall { |
| 13268 |
c := &BiddersFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13269 |
c.filterSetName = filterSetName |
| 13270 |
return c |
| 13271 |
} |
| 13272 |
|
| 13273 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 13274 |
// server may return fewer results than requested. If unspecified, the server |
| 13275 |
// will pick an appropriate default. |
| 13276 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsNonBillableWinningBidsListCall { |
| 13277 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 13278 |
return c |
| 13279 |
} |
| 13280 |
|
| 13281 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 13282 |
// page of results the server should return. Typically, this is the value of |
| 13283 |
// ListNonBillableWinningBidsResponse.nextPageToken returned from the previous |
| 13284 |
// call to the nonBillableWinningBids.list method. |
| 13285 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersFilterSetsNonBillableWinningBidsListCall { |
| 13286 |
c.urlParams_.Set("pageToken", pageToken) |
| 13287 |
return c |
| 13288 |
} |
| 13289 |
|
| 13290 |
// Fields allows partial responses to be retrieved. See |
| 13291 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13292 |
// details. |
| 13293 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsNonBillableWinningBidsListCall { |
| 13294 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13295 |
return c |
| 13296 |
} |
| 13297 |
|
| 13298 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 13299 |
// object's ETag matches the given value. This is useful for getting updates |
| 13300 |
// only after the object has changed since the last request. |
| 13301 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsNonBillableWinningBidsListCall { |
| 13302 |
c.ifNoneMatch_ = entityTag |
| 13303 |
return c |
| 13304 |
} |
| 13305 |
|
| 13306 |
// Context sets the context to be used in this call's Do method. |
| 13307 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersFilterSetsNonBillableWinningBidsListCall { |
| 13308 |
c.ctx_ = ctx |
| 13309 |
return c |
| 13310 |
} |
| 13311 |
|
| 13312 |
// Header returns a http.Header that can be modified by the caller to add |
| 13313 |
// headers to the request. |
| 13314 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Header() http.Header { |
| 13315 |
if c.header_ == nil { |
| 13316 |
c.header_ = make(http.Header) |
| 13317 |
} |
| 13318 |
return c.header_ |
| 13319 |
} |
| 13320 |
|
| 13321 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 13322 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13323 |
if c.ifNoneMatch_ != "" { |
| 13324 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 13325 |
} |
| 13326 |
c.urlParams_.Set("alt", alt) |
| 13327 |
c.urlParams_.Set("prettyPrint", "false") |
| 13328 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids") |
| 13329 |
urls += "?" + c.urlParams_.Encode() |
| 13330 |
req, err := http.NewRequest("GET", urls, nil) |
| 13331 |
if err != nil { |
| 13332 |
return nil, err |
| 13333 |
} |
| 13334 |
req.Header = reqHeaders |
| 13335 |
googleapi.Expand(req.URL, map[string]string{ |
| 13336 |
"filterSetName": c.filterSetName, |
| 13337 |
}) |
| 13338 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 13339 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13340 |
} |
| 13341 |
|
| 13342 |
// Do executes the "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list" call. |
| 13343 |
// Any non-2xx status code is an error. Response headers are in either |
| 13344 |
// *ListNonBillableWinningBidsResponse.ServerResponse.Header or (if a response |
| 13345 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 13346 |
// googleapi.IsNotModified to check whether the returned error was because |
| 13347 |
// http.StatusNotModified was returned. |
| 13348 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) { |
| 13349 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13350 |
res, err := c.doRequest("json") |
| 13351 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13352 |
if res.Body != nil { |
| 13353 |
res.Body.Close() |
| 13354 |
} |
| 13355 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13356 |
Code: res.StatusCode, |
| 13357 |
Header: res.Header, |
| 13358 |
}) |
| 13359 |
} |
| 13360 |
if err != nil { |
| 13361 |
return nil, err |
| 13362 |
} |
| 13363 |
defer googleapi.CloseBody(res) |
| 13364 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13365 |
return nil, gensupport.WrapError(err) |
| 13366 |
} |
| 13367 |
ret := &ListNonBillableWinningBidsResponse{ |
| 13368 |
ServerResponse: googleapi.ServerResponse{ |
| 13369 |
Header: res.Header, |
| 13370 |
HTTPStatusCode: res.StatusCode, |
| 13371 |
}, |
| 13372 |
} |
| 13373 |
target := &ret |
| 13374 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13375 |
if err != nil { |
| 13376 |
return nil, err |
| 13377 |
} |
| 13378 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list", "response", internallog.HTTPResponse(res, b)) |
| 13379 |
return ret, nil |
| 13380 |
} |
| 13381 |
|
| 13382 |
// Pages invokes f for each page of results. |
| 13383 |
// A non-nil error returned from f will halt the iteration. |
| 13384 |
// The provided context supersedes any context provided to the Context method. |
| 13385 |
func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error { |
| 13386 |
c.ctx_ = ctx |
| 13387 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 13388 |
for { |
| 13389 |
x, err := c.Do() |
| 13390 |
if err != nil { |
| 13391 |
return err |
| 13392 |
} |
| 13393 |
if err := f(x); err != nil { |
| 13394 |
return err |
| 13395 |
} |
| 13396 |
if x.NextPageToken == "" { |
| 13397 |
return nil |
| 13398 |
} |
| 13399 |
c.PageToken(x.NextPageToken) |
| 13400 |
} |
| 13401 |
} |
| 13402 |
|
| 13403 |
type BuyersFilterSetsCreateCall struct { |
| 13404 |
s *Service |
| 13405 |
ownerName string |
| 13406 |
filterset *FilterSet |
| 13407 |
urlParams_ gensupport.URLParams |
| 13408 |
ctx_ context.Context |
| 13409 |
header_ http.Header |
| 13410 |
} |
| 13411 |
|
| 13412 |
// Create: Creates the specified filter set for the account with the given |
| 13413 |
// account ID. |
| 13414 |
// |
| 13415 |
// - ownerName: Name of the owner (bidder or account) of the filter set to be |
| 13416 |
// created. For example: - For a bidder-level filter set for bidder 123: |
| 13417 |
// `bidders/123` - For an account-level filter set for the buyer account |
| 13418 |
// representing bidder 123: `bidders/123/accounts/123` - For an account-level |
| 13419 |
// filter set for the child seat buyer account 456 whose bidder is 123: |
| 13420 |
// `bidders/123/accounts/456`. |
| 13421 |
func (r *BuyersFilterSetsService) Create(ownerName string, filterset *FilterSet) *BuyersFilterSetsCreateCall { |
| 13422 |
c := &BuyersFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13423 |
c.ownerName = ownerName |
| 13424 |
c.filterset = filterset |
| 13425 |
return c |
| 13426 |
} |
| 13427 |
|
| 13428 |
// IsTransient sets the optional parameter "isTransient": Whether the filter |
| 13429 |
// set is transient, or should be persisted indefinitely. By default, filter |
| 13430 |
// sets are not transient. If transient, it will be available for at least 1 |
| 13431 |
// hour after creation. |
| 13432 |
func (c *BuyersFilterSetsCreateCall) IsTransient(isTransient bool) *BuyersFilterSetsCreateCall { |
| 13433 |
c.urlParams_.Set("isTransient", fmt.Sprint(isTransient)) |
| 13434 |
return c |
| 13435 |
} |
| 13436 |
|
| 13437 |
// Fields allows partial responses to be retrieved. See |
| 13438 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13439 |
// details. |
| 13440 |
func (c *BuyersFilterSetsCreateCall) Fields(s ...googleapi.Field) *BuyersFilterSetsCreateCall { |
| 13441 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13442 |
return c |
| 13443 |
} |
| 13444 |
|
| 13445 |
// Context sets the context to be used in this call's Do method. |
| 13446 |
func (c *BuyersFilterSetsCreateCall) Context(ctx context.Context) *BuyersFilterSetsCreateCall { |
| 13447 |
c.ctx_ = ctx |
| 13448 |
return c |
| 13449 |
} |
| 13450 |
|
| 13451 |
// Header returns a http.Header that can be modified by the caller to add |
| 13452 |
// headers to the request. |
| 13453 |
func (c *BuyersFilterSetsCreateCall) Header() http.Header { |
| 13454 |
if c.header_ == nil { |
| 13455 |
c.header_ = make(http.Header) |
| 13456 |
} |
| 13457 |
return c.header_ |
| 13458 |
} |
| 13459 |
|
| 13460 |
func (c *BuyersFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) { |
| 13461 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) |
| 13462 |
body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.filterset) |
| 13463 |
if err != nil { |
| 13464 |
return nil, err |
| 13465 |
} |
| 13466 |
c.urlParams_.Set("alt", alt) |
| 13467 |
c.urlParams_.Set("prettyPrint", "false") |
| 13468 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") |
| 13469 |
urls += "?" + c.urlParams_.Encode() |
| 13470 |
req, err := http.NewRequest("POST", urls, body) |
| 13471 |
if err != nil { |
| 13472 |
return nil, err |
| 13473 |
} |
| 13474 |
req.Header = reqHeaders |
| 13475 |
googleapi.Expand(req.URL, map[string]string{ |
| 13476 |
"ownerName": c.ownerName, |
| 13477 |
}) |
| 13478 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.create", "request", internallog.HTTPRequest(req, body.Bytes())) |
| 13479 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13480 |
} |
| 13481 |
|
| 13482 |
// Do executes the "adexchangebuyer2.buyers.filterSets.create" call. |
| 13483 |
// Any non-2xx status code is an error. Response headers are in either |
| 13484 |
// *FilterSet.ServerResponse.Header or (if a response was returned at all) in |
| 13485 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 13486 |
// whether the returned error was because http.StatusNotModified was returned. |
| 13487 |
func (c *BuyersFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { |
| 13488 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13489 |
res, err := c.doRequest("json") |
| 13490 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13491 |
if res.Body != nil { |
| 13492 |
res.Body.Close() |
| 13493 |
} |
| 13494 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13495 |
Code: res.StatusCode, |
| 13496 |
Header: res.Header, |
| 13497 |
}) |
| 13498 |
} |
| 13499 |
if err != nil { |
| 13500 |
return nil, err |
| 13501 |
} |
| 13502 |
defer googleapi.CloseBody(res) |
| 13503 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13504 |
return nil, gensupport.WrapError(err) |
| 13505 |
} |
| 13506 |
ret := &FilterSet{ |
| 13507 |
ServerResponse: googleapi.ServerResponse{ |
| 13508 |
Header: res.Header, |
| 13509 |
HTTPStatusCode: res.StatusCode, |
| 13510 |
}, |
| 13511 |
} |
| 13512 |
target := &ret |
| 13513 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13514 |
if err != nil { |
| 13515 |
return nil, err |
| 13516 |
} |
| 13517 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.create", "response", internallog.HTTPResponse(res, b)) |
| 13518 |
return ret, nil |
| 13519 |
} |
| 13520 |
|
| 13521 |
type BuyersFilterSetsDeleteCall struct { |
| 13522 |
s *Service |
| 13523 |
name string |
| 13524 |
urlParams_ gensupport.URLParams |
| 13525 |
ctx_ context.Context |
| 13526 |
header_ http.Header |
| 13527 |
} |
| 13528 |
|
| 13529 |
// Delete: Deletes the requested filter set from the account with the given |
| 13530 |
// account ID. |
| 13531 |
// |
| 13532 |
// - name: Full name of the resource to delete. For example: - For a |
| 13533 |
// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For |
| 13534 |
// an account-level filter set for the buyer account representing bidder 123: |
| 13535 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 13536 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 13537 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 13538 |
func (r *BuyersFilterSetsService) Delete(name string) *BuyersFilterSetsDeleteCall { |
| 13539 |
c := &BuyersFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13540 |
c.name = name |
| 13541 |
return c |
| 13542 |
} |
| 13543 |
|
| 13544 |
// Fields allows partial responses to be retrieved. See |
| 13545 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13546 |
// details. |
| 13547 |
func (c *BuyersFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BuyersFilterSetsDeleteCall { |
| 13548 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13549 |
return c |
| 13550 |
} |
| 13551 |
|
| 13552 |
// Context sets the context to be used in this call's Do method. |
| 13553 |
func (c *BuyersFilterSetsDeleteCall) Context(ctx context.Context) *BuyersFilterSetsDeleteCall { |
| 13554 |
c.ctx_ = ctx |
| 13555 |
return c |
| 13556 |
} |
| 13557 |
|
| 13558 |
// Header returns a http.Header that can be modified by the caller to add |
| 13559 |
// headers to the request. |
| 13560 |
func (c *BuyersFilterSetsDeleteCall) Header() http.Header { |
| 13561 |
if c.header_ == nil { |
| 13562 |
c.header_ = make(http.Header) |
| 13563 |
} |
| 13564 |
return c.header_ |
| 13565 |
} |
| 13566 |
|
| 13567 |
func (c *BuyersFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) { |
| 13568 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13569 |
c.urlParams_.Set("alt", alt) |
| 13570 |
c.urlParams_.Set("prettyPrint", "false") |
| 13571 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") |
| 13572 |
urls += "?" + c.urlParams_.Encode() |
| 13573 |
req, err := http.NewRequest("DELETE", urls, nil) |
| 13574 |
if err != nil { |
| 13575 |
return nil, err |
| 13576 |
} |
| 13577 |
req.Header = reqHeaders |
| 13578 |
googleapi.Expand(req.URL, map[string]string{ |
| 13579 |
"name": c.name, |
| 13580 |
}) |
| 13581 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.delete", "request", internallog.HTTPRequest(req, nil)) |
| 13582 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13583 |
} |
| 13584 |
|
| 13585 |
// Do executes the "adexchangebuyer2.buyers.filterSets.delete" call. |
| 13586 |
// Any non-2xx status code is an error. Response headers are in either |
| 13587 |
// *Empty.ServerResponse.Header or (if a response was returned at all) in |
| 13588 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 13589 |
// whether the returned error was because http.StatusNotModified was returned. |
| 13590 |
func (c *BuyersFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { |
| 13591 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13592 |
res, err := c.doRequest("json") |
| 13593 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13594 |
if res.Body != nil { |
| 13595 |
res.Body.Close() |
| 13596 |
} |
| 13597 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13598 |
Code: res.StatusCode, |
| 13599 |
Header: res.Header, |
| 13600 |
}) |
| 13601 |
} |
| 13602 |
if err != nil { |
| 13603 |
return nil, err |
| 13604 |
} |
| 13605 |
defer googleapi.CloseBody(res) |
| 13606 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13607 |
return nil, gensupport.WrapError(err) |
| 13608 |
} |
| 13609 |
ret := &Empty{ |
| 13610 |
ServerResponse: googleapi.ServerResponse{ |
| 13611 |
Header: res.Header, |
| 13612 |
HTTPStatusCode: res.StatusCode, |
| 13613 |
}, |
| 13614 |
} |
| 13615 |
target := &ret |
| 13616 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13617 |
if err != nil { |
| 13618 |
return nil, err |
| 13619 |
} |
| 13620 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.delete", "response", internallog.HTTPResponse(res, b)) |
| 13621 |
return ret, nil |
| 13622 |
} |
| 13623 |
|
| 13624 |
type BuyersFilterSetsGetCall struct { |
| 13625 |
s *Service |
| 13626 |
name string |
| 13627 |
urlParams_ gensupport.URLParams |
| 13628 |
ifNoneMatch_ string |
| 13629 |
ctx_ context.Context |
| 13630 |
header_ http.Header |
| 13631 |
} |
| 13632 |
|
| 13633 |
// Get: Retrieves the requested filter set for the account with the given |
| 13634 |
// account ID. |
| 13635 |
// |
| 13636 |
// - name: Full name of the resource being requested. For example: - For a |
| 13637 |
// bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For |
| 13638 |
// an account-level filter set for the buyer account representing bidder 123: |
| 13639 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 13640 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 13641 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 13642 |
func (r *BuyersFilterSetsService) Get(name string) *BuyersFilterSetsGetCall { |
| 13643 |
c := &BuyersFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13644 |
c.name = name |
| 13645 |
return c |
| 13646 |
} |
| 13647 |
|
| 13648 |
// Fields allows partial responses to be retrieved. See |
| 13649 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13650 |
// details. |
| 13651 |
func (c *BuyersFilterSetsGetCall) Fields(s ...googleapi.Field) *BuyersFilterSetsGetCall { |
| 13652 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13653 |
return c |
| 13654 |
} |
| 13655 |
|
| 13656 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 13657 |
// object's ETag matches the given value. This is useful for getting updates |
| 13658 |
// only after the object has changed since the last request. |
| 13659 |
func (c *BuyersFilterSetsGetCall) IfNoneMatch(entityTag string) *BuyersFilterSetsGetCall { |
| 13660 |
c.ifNoneMatch_ = entityTag |
| 13661 |
return c |
| 13662 |
} |
| 13663 |
|
| 13664 |
// Context sets the context to be used in this call's Do method. |
| 13665 |
func (c *BuyersFilterSetsGetCall) Context(ctx context.Context) *BuyersFilterSetsGetCall { |
| 13666 |
c.ctx_ = ctx |
| 13667 |
return c |
| 13668 |
} |
| 13669 |
|
| 13670 |
// Header returns a http.Header that can be modified by the caller to add |
| 13671 |
// headers to the request. |
| 13672 |
func (c *BuyersFilterSetsGetCall) Header() http.Header { |
| 13673 |
if c.header_ == nil { |
| 13674 |
c.header_ = make(http.Header) |
| 13675 |
} |
| 13676 |
return c.header_ |
| 13677 |
} |
| 13678 |
|
| 13679 |
func (c *BuyersFilterSetsGetCall) doRequest(alt string) (*http.Response, error) { |
| 13680 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13681 |
if c.ifNoneMatch_ != "" { |
| 13682 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 13683 |
} |
| 13684 |
c.urlParams_.Set("alt", alt) |
| 13685 |
c.urlParams_.Set("prettyPrint", "false") |
| 13686 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}") |
| 13687 |
urls += "?" + c.urlParams_.Encode() |
| 13688 |
req, err := http.NewRequest("GET", urls, nil) |
| 13689 |
if err != nil { |
| 13690 |
return nil, err |
| 13691 |
} |
| 13692 |
req.Header = reqHeaders |
| 13693 |
googleapi.Expand(req.URL, map[string]string{ |
| 13694 |
"name": c.name, |
| 13695 |
}) |
| 13696 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.get", "request", internallog.HTTPRequest(req, nil)) |
| 13697 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13698 |
} |
| 13699 |
|
| 13700 |
// Do executes the "adexchangebuyer2.buyers.filterSets.get" call. |
| 13701 |
// Any non-2xx status code is an error. Response headers are in either |
| 13702 |
// *FilterSet.ServerResponse.Header or (if a response was returned at all) in |
| 13703 |
// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check |
| 13704 |
// whether the returned error was because http.StatusNotModified was returned. |
| 13705 |
func (c *BuyersFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) { |
| 13706 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13707 |
res, err := c.doRequest("json") |
| 13708 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13709 |
if res.Body != nil { |
| 13710 |
res.Body.Close() |
| 13711 |
} |
| 13712 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13713 |
Code: res.StatusCode, |
| 13714 |
Header: res.Header, |
| 13715 |
}) |
| 13716 |
} |
| 13717 |
if err != nil { |
| 13718 |
return nil, err |
| 13719 |
} |
| 13720 |
defer googleapi.CloseBody(res) |
| 13721 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13722 |
return nil, gensupport.WrapError(err) |
| 13723 |
} |
| 13724 |
ret := &FilterSet{ |
| 13725 |
ServerResponse: googleapi.ServerResponse{ |
| 13726 |
Header: res.Header, |
| 13727 |
HTTPStatusCode: res.StatusCode, |
| 13728 |
}, |
| 13729 |
} |
| 13730 |
target := &ret |
| 13731 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13732 |
if err != nil { |
| 13733 |
return nil, err |
| 13734 |
} |
| 13735 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.get", "response", internallog.HTTPResponse(res, b)) |
| 13736 |
return ret, nil |
| 13737 |
} |
| 13738 |
|
| 13739 |
type BuyersFilterSetsListCall struct { |
| 13740 |
s *Service |
| 13741 |
ownerName string |
| 13742 |
urlParams_ gensupport.URLParams |
| 13743 |
ifNoneMatch_ string |
| 13744 |
ctx_ context.Context |
| 13745 |
header_ http.Header |
| 13746 |
} |
| 13747 |
|
| 13748 |
// List: Lists all filter sets for the account with the given account ID. |
| 13749 |
// |
| 13750 |
// - ownerName: Name of the owner (bidder or account) of the filter sets to be |
| 13751 |
// listed. For example: - For a bidder-level filter set for bidder 123: |
| 13752 |
// `bidders/123` - For an account-level filter set for the buyer account |
| 13753 |
// representing bidder 123: `bidders/123/accounts/123` - For an account-level |
| 13754 |
// filter set for the child seat buyer account 456 whose bidder is 123: |
| 13755 |
// `bidders/123/accounts/456`. |
| 13756 |
func (r *BuyersFilterSetsService) List(ownerName string) *BuyersFilterSetsListCall { |
| 13757 |
c := &BuyersFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13758 |
c.ownerName = ownerName |
| 13759 |
return c |
| 13760 |
} |
| 13761 |
|
| 13762 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 13763 |
// server may return fewer results than requested. If unspecified, the server |
| 13764 |
// will pick an appropriate default. |
| 13765 |
func (c *BuyersFilterSetsListCall) PageSize(pageSize int64) *BuyersFilterSetsListCall { |
| 13766 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 13767 |
return c |
| 13768 |
} |
| 13769 |
|
| 13770 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 13771 |
// page of results the server should return. Typically, this is the value of |
| 13772 |
// ListFilterSetsResponse.nextPageToken returned from the previous call to the |
| 13773 |
// accounts.filterSets.list method. |
| 13774 |
func (c *BuyersFilterSetsListCall) PageToken(pageToken string) *BuyersFilterSetsListCall { |
| 13775 |
c.urlParams_.Set("pageToken", pageToken) |
| 13776 |
return c |
| 13777 |
} |
| 13778 |
|
| 13779 |
// Fields allows partial responses to be retrieved. See |
| 13780 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13781 |
// details. |
| 13782 |
func (c *BuyersFilterSetsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsListCall { |
| 13783 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13784 |
return c |
| 13785 |
} |
| 13786 |
|
| 13787 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 13788 |
// object's ETag matches the given value. This is useful for getting updates |
| 13789 |
// only after the object has changed since the last request. |
| 13790 |
func (c *BuyersFilterSetsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsListCall { |
| 13791 |
c.ifNoneMatch_ = entityTag |
| 13792 |
return c |
| 13793 |
} |
| 13794 |
|
| 13795 |
// Context sets the context to be used in this call's Do method. |
| 13796 |
func (c *BuyersFilterSetsListCall) Context(ctx context.Context) *BuyersFilterSetsListCall { |
| 13797 |
c.ctx_ = ctx |
| 13798 |
return c |
| 13799 |
} |
| 13800 |
|
| 13801 |
// Header returns a http.Header that can be modified by the caller to add |
| 13802 |
// headers to the request. |
| 13803 |
func (c *BuyersFilterSetsListCall) Header() http.Header { |
| 13804 |
if c.header_ == nil { |
| 13805 |
c.header_ = make(http.Header) |
| 13806 |
} |
| 13807 |
return c.header_ |
| 13808 |
} |
| 13809 |
|
| 13810 |
func (c *BuyersFilterSetsListCall) doRequest(alt string) (*http.Response, error) { |
| 13811 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13812 |
if c.ifNoneMatch_ != "" { |
| 13813 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 13814 |
} |
| 13815 |
c.urlParams_.Set("alt", alt) |
| 13816 |
c.urlParams_.Set("prettyPrint", "false") |
| 13817 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets") |
| 13818 |
urls += "?" + c.urlParams_.Encode() |
| 13819 |
req, err := http.NewRequest("GET", urls, nil) |
| 13820 |
if err != nil { |
| 13821 |
return nil, err |
| 13822 |
} |
| 13823 |
req.Header = reqHeaders |
| 13824 |
googleapi.Expand(req.URL, map[string]string{ |
| 13825 |
"ownerName": c.ownerName, |
| 13826 |
}) |
| 13827 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.list", "request", internallog.HTTPRequest(req, nil)) |
| 13828 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13829 |
} |
| 13830 |
|
| 13831 |
// Do executes the "adexchangebuyer2.buyers.filterSets.list" call. |
| 13832 |
// Any non-2xx status code is an error. Response headers are in either |
| 13833 |
// *ListFilterSetsResponse.ServerResponse.Header or (if a response was returned |
| 13834 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 13835 |
// check whether the returned error was because http.StatusNotModified was |
| 13836 |
// returned. |
| 13837 |
func (c *BuyersFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) { |
| 13838 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13839 |
res, err := c.doRequest("json") |
| 13840 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13841 |
if res.Body != nil { |
| 13842 |
res.Body.Close() |
| 13843 |
} |
| 13844 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13845 |
Code: res.StatusCode, |
| 13846 |
Header: res.Header, |
| 13847 |
}) |
| 13848 |
} |
| 13849 |
if err != nil { |
| 13850 |
return nil, err |
| 13851 |
} |
| 13852 |
defer googleapi.CloseBody(res) |
| 13853 |
if err := googleapi.CheckResponse(res); err != nil { |
| 13854 |
return nil, gensupport.WrapError(err) |
| 13855 |
} |
| 13856 |
ret := &ListFilterSetsResponse{ |
| 13857 |
ServerResponse: googleapi.ServerResponse{ |
| 13858 |
Header: res.Header, |
| 13859 |
HTTPStatusCode: res.StatusCode, |
| 13860 |
}, |
| 13861 |
} |
| 13862 |
target := &ret |
| 13863 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 13864 |
if err != nil { |
| 13865 |
return nil, err |
| 13866 |
} |
| 13867 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.list", "response", internallog.HTTPResponse(res, b)) |
| 13868 |
return ret, nil |
| 13869 |
} |
| 13870 |
|
| 13871 |
// Pages invokes f for each page of results. |
| 13872 |
// A non-nil error returned from f will halt the iteration. |
| 13873 |
// The provided context supersedes any context provided to the Context method. |
| 13874 |
func (c *BuyersFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error { |
| 13875 |
c.ctx_ = ctx |
| 13876 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 13877 |
for { |
| 13878 |
x, err := c.Do() |
| 13879 |
if err != nil { |
| 13880 |
return err |
| 13881 |
} |
| 13882 |
if err := f(x); err != nil { |
| 13883 |
return err |
| 13884 |
} |
| 13885 |
if x.NextPageToken == "" { |
| 13886 |
return nil |
| 13887 |
} |
| 13888 |
c.PageToken(x.NextPageToken) |
| 13889 |
} |
| 13890 |
} |
| 13891 |
|
| 13892 |
type BuyersFilterSetsBidMetricsListCall struct { |
| 13893 |
s *Service |
| 13894 |
filterSetName string |
| 13895 |
urlParams_ gensupport.URLParams |
| 13896 |
ifNoneMatch_ string |
| 13897 |
ctx_ context.Context |
| 13898 |
header_ http.Header |
| 13899 |
} |
| 13900 |
|
| 13901 |
// List: Lists all metrics that are measured in terms of number of bids. |
| 13902 |
// |
| 13903 |
// - filterSetName: Name of the filter set that should be applied to the |
| 13904 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 13905 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 13906 |
// the buyer account representing bidder 123: |
| 13907 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 13908 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 13909 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 13910 |
func (r *BuyersFilterSetsBidMetricsService) List(filterSetName string) *BuyersFilterSetsBidMetricsListCall { |
| 13911 |
c := &BuyersFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 13912 |
c.filterSetName = filterSetName |
| 13913 |
return c |
| 13914 |
} |
| 13915 |
|
| 13916 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 13917 |
// server may return fewer results than requested. If unspecified, the server |
| 13918 |
// will pick an appropriate default. |
| 13919 |
func (c *BuyersFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BuyersFilterSetsBidMetricsListCall { |
| 13920 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 13921 |
return c |
| 13922 |
} |
| 13923 |
|
| 13924 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 13925 |
// page of results the server should return. Typically, this is the value of |
| 13926 |
// ListBidMetricsResponse.nextPageToken returned from the previous call to the |
| 13927 |
// bidMetrics.list method. |
| 13928 |
func (c *BuyersFilterSetsBidMetricsListCall) PageToken(pageToken string) *BuyersFilterSetsBidMetricsListCall { |
| 13929 |
c.urlParams_.Set("pageToken", pageToken) |
| 13930 |
return c |
| 13931 |
} |
| 13932 |
|
| 13933 |
// Fields allows partial responses to be retrieved. See |
| 13934 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 13935 |
// details. |
| 13936 |
func (c *BuyersFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsBidMetricsListCall { |
| 13937 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 13938 |
return c |
| 13939 |
} |
| 13940 |
|
| 13941 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 13942 |
// object's ETag matches the given value. This is useful for getting updates |
| 13943 |
// only after the object has changed since the last request. |
| 13944 |
func (c *BuyersFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsBidMetricsListCall { |
| 13945 |
c.ifNoneMatch_ = entityTag |
| 13946 |
return c |
| 13947 |
} |
| 13948 |
|
| 13949 |
// Context sets the context to be used in this call's Do method. |
| 13950 |
func (c *BuyersFilterSetsBidMetricsListCall) Context(ctx context.Context) *BuyersFilterSetsBidMetricsListCall { |
| 13951 |
c.ctx_ = ctx |
| 13952 |
return c |
| 13953 |
} |
| 13954 |
|
| 13955 |
// Header returns a http.Header that can be modified by the caller to add |
| 13956 |
// headers to the request. |
| 13957 |
func (c *BuyersFilterSetsBidMetricsListCall) Header() http.Header { |
| 13958 |
if c.header_ == nil { |
| 13959 |
c.header_ = make(http.Header) |
| 13960 |
} |
| 13961 |
return c.header_ |
| 13962 |
} |
| 13963 |
|
| 13964 |
func (c *BuyersFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) { |
| 13965 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 13966 |
if c.ifNoneMatch_ != "" { |
| 13967 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 13968 |
} |
| 13969 |
c.urlParams_.Set("alt", alt) |
| 13970 |
c.urlParams_.Set("prettyPrint", "false") |
| 13971 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics") |
| 13972 |
urls += "?" + c.urlParams_.Encode() |
| 13973 |
req, err := http.NewRequest("GET", urls, nil) |
| 13974 |
if err != nil { |
| 13975 |
return nil, err |
| 13976 |
} |
| 13977 |
req.Header = reqHeaders |
| 13978 |
googleapi.Expand(req.URL, map[string]string{ |
| 13979 |
"filterSetName": c.filterSetName, |
| 13980 |
}) |
| 13981 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.bidMetrics.list", "request", internallog.HTTPRequest(req, nil)) |
| 13982 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 13983 |
} |
| 13984 |
|
| 13985 |
// Do executes the "adexchangebuyer2.buyers.filterSets.bidMetrics.list" call. |
| 13986 |
// Any non-2xx status code is an error. Response headers are in either |
| 13987 |
// *ListBidMetricsResponse.ServerResponse.Header or (if a response was returned |
| 13988 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 13989 |
// check whether the returned error was because http.StatusNotModified was |
| 13990 |
// returned. |
| 13991 |
func (c *BuyersFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) { |
| 13992 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 13993 |
res, err := c.doRequest("json") |
| 13994 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 13995 |
if res.Body != nil { |
| 13996 |
res.Body.Close() |
| 13997 |
} |
| 13998 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 13999 |
Code: res.StatusCode, |
| 14000 |
Header: res.Header, |
| 14001 |
}) |
| 14002 |
} |
| 14003 |
if err != nil { |
| 14004 |
return nil, err |
| 14005 |
} |
| 14006 |
defer googleapi.CloseBody(res) |
| 14007 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14008 |
return nil, gensupport.WrapError(err) |
| 14009 |
} |
| 14010 |
ret := &ListBidMetricsResponse{ |
| 14011 |
ServerResponse: googleapi.ServerResponse{ |
| 14012 |
Header: res.Header, |
| 14013 |
HTTPStatusCode: res.StatusCode, |
| 14014 |
}, |
| 14015 |
} |
| 14016 |
target := &ret |
| 14017 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14018 |
if err != nil { |
| 14019 |
return nil, err |
| 14020 |
} |
| 14021 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.bidMetrics.list", "response", internallog.HTTPResponse(res, b)) |
| 14022 |
return ret, nil |
| 14023 |
} |
| 14024 |
|
| 14025 |
// Pages invokes f for each page of results. |
| 14026 |
// A non-nil error returned from f will halt the iteration. |
| 14027 |
// The provided context supersedes any context provided to the Context method. |
| 14028 |
func (c *BuyersFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error { |
| 14029 |
c.ctx_ = ctx |
| 14030 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14031 |
for { |
| 14032 |
x, err := c.Do() |
| 14033 |
if err != nil { |
| 14034 |
return err |
| 14035 |
} |
| 14036 |
if err := f(x); err != nil { |
| 14037 |
return err |
| 14038 |
} |
| 14039 |
if x.NextPageToken == "" { |
| 14040 |
return nil |
| 14041 |
} |
| 14042 |
c.PageToken(x.NextPageToken) |
| 14043 |
} |
| 14044 |
} |
| 14045 |
|
| 14046 |
type BuyersFilterSetsBidResponseErrorsListCall struct { |
| 14047 |
s *Service |
| 14048 |
filterSetName string |
| 14049 |
urlParams_ gensupport.URLParams |
| 14050 |
ifNoneMatch_ string |
| 14051 |
ctx_ context.Context |
| 14052 |
header_ http.Header |
| 14053 |
} |
| 14054 |
|
| 14055 |
// List: List all errors that occurred in bid responses, with the number of bid |
| 14056 |
// responses affected for each reason. |
| 14057 |
// |
| 14058 |
// - filterSetName: Name of the filter set that should be applied to the |
| 14059 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 14060 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 14061 |
// the buyer account representing bidder 123: |
| 14062 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 14063 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 14064 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 14065 |
func (r *BuyersFilterSetsBidResponseErrorsService) List(filterSetName string) *BuyersFilterSetsBidResponseErrorsListCall { |
| 14066 |
c := &BuyersFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 14067 |
c.filterSetName = filterSetName |
| 14068 |
return c |
| 14069 |
} |
| 14070 |
|
| 14071 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 14072 |
// server may return fewer results than requested. If unspecified, the server |
| 14073 |
// will pick an appropriate default. |
| 14074 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BuyersFilterSetsBidResponseErrorsListCall { |
| 14075 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 14076 |
return c |
| 14077 |
} |
| 14078 |
|
| 14079 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 14080 |
// page of results the server should return. Typically, this is the value of |
| 14081 |
// ListBidResponseErrorsResponse.nextPageToken returned from the previous call |
| 14082 |
// to the bidResponseErrors.list method. |
| 14083 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BuyersFilterSetsBidResponseErrorsListCall { |
| 14084 |
c.urlParams_.Set("pageToken", pageToken) |
| 14085 |
return c |
| 14086 |
} |
| 14087 |
|
| 14088 |
// Fields allows partial responses to be retrieved. See |
| 14089 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 14090 |
// details. |
| 14091 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsBidResponseErrorsListCall { |
| 14092 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 14093 |
return c |
| 14094 |
} |
| 14095 |
|
| 14096 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 14097 |
// object's ETag matches the given value. This is useful for getting updates |
| 14098 |
// only after the object has changed since the last request. |
| 14099 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsBidResponseErrorsListCall { |
| 14100 |
c.ifNoneMatch_ = entityTag |
| 14101 |
return c |
| 14102 |
} |
| 14103 |
|
| 14104 |
// Context sets the context to be used in this call's Do method. |
| 14105 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BuyersFilterSetsBidResponseErrorsListCall { |
| 14106 |
c.ctx_ = ctx |
| 14107 |
return c |
| 14108 |
} |
| 14109 |
|
| 14110 |
// Header returns a http.Header that can be modified by the caller to add |
| 14111 |
// headers to the request. |
| 14112 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) Header() http.Header { |
| 14113 |
if c.header_ == nil { |
| 14114 |
c.header_ = make(http.Header) |
| 14115 |
} |
| 14116 |
return c.header_ |
| 14117 |
} |
| 14118 |
|
| 14119 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) { |
| 14120 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 14121 |
if c.ifNoneMatch_ != "" { |
| 14122 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 14123 |
} |
| 14124 |
c.urlParams_.Set("alt", alt) |
| 14125 |
c.urlParams_.Set("prettyPrint", "false") |
| 14126 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors") |
| 14127 |
urls += "?" + c.urlParams_.Encode() |
| 14128 |
req, err := http.NewRequest("GET", urls, nil) |
| 14129 |
if err != nil { |
| 14130 |
return nil, err |
| 14131 |
} |
| 14132 |
req.Header = reqHeaders |
| 14133 |
googleapi.Expand(req.URL, map[string]string{ |
| 14134 |
"filterSetName": c.filterSetName, |
| 14135 |
}) |
| 14136 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.bidResponseErrors.list", "request", internallog.HTTPRequest(req, nil)) |
| 14137 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 14138 |
} |
| 14139 |
|
| 14140 |
// Do executes the "adexchangebuyer2.buyers.filterSets.bidResponseErrors.list" call. |
| 14141 |
// Any non-2xx status code is an error. Response headers are in either |
| 14142 |
// *ListBidResponseErrorsResponse.ServerResponse.Header or (if a response was |
| 14143 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 14144 |
// googleapi.IsNotModified to check whether the returned error was because |
| 14145 |
// http.StatusNotModified was returned. |
| 14146 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) { |
| 14147 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 14148 |
res, err := c.doRequest("json") |
| 14149 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 14150 |
if res.Body != nil { |
| 14151 |
res.Body.Close() |
| 14152 |
} |
| 14153 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 14154 |
Code: res.StatusCode, |
| 14155 |
Header: res.Header, |
| 14156 |
}) |
| 14157 |
} |
| 14158 |
if err != nil { |
| 14159 |
return nil, err |
| 14160 |
} |
| 14161 |
defer googleapi.CloseBody(res) |
| 14162 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14163 |
return nil, gensupport.WrapError(err) |
| 14164 |
} |
| 14165 |
ret := &ListBidResponseErrorsResponse{ |
| 14166 |
ServerResponse: googleapi.ServerResponse{ |
| 14167 |
Header: res.Header, |
| 14168 |
HTTPStatusCode: res.StatusCode, |
| 14169 |
}, |
| 14170 |
} |
| 14171 |
target := &ret |
| 14172 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14173 |
if err != nil { |
| 14174 |
return nil, err |
| 14175 |
} |
| 14176 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.bidResponseErrors.list", "response", internallog.HTTPResponse(res, b)) |
| 14177 |
return ret, nil |
| 14178 |
} |
| 14179 |
|
| 14180 |
// Pages invokes f for each page of results. |
| 14181 |
// A non-nil error returned from f will halt the iteration. |
| 14182 |
// The provided context supersedes any context provided to the Context method. |
| 14183 |
func (c *BuyersFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error { |
| 14184 |
c.ctx_ = ctx |
| 14185 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14186 |
for { |
| 14187 |
x, err := c.Do() |
| 14188 |
if err != nil { |
| 14189 |
return err |
| 14190 |
} |
| 14191 |
if err := f(x); err != nil { |
| 14192 |
return err |
| 14193 |
} |
| 14194 |
if x.NextPageToken == "" { |
| 14195 |
return nil |
| 14196 |
} |
| 14197 |
c.PageToken(x.NextPageToken) |
| 14198 |
} |
| 14199 |
} |
| 14200 |
|
| 14201 |
type BuyersFilterSetsBidResponsesWithoutBidsListCall struct { |
| 14202 |
s *Service |
| 14203 |
filterSetName string |
| 14204 |
urlParams_ gensupport.URLParams |
| 14205 |
ifNoneMatch_ string |
| 14206 |
ctx_ context.Context |
| 14207 |
header_ http.Header |
| 14208 |
} |
| 14209 |
|
| 14210 |
// List: List all reasons for which bid responses were considered to have no |
| 14211 |
// applicable bids, with the number of bid responses affected for each reason. |
| 14212 |
// |
| 14213 |
// - filterSetName: Name of the filter set that should be applied to the |
| 14214 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 14215 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 14216 |
// the buyer account representing bidder 123: |
| 14217 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 14218 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 14219 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 14220 |
func (r *BuyersFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BuyersFilterSetsBidResponsesWithoutBidsListCall { |
| 14221 |
c := &BuyersFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 14222 |
c.filterSetName = filterSetName |
| 14223 |
return c |
| 14224 |
} |
| 14225 |
|
| 14226 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 14227 |
// server may return fewer results than requested. If unspecified, the server |
| 14228 |
// will pick an appropriate default. |
| 14229 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BuyersFilterSetsBidResponsesWithoutBidsListCall { |
| 14230 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 14231 |
return c |
| 14232 |
} |
| 14233 |
|
| 14234 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 14235 |
// page of results the server should return. Typically, this is the value of |
| 14236 |
// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous |
| 14237 |
// call to the bidResponsesWithoutBids.list method. |
| 14238 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BuyersFilterSetsBidResponsesWithoutBidsListCall { |
| 14239 |
c.urlParams_.Set("pageToken", pageToken) |
| 14240 |
return c |
| 14241 |
} |
| 14242 |
|
| 14243 |
// Fields allows partial responses to be retrieved. See |
| 14244 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 14245 |
// details. |
| 14246 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsBidResponsesWithoutBidsListCall { |
| 14247 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 14248 |
return c |
| 14249 |
} |
| 14250 |
|
| 14251 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 14252 |
// object's ETag matches the given value. This is useful for getting updates |
| 14253 |
// only after the object has changed since the last request. |
| 14254 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsBidResponsesWithoutBidsListCall { |
| 14255 |
c.ifNoneMatch_ = entityTag |
| 14256 |
return c |
| 14257 |
} |
| 14258 |
|
| 14259 |
// Context sets the context to be used in this call's Do method. |
| 14260 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BuyersFilterSetsBidResponsesWithoutBidsListCall { |
| 14261 |
c.ctx_ = ctx |
| 14262 |
return c |
| 14263 |
} |
| 14264 |
|
| 14265 |
// Header returns a http.Header that can be modified by the caller to add |
| 14266 |
// headers to the request. |
| 14267 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header { |
| 14268 |
if c.header_ == nil { |
| 14269 |
c.header_ = make(http.Header) |
| 14270 |
} |
| 14271 |
return c.header_ |
| 14272 |
} |
| 14273 |
|
| 14274 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 14275 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 14276 |
if c.ifNoneMatch_ != "" { |
| 14277 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 14278 |
} |
| 14279 |
c.urlParams_.Set("alt", alt) |
| 14280 |
c.urlParams_.Set("prettyPrint", "false") |
| 14281 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids") |
| 14282 |
urls += "?" + c.urlParams_.Encode() |
| 14283 |
req, err := http.NewRequest("GET", urls, nil) |
| 14284 |
if err != nil { |
| 14285 |
return nil, err |
| 14286 |
} |
| 14287 |
req.Header = reqHeaders |
| 14288 |
googleapi.Expand(req.URL, map[string]string{ |
| 14289 |
"filterSetName": c.filterSetName, |
| 14290 |
}) |
| 14291 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.bidResponsesWithoutBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 14292 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 14293 |
} |
| 14294 |
|
| 14295 |
// Do executes the "adexchangebuyer2.buyers.filterSets.bidResponsesWithoutBids.list" call. |
| 14296 |
// Any non-2xx status code is an error. Response headers are in either |
| 14297 |
// *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or (if a response |
| 14298 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 14299 |
// googleapi.IsNotModified to check whether the returned error was because |
| 14300 |
// http.StatusNotModified was returned. |
| 14301 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) { |
| 14302 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 14303 |
res, err := c.doRequest("json") |
| 14304 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 14305 |
if res.Body != nil { |
| 14306 |
res.Body.Close() |
| 14307 |
} |
| 14308 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 14309 |
Code: res.StatusCode, |
| 14310 |
Header: res.Header, |
| 14311 |
}) |
| 14312 |
} |
| 14313 |
if err != nil { |
| 14314 |
return nil, err |
| 14315 |
} |
| 14316 |
defer googleapi.CloseBody(res) |
| 14317 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14318 |
return nil, gensupport.WrapError(err) |
| 14319 |
} |
| 14320 |
ret := &ListBidResponsesWithoutBidsResponse{ |
| 14321 |
ServerResponse: googleapi.ServerResponse{ |
| 14322 |
Header: res.Header, |
| 14323 |
HTTPStatusCode: res.StatusCode, |
| 14324 |
}, |
| 14325 |
} |
| 14326 |
target := &ret |
| 14327 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14328 |
if err != nil { |
| 14329 |
return nil, err |
| 14330 |
} |
| 14331 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.bidResponsesWithoutBids.list", "response", internallog.HTTPResponse(res, b)) |
| 14332 |
return ret, nil |
| 14333 |
} |
| 14334 |
|
| 14335 |
// Pages invokes f for each page of results. |
| 14336 |
// A non-nil error returned from f will halt the iteration. |
| 14337 |
// The provided context supersedes any context provided to the Context method. |
| 14338 |
func (c *BuyersFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error { |
| 14339 |
c.ctx_ = ctx |
| 14340 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14341 |
for { |
| 14342 |
x, err := c.Do() |
| 14343 |
if err != nil { |
| 14344 |
return err |
| 14345 |
} |
| 14346 |
if err := f(x); err != nil { |
| 14347 |
return err |
| 14348 |
} |
| 14349 |
if x.NextPageToken == "" { |
| 14350 |
return nil |
| 14351 |
} |
| 14352 |
c.PageToken(x.NextPageToken) |
| 14353 |
} |
| 14354 |
} |
| 14355 |
|
| 14356 |
type BuyersFilterSetsFilteredBidRequestsListCall struct { |
| 14357 |
s *Service |
| 14358 |
filterSetName string |
| 14359 |
urlParams_ gensupport.URLParams |
| 14360 |
ifNoneMatch_ string |
| 14361 |
ctx_ context.Context |
| 14362 |
header_ http.Header |
| 14363 |
} |
| 14364 |
|
| 14365 |
// List: List all reasons that caused a bid request not to be sent for an |
| 14366 |
// impression, with the number of bid requests not sent for each reason. |
| 14367 |
// |
| 14368 |
// - filterSetName: Name of the filter set that should be applied to the |
| 14369 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 14370 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 14371 |
// the buyer account representing bidder 123: |
| 14372 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 14373 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 14374 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 14375 |
func (r *BuyersFilterSetsFilteredBidRequestsService) List(filterSetName string) *BuyersFilterSetsFilteredBidRequestsListCall { |
| 14376 |
c := &BuyersFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 14377 |
c.filterSetName = filterSetName |
| 14378 |
return c |
| 14379 |
} |
| 14380 |
|
| 14381 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 14382 |
// server may return fewer results than requested. If unspecified, the server |
| 14383 |
// will pick an appropriate default. |
| 14384 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BuyersFilterSetsFilteredBidRequestsListCall { |
| 14385 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 14386 |
return c |
| 14387 |
} |
| 14388 |
|
| 14389 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 14390 |
// page of results the server should return. Typically, this is the value of |
| 14391 |
// ListFilteredBidRequestsResponse.nextPageToken returned from the previous |
| 14392 |
// call to the filteredBidRequests.list method. |
| 14393 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BuyersFilterSetsFilteredBidRequestsListCall { |
| 14394 |
c.urlParams_.Set("pageToken", pageToken) |
| 14395 |
return c |
| 14396 |
} |
| 14397 |
|
| 14398 |
// Fields allows partial responses to be retrieved. See |
| 14399 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 14400 |
// details. |
| 14401 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsFilteredBidRequestsListCall { |
| 14402 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 14403 |
return c |
| 14404 |
} |
| 14405 |
|
| 14406 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 14407 |
// object's ETag matches the given value. This is useful for getting updates |
| 14408 |
// only after the object has changed since the last request. |
| 14409 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsFilteredBidRequestsListCall { |
| 14410 |
c.ifNoneMatch_ = entityTag |
| 14411 |
return c |
| 14412 |
} |
| 14413 |
|
| 14414 |
// Context sets the context to be used in this call's Do method. |
| 14415 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BuyersFilterSetsFilteredBidRequestsListCall { |
| 14416 |
c.ctx_ = ctx |
| 14417 |
return c |
| 14418 |
} |
| 14419 |
|
| 14420 |
// Header returns a http.Header that can be modified by the caller to add |
| 14421 |
// headers to the request. |
| 14422 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) Header() http.Header { |
| 14423 |
if c.header_ == nil { |
| 14424 |
c.header_ = make(http.Header) |
| 14425 |
} |
| 14426 |
return c.header_ |
| 14427 |
} |
| 14428 |
|
| 14429 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) { |
| 14430 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 14431 |
if c.ifNoneMatch_ != "" { |
| 14432 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 14433 |
} |
| 14434 |
c.urlParams_.Set("alt", alt) |
| 14435 |
c.urlParams_.Set("prettyPrint", "false") |
| 14436 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests") |
| 14437 |
urls += "?" + c.urlParams_.Encode() |
| 14438 |
req, err := http.NewRequest("GET", urls, nil) |
| 14439 |
if err != nil { |
| 14440 |
return nil, err |
| 14441 |
} |
| 14442 |
req.Header = reqHeaders |
| 14443 |
googleapi.Expand(req.URL, map[string]string{ |
| 14444 |
"filterSetName": c.filterSetName, |
| 14445 |
}) |
| 14446 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBidRequests.list", "request", internallog.HTTPRequest(req, nil)) |
| 14447 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 14448 |
} |
| 14449 |
|
| 14450 |
// Do executes the "adexchangebuyer2.buyers.filterSets.filteredBidRequests.list" call. |
| 14451 |
// Any non-2xx status code is an error. Response headers are in either |
| 14452 |
// *ListFilteredBidRequestsResponse.ServerResponse.Header or (if a response was |
| 14453 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 14454 |
// googleapi.IsNotModified to check whether the returned error was because |
| 14455 |
// http.StatusNotModified was returned. |
| 14456 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) { |
| 14457 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 14458 |
res, err := c.doRequest("json") |
| 14459 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 14460 |
if res.Body != nil { |
| 14461 |
res.Body.Close() |
| 14462 |
} |
| 14463 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 14464 |
Code: res.StatusCode, |
| 14465 |
Header: res.Header, |
| 14466 |
}) |
| 14467 |
} |
| 14468 |
if err != nil { |
| 14469 |
return nil, err |
| 14470 |
} |
| 14471 |
defer googleapi.CloseBody(res) |
| 14472 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14473 |
return nil, gensupport.WrapError(err) |
| 14474 |
} |
| 14475 |
ret := &ListFilteredBidRequestsResponse{ |
| 14476 |
ServerResponse: googleapi.ServerResponse{ |
| 14477 |
Header: res.Header, |
| 14478 |
HTTPStatusCode: res.StatusCode, |
| 14479 |
}, |
| 14480 |
} |
| 14481 |
target := &ret |
| 14482 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14483 |
if err != nil { |
| 14484 |
return nil, err |
| 14485 |
} |
| 14486 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBidRequests.list", "response", internallog.HTTPResponse(res, b)) |
| 14487 |
return ret, nil |
| 14488 |
} |
| 14489 |
|
| 14490 |
// Pages invokes f for each page of results. |
| 14491 |
// A non-nil error returned from f will halt the iteration. |
| 14492 |
// The provided context supersedes any context provided to the Context method. |
| 14493 |
func (c *BuyersFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error { |
| 14494 |
c.ctx_ = ctx |
| 14495 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14496 |
for { |
| 14497 |
x, err := c.Do() |
| 14498 |
if err != nil { |
| 14499 |
return err |
| 14500 |
} |
| 14501 |
if err := f(x); err != nil { |
| 14502 |
return err |
| 14503 |
} |
| 14504 |
if x.NextPageToken == "" { |
| 14505 |
return nil |
| 14506 |
} |
| 14507 |
c.PageToken(x.NextPageToken) |
| 14508 |
} |
| 14509 |
} |
| 14510 |
|
| 14511 |
type BuyersFilterSetsFilteredBidsListCall struct { |
| 14512 |
s *Service |
| 14513 |
filterSetName string |
| 14514 |
urlParams_ gensupport.URLParams |
| 14515 |
ifNoneMatch_ string |
| 14516 |
ctx_ context.Context |
| 14517 |
header_ http.Header |
| 14518 |
} |
| 14519 |
|
| 14520 |
// List: List all reasons for which bids were filtered, with the number of bids |
| 14521 |
// filtered for each reason. |
| 14522 |
// |
| 14523 |
// - filterSetName: Name of the filter set that should be applied to the |
| 14524 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 14525 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 14526 |
// the buyer account representing bidder 123: |
| 14527 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 14528 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 14529 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 14530 |
func (r *BuyersFilterSetsFilteredBidsService) List(filterSetName string) *BuyersFilterSetsFilteredBidsListCall { |
| 14531 |
c := &BuyersFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 14532 |
c.filterSetName = filterSetName |
| 14533 |
return c |
| 14534 |
} |
| 14535 |
|
| 14536 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 14537 |
// server may return fewer results than requested. If unspecified, the server |
| 14538 |
// will pick an appropriate default. |
| 14539 |
func (c *BuyersFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BuyersFilterSetsFilteredBidsListCall { |
| 14540 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 14541 |
return c |
| 14542 |
} |
| 14543 |
|
| 14544 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 14545 |
// page of results the server should return. Typically, this is the value of |
| 14546 |
// ListFilteredBidsResponse.nextPageToken returned from the previous call to |
| 14547 |
// the filteredBids.list method. |
| 14548 |
func (c *BuyersFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BuyersFilterSetsFilteredBidsListCall { |
| 14549 |
c.urlParams_.Set("pageToken", pageToken) |
| 14550 |
return c |
| 14551 |
} |
| 14552 |
|
| 14553 |
// Fields allows partial responses to be retrieved. See |
| 14554 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 14555 |
// details. |
| 14556 |
func (c *BuyersFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsFilteredBidsListCall { |
| 14557 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 14558 |
return c |
| 14559 |
} |
| 14560 |
|
| 14561 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 14562 |
// object's ETag matches the given value. This is useful for getting updates |
| 14563 |
// only after the object has changed since the last request. |
| 14564 |
func (c *BuyersFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsFilteredBidsListCall { |
| 14565 |
c.ifNoneMatch_ = entityTag |
| 14566 |
return c |
| 14567 |
} |
| 14568 |
|
| 14569 |
// Context sets the context to be used in this call's Do method. |
| 14570 |
func (c *BuyersFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BuyersFilterSetsFilteredBidsListCall { |
| 14571 |
c.ctx_ = ctx |
| 14572 |
return c |
| 14573 |
} |
| 14574 |
|
| 14575 |
// Header returns a http.Header that can be modified by the caller to add |
| 14576 |
// headers to the request. |
| 14577 |
func (c *BuyersFilterSetsFilteredBidsListCall) Header() http.Header { |
| 14578 |
if c.header_ == nil { |
| 14579 |
c.header_ = make(http.Header) |
| 14580 |
} |
| 14581 |
return c.header_ |
| 14582 |
} |
| 14583 |
|
| 14584 |
func (c *BuyersFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 14585 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 14586 |
if c.ifNoneMatch_ != "" { |
| 14587 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 14588 |
} |
| 14589 |
c.urlParams_.Set("alt", alt) |
| 14590 |
c.urlParams_.Set("prettyPrint", "false") |
| 14591 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids") |
| 14592 |
urls += "?" + c.urlParams_.Encode() |
| 14593 |
req, err := http.NewRequest("GET", urls, nil) |
| 14594 |
if err != nil { |
| 14595 |
return nil, err |
| 14596 |
} |
| 14597 |
req.Header = reqHeaders |
| 14598 |
googleapi.Expand(req.URL, map[string]string{ |
| 14599 |
"filterSetName": c.filterSetName, |
| 14600 |
}) |
| 14601 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 14602 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 14603 |
} |
| 14604 |
|
| 14605 |
// Do executes the "adexchangebuyer2.buyers.filterSets.filteredBids.list" call. |
| 14606 |
// Any non-2xx status code is an error. Response headers are in either |
| 14607 |
// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was |
| 14608 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 14609 |
// googleapi.IsNotModified to check whether the returned error was because |
| 14610 |
// http.StatusNotModified was returned. |
| 14611 |
func (c *BuyersFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) { |
| 14612 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 14613 |
res, err := c.doRequest("json") |
| 14614 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 14615 |
if res.Body != nil { |
| 14616 |
res.Body.Close() |
| 14617 |
} |
| 14618 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 14619 |
Code: res.StatusCode, |
| 14620 |
Header: res.Header, |
| 14621 |
}) |
| 14622 |
} |
| 14623 |
if err != nil { |
| 14624 |
return nil, err |
| 14625 |
} |
| 14626 |
defer googleapi.CloseBody(res) |
| 14627 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14628 |
return nil, gensupport.WrapError(err) |
| 14629 |
} |
| 14630 |
ret := &ListFilteredBidsResponse{ |
| 14631 |
ServerResponse: googleapi.ServerResponse{ |
| 14632 |
Header: res.Header, |
| 14633 |
HTTPStatusCode: res.StatusCode, |
| 14634 |
}, |
| 14635 |
} |
| 14636 |
target := &ret |
| 14637 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14638 |
if err != nil { |
| 14639 |
return nil, err |
| 14640 |
} |
| 14641 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBids.list", "response", internallog.HTTPResponse(res, b)) |
| 14642 |
return ret, nil |
| 14643 |
} |
| 14644 |
|
| 14645 |
// Pages invokes f for each page of results. |
| 14646 |
// A non-nil error returned from f will halt the iteration. |
| 14647 |
// The provided context supersedes any context provided to the Context method. |
| 14648 |
func (c *BuyersFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error { |
| 14649 |
c.ctx_ = ctx |
| 14650 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14651 |
for { |
| 14652 |
x, err := c.Do() |
| 14653 |
if err != nil { |
| 14654 |
return err |
| 14655 |
} |
| 14656 |
if err := f(x); err != nil { |
| 14657 |
return err |
| 14658 |
} |
| 14659 |
if x.NextPageToken == "" { |
| 14660 |
return nil |
| 14661 |
} |
| 14662 |
c.PageToken(x.NextPageToken) |
| 14663 |
} |
| 14664 |
} |
| 14665 |
|
| 14666 |
type BuyersFilterSetsFilteredBidsCreativesListCall struct { |
| 14667 |
s *Service |
| 14668 |
filterSetName string |
| 14669 |
creativeStatusId int64 |
| 14670 |
urlParams_ gensupport.URLParams |
| 14671 |
ifNoneMatch_ string |
| 14672 |
ctx_ context.Context |
| 14673 |
header_ http.Header |
| 14674 |
} |
| 14675 |
|
| 14676 |
// List: List all creatives associated with a specific reason for which bids |
| 14677 |
// were filtered, with the number of bids filtered for each creative. |
| 14678 |
// |
| 14679 |
// - creativeStatusId: The ID of the creative status for which to retrieve a |
| 14680 |
// breakdown by creative. See creative-status-codes |
| 14681 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 14682 |
// - filterSetName: Name of the filter set that should be applied to the |
| 14683 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 14684 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 14685 |
// the buyer account representing bidder 123: |
| 14686 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 14687 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 14688 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 14689 |
func (r *BuyersFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BuyersFilterSetsFilteredBidsCreativesListCall { |
| 14690 |
c := &BuyersFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 14691 |
c.filterSetName = filterSetName |
| 14692 |
c.creativeStatusId = creativeStatusId |
| 14693 |
return c |
| 14694 |
} |
| 14695 |
|
| 14696 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 14697 |
// server may return fewer results than requested. If unspecified, the server |
| 14698 |
// will pick an appropriate default. |
| 14699 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BuyersFilterSetsFilteredBidsCreativesListCall { |
| 14700 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 14701 |
return c |
| 14702 |
} |
| 14703 |
|
| 14704 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 14705 |
// page of results the server should return. Typically, this is the value of |
| 14706 |
// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from |
| 14707 |
// the previous call to the filteredBids.creatives.list method. |
| 14708 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BuyersFilterSetsFilteredBidsCreativesListCall { |
| 14709 |
c.urlParams_.Set("pageToken", pageToken) |
| 14710 |
return c |
| 14711 |
} |
| 14712 |
|
| 14713 |
// Fields allows partial responses to be retrieved. See |
| 14714 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 14715 |
// details. |
| 14716 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsFilteredBidsCreativesListCall { |
| 14717 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 14718 |
return c |
| 14719 |
} |
| 14720 |
|
| 14721 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 14722 |
// object's ETag matches the given value. This is useful for getting updates |
| 14723 |
// only after the object has changed since the last request. |
| 14724 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsFilteredBidsCreativesListCall { |
| 14725 |
c.ifNoneMatch_ = entityTag |
| 14726 |
return c |
| 14727 |
} |
| 14728 |
|
| 14729 |
// Context sets the context to be used in this call's Do method. |
| 14730 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BuyersFilterSetsFilteredBidsCreativesListCall { |
| 14731 |
c.ctx_ = ctx |
| 14732 |
return c |
| 14733 |
} |
| 14734 |
|
| 14735 |
// Header returns a http.Header that can be modified by the caller to add |
| 14736 |
// headers to the request. |
| 14737 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) Header() http.Header { |
| 14738 |
if c.header_ == nil { |
| 14739 |
c.header_ = make(http.Header) |
| 14740 |
} |
| 14741 |
return c.header_ |
| 14742 |
} |
| 14743 |
|
| 14744 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) { |
| 14745 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 14746 |
if c.ifNoneMatch_ != "" { |
| 14747 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 14748 |
} |
| 14749 |
c.urlParams_.Set("alt", alt) |
| 14750 |
c.urlParams_.Set("prettyPrint", "false") |
| 14751 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives") |
| 14752 |
urls += "?" + c.urlParams_.Encode() |
| 14753 |
req, err := http.NewRequest("GET", urls, nil) |
| 14754 |
if err != nil { |
| 14755 |
return nil, err |
| 14756 |
} |
| 14757 |
req.Header = reqHeaders |
| 14758 |
googleapi.Expand(req.URL, map[string]string{ |
| 14759 |
"filterSetName": c.filterSetName, |
| 14760 |
"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), |
| 14761 |
}) |
| 14762 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBids.creatives.list", "request", internallog.HTTPRequest(req, nil)) |
| 14763 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 14764 |
} |
| 14765 |
|
| 14766 |
// Do executes the "adexchangebuyer2.buyers.filterSets.filteredBids.creatives.list" call. |
| 14767 |
// Any non-2xx status code is an error. Response headers are in either |
| 14768 |
// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header or (if |
| 14769 |
// a response was returned at all) in error.(*googleapi.Error).Header. Use |
| 14770 |
// googleapi.IsNotModified to check whether the returned error was because |
| 14771 |
// http.StatusNotModified was returned. |
| 14772 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) { |
| 14773 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 14774 |
res, err := c.doRequest("json") |
| 14775 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 14776 |
if res.Body != nil { |
| 14777 |
res.Body.Close() |
| 14778 |
} |
| 14779 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 14780 |
Code: res.StatusCode, |
| 14781 |
Header: res.Header, |
| 14782 |
}) |
| 14783 |
} |
| 14784 |
if err != nil { |
| 14785 |
return nil, err |
| 14786 |
} |
| 14787 |
defer googleapi.CloseBody(res) |
| 14788 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14789 |
return nil, gensupport.WrapError(err) |
| 14790 |
} |
| 14791 |
ret := &ListCreativeStatusBreakdownByCreativeResponse{ |
| 14792 |
ServerResponse: googleapi.ServerResponse{ |
| 14793 |
Header: res.Header, |
| 14794 |
HTTPStatusCode: res.StatusCode, |
| 14795 |
}, |
| 14796 |
} |
| 14797 |
target := &ret |
| 14798 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14799 |
if err != nil { |
| 14800 |
return nil, err |
| 14801 |
} |
| 14802 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBids.creatives.list", "response", internallog.HTTPResponse(res, b)) |
| 14803 |
return ret, nil |
| 14804 |
} |
| 14805 |
|
| 14806 |
// Pages invokes f for each page of results. |
| 14807 |
// A non-nil error returned from f will halt the iteration. |
| 14808 |
// The provided context supersedes any context provided to the Context method. |
| 14809 |
func (c *BuyersFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error { |
| 14810 |
c.ctx_ = ctx |
| 14811 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14812 |
for { |
| 14813 |
x, err := c.Do() |
| 14814 |
if err != nil { |
| 14815 |
return err |
| 14816 |
} |
| 14817 |
if err := f(x); err != nil { |
| 14818 |
return err |
| 14819 |
} |
| 14820 |
if x.NextPageToken == "" { |
| 14821 |
return nil |
| 14822 |
} |
| 14823 |
c.PageToken(x.NextPageToken) |
| 14824 |
} |
| 14825 |
} |
| 14826 |
|
| 14827 |
type BuyersFilterSetsFilteredBidsDetailsListCall struct { |
| 14828 |
s *Service |
| 14829 |
filterSetName string |
| 14830 |
creativeStatusId int64 |
| 14831 |
urlParams_ gensupport.URLParams |
| 14832 |
ifNoneMatch_ string |
| 14833 |
ctx_ context.Context |
| 14834 |
header_ http.Header |
| 14835 |
} |
| 14836 |
|
| 14837 |
// List: List all details associated with a specific reason for which bids were |
| 14838 |
// filtered, with the number of bids filtered for each detail. |
| 14839 |
// |
| 14840 |
// - creativeStatusId: The ID of the creative status for which to retrieve a |
| 14841 |
// breakdown by detail. See creative-status-codes |
| 14842 |
// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). |
| 14843 |
// Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and |
| 14844 |
// 87. |
| 14845 |
// - filterSetName: Name of the filter set that should be applied to the |
| 14846 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 14847 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 14848 |
// the buyer account representing bidder 123: |
| 14849 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 14850 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 14851 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 14852 |
func (r *BuyersFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BuyersFilterSetsFilteredBidsDetailsListCall { |
| 14853 |
c := &BuyersFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 14854 |
c.filterSetName = filterSetName |
| 14855 |
c.creativeStatusId = creativeStatusId |
| 14856 |
return c |
| 14857 |
} |
| 14858 |
|
| 14859 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 14860 |
// server may return fewer results than requested. If unspecified, the server |
| 14861 |
// will pick an appropriate default. |
| 14862 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BuyersFilterSetsFilteredBidsDetailsListCall { |
| 14863 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 14864 |
return c |
| 14865 |
} |
| 14866 |
|
| 14867 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 14868 |
// page of results the server should return. Typically, this is the value of |
| 14869 |
// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the |
| 14870 |
// previous call to the filteredBids.details.list method. |
| 14871 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BuyersFilterSetsFilteredBidsDetailsListCall { |
| 14872 |
c.urlParams_.Set("pageToken", pageToken) |
| 14873 |
return c |
| 14874 |
} |
| 14875 |
|
| 14876 |
// Fields allows partial responses to be retrieved. See |
| 14877 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 14878 |
// details. |
| 14879 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsFilteredBidsDetailsListCall { |
| 14880 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 14881 |
return c |
| 14882 |
} |
| 14883 |
|
| 14884 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 14885 |
// object's ETag matches the given value. This is useful for getting updates |
| 14886 |
// only after the object has changed since the last request. |
| 14887 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsFilteredBidsDetailsListCall { |
| 14888 |
c.ifNoneMatch_ = entityTag |
| 14889 |
return c |
| 14890 |
} |
| 14891 |
|
| 14892 |
// Context sets the context to be used in this call's Do method. |
| 14893 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BuyersFilterSetsFilteredBidsDetailsListCall { |
| 14894 |
c.ctx_ = ctx |
| 14895 |
return c |
| 14896 |
} |
| 14897 |
|
| 14898 |
// Header returns a http.Header that can be modified by the caller to add |
| 14899 |
// headers to the request. |
| 14900 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) Header() http.Header { |
| 14901 |
if c.header_ == nil { |
| 14902 |
c.header_ = make(http.Header) |
| 14903 |
} |
| 14904 |
return c.header_ |
| 14905 |
} |
| 14906 |
|
| 14907 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) { |
| 14908 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 14909 |
if c.ifNoneMatch_ != "" { |
| 14910 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 14911 |
} |
| 14912 |
c.urlParams_.Set("alt", alt) |
| 14913 |
c.urlParams_.Set("prettyPrint", "false") |
| 14914 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details") |
| 14915 |
urls += "?" + c.urlParams_.Encode() |
| 14916 |
req, err := http.NewRequest("GET", urls, nil) |
| 14917 |
if err != nil { |
| 14918 |
return nil, err |
| 14919 |
} |
| 14920 |
req.Header = reqHeaders |
| 14921 |
googleapi.Expand(req.URL, map[string]string{ |
| 14922 |
"filterSetName": c.filterSetName, |
| 14923 |
"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10), |
| 14924 |
}) |
| 14925 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBids.details.list", "request", internallog.HTTPRequest(req, nil)) |
| 14926 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 14927 |
} |
| 14928 |
|
| 14929 |
// Do executes the "adexchangebuyer2.buyers.filterSets.filteredBids.details.list" call. |
| 14930 |
// Any non-2xx status code is an error. Response headers are in either |
| 14931 |
// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or (if a |
| 14932 |
// response was returned at all) in error.(*googleapi.Error).Header. Use |
| 14933 |
// googleapi.IsNotModified to check whether the returned error was because |
| 14934 |
// http.StatusNotModified was returned. |
| 14935 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) { |
| 14936 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 14937 |
res, err := c.doRequest("json") |
| 14938 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 14939 |
if res.Body != nil { |
| 14940 |
res.Body.Close() |
| 14941 |
} |
| 14942 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 14943 |
Code: res.StatusCode, |
| 14944 |
Header: res.Header, |
| 14945 |
}) |
| 14946 |
} |
| 14947 |
if err != nil { |
| 14948 |
return nil, err |
| 14949 |
} |
| 14950 |
defer googleapi.CloseBody(res) |
| 14951 |
if err := googleapi.CheckResponse(res); err != nil { |
| 14952 |
return nil, gensupport.WrapError(err) |
| 14953 |
} |
| 14954 |
ret := &ListCreativeStatusBreakdownByDetailResponse{ |
| 14955 |
ServerResponse: googleapi.ServerResponse{ |
| 14956 |
Header: res.Header, |
| 14957 |
HTTPStatusCode: res.StatusCode, |
| 14958 |
}, |
| 14959 |
} |
| 14960 |
target := &ret |
| 14961 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 14962 |
if err != nil { |
| 14963 |
return nil, err |
| 14964 |
} |
| 14965 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.filteredBids.details.list", "response", internallog.HTTPResponse(res, b)) |
| 14966 |
return ret, nil |
| 14967 |
} |
| 14968 |
|
| 14969 |
// Pages invokes f for each page of results. |
| 14970 |
// A non-nil error returned from f will halt the iteration. |
| 14971 |
// The provided context supersedes any context provided to the Context method. |
| 14972 |
func (c *BuyersFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error { |
| 14973 |
c.ctx_ = ctx |
| 14974 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 14975 |
for { |
| 14976 |
x, err := c.Do() |
| 14977 |
if err != nil { |
| 14978 |
return err |
| 14979 |
} |
| 14980 |
if err := f(x); err != nil { |
| 14981 |
return err |
| 14982 |
} |
| 14983 |
if x.NextPageToken == "" { |
| 14984 |
return nil |
| 14985 |
} |
| 14986 |
c.PageToken(x.NextPageToken) |
| 14987 |
} |
| 14988 |
} |
| 14989 |
|
| 14990 |
type BuyersFilterSetsImpressionMetricsListCall struct { |
| 14991 |
s *Service |
| 14992 |
filterSetName string |
| 14993 |
urlParams_ gensupport.URLParams |
| 14994 |
ifNoneMatch_ string |
| 14995 |
ctx_ context.Context |
| 14996 |
header_ http.Header |
| 14997 |
} |
| 14998 |
|
| 14999 |
// List: Lists all metrics that are measured in terms of number of impressions. |
| 15000 |
// |
| 15001 |
// - filterSetName: Name of the filter set that should be applied to the |
| 15002 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 15003 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 15004 |
// the buyer account representing bidder 123: |
| 15005 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 15006 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 15007 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 15008 |
func (r *BuyersFilterSetsImpressionMetricsService) List(filterSetName string) *BuyersFilterSetsImpressionMetricsListCall { |
| 15009 |
c := &BuyersFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 15010 |
c.filterSetName = filterSetName |
| 15011 |
return c |
| 15012 |
} |
| 15013 |
|
| 15014 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 15015 |
// server may return fewer results than requested. If unspecified, the server |
| 15016 |
// will pick an appropriate default. |
| 15017 |
func (c *BuyersFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BuyersFilterSetsImpressionMetricsListCall { |
| 15018 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 15019 |
return c |
| 15020 |
} |
| 15021 |
|
| 15022 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 15023 |
// page of results the server should return. Typically, this is the value of |
| 15024 |
// ListImpressionMetricsResponse.nextPageToken returned from the previous call |
| 15025 |
// to the impressionMetrics.list method. |
| 15026 |
func (c *BuyersFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BuyersFilterSetsImpressionMetricsListCall { |
| 15027 |
c.urlParams_.Set("pageToken", pageToken) |
| 15028 |
return c |
| 15029 |
} |
| 15030 |
|
| 15031 |
// Fields allows partial responses to be retrieved. See |
| 15032 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 15033 |
// details. |
| 15034 |
func (c *BuyersFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsImpressionMetricsListCall { |
| 15035 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 15036 |
return c |
| 15037 |
} |
| 15038 |
|
| 15039 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 15040 |
// object's ETag matches the given value. This is useful for getting updates |
| 15041 |
// only after the object has changed since the last request. |
| 15042 |
func (c *BuyersFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsImpressionMetricsListCall { |
| 15043 |
c.ifNoneMatch_ = entityTag |
| 15044 |
return c |
| 15045 |
} |
| 15046 |
|
| 15047 |
// Context sets the context to be used in this call's Do method. |
| 15048 |
func (c *BuyersFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BuyersFilterSetsImpressionMetricsListCall { |
| 15049 |
c.ctx_ = ctx |
| 15050 |
return c |
| 15051 |
} |
| 15052 |
|
| 15053 |
// Header returns a http.Header that can be modified by the caller to add |
| 15054 |
// headers to the request. |
| 15055 |
func (c *BuyersFilterSetsImpressionMetricsListCall) Header() http.Header { |
| 15056 |
if c.header_ == nil { |
| 15057 |
c.header_ = make(http.Header) |
| 15058 |
} |
| 15059 |
return c.header_ |
| 15060 |
} |
| 15061 |
|
| 15062 |
func (c *BuyersFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) { |
| 15063 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 15064 |
if c.ifNoneMatch_ != "" { |
| 15065 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 15066 |
} |
| 15067 |
c.urlParams_.Set("alt", alt) |
| 15068 |
c.urlParams_.Set("prettyPrint", "false") |
| 15069 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics") |
| 15070 |
urls += "?" + c.urlParams_.Encode() |
| 15071 |
req, err := http.NewRequest("GET", urls, nil) |
| 15072 |
if err != nil { |
| 15073 |
return nil, err |
| 15074 |
} |
| 15075 |
req.Header = reqHeaders |
| 15076 |
googleapi.Expand(req.URL, map[string]string{ |
| 15077 |
"filterSetName": c.filterSetName, |
| 15078 |
}) |
| 15079 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.impressionMetrics.list", "request", internallog.HTTPRequest(req, nil)) |
| 15080 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 15081 |
} |
| 15082 |
|
| 15083 |
// Do executes the "adexchangebuyer2.buyers.filterSets.impressionMetrics.list" call. |
| 15084 |
// Any non-2xx status code is an error. Response headers are in either |
| 15085 |
// *ListImpressionMetricsResponse.ServerResponse.Header or (if a response was |
| 15086 |
// returned at all) in error.(*googleapi.Error).Header. Use |
| 15087 |
// googleapi.IsNotModified to check whether the returned error was because |
| 15088 |
// http.StatusNotModified was returned. |
| 15089 |
func (c *BuyersFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) { |
| 15090 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 15091 |
res, err := c.doRequest("json") |
| 15092 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 15093 |
if res.Body != nil { |
| 15094 |
res.Body.Close() |
| 15095 |
} |
| 15096 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 15097 |
Code: res.StatusCode, |
| 15098 |
Header: res.Header, |
| 15099 |
}) |
| 15100 |
} |
| 15101 |
if err != nil { |
| 15102 |
return nil, err |
| 15103 |
} |
| 15104 |
defer googleapi.CloseBody(res) |
| 15105 |
if err := googleapi.CheckResponse(res); err != nil { |
| 15106 |
return nil, gensupport.WrapError(err) |
| 15107 |
} |
| 15108 |
ret := &ListImpressionMetricsResponse{ |
| 15109 |
ServerResponse: googleapi.ServerResponse{ |
| 15110 |
Header: res.Header, |
| 15111 |
HTTPStatusCode: res.StatusCode, |
| 15112 |
}, |
| 15113 |
} |
| 15114 |
target := &ret |
| 15115 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 15116 |
if err != nil { |
| 15117 |
return nil, err |
| 15118 |
} |
| 15119 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.impressionMetrics.list", "response", internallog.HTTPResponse(res, b)) |
| 15120 |
return ret, nil |
| 15121 |
} |
| 15122 |
|
| 15123 |
// Pages invokes f for each page of results. |
| 15124 |
// A non-nil error returned from f will halt the iteration. |
| 15125 |
// The provided context supersedes any context provided to the Context method. |
| 15126 |
func (c *BuyersFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error { |
| 15127 |
c.ctx_ = ctx |
| 15128 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 15129 |
for { |
| 15130 |
x, err := c.Do() |
| 15131 |
if err != nil { |
| 15132 |
return err |
| 15133 |
} |
| 15134 |
if err := f(x); err != nil { |
| 15135 |
return err |
| 15136 |
} |
| 15137 |
if x.NextPageToken == "" { |
| 15138 |
return nil |
| 15139 |
} |
| 15140 |
c.PageToken(x.NextPageToken) |
| 15141 |
} |
| 15142 |
} |
| 15143 |
|
| 15144 |
type BuyersFilterSetsLosingBidsListCall struct { |
| 15145 |
s *Service |
| 15146 |
filterSetName string |
| 15147 |
urlParams_ gensupport.URLParams |
| 15148 |
ifNoneMatch_ string |
| 15149 |
ctx_ context.Context |
| 15150 |
header_ http.Header |
| 15151 |
} |
| 15152 |
|
| 15153 |
// List: List all reasons for which bids lost in the auction, with the number |
| 15154 |
// of bids that lost for each reason. |
| 15155 |
// |
| 15156 |
// - filterSetName: Name of the filter set that should be applied to the |
| 15157 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 15158 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 15159 |
// the buyer account representing bidder 123: |
| 15160 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 15161 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 15162 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 15163 |
func (r *BuyersFilterSetsLosingBidsService) List(filterSetName string) *BuyersFilterSetsLosingBidsListCall { |
| 15164 |
c := &BuyersFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 15165 |
c.filterSetName = filterSetName |
| 15166 |
return c |
| 15167 |
} |
| 15168 |
|
| 15169 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 15170 |
// server may return fewer results than requested. If unspecified, the server |
| 15171 |
// will pick an appropriate default. |
| 15172 |
func (c *BuyersFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BuyersFilterSetsLosingBidsListCall { |
| 15173 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 15174 |
return c |
| 15175 |
} |
| 15176 |
|
| 15177 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 15178 |
// page of results the server should return. Typically, this is the value of |
| 15179 |
// ListLosingBidsResponse.nextPageToken returned from the previous call to the |
| 15180 |
// losingBids.list method. |
| 15181 |
func (c *BuyersFilterSetsLosingBidsListCall) PageToken(pageToken string) *BuyersFilterSetsLosingBidsListCall { |
| 15182 |
c.urlParams_.Set("pageToken", pageToken) |
| 15183 |
return c |
| 15184 |
} |
| 15185 |
|
| 15186 |
// Fields allows partial responses to be retrieved. See |
| 15187 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 15188 |
// details. |
| 15189 |
func (c *BuyersFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsLosingBidsListCall { |
| 15190 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 15191 |
return c |
| 15192 |
} |
| 15193 |
|
| 15194 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 15195 |
// object's ETag matches the given value. This is useful for getting updates |
| 15196 |
// only after the object has changed since the last request. |
| 15197 |
func (c *BuyersFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsLosingBidsListCall { |
| 15198 |
c.ifNoneMatch_ = entityTag |
| 15199 |
return c |
| 15200 |
} |
| 15201 |
|
| 15202 |
// Context sets the context to be used in this call's Do method. |
| 15203 |
func (c *BuyersFilterSetsLosingBidsListCall) Context(ctx context.Context) *BuyersFilterSetsLosingBidsListCall { |
| 15204 |
c.ctx_ = ctx |
| 15205 |
return c |
| 15206 |
} |
| 15207 |
|
| 15208 |
// Header returns a http.Header that can be modified by the caller to add |
| 15209 |
// headers to the request. |
| 15210 |
func (c *BuyersFilterSetsLosingBidsListCall) Header() http.Header { |
| 15211 |
if c.header_ == nil { |
| 15212 |
c.header_ = make(http.Header) |
| 15213 |
} |
| 15214 |
return c.header_ |
| 15215 |
} |
| 15216 |
|
| 15217 |
func (c *BuyersFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 15218 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 15219 |
if c.ifNoneMatch_ != "" { |
| 15220 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 15221 |
} |
| 15222 |
c.urlParams_.Set("alt", alt) |
| 15223 |
c.urlParams_.Set("prettyPrint", "false") |
| 15224 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids") |
| 15225 |
urls += "?" + c.urlParams_.Encode() |
| 15226 |
req, err := http.NewRequest("GET", urls, nil) |
| 15227 |
if err != nil { |
| 15228 |
return nil, err |
| 15229 |
} |
| 15230 |
req.Header = reqHeaders |
| 15231 |
googleapi.Expand(req.URL, map[string]string{ |
| 15232 |
"filterSetName": c.filterSetName, |
| 15233 |
}) |
| 15234 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.losingBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 15235 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 15236 |
} |
| 15237 |
|
| 15238 |
// Do executes the "adexchangebuyer2.buyers.filterSets.losingBids.list" call. |
| 15239 |
// Any non-2xx status code is an error. Response headers are in either |
| 15240 |
// *ListLosingBidsResponse.ServerResponse.Header or (if a response was returned |
| 15241 |
// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to |
| 15242 |
// check whether the returned error was because http.StatusNotModified was |
| 15243 |
// returned. |
| 15244 |
func (c *BuyersFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) { |
| 15245 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 15246 |
res, err := c.doRequest("json") |
| 15247 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 15248 |
if res.Body != nil { |
| 15249 |
res.Body.Close() |
| 15250 |
} |
| 15251 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 15252 |
Code: res.StatusCode, |
| 15253 |
Header: res.Header, |
| 15254 |
}) |
| 15255 |
} |
| 15256 |
if err != nil { |
| 15257 |
return nil, err |
| 15258 |
} |
| 15259 |
defer googleapi.CloseBody(res) |
| 15260 |
if err := googleapi.CheckResponse(res); err != nil { |
| 15261 |
return nil, gensupport.WrapError(err) |
| 15262 |
} |
| 15263 |
ret := &ListLosingBidsResponse{ |
| 15264 |
ServerResponse: googleapi.ServerResponse{ |
| 15265 |
Header: res.Header, |
| 15266 |
HTTPStatusCode: res.StatusCode, |
| 15267 |
}, |
| 15268 |
} |
| 15269 |
target := &ret |
| 15270 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 15271 |
if err != nil { |
| 15272 |
return nil, err |
| 15273 |
} |
| 15274 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.losingBids.list", "response", internallog.HTTPResponse(res, b)) |
| 15275 |
return ret, nil |
| 15276 |
} |
| 15277 |
|
| 15278 |
// Pages invokes f for each page of results. |
| 15279 |
// A non-nil error returned from f will halt the iteration. |
| 15280 |
// The provided context supersedes any context provided to the Context method. |
| 15281 |
func (c *BuyersFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error { |
| 15282 |
c.ctx_ = ctx |
| 15283 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 15284 |
for { |
| 15285 |
x, err := c.Do() |
| 15286 |
if err != nil { |
| 15287 |
return err |
| 15288 |
} |
| 15289 |
if err := f(x); err != nil { |
| 15290 |
return err |
| 15291 |
} |
| 15292 |
if x.NextPageToken == "" { |
| 15293 |
return nil |
| 15294 |
} |
| 15295 |
c.PageToken(x.NextPageToken) |
| 15296 |
} |
| 15297 |
} |
| 15298 |
|
| 15299 |
type BuyersFilterSetsNonBillableWinningBidsListCall struct { |
| 15300 |
s *Service |
| 15301 |
filterSetName string |
| 15302 |
urlParams_ gensupport.URLParams |
| 15303 |
ifNoneMatch_ string |
| 15304 |
ctx_ context.Context |
| 15305 |
header_ http.Header |
| 15306 |
} |
| 15307 |
|
| 15308 |
// List: List all reasons for which winning bids were not billable, with the |
| 15309 |
// number of bids not billed for each reason. |
| 15310 |
// |
| 15311 |
// - filterSetName: Name of the filter set that should be applied to the |
| 15312 |
// requested metrics. For example: - For a bidder-level filter set for bidder |
| 15313 |
// 123: `bidders/123/filterSets/abc` - For an account-level filter set for |
| 15314 |
// the buyer account representing bidder 123: |
| 15315 |
// `bidders/123/accounts/123/filterSets/abc` - For an account-level filter |
| 15316 |
// set for the child seat buyer account 456 whose bidder is 123: |
| 15317 |
// `bidders/123/accounts/456/filterSets/abc`. |
| 15318 |
func (r *BuyersFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BuyersFilterSetsNonBillableWinningBidsListCall { |
| 15319 |
c := &BuyersFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} |
| 15320 |
c.filterSetName = filterSetName |
| 15321 |
return c |
| 15322 |
} |
| 15323 |
|
| 15324 |
// PageSize sets the optional parameter "pageSize": Requested page size. The |
| 15325 |
// server may return fewer results than requested. If unspecified, the server |
| 15326 |
// will pick an appropriate default. |
| 15327 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BuyersFilterSetsNonBillableWinningBidsListCall { |
| 15328 |
c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) |
| 15329 |
return c |
| 15330 |
} |
| 15331 |
|
| 15332 |
// PageToken sets the optional parameter "pageToken": A token identifying a |
| 15333 |
// page of results the server should return. Typically, this is the value of |
| 15334 |
// ListNonBillableWinningBidsResponse.nextPageToken returned from the previous |
| 15335 |
// call to the nonBillableWinningBids.list method. |
| 15336 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BuyersFilterSetsNonBillableWinningBidsListCall { |
| 15337 |
c.urlParams_.Set("pageToken", pageToken) |
| 15338 |
return c |
| 15339 |
} |
| 15340 |
|
| 15341 |
// Fields allows partial responses to be retrieved. See |
| 15342 |
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more |
| 15343 |
// details. |
| 15344 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BuyersFilterSetsNonBillableWinningBidsListCall { |
| 15345 |
c.urlParams_.Set("fields", googleapi.CombineFields(s)) |
| 15346 |
return c |
| 15347 |
} |
| 15348 |
|
| 15349 |
// IfNoneMatch sets an optional parameter which makes the operation fail if the |
| 15350 |
// object's ETag matches the given value. This is useful for getting updates |
| 15351 |
// only after the object has changed since the last request. |
| 15352 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BuyersFilterSetsNonBillableWinningBidsListCall { |
| 15353 |
c.ifNoneMatch_ = entityTag |
| 15354 |
return c |
| 15355 |
} |
| 15356 |
|
| 15357 |
// Context sets the context to be used in this call's Do method. |
| 15358 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BuyersFilterSetsNonBillableWinningBidsListCall { |
| 15359 |
c.ctx_ = ctx |
| 15360 |
return c |
| 15361 |
} |
| 15362 |
|
| 15363 |
// Header returns a http.Header that can be modified by the caller to add |
| 15364 |
// headers to the request. |
| 15365 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) Header() http.Header { |
| 15366 |
if c.header_ == nil { |
| 15367 |
c.header_ = make(http.Header) |
| 15368 |
} |
| 15369 |
return c.header_ |
| 15370 |
} |
| 15371 |
|
| 15372 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) { |
| 15373 |
reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) |
| 15374 |
if c.ifNoneMatch_ != "" { |
| 15375 |
reqHeaders.Set("If-None-Match", c.ifNoneMatch_) |
| 15376 |
} |
| 15377 |
c.urlParams_.Set("alt", alt) |
| 15378 |
c.urlParams_.Set("prettyPrint", "false") |
| 15379 |
urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids") |
| 15380 |
urls += "?" + c.urlParams_.Encode() |
| 15381 |
req, err := http.NewRequest("GET", urls, nil) |
| 15382 |
if err != nil { |
| 15383 |
return nil, err |
| 15384 |
} |
| 15385 |
req.Header = reqHeaders |
| 15386 |
googleapi.Expand(req.URL, map[string]string{ |
| 15387 |
"filterSetName": c.filterSetName, |
| 15388 |
}) |
| 15389 |
c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.nonBillableWinningBids.list", "request", internallog.HTTPRequest(req, nil)) |
| 15390 |
return gensupport.SendRequest(c.ctx_, c.s.client, req) |
| 15391 |
} |
| 15392 |
|
| 15393 |
// Do executes the "adexchangebuyer2.buyers.filterSets.nonBillableWinningBids.list" call. |
| 15394 |
// Any non-2xx status code is an error. Response headers are in either |
| 15395 |
// *ListNonBillableWinningBidsResponse.ServerResponse.Header or (if a response |
| 15396 |
// was returned at all) in error.(*googleapi.Error).Header. Use |
| 15397 |
// googleapi.IsNotModified to check whether the returned error was because |
| 15398 |
// http.StatusNotModified was returned. |
| 15399 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) { |
| 15400 |
gensupport.SetOptions(c.urlParams_, opts...) |
| 15401 |
res, err := c.doRequest("json") |
| 15402 |
if res != nil && res.StatusCode == http.StatusNotModified { |
| 15403 |
if res.Body != nil { |
| 15404 |
res.Body.Close() |
| 15405 |
} |
| 15406 |
return nil, gensupport.WrapError(&googleapi.Error{ |
| 15407 |
Code: res.StatusCode, |
| 15408 |
Header: res.Header, |
| 15409 |
}) |
| 15410 |
} |
| 15411 |
if err != nil { |
| 15412 |
return nil, err |
| 15413 |
} |
| 15414 |
defer googleapi.CloseBody(res) |
| 15415 |
if err := googleapi.CheckResponse(res); err != nil { |
| 15416 |
return nil, gensupport.WrapError(err) |
| 15417 |
} |
| 15418 |
ret := &ListNonBillableWinningBidsResponse{ |
| 15419 |
ServerResponse: googleapi.ServerResponse{ |
| 15420 |
Header: res.Header, |
| 15421 |
HTTPStatusCode: res.StatusCode, |
| 15422 |
}, |
| 15423 |
} |
| 15424 |
target := &ret |
| 15425 |
b, err := gensupport.DecodeResponseBytes(target, res) |
| 15426 |
if err != nil { |
| 15427 |
return nil, err |
| 15428 |
} |
| 15429 |
c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "adexchangebuyer2.buyers.filterSets.nonBillableWinningBids.list", "response", internallog.HTTPResponse(res, b)) |
| 15430 |
return ret, nil |
| 15431 |
} |
| 15432 |
|
| 15433 |
// Pages invokes f for each page of results. |
| 15434 |
// A non-nil error returned from f will halt the iteration. |
| 15435 |
// The provided context supersedes any context provided to the Context method. |
| 15436 |
func (c *BuyersFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error { |
| 15437 |
c.ctx_ = ctx |
| 15438 |
defer c.PageToken(c.urlParams_.Get("pageToken")) |
| 15439 |
for { |
| 15440 |
x, err := c.Do() |
| 15441 |
if err != nil { |
| 15442 |
return err |
| 15443 |
} |
| 15444 |
if err := f(x); err != nil { |
| 15445 |
return err |
| 15446 |
} |
| 15447 |
if x.NextPageToken == "" { |
| 15448 |
return nil |
| 15449 |
} |
| 15450 |
c.PageToken(x.NextPageToken) |
| 15451 |
} |
| 15452 |
} |