1// Copyright 2021 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// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/adexchangebuyer2/v2beta1"
16//   ...
17//   ctx := context.Background()
18//   adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   adexchangebuyer2Service, err := adexchangebuyer2.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package adexchangebuyer2 // import "google.golang.org/api/adexchangebuyer2/v2beta1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "adexchangebuyer2:v2beta1"
75const apiName = "adexchangebuyer2"
76const apiVersion = "v2beta1"
77const basePath = "https://adexchangebuyer.googleapis.com/"
78const mtlsBasePath = "https://adexchangebuyer.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// Manage your Ad Exchange buyer account configuration
83	AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchange.buyer"
84)
85
86// NewService creates a new Service.
87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
88	scopesOption := option.WithScopes(
89		"https://www.googleapis.com/auth/adexchange.buyer",
90	)
91	// NOTE: prepend, so we don't override user-specified scopes.
92	opts = append([]option.ClientOption{scopesOption}, opts...)
93	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
94	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Accounts = NewAccountsService(s)
120	s.Bidders = NewBiddersService(s)
121	return s, nil
122}
123
124type Service struct {
125	client    *http.Client
126	BasePath  string // API endpoint base URL
127	UserAgent string // optional additional User-Agent fragment
128
129	Accounts *AccountsService
130
131	Bidders *BiddersService
132}
133
134func (s *Service) userAgent() string {
135	if s.UserAgent == "" {
136		return googleapi.UserAgent
137	}
138	return googleapi.UserAgent + " " + s.UserAgent
139}
140
141func NewAccountsService(s *Service) *AccountsService {
142	rs := &AccountsService{s: s}
143	rs.Clients = NewAccountsClientsService(s)
144	rs.Creatives = NewAccountsCreativesService(s)
145	rs.FinalizedProposals = NewAccountsFinalizedProposalsService(s)
146	rs.Products = NewAccountsProductsService(s)
147	rs.Proposals = NewAccountsProposalsService(s)
148	rs.PublisherProfiles = NewAccountsPublisherProfilesService(s)
149	return rs
150}
151
152type AccountsService struct {
153	s *Service
154
155	Clients *AccountsClientsService
156
157	Creatives *AccountsCreativesService
158
159	FinalizedProposals *AccountsFinalizedProposalsService
160
161	Products *AccountsProductsService
162
163	Proposals *AccountsProposalsService
164
165	PublisherProfiles *AccountsPublisherProfilesService
166}
167
168func NewAccountsClientsService(s *Service) *AccountsClientsService {
169	rs := &AccountsClientsService{s: s}
170	rs.Invitations = NewAccountsClientsInvitationsService(s)
171	rs.Users = NewAccountsClientsUsersService(s)
172	return rs
173}
174
175type AccountsClientsService struct {
176	s *Service
177
178	Invitations *AccountsClientsInvitationsService
179
180	Users *AccountsClientsUsersService
181}
182
183func NewAccountsClientsInvitationsService(s *Service) *AccountsClientsInvitationsService {
184	rs := &AccountsClientsInvitationsService{s: s}
185	return rs
186}
187
188type AccountsClientsInvitationsService struct {
189	s *Service
190}
191
192func NewAccountsClientsUsersService(s *Service) *AccountsClientsUsersService {
193	rs := &AccountsClientsUsersService{s: s}
194	return rs
195}
196
197type AccountsClientsUsersService struct {
198	s *Service
199}
200
201func NewAccountsCreativesService(s *Service) *AccountsCreativesService {
202	rs := &AccountsCreativesService{s: s}
203	rs.DealAssociations = NewAccountsCreativesDealAssociationsService(s)
204	return rs
205}
206
207type AccountsCreativesService struct {
208	s *Service
209
210	DealAssociations *AccountsCreativesDealAssociationsService
211}
212
213func NewAccountsCreativesDealAssociationsService(s *Service) *AccountsCreativesDealAssociationsService {
214	rs := &AccountsCreativesDealAssociationsService{s: s}
215	return rs
216}
217
218type AccountsCreativesDealAssociationsService struct {
219	s *Service
220}
221
222func NewAccountsFinalizedProposalsService(s *Service) *AccountsFinalizedProposalsService {
223	rs := &AccountsFinalizedProposalsService{s: s}
224	return rs
225}
226
227type AccountsFinalizedProposalsService struct {
228	s *Service
229}
230
231func NewAccountsProductsService(s *Service) *AccountsProductsService {
232	rs := &AccountsProductsService{s: s}
233	return rs
234}
235
236type AccountsProductsService struct {
237	s *Service
238}
239
240func NewAccountsProposalsService(s *Service) *AccountsProposalsService {
241	rs := &AccountsProposalsService{s: s}
242	return rs
243}
244
245type AccountsProposalsService struct {
246	s *Service
247}
248
249func NewAccountsPublisherProfilesService(s *Service) *AccountsPublisherProfilesService {
250	rs := &AccountsPublisherProfilesService{s: s}
251	return rs
252}
253
254type AccountsPublisherProfilesService struct {
255	s *Service
256}
257
258func NewBiddersService(s *Service) *BiddersService {
259	rs := &BiddersService{s: s}
260	rs.Accounts = NewBiddersAccountsService(s)
261	rs.FilterSets = NewBiddersFilterSetsService(s)
262	return rs
263}
264
265type BiddersService struct {
266	s *Service
267
268	Accounts *BiddersAccountsService
269
270	FilterSets *BiddersFilterSetsService
271}
272
273func NewBiddersAccountsService(s *Service) *BiddersAccountsService {
274	rs := &BiddersAccountsService{s: s}
275	rs.FilterSets = NewBiddersAccountsFilterSetsService(s)
276	return rs
277}
278
279type BiddersAccountsService struct {
280	s *Service
281
282	FilterSets *BiddersAccountsFilterSetsService
283}
284
285func NewBiddersAccountsFilterSetsService(s *Service) *BiddersAccountsFilterSetsService {
286	rs := &BiddersAccountsFilterSetsService{s: s}
287	rs.BidMetrics = NewBiddersAccountsFilterSetsBidMetricsService(s)
288	rs.BidResponseErrors = NewBiddersAccountsFilterSetsBidResponseErrorsService(s)
289	rs.BidResponsesWithoutBids = NewBiddersAccountsFilterSetsBidResponsesWithoutBidsService(s)
290	rs.FilteredBidRequests = NewBiddersAccountsFilterSetsFilteredBidRequestsService(s)
291	rs.FilteredBids = NewBiddersAccountsFilterSetsFilteredBidsService(s)
292	rs.ImpressionMetrics = NewBiddersAccountsFilterSetsImpressionMetricsService(s)
293	rs.LosingBids = NewBiddersAccountsFilterSetsLosingBidsService(s)
294	rs.NonBillableWinningBids = NewBiddersAccountsFilterSetsNonBillableWinningBidsService(s)
295	return rs
296}
297
298type BiddersAccountsFilterSetsService struct {
299	s *Service
300
301	BidMetrics *BiddersAccountsFilterSetsBidMetricsService
302
303	BidResponseErrors *BiddersAccountsFilterSetsBidResponseErrorsService
304
305	BidResponsesWithoutBids *BiddersAccountsFilterSetsBidResponsesWithoutBidsService
306
307	FilteredBidRequests *BiddersAccountsFilterSetsFilteredBidRequestsService
308
309	FilteredBids *BiddersAccountsFilterSetsFilteredBidsService
310
311	ImpressionMetrics *BiddersAccountsFilterSetsImpressionMetricsService
312
313	LosingBids *BiddersAccountsFilterSetsLosingBidsService
314
315	NonBillableWinningBids *BiddersAccountsFilterSetsNonBillableWinningBidsService
316}
317
318func NewBiddersAccountsFilterSetsBidMetricsService(s *Service) *BiddersAccountsFilterSetsBidMetricsService {
319	rs := &BiddersAccountsFilterSetsBidMetricsService{s: s}
320	return rs
321}
322
323type BiddersAccountsFilterSetsBidMetricsService struct {
324	s *Service
325}
326
327func NewBiddersAccountsFilterSetsBidResponseErrorsService(s *Service) *BiddersAccountsFilterSetsBidResponseErrorsService {
328	rs := &BiddersAccountsFilterSetsBidResponseErrorsService{s: s}
329	return rs
330}
331
332type BiddersAccountsFilterSetsBidResponseErrorsService struct {
333	s *Service
334}
335
336func NewBiddersAccountsFilterSetsBidResponsesWithoutBidsService(s *Service) *BiddersAccountsFilterSetsBidResponsesWithoutBidsService {
337	rs := &BiddersAccountsFilterSetsBidResponsesWithoutBidsService{s: s}
338	return rs
339}
340
341type BiddersAccountsFilterSetsBidResponsesWithoutBidsService struct {
342	s *Service
343}
344
345func NewBiddersAccountsFilterSetsFilteredBidRequestsService(s *Service) *BiddersAccountsFilterSetsFilteredBidRequestsService {
346	rs := &BiddersAccountsFilterSetsFilteredBidRequestsService{s: s}
347	return rs
348}
349
350type BiddersAccountsFilterSetsFilteredBidRequestsService struct {
351	s *Service
352}
353
354func NewBiddersAccountsFilterSetsFilteredBidsService(s *Service) *BiddersAccountsFilterSetsFilteredBidsService {
355	rs := &BiddersAccountsFilterSetsFilteredBidsService{s: s}
356	rs.Creatives = NewBiddersAccountsFilterSetsFilteredBidsCreativesService(s)
357	rs.Details = NewBiddersAccountsFilterSetsFilteredBidsDetailsService(s)
358	return rs
359}
360
361type BiddersAccountsFilterSetsFilteredBidsService struct {
362	s *Service
363
364	Creatives *BiddersAccountsFilterSetsFilteredBidsCreativesService
365
366	Details *BiddersAccountsFilterSetsFilteredBidsDetailsService
367}
368
369func NewBiddersAccountsFilterSetsFilteredBidsCreativesService(s *Service) *BiddersAccountsFilterSetsFilteredBidsCreativesService {
370	rs := &BiddersAccountsFilterSetsFilteredBidsCreativesService{s: s}
371	return rs
372}
373
374type BiddersAccountsFilterSetsFilteredBidsCreativesService struct {
375	s *Service
376}
377
378func NewBiddersAccountsFilterSetsFilteredBidsDetailsService(s *Service) *BiddersAccountsFilterSetsFilteredBidsDetailsService {
379	rs := &BiddersAccountsFilterSetsFilteredBidsDetailsService{s: s}
380	return rs
381}
382
383type BiddersAccountsFilterSetsFilteredBidsDetailsService struct {
384	s *Service
385}
386
387func NewBiddersAccountsFilterSetsImpressionMetricsService(s *Service) *BiddersAccountsFilterSetsImpressionMetricsService {
388	rs := &BiddersAccountsFilterSetsImpressionMetricsService{s: s}
389	return rs
390}
391
392type BiddersAccountsFilterSetsImpressionMetricsService struct {
393	s *Service
394}
395
396func NewBiddersAccountsFilterSetsLosingBidsService(s *Service) *BiddersAccountsFilterSetsLosingBidsService {
397	rs := &BiddersAccountsFilterSetsLosingBidsService{s: s}
398	return rs
399}
400
401type BiddersAccountsFilterSetsLosingBidsService struct {
402	s *Service
403}
404
405func NewBiddersAccountsFilterSetsNonBillableWinningBidsService(s *Service) *BiddersAccountsFilterSetsNonBillableWinningBidsService {
406	rs := &BiddersAccountsFilterSetsNonBillableWinningBidsService{s: s}
407	return rs
408}
409
410type BiddersAccountsFilterSetsNonBillableWinningBidsService struct {
411	s *Service
412}
413
414func NewBiddersFilterSetsService(s *Service) *BiddersFilterSetsService {
415	rs := &BiddersFilterSetsService{s: s}
416	rs.BidMetrics = NewBiddersFilterSetsBidMetricsService(s)
417	rs.BidResponseErrors = NewBiddersFilterSetsBidResponseErrorsService(s)
418	rs.BidResponsesWithoutBids = NewBiddersFilterSetsBidResponsesWithoutBidsService(s)
419	rs.FilteredBidRequests = NewBiddersFilterSetsFilteredBidRequestsService(s)
420	rs.FilteredBids = NewBiddersFilterSetsFilteredBidsService(s)
421	rs.ImpressionMetrics = NewBiddersFilterSetsImpressionMetricsService(s)
422	rs.LosingBids = NewBiddersFilterSetsLosingBidsService(s)
423	rs.NonBillableWinningBids = NewBiddersFilterSetsNonBillableWinningBidsService(s)
424	return rs
425}
426
427type BiddersFilterSetsService struct {
428	s *Service
429
430	BidMetrics *BiddersFilterSetsBidMetricsService
431
432	BidResponseErrors *BiddersFilterSetsBidResponseErrorsService
433
434	BidResponsesWithoutBids *BiddersFilterSetsBidResponsesWithoutBidsService
435
436	FilteredBidRequests *BiddersFilterSetsFilteredBidRequestsService
437
438	FilteredBids *BiddersFilterSetsFilteredBidsService
439
440	ImpressionMetrics *BiddersFilterSetsImpressionMetricsService
441
442	LosingBids *BiddersFilterSetsLosingBidsService
443
444	NonBillableWinningBids *BiddersFilterSetsNonBillableWinningBidsService
445}
446
447func NewBiddersFilterSetsBidMetricsService(s *Service) *BiddersFilterSetsBidMetricsService {
448	rs := &BiddersFilterSetsBidMetricsService{s: s}
449	return rs
450}
451
452type BiddersFilterSetsBidMetricsService struct {
453	s *Service
454}
455
456func NewBiddersFilterSetsBidResponseErrorsService(s *Service) *BiddersFilterSetsBidResponseErrorsService {
457	rs := &BiddersFilterSetsBidResponseErrorsService{s: s}
458	return rs
459}
460
461type BiddersFilterSetsBidResponseErrorsService struct {
462	s *Service
463}
464
465func NewBiddersFilterSetsBidResponsesWithoutBidsService(s *Service) *BiddersFilterSetsBidResponsesWithoutBidsService {
466	rs := &BiddersFilterSetsBidResponsesWithoutBidsService{s: s}
467	return rs
468}
469
470type BiddersFilterSetsBidResponsesWithoutBidsService struct {
471	s *Service
472}
473
474func NewBiddersFilterSetsFilteredBidRequestsService(s *Service) *BiddersFilterSetsFilteredBidRequestsService {
475	rs := &BiddersFilterSetsFilteredBidRequestsService{s: s}
476	return rs
477}
478
479type BiddersFilterSetsFilteredBidRequestsService struct {
480	s *Service
481}
482
483func NewBiddersFilterSetsFilteredBidsService(s *Service) *BiddersFilterSetsFilteredBidsService {
484	rs := &BiddersFilterSetsFilteredBidsService{s: s}
485	rs.Creatives = NewBiddersFilterSetsFilteredBidsCreativesService(s)
486	rs.Details = NewBiddersFilterSetsFilteredBidsDetailsService(s)
487	return rs
488}
489
490type BiddersFilterSetsFilteredBidsService struct {
491	s *Service
492
493	Creatives *BiddersFilterSetsFilteredBidsCreativesService
494
495	Details *BiddersFilterSetsFilteredBidsDetailsService
496}
497
498func NewBiddersFilterSetsFilteredBidsCreativesService(s *Service) *BiddersFilterSetsFilteredBidsCreativesService {
499	rs := &BiddersFilterSetsFilteredBidsCreativesService{s: s}
500	return rs
501}
502
503type BiddersFilterSetsFilteredBidsCreativesService struct {
504	s *Service
505}
506
507func NewBiddersFilterSetsFilteredBidsDetailsService(s *Service) *BiddersFilterSetsFilteredBidsDetailsService {
508	rs := &BiddersFilterSetsFilteredBidsDetailsService{s: s}
509	return rs
510}
511
512type BiddersFilterSetsFilteredBidsDetailsService struct {
513	s *Service
514}
515
516func NewBiddersFilterSetsImpressionMetricsService(s *Service) *BiddersFilterSetsImpressionMetricsService {
517	rs := &BiddersFilterSetsImpressionMetricsService{s: s}
518	return rs
519}
520
521type BiddersFilterSetsImpressionMetricsService struct {
522	s *Service
523}
524
525func NewBiddersFilterSetsLosingBidsService(s *Service) *BiddersFilterSetsLosingBidsService {
526	rs := &BiddersFilterSetsLosingBidsService{s: s}
527	return rs
528}
529
530type BiddersFilterSetsLosingBidsService struct {
531	s *Service
532}
533
534func NewBiddersFilterSetsNonBillableWinningBidsService(s *Service) *BiddersFilterSetsNonBillableWinningBidsService {
535	rs := &BiddersFilterSetsNonBillableWinningBidsService{s: s}
536	return rs
537}
538
539type BiddersFilterSetsNonBillableWinningBidsService struct {
540	s *Service
541}
542
543// AbsoluteDateRange: An absolute date range, specified by its start
544// date and end date. The supported range of dates begins 30 days before
545// today and ends today. Validity checked upon filter set creation. If a
546// filter set with an absolute date range is run at a later date more
547// than 30 days after start_date, it will fail.
548type AbsoluteDateRange struct {
549	// EndDate: The end date of the range (inclusive). Must be within the 30
550	// days leading up to current date, and must be equal to or after
551	// start_date.
552	EndDate *Date `json:"endDate,omitempty"`
553
554	// StartDate: The start date of the range (inclusive). Must be within
555	// the 30 days leading up to current date, and must be equal to or
556	// before end_date.
557	StartDate *Date `json:"startDate,omitempty"`
558
559	// ForceSendFields is a list of field names (e.g. "EndDate") to
560	// unconditionally include in API requests. By default, fields with
561	// empty or default values are omitted from API requests. However, any
562	// non-pointer, non-interface field appearing in ForceSendFields will be
563	// sent to the server regardless of whether the field is empty or not.
564	// This may be used to include empty fields in Patch requests.
565	ForceSendFields []string `json:"-"`
566
567	// NullFields is a list of field names (e.g. "EndDate") to include in
568	// API requests with the JSON null value. By default, fields with empty
569	// values are omitted from API requests. However, any field with an
570	// empty value appearing in NullFields will be sent to the server as
571	// null. It is an error if a field in this list has a non-empty value.
572	// This may be used to include null fields in Patch requests.
573	NullFields []string `json:"-"`
574}
575
576func (s *AbsoluteDateRange) MarshalJSON() ([]byte, error) {
577	type NoMethod AbsoluteDateRange
578	raw := NoMethod(*s)
579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
580}
581
582// AcceptProposalRequest: Request to accept a proposal.
583type AcceptProposalRequest struct {
584	// ProposalRevision: The last known client revision number of the
585	// proposal.
586	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
587
588	// ForceSendFields is a list of field names (e.g. "ProposalRevision") to
589	// unconditionally include in API requests. By default, fields with
590	// empty or default values are omitted from API requests. However, any
591	// non-pointer, non-interface field appearing in ForceSendFields will be
592	// sent to the server regardless of whether the field is empty or not.
593	// This may be used to include empty fields in Patch requests.
594	ForceSendFields []string `json:"-"`
595
596	// NullFields is a list of field names (e.g. "ProposalRevision") to
597	// include in API requests with the JSON null value. By default, fields
598	// with empty values are omitted from API requests. However, any field
599	// with an empty value appearing in NullFields will be sent to the
600	// server as null. It is an error if a field in this list has a
601	// non-empty value. This may be used to include null fields in Patch
602	// requests.
603	NullFields []string `json:"-"`
604}
605
606func (s *AcceptProposalRequest) MarshalJSON() ([]byte, error) {
607	type NoMethod AcceptProposalRequest
608	raw := NoMethod(*s)
609	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
610}
611
612// AdSize: Represents size of a single ad slot, or a creative.
613type AdSize struct {
614	// Height: The height of the ad slot in pixels. This field will be
615	// present only when size type is `PIXEL`.
616	Height int64 `json:"height,omitempty,string"`
617
618	// SizeType: The size type of the ad slot.
619	//
620	// Possible values:
621	//   "SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined size type.
622	//   "PIXEL" - Ad slot with size specified by height and width in
623	// pixels.
624	//   "INTERSTITIAL" - Special size to describe an interstitial ad slot.
625	//   "NATIVE" - Native (mobile) ads rendered by the publisher.
626	//   "FLUID" - Fluid size (i.e., responsive size) can be resized
627	// automatically with the change of outside environment.
628	SizeType string `json:"sizeType,omitempty"`
629
630	// Width: The width of the ad slot in pixels. This field will be present
631	// only when size type is `PIXEL`.
632	Width int64 `json:"width,omitempty,string"`
633
634	// ForceSendFields is a list of field names (e.g. "Height") to
635	// unconditionally include in API requests. By default, fields with
636	// empty or default values are omitted from API requests. However, any
637	// non-pointer, non-interface field appearing in ForceSendFields will be
638	// sent to the server regardless of whether the field is empty or not.
639	// This may be used to include empty fields in Patch requests.
640	ForceSendFields []string `json:"-"`
641
642	// NullFields is a list of field names (e.g. "Height") to include in API
643	// requests with the JSON null value. By default, fields with empty
644	// values are omitted from API requests. However, any field with an
645	// empty value appearing in NullFields will be sent to the server as
646	// null. It is an error if a field in this list has a non-empty value.
647	// This may be used to include null fields in Patch requests.
648	NullFields []string `json:"-"`
649}
650
651func (s *AdSize) MarshalJSON() ([]byte, error) {
652	type NoMethod AdSize
653	raw := NoMethod(*s)
654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
655}
656
657// AdTechnologyProviders: Detected ad technology provider information.
658type AdTechnologyProviders struct {
659	// DetectedProviderIds: The detected ad technology provider IDs for this
660	// creative. See
661	// https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for
662	// mapping of provider ID to provided name, a privacy policy URL, and a
663	// list of domains which can be attributed to the provider. If the
664	// creative contains provider IDs that are outside of those listed in
665	// the
666	// `BidRequest.adslot.consented_providers_settings.consented_providers`
667	// field on the (Google bid
668	// protocol)[https://developers.google.com/authorized-buyers/rtb/download
669	// s/realtime-bidding-proto] and the
670	// `BidRequest.user.ext.consented_providers_settings.consented_providers`
671	//  field on the (OpenRTB
672	// protocol)[https://developers.google.com/authorized-buyers/rtb/download
673	// s/openrtb-adx-proto], and a bid is submitted with that creative for
674	// an impression that will serve to an EEA user, the bid will be
675	// filtered before the auction.
676	DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"`
677
678	// HasUnidentifiedProvider: Whether the creative contains an
679	// unidentified ad technology provider. If true for a given creative,
680	// any bid submitted with that creative for an impression that will
681	// serve to an EEA user will be filtered before the auction.
682	HasUnidentifiedProvider bool `json:"hasUnidentifiedProvider,omitempty"`
683
684	// ForceSendFields is a list of field names (e.g. "DetectedProviderIds")
685	// to unconditionally include in API requests. By default, fields with
686	// empty or default values are omitted from API requests. However, any
687	// non-pointer, non-interface field appearing in ForceSendFields will be
688	// sent to the server regardless of whether the field is empty or not.
689	// This may be used to include empty fields in Patch requests.
690	ForceSendFields []string `json:"-"`
691
692	// NullFields is a list of field names (e.g. "DetectedProviderIds") to
693	// include in API requests with the JSON null value. By default, fields
694	// with empty values are omitted from API requests. However, any field
695	// with an empty value appearing in NullFields will be sent to the
696	// server as null. It is an error if a field in this list has a
697	// non-empty value. This may be used to include null fields in Patch
698	// requests.
699	NullFields []string `json:"-"`
700}
701
702func (s *AdTechnologyProviders) MarshalJSON() ([]byte, error) {
703	type NoMethod AdTechnologyProviders
704	raw := NoMethod(*s)
705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
706}
707
708// AddDealAssociationRequest: A request for associating a deal and a
709// creative.
710type AddDealAssociationRequest struct {
711	// Association: The association between a creative and a deal that
712	// should be added.
713	Association *CreativeDealAssociation `json:"association,omitempty"`
714
715	// ForceSendFields is a list of field names (e.g. "Association") to
716	// unconditionally include in API requests. By default, fields with
717	// empty or default values are omitted from API requests. However, any
718	// non-pointer, non-interface field appearing in ForceSendFields will be
719	// sent to the server regardless of whether the field is empty or not.
720	// This may be used to include empty fields in Patch requests.
721	ForceSendFields []string `json:"-"`
722
723	// NullFields is a list of field names (e.g. "Association") to include
724	// in API requests with the JSON null value. By default, fields with
725	// empty values are omitted from API requests. However, any field with
726	// an empty value appearing in NullFields will be sent to the server as
727	// null. It is an error if a field in this list has a non-empty value.
728	// This may be used to include null fields in Patch requests.
729	NullFields []string `json:"-"`
730}
731
732func (s *AddDealAssociationRequest) MarshalJSON() ([]byte, error) {
733	type NoMethod AddDealAssociationRequest
734	raw := NoMethod(*s)
735	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
736}
737
738// AddNoteRequest: Request message for adding a note to a given
739// proposal.
740type AddNoteRequest struct {
741	// Note: Details of the note to add.
742	Note *Note `json:"note,omitempty"`
743
744	// ForceSendFields is a list of field names (e.g. "Note") to
745	// unconditionally include in API requests. By default, fields with
746	// empty or default values are omitted from API requests. However, any
747	// non-pointer, non-interface field appearing in ForceSendFields will be
748	// sent to the server regardless of whether the field is empty or not.
749	// This may be used to include empty fields in Patch requests.
750	ForceSendFields []string `json:"-"`
751
752	// NullFields is a list of field names (e.g. "Note") to include in API
753	// requests with the JSON null value. By default, fields with empty
754	// values are omitted from API requests. However, any field with an
755	// empty value appearing in NullFields will be sent to the server as
756	// null. It is an error if a field in this list has a non-empty value.
757	// This may be used to include null fields in Patch requests.
758	NullFields []string `json:"-"`
759}
760
761func (s *AddNoteRequest) MarshalJSON() ([]byte, error) {
762	type NoMethod AddNoteRequest
763	raw := NoMethod(*s)
764	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
765}
766
767// AppContext: Output only. The app type the restriction applies to for
768// mobile device.
769type AppContext struct {
770	// AppTypes: The app types this restriction applies to.
771	//
772	// Possible values:
773	//   "NATIVE" - Native app context.
774	//   "WEB" - Mobile web app context.
775	AppTypes []string `json:"appTypes,omitempty"`
776
777	// ForceSendFields is a list of field names (e.g. "AppTypes") to
778	// unconditionally include in API requests. By default, fields with
779	// empty or default values are omitted from API requests. However, any
780	// non-pointer, non-interface field appearing in ForceSendFields will be
781	// sent to the server regardless of whether the field is empty or not.
782	// This may be used to include empty fields in Patch requests.
783	ForceSendFields []string `json:"-"`
784
785	// NullFields is a list of field names (e.g. "AppTypes") to include in
786	// API requests with the JSON null value. By default, fields with empty
787	// values are omitted from API requests. However, any field with an
788	// empty value appearing in NullFields will be sent to the server as
789	// null. It is an error if a field in this list has a non-empty value.
790	// This may be used to include null fields in Patch requests.
791	NullFields []string `json:"-"`
792}
793
794func (s *AppContext) MarshalJSON() ([]byte, error) {
795	type NoMethod AppContext
796	raw := NoMethod(*s)
797	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
798}
799
800// AuctionContext: Output only. The auction type the restriction applies
801// to.
802type AuctionContext struct {
803	// AuctionTypes: The auction types this restriction applies to.
804	//
805	// Possible values:
806	//   "OPEN_AUCTION" - The restriction applies to open auction.
807	//   "DIRECT_DEALS" - The restriction applies to direct deals.
808	AuctionTypes []string `json:"auctionTypes,omitempty"`
809
810	// ForceSendFields is a list of field names (e.g. "AuctionTypes") to
811	// unconditionally include in API requests. By default, fields with
812	// empty or default values are omitted from API requests. However, any
813	// non-pointer, non-interface field appearing in ForceSendFields will be
814	// sent to the server regardless of whether the field is empty or not.
815	// This may be used to include empty fields in Patch requests.
816	ForceSendFields []string `json:"-"`
817
818	// NullFields is a list of field names (e.g. "AuctionTypes") to include
819	// in API requests with the JSON null value. By default, fields with
820	// empty values are omitted from API requests. However, any field with
821	// an empty value appearing in NullFields will be sent to the server as
822	// null. It is an error if a field in this list has a non-empty value.
823	// This may be used to include null fields in Patch requests.
824	NullFields []string `json:"-"`
825}
826
827func (s *AuctionContext) MarshalJSON() ([]byte, error) {
828	type NoMethod AuctionContext
829	raw := NoMethod(*s)
830	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
831}
832
833// BidMetricsRow: The set of metrics that are measured in numbers of
834// bids, representing how many bids with the specified dimension values
835// were considered eligible at each stage of the bidding funnel;
836type BidMetricsRow struct {
837	// Bids: The number of bids that Ad Exchange received from the buyer.
838	Bids *MetricValue `json:"bids,omitempty"`
839
840	// BidsInAuction: The number of bids that were permitted to compete in
841	// the auction.
842	BidsInAuction *MetricValue `json:"bidsInAuction,omitempty"`
843
844	// BilledImpressions: The number of bids for which the buyer was billed.
845	BilledImpressions *MetricValue `json:"billedImpressions,omitempty"`
846
847	// ImpressionsWon: The number of bids that won the auction.
848	ImpressionsWon *MetricValue `json:"impressionsWon,omitempty"`
849
850	// MeasurableImpressions: The number of bids for which the corresponding
851	// impression was measurable for viewability (as defined by Active
852	// View).
853	MeasurableImpressions *MetricValue `json:"measurableImpressions,omitempty"`
854
855	// ReachedQueries: The number of bids that won the auction and also won
856	// the mediation waterfall (if any).
857	ReachedQueries *MetricValue `json:"reachedQueries,omitempty"`
858
859	// RowDimensions: The values of all dimensions associated with metric
860	// values in this row.
861	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
862
863	// ViewableImpressions: The number of bids for which the corresponding
864	// impression was viewable (as defined by Active View).
865	ViewableImpressions *MetricValue `json:"viewableImpressions,omitempty"`
866
867	// ForceSendFields is a list of field names (e.g. "Bids") to
868	// unconditionally include in API requests. By default, fields with
869	// empty or default values are omitted from API requests. However, any
870	// non-pointer, non-interface field appearing in ForceSendFields will be
871	// sent to the server regardless of whether the field is empty or not.
872	// This may be used to include empty fields in Patch requests.
873	ForceSendFields []string `json:"-"`
874
875	// NullFields is a list of field names (e.g. "Bids") to include in API
876	// requests with the JSON null value. By default, fields with empty
877	// values are omitted from API requests. However, any field with an
878	// empty value appearing in NullFields will be sent to the server as
879	// null. It is an error if a field in this list has a non-empty value.
880	// This may be used to include null fields in Patch requests.
881	NullFields []string `json:"-"`
882}
883
884func (s *BidMetricsRow) MarshalJSON() ([]byte, error) {
885	type NoMethod BidMetricsRow
886	raw := NoMethod(*s)
887	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
888}
889
890// BidResponseWithoutBidsStatusRow: The number of impressions with the
891// specified dimension values that were considered to have no applicable
892// bids, as described by the specified status.
893type BidResponseWithoutBidsStatusRow struct {
894	// ImpressionCount: The number of impressions for which there was a bid
895	// response with the specified status.
896	ImpressionCount *MetricValue `json:"impressionCount,omitempty"`
897
898	// RowDimensions: The values of all dimensions associated with metric
899	// values in this row.
900	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
901
902	// Status: The status specifying why the bid responses were considered
903	// to have no applicable bids.
904	//
905	// Possible values:
906	//   "STATUS_UNSPECIFIED" - A placeholder for an undefined status. This
907	// value will never be returned in responses.
908	//   "RESPONSES_WITHOUT_BIDS" - The response had no bids.
909	//   "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT" - The response had no bids for
910	// the specified account, though it may have included bids on behalf of
911	// other accounts. Applies if: 1. Request is on behalf of a bidder and
912	// an account filter is present. 2. Request is on behalf of a child
913	// seat.
914	//   "RESPONSES_WITHOUT_BIDS_FOR_DEAL" - The response had no bids for
915	// the specified deal, though it may have included bids on other deals
916	// on behalf of the account to which the deal belongs. If request is on
917	// behalf of a bidder and an account filter is not present, this also
918	// includes responses that have bids on behalf of accounts other than
919	// the account to which the deal belongs.
920	Status string `json:"status,omitempty"`
921
922	// ForceSendFields is a list of field names (e.g. "ImpressionCount") to
923	// unconditionally include in API requests. By default, fields with
924	// empty or default values are omitted from API requests. However, any
925	// non-pointer, non-interface field appearing in ForceSendFields will be
926	// sent to the server regardless of whether the field is empty or not.
927	// This may be used to include empty fields in Patch requests.
928	ForceSendFields []string `json:"-"`
929
930	// NullFields is a list of field names (e.g. "ImpressionCount") to
931	// include in API requests with the JSON null value. By default, fields
932	// with empty values are omitted from API requests. However, any field
933	// with an empty value appearing in NullFields will be sent to the
934	// server as null. It is an error if a field in this list has a
935	// non-empty value. This may be used to include null fields in Patch
936	// requests.
937	NullFields []string `json:"-"`
938}
939
940func (s *BidResponseWithoutBidsStatusRow) MarshalJSON() ([]byte, error) {
941	type NoMethod BidResponseWithoutBidsStatusRow
942	raw := NoMethod(*s)
943	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
944}
945
946// Buyer: Represents a buyer of inventory. Each buyer is identified by a
947// unique Authorized Buyers account ID.
948type Buyer struct {
949	// AccountId: Authorized Buyers account ID of the buyer.
950	AccountId string `json:"accountId,omitempty"`
951
952	// ForceSendFields is a list of field names (e.g. "AccountId") to
953	// unconditionally include in API requests. By default, fields with
954	// empty or default values are omitted from API requests. However, any
955	// non-pointer, non-interface field appearing in ForceSendFields will be
956	// sent to the server regardless of whether the field is empty or not.
957	// This may be used to include empty fields in Patch requests.
958	ForceSendFields []string `json:"-"`
959
960	// NullFields is a list of field names (e.g. "AccountId") to include in
961	// API requests with the JSON null value. By default, fields with empty
962	// values are omitted from API requests. However, any field with an
963	// empty value appearing in NullFields will be sent to the server as
964	// null. It is an error if a field in this list has a non-empty value.
965	// This may be used to include null fields in Patch requests.
966	NullFields []string `json:"-"`
967}
968
969func (s *Buyer) MarshalJSON() ([]byte, error) {
970	type NoMethod Buyer
971	raw := NoMethod(*s)
972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
973}
974
975// CalloutStatusRow: The number of impressions with the specified
976// dimension values where the corresponding bid request or bid response
977// was not successful, as described by the specified callout status.
978type CalloutStatusRow struct {
979	// CalloutStatusId: The ID of the callout status. See
980	// callout-status-codes
981	// (https://developers.google.com/authorized-buyers/rtb/downloads/callout-status-codes).
982	CalloutStatusId int64 `json:"calloutStatusId,omitempty"`
983
984	// ImpressionCount: The number of impressions for which there was a bid
985	// request or bid response with the specified callout status.
986	ImpressionCount *MetricValue `json:"impressionCount,omitempty"`
987
988	// RowDimensions: The values of all dimensions associated with metric
989	// values in this row.
990	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
991
992	// ForceSendFields is a list of field names (e.g. "CalloutStatusId") to
993	// unconditionally include in API requests. By default, fields with
994	// empty or default values are omitted from API requests. However, any
995	// non-pointer, non-interface field appearing in ForceSendFields will be
996	// sent to the server regardless of whether the field is empty or not.
997	// This may be used to include empty fields in Patch requests.
998	ForceSendFields []string `json:"-"`
999
1000	// NullFields is a list of field names (e.g. "CalloutStatusId") to
1001	// include in API requests with the JSON null value. By default, fields
1002	// with empty values are omitted from API requests. However, any field
1003	// with an empty value appearing in NullFields will be sent to the
1004	// server as null. It is an error if a field in this list has a
1005	// non-empty value. This may be used to include null fields in Patch
1006	// requests.
1007	NullFields []string `json:"-"`
1008}
1009
1010func (s *CalloutStatusRow) MarshalJSON() ([]byte, error) {
1011	type NoMethod CalloutStatusRow
1012	raw := NoMethod(*s)
1013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1014}
1015
1016// CancelNegotiationRequest: Request to cancel an ongoing negotiation.
1017type CancelNegotiationRequest struct {
1018}
1019
1020// Client: A client resource represents a client buyer—an agency, a
1021// brand, or an advertiser customer of the sponsor buyer. Users
1022// associated with the client buyer have restricted access to the
1023// Marketplace and certain other sections of the Authorized Buyers UI
1024// based on the role granted to the client buyer. All fields are
1025// required unless otherwise specified.
1026type Client struct {
1027	// ClientAccountId: The globally-unique numerical ID of the client. The
1028	// value of this field is ignored in create and update operations.
1029	ClientAccountId int64 `json:"clientAccountId,omitempty,string"`
1030
1031	// ClientName: Name used to represent this client to publishers. You may
1032	// have multiple clients that map to the same entity, but for each
1033	// client the combination of `clientName` and entity must be unique. You
1034	// can specify this field as empty. Maximum length of 255 characters is
1035	// allowed.
1036	ClientName string `json:"clientName,omitempty"`
1037
1038	// EntityId: Numerical identifier of the client entity. The entity can
1039	// be an advertiser, a brand, or an agency. This identifier is unique
1040	// among all the entities with the same type. The value of this field is
1041	// ignored if the entity type is not provided. A list of all known
1042	// advertisers with their identifiers is available in the
1043	// advertisers.txt
1044	// (https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt)
1045	// file. A list of all known brands with their identifiers is available
1046	// in the brands.txt
1047	// (https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt)
1048	// file. A list of all known agencies with their identifiers is
1049	// available in the agencies.txt
1050	// (https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt)
1051	// file.
1052	EntityId int64 `json:"entityId,omitempty,string"`
1053
1054	// EntityName: The name of the entity. This field is automatically
1055	// fetched based on the type and ID. The value of this field is ignored
1056	// in create and update operations.
1057	EntityName string `json:"entityName,omitempty"`
1058
1059	// EntityType: An optional field for specifying the type of the client
1060	// entity: `ADVERTISER`, `BRAND`, or `AGENCY`.
1061	//
1062	// Possible values:
1063	//   "ENTITY_TYPE_UNSPECIFIED" - A placeholder for an undefined client
1064	// entity type. Should not be used.
1065	//   "ADVERTISER" - An advertiser.
1066	//   "BRAND" - A brand.
1067	//   "AGENCY" - An advertising agency.
1068	//   "ENTITY_TYPE_UNCLASSIFIED" - An explicit value for a client that
1069	// was not yet classified as any particular entity.
1070	EntityType string `json:"entityType,omitempty"`
1071
1072	// PartnerClientId: Optional arbitrary unique identifier of this client
1073	// buyer from the standpoint of its Ad Exchange sponsor buyer. This
1074	// field can be used to associate a client buyer with the identifier in
1075	// the namespace of its sponsor buyer, lookup client buyers by that
1076	// identifier and verify whether an Ad Exchange counterpart of a given
1077	// client buyer already exists. If present, must be unique among all the
1078	// client buyers for its Ad Exchange sponsor buyer.
1079	PartnerClientId string `json:"partnerClientId,omitempty"`
1080
1081	// Role: The role which is assigned to the client buyer. Each role
1082	// implies a set of permissions granted to the client. Must be one of
1083	// `CLIENT_DEAL_VIEWER`, `CLIENT_DEAL_NEGOTIATOR` or
1084	// `CLIENT_DEAL_APPROVER`.
1085	//
1086	// Possible values:
1087	//   "CLIENT_ROLE_UNSPECIFIED" - A placeholder for an undefined client
1088	// role.
1089	//   "CLIENT_DEAL_VIEWER" - Users associated with this client can see
1090	// publisher deal offers in the Marketplace. They can neither negotiate
1091	// proposals nor approve deals. If this client is visible to publishers,
1092	// they can send deal proposals to this client.
1093	//   "CLIENT_DEAL_NEGOTIATOR" - Users associated with this client can
1094	// respond to deal proposals sent to them by publishers. They can also
1095	// initiate deal proposals of their own.
1096	//   "CLIENT_DEAL_APPROVER" - Users associated with this client can
1097	// approve eligible deals on your behalf. Some deals may still
1098	// explicitly require publisher finalization. If this role is not
1099	// selected, the sponsor buyer will need to manually approve each of
1100	// their deals.
1101	Role string `json:"role,omitempty"`
1102
1103	// Status: The status of the client buyer.
1104	//
1105	// Possible values:
1106	//   "CLIENT_STATUS_UNSPECIFIED" - A placeholder for an undefined client
1107	// status.
1108	//   "DISABLED" - A client that is currently disabled.
1109	//   "ACTIVE" - A client that is currently active.
1110	Status string `json:"status,omitempty"`
1111
1112	// VisibleToSeller: Whether the client buyer will be visible to sellers.
1113	VisibleToSeller bool `json:"visibleToSeller,omitempty"`
1114
1115	// ServerResponse contains the HTTP response code and headers from the
1116	// server.
1117	googleapi.ServerResponse `json:"-"`
1118
1119	// ForceSendFields is a list of field names (e.g. "ClientAccountId") to
1120	// unconditionally include in API requests. By default, fields with
1121	// empty or default values are omitted from API requests. However, any
1122	// non-pointer, non-interface field appearing in ForceSendFields will be
1123	// sent to the server regardless of whether the field is empty or not.
1124	// This may be used to include empty fields in Patch requests.
1125	ForceSendFields []string `json:"-"`
1126
1127	// NullFields is a list of field names (e.g. "ClientAccountId") to
1128	// include in API requests with the JSON null value. By default, fields
1129	// with empty values are omitted from API requests. However, any field
1130	// with an empty value appearing in NullFields will be sent to the
1131	// server as null. It is an error if a field in this list has a
1132	// non-empty value. This may be used to include null fields in Patch
1133	// requests.
1134	NullFields []string `json:"-"`
1135}
1136
1137func (s *Client) MarshalJSON() ([]byte, error) {
1138	type NoMethod Client
1139	raw := NoMethod(*s)
1140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1141}
1142
1143// ClientUser: A client user is created under a client buyer and has
1144// restricted access to the Marketplace and certain other sections of
1145// the Authorized Buyers UI based on the role granted to the associated
1146// client buyer. The only way a new client user can be created is via
1147// accepting an email invitation (see the
1148// accounts.clients.invitations.create method). All fields are required
1149// unless otherwise specified.
1150type ClientUser struct {
1151	// ClientAccountId: Numerical account ID of the client buyer with which
1152	// the user is associated; the buyer must be a client of the current
1153	// sponsor buyer. The value of this field is ignored in an update
1154	// operation.
1155	ClientAccountId int64 `json:"clientAccountId,omitempty,string"`
1156
1157	// Email: User's email address. The value of this field is ignored in an
1158	// update operation.
1159	Email string `json:"email,omitempty"`
1160
1161	// Status: The status of the client user.
1162	//
1163	// Possible values:
1164	//   "USER_STATUS_UNSPECIFIED" - A placeholder for an undefined user
1165	// status.
1166	//   "PENDING" - A user who was already created but hasn't accepted the
1167	// invitation yet.
1168	//   "ACTIVE" - A user that is currently active.
1169	//   "DISABLED" - A user that is currently disabled.
1170	Status string `json:"status,omitempty"`
1171
1172	// UserId: The unique numerical ID of the client user that has accepted
1173	// an invitation. The value of this field is ignored in an update
1174	// operation.
1175	UserId int64 `json:"userId,omitempty,string"`
1176
1177	// ServerResponse contains the HTTP response code and headers from the
1178	// server.
1179	googleapi.ServerResponse `json:"-"`
1180
1181	// ForceSendFields is a list of field names (e.g. "ClientAccountId") to
1182	// unconditionally include in API requests. By default, fields with
1183	// empty or default values are omitted from API requests. However, any
1184	// non-pointer, non-interface field appearing in ForceSendFields will be
1185	// sent to the server regardless of whether the field is empty or not.
1186	// This may be used to include empty fields in Patch requests.
1187	ForceSendFields []string `json:"-"`
1188
1189	// NullFields is a list of field names (e.g. "ClientAccountId") to
1190	// include in API requests with the JSON null value. By default, fields
1191	// with empty values are omitted from API requests. However, any field
1192	// with an empty value appearing in NullFields will be sent to the
1193	// server as null. It is an error if a field in this list has a
1194	// non-empty value. This may be used to include null fields in Patch
1195	// requests.
1196	NullFields []string `json:"-"`
1197}
1198
1199func (s *ClientUser) MarshalJSON() ([]byte, error) {
1200	type NoMethod ClientUser
1201	raw := NoMethod(*s)
1202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1203}
1204
1205// ClientUserInvitation: An invitation for a new client user to get
1206// access to the Authorized Buyers UI. All fields are required unless
1207// otherwise specified.
1208type ClientUserInvitation struct {
1209	// ClientAccountId: Numerical account ID of the client buyer that the
1210	// invited user is associated with. The value of this field is ignored
1211	// in create operations.
1212	ClientAccountId int64 `json:"clientAccountId,omitempty,string"`
1213
1214	// Email: The email address to which the invitation is sent. Email
1215	// addresses should be unique among all client users under each sponsor
1216	// buyer.
1217	Email string `json:"email,omitempty"`
1218
1219	// InvitationId: The unique numerical ID of the invitation that is sent
1220	// to the user. The value of this field is ignored in create operations.
1221	InvitationId int64 `json:"invitationId,omitempty,string"`
1222
1223	// ServerResponse contains the HTTP response code and headers from the
1224	// server.
1225	googleapi.ServerResponse `json:"-"`
1226
1227	// ForceSendFields is a list of field names (e.g. "ClientAccountId") to
1228	// unconditionally include in API requests. By default, fields with
1229	// empty or default values are omitted from API requests. However, any
1230	// non-pointer, non-interface field appearing in ForceSendFields will be
1231	// sent to the server regardless of whether the field is empty or not.
1232	// This may be used to include empty fields in Patch requests.
1233	ForceSendFields []string `json:"-"`
1234
1235	// NullFields is a list of field names (e.g. "ClientAccountId") to
1236	// include in API requests with the JSON null value. By default, fields
1237	// with empty values are omitted from API requests. However, any field
1238	// with an empty value appearing in NullFields will be sent to the
1239	// server as null. It is an error if a field in this list has a
1240	// non-empty value. This may be used to include null fields in Patch
1241	// requests.
1242	NullFields []string `json:"-"`
1243}
1244
1245func (s *ClientUserInvitation) MarshalJSON() ([]byte, error) {
1246	type NoMethod ClientUserInvitation
1247	raw := NoMethod(*s)
1248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1249}
1250
1251// CompleteSetupRequest: Request message for indicating that the
1252// proposal's setup step is complete.
1253type CompleteSetupRequest struct {
1254}
1255
1256// ContactInformation: Contains information on how a buyer or seller can
1257// be reached.
1258type ContactInformation struct {
1259	// Email: Email address for the contact.
1260	Email string `json:"email,omitempty"`
1261
1262	// Name: The name of the contact.
1263	Name string `json:"name,omitempty"`
1264
1265	// ForceSendFields is a list of field names (e.g. "Email") to
1266	// unconditionally include in API requests. By default, fields with
1267	// empty or default values are omitted from API requests. However, any
1268	// non-pointer, non-interface field appearing in ForceSendFields will be
1269	// sent to the server regardless of whether the field is empty or not.
1270	// This may be used to include empty fields in Patch requests.
1271	ForceSendFields []string `json:"-"`
1272
1273	// NullFields is a list of field names (e.g. "Email") to include in API
1274	// requests with the JSON null value. By default, fields with empty
1275	// values are omitted from API requests. However, any field with an
1276	// empty value appearing in NullFields will be sent to the server as
1277	// null. It is an error if a field in this list has a non-empty value.
1278	// This may be used to include null fields in Patch requests.
1279	NullFields []string `json:"-"`
1280}
1281
1282func (s *ContactInformation) MarshalJSON() ([]byte, error) {
1283	type NoMethod ContactInformation
1284	raw := NoMethod(*s)
1285	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1286}
1287
1288// Correction: Output only. Shows any corrections that were applied to
1289// this creative.
1290type Correction struct {
1291	// Contexts: The contexts for the correction.
1292	Contexts []*ServingContext `json:"contexts,omitempty"`
1293
1294	// Details: Additional details about what was corrected.
1295	Details []string `json:"details,omitempty"`
1296
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.
1301	// Refer to the details for more information.
1302	//   "VENDOR_IDS_ADDED" - The ad's declared vendors did not match the
1303	// vendors that were detected. The detected vendors were added.
1304	//   "SSL_ATTRIBUTE_REMOVED" - The ad had the SSL attribute declared but
1305	// was not SSL-compliant. The SSL attribute was removed.
1306	//   "FLASH_FREE_ATTRIBUTE_REMOVED" - The ad was declared as Flash-free
1307	// but contained Flash, so the Flash-free attribute was removed.
1308	//   "FLASH_FREE_ATTRIBUTE_ADDED" - The ad was not declared as
1309	// Flash-free but it did not reference any flash content, so the
1310	// Flash-free attribute was added.
1311	//   "REQUIRED_ATTRIBUTE_ADDED" - The ad did not declare a required
1312	// creative attribute. The attribute was added.
1313	//   "REQUIRED_VENDOR_ADDED" - The ad did not declare a required
1314	// technology vendor. The technology vendor was added.
1315	//   "SSL_ATTRIBUTE_ADDED" - The ad did not declare the SSL attribute
1316	// but was SSL-compliant, so the SSL attribute was added.
1317	//   "IN_BANNER_VIDEO_ATTRIBUTE_ADDED" - Properties consistent with
1318	// In-banner video were found, so an In-Banner Video attribute was
1319	// added.
1320	//   "MRAID_ATTRIBUTE_ADDED" - The ad makes calls to the MRAID API so
1321	// the MRAID attribute was added.
1322	//   "FLASH_ATTRIBUTE_REMOVED" - The ad unnecessarily declared the Flash
1323	// attribute, so the Flash attribute was removed.
1324	//   "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" - The ad contains video content.
1325	Type string `json:"type,omitempty"`
1326
1327	// ForceSendFields is a list of field names (e.g. "Contexts") to
1328	// unconditionally include in API requests. By default, fields with
1329	// empty or default values are omitted from API requests. However, any
1330	// non-pointer, non-interface field appearing in ForceSendFields will be
1331	// sent to the server regardless of whether the field is empty or not.
1332	// This may be used to include empty fields in Patch requests.
1333	ForceSendFields []string `json:"-"`
1334
1335	// NullFields is a list of field names (e.g. "Contexts") to include in
1336	// API requests with the JSON null value. By default, fields with empty
1337	// values are omitted from API requests. However, any field with an
1338	// empty value appearing in NullFields will be sent to the server as
1339	// null. It is an error if a field in this list has a non-empty value.
1340	// This may be used to include null fields in Patch requests.
1341	NullFields []string `json:"-"`
1342}
1343
1344func (s *Correction) MarshalJSON() ([]byte, error) {
1345	type NoMethod Correction
1346	raw := NoMethod(*s)
1347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1348}
1349
1350// Creative: A creative and its classification data.
1351type Creative struct {
1352	// AccountId: The account that this creative belongs to. Can be used to
1353	// filter the response of the creatives.list method.
1354	AccountId string `json:"accountId,omitempty"`
1355
1356	// AdChoicesDestinationUrl: The link to AdChoices destination page.
1357	AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"`
1358
1359	// AdTechnologyProviders: Output only. The detected ad technology
1360	// providers.
1361	AdTechnologyProviders *AdTechnologyProviders `json:"adTechnologyProviders,omitempty"`
1362
1363	// AdvertiserName: The name of the company being advertised in the
1364	// creative.
1365	AdvertiserName string `json:"advertiserName,omitempty"`
1366
1367	// AgencyId: The agency ID for this creative.
1368	AgencyId int64 `json:"agencyId,omitempty,string"`
1369
1370	// ApiUpdateTime: Output only. The last update timestamp of the creative
1371	// via API.
1372	ApiUpdateTime string `json:"apiUpdateTime,omitempty"`
1373
1374	// Attributes: All attributes for the ads that may be shown from this
1375	// creative. Can be used to filter the response of the creatives.list
1376	// method.
1377	//
1378	// Possible values:
1379	//   "ATTRIBUTE_UNSPECIFIED" - Do not use. This is a placeholder value
1380	// only.
1381	//   "IMAGE_RICH_MEDIA" - The creative is of type image/rich media. For
1382	// pretargeting.
1383	//   "ADOBE_FLASH_FLV" - The creative is of video type Adobe Flash FLV.
1384	// For pretargeting.
1385	//   "IS_TAGGED" - The creative is tagged.
1386	//   "IS_COOKIE_TARGETED" - The creative is cookie targeted.
1387	//   "IS_USER_INTEREST_TARGETED" - The creative is user interest
1388	// targeted.
1389	//   "EXPANDING_DIRECTION_NONE" - The creative does not expand.
1390	//   "EXPANDING_DIRECTION_UP" - The creative expands up.
1391	//   "EXPANDING_DIRECTION_DOWN" - The creative expands down.
1392	//   "EXPANDING_DIRECTION_LEFT" - The creative expands left.
1393	//   "EXPANDING_DIRECTION_RIGHT" - The creative expands right.
1394	//   "EXPANDING_DIRECTION_UP_LEFT" - The creative expands up and left.
1395	//   "EXPANDING_DIRECTION_UP_RIGHT" - The creative expands up and right.
1396	//   "EXPANDING_DIRECTION_DOWN_LEFT" - The creative expands down and
1397	// left.
1398	//   "EXPANDING_DIRECTION_DOWN_RIGHT" - The creative expands down and
1399	// right.
1400	//   "CREATIVE_TYPE_HTML" - The creative type is HTML.
1401	//   "CREATIVE_TYPE_VAST_VIDEO" - The creative type is VAST video.
1402	//   "EXPANDING_DIRECTION_UP_OR_DOWN" - The creative expands up or down.
1403	//   "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - The creative expands left or
1404	// right.
1405	//   "EXPANDING_DIRECTION_ANY_DIAGONAL" - The creative expands on any
1406	// diagonal.
1407	//   "EXPANDING_ACTION_ROLLOVER_TO_EXPAND" - The creative expands when
1408	// rolled over.
1409	//   "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH" - The instream vast video
1410	// type is vpaid flash.
1411	//   "RICH_MEDIA_CAPABILITY_TYPE_MRAID" - The creative is MRAID.
1412	//   "RICH_MEDIA_CAPABILITY_TYPE_FLASH" - The creative is Flash.
1413	//   "RICH_MEDIA_CAPABILITY_TYPE_HTML5" - The creative is HTML5.
1414	//   "SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST
1415	// video type of skippable instream video. For pretargeting.
1416	//   "RICH_MEDIA_CAPABILITY_TYPE_SSL" - The creative is SSL.
1417	//   "RICH_MEDIA_CAPABILITY_TYPE_NON_SSL" - The creative is non-SSL.
1418	//   "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL" - The creative is an
1419	// interstitial.
1420	//   "NON_SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST
1421	// video type of non-skippable instream video. For pretargeting.
1422	//   "NATIVE_ELIGIBILITY_ELIGIBLE" - The creative is eligible for
1423	// native.
1424	//   "NON_VPAID" - The creative has an instream VAST video type of
1425	// non-VPAID. For pretargeting.
1426	//   "NATIVE_ELIGIBILITY_NOT_ELIGIBLE" - The creative is not eligible
1427	// for native.
1428	//   "ANY_INTERSTITIAL" - The creative has an interstitial size of any
1429	// interstitial. For pretargeting.
1430	//   "NON_INTERSTITIAL" - The creative has an interstitial size of non
1431	// interstitial. For pretargeting.
1432	//   "IN_BANNER_VIDEO" - The video type is in-banner video.
1433	//   "RENDERING_SIZELESS_ADX" - The creative can dynamically resize to
1434	// fill a variety of slot sizes.
1435	//   "OMSDK_1_0" - The open measurement SDK is supported.
1436	Attributes []string `json:"attributes,omitempty"`
1437
1438	// ClickThroughUrls: The set of destination URLs for the creative.
1439	ClickThroughUrls []string `json:"clickThroughUrls,omitempty"`
1440
1441	// Corrections: Output only. Shows any corrections that were applied to
1442	// this creative.
1443	Corrections []*Correction `json:"corrections,omitempty"`
1444
1445	// CreativeId: The buyer-defined creative ID of this creative. Can be
1446	// used to filter the response of the creatives.list method.
1447	CreativeId string `json:"creativeId,omitempty"`
1448
1449	// DealsStatus: Output only. The top-level deals status of this
1450	// creative. If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or
1451	// 'ALL') in serving_restrictions will also exist. Note that this may be
1452	// nuanced with other contextual restrictions, in which case, it may be
1453	// preferable to read from serving_restrictions directly. Can be used to
1454	// filter the response of the creatives.list method.
1455	//
1456	// Possible values:
1457	//   "STATUS_UNSPECIFIED" - The status is unknown.
1458	//   "NOT_CHECKED" - The creative has not been checked.
1459	//   "CONDITIONALLY_APPROVED" - The creative has been conditionally
1460	// approved. See serving_restrictions for details.
1461	//   "APPROVED" - The creative has been approved.
1462	//   "DISAPPROVED" - The creative has been disapproved.
1463	//   "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently
1464	// not used.
1465	//   "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1.
1466	// Currently not used.
1467	DealsStatus string `json:"dealsStatus,omitempty"`
1468
1469	// DeclaredClickThroughUrls: The set of declared destination URLs for
1470	// the creative.
1471	DeclaredClickThroughUrls []string `json:"declaredClickThroughUrls,omitempty"`
1472
1473	// DetectedAdvertiserIds: Output only. Detected advertiser IDs, if any.
1474	DetectedAdvertiserIds googleapi.Int64s `json:"detectedAdvertiserIds,omitempty"`
1475
1476	// DetectedDomains: Output only. The detected domains for this creative.
1477	DetectedDomains []string `json:"detectedDomains,omitempty"`
1478
1479	// DetectedLanguages: Output only. The detected languages for this
1480	// creative. The order is arbitrary. The codes are 2 or 5 characters and
1481	// are documented at
1482	// https://developers.google.com/adwords/api/docs/appendix/languagecodes.
1483	DetectedLanguages []string `json:"detectedLanguages,omitempty"`
1484
1485	// DetectedProductCategories: Output only. Detected product categories,
1486	// if any. See the ad-product-categories.txt file in the technical
1487	// documentation for a list of IDs.
1488	DetectedProductCategories []int64 `json:"detectedProductCategories,omitempty"`
1489
1490	// DetectedSensitiveCategories: Output only. Detected sensitive
1491	// categories, if any. See the ad-sensitive-categories.txt file in the
1492	// technical documentation for a list of IDs. You should use these IDs
1493	// along with the excluded-sensitive-category field in the bid request
1494	// to filter your bids.
1495	DetectedSensitiveCategories []int64 `json:"detectedSensitiveCategories,omitempty"`
1496
1497	// Html: An HTML creative.
1498	Html *HtmlContent `json:"html,omitempty"`
1499
1500	// ImpressionTrackingUrls: The set of URLs to be called to record an
1501	// impression.
1502	ImpressionTrackingUrls []string `json:"impressionTrackingUrls,omitempty"`
1503
1504	// Native: A native creative.
1505	Native *NativeContent `json:"native,omitempty"`
1506
1507	// OpenAuctionStatus: Output only. The top-level open auction status of
1508	// this creative. If disapproved, an entry for 'auctionType =
1509	// OPEN_AUCTION' (or 'ALL') in serving_restrictions will also exist.
1510	// Note that this may be nuanced with other contextual restrictions, in
1511	// which case, it may be preferable to read from serving_restrictions
1512	// directly. Can be used to filter the response of the creatives.list
1513	// method.
1514	//
1515	// Possible values:
1516	//   "STATUS_UNSPECIFIED" - The status is unknown.
1517	//   "NOT_CHECKED" - The creative has not been checked.
1518	//   "CONDITIONALLY_APPROVED" - The creative has been conditionally
1519	// approved. See serving_restrictions for details.
1520	//   "APPROVED" - The creative has been approved.
1521	//   "DISAPPROVED" - The creative has been disapproved.
1522	//   "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently
1523	// not used.
1524	//   "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1.
1525	// Currently not used.
1526	OpenAuctionStatus string `json:"openAuctionStatus,omitempty"`
1527
1528	// RestrictedCategories: All restricted categories for the ads that may
1529	// be shown from this creative.
1530	//
1531	// Possible values:
1532	//   "NO_RESTRICTED_CATEGORIES" - The ad has no restricted categories
1533	//   "ALCOHOL" - The alcohol restricted category.
1534	RestrictedCategories []string `json:"restrictedCategories,omitempty"`
1535
1536	// ServingRestrictions: Output only. The granular status of this ad in
1537	// specific contexts. A context here relates to where something
1538	// ultimately serves (for example, a physical location, a platform, an
1539	// HTTPS vs HTTP request, or the type of auction).
1540	ServingRestrictions []*ServingRestriction `json:"servingRestrictions,omitempty"`
1541
1542	// VendorIds: All vendor IDs for the ads that may be shown from this
1543	// creative. See
1544	// https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for
1545	// possible values.
1546	VendorIds []int64 `json:"vendorIds,omitempty"`
1547
1548	// Version: Output only. The version of this creative.
1549	Version int64 `json:"version,omitempty"`
1550
1551	// Video: A video creative.
1552	Video *VideoContent `json:"video,omitempty"`
1553
1554	// ServerResponse contains the HTTP response code and headers from the
1555	// server.
1556	googleapi.ServerResponse `json:"-"`
1557
1558	// ForceSendFields is a list of field names (e.g. "AccountId") to
1559	// unconditionally include in API requests. By default, fields with
1560	// empty or default values are omitted from API requests. However, any
1561	// non-pointer, non-interface field appearing in ForceSendFields will be
1562	// sent to the server regardless of whether the field is empty or not.
1563	// This may be used to include empty fields in Patch requests.
1564	ForceSendFields []string `json:"-"`
1565
1566	// NullFields is a list of field names (e.g. "AccountId") to include in
1567	// API requests with the JSON null value. By default, fields with empty
1568	// values are omitted from API requests. However, any field with an
1569	// empty value appearing in NullFields will be sent to the server as
1570	// null. It is an error if a field in this list has a non-empty value.
1571	// This may be used to include null fields in Patch requests.
1572	NullFields []string `json:"-"`
1573}
1574
1575func (s *Creative) MarshalJSON() ([]byte, error) {
1576	type NoMethod Creative
1577	raw := NoMethod(*s)
1578	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1579}
1580
1581// CreativeDealAssociation: The association between a creative and a
1582// deal.
1583type CreativeDealAssociation struct {
1584	// AccountId: The account the creative belongs to.
1585	AccountId string `json:"accountId,omitempty"`
1586
1587	// CreativeId: The ID of the creative associated with the deal.
1588	CreativeId string `json:"creativeId,omitempty"`
1589
1590	// DealsId: The externalDealId for the deal associated with the
1591	// creative.
1592	DealsId string `json:"dealsId,omitempty"`
1593
1594	// ForceSendFields is a list of field names (e.g. "AccountId") to
1595	// unconditionally include in API requests. By default, fields with
1596	// empty or default values are omitted from API requests. However, any
1597	// non-pointer, non-interface field appearing in ForceSendFields will be
1598	// sent to the server regardless of whether the field is empty or not.
1599	// This may be used to include empty fields in Patch requests.
1600	ForceSendFields []string `json:"-"`
1601
1602	// NullFields is a list of field names (e.g. "AccountId") to include in
1603	// API requests with the JSON null value. By default, fields with empty
1604	// values are omitted from API requests. However, any field with an
1605	// empty value appearing in NullFields will be sent to the server as
1606	// null. It is an error if a field in this list has a non-empty value.
1607	// This may be used to include null fields in Patch requests.
1608	NullFields []string `json:"-"`
1609}
1610
1611func (s *CreativeDealAssociation) MarshalJSON() ([]byte, error) {
1612	type NoMethod CreativeDealAssociation
1613	raw := NoMethod(*s)
1614	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1615}
1616
1617// CreativeRestrictions: Represents creative restrictions associated to
1618// Programmatic Guaranteed/ Preferred Deal in Ad Manager. This doesn't
1619// apply to Private Auction and AdX Preferred Deals.
1620type CreativeRestrictions struct {
1621	// CreativeFormat: The format of the environment that the creatives will
1622	// be displayed in.
1623	//
1624	// Possible values:
1625	//   "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an undefined
1626	// creative format.
1627	//   "DISPLAY" - A creative that will be displayed in environments such
1628	// as a browser.
1629	//   "VIDEO" - A video creative that will be displayed in environments
1630	// such as a video player.
1631	CreativeFormat string `json:"creativeFormat,omitempty"`
1632
1633	CreativeSpecifications []*CreativeSpecification `json:"creativeSpecifications,omitempty"`
1634
1635	// SkippableAdType: Skippable video ads allow viewers to skip ads after
1636	// 5 seconds.
1637	//
1638	// Possible values:
1639	//   "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined
1640	// skippable ad type.
1641	//   "SKIPPABLE" - This video ad can be skipped after 5 seconds.
1642	//   "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds,
1643	// and is counted as engaged view after 30 seconds. The creative is
1644	// hosted on YouTube only, and viewcount of the YouTube video increments
1645	// after the engaged view.
1646	//   "NOT_SKIPPABLE" - This video ad is not skippable.
1647	SkippableAdType string `json:"skippableAdType,omitempty"`
1648
1649	// ForceSendFields is a list of field names (e.g. "CreativeFormat") to
1650	// unconditionally include in API requests. By default, fields with
1651	// empty or default values are omitted from API requests. However, any
1652	// non-pointer, non-interface field appearing in ForceSendFields will be
1653	// sent to the server regardless of whether the field is empty or not.
1654	// This may be used to include empty fields in Patch requests.
1655	ForceSendFields []string `json:"-"`
1656
1657	// NullFields is a list of field names (e.g. "CreativeFormat") to
1658	// include in API requests with the JSON null value. By default, fields
1659	// with empty values are omitted from API requests. However, any field
1660	// with an empty value appearing in NullFields will be sent to the
1661	// server as null. It is an error if a field in this list has a
1662	// non-empty value. This may be used to include null fields in Patch
1663	// requests.
1664	NullFields []string `json:"-"`
1665}
1666
1667func (s *CreativeRestrictions) MarshalJSON() ([]byte, error) {
1668	type NoMethod CreativeRestrictions
1669	raw := NoMethod(*s)
1670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1671}
1672
1673// CreativeSize: Specifies the size of the creative.
1674type CreativeSize struct {
1675	// AllowedFormats: What formats are allowed by the publisher. If this
1676	// repeated field is empty then all formats are allowed. For example, if
1677	// this field contains AllowedFormatType.AUDIO then the publisher only
1678	// allows an audio ad (without any video).
1679	//
1680	// Possible values:
1681	//   "UNKNOWN" - A placeholder for an undefined allowed format.
1682	//   "AUDIO" - An audio-only ad (without any video).
1683	AllowedFormats []string `json:"allowedFormats,omitempty"`
1684
1685	// CompanionSizes: For video creatives specifies the sizes of companion
1686	// ads (if present). Companion sizes may be filled in only when
1687	// creative_size_type = VIDEO
1688	CompanionSizes []*Size `json:"companionSizes,omitempty"`
1689
1690	// CreativeSizeType: The creative size type.
1691	//
1692	// Possible values:
1693	//   "CREATIVE_SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined
1694	// creative size type.
1695	//   "REGULAR" - The creative is a regular desktop creative.
1696	//   "INTERSTITIAL" - The creative is an interstitial creative.
1697	//   "VIDEO" - The creative is a video creative.
1698	//   "NATIVE" - The creative is a native (mobile) creative.
1699	CreativeSizeType string `json:"creativeSizeType,omitempty"`
1700
1701	// NativeTemplate: Output only. The native template for this creative.
1702	// It will have a value only if creative_size_type =
1703	// CreativeSizeType.NATIVE.
1704	//
1705	// Possible values:
1706	//   "UNKNOWN_NATIVE_TEMPLATE" - A placeholder for an undefined native
1707	// template.
1708	//   "NATIVE_CONTENT_AD" - The creative is linked to native content ad.
1709	//   "NATIVE_APP_INSTALL_AD" - The creative is linked to native app
1710	// install ad.
1711	//   "NATIVE_VIDEO_CONTENT_AD" - The creative is linked to native video
1712	// content ad.
1713	//   "NATIVE_VIDEO_APP_INSTALL_AD" - The creative is linked to native
1714	// video app install ad.
1715	NativeTemplate string `json:"nativeTemplate,omitempty"`
1716
1717	// Size: For regular or video creative size type, specifies the size of
1718	// the creative
1719	Size *Size `json:"size,omitempty"`
1720
1721	// SkippableAdType: The type of skippable ad for this creative. It will
1722	// have a value only if creative_size_type = CreativeSizeType.VIDEO.
1723	//
1724	// Possible values:
1725	//   "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined
1726	// skippable ad type.
1727	//   "GENERIC" - This video ad can be skipped after 5 seconds.
1728	//   "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds,
1729	// and count as engaged view after 30 seconds. The creative is hosted on
1730	// YouTube only, and viewcount of the YouTube video increments after the
1731	// engaged view.
1732	//   "NOT_SKIPPABLE" - This video ad is not skippable.
1733	SkippableAdType string `json:"skippableAdType,omitempty"`
1734
1735	// ForceSendFields is a list of field names (e.g. "AllowedFormats") to
1736	// unconditionally include in API requests. By default, fields with
1737	// empty or default values are omitted from API requests. However, any
1738	// non-pointer, non-interface field appearing in ForceSendFields will be
1739	// sent to the server regardless of whether the field is empty or not.
1740	// This may be used to include empty fields in Patch requests.
1741	ForceSendFields []string `json:"-"`
1742
1743	// NullFields is a list of field names (e.g. "AllowedFormats") to
1744	// include in API requests with the JSON null value. By default, fields
1745	// with empty values are omitted from API requests. However, any field
1746	// with an empty value appearing in NullFields will be sent to the
1747	// server as null. It is an error if a field in this list has a
1748	// non-empty value. This may be used to include null fields in Patch
1749	// requests.
1750	NullFields []string `json:"-"`
1751}
1752
1753func (s *CreativeSize) MarshalJSON() ([]byte, error) {
1754	type NoMethod CreativeSize
1755	raw := NoMethod(*s)
1756	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1757}
1758
1759// CreativeSpecification: Represents information for a creative that is
1760// associated with a Programmatic Guaranteed/Preferred Deal in Ad
1761// Manager.
1762type CreativeSpecification struct {
1763	// CreativeCompanionSizes: Companion sizes may be filled in only when
1764	// this is a video creative.
1765	CreativeCompanionSizes []*AdSize `json:"creativeCompanionSizes,omitempty"`
1766
1767	// CreativeSize: The size of the creative.
1768	CreativeSize *AdSize `json:"creativeSize,omitempty"`
1769
1770	// ForceSendFields is a list of field names (e.g.
1771	// "CreativeCompanionSizes") to unconditionally include in API requests.
1772	// By default, fields with empty or default values are omitted from API
1773	// requests. However, any non-pointer, non-interface field appearing in
1774	// ForceSendFields will be sent to the server regardless of whether the
1775	// field is empty or not. This may be used to include empty fields in
1776	// Patch requests.
1777	ForceSendFields []string `json:"-"`
1778
1779	// NullFields is a list of field names (e.g. "CreativeCompanionSizes")
1780	// to include in API requests with the JSON null value. By default,
1781	// fields with empty values are omitted from API requests. However, any
1782	// field with an empty value appearing in NullFields will be sent to the
1783	// server as null. It is an error if a field in this list has a
1784	// non-empty value. This may be used to include null fields in Patch
1785	// requests.
1786	NullFields []string `json:"-"`
1787}
1788
1789func (s *CreativeSpecification) MarshalJSON() ([]byte, error) {
1790	type NoMethod CreativeSpecification
1791	raw := NoMethod(*s)
1792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1793}
1794
1795// CreativeStatusRow: The number of bids with the specified dimension
1796// values that did not win the auction (either were filtered pre-auction
1797// or lost the auction), as described by the specified creative status.
1798type CreativeStatusRow struct {
1799	// BidCount: The number of bids with the specified status.
1800	BidCount *MetricValue `json:"bidCount,omitempty"`
1801
1802	// CreativeStatusId: The ID of the creative status. See
1803	// creative-status-codes
1804	// (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
1805	CreativeStatusId int64 `json:"creativeStatusId,omitempty"`
1806
1807	// RowDimensions: The values of all dimensions associated with metric
1808	// values in this row.
1809	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
1810
1811	// ForceSendFields is a list of field names (e.g. "BidCount") to
1812	// unconditionally include in API requests. By default, fields with
1813	// empty or default values are omitted from API requests. However, any
1814	// non-pointer, non-interface field appearing in ForceSendFields will be
1815	// sent to the server regardless of whether the field is empty or not.
1816	// This may be used to include empty fields in Patch requests.
1817	ForceSendFields []string `json:"-"`
1818
1819	// NullFields is a list of field names (e.g. "BidCount") to include in
1820	// API requests with the JSON null value. By default, fields with empty
1821	// values are omitted from API requests. However, any field with an
1822	// empty value appearing in NullFields will be sent to the server as
1823	// null. It is an error if a field in this list has a non-empty value.
1824	// This may be used to include null fields in Patch requests.
1825	NullFields []string `json:"-"`
1826}
1827
1828func (s *CreativeStatusRow) MarshalJSON() ([]byte, error) {
1829	type NoMethod CreativeStatusRow
1830	raw := NoMethod(*s)
1831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1832}
1833
1834// CriteriaTargeting: Generic targeting used for targeting dimensions
1835// that contains a list of included and excluded numeric IDs.
1836type CriteriaTargeting struct {
1837	// ExcludedCriteriaIds: A list of numeric IDs to be excluded.
1838	ExcludedCriteriaIds googleapi.Int64s `json:"excludedCriteriaIds,omitempty"`
1839
1840	// TargetedCriteriaIds: A list of numeric IDs to be included.
1841	TargetedCriteriaIds googleapi.Int64s `json:"targetedCriteriaIds,omitempty"`
1842
1843	// ForceSendFields is a list of field names (e.g. "ExcludedCriteriaIds")
1844	// to unconditionally include in API requests. By default, fields with
1845	// empty or default values are omitted from API requests. However, any
1846	// non-pointer, non-interface field appearing in ForceSendFields will be
1847	// sent to the server regardless of whether the field is empty or not.
1848	// This may be used to include empty fields in Patch requests.
1849	ForceSendFields []string `json:"-"`
1850
1851	// NullFields is a list of field names (e.g. "ExcludedCriteriaIds") to
1852	// include in API requests with the JSON null value. By default, fields
1853	// with empty values are omitted from API requests. However, any field
1854	// with an empty value appearing in NullFields will be sent to the
1855	// server as null. It is an error if a field in this list has a
1856	// non-empty value. This may be used to include null fields in Patch
1857	// requests.
1858	NullFields []string `json:"-"`
1859}
1860
1861func (s *CriteriaTargeting) MarshalJSON() ([]byte, error) {
1862	type NoMethod CriteriaTargeting
1863	raw := NoMethod(*s)
1864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1865}
1866
1867// Date: Represents a whole or partial calendar date, such as a
1868// birthday. The time of day and time zone are either specified
1869// elsewhere or are insignificant. The date is relative to the Gregorian
1870// Calendar. This can represent one of the following: * A full date,
1871// with non-zero year, month, and day values * A month and day value,
1872// with a zero year, such as an anniversary * A year on its own, with
1873// zero month and day values * A year and month value, with a zero day,
1874// such as a credit card expiration date Related types are
1875// google.type.TimeOfDay and `google.protobuf.Timestamp`.
1876type Date struct {
1877	// Day: Day of a month. Must be from 1 to 31 and valid for the year and
1878	// month, or 0 to specify a year by itself or a year and month where the
1879	// day isn't significant.
1880	Day int64 `json:"day,omitempty"`
1881
1882	// Month: Month of a year. Must be from 1 to 12, or 0 to specify a year
1883	// without a month and day.
1884	Month int64 `json:"month,omitempty"`
1885
1886	// Year: Year of the date. Must be from 1 to 9999, or 0 to specify a
1887	// date without a year.
1888	Year int64 `json:"year,omitempty"`
1889
1890	// ForceSendFields is a list of field names (e.g. "Day") to
1891	// unconditionally include in API requests. By default, fields with
1892	// empty or default values are omitted from API requests. However, any
1893	// non-pointer, non-interface field appearing in ForceSendFields will be
1894	// sent to the server regardless of whether the field is empty or not.
1895	// This may be used to include empty fields in Patch requests.
1896	ForceSendFields []string `json:"-"`
1897
1898	// NullFields is a list of field names (e.g. "Day") to include in API
1899	// requests with the JSON null value. By default, fields with empty
1900	// values are omitted from API requests. However, any field with an
1901	// empty value appearing in NullFields will be sent to the server as
1902	// null. It is an error if a field in this list has a non-empty value.
1903	// This may be used to include null fields in Patch requests.
1904	NullFields []string `json:"-"`
1905}
1906
1907func (s *Date) MarshalJSON() ([]byte, error) {
1908	type NoMethod Date
1909	raw := NoMethod(*s)
1910	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1911}
1912
1913// DayPart: Daypart targeting message that specifies if the ad can be
1914// shown only during certain parts of a day/week.
1915type DayPart struct {
1916	// DayOfWeek: The day of the week to target. If unspecified, applicable
1917	// to all days.
1918	//
1919	// Possible values:
1920	//   "DAY_OF_WEEK_UNSPECIFIED" - A placeholder for when the day of the
1921	// week is not specified.
1922	//   "MONDAY" - Monday
1923	//   "TUESDAY" - Tuesday
1924	//   "WEDNESDAY" - Wednesday
1925	//   "THURSDAY" - Thursday
1926	//   "FRIDAY" - Friday
1927	//   "SATURDAY" - Saturday
1928	//   "SUNDAY" - Sunday
1929	DayOfWeek string `json:"dayOfWeek,omitempty"`
1930
1931	// EndTime: The ending time of the day for the ad to show (minute level
1932	// granularity). The end time is exclusive. This field is not available
1933	// for filtering in PQL queries.
1934	EndTime *TimeOfDay `json:"endTime,omitempty"`
1935
1936	// StartTime: The starting time of day for the ad to show (minute level
1937	// granularity). The start time is inclusive. This field is not
1938	// available for filtering in PQL queries.
1939	StartTime *TimeOfDay `json:"startTime,omitempty"`
1940
1941	// ForceSendFields is a list of field names (e.g. "DayOfWeek") to
1942	// unconditionally include in API requests. By default, fields with
1943	// empty or default values are omitted from API requests. However, any
1944	// non-pointer, non-interface field appearing in ForceSendFields will be
1945	// sent to the server regardless of whether the field is empty or not.
1946	// This may be used to include empty fields in Patch requests.
1947	ForceSendFields []string `json:"-"`
1948
1949	// NullFields is a list of field names (e.g. "DayOfWeek") to include in
1950	// API requests with the JSON null value. By default, fields with empty
1951	// values are omitted from API requests. However, any field with an
1952	// empty value appearing in NullFields will be sent to the server as
1953	// null. It is an error if a field in this list has a non-empty value.
1954	// This may be used to include null fields in Patch requests.
1955	NullFields []string `json:"-"`
1956}
1957
1958func (s *DayPart) MarshalJSON() ([]byte, error) {
1959	type NoMethod DayPart
1960	raw := NoMethod(*s)
1961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1962}
1963
1964// DayPartTargeting: Specifies the day part targeting criteria.
1965type DayPartTargeting struct {
1966	// DayParts: A list of day part targeting criterion.
1967	DayParts []*DayPart `json:"dayParts,omitempty"`
1968
1969	// TimeZoneType: The timezone to use for interpreting the day part
1970	// targeting.
1971	//
1972	// Possible values:
1973	//   "TIME_ZONE_SOURCE_UNSPECIFIED" - A placeholder for an undefined
1974	// time zone source.
1975	//   "PUBLISHER" - Use publisher's time zone setting.
1976	//   "USER" - Use the user's time zone setting.
1977	TimeZoneType string `json:"timeZoneType,omitempty"`
1978
1979	// ForceSendFields is a list of field names (e.g. "DayParts") to
1980	// unconditionally include in API requests. By default, fields with
1981	// empty or default values are omitted from API requests. However, any
1982	// non-pointer, non-interface field appearing in ForceSendFields will be
1983	// sent to the server regardless of whether the field is empty or not.
1984	// This may be used to include empty fields in Patch requests.
1985	ForceSendFields []string `json:"-"`
1986
1987	// NullFields is a list of field names (e.g. "DayParts") to include in
1988	// API requests with the JSON null value. By default, fields with empty
1989	// values are omitted from API requests. However, any field with an
1990	// empty value appearing in NullFields will be sent to the server as
1991	// null. It is an error if a field in this list has a non-empty value.
1992	// This may be used to include null fields in Patch requests.
1993	NullFields []string `json:"-"`
1994}
1995
1996func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
1997	type NoMethod DayPartTargeting
1998	raw := NoMethod(*s)
1999	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2000}
2001
2002// Deal: A deal represents a segment of inventory for displaying ads on.
2003// A proposal can contain multiple deals. A deal contains the terms and
2004// targeting information that is used for serving.
2005type Deal struct {
2006	// AvailableEndTime: Proposed flight end time of the deal. This will
2007	// generally be stored in a granularity of a second. A value is not
2008	// required for Private Auction deals or Preferred Deals.
2009	AvailableEndTime string `json:"availableEndTime,omitempty"`
2010
2011	// AvailableStartTime: Optional. Proposed flight start time of the deal.
2012	// This will generally be stored in the granularity of one second since
2013	// deal serving starts at seconds boundary. Any time specified with more
2014	// granularity (e.g., in milliseconds) will be truncated towards the
2015	// start of time in seconds.
2016	AvailableStartTime string `json:"availableStartTime,omitempty"`
2017
2018	// BuyerPrivateData: Buyer private data (hidden from seller).
2019	BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
2020
2021	// CreateProductId: The product ID from which this deal was created.
2022	// Note: This field may be set only when creating the resource.
2023	// Modifying this field while updating the resource will result in an
2024	// error.
2025	CreateProductId string `json:"createProductId,omitempty"`
2026
2027	// CreateProductRevision: Optional. Revision number of the product that
2028	// the deal was created from. If present on create, and the server
2029	// `product_revision` has advanced since the passed-in
2030	// `create_product_revision`, an `ABORTED` error will be returned. Note:
2031	// This field may be set only when creating the resource. Modifying this
2032	// field while updating the resource will result in an error.
2033	CreateProductRevision int64 `json:"createProductRevision,omitempty,string"`
2034
2035	// CreateTime: Output only. The time of the deal creation.
2036	CreateTime string `json:"createTime,omitempty"`
2037
2038	// CreativePreApprovalPolicy: Output only. Specifies the creative
2039	// pre-approval policy.
2040	//
2041	// Possible values:
2042	//   "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" - A placeholder for an
2043	// undefined creative pre-approval policy.
2044	//   "SELLER_PRE_APPROVAL_REQUIRED" - The seller needs to approve each
2045	// creative before it can serve.
2046	//   "SELLER_PRE_APPROVAL_NOT_REQUIRED" - The seller does not need to
2047	// approve each creative before it can serve.
2048	CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"`
2049
2050	// CreativeRestrictions: Output only. Restricitions about the creatives
2051	// associated with the deal (i.e., size) This is available for
2052	// Programmatic Guaranteed/Preferred Deals in Ad Manager.
2053	CreativeRestrictions *CreativeRestrictions `json:"creativeRestrictions,omitempty"`
2054
2055	// CreativeSafeFrameCompatibility: Output only. Specifies whether the
2056	// creative is safeFrame compatible.
2057	//
2058	// Possible values:
2059	//   "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" - A placeholder for
2060	// an undefined creative safe-frame compatibility.
2061	//   "COMPATIBLE" - The creatives need to be compatible with the safe
2062	// frame option.
2063	//   "INCOMPATIBLE" - The creatives can be incompatible with the safe
2064	// frame option.
2065	CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"`
2066
2067	// DealId: Output only. A unique deal ID for the deal (server-assigned).
2068	DealId string `json:"dealId,omitempty"`
2069
2070	// DealServingMetadata: Output only. Metadata about the serving status
2071	// of this deal.
2072	DealServingMetadata *DealServingMetadata `json:"dealServingMetadata,omitempty"`
2073
2074	// DealTerms: The negotiable terms of the deal.
2075	DealTerms *DealTerms `json:"dealTerms,omitempty"`
2076
2077	// DeliveryControl: The set of fields around delivery control that are
2078	// interesting for a buyer to see but are non-negotiable. These are set
2079	// by the publisher.
2080	DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"`
2081
2082	// Description: Description for the deal terms.
2083	Description string `json:"description,omitempty"`
2084
2085	// DisplayName: The name of the deal.
2086	DisplayName string `json:"displayName,omitempty"`
2087
2088	// ExternalDealId: Output only. The external deal ID assigned to this
2089	// deal once the deal is finalized. This is the deal ID that shows up in
2090	// serving/reporting etc.
2091	ExternalDealId string `json:"externalDealId,omitempty"`
2092
2093	// IsSetupComplete: Output only. True, if the buyside inventory setup is
2094	// complete for this deal.
2095	IsSetupComplete bool `json:"isSetupComplete,omitempty"`
2096
2097	// ProgrammaticCreativeSource: Output only. Specifies the creative
2098	// source for programmatic deals. PUBLISHER means creative is provided
2099	// by seller and ADVERTISER means creative is provided by buyer.
2100	//
2101	// Possible values:
2102	//   "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" - A placeholder for an
2103	// undefined programmatic creative source.
2104	//   "ADVERTISER" - The advertiser provides the creatives.
2105	//   "PUBLISHER" - The publisher provides the creatives to be served.
2106	ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"`
2107
2108	// ProposalId: Output only. ID of the proposal that this deal is part
2109	// of.
2110	ProposalId string `json:"proposalId,omitempty"`
2111
2112	// SellerContacts: Output only. Seller contact information for the deal.
2113	SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"`
2114
2115	// SyndicationProduct: The syndication product associated with the deal.
2116	// Note: This field may be set only when creating the resource.
2117	// Modifying this field while updating the resource will result in an
2118	// error.
2119	//
2120	// Possible values:
2121	//   "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined
2122	// syndication product.
2123	//   "CONTENT" - This typically represents a web page.
2124	//   "MOBILE" - This represents a mobile property.
2125	//   "VIDEO" - This represents video ad formats.
2126	//   "GAMES" - This represents ads shown within games.
2127	SyndicationProduct string `json:"syndicationProduct,omitempty"`
2128
2129	// Targeting: Output only. Specifies the subset of inventory targeted by
2130	// the deal.
2131	Targeting *MarketplaceTargeting `json:"targeting,omitempty"`
2132
2133	// TargetingCriterion: The shared targeting visible to buyers and
2134	// sellers. Each shared targeting entity is AND'd together.
2135	TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"`
2136
2137	// UpdateTime: Output only. The time when the deal was last updated.
2138	UpdateTime string `json:"updateTime,omitempty"`
2139
2140	// WebPropertyCode: The web property code for the seller copied over
2141	// from the product.
2142	WebPropertyCode string `json:"webPropertyCode,omitempty"`
2143
2144	// ForceSendFields is a list of field names (e.g. "AvailableEndTime") to
2145	// unconditionally include in API requests. By default, fields with
2146	// empty or default values are omitted from API requests. However, any
2147	// non-pointer, non-interface field appearing in ForceSendFields will be
2148	// sent to the server regardless of whether the field is empty or not.
2149	// This may be used to include empty fields in Patch requests.
2150	ForceSendFields []string `json:"-"`
2151
2152	// NullFields is a list of field names (e.g. "AvailableEndTime") to
2153	// include in API requests with the JSON null value. By default, fields
2154	// with empty values are omitted from API requests. However, any field
2155	// with an empty value appearing in NullFields will be sent to the
2156	// server as null. It is an error if a field in this list has a
2157	// non-empty value. This may be used to include null fields in Patch
2158	// requests.
2159	NullFields []string `json:"-"`
2160}
2161
2162func (s *Deal) MarshalJSON() ([]byte, error) {
2163	type NoMethod Deal
2164	raw := NoMethod(*s)
2165	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2166}
2167
2168// DealPauseStatus: Tracks which parties (if any) have paused a deal.
2169// The deal is considered paused if either hasBuyerPaused or
2170// hasSellPaused is true.
2171type DealPauseStatus struct {
2172	// BuyerPauseReason: The buyer's reason for pausing, if the buyer paused
2173	// the deal.
2174	BuyerPauseReason string `json:"buyerPauseReason,omitempty"`
2175
2176	// FirstPausedBy: The role of the person who first paused this deal.
2177	//
2178	// Possible values:
2179	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
2180	// buyer/seller role.
2181	//   "BUYER" - Specifies the role as buyer.
2182	//   "SELLER" - Specifies the role as seller.
2183	FirstPausedBy string `json:"firstPausedBy,omitempty"`
2184
2185	// HasBuyerPaused: True, if the buyer has paused the deal unilaterally.
2186	HasBuyerPaused bool `json:"hasBuyerPaused,omitempty"`
2187
2188	// HasSellerPaused: True, if the seller has paused the deal
2189	// unilaterally.
2190	HasSellerPaused bool `json:"hasSellerPaused,omitempty"`
2191
2192	// SellerPauseReason: The seller's reason for pausing, if the seller
2193	// paused the deal.
2194	SellerPauseReason string `json:"sellerPauseReason,omitempty"`
2195
2196	// ForceSendFields is a list of field names (e.g. "BuyerPauseReason") to
2197	// unconditionally include in API requests. By default, fields with
2198	// empty or default values are omitted from API requests. However, any
2199	// non-pointer, non-interface field appearing in ForceSendFields will be
2200	// sent to the server regardless of whether the field is empty or not.
2201	// This may be used to include empty fields in Patch requests.
2202	ForceSendFields []string `json:"-"`
2203
2204	// NullFields is a list of field names (e.g. "BuyerPauseReason") to
2205	// include in API requests with the JSON null value. By default, fields
2206	// with empty values are omitted from API requests. However, any field
2207	// with an empty value appearing in NullFields will be sent to the
2208	// server as null. It is an error if a field in this list has a
2209	// non-empty value. This may be used to include null fields in Patch
2210	// requests.
2211	NullFields []string `json:"-"`
2212}
2213
2214func (s *DealPauseStatus) MarshalJSON() ([]byte, error) {
2215	type NoMethod DealPauseStatus
2216	raw := NoMethod(*s)
2217	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2218}
2219
2220// DealServingMetadata: Message captures metadata about the serving
2221// status of a deal.
2222type DealServingMetadata struct {
2223	// DealPauseStatus: Output only. Tracks which parties (if any) have
2224	// paused a deal.
2225	DealPauseStatus *DealPauseStatus `json:"dealPauseStatus,omitempty"`
2226
2227	// ForceSendFields is a list of field names (e.g. "DealPauseStatus") to
2228	// unconditionally include in API requests. By default, fields with
2229	// empty or default values are omitted from API requests. However, any
2230	// non-pointer, non-interface field appearing in ForceSendFields will be
2231	// sent to the server regardless of whether the field is empty or not.
2232	// This may be used to include empty fields in Patch requests.
2233	ForceSendFields []string `json:"-"`
2234
2235	// NullFields is a list of field names (e.g. "DealPauseStatus") to
2236	// include in API requests with the JSON null value. By default, fields
2237	// with empty values are omitted from API requests. However, any field
2238	// with an empty value appearing in NullFields will be sent to the
2239	// server as null. It is an error if a field in this list has a
2240	// non-empty value. This may be used to include null fields in Patch
2241	// requests.
2242	NullFields []string `json:"-"`
2243}
2244
2245func (s *DealServingMetadata) MarshalJSON() ([]byte, error) {
2246	type NoMethod DealServingMetadata
2247	raw := NoMethod(*s)
2248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2249}
2250
2251// DealTerms: The deal terms specify the details of a Product/deal. They
2252// specify things like price per buyer, the type of pricing model (e.g.,
2253// fixed price, auction) and expected impressions from the publisher.
2254type DealTerms struct {
2255	// BrandingType: Visibility of the URL in bid requests. (default:
2256	// BRANDED)
2257	//
2258	// Possible values:
2259	//   "BRANDING_TYPE_UNSPECIFIED" - A placeholder for an undefined
2260	// branding type.
2261	//   "BRANDED" - Full URL is included in bid requests.
2262	//   "SEMI_TRANSPARENT" - A TopLevelDomain or masked URL is sent in bid
2263	// requests rather than the full one.
2264	BrandingType string `json:"brandingType,omitempty"`
2265
2266	// Description: Publisher provided description for the terms.
2267	Description string `json:"description,omitempty"`
2268
2269	// EstimatedGrossSpend: Non-binding estimate of the estimated gross
2270	// spend for this deal. Can be set by buyer or seller.
2271	EstimatedGrossSpend *Price `json:"estimatedGrossSpend,omitempty"`
2272
2273	// EstimatedImpressionsPerDay: Non-binding estimate of the impressions
2274	// served per day. Can be set by buyer or seller.
2275	EstimatedImpressionsPerDay int64 `json:"estimatedImpressionsPerDay,omitempty,string"`
2276
2277	// GuaranteedFixedPriceTerms: The terms for guaranteed fixed price
2278	// deals.
2279	GuaranteedFixedPriceTerms *GuaranteedFixedPriceTerms `json:"guaranteedFixedPriceTerms,omitempty"`
2280
2281	// NonGuaranteedAuctionTerms: The terms for non-guaranteed auction
2282	// deals.
2283	NonGuaranteedAuctionTerms *NonGuaranteedAuctionTerms `json:"nonGuaranteedAuctionTerms,omitempty"`
2284
2285	// NonGuaranteedFixedPriceTerms: The terms for non-guaranteed fixed
2286	// price deals.
2287	NonGuaranteedFixedPriceTerms *NonGuaranteedFixedPriceTerms `json:"nonGuaranteedFixedPriceTerms,omitempty"`
2288
2289	// SellerTimeZone: The time zone name. For deals with Cost Per Day
2290	// billing, defines the time zone used to mark the boundaries of a day.
2291	// It should be an IANA TZ name, such as "America/Los_Angeles". For more
2292	// information, see
2293	// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
2294	SellerTimeZone string `json:"sellerTimeZone,omitempty"`
2295
2296	// ForceSendFields is a list of field names (e.g. "BrandingType") to
2297	// unconditionally include in API requests. By default, fields with
2298	// empty or default values are omitted from API requests. However, any
2299	// non-pointer, non-interface field appearing in ForceSendFields will be
2300	// sent to the server regardless of whether the field is empty or not.
2301	// This may be used to include empty fields in Patch requests.
2302	ForceSendFields []string `json:"-"`
2303
2304	// NullFields is a list of field names (e.g. "BrandingType") to include
2305	// in API requests with the JSON null value. By default, fields with
2306	// empty values are omitted from API requests. However, any field with
2307	// an empty value appearing in NullFields will be sent to the server as
2308	// null. It is an error if a field in this list has a non-empty value.
2309	// This may be used to include null fields in Patch requests.
2310	NullFields []string `json:"-"`
2311}
2312
2313func (s *DealTerms) MarshalJSON() ([]byte, error) {
2314	type NoMethod DealTerms
2315	raw := NoMethod(*s)
2316	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2317}
2318
2319// DeliveryControl: Message contains details about how the deals will be
2320// paced.
2321type DeliveryControl struct {
2322	// CreativeBlockingLevel: Output only. Specified the creative blocking
2323	// levels to be applied.
2324	//
2325	// Possible values:
2326	//   "CREATIVE_BLOCKING_LEVEL_UNSPECIFIED" - A placeholder for an
2327	// undefined creative blocking level.
2328	//   "PUBLISHER_BLOCKING_RULES" - Publisher blocking rules will be
2329	// applied.
2330	//   "ADX_POLICY_BLOCKING_ONLY" - The Ad Exchange policy blocking rules
2331	// will be applied.
2332	CreativeBlockingLevel string `json:"creativeBlockingLevel,omitempty"`
2333
2334	// DeliveryRateType: Output only. Specifies how the impression delivery
2335	// will be paced.
2336	//
2337	// Possible values:
2338	//   "DELIVERY_RATE_TYPE_UNSPECIFIED" - A placeholder for an undefined
2339	// delivery rate type.
2340	//   "EVENLY" - Impressions are served uniformly over the life of the
2341	// deal.
2342	//   "FRONT_LOADED" - Impressions are served front-loaded.
2343	//   "AS_FAST_AS_POSSIBLE" - Impressions are served as fast as possible.
2344	DeliveryRateType string `json:"deliveryRateType,omitempty"`
2345
2346	// FrequencyCaps: Output only. Specifies any frequency caps.
2347	FrequencyCaps []*FrequencyCap `json:"frequencyCaps,omitempty"`
2348
2349	// ForceSendFields is a list of field names (e.g.
2350	// "CreativeBlockingLevel") to unconditionally include in API requests.
2351	// By default, fields with empty or default values are omitted from API
2352	// requests. However, any non-pointer, non-interface field appearing in
2353	// ForceSendFields will be sent to the server regardless of whether the
2354	// field is empty or not. This may be used to include empty fields in
2355	// Patch requests.
2356	ForceSendFields []string `json:"-"`
2357
2358	// NullFields is a list of field names (e.g. "CreativeBlockingLevel") to
2359	// include in API requests with the JSON null value. By default, fields
2360	// with empty values are omitted from API requests. However, any field
2361	// with an empty value appearing in NullFields will be sent to the
2362	// server as null. It is an error if a field in this list has a
2363	// non-empty value. This may be used to include null fields in Patch
2364	// requests.
2365	NullFields []string `json:"-"`
2366}
2367
2368func (s *DeliveryControl) MarshalJSON() ([]byte, error) {
2369	type NoMethod DeliveryControl
2370	raw := NoMethod(*s)
2371	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2372}
2373
2374// Disapproval: Output only. The reason and details for a disapproval.
2375type Disapproval struct {
2376	// Details: Additional details about the reason for disapproval.
2377	Details []string `json:"details,omitempty"`
2378
2379	// Reason: The categorized reason for disapproval.
2380	//
2381	// Possible values:
2382	//   "LENGTH_OF_IMAGE_ANIMATION" - The length of the image animation is
2383	// longer than allowed.
2384	//   "BROKEN_URL" - The click through URL doesn't work properly.
2385	//   "MEDIA_NOT_FUNCTIONAL" - Something is wrong with the creative
2386	// itself.
2387	//   "INVALID_FOURTH_PARTY_CALL" - The ad makes a fourth party call to
2388	// an unapproved vendor.
2389	//   "INCORRECT_REMARKETING_DECLARATION" - The ad targets consumers
2390	// using remarketing lists and/or collects data for subsequent use in
2391	// retargeting, but does not correctly declare that use.
2392	//   "LANDING_PAGE_ERROR" - Clicking on the ad leads to an error page.
2393	//   "AD_SIZE_DOES_NOT_MATCH_AD_SLOT" - The ad size when rendered does
2394	// not match the declaration.
2395	//   "NO_BORDER" - Ads with a white background require a border, which
2396	// was missing.
2397	//   "FOURTH_PARTY_BROWSER_COOKIES" - The creative attempts to set
2398	// cookies from a fourth party that is not certified.
2399	//   "LSO_OBJECTS" - The creative sets an LSO object.
2400	//   "BLANK_CREATIVE" - The ad serves a blank.
2401	//   "DESTINATION_URLS_UNDECLARED" - The ad uses rotation, but not all
2402	// destination URLs were declared.
2403	//   "PROBLEM_WITH_CLICK_MACRO" - There is a problem with the way the
2404	// click macro is used.
2405	//   "INCORRECT_AD_TECHNOLOGY_DECLARATION" - The ad technology
2406	// declaration is not accurate.
2407	//   "INCORRECT_DESTINATION_URL_DECLARATION" - The actual destination
2408	// URL does not match the declared destination URL.
2409	//   "EXPANDABLE_INCORRECT_DIRECTION" - The declared expanding direction
2410	// does not match the actual direction.
2411	//   "EXPANDABLE_DIRECTION_NOT_SUPPORTED" - The ad does not expand in a
2412	// supported direction.
2413	//   "EXPANDABLE_INVALID_VENDOR" - The ad uses an expandable vendor that
2414	// is not supported.
2415	//   "EXPANDABLE_FUNCTIONALITY" - There was an issue with the expandable
2416	// ad.
2417	//   "VIDEO_INVALID_VENDOR" - The ad uses a video vendor that is not
2418	// supported.
2419	//   "VIDEO_UNSUPPORTED_LENGTH" - The length of the video ad is not
2420	// supported.
2421	//   "VIDEO_UNSUPPORTED_FORMAT" - The format of the video ad is not
2422	// supported.
2423	//   "VIDEO_FUNCTIONALITY" - There was an issue with the video ad.
2424	//   "LANDING_PAGE_DISABLED" - The landing page does not conform to Ad
2425	// Exchange policy.
2426	//   "MALWARE_SUSPECTED" - The ad or the landing page may contain
2427	// malware.
2428	//   "ADULT_IMAGE_OR_VIDEO" - The ad contains adult images or video
2429	// content.
2430	//   "INACCURATE_AD_TEXT" - The ad contains text that is unclear or
2431	// inaccurate.
2432	//   "COUNTERFEIT_DESIGNER_GOODS" - The ad promotes counterfeit designer
2433	// goods.
2434	//   "POP_UP" - The ad causes a popup window to appear.
2435	//   "INVALID_RTB_PROTOCOL_USAGE" - The creative does not follow
2436	// policies set for the RTB protocol.
2437	//   "RAW_IP_ADDRESS_IN_SNIPPET" - The ad contains a URL that uses a
2438	// numeric IP address for the domain.
2439	//   "UNACCEPTABLE_CONTENT_SOFTWARE" - The ad or landing page contains
2440	// unacceptable content because it initiated a software or executable
2441	// download.
2442	//   "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN" - The ad set an unauthorized
2443	// cookie on a Google domain.
2444	//   "UNDECLARED_FLASH_OBJECTS" - Flash content found when no flash was
2445	// declared.
2446	//   "INVALID_SSL_DECLARATION" - SSL support declared but not working
2447	// correctly.
2448	//   "DIRECT_DOWNLOAD_IN_AD" - Rich Media - Direct Download in Ad (ex.
2449	// PDF download).
2450	//   "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED" - Maximum download size exceeded.
2451	//   "DESTINATION_URL_SITE_NOT_CRAWLABLE" - Bad Destination URL: Site
2452	// Not Crawlable.
2453	//   "BAD_URL_LEGAL_DISAPPROVAL" - Bad URL: Legal disapproval.
2454	//   "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED" - Pharmaceuticals, Gambling,
2455	// Alcohol not allowed and at least one was detected.
2456	//   "DYNAMIC_DNS_AT_DESTINATION_URL" - Dynamic DNS at Destination URL.
2457	//   "POOR_IMAGE_OR_VIDEO_QUALITY" - Poor Image / Video Quality.
2458	//   "UNACCEPTABLE_IMAGE_CONTENT" - For example, Image Trick to Click.
2459	//   "INCORRECT_IMAGE_LAYOUT" - Incorrect Image Layout.
2460	//   "IRRELEVANT_IMAGE_OR_VIDEO" - Irrelevant Image / Video.
2461	//   "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK" - Broken back button.
2462	//   "MISLEADING_CLAIMS_IN_AD" - Misleading/Inaccurate claims in ads.
2463	//   "RESTRICTED_PRODUCTS" - Restricted Products.
2464	//   "UNACCEPTABLE_CONTENT" - Unacceptable content. For example,
2465	// malware.
2466	//   "AUTOMATED_AD_CLICKING" - The ad automatically redirects to the
2467	// destination site without a click, or reports a click when none were
2468	// made.
2469	//   "INVALID_URL_PROTOCOL" - The ad uses URL protocols that do not
2470	// exist or are not allowed on AdX.
2471	//   "UNDECLARED_RESTRICTED_CONTENT" - Restricted content (for example,
2472	// alcohol) was found in the ad but not declared.
2473	//   "INVALID_REMARKETING_LIST_USAGE" - Violation of the remarketing
2474	// list policy.
2475	//   "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT" - The destination
2476	// site's robot.txt file prevents it from being crawled.
2477	//   "CLICK_TO_DOWNLOAD_NOT_AN_APP" - Click to download must link to an
2478	// app.
2479	//   "INACCURATE_REVIEW_EXTENSION" - A review extension must be an
2480	// accurate review.
2481	//   "SEXUALLY_EXPLICIT_CONTENT" - Sexually explicit content.
2482	//   "GAINING_AN_UNFAIR_ADVANTAGE" - The ad tries to gain an unfair
2483	// traffic advantage.
2484	//   "GAMING_THE_GOOGLE_NETWORK" - The ad tries to circumvent Google's
2485	// advertising systems.
2486	//   "DANGEROUS_PRODUCTS_KNIVES" - The ad promotes dangerous knives.
2487	//   "DANGEROUS_PRODUCTS_EXPLOSIVES" - The ad promotes explosives.
2488	//   "DANGEROUS_PRODUCTS_GUNS" - The ad promotes guns & parts.
2489	//   "DANGEROUS_PRODUCTS_DRUGS" - The ad promotes recreational
2490	// drugs/services & related equipment.
2491	//   "DANGEROUS_PRODUCTS_TOBACCO" - The ad promotes tobacco
2492	// products/services & related equipment.
2493	//   "DANGEROUS_PRODUCTS_WEAPONS" - The ad promotes weapons.
2494	//   "UNCLEAR_OR_IRRELEVANT_AD" - The ad is unclear or irrelevant to the
2495	// destination site.
2496	//   "PROFESSIONAL_STANDARDS" - The ad does not meet professional
2497	// standards.
2498	//   "DYSFUNCTIONAL_PROMOTION" - The promotion is unnecessarily
2499	// difficult to navigate.
2500	//   "INVALID_INTEREST_BASED_AD" - Violation of Google's policy for
2501	// interest-based ads.
2502	//   "MISUSE_OF_PERSONAL_INFORMATION" - Misuse of personal information.
2503	//   "OMISSION_OF_RELEVANT_INFORMATION" - Omission of relevant
2504	// information.
2505	//   "UNAVAILABLE_PROMOTIONS" - Unavailable promotions.
2506	//   "MISLEADING_PROMOTIONS" - Misleading or unrealistic promotions.
2507	//   "INAPPROPRIATE_CONTENT" - Offensive or inappropriate content.
2508	//   "SENSITIVE_EVENTS" - Capitalizing on sensitive events.
2509	//   "SHOCKING_CONTENT" - Shocking content.
2510	//   "ENABLING_DISHONEST_BEHAVIOR" - Products & Services that enable
2511	// dishonest behavior.
2512	//   "TECHNICAL_REQUIREMENTS" - The ad does not meet technical
2513	// requirements.
2514	//   "RESTRICTED_POLITICAL_CONTENT" - Restricted political content.
2515	//   "UNSUPPORTED_CONTENT" - Unsupported content.
2516	//   "INVALID_BIDDING_METHOD" - Invalid bidding method.
2517	//   "VIDEO_TOO_LONG" - Video length exceeds limits.
2518	//   "VIOLATES_JAPANESE_PHARMACY_LAW" - Unacceptable content: Japanese
2519	// healthcare.
2520	//   "UNACCREDITED_PET_PHARMACY" - Online pharmacy ID required.
2521	//   "ABORTION" - Unacceptable content: Abortion.
2522	//   "CONTRACEPTIVES" - Unacceptable content: Birth control.
2523	//   "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA" - Restricted in China.
2524	//   "KCDSP_REGISTRATION" - Unacceptable content: Korean healthcare.
2525	//   "NOT_FAMILY_SAFE" - Non-family safe or adult content.
2526	//   "CLINICAL_TRIAL_RECRUITMENT" - Clinical trial recruitment.
2527	//   "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED" - Maximum number of HTTP
2528	// calls exceeded.
2529	//   "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED" - Maximum number of cookies
2530	// exceeded.
2531	//   "PERSONAL_LOANS" - Financial service ad does not adhere to
2532	// specifications.
2533	//   "UNSUPPORTED_FLASH_CONTENT" - Flash content was found in an
2534	// unsupported context.
2535	//   "MISUSE_BY_OMID_SCRIPT" - Misuse by an Open Measurement SDK script.
2536	//   "NON_WHITELISTED_OMID_VENDOR" - Use of an Open Measurement SDK
2537	// vendor not on approved vendor list.
2538	//   "DESTINATION_EXPERIENCE" - Unacceptable landing page.
2539	//   "UNSUPPORTED_LANGUAGE" - Unsupported language.
2540	//   "NON_SSL_COMPLIANT" - Non-SSL compliant.
2541	//   "TEMPORARY_PAUSE" - Temporary pausing of creative.
2542	//   "BAIL_BONDS" - Promotes services related to bail bonds.
2543	//   "EXPERIMENTAL_MEDICAL_TREATMENT" - Promotes speculative and/or
2544	// experimental medical treatments.
2545	Reason string `json:"reason,omitempty"`
2546
2547	// ForceSendFields is a list of field names (e.g. "Details") to
2548	// unconditionally include in API requests. By default, fields with
2549	// empty or default values are omitted from API requests. However, any
2550	// non-pointer, non-interface field appearing in ForceSendFields will be
2551	// sent to the server regardless of whether the field is empty or not.
2552	// This may be used to include empty fields in Patch requests.
2553	ForceSendFields []string `json:"-"`
2554
2555	// NullFields is a list of field names (e.g. "Details") to include in
2556	// API requests with the JSON null value. By default, fields with empty
2557	// values are omitted from API requests. However, any field with an
2558	// empty value appearing in NullFields will be sent to the server as
2559	// null. It is an error if a field in this list has a non-empty value.
2560	// This may be used to include null fields in Patch requests.
2561	NullFields []string `json:"-"`
2562}
2563
2564func (s *Disapproval) MarshalJSON() ([]byte, error) {
2565	type NoMethod Disapproval
2566	raw := NoMethod(*s)
2567	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2568}
2569
2570// Empty: A generic empty message that you can re-use to avoid defining
2571// duplicated empty messages in your APIs. A typical example is to use
2572// it as the request or the response type of an API method. For
2573// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
2574// (google.protobuf.Empty); } The JSON representation for `Empty` is
2575// empty JSON object `{}`.
2576type Empty struct {
2577	// ServerResponse contains the HTTP response code and headers from the
2578	// server.
2579	googleapi.ServerResponse `json:"-"`
2580}
2581
2582// FilterSet: A set of filters that is applied to a request for data.
2583// Within a filter set, an AND operation is performed across the filters
2584// represented by each field. An OR operation is performed across the
2585// filters represented by the multiple values of a repeated field, e.g.,
2586// "format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR
2587// seller_network_id=56)".
2588type FilterSet struct {
2589	// AbsoluteDateRange: An absolute date range, defined by a start date
2590	// and an end date. Interpreted relative to Pacific time zone.
2591	AbsoluteDateRange *AbsoluteDateRange `json:"absoluteDateRange,omitempty"`
2592
2593	// BreakdownDimensions: The set of dimensions along which to break down
2594	// the response; may be empty. If multiple dimensions are requested, the
2595	// breakdown is along the Cartesian product of the requested dimensions.
2596	//
2597	// Possible values:
2598	//   "BREAKDOWN_DIMENSION_UNSPECIFIED" - A placeholder for an
2599	// unspecified dimension; should not be used.
2600	//   "PUBLISHER_IDENTIFIER" - The response should be broken down by
2601	// publisher identifier. This option is available only for Open Bidding
2602	// buyers.
2603	BreakdownDimensions []string `json:"breakdownDimensions,omitempty"`
2604
2605	// CreativeId: The ID of the creative on which to filter; optional. This
2606	// field may be set only for a filter set that accesses account-level
2607	// troubleshooting data, i.e., one whose name matches the
2608	// `bidders/*/accounts/*/filterSets/*` pattern.
2609	CreativeId string `json:"creativeId,omitempty"`
2610
2611	// DealId: The ID of the deal on which to filter; optional. This field
2612	// may be set only for a filter set that accesses account-level
2613	// troubleshooting data, i.e., one whose name matches the
2614	// `bidders/*/accounts/*/filterSets/*` pattern.
2615	DealId int64 `json:"dealId,omitempty,string"`
2616
2617	// Environment: The environment on which to filter; optional.
2618	//
2619	// Possible values:
2620	//   "ENVIRONMENT_UNSPECIFIED" - A placeholder for an undefined
2621	// environment; indicates that no environment filter will be applied.
2622	//   "WEB" - The ad impression appears on the web.
2623	//   "APP" - The ad impression appears in an app.
2624	Environment string `json:"environment,omitempty"`
2625
2626	// Format: Creative format bidded on or allowed to bid on, can be empty.
2627	//
2628	// Possible values:
2629	//   "FORMAT_UNSPECIFIED" - A placeholder for an undefined format;
2630	// indicates that no format filter will be applied.
2631	//   "NATIVE_DISPLAY" - The ad impression is a native ad, and display
2632	// (i.e., image) format.
2633	//   "NATIVE_VIDEO" - The ad impression is a native ad, and video
2634	// format.
2635	//   "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and
2636	// display (i.e., image) format.
2637	//   "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and
2638	// video format.
2639	Format string `json:"format,omitempty"`
2640
2641	// Formats: Creative formats bidded on or allowed to bid on, can be
2642	// empty. Although this field is a list, it can only be populated with a
2643	// single item. A HTTP 400 bad request error will be returned in the
2644	// response if you specify multiple items.
2645	//
2646	// Possible values:
2647	//   "FORMAT_UNSPECIFIED" - A placeholder for an undefined format;
2648	// indicates that no format filter will be applied.
2649	//   "NATIVE_DISPLAY" - The ad impression is a native ad, and display
2650	// (i.e., image) format.
2651	//   "NATIVE_VIDEO" - The ad impression is a native ad, and video
2652	// format.
2653	//   "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and
2654	// display (i.e., image) format.
2655	//   "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and
2656	// video format.
2657	Formats []string `json:"formats,omitempty"`
2658
2659	// Name: A user-defined name of the filter set. Filter set names must be
2660	// unique globally and match one of the patterns: -
2661	// `bidders/*/filterSets/*` (for accessing bidder-level troubleshooting
2662	// data) - `bidders/*/accounts/*/filterSets/*` (for accessing
2663	// account-level troubleshooting data) This field is required in create
2664	// operations.
2665	Name string `json:"name,omitempty"`
2666
2667	// Platforms: The list of platforms on which to filter; may be empty.
2668	// The filters represented by multiple platforms are ORed together
2669	// (i.e., if non-empty, results must match any one of the platforms).
2670	//
2671	// Possible values:
2672	//   "PLATFORM_UNSPECIFIED" - A placeholder for an undefined platform;
2673	// indicates that no platform filter will be applied.
2674	//   "DESKTOP" - The ad impression appears on a desktop.
2675	//   "TABLET" - The ad impression appears on a tablet.
2676	//   "MOBILE" - The ad impression appears on a mobile device.
2677	Platforms []string `json:"platforms,omitempty"`
2678
2679	// PublisherIdentifiers: For Open Bidding partners only. The list of
2680	// publisher identifiers on which to filter; may be empty. The filters
2681	// represented by multiple publisher identifiers are ORed together.
2682	PublisherIdentifiers []string `json:"publisherIdentifiers,omitempty"`
2683
2684	// RealtimeTimeRange: An open-ended realtime time range, defined by the
2685	// aggregation start timestamp.
2686	RealtimeTimeRange *RealtimeTimeRange `json:"realtimeTimeRange,omitempty"`
2687
2688	// RelativeDateRange: A relative date range, defined by an offset from
2689	// today and a duration. Interpreted relative to Pacific time zone.
2690	RelativeDateRange *RelativeDateRange `json:"relativeDateRange,omitempty"`
2691
2692	// SellerNetworkIds: For Authorized Buyers only. The list of IDs of the
2693	// seller (publisher) networks on which to filter; may be empty. The
2694	// filters represented by multiple seller network IDs are ORed together
2695	// (i.e., if non-empty, results must match any one of the publisher
2696	// networks). See seller-network-ids
2697	// (https://developers.google.com/authorized-buyers/rtb/downloads/seller-network-ids)
2698	// file for the set of existing seller network IDs.
2699	SellerNetworkIds []int64 `json:"sellerNetworkIds,omitempty"`
2700
2701	// TimeSeriesGranularity: The granularity of time intervals if a time
2702	// series breakdown is desired; optional.
2703	//
2704	// Possible values:
2705	//   "TIME_SERIES_GRANULARITY_UNSPECIFIED" - A placeholder for an
2706	// unspecified interval; no time series is applied. All rows in response
2707	// will contain data for the entire requested time range.
2708	//   "HOURLY" - Indicates that data will be broken down by the hour.
2709	//   "DAILY" - Indicates that data will be broken down by the day.
2710	TimeSeriesGranularity string `json:"timeSeriesGranularity,omitempty"`
2711
2712	// ServerResponse contains the HTTP response code and headers from the
2713	// server.
2714	googleapi.ServerResponse `json:"-"`
2715
2716	// ForceSendFields is a list of field names (e.g. "AbsoluteDateRange")
2717	// to unconditionally include in API requests. By default, fields with
2718	// empty or default values are omitted from API requests. However, any
2719	// non-pointer, non-interface field appearing in ForceSendFields will be
2720	// sent to the server regardless of whether the field is empty or not.
2721	// This may be used to include empty fields in Patch requests.
2722	ForceSendFields []string `json:"-"`
2723
2724	// NullFields is a list of field names (e.g. "AbsoluteDateRange") to
2725	// include in API requests with the JSON null value. By default, fields
2726	// with empty values are omitted from API requests. However, any field
2727	// with an empty value appearing in NullFields will be sent to the
2728	// server as null. It is an error if a field in this list has a
2729	// non-empty value. This may be used to include null fields in Patch
2730	// requests.
2731	NullFields []string `json:"-"`
2732}
2733
2734func (s *FilterSet) MarshalJSON() ([]byte, error) {
2735	type NoMethod FilterSet
2736	raw := NoMethod(*s)
2737	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2738}
2739
2740// FilteredBidCreativeRow: The number of filtered bids with the
2741// specified dimension values that have the specified creative.
2742type FilteredBidCreativeRow struct {
2743	// BidCount: The number of bids with the specified creative.
2744	BidCount *MetricValue `json:"bidCount,omitempty"`
2745
2746	// CreativeId: The ID of the creative.
2747	CreativeId string `json:"creativeId,omitempty"`
2748
2749	// RowDimensions: The values of all dimensions associated with metric
2750	// values in this row.
2751	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
2752
2753	// ForceSendFields is a list of field names (e.g. "BidCount") to
2754	// unconditionally include in API requests. By default, fields with
2755	// empty or default values are omitted from API requests. However, any
2756	// non-pointer, non-interface field appearing in ForceSendFields will be
2757	// sent to the server regardless of whether the field is empty or not.
2758	// This may be used to include empty fields in Patch requests.
2759	ForceSendFields []string `json:"-"`
2760
2761	// NullFields is a list of field names (e.g. "BidCount") to include in
2762	// API requests with the JSON null value. By default, fields with empty
2763	// values are omitted from API requests. However, any field with an
2764	// empty value appearing in NullFields will be sent to the server as
2765	// null. It is an error if a field in this list has a non-empty value.
2766	// This may be used to include null fields in Patch requests.
2767	NullFields []string `json:"-"`
2768}
2769
2770func (s *FilteredBidCreativeRow) MarshalJSON() ([]byte, error) {
2771	type NoMethod FilteredBidCreativeRow
2772	raw := NoMethod(*s)
2773	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2774}
2775
2776// FilteredBidDetailRow: The number of filtered bids with the specified
2777// dimension values, among those filtered due to the requested filtering
2778// reason (i.e. creative status), that have the specified detail.
2779type FilteredBidDetailRow struct {
2780	// BidCount: The number of bids with the specified detail.
2781	BidCount *MetricValue `json:"bidCount,omitempty"`
2782
2783	// Detail: The ID of the detail, can be numeric or text. The associated
2784	// value can be looked up in the dictionary file corresponding to the
2785	// DetailType in the response message.
2786	Detail string `json:"detail,omitempty"`
2787
2788	// DetailId: Note: this field will be deprecated, use "detail" field
2789	// instead. When "detail" field represents an integer value, this field
2790	// is populated as the same integer value "detail" field represents,
2791	// otherwise this field will be 0. The ID of the detail. The associated
2792	// value can be looked up in the dictionary file corresponding to the
2793	// DetailType in the response message.
2794	DetailId int64 `json:"detailId,omitempty"`
2795
2796	// RowDimensions: The values of all dimensions associated with metric
2797	// values in this row.
2798	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
2799
2800	// ForceSendFields is a list of field names (e.g. "BidCount") to
2801	// unconditionally include in API requests. By default, fields with
2802	// empty or default values are omitted from API requests. However, any
2803	// non-pointer, non-interface field appearing in ForceSendFields will be
2804	// sent to the server regardless of whether the field is empty or not.
2805	// This may be used to include empty fields in Patch requests.
2806	ForceSendFields []string `json:"-"`
2807
2808	// NullFields is a list of field names (e.g. "BidCount") to include in
2809	// API requests with the JSON null value. By default, fields with empty
2810	// values are omitted from API requests. However, any field with an
2811	// empty value appearing in NullFields will be sent to the server as
2812	// null. It is an error if a field in this list has a non-empty value.
2813	// This may be used to include null fields in Patch requests.
2814	NullFields []string `json:"-"`
2815}
2816
2817func (s *FilteredBidDetailRow) MarshalJSON() ([]byte, error) {
2818	type NoMethod FilteredBidDetailRow
2819	raw := NoMethod(*s)
2820	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2821}
2822
2823// FirstPartyMobileApplicationTargeting: Represents a list of targeted
2824// and excluded mobile application IDs that publishers own. Mobile
2825// application IDs are from App Store and Google Play Store. Android App
2826// ID, for example, com.google.android.apps.maps, can be found in Google
2827// Play Store URL. iOS App ID (which is a number) can be found at the
2828// end of iTunes store URL. First party mobile applications is either
2829// included or excluded.
2830type FirstPartyMobileApplicationTargeting struct {
2831	// ExcludedAppIds: A list of application IDs to be excluded.
2832	ExcludedAppIds []string `json:"excludedAppIds,omitempty"`
2833
2834	// TargetedAppIds: A list of application IDs to be included.
2835	TargetedAppIds []string `json:"targetedAppIds,omitempty"`
2836
2837	// ForceSendFields is a list of field names (e.g. "ExcludedAppIds") to
2838	// unconditionally include in API requests. By default, fields with
2839	// empty or default values are omitted from API requests. However, any
2840	// non-pointer, non-interface field appearing in ForceSendFields will be
2841	// sent to the server regardless of whether the field is empty or not.
2842	// This may be used to include empty fields in Patch requests.
2843	ForceSendFields []string `json:"-"`
2844
2845	// NullFields is a list of field names (e.g. "ExcludedAppIds") to
2846	// include in API requests with the JSON null value. By default, fields
2847	// with empty values are omitted from API requests. However, any field
2848	// with an empty value appearing in NullFields will be sent to the
2849	// server as null. It is an error if a field in this list has a
2850	// non-empty value. This may be used to include null fields in Patch
2851	// requests.
2852	NullFields []string `json:"-"`
2853}
2854
2855func (s *FirstPartyMobileApplicationTargeting) MarshalJSON() ([]byte, error) {
2856	type NoMethod FirstPartyMobileApplicationTargeting
2857	raw := NoMethod(*s)
2858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2859}
2860
2861// FrequencyCap: Frequency cap.
2862type FrequencyCap struct {
2863	// MaxImpressions: The maximum number of impressions that can be served
2864	// to a user within the specified time period.
2865	MaxImpressions int64 `json:"maxImpressions,omitempty"`
2866
2867	// NumTimeUnits: The amount of time, in the units specified by
2868	// time_unit_type. Defines the amount of time over which impressions per
2869	// user are counted and capped.
2870	NumTimeUnits int64 `json:"numTimeUnits,omitempty"`
2871
2872	// TimeUnitType: The time unit. Along with num_time_units defines the
2873	// amount of time over which impressions per user are counted and
2874	// capped.
2875	//
2876	// Possible values:
2877	//   "TIME_UNIT_TYPE_UNSPECIFIED" - A placeholder for an undefined time
2878	// unit type. This just indicates the variable with this value hasn't
2879	// been initialized.
2880	//   "MINUTE" - Minute
2881	//   "HOUR" - Hour
2882	//   "DAY" - Day
2883	//   "WEEK" - Week
2884	//   "MONTH" - Month
2885	//   "LIFETIME" - Lifetime
2886	//   "POD" - Pod
2887	//   "STREAM" - Stream
2888	TimeUnitType string `json:"timeUnitType,omitempty"`
2889
2890	// ForceSendFields is a list of field names (e.g. "MaxImpressions") to
2891	// unconditionally include in API requests. By default, fields with
2892	// empty or default values are omitted from API requests. However, any
2893	// non-pointer, non-interface field appearing in ForceSendFields will be
2894	// sent to the server regardless of whether the field is empty or not.
2895	// This may be used to include empty fields in Patch requests.
2896	ForceSendFields []string `json:"-"`
2897
2898	// NullFields is a list of field names (e.g. "MaxImpressions") to
2899	// include in API requests with the JSON null value. By default, fields
2900	// with empty values are omitted from API requests. However, any field
2901	// with an empty value appearing in NullFields will be sent to the
2902	// server as null. It is an error if a field in this list has a
2903	// non-empty value. This may be used to include null fields in Patch
2904	// requests.
2905	NullFields []string `json:"-"`
2906}
2907
2908func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
2909	type NoMethod FrequencyCap
2910	raw := NoMethod(*s)
2911	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2912}
2913
2914// GuaranteedFixedPriceTerms: Terms for Programmatic Guaranteed Deals.
2915type GuaranteedFixedPriceTerms struct {
2916	// FixedPrices: Fixed price for the specified buyer.
2917	FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"`
2918
2919	// GuaranteedImpressions: Guaranteed impressions as a percentage. This
2920	// is the percentage of guaranteed looks that the buyer is guaranteeing
2921	// to buy.
2922	GuaranteedImpressions int64 `json:"guaranteedImpressions,omitempty,string"`
2923
2924	// GuaranteedLooks: Count of guaranteed looks. Required for deal,
2925	// optional for product.
2926	GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"`
2927
2928	// ImpressionCap: The lifetime impression cap for CPM sponsorship deals.
2929	// The deal will stop serving when the cap is reached.
2930	ImpressionCap int64 `json:"impressionCap,omitempty,string"`
2931
2932	// MinimumDailyLooks: Daily minimum looks for CPD deal types.
2933	MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"`
2934
2935	// PercentShareOfVoice: For sponsorship deals, this is the percentage of
2936	// the seller's eligible impressions that the deal will serve until the
2937	// cap is reached.
2938	PercentShareOfVoice int64 `json:"percentShareOfVoice,omitempty,string"`
2939
2940	// ReservationType: The reservation type for a Programmatic Guaranteed
2941	// deal. This indicates whether the number of impressions is fixed, or a
2942	// percent of available impressions. If not specified, the default
2943	// reservation type is STANDARD.
2944	//
2945	// Possible values:
2946	//   "RESERVATION_TYPE_UNSPECIFIED" - An unspecified reservation type.
2947	//   "STANDARD" - Non-sponsorship deal.
2948	//   "SPONSORSHIP" - Sponsorship deals don't have impression goal
2949	// (guaranteed_looks) and they are served based on the flight dates. For
2950	// CPM Sponsorship deals, impression_cap is the lifetime impression
2951	// limit.
2952	ReservationType string `json:"reservationType,omitempty"`
2953
2954	// ForceSendFields is a list of field names (e.g. "FixedPrices") to
2955	// unconditionally include in API requests. By default, fields with
2956	// empty or default values are omitted from API requests. However, any
2957	// non-pointer, non-interface field appearing in ForceSendFields will be
2958	// sent to the server regardless of whether the field is empty or not.
2959	// This may be used to include empty fields in Patch requests.
2960	ForceSendFields []string `json:"-"`
2961
2962	// NullFields is a list of field names (e.g. "FixedPrices") to include
2963	// in API requests with the JSON null value. By default, fields with
2964	// empty values are omitted from API requests. However, any field with
2965	// an empty value appearing in NullFields will be sent to the server as
2966	// null. It is an error if a field in this list has a non-empty value.
2967	// This may be used to include null fields in Patch requests.
2968	NullFields []string `json:"-"`
2969}
2970
2971func (s *GuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) {
2972	type NoMethod GuaranteedFixedPriceTerms
2973	raw := NoMethod(*s)
2974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2975}
2976
2977// HtmlContent: HTML content for a creative.
2978type HtmlContent struct {
2979	// Height: The height of the HTML snippet in pixels.
2980	Height int64 `json:"height,omitempty"`
2981
2982	// Snippet: The HTML snippet that displays the ad when inserted in the
2983	// web page.
2984	Snippet string `json:"snippet,omitempty"`
2985
2986	// Width: The width of the HTML snippet in pixels.
2987	Width int64 `json:"width,omitempty"`
2988
2989	// ForceSendFields is a list of field names (e.g. "Height") to
2990	// unconditionally include in API requests. By default, fields with
2991	// empty or default values are omitted from API requests. However, any
2992	// non-pointer, non-interface field appearing in ForceSendFields will be
2993	// sent to the server regardless of whether the field is empty or not.
2994	// This may be used to include empty fields in Patch requests.
2995	ForceSendFields []string `json:"-"`
2996
2997	// NullFields is a list of field names (e.g. "Height") to include in API
2998	// requests with the JSON null value. By default, fields with empty
2999	// values are omitted from API requests. However, any field with an
3000	// empty value appearing in NullFields will be sent to the server as
3001	// null. It is an error if a field in this list has a non-empty value.
3002	// This may be used to include null fields in Patch requests.
3003	NullFields []string `json:"-"`
3004}
3005
3006func (s *HtmlContent) MarshalJSON() ([]byte, error) {
3007	type NoMethod HtmlContent
3008	raw := NoMethod(*s)
3009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3010}
3011
3012// Image: An image resource. You may provide a larger image than was
3013// requested, so long as the aspect ratio is preserved.
3014type Image struct {
3015	// Height: Image height in pixels.
3016	Height int64 `json:"height,omitempty"`
3017
3018	// Url: The URL of the image.
3019	Url string `json:"url,omitempty"`
3020
3021	// Width: Image width in pixels.
3022	Width int64 `json:"width,omitempty"`
3023
3024	// ForceSendFields is a list of field names (e.g. "Height") to
3025	// unconditionally include in API requests. By default, fields with
3026	// empty or default values are omitted from API requests. However, any
3027	// non-pointer, non-interface field appearing in ForceSendFields will be
3028	// sent to the server regardless of whether the field is empty or not.
3029	// This may be used to include empty fields in Patch requests.
3030	ForceSendFields []string `json:"-"`
3031
3032	// NullFields is a list of field names (e.g. "Height") to include in API
3033	// requests with the JSON null value. By default, fields with empty
3034	// values are omitted from API requests. However, any field with an
3035	// empty value appearing in NullFields will be sent to the server as
3036	// null. It is an error if a field in this list has a non-empty value.
3037	// This may be used to include null fields in Patch requests.
3038	NullFields []string `json:"-"`
3039}
3040
3041func (s *Image) MarshalJSON() ([]byte, error) {
3042	type NoMethod Image
3043	raw := NoMethod(*s)
3044	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3045}
3046
3047// ImpressionMetricsRow: The set of metrics that are measured in numbers
3048// of impressions, representing how many impressions with the specified
3049// dimension values were considered eligible at each stage of the
3050// bidding funnel.
3051type ImpressionMetricsRow struct {
3052	// AvailableImpressions: The number of impressions available to the
3053	// buyer on Ad Exchange. In some cases this value may be unavailable.
3054	AvailableImpressions *MetricValue `json:"availableImpressions,omitempty"`
3055
3056	// BidRequests: The number of impressions for which Ad Exchange sent the
3057	// buyer a bid request.
3058	BidRequests *MetricValue `json:"bidRequests,omitempty"`
3059
3060	// InventoryMatches: The number of impressions that match the buyer's
3061	// inventory pretargeting.
3062	InventoryMatches *MetricValue `json:"inventoryMatches,omitempty"`
3063
3064	// ResponsesWithBids: The number of impressions for which Ad Exchange
3065	// received a response from the buyer that contained at least one
3066	// applicable bid.
3067	ResponsesWithBids *MetricValue `json:"responsesWithBids,omitempty"`
3068
3069	// RowDimensions: The values of all dimensions associated with metric
3070	// values in this row.
3071	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
3072
3073	// SuccessfulResponses: The number of impressions for which the buyer
3074	// successfully sent a response to Ad Exchange.
3075	SuccessfulResponses *MetricValue `json:"successfulResponses,omitempty"`
3076
3077	// ForceSendFields is a list of field names (e.g.
3078	// "AvailableImpressions") to unconditionally include in API requests.
3079	// By default, fields with empty or default values are omitted from API
3080	// requests. However, any non-pointer, non-interface field appearing in
3081	// ForceSendFields will be sent to the server regardless of whether the
3082	// field is empty or not. This may be used to include empty fields in
3083	// Patch requests.
3084	ForceSendFields []string `json:"-"`
3085
3086	// NullFields is a list of field names (e.g. "AvailableImpressions") to
3087	// include in API requests with the JSON null value. By default, fields
3088	// with empty values are omitted from API requests. However, any field
3089	// with an empty value appearing in NullFields will be sent to the
3090	// server as null. It is an error if a field in this list has a
3091	// non-empty value. This may be used to include null fields in Patch
3092	// requests.
3093	NullFields []string `json:"-"`
3094}
3095
3096func (s *ImpressionMetricsRow) MarshalJSON() ([]byte, error) {
3097	type NoMethod ImpressionMetricsRow
3098	raw := NoMethod(*s)
3099	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3100}
3101
3102// InventorySizeTargeting: Represents the size of an ad unit that can be
3103// targeted on an ad request. It only applies to Private Auction, AdX
3104// Preferred Deals and Auction Packages. This targeting does not apply
3105// to Programmatic Guaranteed and Preferred Deals in Ad Manager.
3106type InventorySizeTargeting struct {
3107	// ExcludedInventorySizes: A list of inventory sizes to be excluded.
3108	ExcludedInventorySizes []*AdSize `json:"excludedInventorySizes,omitempty"`
3109
3110	// TargetedInventorySizes: A list of inventory sizes to be included.
3111	TargetedInventorySizes []*AdSize `json:"targetedInventorySizes,omitempty"`
3112
3113	// ForceSendFields is a list of field names (e.g.
3114	// "ExcludedInventorySizes") to unconditionally include in API requests.
3115	// By default, fields with empty or default values are omitted from API
3116	// requests. However, any non-pointer, non-interface field appearing in
3117	// ForceSendFields will be sent to the server regardless of whether the
3118	// field is empty or not. This may be used to include empty fields in
3119	// Patch requests.
3120	ForceSendFields []string `json:"-"`
3121
3122	// NullFields is a list of field names (e.g. "ExcludedInventorySizes")
3123	// to include in API requests with the JSON null value. By default,
3124	// fields with empty values are omitted from API requests. However, any
3125	// field with an empty value appearing in NullFields will be sent to the
3126	// server as null. It is an error if a field in this list has a
3127	// non-empty value. This may be used to include null fields in Patch
3128	// requests.
3129	NullFields []string `json:"-"`
3130}
3131
3132func (s *InventorySizeTargeting) MarshalJSON() ([]byte, error) {
3133	type NoMethod InventorySizeTargeting
3134	raw := NoMethod(*s)
3135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3136}
3137
3138// ListBidMetricsResponse: Response message for listing the metrics that
3139// are measured in number of bids.
3140type ListBidMetricsResponse struct {
3141	// BidMetricsRows: List of rows, each containing a set of bid metrics.
3142	BidMetricsRows []*BidMetricsRow `json:"bidMetricsRows,omitempty"`
3143
3144	// NextPageToken: A token to retrieve the next page of results. Pass
3145	// this value in the ListBidMetricsRequest.pageToken field in the
3146	// subsequent call to the bidMetrics.list method to retrieve the next
3147	// page of results.
3148	NextPageToken string `json:"nextPageToken,omitempty"`
3149
3150	// ServerResponse contains the HTTP response code and headers from the
3151	// server.
3152	googleapi.ServerResponse `json:"-"`
3153
3154	// ForceSendFields is a list of field names (e.g. "BidMetricsRows") to
3155	// unconditionally include in API requests. By default, fields with
3156	// empty or default values are omitted from API requests. However, any
3157	// non-pointer, non-interface field appearing in ForceSendFields will be
3158	// sent to the server regardless of whether the field is empty or not.
3159	// This may be used to include empty fields in Patch requests.
3160	ForceSendFields []string `json:"-"`
3161
3162	// NullFields is a list of field names (e.g. "BidMetricsRows") to
3163	// include in API requests with the JSON null value. By default, fields
3164	// with empty values are omitted from API requests. However, any field
3165	// with an empty value appearing in NullFields will be sent to the
3166	// server as null. It is an error if a field in this list has a
3167	// non-empty value. This may be used to include null fields in Patch
3168	// requests.
3169	NullFields []string `json:"-"`
3170}
3171
3172func (s *ListBidMetricsResponse) MarshalJSON() ([]byte, error) {
3173	type NoMethod ListBidMetricsResponse
3174	raw := NoMethod(*s)
3175	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3176}
3177
3178// ListBidResponseErrorsResponse: Response message for listing all
3179// reasons that bid responses resulted in an error.
3180type ListBidResponseErrorsResponse struct {
3181	// CalloutStatusRows: List of rows, with counts of bid responses
3182	// aggregated by callout status.
3183	CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"`
3184
3185	// NextPageToken: A token to retrieve the next page of results. Pass
3186	// this value in the ListBidResponseErrorsRequest.pageToken field in the
3187	// subsequent call to the bidResponseErrors.list method to retrieve the
3188	// next page of results.
3189	NextPageToken string `json:"nextPageToken,omitempty"`
3190
3191	// ServerResponse contains the HTTP response code and headers from the
3192	// server.
3193	googleapi.ServerResponse `json:"-"`
3194
3195	// ForceSendFields is a list of field names (e.g. "CalloutStatusRows")
3196	// to unconditionally include in API requests. By default, fields with
3197	// empty or default values are omitted from API requests. However, any
3198	// non-pointer, non-interface field appearing in ForceSendFields will be
3199	// sent to the server regardless of whether the field is empty or not.
3200	// This may be used to include empty fields in Patch requests.
3201	ForceSendFields []string `json:"-"`
3202
3203	// NullFields is a list of field names (e.g. "CalloutStatusRows") to
3204	// include in API requests with the JSON null value. By default, fields
3205	// with empty values are omitted from API requests. However, any field
3206	// with an empty value appearing in NullFields will be sent to the
3207	// server as null. It is an error if a field in this list has a
3208	// non-empty value. This may be used to include null fields in Patch
3209	// requests.
3210	NullFields []string `json:"-"`
3211}
3212
3213func (s *ListBidResponseErrorsResponse) MarshalJSON() ([]byte, error) {
3214	type NoMethod ListBidResponseErrorsResponse
3215	raw := NoMethod(*s)
3216	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3217}
3218
3219// ListBidResponsesWithoutBidsResponse: Response message for listing all
3220// reasons that bid responses were considered to have no applicable
3221// bids.
3222type ListBidResponsesWithoutBidsResponse struct {
3223	// BidResponseWithoutBidsStatusRows: List of rows, with counts of bid
3224	// responses without bids aggregated by status.
3225	BidResponseWithoutBidsStatusRows []*BidResponseWithoutBidsStatusRow `json:"bidResponseWithoutBidsStatusRows,omitempty"`
3226
3227	// NextPageToken: A token to retrieve the next page of results. Pass
3228	// this value in the ListBidResponsesWithoutBidsRequest.pageToken field
3229	// in the subsequent call to the bidResponsesWithoutBids.list method to
3230	// retrieve the next page of results.
3231	NextPageToken string `json:"nextPageToken,omitempty"`
3232
3233	// ServerResponse contains the HTTP response code and headers from the
3234	// server.
3235	googleapi.ServerResponse `json:"-"`
3236
3237	// ForceSendFields is a list of field names (e.g.
3238	// "BidResponseWithoutBidsStatusRows") to unconditionally include in API
3239	// requests. By default, fields with empty or default values are omitted
3240	// from API requests. However, any non-pointer, non-interface field
3241	// appearing in ForceSendFields will be sent to the server regardless of
3242	// whether the field is empty or not. This may be used to include empty
3243	// fields in Patch requests.
3244	ForceSendFields []string `json:"-"`
3245
3246	// NullFields is a list of field names (e.g.
3247	// "BidResponseWithoutBidsStatusRows") to include in API requests with
3248	// the JSON null value. By default, fields with empty values are omitted
3249	// from API requests. However, any field with an empty value appearing
3250	// in NullFields will be sent to the server as null. It is an error if a
3251	// field in this list has a non-empty value. This may be used to include
3252	// null fields in Patch requests.
3253	NullFields []string `json:"-"`
3254}
3255
3256func (s *ListBidResponsesWithoutBidsResponse) MarshalJSON() ([]byte, error) {
3257	type NoMethod ListBidResponsesWithoutBidsResponse
3258	raw := NoMethod(*s)
3259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3260}
3261
3262type ListClientUserInvitationsResponse struct {
3263	// Invitations: The returned list of client users.
3264	Invitations []*ClientUserInvitation `json:"invitations,omitempty"`
3265
3266	// NextPageToken: A token to retrieve the next page of results. Pass
3267	// this value in the ListClientUserInvitationsRequest.pageToken field in
3268	// the subsequent call to the clients.invitations.list method to
3269	// retrieve the next page of results.
3270	NextPageToken string `json:"nextPageToken,omitempty"`
3271
3272	// ServerResponse contains the HTTP response code and headers from the
3273	// server.
3274	googleapi.ServerResponse `json:"-"`
3275
3276	// ForceSendFields is a list of field names (e.g. "Invitations") to
3277	// unconditionally include in API requests. By default, fields with
3278	// empty or default values are omitted from API requests. However, any
3279	// non-pointer, non-interface field appearing in ForceSendFields will be
3280	// sent to the server regardless of whether the field is empty or not.
3281	// This may be used to include empty fields in Patch requests.
3282	ForceSendFields []string `json:"-"`
3283
3284	// NullFields is a list of field names (e.g. "Invitations") to include
3285	// in API requests with the JSON null value. By default, fields with
3286	// empty values are omitted from API requests. However, any field with
3287	// an empty value appearing in NullFields will be sent to the server as
3288	// null. It is an error if a field in this list has a non-empty value.
3289	// This may be used to include null fields in Patch requests.
3290	NullFields []string `json:"-"`
3291}
3292
3293func (s *ListClientUserInvitationsResponse) MarshalJSON() ([]byte, error) {
3294	type NoMethod ListClientUserInvitationsResponse
3295	raw := NoMethod(*s)
3296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3297}
3298
3299type ListClientUsersResponse struct {
3300	// NextPageToken: A token to retrieve the next page of results. Pass
3301	// this value in the ListClientUsersRequest.pageToken field in the
3302	// subsequent call to the clients.invitations.list method to retrieve
3303	// the next page of results.
3304	NextPageToken string `json:"nextPageToken,omitempty"`
3305
3306	// Users: The returned list of client users.
3307	Users []*ClientUser `json:"users,omitempty"`
3308
3309	// ServerResponse contains the HTTP response code and headers from the
3310	// server.
3311	googleapi.ServerResponse `json:"-"`
3312
3313	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3314	// unconditionally include in API requests. By default, fields with
3315	// empty or default values are omitted from API requests. However, any
3316	// non-pointer, non-interface field appearing in ForceSendFields will be
3317	// sent to the server regardless of whether the field is empty or not.
3318	// This may be used to include empty fields in Patch requests.
3319	ForceSendFields []string `json:"-"`
3320
3321	// NullFields is a list of field names (e.g. "NextPageToken") to include
3322	// in API requests with the JSON null value. By default, fields with
3323	// empty values are omitted from API requests. However, any field with
3324	// an empty value appearing in NullFields will be sent to the server as
3325	// null. It is an error if a field in this list has a non-empty value.
3326	// This may be used to include null fields in Patch requests.
3327	NullFields []string `json:"-"`
3328}
3329
3330func (s *ListClientUsersResponse) MarshalJSON() ([]byte, error) {
3331	type NoMethod ListClientUsersResponse
3332	raw := NoMethod(*s)
3333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3334}
3335
3336type ListClientsResponse struct {
3337	// Clients: The returned list of clients.
3338	Clients []*Client `json:"clients,omitempty"`
3339
3340	// NextPageToken: A token to retrieve the next page of results. Pass
3341	// this value in the ListClientsRequest.pageToken field in the
3342	// subsequent call to the accounts.clients.list method to retrieve the
3343	// next page of results.
3344	NextPageToken string `json:"nextPageToken,omitempty"`
3345
3346	// ServerResponse contains the HTTP response code and headers from the
3347	// server.
3348	googleapi.ServerResponse `json:"-"`
3349
3350	// ForceSendFields is a list of field names (e.g. "Clients") to
3351	// unconditionally include in API requests. By default, fields with
3352	// empty or default values are omitted from API requests. However, any
3353	// non-pointer, non-interface field appearing in ForceSendFields will be
3354	// sent to the server regardless of whether the field is empty or not.
3355	// This may be used to include empty fields in Patch requests.
3356	ForceSendFields []string `json:"-"`
3357
3358	// NullFields is a list of field names (e.g. "Clients") to include in
3359	// API requests with the JSON null value. By default, fields with empty
3360	// values are omitted from API requests. However, any field with an
3361	// empty value appearing in NullFields will be sent to the server as
3362	// null. It is an error if a field in this list has a non-empty value.
3363	// This may be used to include null fields in Patch requests.
3364	NullFields []string `json:"-"`
3365}
3366
3367func (s *ListClientsResponse) MarshalJSON() ([]byte, error) {
3368	type NoMethod ListClientsResponse
3369	raw := NoMethod(*s)
3370	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3371}
3372
3373// ListCreativeStatusBreakdownByCreativeResponse: Response message for
3374// listing all creatives associated with a given filtered bid reason.
3375type ListCreativeStatusBreakdownByCreativeResponse struct {
3376	// FilteredBidCreativeRows: List of rows, with counts of bids with a
3377	// given creative status aggregated by creative.
3378	FilteredBidCreativeRows []*FilteredBidCreativeRow `json:"filteredBidCreativeRows,omitempty"`
3379
3380	// NextPageToken: A token to retrieve the next page of results. Pass
3381	// this value in the
3382	// ListCreativeStatusBreakdownByCreativeRequest.pageToken field in the
3383	// subsequent call to the filteredBids.creatives.list method to retrieve
3384	// the next page of results.
3385	NextPageToken string `json:"nextPageToken,omitempty"`
3386
3387	// ServerResponse contains the HTTP response code and headers from the
3388	// server.
3389	googleapi.ServerResponse `json:"-"`
3390
3391	// ForceSendFields is a list of field names (e.g.
3392	// "FilteredBidCreativeRows") to unconditionally include in API
3393	// requests. By default, fields with empty or default values are omitted
3394	// from API requests. However, any non-pointer, non-interface field
3395	// appearing in ForceSendFields will be sent to the server regardless of
3396	// whether the field is empty or not. This may be used to include empty
3397	// fields in Patch requests.
3398	ForceSendFields []string `json:"-"`
3399
3400	// NullFields is a list of field names (e.g. "FilteredBidCreativeRows")
3401	// to include in API requests with the JSON null value. By default,
3402	// fields with empty values are omitted from API requests. However, any
3403	// field with an empty value appearing in NullFields will be sent to the
3404	// server as null. It is an error if a field in this list has a
3405	// non-empty value. This may be used to include null fields in Patch
3406	// requests.
3407	NullFields []string `json:"-"`
3408}
3409
3410func (s *ListCreativeStatusBreakdownByCreativeResponse) MarshalJSON() ([]byte, error) {
3411	type NoMethod ListCreativeStatusBreakdownByCreativeResponse
3412	raw := NoMethod(*s)
3413	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3414}
3415
3416// ListCreativeStatusBreakdownByDetailResponse: Response message for
3417// listing all details associated with a given filtered bid reason.
3418type ListCreativeStatusBreakdownByDetailResponse struct {
3419	// DetailType: The type of detail that the detail IDs represent.
3420	//
3421	// Possible values:
3422	//   "DETAIL_TYPE_UNSPECIFIED" - A placeholder for an undefined status.
3423	// This value will never be returned in responses.
3424	//   "CREATIVE_ATTRIBUTE" - Indicates that the detail ID refers to a
3425	// creative attribute; see
3426	// [publisher-excludable-creative-attributes](https://developers.google.c
3427	// om/authorized-buyers/rtb/downloads/publisher-excludable-creative-attri
3428	// butes).
3429	//   "VENDOR" - Indicates that the detail ID refers to a vendor; see
3430	// [vendors](https://developers.google.com/authorized-buyers/rtb/download
3431	// s/vendors). This namespace is different from that of the `ATP_VENDOR`
3432	// detail type.
3433	//   "SENSITIVE_CATEGORY" - Indicates that the detail ID refers to a
3434	// sensitive category; see
3435	// [ad-sensitive-categories](https://developers.google.com/authorized-buy
3436	// ers/rtb/downloads/ad-sensitive-categories).
3437	//   "PRODUCT_CATEGORY" - Indicates that the detail ID refers to a
3438	// product category; see
3439	// [ad-product-categories](https://developers.google.com/authorized-buyer
3440	// s/rtb/downloads/ad-product-categories).
3441	//   "DISAPPROVAL_REASON" - Indicates that the detail ID refers to a
3442	// disapproval reason; see DisapprovalReason enum in
3443	// [snippet-status-report-proto](https://developers.google.com/authorized
3444	// -buyers/rtb/downloads/snippet-status-report-proto).
3445	//   "POLICY_TOPIC" - Indicates that the detail ID refers to a policy
3446	// topic.
3447	//   "ATP_VENDOR" - Indicates that the detail ID refers to an ad
3448	// technology provider (ATP); see [providers]
3449	// (https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv).
3450	// This namespace is different from the `VENDOR` detail type; see [ad
3451	// technology
3452	// providers](https://support.google.com/admanager/answer/9012903) for
3453	// more information.
3454	//   "VENDOR_DOMAIN" - Indicates that the detail string refers the
3455	// domain of an unknown vendor.
3456	//   "GVL_ID" - Indicates that the detail ID refers an IAB GVL ID which
3457	// Google did not detect in the latest TCF Vendor List. See [Global
3458	// Vendor List] (https://vendor-list.consensu.org/v2/vendor-list.json)
3459	DetailType string `json:"detailType,omitempty"`
3460
3461	// FilteredBidDetailRows: List of rows, with counts of bids with a given
3462	// creative status aggregated by detail.
3463	FilteredBidDetailRows []*FilteredBidDetailRow `json:"filteredBidDetailRows,omitempty"`
3464
3465	// NextPageToken: A token to retrieve the next page of results. Pass
3466	// this value in the
3467	// ListCreativeStatusBreakdownByDetailRequest.pageToken field in the
3468	// subsequent call to the filteredBids.details.list method to retrieve
3469	// the next page of results.
3470	NextPageToken string `json:"nextPageToken,omitempty"`
3471
3472	// ServerResponse contains the HTTP response code and headers from the
3473	// server.
3474	googleapi.ServerResponse `json:"-"`
3475
3476	// ForceSendFields is a list of field names (e.g. "DetailType") to
3477	// unconditionally include in API requests. By default, fields with
3478	// empty or default values are omitted from API requests. However, any
3479	// non-pointer, non-interface field appearing in ForceSendFields will be
3480	// sent to the server regardless of whether the field is empty or not.
3481	// This may be used to include empty fields in Patch requests.
3482	ForceSendFields []string `json:"-"`
3483
3484	// NullFields is a list of field names (e.g. "DetailType") to include in
3485	// API requests with the JSON null value. By default, fields with empty
3486	// values are omitted from API requests. However, any field with an
3487	// empty value appearing in NullFields will be sent to the server as
3488	// null. It is an error if a field in this list has a non-empty value.
3489	// This may be used to include null fields in Patch requests.
3490	NullFields []string `json:"-"`
3491}
3492
3493func (s *ListCreativeStatusBreakdownByDetailResponse) MarshalJSON() ([]byte, error) {
3494	type NoMethod ListCreativeStatusBreakdownByDetailResponse
3495	raw := NoMethod(*s)
3496	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3497}
3498
3499// ListCreativesResponse: A response for listing creatives.
3500type ListCreativesResponse struct {
3501	// Creatives: The list of creatives.
3502	Creatives []*Creative `json:"creatives,omitempty"`
3503
3504	// NextPageToken: A token to retrieve the next page of results. Pass
3505	// this value in the ListCreativesRequest.page_token field in the
3506	// subsequent call to `ListCreatives` method to retrieve the next page
3507	// of results.
3508	NextPageToken string `json:"nextPageToken,omitempty"`
3509
3510	// ServerResponse contains the HTTP response code and headers from the
3511	// server.
3512	googleapi.ServerResponse `json:"-"`
3513
3514	// ForceSendFields is a list of field names (e.g. "Creatives") to
3515	// unconditionally include in API requests. By default, fields with
3516	// empty or default values are omitted from API requests. However, any
3517	// non-pointer, non-interface field appearing in ForceSendFields will be
3518	// sent to the server regardless of whether the field is empty or not.
3519	// This may be used to include empty fields in Patch requests.
3520	ForceSendFields []string `json:"-"`
3521
3522	// NullFields is a list of field names (e.g. "Creatives") to include in
3523	// API requests with the JSON null value. By default, fields with empty
3524	// values are omitted from API requests. However, any field with an
3525	// empty value appearing in NullFields will be sent to the server as
3526	// null. It is an error if a field in this list has a non-empty value.
3527	// This may be used to include null fields in Patch requests.
3528	NullFields []string `json:"-"`
3529}
3530
3531func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) {
3532	type NoMethod ListCreativesResponse
3533	raw := NoMethod(*s)
3534	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3535}
3536
3537// ListDealAssociationsResponse: A response for listing creative and
3538// deal associations
3539type ListDealAssociationsResponse struct {
3540	// Associations: The list of associations.
3541	Associations []*CreativeDealAssociation `json:"associations,omitempty"`
3542
3543	// NextPageToken: A token to retrieve the next page of results. Pass
3544	// this value in the ListDealAssociationsRequest.page_token field in the
3545	// subsequent call to 'ListDealAssociation' method to retrieve the next
3546	// page of results.
3547	NextPageToken string `json:"nextPageToken,omitempty"`
3548
3549	// ServerResponse contains the HTTP response code and headers from the
3550	// server.
3551	googleapi.ServerResponse `json:"-"`
3552
3553	// ForceSendFields is a list of field names (e.g. "Associations") to
3554	// unconditionally include in API requests. By default, fields with
3555	// empty or default values are omitted from API requests. However, any
3556	// non-pointer, non-interface field appearing in ForceSendFields will be
3557	// sent to the server regardless of whether the field is empty or not.
3558	// This may be used to include empty fields in Patch requests.
3559	ForceSendFields []string `json:"-"`
3560
3561	// NullFields is a list of field names (e.g. "Associations") to include
3562	// in API requests with the JSON null value. By default, fields with
3563	// empty values are omitted from API requests. However, any field with
3564	// an empty value appearing in NullFields will be sent to the server as
3565	// null. It is an error if a field in this list has a non-empty value.
3566	// This may be used to include null fields in Patch requests.
3567	NullFields []string `json:"-"`
3568}
3569
3570func (s *ListDealAssociationsResponse) MarshalJSON() ([]byte, error) {
3571	type NoMethod ListDealAssociationsResponse
3572	raw := NoMethod(*s)
3573	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3574}
3575
3576// ListFilterSetsResponse: Response message for listing filter sets.
3577type ListFilterSetsResponse struct {
3578	// FilterSets: The filter sets belonging to the buyer.
3579	FilterSets []*FilterSet `json:"filterSets,omitempty"`
3580
3581	// NextPageToken: A token to retrieve the next page of results. Pass
3582	// this value in the ListFilterSetsRequest.pageToken field in the
3583	// subsequent call to the accounts.filterSets.list method to retrieve
3584	// the next page of results.
3585	NextPageToken string `json:"nextPageToken,omitempty"`
3586
3587	// ServerResponse contains the HTTP response code and headers from the
3588	// server.
3589	googleapi.ServerResponse `json:"-"`
3590
3591	// ForceSendFields is a list of field names (e.g. "FilterSets") to
3592	// unconditionally include in API requests. By default, fields with
3593	// empty or default values are omitted from API requests. However, any
3594	// non-pointer, non-interface field appearing in ForceSendFields will be
3595	// sent to the server regardless of whether the field is empty or not.
3596	// This may be used to include empty fields in Patch requests.
3597	ForceSendFields []string `json:"-"`
3598
3599	// NullFields is a list of field names (e.g. "FilterSets") to include in
3600	// API requests with the JSON null value. By default, fields with empty
3601	// values are omitted from API requests. However, any field with an
3602	// empty value appearing in NullFields will be sent to the server as
3603	// null. It is an error if a field in this list has a non-empty value.
3604	// This may be used to include null fields in Patch requests.
3605	NullFields []string `json:"-"`
3606}
3607
3608func (s *ListFilterSetsResponse) MarshalJSON() ([]byte, error) {
3609	type NoMethod ListFilterSetsResponse
3610	raw := NoMethod(*s)
3611	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3612}
3613
3614// ListFilteredBidRequestsResponse: Response message for listing all
3615// reasons that bid requests were filtered and not sent to the buyer.
3616type ListFilteredBidRequestsResponse struct {
3617	// CalloutStatusRows: List of rows, with counts of filtered bid requests
3618	// aggregated by callout status.
3619	CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"`
3620
3621	// NextPageToken: A token to retrieve the next page of results. Pass
3622	// this value in the ListFilteredBidRequestsRequest.pageToken field in
3623	// the subsequent call to the filteredBidRequests.list method to
3624	// retrieve the next page of results.
3625	NextPageToken string `json:"nextPageToken,omitempty"`
3626
3627	// ServerResponse contains the HTTP response code and headers from the
3628	// server.
3629	googleapi.ServerResponse `json:"-"`
3630
3631	// ForceSendFields is a list of field names (e.g. "CalloutStatusRows")
3632	// to unconditionally include in API requests. By default, fields with
3633	// empty or default values are omitted from API requests. However, any
3634	// non-pointer, non-interface field appearing in ForceSendFields will be
3635	// sent to the server regardless of whether the field is empty or not.
3636	// This may be used to include empty fields in Patch requests.
3637	ForceSendFields []string `json:"-"`
3638
3639	// NullFields is a list of field names (e.g. "CalloutStatusRows") to
3640	// include in API requests with the JSON null value. By default, fields
3641	// with empty values are omitted from API requests. However, any field
3642	// with an empty value appearing in NullFields will be sent to the
3643	// server as null. It is an error if a field in this list has a
3644	// non-empty value. This may be used to include null fields in Patch
3645	// requests.
3646	NullFields []string `json:"-"`
3647}
3648
3649func (s *ListFilteredBidRequestsResponse) MarshalJSON() ([]byte, error) {
3650	type NoMethod ListFilteredBidRequestsResponse
3651	raw := NoMethod(*s)
3652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3653}
3654
3655// ListFilteredBidsResponse: Response message for listing all reasons
3656// that bids were filtered from the auction.
3657type ListFilteredBidsResponse struct {
3658	// CreativeStatusRows: List of rows, with counts of filtered bids
3659	// aggregated by filtering reason (i.e. creative status).
3660	CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"`
3661
3662	// NextPageToken: A token to retrieve the next page of results. Pass
3663	// this value in the ListFilteredBidsRequest.pageToken field in the
3664	// subsequent call to the filteredBids.list method to retrieve the next
3665	// page of results.
3666	NextPageToken string `json:"nextPageToken,omitempty"`
3667
3668	// ServerResponse contains the HTTP response code and headers from the
3669	// server.
3670	googleapi.ServerResponse `json:"-"`
3671
3672	// ForceSendFields is a list of field names (e.g. "CreativeStatusRows")
3673	// to unconditionally include in API requests. By default, fields with
3674	// empty or default values are omitted from API requests. However, any
3675	// non-pointer, non-interface field appearing in ForceSendFields will be
3676	// sent to the server regardless of whether the field is empty or not.
3677	// This may be used to include empty fields in Patch requests.
3678	ForceSendFields []string `json:"-"`
3679
3680	// NullFields is a list of field names (e.g. "CreativeStatusRows") to
3681	// include in API requests with the JSON null value. By default, fields
3682	// with empty values are omitted from API requests. However, any field
3683	// with an empty value appearing in NullFields will be sent to the
3684	// server as null. It is an error if a field in this list has a
3685	// non-empty value. This may be used to include null fields in Patch
3686	// requests.
3687	NullFields []string `json:"-"`
3688}
3689
3690func (s *ListFilteredBidsResponse) MarshalJSON() ([]byte, error) {
3691	type NoMethod ListFilteredBidsResponse
3692	raw := NoMethod(*s)
3693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3694}
3695
3696// ListImpressionMetricsResponse: Response message for listing the
3697// metrics that are measured in number of impressions.
3698type ListImpressionMetricsResponse struct {
3699	// ImpressionMetricsRows: List of rows, each containing a set of
3700	// impression metrics.
3701	ImpressionMetricsRows []*ImpressionMetricsRow `json:"impressionMetricsRows,omitempty"`
3702
3703	// NextPageToken: A token to retrieve the next page of results. Pass
3704	// this value in the ListImpressionMetricsRequest.pageToken field in the
3705	// subsequent call to the impressionMetrics.list method to retrieve the
3706	// next page of results.
3707	NextPageToken string `json:"nextPageToken,omitempty"`
3708
3709	// ServerResponse contains the HTTP response code and headers from the
3710	// server.
3711	googleapi.ServerResponse `json:"-"`
3712
3713	// ForceSendFields is a list of field names (e.g.
3714	// "ImpressionMetricsRows") to unconditionally include in API requests.
3715	// By default, fields with empty or default values are omitted from API
3716	// requests. However, any non-pointer, non-interface field appearing in
3717	// ForceSendFields will be sent to the server regardless of whether the
3718	// field is empty or not. This may be used to include empty fields in
3719	// Patch requests.
3720	ForceSendFields []string `json:"-"`
3721
3722	// NullFields is a list of field names (e.g. "ImpressionMetricsRows") to
3723	// include in API requests with the JSON null value. By default, fields
3724	// with empty values are omitted from API requests. However, any field
3725	// with an empty value appearing in NullFields will be sent to the
3726	// server as null. It is an error if a field in this list has a
3727	// non-empty value. This may be used to include null fields in Patch
3728	// requests.
3729	NullFields []string `json:"-"`
3730}
3731
3732func (s *ListImpressionMetricsResponse) MarshalJSON() ([]byte, error) {
3733	type NoMethod ListImpressionMetricsResponse
3734	raw := NoMethod(*s)
3735	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3736}
3737
3738// ListLosingBidsResponse: Response message for listing all reasons that
3739// bids lost in the auction.
3740type ListLosingBidsResponse struct {
3741	// CreativeStatusRows: List of rows, with counts of losing bids
3742	// aggregated by loss reason (i.e. creative status).
3743	CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"`
3744
3745	// NextPageToken: A token to retrieve the next page of results. Pass
3746	// this value in the ListLosingBidsRequest.pageToken field in the
3747	// subsequent call to the losingBids.list method to retrieve the next
3748	// page of results.
3749	NextPageToken string `json:"nextPageToken,omitempty"`
3750
3751	// ServerResponse contains the HTTP response code and headers from the
3752	// server.
3753	googleapi.ServerResponse `json:"-"`
3754
3755	// ForceSendFields is a list of field names (e.g. "CreativeStatusRows")
3756	// to unconditionally include in API requests. By default, fields with
3757	// empty or default values are omitted from API requests. However, any
3758	// non-pointer, non-interface field appearing in ForceSendFields will be
3759	// sent to the server regardless of whether the field is empty or not.
3760	// This may be used to include empty fields in Patch requests.
3761	ForceSendFields []string `json:"-"`
3762
3763	// NullFields is a list of field names (e.g. "CreativeStatusRows") to
3764	// include in API requests with the JSON null value. By default, fields
3765	// with empty values are omitted from API requests. However, any field
3766	// with an empty value appearing in NullFields will be sent to the
3767	// server as null. It is an error if a field in this list has a
3768	// non-empty value. This may be used to include null fields in Patch
3769	// requests.
3770	NullFields []string `json:"-"`
3771}
3772
3773func (s *ListLosingBidsResponse) MarshalJSON() ([]byte, error) {
3774	type NoMethod ListLosingBidsResponse
3775	raw := NoMethod(*s)
3776	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3777}
3778
3779// ListNonBillableWinningBidsResponse: Response message for listing all
3780// reasons for which a buyer was not billed for a winning bid.
3781type ListNonBillableWinningBidsResponse struct {
3782	// NextPageToken: A token to retrieve the next page of results. Pass
3783	// this value in the ListNonBillableWinningBidsRequest.pageToken field
3784	// in the subsequent call to the nonBillableWinningBids.list method to
3785	// retrieve the next page of results.
3786	NextPageToken string `json:"nextPageToken,omitempty"`
3787
3788	// NonBillableWinningBidStatusRows: List of rows, with counts of bids
3789	// not billed aggregated by reason.
3790	NonBillableWinningBidStatusRows []*NonBillableWinningBidStatusRow `json:"nonBillableWinningBidStatusRows,omitempty"`
3791
3792	// ServerResponse contains the HTTP response code and headers from the
3793	// server.
3794	googleapi.ServerResponse `json:"-"`
3795
3796	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3797	// unconditionally include in API requests. By default, fields with
3798	// empty or default values are omitted from API requests. However, any
3799	// non-pointer, non-interface field appearing in ForceSendFields will be
3800	// sent to the server regardless of whether the field is empty or not.
3801	// This may be used to include empty fields in Patch requests.
3802	ForceSendFields []string `json:"-"`
3803
3804	// NullFields is a list of field names (e.g. "NextPageToken") to include
3805	// in API requests with the JSON null value. By default, fields with
3806	// empty values are omitted from API requests. However, any field with
3807	// an empty value appearing in NullFields will be sent to the server as
3808	// null. It is an error if a field in this list has a non-empty value.
3809	// This may be used to include null fields in Patch requests.
3810	NullFields []string `json:"-"`
3811}
3812
3813func (s *ListNonBillableWinningBidsResponse) MarshalJSON() ([]byte, error) {
3814	type NoMethod ListNonBillableWinningBidsResponse
3815	raw := NoMethod(*s)
3816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3817}
3818
3819// ListProductsResponse: Response message for listing products visible
3820// to the buyer.
3821type ListProductsResponse struct {
3822	// NextPageToken: List pagination support.
3823	NextPageToken string `json:"nextPageToken,omitempty"`
3824
3825	// Products: The list of matching products at their head revision
3826	// number.
3827	Products []*Product `json:"products,omitempty"`
3828
3829	// ServerResponse contains the HTTP response code and headers from the
3830	// server.
3831	googleapi.ServerResponse `json:"-"`
3832
3833	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3834	// unconditionally include in API requests. By default, fields with
3835	// empty or default values are omitted from API requests. However, any
3836	// non-pointer, non-interface field appearing in ForceSendFields will be
3837	// sent to the server regardless of whether the field is empty or not.
3838	// This may be used to include empty fields in Patch requests.
3839	ForceSendFields []string `json:"-"`
3840
3841	// NullFields is a list of field names (e.g. "NextPageToken") to include
3842	// in API requests with the JSON null value. By default, fields with
3843	// empty values are omitted from API requests. However, any field with
3844	// an empty value appearing in NullFields will be sent to the server as
3845	// null. It is an error if a field in this list has a non-empty value.
3846	// This may be used to include null fields in Patch requests.
3847	NullFields []string `json:"-"`
3848}
3849
3850func (s *ListProductsResponse) MarshalJSON() ([]byte, error) {
3851	type NoMethod ListProductsResponse
3852	raw := NoMethod(*s)
3853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3854}
3855
3856// ListProposalsResponse: Response message for listing proposals.
3857type ListProposalsResponse struct {
3858	// NextPageToken: Continuation token for fetching the next page of
3859	// results.
3860	NextPageToken string `json:"nextPageToken,omitempty"`
3861
3862	// Proposals: The list of proposals.
3863	Proposals []*Proposal `json:"proposals,omitempty"`
3864
3865	// ServerResponse contains the HTTP response code and headers from the
3866	// server.
3867	googleapi.ServerResponse `json:"-"`
3868
3869	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3870	// unconditionally include in API requests. By default, fields with
3871	// empty or default values are omitted from API requests. However, any
3872	// non-pointer, non-interface field appearing in ForceSendFields will be
3873	// sent to the server regardless of whether the field is empty or not.
3874	// This may be used to include empty fields in Patch requests.
3875	ForceSendFields []string `json:"-"`
3876
3877	// NullFields is a list of field names (e.g. "NextPageToken") to include
3878	// in API requests with the JSON null value. By default, fields with
3879	// empty values are omitted from API requests. However, any field with
3880	// an empty value appearing in NullFields will be sent to the server as
3881	// null. It is an error if a field in this list has a non-empty value.
3882	// This may be used to include null fields in Patch requests.
3883	NullFields []string `json:"-"`
3884}
3885
3886func (s *ListProposalsResponse) MarshalJSON() ([]byte, error) {
3887	type NoMethod ListProposalsResponse
3888	raw := NoMethod(*s)
3889	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3890}
3891
3892// ListPublisherProfilesResponse: Response message for profiles visible
3893// to the buyer.
3894type ListPublisherProfilesResponse struct {
3895	// NextPageToken: List pagination support
3896	NextPageToken string `json:"nextPageToken,omitempty"`
3897
3898	// PublisherProfiles: The list of matching publisher profiles.
3899	PublisherProfiles []*PublisherProfile `json:"publisherProfiles,omitempty"`
3900
3901	// ServerResponse contains the HTTP response code and headers from the
3902	// server.
3903	googleapi.ServerResponse `json:"-"`
3904
3905	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3906	// unconditionally include in API requests. By default, fields with
3907	// empty or default values are omitted from API requests. However, any
3908	// non-pointer, non-interface field appearing in ForceSendFields will be
3909	// sent to the server regardless of whether the field is empty or not.
3910	// This may be used to include empty fields in Patch requests.
3911	ForceSendFields []string `json:"-"`
3912
3913	// NullFields is a list of field names (e.g. "NextPageToken") to include
3914	// in API requests with the JSON null value. By default, fields with
3915	// empty values are omitted from API requests. However, any field with
3916	// an empty value appearing in NullFields will be sent to the server as
3917	// null. It is an error if a field in this list has a non-empty value.
3918	// This may be used to include null fields in Patch requests.
3919	NullFields []string `json:"-"`
3920}
3921
3922func (s *ListPublisherProfilesResponse) MarshalJSON() ([]byte, error) {
3923	type NoMethod ListPublisherProfilesResponse
3924	raw := NoMethod(*s)
3925	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3926}
3927
3928// LocationContext: Output only. The Geo criteria the restriction
3929// applies to.
3930type LocationContext struct {
3931	// GeoCriteriaIds: IDs representing the geo location for this context.
3932	// Please refer to the geo-table.csv
3933	// (https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)
3934	// file for different geo criteria IDs.
3935	GeoCriteriaIds []int64 `json:"geoCriteriaIds,omitempty"`
3936
3937	// ForceSendFields is a list of field names (e.g. "GeoCriteriaIds") to
3938	// unconditionally include in API requests. By default, fields with
3939	// empty or default values are omitted from API requests. However, any
3940	// non-pointer, non-interface field appearing in ForceSendFields will be
3941	// sent to the server regardless of whether the field is empty or not.
3942	// This may be used to include empty fields in Patch requests.
3943	ForceSendFields []string `json:"-"`
3944
3945	// NullFields is a list of field names (e.g. "GeoCriteriaIds") to
3946	// include in API requests with the JSON null value. By default, fields
3947	// with empty values are omitted from API requests. However, any field
3948	// with an empty value appearing in NullFields will be sent to the
3949	// server as null. It is an error if a field in this list has a
3950	// non-empty value. This may be used to include null fields in Patch
3951	// requests.
3952	NullFields []string `json:"-"`
3953}
3954
3955func (s *LocationContext) MarshalJSON() ([]byte, error) {
3956	type NoMethod LocationContext
3957	raw := NoMethod(*s)
3958	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3959}
3960
3961// MarketplaceTargeting: Targeting represents different criteria that
3962// can be used by advertisers to target ad inventory. For example, they
3963// can choose to target ad requests only if the user is in the US.
3964// Multiple types of targeting are always applied as a logical AND,
3965// unless noted otherwise.
3966type MarketplaceTargeting struct {
3967	// GeoTargeting: Geo criteria IDs to be included/excluded.
3968	GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"`
3969
3970	// InventorySizeTargeting: Inventory sizes to be included/excluded.
3971	InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"`
3972
3973	// PlacementTargeting: Placement targeting information, e.g., URL,
3974	// mobile applications.
3975	PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"`
3976
3977	// TechnologyTargeting: Technology targeting information, e.g.,
3978	// operating system, device category.
3979	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
3980
3981	// VideoTargeting: Video targeting information.
3982	VideoTargeting *VideoTargeting `json:"videoTargeting,omitempty"`
3983
3984	// ForceSendFields is a list of field names (e.g. "GeoTargeting") to
3985	// unconditionally include in API requests. By default, fields with
3986	// empty or default values are omitted from API requests. However, any
3987	// non-pointer, non-interface field appearing in ForceSendFields will be
3988	// sent to the server regardless of whether the field is empty or not.
3989	// This may be used to include empty fields in Patch requests.
3990	ForceSendFields []string `json:"-"`
3991
3992	// NullFields is a list of field names (e.g. "GeoTargeting") to include
3993	// in API requests with the JSON null value. By default, fields with
3994	// empty values are omitted from API requests. However, any field with
3995	// an empty value appearing in NullFields will be sent to the server as
3996	// null. It is an error if a field in this list has a non-empty value.
3997	// This may be used to include null fields in Patch requests.
3998	NullFields []string `json:"-"`
3999}
4000
4001func (s *MarketplaceTargeting) MarshalJSON() ([]byte, error) {
4002	type NoMethod MarketplaceTargeting
4003	raw := NoMethod(*s)
4004	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4005}
4006
4007// MetricValue: A metric value, with an expected value and a variance;
4008// represents a count that may be either exact or estimated (i.e. when
4009// sampled).
4010type MetricValue struct {
4011	// Value: The expected value of the metric.
4012	Value int64 `json:"value,omitempty,string"`
4013
4014	// Variance: The variance (i.e. square of the standard deviation) of the
4015	// metric value. If value is exact, variance is 0. Can be used to
4016	// calculate margin of error as a percentage of value, using the
4017	// following formula, where Z is the standard constant that depends on
4018	// the desired size of the confidence interval (e.g. for 90% confidence
4019	// interval, use Z = 1.645): marginOfError = 100 * Z * sqrt(variance) /
4020	// value
4021	Variance int64 `json:"variance,omitempty,string"`
4022
4023	// ForceSendFields is a list of field names (e.g. "Value") to
4024	// unconditionally include in API requests. By default, fields with
4025	// empty or default values are omitted from API requests. However, any
4026	// non-pointer, non-interface field appearing in ForceSendFields will be
4027	// sent to the server regardless of whether the field is empty or not.
4028	// This may be used to include empty fields in Patch requests.
4029	ForceSendFields []string `json:"-"`
4030
4031	// NullFields is a list of field names (e.g. "Value") to include in API
4032	// requests with the JSON null value. By default, fields with empty
4033	// values are omitted from API requests. However, any field with an
4034	// empty value appearing in NullFields will be sent to the server as
4035	// null. It is an error if a field in this list has a non-empty value.
4036	// This may be used to include null fields in Patch requests.
4037	NullFields []string `json:"-"`
4038}
4039
4040func (s *MetricValue) MarshalJSON() ([]byte, error) {
4041	type NoMethod MetricValue
4042	raw := NoMethod(*s)
4043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4044}
4045
4046// MobileApplicationTargeting: Mobile application targeting settings.
4047type MobileApplicationTargeting struct {
4048	// FirstPartyTargeting: Publisher owned apps to be targeted or excluded
4049	// by the publisher to display the ads in.
4050	FirstPartyTargeting *FirstPartyMobileApplicationTargeting `json:"firstPartyTargeting,omitempty"`
4051
4052	// ForceSendFields is a list of field names (e.g. "FirstPartyTargeting")
4053	// to unconditionally include in API requests. By default, fields with
4054	// empty or default values are omitted from API requests. However, any
4055	// non-pointer, non-interface field appearing in ForceSendFields will be
4056	// sent to the server regardless of whether the field is empty or not.
4057	// This may be used to include empty fields in Patch requests.
4058	ForceSendFields []string `json:"-"`
4059
4060	// NullFields is a list of field names (e.g. "FirstPartyTargeting") to
4061	// include in API requests with the JSON null value. By default, fields
4062	// with empty values are omitted from API requests. However, any field
4063	// with an empty value appearing in NullFields will be sent to the
4064	// server as null. It is an error if a field in this list has a
4065	// non-empty value. This may be used to include null fields in Patch
4066	// requests.
4067	NullFields []string `json:"-"`
4068}
4069
4070func (s *MobileApplicationTargeting) MarshalJSON() ([]byte, error) {
4071	type NoMethod MobileApplicationTargeting
4072	raw := NoMethod(*s)
4073	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4074}
4075
4076// Money: Represents an amount of money with its currency type.
4077type Money struct {
4078	// CurrencyCode: The three-letter currency code defined in ISO 4217.
4079	CurrencyCode string `json:"currencyCode,omitempty"`
4080
4081	// Nanos: Number of nano (10^-9) units of the amount. The value must be
4082	// between -999,999,999 and +999,999,999 inclusive. If `units` is
4083	// positive, `nanos` must be positive or zero. If `units` is zero,
4084	// `nanos` can be positive, zero, or negative. If `units` is negative,
4085	// `nanos` must be negative or zero. For example $-1.75 is represented
4086	// as `units`=-1 and `nanos`=-750,000,000.
4087	Nanos int64 `json:"nanos,omitempty"`
4088
4089	// Units: The whole units of the amount. For example if `currencyCode`
4090	// is "USD", then 1 unit is one US dollar.
4091	Units int64 `json:"units,omitempty,string"`
4092
4093	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
4094	// unconditionally include in API requests. By default, fields with
4095	// empty or default values are omitted from API requests. However, any
4096	// non-pointer, non-interface field appearing in ForceSendFields will be
4097	// sent to the server regardless of whether the field is empty or not.
4098	// This may be used to include empty fields in Patch requests.
4099	ForceSendFields []string `json:"-"`
4100
4101	// NullFields is a list of field names (e.g. "CurrencyCode") to include
4102	// in API requests with the JSON null value. By default, fields with
4103	// empty values are omitted from API requests. However, any field with
4104	// an empty value appearing in NullFields will be sent to the server as
4105	// null. It is an error if a field in this list has a non-empty value.
4106	// This may be used to include null fields in Patch requests.
4107	NullFields []string `json:"-"`
4108}
4109
4110func (s *Money) MarshalJSON() ([]byte, error) {
4111	type NoMethod Money
4112	raw := NoMethod(*s)
4113	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4114}
4115
4116// NativeContent: Native content for a creative.
4117type NativeContent struct {
4118	// AdvertiserName: The name of the advertiser or sponsor, to be
4119	// displayed in the ad creative.
4120	AdvertiserName string `json:"advertiserName,omitempty"`
4121
4122	// AppIcon: The app icon, for app download ads.
4123	AppIcon *Image `json:"appIcon,omitempty"`
4124
4125	// Body: A long description of the ad.
4126	Body string `json:"body,omitempty"`
4127
4128	// CallToAction: A label for the button that the user is supposed to
4129	// click.
4130	CallToAction string `json:"callToAction,omitempty"`
4131
4132	// ClickLinkUrl: The URL that the browser/SDK will load when the user
4133	// clicks the ad.
4134	ClickLinkUrl string `json:"clickLinkUrl,omitempty"`
4135
4136	// ClickTrackingUrl: The URL to use for click tracking.
4137	ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
4138
4139	// Headline: A short title for the ad.
4140	Headline string `json:"headline,omitempty"`
4141
4142	// Image: A large image.
4143	Image *Image `json:"image,omitempty"`
4144
4145	// Logo: A smaller image, for the advertiser's logo.
4146	Logo *Image `json:"logo,omitempty"`
4147
4148	// PriceDisplayText: The price of the promoted app including currency
4149	// info.
4150	PriceDisplayText string `json:"priceDisplayText,omitempty"`
4151
4152	// StarRating: The app rating in the app store. Must be in the range
4153	// [0-5].
4154	StarRating float64 `json:"starRating,omitempty"`
4155
4156	// StoreUrl: The URL to the app store to purchase/download the promoted
4157	// app.
4158	StoreUrl string `json:"storeUrl,omitempty"`
4159
4160	// VideoUrl: The URL to fetch a native video ad.
4161	VideoUrl string `json:"videoUrl,omitempty"`
4162
4163	// ForceSendFields is a list of field names (e.g. "AdvertiserName") to
4164	// unconditionally include in API requests. By default, fields with
4165	// empty or default values are omitted from API requests. However, any
4166	// non-pointer, non-interface field appearing in ForceSendFields will be
4167	// sent to the server regardless of whether the field is empty or not.
4168	// This may be used to include empty fields in Patch requests.
4169	ForceSendFields []string `json:"-"`
4170
4171	// NullFields is a list of field names (e.g. "AdvertiserName") to
4172	// include in API requests with the JSON null value. By default, fields
4173	// with empty values are omitted from API requests. However, any field
4174	// with an empty value appearing in NullFields will be sent to the
4175	// server as null. It is an error if a field in this list has a
4176	// non-empty value. This may be used to include null fields in Patch
4177	// requests.
4178	NullFields []string `json:"-"`
4179}
4180
4181func (s *NativeContent) MarshalJSON() ([]byte, error) {
4182	type NoMethod NativeContent
4183	raw := NoMethod(*s)
4184	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4185}
4186
4187func (s *NativeContent) UnmarshalJSON(data []byte) error {
4188	type NoMethod NativeContent
4189	var s1 struct {
4190		StarRating gensupport.JSONFloat64 `json:"starRating"`
4191		*NoMethod
4192	}
4193	s1.NoMethod = (*NoMethod)(s)
4194	if err := json.Unmarshal(data, &s1); err != nil {
4195		return err
4196	}
4197	s.StarRating = float64(s1.StarRating)
4198	return nil
4199}
4200
4201// NonBillableWinningBidStatusRow: The number of winning bids with the
4202// specified dimension values for which the buyer was not billed, as
4203// described by the specified status.
4204type NonBillableWinningBidStatusRow struct {
4205	// BidCount: The number of bids with the specified status.
4206	BidCount *MetricValue `json:"bidCount,omitempty"`
4207
4208	// RowDimensions: The values of all dimensions associated with metric
4209	// values in this row.
4210	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
4211
4212	// Status: The status specifying why the winning bids were not billed.
4213	//
4214	// Possible values:
4215	//   "STATUS_UNSPECIFIED" - A placeholder for an undefined status. This
4216	// value will never be returned in responses.
4217	//   "AD_NOT_RENDERED" - The buyer was not billed because the ad was not
4218	// rendered by the publisher.
4219	//   "INVALID_IMPRESSION" - The buyer was not billed because the
4220	// impression won by the bid was determined to be invalid.
4221	//   "FATAL_VAST_ERROR" - A video impression was served but a fatal
4222	// error was reported from the client during playback.
4223	//   "LOST_IN_MEDIATION" - The buyer was not billed because the ad was
4224	// outplaced in the mediation waterfall.
4225	Status string `json:"status,omitempty"`
4226
4227	// ForceSendFields is a list of field names (e.g. "BidCount") to
4228	// unconditionally include in API requests. By default, fields with
4229	// empty or default values are omitted from API requests. However, any
4230	// non-pointer, non-interface field appearing in ForceSendFields will be
4231	// sent to the server regardless of whether the field is empty or not.
4232	// This may be used to include empty fields in Patch requests.
4233	ForceSendFields []string `json:"-"`
4234
4235	// NullFields is a list of field names (e.g. "BidCount") to include in
4236	// API requests with the JSON null value. By default, fields with empty
4237	// values are omitted from API requests. However, any field with an
4238	// empty value appearing in NullFields will be sent to the server as
4239	// null. It is an error if a field in this list has a non-empty value.
4240	// This may be used to include null fields in Patch requests.
4241	NullFields []string `json:"-"`
4242}
4243
4244func (s *NonBillableWinningBidStatusRow) MarshalJSON() ([]byte, error) {
4245	type NoMethod NonBillableWinningBidStatusRow
4246	raw := NoMethod(*s)
4247	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4248}
4249
4250// NonGuaranteedAuctionTerms: Terms for Private Auctions. Note that
4251// Private Auctions can be created only by the seller, but they can be
4252// returned in a get or list request.
4253type NonGuaranteedAuctionTerms struct {
4254	// AutoOptimizePrivateAuction: True if open auction buyers are allowed
4255	// to compete with invited buyers in this private auction.
4256	AutoOptimizePrivateAuction bool `json:"autoOptimizePrivateAuction,omitempty"`
4257
4258	// ReservePricesPerBuyer: Reserve price for the specified buyer.
4259	ReservePricesPerBuyer []*PricePerBuyer `json:"reservePricesPerBuyer,omitempty"`
4260
4261	// ForceSendFields is a list of field names (e.g.
4262	// "AutoOptimizePrivateAuction") to unconditionally include in API
4263	// requests. By default, fields with empty or default values are omitted
4264	// from API requests. However, any non-pointer, non-interface field
4265	// appearing in ForceSendFields will be sent to the server regardless of
4266	// whether the field is empty or not. This may be used to include empty
4267	// fields in Patch requests.
4268	ForceSendFields []string `json:"-"`
4269
4270	// NullFields is a list of field names (e.g.
4271	// "AutoOptimizePrivateAuction") to include in API requests with the
4272	// JSON null value. By default, fields with empty values are omitted
4273	// from API requests. However, any field with an empty value appearing
4274	// in NullFields will be sent to the server as null. It is an error if a
4275	// field in this list has a non-empty value. This may be used to include
4276	// null fields in Patch requests.
4277	NullFields []string `json:"-"`
4278}
4279
4280func (s *NonGuaranteedAuctionTerms) MarshalJSON() ([]byte, error) {
4281	type NoMethod NonGuaranteedAuctionTerms
4282	raw := NoMethod(*s)
4283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4284}
4285
4286// NonGuaranteedFixedPriceTerms: Terms for Preferred Deals.
4287type NonGuaranteedFixedPriceTerms struct {
4288	// FixedPrices: Fixed price for the specified buyer.
4289	FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"`
4290
4291	// ForceSendFields is a list of field names (e.g. "FixedPrices") to
4292	// unconditionally include in API requests. By default, fields with
4293	// empty or default values are omitted from API requests. However, any
4294	// non-pointer, non-interface field appearing in ForceSendFields will be
4295	// sent to the server regardless of whether the field is empty or not.
4296	// This may be used to include empty fields in Patch requests.
4297	ForceSendFields []string `json:"-"`
4298
4299	// NullFields is a list of field names (e.g. "FixedPrices") to include
4300	// in API requests with the JSON null value. By default, fields with
4301	// empty values are omitted from API requests. However, any field with
4302	// an empty value appearing in NullFields will be sent to the server as
4303	// null. It is an error if a field in this list has a non-empty value.
4304	// This may be used to include null fields in Patch requests.
4305	NullFields []string `json:"-"`
4306}
4307
4308func (s *NonGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) {
4309	type NoMethod NonGuaranteedFixedPriceTerms
4310	raw := NoMethod(*s)
4311	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4312}
4313
4314// Note: A proposal may be associated to several notes.
4315type Note struct {
4316	// CreateTime: Output only. The timestamp for when this note was
4317	// created.
4318	CreateTime string `json:"createTime,omitempty"`
4319
4320	// CreatorRole: Output only. The role of the person (buyer/seller)
4321	// creating the note.
4322	//
4323	// Possible values:
4324	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
4325	// buyer/seller role.
4326	//   "BUYER" - Specifies the role as buyer.
4327	//   "SELLER" - Specifies the role as seller.
4328	CreatorRole string `json:"creatorRole,omitempty"`
4329
4330	// Note: The actual note to attach. (max-length: 1024 unicode code
4331	// units) Note: This field may be set only when creating the resource.
4332	// Modifying this field while updating the resource will result in an
4333	// error.
4334	Note string `json:"note,omitempty"`
4335
4336	// NoteId: Output only. The unique ID for the note.
4337	NoteId string `json:"noteId,omitempty"`
4338
4339	// ProposalRevision: Output only. The revision number of the proposal
4340	// when the note is created.
4341	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
4342
4343	// ServerResponse contains the HTTP response code and headers from the
4344	// server.
4345	googleapi.ServerResponse `json:"-"`
4346
4347	// ForceSendFields is a list of field names (e.g. "CreateTime") to
4348	// unconditionally include in API requests. By default, fields with
4349	// empty or default values are omitted from API requests. However, any
4350	// non-pointer, non-interface field appearing in ForceSendFields will be
4351	// sent to the server regardless of whether the field is empty or not.
4352	// This may be used to include empty fields in Patch requests.
4353	ForceSendFields []string `json:"-"`
4354
4355	// NullFields is a list of field names (e.g. "CreateTime") to include in
4356	// API requests with the JSON null value. By default, fields with empty
4357	// values are omitted from API requests. However, any field with an
4358	// empty value appearing in NullFields will be sent to the server as
4359	// null. It is an error if a field in this list has a non-empty value.
4360	// This may be used to include null fields in Patch requests.
4361	NullFields []string `json:"-"`
4362}
4363
4364func (s *Note) MarshalJSON() ([]byte, error) {
4365	type NoMethod Note
4366	raw := NoMethod(*s)
4367	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4368}
4369
4370// OperatingSystemTargeting: Represents targeting information for
4371// operating systems.
4372type OperatingSystemTargeting struct {
4373	// OperatingSystemCriteria: IDs of operating systems to be
4374	// included/excluded.
4375	OperatingSystemCriteria *CriteriaTargeting `json:"operatingSystemCriteria,omitempty"`
4376
4377	// OperatingSystemVersionCriteria: IDs of operating system versions to
4378	// be included/excluded.
4379	OperatingSystemVersionCriteria *CriteriaTargeting `json:"operatingSystemVersionCriteria,omitempty"`
4380
4381	// ForceSendFields is a list of field names (e.g.
4382	// "OperatingSystemCriteria") to unconditionally include in API
4383	// requests. By default, fields with empty or default values are omitted
4384	// from API requests. However, any non-pointer, non-interface field
4385	// appearing in ForceSendFields will be sent to the server regardless of
4386	// whether the field is empty or not. This may be used to include empty
4387	// fields in Patch requests.
4388	ForceSendFields []string `json:"-"`
4389
4390	// NullFields is a list of field names (e.g. "OperatingSystemCriteria")
4391	// to include in API requests with the JSON null value. By default,
4392	// fields with empty values are omitted from API requests. However, any
4393	// field with an empty value appearing in NullFields will be sent to the
4394	// server as null. It is an error if a field in this list has a
4395	// non-empty value. This may be used to include null fields in Patch
4396	// requests.
4397	NullFields []string `json:"-"`
4398}
4399
4400func (s *OperatingSystemTargeting) MarshalJSON() ([]byte, error) {
4401	type NoMethod OperatingSystemTargeting
4402	raw := NoMethod(*s)
4403	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4404}
4405
4406// PauseProposalDealsRequest: Request message to pause serving for
4407// finalized deals.
4408type PauseProposalDealsRequest struct {
4409	// ExternalDealIds: The external_deal_id's of the deals to be paused. If
4410	// empty, all the deals in the proposal will be paused.
4411	ExternalDealIds []string `json:"externalDealIds,omitempty"`
4412
4413	// Reason: The reason why the deals are being paused. This human
4414	// readable message will be displayed in the seller's UI. (Max length:
4415	// 1000 unicode code units.)
4416	Reason string `json:"reason,omitempty"`
4417
4418	// ForceSendFields is a list of field names (e.g. "ExternalDealIds") to
4419	// unconditionally include in API requests. By default, fields with
4420	// empty or default values are omitted from API requests. However, any
4421	// non-pointer, non-interface field appearing in ForceSendFields will be
4422	// sent to the server regardless of whether the field is empty or not.
4423	// This may be used to include empty fields in Patch requests.
4424	ForceSendFields []string `json:"-"`
4425
4426	// NullFields is a list of field names (e.g. "ExternalDealIds") to
4427	// include in API requests with the JSON null value. By default, fields
4428	// with empty values are omitted from API requests. However, any field
4429	// with an empty value appearing in NullFields will be sent to the
4430	// server as null. It is an error if a field in this list has a
4431	// non-empty value. This may be used to include null fields in Patch
4432	// requests.
4433	NullFields []string `json:"-"`
4434}
4435
4436func (s *PauseProposalDealsRequest) MarshalJSON() ([]byte, error) {
4437	type NoMethod PauseProposalDealsRequest
4438	raw := NoMethod(*s)
4439	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4440}
4441
4442// PauseProposalRequest: Request message to pause serving for an
4443// already-finalized proposal.
4444type PauseProposalRequest struct {
4445	// Reason: The reason why the proposal is being paused. This human
4446	// readable message will be displayed in the seller's UI. (Max length:
4447	// 1000 unicode code units.)
4448	Reason string `json:"reason,omitempty"`
4449
4450	// ForceSendFields is a list of field names (e.g. "Reason") to
4451	// unconditionally include in API requests. By default, fields with
4452	// empty or default values are omitted from API requests. However, any
4453	// non-pointer, non-interface field appearing in ForceSendFields will be
4454	// sent to the server regardless of whether the field is empty or not.
4455	// This may be used to include empty fields in Patch requests.
4456	ForceSendFields []string `json:"-"`
4457
4458	// NullFields is a list of field names (e.g. "Reason") to include in API
4459	// requests with the JSON null value. By default, fields with empty
4460	// values are omitted from API requests. However, any field with an
4461	// empty value appearing in NullFields will be sent to the server as
4462	// null. It is an error if a field in this list has a non-empty value.
4463	// This may be used to include null fields in Patch requests.
4464	NullFields []string `json:"-"`
4465}
4466
4467func (s *PauseProposalRequest) MarshalJSON() ([]byte, error) {
4468	type NoMethod PauseProposalRequest
4469	raw := NoMethod(*s)
4470	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4471}
4472
4473// PlacementTargeting: Represents targeting about where the ads can
4474// appear, e.g., certain sites or mobile applications. Different
4475// placement targeting types will be logically OR'ed.
4476type PlacementTargeting struct {
4477	// MobileApplicationTargeting: Mobile application targeting information
4478	// in a deal. This doesn't apply to Auction Packages.
4479	MobileApplicationTargeting *MobileApplicationTargeting `json:"mobileApplicationTargeting,omitempty"`
4480
4481	// UrlTargeting: URLs to be included/excluded.
4482	UrlTargeting *UrlTargeting `json:"urlTargeting,omitempty"`
4483
4484	// ForceSendFields is a list of field names (e.g.
4485	// "MobileApplicationTargeting") to unconditionally include in API
4486	// requests. By default, fields with empty or default values are omitted
4487	// from API requests. However, any non-pointer, non-interface field
4488	// appearing in ForceSendFields will be sent to the server regardless of
4489	// whether the field is empty or not. This may be used to include empty
4490	// fields in Patch requests.
4491	ForceSendFields []string `json:"-"`
4492
4493	// NullFields is a list of field names (e.g.
4494	// "MobileApplicationTargeting") to include in API requests with the
4495	// JSON null value. By default, fields with empty values are omitted
4496	// from API requests. However, any field with an empty value appearing
4497	// in NullFields will be sent to the server as null. It is an error if a
4498	// field in this list has a non-empty value. This may be used to include
4499	// null fields in Patch requests.
4500	NullFields []string `json:"-"`
4501}
4502
4503func (s *PlacementTargeting) MarshalJSON() ([]byte, error) {
4504	type NoMethod PlacementTargeting
4505	raw := NoMethod(*s)
4506	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4507}
4508
4509// PlatformContext: Output only. The type of platform the restriction
4510// applies to.
4511type PlatformContext struct {
4512	// Platforms: The platforms this restriction applies to.
4513	//
4514	// Possible values:
4515	//   "DESKTOP" - Desktop platform.
4516	//   "ANDROID" - Android platform.
4517	//   "IOS" - iOS platform.
4518	Platforms []string `json:"platforms,omitempty"`
4519
4520	// ForceSendFields is a list of field names (e.g. "Platforms") to
4521	// unconditionally include in API requests. By default, fields with
4522	// empty or default values are omitted from API requests. However, any
4523	// non-pointer, non-interface field appearing in ForceSendFields will be
4524	// sent to the server regardless of whether the field is empty or not.
4525	// This may be used to include empty fields in Patch requests.
4526	ForceSendFields []string `json:"-"`
4527
4528	// NullFields is a list of field names (e.g. "Platforms") to include in
4529	// API requests with the JSON null value. By default, fields with empty
4530	// values are omitted from API requests. However, any field with an
4531	// empty value appearing in NullFields will be sent to the server as
4532	// null. It is an error if a field in this list has a non-empty value.
4533	// This may be used to include null fields in Patch requests.
4534	NullFields []string `json:"-"`
4535}
4536
4537func (s *PlatformContext) MarshalJSON() ([]byte, error) {
4538	type NoMethod PlatformContext
4539	raw := NoMethod(*s)
4540	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4541}
4542
4543// Price: Represents a price and a pricing type for a product / deal.
4544type Price struct {
4545	// Amount: The actual price with currency specified.
4546	Amount *Money `json:"amount,omitempty"`
4547
4548	// PricingType: The pricing type for the deal/product. (default: CPM)
4549	//
4550	// Possible values:
4551	//   "PRICING_TYPE_UNSPECIFIED" - A placeholder for an undefined pricing
4552	// type. If the pricing type is unpsecified, `COST_PER_MILLE` will be
4553	// used instead.
4554	//   "COST_PER_MILLE" - Cost per thousand impressions.
4555	//   "COST_PER_DAY" - Cost per day
4556	PricingType string `json:"pricingType,omitempty"`
4557
4558	// ForceSendFields is a list of field names (e.g. "Amount") to
4559	// unconditionally include in API requests. By default, fields with
4560	// empty or default values are omitted from API requests. However, any
4561	// non-pointer, non-interface field appearing in ForceSendFields will be
4562	// sent to the server regardless of whether the field is empty or not.
4563	// This may be used to include empty fields in Patch requests.
4564	ForceSendFields []string `json:"-"`
4565
4566	// NullFields is a list of field names (e.g. "Amount") to include in API
4567	// requests with the JSON null value. By default, fields with empty
4568	// values are omitted from API requests. However, any field with an
4569	// empty value appearing in NullFields will be sent to the server as
4570	// null. It is an error if a field in this list has a non-empty value.
4571	// This may be used to include null fields in Patch requests.
4572	NullFields []string `json:"-"`
4573}
4574
4575func (s *Price) MarshalJSON() ([]byte, error) {
4576	type NoMethod Price
4577	raw := NoMethod(*s)
4578	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4579}
4580
4581// PricePerBuyer: Used to specify pricing rules for buyers/advertisers.
4582// Each PricePerBuyer in a product can become 0 or 1 deals. To check if
4583// there is a PricePerBuyer for a particular buyer or buyer/advertiser
4584// pair, we look for the most specific matching rule - we first look for
4585// a rule matching the buyer and advertiser, next a rule with the buyer
4586// but an empty advertiser list, and otherwise look for a matching rule
4587// where no buyer is set.
4588type PricePerBuyer struct {
4589	// AdvertiserIds: The list of advertisers for this price when associated
4590	// with this buyer. If empty, all advertisers with this buyer pay this
4591	// price.
4592	AdvertiserIds []string `json:"advertiserIds,omitempty"`
4593
4594	// Buyer: The buyer who will pay this price. If unset, all buyers can
4595	// pay this price (if the advertisers match, and there's no more
4596	// specific rule matching the buyer).
4597	Buyer *Buyer `json:"buyer,omitempty"`
4598
4599	// Price: The specified price.
4600	Price *Price `json:"price,omitempty"`
4601
4602	// ForceSendFields is a list of field names (e.g. "AdvertiserIds") to
4603	// unconditionally include in API requests. By default, fields with
4604	// empty or default values are omitted from API requests. However, any
4605	// non-pointer, non-interface field appearing in ForceSendFields will be
4606	// sent to the server regardless of whether the field is empty or not.
4607	// This may be used to include empty fields in Patch requests.
4608	ForceSendFields []string `json:"-"`
4609
4610	// NullFields is a list of field names (e.g. "AdvertiserIds") to include
4611	// in API requests with the JSON null value. By default, fields with
4612	// empty values are omitted from API requests. However, any field with
4613	// an empty value appearing in NullFields will be sent to the server as
4614	// null. It is an error if a field in this list has a non-empty value.
4615	// This may be used to include null fields in Patch requests.
4616	NullFields []string `json:"-"`
4617}
4618
4619func (s *PricePerBuyer) MarshalJSON() ([]byte, error) {
4620	type NoMethod PricePerBuyer
4621	raw := NoMethod(*s)
4622	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4623}
4624
4625// PrivateData: Buyers are allowed to store certain types of private
4626// data in a proposal/deal.
4627type PrivateData struct {
4628	// ReferenceId: A buyer or seller specified reference ID. This can be
4629	// queried in the list operations (max-length: 1024 unicode code units).
4630	ReferenceId string `json:"referenceId,omitempty"`
4631
4632	// ForceSendFields is a list of field names (e.g. "ReferenceId") to
4633	// unconditionally include in API requests. By default, fields with
4634	// empty or default values are omitted from API requests. However, any
4635	// non-pointer, non-interface field appearing in ForceSendFields will be
4636	// sent to the server regardless of whether the field is empty or not.
4637	// This may be used to include empty fields in Patch requests.
4638	ForceSendFields []string `json:"-"`
4639
4640	// NullFields is a list of field names (e.g. "ReferenceId") to include
4641	// in API requests with the JSON null value. By default, fields with
4642	// empty values are omitted from API requests. However, any field with
4643	// an empty value appearing in NullFields will be sent to the server as
4644	// null. It is an error if a field in this list has a non-empty value.
4645	// This may be used to include null fields in Patch requests.
4646	NullFields []string `json:"-"`
4647}
4648
4649func (s *PrivateData) MarshalJSON() ([]byte, error) {
4650	type NoMethod PrivateData
4651	raw := NoMethod(*s)
4652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4653}
4654
4655// Product: A product is a segment of inventory that a seller wishes to
4656// sell. It is associated with certain terms and targeting information
4657// which helps the buyer know more about the inventory.
4658type Product struct {
4659	// AvailableEndTime: The proposed end time for the deal. The field will
4660	// be truncated to the order of seconds during serving.
4661	AvailableEndTime string `json:"availableEndTime,omitempty"`
4662
4663	// AvailableStartTime: Inventory availability dates. The start time will
4664	// be truncated to seconds during serving. Thus, a field specified as
4665	// 3:23:34.456 (HH:mm:ss.SSS) will be truncated to 3:23:34 when serving.
4666	AvailableStartTime string `json:"availableStartTime,omitempty"`
4667
4668	// CreateTime: Creation time.
4669	CreateTime string `json:"createTime,omitempty"`
4670
4671	// CreatorContacts: Optional contact information for the creator of this
4672	// product.
4673	CreatorContacts []*ContactInformation `json:"creatorContacts,omitempty"`
4674
4675	// DisplayName: The display name for this product as set by the seller.
4676	DisplayName string `json:"displayName,omitempty"`
4677
4678	// HasCreatorSignedOff: If the creator has already signed off on the
4679	// product, then the buyer can finalize the deal by accepting the
4680	// product as is. When copying to a proposal, if any of the terms are
4681	// changed, then auto_finalize is automatically set to false.
4682	HasCreatorSignedOff bool `json:"hasCreatorSignedOff,omitempty"`
4683
4684	// ProductId: The unique ID for the product.
4685	ProductId string `json:"productId,omitempty"`
4686
4687	// ProductRevision: The revision number of the product (auto-assigned by
4688	// Marketplace).
4689	ProductRevision int64 `json:"productRevision,omitempty,string"`
4690
4691	// PublisherProfileId: An ID which can be used by the Publisher Profile
4692	// API to get more information about the seller that created this
4693	// product.
4694	PublisherProfileId string `json:"publisherProfileId,omitempty"`
4695
4696	// Seller: Information about the seller that created this product.
4697	Seller *Seller `json:"seller,omitempty"`
4698
4699	// SyndicationProduct: The syndication product associated with the deal.
4700	//
4701	// Possible values:
4702	//   "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined
4703	// syndication product.
4704	//   "CONTENT" - This typically represents a web page.
4705	//   "MOBILE" - This represents a mobile property.
4706	//   "VIDEO" - This represents video ad formats.
4707	//   "GAMES" - This represents ads shown within games.
4708	SyndicationProduct string `json:"syndicationProduct,omitempty"`
4709
4710	// TargetingCriterion: Targeting that is shared between the buyer and
4711	// the seller. Each targeting criterion has a specified key and for each
4712	// key there is a list of inclusion value or exclusion values.
4713	TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"`
4714
4715	// Terms: The negotiable terms of the deal.
4716	Terms *DealTerms `json:"terms,omitempty"`
4717
4718	// UpdateTime: Time of last update.
4719	UpdateTime string `json:"updateTime,omitempty"`
4720
4721	// WebPropertyCode: The web-property code for the seller. This needs to
4722	// be copied as is when adding a new deal to a proposal.
4723	WebPropertyCode string `json:"webPropertyCode,omitempty"`
4724
4725	// ServerResponse contains the HTTP response code and headers from the
4726	// server.
4727	googleapi.ServerResponse `json:"-"`
4728
4729	// ForceSendFields is a list of field names (e.g. "AvailableEndTime") to
4730	// unconditionally include in API requests. By default, fields with
4731	// empty or default values are omitted from API requests. However, any
4732	// non-pointer, non-interface field appearing in ForceSendFields will be
4733	// sent to the server regardless of whether the field is empty or not.
4734	// This may be used to include empty fields in Patch requests.
4735	ForceSendFields []string `json:"-"`
4736
4737	// NullFields is a list of field names (e.g. "AvailableEndTime") to
4738	// include in API requests with the JSON null value. By default, fields
4739	// with empty values are omitted from API requests. However, any field
4740	// with an empty value appearing in NullFields will be sent to the
4741	// server as null. It is an error if a field in this list has a
4742	// non-empty value. This may be used to include null fields in Patch
4743	// requests.
4744	NullFields []string `json:"-"`
4745}
4746
4747func (s *Product) MarshalJSON() ([]byte, error) {
4748	type NoMethod Product
4749	raw := NoMethod(*s)
4750	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4751}
4752
4753// Proposal: Represents a proposal in the Marketplace. A proposal is the
4754// unit of negotiation between a seller and a buyer and contains deals
4755// which are served. Note: You can't update, create, or otherwise modify
4756// Private Auction deals through the API. Fields are updatable unless
4757// noted otherwise.
4758type Proposal struct {
4759	// BilledBuyer: Output only. Reference to the buyer that will get billed
4760	// for this proposal.
4761	BilledBuyer *Buyer `json:"billedBuyer,omitempty"`
4762
4763	// Buyer: Reference to the buyer on the proposal. Note: This field may
4764	// be set only when creating the resource. Modifying this field while
4765	// updating the resource will result in an error.
4766	Buyer *Buyer `json:"buyer,omitempty"`
4767
4768	// BuyerContacts: Contact information for the buyer.
4769	BuyerContacts []*ContactInformation `json:"buyerContacts,omitempty"`
4770
4771	// BuyerPrivateData: Private data for buyer. (hidden from seller).
4772	BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
4773
4774	// Deals: The deals associated with this proposal. For Private Auction
4775	// proposals (whose deals have NonGuaranteedAuctionTerms), there will
4776	// only be one deal.
4777	Deals []*Deal `json:"deals,omitempty"`
4778
4779	// DisplayName: The name for the proposal.
4780	DisplayName string `json:"displayName,omitempty"`
4781
4782	// IsRenegotiating: Output only. True if the proposal is being
4783	// renegotiated.
4784	IsRenegotiating bool `json:"isRenegotiating,omitempty"`
4785
4786	// IsSetupComplete: Output only. True, if the buyside inventory setup is
4787	// complete for this proposal.
4788	IsSetupComplete bool `json:"isSetupComplete,omitempty"`
4789
4790	// LastUpdaterOrCommentorRole: Output only. The role of the last user
4791	// that either updated the proposal or left a comment.
4792	//
4793	// Possible values:
4794	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
4795	// buyer/seller role.
4796	//   "BUYER" - Specifies the role as buyer.
4797	//   "SELLER" - Specifies the role as seller.
4798	LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"`
4799
4800	// Notes: Output only. The notes associated with this proposal.
4801	Notes []*Note `json:"notes,omitempty"`
4802
4803	// OriginatorRole: Output only. Indicates whether the buyer/seller
4804	// created the proposal.
4805	//
4806	// Possible values:
4807	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
4808	// buyer/seller role.
4809	//   "BUYER" - Specifies the role as buyer.
4810	//   "SELLER" - Specifies the role as seller.
4811	OriginatorRole string `json:"originatorRole,omitempty"`
4812
4813	// PrivateAuctionId: Output only. Private auction ID if this proposal is
4814	// a private auction proposal.
4815	PrivateAuctionId string `json:"privateAuctionId,omitempty"`
4816
4817	// ProposalId: Output only. The unique ID of the proposal.
4818	ProposalId string `json:"proposalId,omitempty"`
4819
4820	// ProposalRevision: Output only. The revision number for the proposal.
4821	// Each update to the proposal or the deal causes the proposal revision
4822	// number to auto-increment. The buyer keeps track of the last revision
4823	// number they know of and pass it in when making an update. If the head
4824	// revision number on the server has since incremented, then an ABORTED
4825	// error is returned during the update operation to let the buyer know
4826	// that a subsequent update was made.
4827	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
4828
4829	// ProposalState: Output only. The current state of the proposal.
4830	//
4831	// Possible values:
4832	//   "PROPOSAL_STATE_UNSPECIFIED" - A placeholder for an undefined
4833	// proposal state.
4834	//   "PROPOSED" - The proposal is under negotiation or renegotiation.
4835	//   "BUYER_ACCEPTED" - The proposal has been accepted by the buyer.
4836	//   "SELLER_ACCEPTED" - The proposal has been accepted by the seller.
4837	//   "CANCELED" - The negotiations on the proposal were canceled and the
4838	// proposal was never finalized.
4839	//   "FINALIZED" - The proposal is finalized. During renegotiation, the
4840	// proposal may not be in this state.
4841	ProposalState string `json:"proposalState,omitempty"`
4842
4843	// Seller: Reference to the seller on the proposal. Note: This field may
4844	// be set only when creating the resource. Modifying this field while
4845	// updating the resource will result in an error.
4846	Seller *Seller `json:"seller,omitempty"`
4847
4848	// SellerContacts: Output only. Contact information for the seller.
4849	SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"`
4850
4851	// TermsAndConditions: Output only. The terms and conditions set by the
4852	// publisher for this proposal.
4853	TermsAndConditions string `json:"termsAndConditions,omitempty"`
4854
4855	// UpdateTime: Output only. The time when the proposal was last revised.
4856	UpdateTime string `json:"updateTime,omitempty"`
4857
4858	// ServerResponse contains the HTTP response code and headers from the
4859	// server.
4860	googleapi.ServerResponse `json:"-"`
4861
4862	// ForceSendFields is a list of field names (e.g. "BilledBuyer") to
4863	// unconditionally include in API requests. By default, fields with
4864	// empty or default values are omitted from API requests. However, any
4865	// non-pointer, non-interface field appearing in ForceSendFields will be
4866	// sent to the server regardless of whether the field is empty or not.
4867	// This may be used to include empty fields in Patch requests.
4868	ForceSendFields []string `json:"-"`
4869
4870	// NullFields is a list of field names (e.g. "BilledBuyer") to include
4871	// in API requests with the JSON null value. By default, fields with
4872	// empty values are omitted from API requests. However, any field with
4873	// an empty value appearing in NullFields will be sent to the server as
4874	// null. It is an error if a field in this list has a non-empty value.
4875	// This may be used to include null fields in Patch requests.
4876	NullFields []string `json:"-"`
4877}
4878
4879func (s *Proposal) MarshalJSON() ([]byte, error) {
4880	type NoMethod Proposal
4881	raw := NoMethod(*s)
4882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4883}
4884
4885// PublisherProfile: Represents a publisher profile
4886// (https://support.google.com/admanager/answer/6035806) in Marketplace.
4887// All fields are read only. All string fields are free-form text
4888// entered by the publisher unless noted otherwise.
4889type PublisherProfile struct {
4890	// AudienceDescription: Description on the publisher's audience.
4891	AudienceDescription string `json:"audienceDescription,omitempty"`
4892
4893	// BuyerPitchStatement: Statement explaining what's unique about
4894	// publisher's business, and why buyers should partner with the
4895	// publisher.
4896	BuyerPitchStatement string `json:"buyerPitchStatement,omitempty"`
4897
4898	// DirectDealsContact: Contact information for direct reservation deals.
4899	// This is free text entered by the publisher and may include
4900	// information like names, phone numbers and email addresses.
4901	DirectDealsContact string `json:"directDealsContact,omitempty"`
4902
4903	// DisplayName: Name of the publisher profile.
4904	DisplayName string `json:"displayName,omitempty"`
4905
4906	// Domains: The list of domains represented in this publisher profile.
4907	// Empty if this is a parent profile. These are top private domains,
4908	// meaning that these will not contain a string like
4909	// "photos.google.co.uk/123", but will instead contain "google.co.uk".
4910	Domains []string `json:"domains,omitempty"`
4911
4912	// GooglePlusUrl: URL to publisher's Google+ page.
4913	GooglePlusUrl string `json:"googlePlusUrl,omitempty"`
4914
4915	// IsParent: Indicates if this profile is the parent profile of the
4916	// seller. A parent profile represents all the inventory from the
4917	// seller, as opposed to child profile that is created to brand a
4918	// portion of inventory. One seller should have only one parent
4919	// publisher profile, and can have multiple child profiles. Publisher
4920	// profiles for the same seller will have same value of field
4921	// google.ads.adexchange.buyer.v2beta1.PublisherProfile.seller. See
4922	// https://support.google.com/admanager/answer/6035806 for details.
4923	IsParent bool `json:"isParent,omitempty"`
4924
4925	// LogoUrl: A Google public URL to the logo for this publisher profile.
4926	// The logo is stored as a PNG, JPG, or GIF image.
4927	LogoUrl string `json:"logoUrl,omitempty"`
4928
4929	// MediaKitUrl: URL to additional marketing and sales materials.
4930	MediaKitUrl string `json:"mediaKitUrl,omitempty"`
4931
4932	// MobileApps: The list of apps represented in this publisher profile.
4933	// Empty if this is a parent profile.
4934	MobileApps []*PublisherProfileMobileApplication `json:"mobileApps,omitempty"`
4935
4936	// Overview: Overview of the publisher.
4937	Overview string `json:"overview,omitempty"`
4938
4939	// ProgrammaticDealsContact: Contact information for programmatic deals.
4940	// This is free text entered by the publisher and may include
4941	// information like names, phone numbers and email addresses.
4942	ProgrammaticDealsContact string `json:"programmaticDealsContact,omitempty"`
4943
4944	// PublisherProfileId: Unique ID for publisher profile.
4945	PublisherProfileId string `json:"publisherProfileId,omitempty"`
4946
4947	// RateCardInfoUrl: URL to a publisher rate card.
4948	RateCardInfoUrl string `json:"rateCardInfoUrl,omitempty"`
4949
4950	// SamplePageUrl: URL to a sample content page.
4951	SamplePageUrl string `json:"samplePageUrl,omitempty"`
4952
4953	// Seller: Seller of the publisher profile.
4954	Seller *Seller `json:"seller,omitempty"`
4955
4956	// TopHeadlines: Up to three key metrics and rankings. Max 100
4957	// characters each. For example "#1 Mobile News Site for 20 Straight
4958	// Months".
4959	TopHeadlines []string `json:"topHeadlines,omitempty"`
4960
4961	// ServerResponse contains the HTTP response code and headers from the
4962	// server.
4963	googleapi.ServerResponse `json:"-"`
4964
4965	// ForceSendFields is a list of field names (e.g. "AudienceDescription")
4966	// to unconditionally include in API requests. By default, fields with
4967	// empty or default values are omitted from API requests. However, any
4968	// non-pointer, non-interface field appearing in ForceSendFields will be
4969	// sent to the server regardless of whether the field is empty or not.
4970	// This may be used to include empty fields in Patch requests.
4971	ForceSendFields []string `json:"-"`
4972
4973	// NullFields is a list of field names (e.g. "AudienceDescription") to
4974	// include in API requests with the JSON null value. By default, fields
4975	// with empty values are omitted from API requests. However, any field
4976	// with an empty value appearing in NullFields will be sent to the
4977	// server as null. It is an error if a field in this list has a
4978	// non-empty value. This may be used to include null fields in Patch
4979	// requests.
4980	NullFields []string `json:"-"`
4981}
4982
4983func (s *PublisherProfile) MarshalJSON() ([]byte, error) {
4984	type NoMethod PublisherProfile
4985	raw := NoMethod(*s)
4986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4987}
4988
4989// PublisherProfileMobileApplication: A mobile application that contains
4990// a external app ID, name, and app store.
4991type PublisherProfileMobileApplication struct {
4992	// AppStore: The app store the app belongs to.
4993	//
4994	// Possible values:
4995	//   "APP_STORE_TYPE_UNSPECIFIED" - A placeholder for an unknown app
4996	// store.
4997	//   "APPLE_ITUNES" - Apple iTunes
4998	//   "GOOGLE_PLAY" - Google Play
4999	//   "ROKU" - Roku
5000	//   "AMAZON_FIRETV" - Amazon Fire TV
5001	//   "PLAYSTATION" - Playstation
5002	//   "XBOX" - Xbox
5003	//   "SAMSUNG_TV" - Samsung TV
5004	//   "AMAZON" - Amazon Appstore
5005	//   "OPPO" - OPPO App Market
5006	//   "SAMSUNG" - Samsung Galaxy Store
5007	//   "VIVO" - VIVO App Store
5008	//   "XIAOMI" - Xiaomi GetApps
5009	AppStore string `json:"appStore,omitempty"`
5010
5011	// ExternalAppId: The external ID for the app from its app store.
5012	ExternalAppId string `json:"externalAppId,omitempty"`
5013
5014	// Name: The name of the app.
5015	Name string `json:"name,omitempty"`
5016
5017	// ForceSendFields is a list of field names (e.g. "AppStore") to
5018	// unconditionally include in API requests. By default, fields with
5019	// empty or default values are omitted from API requests. However, any
5020	// non-pointer, non-interface field appearing in ForceSendFields will be
5021	// sent to the server regardless of whether the field is empty or not.
5022	// This may be used to include empty fields in Patch requests.
5023	ForceSendFields []string `json:"-"`
5024
5025	// NullFields is a list of field names (e.g. "AppStore") to include in
5026	// API requests with the JSON null value. By default, fields with empty
5027	// values are omitted from API requests. However, any field with an
5028	// empty value appearing in NullFields will be sent to the server as
5029	// null. It is an error if a field in this list has a non-empty value.
5030	// This may be used to include null fields in Patch requests.
5031	NullFields []string `json:"-"`
5032}
5033
5034func (s *PublisherProfileMobileApplication) MarshalJSON() ([]byte, error) {
5035	type NoMethod PublisherProfileMobileApplication
5036	raw := NoMethod(*s)
5037	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5038}
5039
5040// RealtimeTimeRange: An open-ended realtime time range specified by the
5041// start timestamp. For filter sets that specify a realtime time range
5042// RTB metrics continue to be aggregated throughout the lifetime of the
5043// filter set.
5044type RealtimeTimeRange struct {
5045	// StartTimestamp: The start timestamp of the real-time RTB metrics
5046	// aggregation.
5047	StartTimestamp string `json:"startTimestamp,omitempty"`
5048
5049	// ForceSendFields is a list of field names (e.g. "StartTimestamp") to
5050	// unconditionally include in API requests. By default, fields with
5051	// empty or default values are omitted from API requests. However, any
5052	// non-pointer, non-interface field appearing in ForceSendFields will be
5053	// sent to the server regardless of whether the field is empty or not.
5054	// This may be used to include empty fields in Patch requests.
5055	ForceSendFields []string `json:"-"`
5056
5057	// NullFields is a list of field names (e.g. "StartTimestamp") to
5058	// include in API requests with the JSON null value. By default, fields
5059	// with empty values are omitted from API requests. However, any field
5060	// with an empty value appearing in NullFields will be sent to the
5061	// server as null. It is an error if a field in this list has a
5062	// non-empty value. This may be used to include null fields in Patch
5063	// requests.
5064	NullFields []string `json:"-"`
5065}
5066
5067func (s *RealtimeTimeRange) MarshalJSON() ([]byte, error) {
5068	type NoMethod RealtimeTimeRange
5069	raw := NoMethod(*s)
5070	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5071}
5072
5073// RelativeDateRange: A relative date range, specified by an offset and
5074// a duration. The supported range of dates begins 30 days before today
5075// and ends today, i.e., the limits for these values are: offset_days >=
5076// 0 duration_days >= 1 offset_days + duration_days <= 30
5077type RelativeDateRange struct {
5078	// DurationDays: The number of days in the requested date range, e.g.,
5079	// for a range spanning today: 1. For a range spanning the last 7 days:
5080	// 7.
5081	DurationDays int64 `json:"durationDays,omitempty"`
5082
5083	// OffsetDays: The end date of the filter set, specified as the number
5084	// of days before today, e.g., for a range where the last date is today:
5085	// 0.
5086	OffsetDays int64 `json:"offsetDays,omitempty"`
5087
5088	// ForceSendFields is a list of field names (e.g. "DurationDays") to
5089	// unconditionally include in API requests. By default, fields with
5090	// empty or default values are omitted from API requests. However, any
5091	// non-pointer, non-interface field appearing in ForceSendFields will be
5092	// sent to the server regardless of whether the field is empty or not.
5093	// This may be used to include empty fields in Patch requests.
5094	ForceSendFields []string `json:"-"`
5095
5096	// NullFields is a list of field names (e.g. "DurationDays") to include
5097	// in API requests with the JSON null value. By default, fields with
5098	// empty values are omitted from API requests. However, any field with
5099	// an empty value appearing in NullFields will be sent to the server as
5100	// null. It is an error if a field in this list has a non-empty value.
5101	// This may be used to include null fields in Patch requests.
5102	NullFields []string `json:"-"`
5103}
5104
5105func (s *RelativeDateRange) MarshalJSON() ([]byte, error) {
5106	type NoMethod RelativeDateRange
5107	raw := NoMethod(*s)
5108	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5109}
5110
5111// RemoveDealAssociationRequest: A request for removing the association
5112// between a deal and a creative.
5113type RemoveDealAssociationRequest struct {
5114	// Association: The association between a creative and a deal that
5115	// should be removed.
5116	Association *CreativeDealAssociation `json:"association,omitempty"`
5117
5118	// ForceSendFields is a list of field names (e.g. "Association") to
5119	// unconditionally include in API requests. By default, fields with
5120	// empty or default values are omitted from API requests. However, any
5121	// non-pointer, non-interface field appearing in ForceSendFields will be
5122	// sent to the server regardless of whether the field is empty or not.
5123	// This may be used to include empty fields in Patch requests.
5124	ForceSendFields []string `json:"-"`
5125
5126	// NullFields is a list of field names (e.g. "Association") to include
5127	// in API requests with the JSON null value. By default, fields with
5128	// empty values are omitted from API requests. However, any field with
5129	// an empty value appearing in NullFields will be sent to the server as
5130	// null. It is an error if a field in this list has a non-empty value.
5131	// This may be used to include null fields in Patch requests.
5132	NullFields []string `json:"-"`
5133}
5134
5135func (s *RemoveDealAssociationRequest) MarshalJSON() ([]byte, error) {
5136	type NoMethod RemoveDealAssociationRequest
5137	raw := NoMethod(*s)
5138	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5139}
5140
5141// ResumeProposalDealsRequest: Request message to resume (unpause)
5142// serving for already-finalized deals.
5143type ResumeProposalDealsRequest struct {
5144	// ExternalDealIds: The external_deal_id's of the deals to resume. If
5145	// empty, all the deals in the proposal will be resumed.
5146	ExternalDealIds []string `json:"externalDealIds,omitempty"`
5147
5148	// ForceSendFields is a list of field names (e.g. "ExternalDealIds") to
5149	// unconditionally include in API requests. By default, fields with
5150	// empty or default values are omitted from API requests. However, any
5151	// non-pointer, non-interface field appearing in ForceSendFields will be
5152	// sent to the server regardless of whether the field is empty or not.
5153	// This may be used to include empty fields in Patch requests.
5154	ForceSendFields []string `json:"-"`
5155
5156	// NullFields is a list of field names (e.g. "ExternalDealIds") to
5157	// include in API requests with the JSON null value. By default, fields
5158	// with empty values are omitted from API requests. However, any field
5159	// with an empty value appearing in NullFields will be sent to the
5160	// server as null. It is an error if a field in this list has a
5161	// non-empty value. This may be used to include null fields in Patch
5162	// requests.
5163	NullFields []string `json:"-"`
5164}
5165
5166func (s *ResumeProposalDealsRequest) MarshalJSON() ([]byte, error) {
5167	type NoMethod ResumeProposalDealsRequest
5168	raw := NoMethod(*s)
5169	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5170}
5171
5172// ResumeProposalRequest: Request message to resume (unpause) serving
5173// for an already-finalized proposal.
5174type ResumeProposalRequest struct {
5175}
5176
5177// RowDimensions: A response may include multiple rows, breaking down
5178// along various dimensions. Encapsulates the values of all dimensions
5179// for a given row.
5180type RowDimensions struct {
5181	// PublisherIdentifier: The publisher identifier for this row, if a
5182	// breakdown by BreakdownDimension.PUBLISHER_IDENTIFIER
5183	// (https://developers.google.com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.filterSets#FilterSet.BreakdownDimension)
5184	// was requested.
5185	PublisherIdentifier string `json:"publisherIdentifier,omitempty"`
5186
5187	// TimeInterval: The time interval that this row represents.
5188	TimeInterval *TimeInterval `json:"timeInterval,omitempty"`
5189
5190	// ForceSendFields is a list of field names (e.g. "PublisherIdentifier")
5191	// to unconditionally include in API requests. By default, fields with
5192	// empty or default values are omitted from API requests. However, any
5193	// non-pointer, non-interface field appearing in ForceSendFields will be
5194	// sent to the server regardless of whether the field is empty or not.
5195	// This may be used to include empty fields in Patch requests.
5196	ForceSendFields []string `json:"-"`
5197
5198	// NullFields is a list of field names (e.g. "PublisherIdentifier") to
5199	// include in API requests with the JSON null value. By default, fields
5200	// with empty values are omitted from API requests. However, any field
5201	// with an empty value appearing in NullFields will be sent to the
5202	// server as null. It is an error if a field in this list has a
5203	// non-empty value. This may be used to include null fields in Patch
5204	// requests.
5205	NullFields []string `json:"-"`
5206}
5207
5208func (s *RowDimensions) MarshalJSON() ([]byte, error) {
5209	type NoMethod RowDimensions
5210	raw := NoMethod(*s)
5211	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5212}
5213
5214// SecurityContext: Output only. A security context.
5215type SecurityContext struct {
5216	// Securities: The security types in this context.
5217	//
5218	// Possible values:
5219	//   "INSECURE" - Matches impressions that require insecure
5220	// compatibility.
5221	//   "SSL" - Matches impressions that require SSL compatibility.
5222	Securities []string `json:"securities,omitempty"`
5223
5224	// ForceSendFields is a list of field names (e.g. "Securities") to
5225	// unconditionally include in API requests. By default, fields with
5226	// empty or default values are omitted from API requests. However, any
5227	// non-pointer, non-interface field appearing in ForceSendFields will be
5228	// sent to the server regardless of whether the field is empty or not.
5229	// This may be used to include empty fields in Patch requests.
5230	ForceSendFields []string `json:"-"`
5231
5232	// NullFields is a list of field names (e.g. "Securities") to include in
5233	// API requests with the JSON null value. By default, fields with empty
5234	// values are omitted from API requests. However, any field with an
5235	// empty value appearing in NullFields will be sent to the server as
5236	// null. It is an error if a field in this list has a non-empty value.
5237	// This may be used to include null fields in Patch requests.
5238	NullFields []string `json:"-"`
5239}
5240
5241func (s *SecurityContext) MarshalJSON() ([]byte, error) {
5242	type NoMethod SecurityContext
5243	raw := NoMethod(*s)
5244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5245}
5246
5247// Seller: Represents a seller of inventory. Each seller is identified
5248// by a unique Ad Manager account ID.
5249type Seller struct {
5250	// AccountId: The unique ID for the seller. The seller fills in this
5251	// field. The seller account ID is then available to buyer in the
5252	// product.
5253	AccountId string `json:"accountId,omitempty"`
5254
5255	// SubAccountId: Optional sub-account ID for the seller.
5256	SubAccountId string `json:"subAccountId,omitempty"`
5257
5258	// ForceSendFields is a list of field names (e.g. "AccountId") to
5259	// unconditionally include in API requests. By default, fields with
5260	// empty or default values are omitted from API requests. However, any
5261	// non-pointer, non-interface field appearing in ForceSendFields will be
5262	// sent to the server regardless of whether the field is empty or not.
5263	// This may be used to include empty fields in Patch requests.
5264	ForceSendFields []string `json:"-"`
5265
5266	// NullFields is a list of field names (e.g. "AccountId") to include in
5267	// API requests with the JSON null value. By default, fields with empty
5268	// values are omitted from API requests. However, any field with an
5269	// empty value appearing in NullFields will be sent to the server as
5270	// null. It is an error if a field in this list has a non-empty value.
5271	// This may be used to include null fields in Patch requests.
5272	NullFields []string `json:"-"`
5273}
5274
5275func (s *Seller) MarshalJSON() ([]byte, error) {
5276	type NoMethod Seller
5277	raw := NoMethod(*s)
5278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5279}
5280
5281// ServingContext: The serving context for this restriction.
5282type ServingContext struct {
5283	// All: Matches all contexts.
5284	//
5285	// Possible values:
5286	//   "SIMPLE_CONTEXT" - A simple context.
5287	All string `json:"all,omitempty"`
5288
5289	// AppType: Matches impressions for a particular app type.
5290	AppType *AppContext `json:"appType,omitempty"`
5291
5292	// AuctionType: Matches impressions for a particular auction type.
5293	AuctionType *AuctionContext `json:"auctionType,omitempty"`
5294
5295	// Location: Matches impressions coming from users *or* publishers in a
5296	// specific location.
5297	Location *LocationContext `json:"location,omitempty"`
5298
5299	// Platform: Matches impressions coming from a particular platform.
5300	Platform *PlatformContext `json:"platform,omitempty"`
5301
5302	// SecurityType: Matches impressions for a particular security type.
5303	SecurityType *SecurityContext `json:"securityType,omitempty"`
5304
5305	// ForceSendFields is a list of field names (e.g. "All") to
5306	// unconditionally include in API requests. By default, fields with
5307	// empty or default values are omitted from API requests. However, any
5308	// non-pointer, non-interface field appearing in ForceSendFields will be
5309	// sent to the server regardless of whether the field is empty or not.
5310	// This may be used to include empty fields in Patch requests.
5311	ForceSendFields []string `json:"-"`
5312
5313	// NullFields is a list of field names (e.g. "All") to include in API
5314	// requests with the JSON null value. By default, fields with empty
5315	// values are omitted from API requests. However, any field with an
5316	// empty value appearing in NullFields will be sent to the server as
5317	// null. It is an error if a field in this list has a non-empty value.
5318	// This may be used to include null fields in Patch requests.
5319	NullFields []string `json:"-"`
5320}
5321
5322func (s *ServingContext) MarshalJSON() ([]byte, error) {
5323	type NoMethod ServingContext
5324	raw := NoMethod(*s)
5325	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5326}
5327
5328// ServingRestriction: Output only. A representation of the status of an
5329// ad in a specific context. A context here relates to where something
5330// ultimately serves (for example, a user or publisher geo, a platform,
5331// an HTTPS vs HTTP request, or the type of auction).
5332type ServingRestriction struct {
5333	// Contexts: The contexts for the restriction.
5334	Contexts []*ServingContext `json:"contexts,omitempty"`
5335
5336	// Disapproval: Disapproval bound to this restriction. Only present if
5337	// status=DISAPPROVED. Can be used to filter the response of the
5338	// creatives.list method.
5339	Disapproval *Disapproval `json:"disapproval,omitempty"`
5340
5341	// DisapprovalReasons: Any disapprovals bound to this restriction. Only
5342	// present if status=DISAPPROVED. Can be used to filter the response of
5343	// the creatives.list method. Deprecated; please use disapproval field
5344	// instead.
5345	DisapprovalReasons []*Disapproval `json:"disapprovalReasons,omitempty"`
5346
5347	// Status: The status of the creative in this context (for example, it
5348	// has been explicitly disapproved or is pending review).
5349	//
5350	// Possible values:
5351	//   "STATUS_UNSPECIFIED" - The status is not known.
5352	//   "DISAPPROVAL" - The ad was disapproved in this context.
5353	//   "PENDING_REVIEW" - The ad is pending review in this context.
5354	Status string `json:"status,omitempty"`
5355
5356	// ForceSendFields is a list of field names (e.g. "Contexts") to
5357	// unconditionally include in API requests. By default, fields with
5358	// empty or default values are omitted from API requests. However, any
5359	// non-pointer, non-interface field appearing in ForceSendFields will be
5360	// sent to the server regardless of whether the field is empty or not.
5361	// This may be used to include empty fields in Patch requests.
5362	ForceSendFields []string `json:"-"`
5363
5364	// NullFields is a list of field names (e.g. "Contexts") to include in
5365	// API requests with the JSON null value. By default, fields with empty
5366	// values are omitted from API requests. However, any field with an
5367	// empty value appearing in NullFields will be sent to the server as
5368	// null. It is an error if a field in this list has a non-empty value.
5369	// This may be used to include null fields in Patch requests.
5370	NullFields []string `json:"-"`
5371}
5372
5373func (s *ServingRestriction) MarshalJSON() ([]byte, error) {
5374	type NoMethod ServingRestriction
5375	raw := NoMethod(*s)
5376	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5377}
5378
5379// Size: Message depicting the size of the creative. The units of width
5380// and height depend on the type of the targeting.
5381type Size struct {
5382	// Height: The height of the creative.
5383	Height int64 `json:"height,omitempty"`
5384
5385	// Width: The width of the creative
5386	Width int64 `json:"width,omitempty"`
5387
5388	// ForceSendFields is a list of field names (e.g. "Height") to
5389	// unconditionally include in API requests. By default, fields with
5390	// empty or default values are omitted from API requests. However, any
5391	// non-pointer, non-interface field appearing in ForceSendFields will be
5392	// sent to the server regardless of whether the field is empty or not.
5393	// This may be used to include empty fields in Patch requests.
5394	ForceSendFields []string `json:"-"`
5395
5396	// NullFields is a list of field names (e.g. "Height") to include in API
5397	// requests with the JSON null value. By default, fields with empty
5398	// values are omitted from API requests. However, any field with an
5399	// empty value appearing in NullFields will be sent to the server as
5400	// null. It is an error if a field in this list has a non-empty value.
5401	// This may be used to include null fields in Patch requests.
5402	NullFields []string `json:"-"`
5403}
5404
5405func (s *Size) MarshalJSON() ([]byte, error) {
5406	type NoMethod Size
5407	raw := NoMethod(*s)
5408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5409}
5410
5411// StopWatchingCreativeRequest: A request for stopping notifications for
5412// changes to creative Status.
5413type StopWatchingCreativeRequest struct {
5414}
5415
5416// TargetingCriteria: Advertisers can target different attributes of an
5417// ad slot. For example, they can choose to show ads only if the user is
5418// in the U.S. Such targeting criteria can be specified as part of
5419// Shared Targeting.
5420type TargetingCriteria struct {
5421	// Exclusions: The list of values to exclude from targeting. Each value
5422	// is AND'd together.
5423	Exclusions []*TargetingValue `json:"exclusions,omitempty"`
5424
5425	// Inclusions: The list of value to include as part of the targeting.
5426	// Each value is OR'd together.
5427	Inclusions []*TargetingValue `json:"inclusions,omitempty"`
5428
5429	// Key: The key representing the shared targeting criterion. Targeting
5430	// criteria defined by Google ad servers will begin with GOOG_. Third
5431	// parties may define their own keys. A list of permissible keys along
5432	// with the acceptable values will be provided as part of the external
5433	// documentation.
5434	Key string `json:"key,omitempty"`
5435
5436	// ForceSendFields is a list of field names (e.g. "Exclusions") to
5437	// unconditionally include in API requests. By default, fields with
5438	// empty or default values are omitted from API requests. However, any
5439	// non-pointer, non-interface field appearing in ForceSendFields will be
5440	// sent to the server regardless of whether the field is empty or not.
5441	// This may be used to include empty fields in Patch requests.
5442	ForceSendFields []string `json:"-"`
5443
5444	// NullFields is a list of field names (e.g. "Exclusions") to include in
5445	// API requests with the JSON null value. By default, fields with empty
5446	// values are omitted from API requests. However, any field with an
5447	// empty value appearing in NullFields will be sent to the server as
5448	// null. It is an error if a field in this list has a non-empty value.
5449	// This may be used to include null fields in Patch requests.
5450	NullFields []string `json:"-"`
5451}
5452
5453func (s *TargetingCriteria) MarshalJSON() ([]byte, error) {
5454	type NoMethod TargetingCriteria
5455	raw := NoMethod(*s)
5456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5457}
5458
5459// TargetingValue: A polymorphic targeting value used as part of Shared
5460// Targeting.
5461type TargetingValue struct {
5462	// CreativeSizeValue: The creative size value to include/exclude. Filled
5463	// in when key = GOOG_CREATIVE_SIZE
5464	CreativeSizeValue *CreativeSize `json:"creativeSizeValue,omitempty"`
5465
5466	// DayPartTargetingValue: The daypart targeting to include / exclude.
5467	// Filled in when the key is GOOG_DAYPART_TARGETING. The definition of
5468	// this targeting is derived from the structure used by Ad Manager.
5469	DayPartTargetingValue *DayPartTargeting `json:"dayPartTargetingValue,omitempty"`
5470
5471	// LongValue: The long value to include/exclude.
5472	LongValue int64 `json:"longValue,omitempty,string"`
5473
5474	// StringValue: The string value to include/exclude.
5475	StringValue string `json:"stringValue,omitempty"`
5476
5477	// ForceSendFields is a list of field names (e.g. "CreativeSizeValue")
5478	// to unconditionally include in API requests. By default, fields with
5479	// empty or default values are omitted from API requests. However, any
5480	// non-pointer, non-interface field appearing in ForceSendFields will be
5481	// sent to the server regardless of whether the field is empty or not.
5482	// This may be used to include empty fields in Patch requests.
5483	ForceSendFields []string `json:"-"`
5484
5485	// NullFields is a list of field names (e.g. "CreativeSizeValue") to
5486	// include in API requests with the JSON null value. By default, fields
5487	// with empty values are omitted from API requests. However, any field
5488	// with an empty value appearing in NullFields will be sent to the
5489	// server as null. It is an error if a field in this list has a
5490	// non-empty value. This may be used to include null fields in Patch
5491	// requests.
5492	NullFields []string `json:"-"`
5493}
5494
5495func (s *TargetingValue) MarshalJSON() ([]byte, error) {
5496	type NoMethod TargetingValue
5497	raw := NoMethod(*s)
5498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5499}
5500
5501// TechnologyTargeting: Represents targeting about various types of
5502// technology.
5503type TechnologyTargeting struct {
5504	// DeviceCapabilityTargeting: IDs of device capabilities to be
5505	// included/excluded.
5506	DeviceCapabilityTargeting *CriteriaTargeting `json:"deviceCapabilityTargeting,omitempty"`
5507
5508	// DeviceCategoryTargeting: IDs of device categories to be
5509	// included/excluded.
5510	DeviceCategoryTargeting *CriteriaTargeting `json:"deviceCategoryTargeting,omitempty"`
5511
5512	// OperatingSystemTargeting: Operating system related targeting
5513	// information.
5514	OperatingSystemTargeting *OperatingSystemTargeting `json:"operatingSystemTargeting,omitempty"`
5515
5516	// ForceSendFields is a list of field names (e.g.
5517	// "DeviceCapabilityTargeting") to unconditionally include in API
5518	// requests. By default, fields with empty or default values are omitted
5519	// from API requests. However, any non-pointer, non-interface field
5520	// appearing in ForceSendFields will be sent to the server regardless of
5521	// whether the field is empty or not. This may be used to include empty
5522	// fields in Patch requests.
5523	ForceSendFields []string `json:"-"`
5524
5525	// NullFields is a list of field names (e.g.
5526	// "DeviceCapabilityTargeting") to include in API requests with the JSON
5527	// null value. By default, fields with empty values are omitted from API
5528	// requests. However, any field with an empty value appearing in
5529	// NullFields will be sent to the server as null. It is an error if a
5530	// field in this list has a non-empty value. This may be used to include
5531	// null fields in Patch requests.
5532	NullFields []string `json:"-"`
5533}
5534
5535func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
5536	type NoMethod TechnologyTargeting
5537	raw := NoMethod(*s)
5538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5539}
5540
5541// TimeInterval: An interval of time, with an absolute start and end.
5542type TimeInterval struct {
5543	// EndTime: The timestamp marking the end of the range (exclusive) for
5544	// which data is included.
5545	EndTime string `json:"endTime,omitempty"`
5546
5547	// StartTime: The timestamp marking the start of the range (inclusive)
5548	// for which data is included.
5549	StartTime string `json:"startTime,omitempty"`
5550
5551	// ForceSendFields is a list of field names (e.g. "EndTime") to
5552	// unconditionally include in API requests. By default, fields with
5553	// empty or default values are omitted from API requests. However, any
5554	// non-pointer, non-interface field appearing in ForceSendFields will be
5555	// sent to the server regardless of whether the field is empty or not.
5556	// This may be used to include empty fields in Patch requests.
5557	ForceSendFields []string `json:"-"`
5558
5559	// NullFields is a list of field names (e.g. "EndTime") to include in
5560	// API requests with the JSON null value. By default, fields with empty
5561	// values are omitted from API requests. However, any field with an
5562	// empty value appearing in NullFields will be sent to the server as
5563	// null. It is an error if a field in this list has a non-empty value.
5564	// This may be used to include null fields in Patch requests.
5565	NullFields []string `json:"-"`
5566}
5567
5568func (s *TimeInterval) MarshalJSON() ([]byte, error) {
5569	type NoMethod TimeInterval
5570	raw := NoMethod(*s)
5571	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5572}
5573
5574// TimeOfDay: Represents a time of day. The date and time zone are
5575// either not significant or are specified elsewhere. An API may choose
5576// to allow leap seconds. Related types are google.type.Date and
5577// `google.protobuf.Timestamp`.
5578type TimeOfDay struct {
5579	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
5580	// may choose to allow the value "24:00:00" for scenarios like business
5581	// closing time.
5582	Hours int64 `json:"hours,omitempty"`
5583
5584	// Minutes: Minutes of hour of day. Must be from 0 to 59.
5585	Minutes int64 `json:"minutes,omitempty"`
5586
5587	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
5588	// 999,999,999.
5589	Nanos int64 `json:"nanos,omitempty"`
5590
5591	// Seconds: Seconds of minutes of the time. Must normally be from 0 to
5592	// 59. An API may allow the value 60 if it allows leap-seconds.
5593	Seconds int64 `json:"seconds,omitempty"`
5594
5595	// ForceSendFields is a list of field names (e.g. "Hours") to
5596	// unconditionally include in API requests. By default, fields with
5597	// empty or default values are omitted from API requests. However, any
5598	// non-pointer, non-interface field appearing in ForceSendFields will be
5599	// sent to the server regardless of whether the field is empty or not.
5600	// This may be used to include empty fields in Patch requests.
5601	ForceSendFields []string `json:"-"`
5602
5603	// NullFields is a list of field names (e.g. "Hours") to include in API
5604	// requests with the JSON null value. By default, fields with empty
5605	// values are omitted from API requests. However, any field with an
5606	// empty value appearing in NullFields will be sent to the server as
5607	// null. It is an error if a field in this list has a non-empty value.
5608	// This may be used to include null fields in Patch requests.
5609	NullFields []string `json:"-"`
5610}
5611
5612func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
5613	type NoMethod TimeOfDay
5614	raw := NoMethod(*s)
5615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5616}
5617
5618// UrlTargeting: Represents a list of targeted and excluded URLs (e.g.,
5619// google.com). For Private Auction and AdX Preferred Deals, URLs are
5620// either included or excluded. For Programmatic Guaranteed and
5621// Preferred Deals, this doesn't apply.
5622type UrlTargeting struct {
5623	// ExcludedUrls: A list of URLs to be excluded.
5624	ExcludedUrls []string `json:"excludedUrls,omitempty"`
5625
5626	// TargetedUrls: A list of URLs to be included.
5627	TargetedUrls []string `json:"targetedUrls,omitempty"`
5628
5629	// ForceSendFields is a list of field names (e.g. "ExcludedUrls") to
5630	// unconditionally include in API requests. By default, fields with
5631	// empty or default values are omitted from API requests. However, any
5632	// non-pointer, non-interface field appearing in ForceSendFields will be
5633	// sent to the server regardless of whether the field is empty or not.
5634	// This may be used to include empty fields in Patch requests.
5635	ForceSendFields []string `json:"-"`
5636
5637	// NullFields is a list of field names (e.g. "ExcludedUrls") to include
5638	// in API requests with the JSON null value. By default, fields with
5639	// empty values are omitted from API requests. However, any field with
5640	// an empty value appearing in NullFields will be sent to the server as
5641	// null. It is an error if a field in this list has a non-empty value.
5642	// This may be used to include null fields in Patch requests.
5643	NullFields []string `json:"-"`
5644}
5645
5646func (s *UrlTargeting) MarshalJSON() ([]byte, error) {
5647	type NoMethod UrlTargeting
5648	raw := NoMethod(*s)
5649	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5650}
5651
5652// VideoContent: Video content for a creative.
5653type VideoContent struct {
5654	// VideoUrl: The URL to fetch a video ad.
5655	VideoUrl string `json:"videoUrl,omitempty"`
5656
5657	// VideoVastXml: The contents of a VAST document for a video ad. This
5658	// document should conform to the VAST 2.0 or 3.0 standard.
5659	VideoVastXml string `json:"videoVastXml,omitempty"`
5660
5661	// ForceSendFields is a list of field names (e.g. "VideoUrl") to
5662	// unconditionally include in API requests. By default, fields with
5663	// empty or default values are omitted from API requests. However, any
5664	// non-pointer, non-interface field appearing in ForceSendFields will be
5665	// sent to the server regardless of whether the field is empty or not.
5666	// This may be used to include empty fields in Patch requests.
5667	ForceSendFields []string `json:"-"`
5668
5669	// NullFields is a list of field names (e.g. "VideoUrl") to include in
5670	// API requests with the JSON null value. By default, fields with empty
5671	// values are omitted from API requests. However, any field with an
5672	// empty value appearing in NullFields will be sent to the server as
5673	// null. It is an error if a field in this list has a non-empty value.
5674	// This may be used to include null fields in Patch requests.
5675	NullFields []string `json:"-"`
5676}
5677
5678func (s *VideoContent) MarshalJSON() ([]byte, error) {
5679	type NoMethod VideoContent
5680	raw := NoMethod(*s)
5681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5682}
5683
5684// VideoTargeting: Represents targeting information about video.
5685type VideoTargeting struct {
5686	// ExcludedPositionTypes: A list of video positions to be excluded.
5687	// Position types can either be included or excluded (XOR).
5688	//
5689	// Possible values:
5690	//   "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video
5691	// position.
5692	//   "PREROLL" - Ad is played before the video.
5693	//   "MIDROLL" - Ad is played during the video.
5694	//   "POSTROLL" - Ad is played after the video.
5695	ExcludedPositionTypes []string `json:"excludedPositionTypes,omitempty"`
5696
5697	// TargetedPositionTypes: A list of video positions to be included. When
5698	// the included list is present, the excluded list must be empty. When
5699	// the excluded list is present, the included list must be empty.
5700	//
5701	// Possible values:
5702	//   "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video
5703	// position.
5704	//   "PREROLL" - Ad is played before the video.
5705	//   "MIDROLL" - Ad is played during the video.
5706	//   "POSTROLL" - Ad is played after the video.
5707	TargetedPositionTypes []string `json:"targetedPositionTypes,omitempty"`
5708
5709	// ForceSendFields is a list of field names (e.g.
5710	// "ExcludedPositionTypes") to unconditionally include in API requests.
5711	// By default, fields with empty or default values are omitted from API
5712	// requests. However, any non-pointer, non-interface field appearing in
5713	// ForceSendFields will be sent to the server regardless of whether the
5714	// field is empty or not. This may be used to include empty fields in
5715	// Patch requests.
5716	ForceSendFields []string `json:"-"`
5717
5718	// NullFields is a list of field names (e.g. "ExcludedPositionTypes") to
5719	// include in API requests with the JSON null value. By default, fields
5720	// with empty values are omitted from API requests. However, any field
5721	// with an empty value appearing in NullFields will be sent to the
5722	// server as null. It is an error if a field in this list has a
5723	// non-empty value. This may be used to include null fields in Patch
5724	// requests.
5725	NullFields []string `json:"-"`
5726}
5727
5728func (s *VideoTargeting) MarshalJSON() ([]byte, error) {
5729	type NoMethod VideoTargeting
5730	raw := NoMethod(*s)
5731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5732}
5733
5734// WatchCreativeRequest: A request for watching changes to creative
5735// Status.
5736type WatchCreativeRequest struct {
5737	// Topic: The Pub/Sub topic to publish notifications to. This topic must
5738	// already exist and must give permission to
5739	// ad-exchange-buyside-reports@google.com to write to the topic. This
5740	// should be the full resource name in
5741	// "projects/{project_id}/topics/{topic_id}" format.
5742	Topic string `json:"topic,omitempty"`
5743
5744	// ForceSendFields is a list of field names (e.g. "Topic") to
5745	// unconditionally include in API requests. By default, fields with
5746	// empty or default values are omitted from API requests. However, any
5747	// non-pointer, non-interface field appearing in ForceSendFields will be
5748	// sent to the server regardless of whether the field is empty or not.
5749	// This may be used to include empty fields in Patch requests.
5750	ForceSendFields []string `json:"-"`
5751
5752	// NullFields is a list of field names (e.g. "Topic") to include in API
5753	// requests with the JSON null value. By default, fields with empty
5754	// values are omitted from API requests. However, any field with an
5755	// empty value appearing in NullFields will be sent to the server as
5756	// null. It is an error if a field in this list has a non-empty value.
5757	// This may be used to include null fields in Patch requests.
5758	NullFields []string `json:"-"`
5759}
5760
5761func (s *WatchCreativeRequest) MarshalJSON() ([]byte, error) {
5762	type NoMethod WatchCreativeRequest
5763	raw := NoMethod(*s)
5764	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5765}
5766
5767// method id "adexchangebuyer2.accounts.clients.create":
5768
5769type AccountsClientsCreateCall struct {
5770	s          *Service
5771	accountId  int64
5772	client     *Client
5773	urlParams_ gensupport.URLParams
5774	ctx_       context.Context
5775	header_    http.Header
5776}
5777
5778// Create: Creates a new client buyer.
5779//
5780// - accountId: Unique numerical account ID for the buyer of which the
5781//   client buyer is a customer; the sponsor buyer to create a client
5782//   for. (required).
5783func (r *AccountsClientsService) Create(accountId int64, client *Client) *AccountsClientsCreateCall {
5784	c := &AccountsClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5785	c.accountId = accountId
5786	c.client = client
5787	return c
5788}
5789
5790// Fields allows partial responses to be retrieved. See
5791// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5792// for more information.
5793func (c *AccountsClientsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsCreateCall {
5794	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5795	return c
5796}
5797
5798// Context sets the context to be used in this call's Do method. Any
5799// pending HTTP request will be aborted if the provided context is
5800// canceled.
5801func (c *AccountsClientsCreateCall) Context(ctx context.Context) *AccountsClientsCreateCall {
5802	c.ctx_ = ctx
5803	return c
5804}
5805
5806// Header returns an http.Header that can be modified by the caller to
5807// add HTTP headers to the request.
5808func (c *AccountsClientsCreateCall) Header() http.Header {
5809	if c.header_ == nil {
5810		c.header_ = make(http.Header)
5811	}
5812	return c.header_
5813}
5814
5815func (c *AccountsClientsCreateCall) doRequest(alt string) (*http.Response, error) {
5816	reqHeaders := make(http.Header)
5817	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5818	for k, v := range c.header_ {
5819		reqHeaders[k] = v
5820	}
5821	reqHeaders.Set("User-Agent", c.s.userAgent())
5822	var body io.Reader = nil
5823	body, err := googleapi.WithoutDataWrapper.JSONReader(c.client)
5824	if err != nil {
5825		return nil, err
5826	}
5827	reqHeaders.Set("Content-Type", "application/json")
5828	c.urlParams_.Set("alt", alt)
5829	c.urlParams_.Set("prettyPrint", "false")
5830	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients")
5831	urls += "?" + c.urlParams_.Encode()
5832	req, err := http.NewRequest("POST", urls, body)
5833	if err != nil {
5834		return nil, err
5835	}
5836	req.Header = reqHeaders
5837	googleapi.Expand(req.URL, map[string]string{
5838		"accountId": strconv.FormatInt(c.accountId, 10),
5839	})
5840	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5841}
5842
5843// Do executes the "adexchangebuyer2.accounts.clients.create" call.
5844// Exactly one of *Client or error will be non-nil. Any non-2xx status
5845// code is an error. Response headers are in either
5846// *Client.ServerResponse.Header or (if a response was returned at all)
5847// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5848// check whether the returned error was because http.StatusNotModified
5849// was returned.
5850func (c *AccountsClientsCreateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
5851	gensupport.SetOptions(c.urlParams_, opts...)
5852	res, err := c.doRequest("json")
5853	if res != nil && res.StatusCode == http.StatusNotModified {
5854		if res.Body != nil {
5855			res.Body.Close()
5856		}
5857		return nil, &googleapi.Error{
5858			Code:   res.StatusCode,
5859			Header: res.Header,
5860		}
5861	}
5862	if err != nil {
5863		return nil, err
5864	}
5865	defer googleapi.CloseBody(res)
5866	if err := googleapi.CheckResponse(res); err != nil {
5867		return nil, err
5868	}
5869	ret := &Client{
5870		ServerResponse: googleapi.ServerResponse{
5871			Header:         res.Header,
5872			HTTPStatusCode: res.StatusCode,
5873		},
5874	}
5875	target := &ret
5876	if err := gensupport.DecodeResponse(target, res); err != nil {
5877		return nil, err
5878	}
5879	return ret, nil
5880	// {
5881	//   "description": "Creates a new client buyer.",
5882	//   "flatPath": "v2beta1/accounts/{accountId}/clients",
5883	//   "httpMethod": "POST",
5884	//   "id": "adexchangebuyer2.accounts.clients.create",
5885	//   "parameterOrder": [
5886	//     "accountId"
5887	//   ],
5888	//   "parameters": {
5889	//     "accountId": {
5890	//       "description": "Unique numerical account ID for the buyer of which the client buyer is a customer; the sponsor buyer to create a client for. (required)",
5891	//       "format": "int64",
5892	//       "location": "path",
5893	//       "required": true,
5894	//       "type": "string"
5895	//     }
5896	//   },
5897	//   "path": "v2beta1/accounts/{accountId}/clients",
5898	//   "request": {
5899	//     "$ref": "Client"
5900	//   },
5901	//   "response": {
5902	//     "$ref": "Client"
5903	//   },
5904	//   "scopes": [
5905	//     "https://www.googleapis.com/auth/adexchange.buyer"
5906	//   ]
5907	// }
5908
5909}
5910
5911// method id "adexchangebuyer2.accounts.clients.get":
5912
5913type AccountsClientsGetCall struct {
5914	s               *Service
5915	accountId       int64
5916	clientAccountId int64
5917	urlParams_      gensupport.URLParams
5918	ifNoneMatch_    string
5919	ctx_            context.Context
5920	header_         http.Header
5921}
5922
5923// Get: Gets a client buyer with a given client account ID.
5924//
5925// - accountId: Numerical account ID of the client's sponsor buyer.
5926//   (required).
5927// - clientAccountId: Numerical account ID of the client buyer to
5928//   retrieve. (required).
5929func (r *AccountsClientsService) Get(accountId int64, clientAccountId int64) *AccountsClientsGetCall {
5930	c := &AccountsClientsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5931	c.accountId = accountId
5932	c.clientAccountId = clientAccountId
5933	return c
5934}
5935
5936// Fields allows partial responses to be retrieved. See
5937// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5938// for more information.
5939func (c *AccountsClientsGetCall) Fields(s ...googleapi.Field) *AccountsClientsGetCall {
5940	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5941	return c
5942}
5943
5944// IfNoneMatch sets the optional parameter which makes the operation
5945// fail if the object's ETag matches the given value. This is useful for
5946// getting updates only after the object has changed since the last
5947// request. Use googleapi.IsNotModified to check whether the response
5948// error from Do is the result of In-None-Match.
5949func (c *AccountsClientsGetCall) IfNoneMatch(entityTag string) *AccountsClientsGetCall {
5950	c.ifNoneMatch_ = entityTag
5951	return c
5952}
5953
5954// Context sets the context to be used in this call's Do method. Any
5955// pending HTTP request will be aborted if the provided context is
5956// canceled.
5957func (c *AccountsClientsGetCall) Context(ctx context.Context) *AccountsClientsGetCall {
5958	c.ctx_ = ctx
5959	return c
5960}
5961
5962// Header returns an http.Header that can be modified by the caller to
5963// add HTTP headers to the request.
5964func (c *AccountsClientsGetCall) Header() http.Header {
5965	if c.header_ == nil {
5966		c.header_ = make(http.Header)
5967	}
5968	return c.header_
5969}
5970
5971func (c *AccountsClientsGetCall) doRequest(alt string) (*http.Response, error) {
5972	reqHeaders := make(http.Header)
5973	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5974	for k, v := range c.header_ {
5975		reqHeaders[k] = v
5976	}
5977	reqHeaders.Set("User-Agent", c.s.userAgent())
5978	if c.ifNoneMatch_ != "" {
5979		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5980	}
5981	var body io.Reader = nil
5982	c.urlParams_.Set("alt", alt)
5983	c.urlParams_.Set("prettyPrint", "false")
5984	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}")
5985	urls += "?" + c.urlParams_.Encode()
5986	req, err := http.NewRequest("GET", urls, body)
5987	if err != nil {
5988		return nil, err
5989	}
5990	req.Header = reqHeaders
5991	googleapi.Expand(req.URL, map[string]string{
5992		"accountId":       strconv.FormatInt(c.accountId, 10),
5993		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
5994	})
5995	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5996}
5997
5998// Do executes the "adexchangebuyer2.accounts.clients.get" call.
5999// Exactly one of *Client or error will be non-nil. Any non-2xx status
6000// code is an error. Response headers are in either
6001// *Client.ServerResponse.Header or (if a response was returned at all)
6002// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6003// check whether the returned error was because http.StatusNotModified
6004// was returned.
6005func (c *AccountsClientsGetCall) Do(opts ...googleapi.CallOption) (*Client, error) {
6006	gensupport.SetOptions(c.urlParams_, opts...)
6007	res, err := c.doRequest("json")
6008	if res != nil && res.StatusCode == http.StatusNotModified {
6009		if res.Body != nil {
6010			res.Body.Close()
6011		}
6012		return nil, &googleapi.Error{
6013			Code:   res.StatusCode,
6014			Header: res.Header,
6015		}
6016	}
6017	if err != nil {
6018		return nil, err
6019	}
6020	defer googleapi.CloseBody(res)
6021	if err := googleapi.CheckResponse(res); err != nil {
6022		return nil, err
6023	}
6024	ret := &Client{
6025		ServerResponse: googleapi.ServerResponse{
6026			Header:         res.Header,
6027			HTTPStatusCode: res.StatusCode,
6028		},
6029	}
6030	target := &ret
6031	if err := gensupport.DecodeResponse(target, res); err != nil {
6032		return nil, err
6033	}
6034	return ret, nil
6035	// {
6036	//   "description": "Gets a client buyer with a given client account ID.",
6037	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6038	//   "httpMethod": "GET",
6039	//   "id": "adexchangebuyer2.accounts.clients.get",
6040	//   "parameterOrder": [
6041	//     "accountId",
6042	//     "clientAccountId"
6043	//   ],
6044	//   "parameters": {
6045	//     "accountId": {
6046	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6047	//       "format": "int64",
6048	//       "location": "path",
6049	//       "required": true,
6050	//       "type": "string"
6051	//     },
6052	//     "clientAccountId": {
6053	//       "description": "Numerical account ID of the client buyer to retrieve. (required)",
6054	//       "format": "int64",
6055	//       "location": "path",
6056	//       "required": true,
6057	//       "type": "string"
6058	//     }
6059	//   },
6060	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6061	//   "response": {
6062	//     "$ref": "Client"
6063	//   },
6064	//   "scopes": [
6065	//     "https://www.googleapis.com/auth/adexchange.buyer"
6066	//   ]
6067	// }
6068
6069}
6070
6071// method id "adexchangebuyer2.accounts.clients.list":
6072
6073type AccountsClientsListCall struct {
6074	s            *Service
6075	accountId    int64
6076	urlParams_   gensupport.URLParams
6077	ifNoneMatch_ string
6078	ctx_         context.Context
6079	header_      http.Header
6080}
6081
6082// List: Lists all the clients for the current sponsor buyer.
6083//
6084// - accountId: Unique numerical account ID of the sponsor buyer to list
6085//   the clients for.
6086func (r *AccountsClientsService) List(accountId int64) *AccountsClientsListCall {
6087	c := &AccountsClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6088	c.accountId = accountId
6089	return c
6090}
6091
6092// PageSize sets the optional parameter "pageSize": Requested page size.
6093// The server may return fewer clients than requested. If unspecified,
6094// the server will pick an appropriate default.
6095func (c *AccountsClientsListCall) PageSize(pageSize int64) *AccountsClientsListCall {
6096	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6097	return c
6098}
6099
6100// PageToken sets the optional parameter "pageToken": A token
6101// identifying a page of results the server should return. Typically,
6102// this is the value of ListClientsResponse.nextPageToken returned from
6103// the previous call to the accounts.clients.list method.
6104func (c *AccountsClientsListCall) PageToken(pageToken string) *AccountsClientsListCall {
6105	c.urlParams_.Set("pageToken", pageToken)
6106	return c
6107}
6108
6109// PartnerClientId sets the optional parameter "partnerClientId":
6110// Optional unique identifier (from the standpoint of an Ad Exchange
6111// sponsor buyer partner) of the client to return. If specified, at most
6112// one client will be returned in the response.
6113func (c *AccountsClientsListCall) PartnerClientId(partnerClientId string) *AccountsClientsListCall {
6114	c.urlParams_.Set("partnerClientId", partnerClientId)
6115	return c
6116}
6117
6118// Fields allows partial responses to be retrieved. See
6119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6120// for more information.
6121func (c *AccountsClientsListCall) Fields(s ...googleapi.Field) *AccountsClientsListCall {
6122	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6123	return c
6124}
6125
6126// IfNoneMatch sets the optional parameter which makes the operation
6127// fail if the object's ETag matches the given value. This is useful for
6128// getting updates only after the object has changed since the last
6129// request. Use googleapi.IsNotModified to check whether the response
6130// error from Do is the result of In-None-Match.
6131func (c *AccountsClientsListCall) IfNoneMatch(entityTag string) *AccountsClientsListCall {
6132	c.ifNoneMatch_ = entityTag
6133	return c
6134}
6135
6136// Context sets the context to be used in this call's Do method. Any
6137// pending HTTP request will be aborted if the provided context is
6138// canceled.
6139func (c *AccountsClientsListCall) Context(ctx context.Context) *AccountsClientsListCall {
6140	c.ctx_ = ctx
6141	return c
6142}
6143
6144// Header returns an http.Header that can be modified by the caller to
6145// add HTTP headers to the request.
6146func (c *AccountsClientsListCall) Header() http.Header {
6147	if c.header_ == nil {
6148		c.header_ = make(http.Header)
6149	}
6150	return c.header_
6151}
6152
6153func (c *AccountsClientsListCall) doRequest(alt string) (*http.Response, error) {
6154	reqHeaders := make(http.Header)
6155	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6156	for k, v := range c.header_ {
6157		reqHeaders[k] = v
6158	}
6159	reqHeaders.Set("User-Agent", c.s.userAgent())
6160	if c.ifNoneMatch_ != "" {
6161		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6162	}
6163	var body io.Reader = nil
6164	c.urlParams_.Set("alt", alt)
6165	c.urlParams_.Set("prettyPrint", "false")
6166	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients")
6167	urls += "?" + c.urlParams_.Encode()
6168	req, err := http.NewRequest("GET", urls, body)
6169	if err != nil {
6170		return nil, err
6171	}
6172	req.Header = reqHeaders
6173	googleapi.Expand(req.URL, map[string]string{
6174		"accountId": strconv.FormatInt(c.accountId, 10),
6175	})
6176	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6177}
6178
6179// Do executes the "adexchangebuyer2.accounts.clients.list" call.
6180// Exactly one of *ListClientsResponse or error will be non-nil. Any
6181// non-2xx status code is an error. Response headers are in either
6182// *ListClientsResponse.ServerResponse.Header or (if a response was
6183// returned at all) in error.(*googleapi.Error).Header. Use
6184// googleapi.IsNotModified to check whether the returned error was
6185// because http.StatusNotModified was returned.
6186func (c *AccountsClientsListCall) Do(opts ...googleapi.CallOption) (*ListClientsResponse, error) {
6187	gensupport.SetOptions(c.urlParams_, opts...)
6188	res, err := c.doRequest("json")
6189	if res != nil && res.StatusCode == http.StatusNotModified {
6190		if res.Body != nil {
6191			res.Body.Close()
6192		}
6193		return nil, &googleapi.Error{
6194			Code:   res.StatusCode,
6195			Header: res.Header,
6196		}
6197	}
6198	if err != nil {
6199		return nil, err
6200	}
6201	defer googleapi.CloseBody(res)
6202	if err := googleapi.CheckResponse(res); err != nil {
6203		return nil, err
6204	}
6205	ret := &ListClientsResponse{
6206		ServerResponse: googleapi.ServerResponse{
6207			Header:         res.Header,
6208			HTTPStatusCode: res.StatusCode,
6209		},
6210	}
6211	target := &ret
6212	if err := gensupport.DecodeResponse(target, res); err != nil {
6213		return nil, err
6214	}
6215	return ret, nil
6216	// {
6217	//   "description": "Lists all the clients for the current sponsor buyer.",
6218	//   "flatPath": "v2beta1/accounts/{accountId}/clients",
6219	//   "httpMethod": "GET",
6220	//   "id": "adexchangebuyer2.accounts.clients.list",
6221	//   "parameterOrder": [
6222	//     "accountId"
6223	//   ],
6224	//   "parameters": {
6225	//     "accountId": {
6226	//       "description": "Unique numerical account ID of the sponsor buyer to list the clients for.",
6227	//       "format": "int64",
6228	//       "location": "path",
6229	//       "required": true,
6230	//       "type": "string"
6231	//     },
6232	//     "pageSize": {
6233	//       "description": "Requested page size. The server may return fewer clients than requested. If unspecified, the server will pick an appropriate default.",
6234	//       "format": "int32",
6235	//       "location": "query",
6236	//       "type": "integer"
6237	//     },
6238	//     "pageToken": {
6239	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientsResponse.nextPageToken returned from the previous call to the accounts.clients.list method.",
6240	//       "location": "query",
6241	//       "type": "string"
6242	//     },
6243	//     "partnerClientId": {
6244	//       "description": "Optional unique identifier (from the standpoint of an Ad Exchange sponsor buyer partner) of the client to return. If specified, at most one client will be returned in the response.",
6245	//       "location": "query",
6246	//       "type": "string"
6247	//     }
6248	//   },
6249	//   "path": "v2beta1/accounts/{accountId}/clients",
6250	//   "response": {
6251	//     "$ref": "ListClientsResponse"
6252	//   },
6253	//   "scopes": [
6254	//     "https://www.googleapis.com/auth/adexchange.buyer"
6255	//   ]
6256	// }
6257
6258}
6259
6260// Pages invokes f for each page of results.
6261// A non-nil error returned from f will halt the iteration.
6262// The provided context supersedes any context provided to the Context method.
6263func (c *AccountsClientsListCall) Pages(ctx context.Context, f func(*ListClientsResponse) error) error {
6264	c.ctx_ = ctx
6265	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6266	for {
6267		x, err := c.Do()
6268		if err != nil {
6269			return err
6270		}
6271		if err := f(x); err != nil {
6272			return err
6273		}
6274		if x.NextPageToken == "" {
6275			return nil
6276		}
6277		c.PageToken(x.NextPageToken)
6278	}
6279}
6280
6281// method id "adexchangebuyer2.accounts.clients.update":
6282
6283type AccountsClientsUpdateCall struct {
6284	s               *Service
6285	accountId       int64
6286	clientAccountId int64
6287	client          *Client
6288	urlParams_      gensupport.URLParams
6289	ctx_            context.Context
6290	header_         http.Header
6291}
6292
6293// Update: Updates an existing client buyer.
6294//
6295// - accountId: Unique numerical account ID for the buyer of which the
6296//   client buyer is a customer; the sponsor buyer to update a client
6297//   for. (required).
6298// - clientAccountId: Unique numerical account ID of the client to
6299//   update. (required).
6300func (r *AccountsClientsService) Update(accountId int64, clientAccountId int64, client *Client) *AccountsClientsUpdateCall {
6301	c := &AccountsClientsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6302	c.accountId = accountId
6303	c.clientAccountId = clientAccountId
6304	c.client = client
6305	return c
6306}
6307
6308// Fields allows partial responses to be retrieved. See
6309// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6310// for more information.
6311func (c *AccountsClientsUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUpdateCall {
6312	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6313	return c
6314}
6315
6316// Context sets the context to be used in this call's Do method. Any
6317// pending HTTP request will be aborted if the provided context is
6318// canceled.
6319func (c *AccountsClientsUpdateCall) Context(ctx context.Context) *AccountsClientsUpdateCall {
6320	c.ctx_ = ctx
6321	return c
6322}
6323
6324// Header returns an http.Header that can be modified by the caller to
6325// add HTTP headers to the request.
6326func (c *AccountsClientsUpdateCall) Header() http.Header {
6327	if c.header_ == nil {
6328		c.header_ = make(http.Header)
6329	}
6330	return c.header_
6331}
6332
6333func (c *AccountsClientsUpdateCall) doRequest(alt string) (*http.Response, error) {
6334	reqHeaders := make(http.Header)
6335	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6336	for k, v := range c.header_ {
6337		reqHeaders[k] = v
6338	}
6339	reqHeaders.Set("User-Agent", c.s.userAgent())
6340	var body io.Reader = nil
6341	body, err := googleapi.WithoutDataWrapper.JSONReader(c.client)
6342	if err != nil {
6343		return nil, err
6344	}
6345	reqHeaders.Set("Content-Type", "application/json")
6346	c.urlParams_.Set("alt", alt)
6347	c.urlParams_.Set("prettyPrint", "false")
6348	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}")
6349	urls += "?" + c.urlParams_.Encode()
6350	req, err := http.NewRequest("PUT", urls, body)
6351	if err != nil {
6352		return nil, err
6353	}
6354	req.Header = reqHeaders
6355	googleapi.Expand(req.URL, map[string]string{
6356		"accountId":       strconv.FormatInt(c.accountId, 10),
6357		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6358	})
6359	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6360}
6361
6362// Do executes the "adexchangebuyer2.accounts.clients.update" call.
6363// Exactly one of *Client or error will be non-nil. Any non-2xx status
6364// code is an error. Response headers are in either
6365// *Client.ServerResponse.Header or (if a response was returned at all)
6366// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6367// check whether the returned error was because http.StatusNotModified
6368// was returned.
6369func (c *AccountsClientsUpdateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
6370	gensupport.SetOptions(c.urlParams_, opts...)
6371	res, err := c.doRequest("json")
6372	if res != nil && res.StatusCode == http.StatusNotModified {
6373		if res.Body != nil {
6374			res.Body.Close()
6375		}
6376		return nil, &googleapi.Error{
6377			Code:   res.StatusCode,
6378			Header: res.Header,
6379		}
6380	}
6381	if err != nil {
6382		return nil, err
6383	}
6384	defer googleapi.CloseBody(res)
6385	if err := googleapi.CheckResponse(res); err != nil {
6386		return nil, err
6387	}
6388	ret := &Client{
6389		ServerResponse: googleapi.ServerResponse{
6390			Header:         res.Header,
6391			HTTPStatusCode: res.StatusCode,
6392		},
6393	}
6394	target := &ret
6395	if err := gensupport.DecodeResponse(target, res); err != nil {
6396		return nil, err
6397	}
6398	return ret, nil
6399	// {
6400	//   "description": "Updates an existing client buyer.",
6401	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6402	//   "httpMethod": "PUT",
6403	//   "id": "adexchangebuyer2.accounts.clients.update",
6404	//   "parameterOrder": [
6405	//     "accountId",
6406	//     "clientAccountId"
6407	//   ],
6408	//   "parameters": {
6409	//     "accountId": {
6410	//       "description": "Unique numerical account ID for the buyer of which the client buyer is a customer; the sponsor buyer to update a client for. (required)",
6411	//       "format": "int64",
6412	//       "location": "path",
6413	//       "required": true,
6414	//       "type": "string"
6415	//     },
6416	//     "clientAccountId": {
6417	//       "description": "Unique numerical account ID of the client to update. (required)",
6418	//       "format": "int64",
6419	//       "location": "path",
6420	//       "required": true,
6421	//       "type": "string"
6422	//     }
6423	//   },
6424	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6425	//   "request": {
6426	//     "$ref": "Client"
6427	//   },
6428	//   "response": {
6429	//     "$ref": "Client"
6430	//   },
6431	//   "scopes": [
6432	//     "https://www.googleapis.com/auth/adexchange.buyer"
6433	//   ]
6434	// }
6435
6436}
6437
6438// method id "adexchangebuyer2.accounts.clients.invitations.create":
6439
6440type AccountsClientsInvitationsCreateCall struct {
6441	s                    *Service
6442	accountId            int64
6443	clientAccountId      int64
6444	clientuserinvitation *ClientUserInvitation
6445	urlParams_           gensupport.URLParams
6446	ctx_                 context.Context
6447	header_              http.Header
6448}
6449
6450// Create: Creates and sends out an email invitation to access an Ad
6451// Exchange client buyer account.
6452//
6453// - accountId: Numerical account ID of the client's sponsor buyer.
6454//   (required).
6455// - clientAccountId: Numerical account ID of the client buyer that the
6456//   user should be associated with. (required).
6457func (r *AccountsClientsInvitationsService) Create(accountId int64, clientAccountId int64, clientuserinvitation *ClientUserInvitation) *AccountsClientsInvitationsCreateCall {
6458	c := &AccountsClientsInvitationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6459	c.accountId = accountId
6460	c.clientAccountId = clientAccountId
6461	c.clientuserinvitation = clientuserinvitation
6462	return c
6463}
6464
6465// Fields allows partial responses to be retrieved. See
6466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6467// for more information.
6468func (c *AccountsClientsInvitationsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsCreateCall {
6469	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6470	return c
6471}
6472
6473// Context sets the context to be used in this call's Do method. Any
6474// pending HTTP request will be aborted if the provided context is
6475// canceled.
6476func (c *AccountsClientsInvitationsCreateCall) Context(ctx context.Context) *AccountsClientsInvitationsCreateCall {
6477	c.ctx_ = ctx
6478	return c
6479}
6480
6481// Header returns an http.Header that can be modified by the caller to
6482// add HTTP headers to the request.
6483func (c *AccountsClientsInvitationsCreateCall) Header() http.Header {
6484	if c.header_ == nil {
6485		c.header_ = make(http.Header)
6486	}
6487	return c.header_
6488}
6489
6490func (c *AccountsClientsInvitationsCreateCall) doRequest(alt string) (*http.Response, error) {
6491	reqHeaders := make(http.Header)
6492	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6493	for k, v := range c.header_ {
6494		reqHeaders[k] = v
6495	}
6496	reqHeaders.Set("User-Agent", c.s.userAgent())
6497	var body io.Reader = nil
6498	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuserinvitation)
6499	if err != nil {
6500		return nil, err
6501	}
6502	reqHeaders.Set("Content-Type", "application/json")
6503	c.urlParams_.Set("alt", alt)
6504	c.urlParams_.Set("prettyPrint", "false")
6505	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations")
6506	urls += "?" + c.urlParams_.Encode()
6507	req, err := http.NewRequest("POST", urls, body)
6508	if err != nil {
6509		return nil, err
6510	}
6511	req.Header = reqHeaders
6512	googleapi.Expand(req.URL, map[string]string{
6513		"accountId":       strconv.FormatInt(c.accountId, 10),
6514		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6515	})
6516	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6517}
6518
6519// Do executes the "adexchangebuyer2.accounts.clients.invitations.create" call.
6520// Exactly one of *ClientUserInvitation or error will be non-nil. Any
6521// non-2xx status code is an error. Response headers are in either
6522// *ClientUserInvitation.ServerResponse.Header or (if a response was
6523// returned at all) in error.(*googleapi.Error).Header. Use
6524// googleapi.IsNotModified to check whether the returned error was
6525// because http.StatusNotModified was returned.
6526func (c *AccountsClientsInvitationsCreateCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) {
6527	gensupport.SetOptions(c.urlParams_, opts...)
6528	res, err := c.doRequest("json")
6529	if res != nil && res.StatusCode == http.StatusNotModified {
6530		if res.Body != nil {
6531			res.Body.Close()
6532		}
6533		return nil, &googleapi.Error{
6534			Code:   res.StatusCode,
6535			Header: res.Header,
6536		}
6537	}
6538	if err != nil {
6539		return nil, err
6540	}
6541	defer googleapi.CloseBody(res)
6542	if err := googleapi.CheckResponse(res); err != nil {
6543		return nil, err
6544	}
6545	ret := &ClientUserInvitation{
6546		ServerResponse: googleapi.ServerResponse{
6547			Header:         res.Header,
6548			HTTPStatusCode: res.StatusCode,
6549		},
6550	}
6551	target := &ret
6552	if err := gensupport.DecodeResponse(target, res); err != nil {
6553		return nil, err
6554	}
6555	return ret, nil
6556	// {
6557	//   "description": "Creates and sends out an email invitation to access an Ad Exchange client buyer account.",
6558	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
6559	//   "httpMethod": "POST",
6560	//   "id": "adexchangebuyer2.accounts.clients.invitations.create",
6561	//   "parameterOrder": [
6562	//     "accountId",
6563	//     "clientAccountId"
6564	//   ],
6565	//   "parameters": {
6566	//     "accountId": {
6567	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6568	//       "format": "int64",
6569	//       "location": "path",
6570	//       "required": true,
6571	//       "type": "string"
6572	//     },
6573	//     "clientAccountId": {
6574	//       "description": "Numerical account ID of the client buyer that the user should be associated with. (required)",
6575	//       "format": "int64",
6576	//       "location": "path",
6577	//       "required": true,
6578	//       "type": "string"
6579	//     }
6580	//   },
6581	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
6582	//   "request": {
6583	//     "$ref": "ClientUserInvitation"
6584	//   },
6585	//   "response": {
6586	//     "$ref": "ClientUserInvitation"
6587	//   },
6588	//   "scopes": [
6589	//     "https://www.googleapis.com/auth/adexchange.buyer"
6590	//   ]
6591	// }
6592
6593}
6594
6595// method id "adexchangebuyer2.accounts.clients.invitations.get":
6596
6597type AccountsClientsInvitationsGetCall struct {
6598	s               *Service
6599	accountId       int64
6600	clientAccountId int64
6601	invitationId    int64
6602	urlParams_      gensupport.URLParams
6603	ifNoneMatch_    string
6604	ctx_            context.Context
6605	header_         http.Header
6606}
6607
6608// Get: Retrieves an existing client user invitation.
6609//
6610// - accountId: Numerical account ID of the client's sponsor buyer.
6611//   (required).
6612// - clientAccountId: Numerical account ID of the client buyer that the
6613//   user invitation to be retrieved is associated with. (required).
6614// - invitationId: Numerical identifier of the user invitation to
6615//   retrieve. (required).
6616func (r *AccountsClientsInvitationsService) Get(accountId int64, clientAccountId int64, invitationId int64) *AccountsClientsInvitationsGetCall {
6617	c := &AccountsClientsInvitationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6618	c.accountId = accountId
6619	c.clientAccountId = clientAccountId
6620	c.invitationId = invitationId
6621	return c
6622}
6623
6624// Fields allows partial responses to be retrieved. See
6625// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6626// for more information.
6627func (c *AccountsClientsInvitationsGetCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsGetCall {
6628	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6629	return c
6630}
6631
6632// IfNoneMatch sets the optional parameter which makes the operation
6633// fail if the object's ETag matches the given value. This is useful for
6634// getting updates only after the object has changed since the last
6635// request. Use googleapi.IsNotModified to check whether the response
6636// error from Do is the result of In-None-Match.
6637func (c *AccountsClientsInvitationsGetCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsGetCall {
6638	c.ifNoneMatch_ = entityTag
6639	return c
6640}
6641
6642// Context sets the context to be used in this call's Do method. Any
6643// pending HTTP request will be aborted if the provided context is
6644// canceled.
6645func (c *AccountsClientsInvitationsGetCall) Context(ctx context.Context) *AccountsClientsInvitationsGetCall {
6646	c.ctx_ = ctx
6647	return c
6648}
6649
6650// Header returns an http.Header that can be modified by the caller to
6651// add HTTP headers to the request.
6652func (c *AccountsClientsInvitationsGetCall) Header() http.Header {
6653	if c.header_ == nil {
6654		c.header_ = make(http.Header)
6655	}
6656	return c.header_
6657}
6658
6659func (c *AccountsClientsInvitationsGetCall) doRequest(alt string) (*http.Response, error) {
6660	reqHeaders := make(http.Header)
6661	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6662	for k, v := range c.header_ {
6663		reqHeaders[k] = v
6664	}
6665	reqHeaders.Set("User-Agent", c.s.userAgent())
6666	if c.ifNoneMatch_ != "" {
6667		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6668	}
6669	var body io.Reader = nil
6670	c.urlParams_.Set("alt", alt)
6671	c.urlParams_.Set("prettyPrint", "false")
6672	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}")
6673	urls += "?" + c.urlParams_.Encode()
6674	req, err := http.NewRequest("GET", urls, body)
6675	if err != nil {
6676		return nil, err
6677	}
6678	req.Header = reqHeaders
6679	googleapi.Expand(req.URL, map[string]string{
6680		"accountId":       strconv.FormatInt(c.accountId, 10),
6681		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6682		"invitationId":    strconv.FormatInt(c.invitationId, 10),
6683	})
6684	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6685}
6686
6687// Do executes the "adexchangebuyer2.accounts.clients.invitations.get" call.
6688// Exactly one of *ClientUserInvitation or error will be non-nil. Any
6689// non-2xx status code is an error. Response headers are in either
6690// *ClientUserInvitation.ServerResponse.Header or (if a response was
6691// returned at all) in error.(*googleapi.Error).Header. Use
6692// googleapi.IsNotModified to check whether the returned error was
6693// because http.StatusNotModified was returned.
6694func (c *AccountsClientsInvitationsGetCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) {
6695	gensupport.SetOptions(c.urlParams_, opts...)
6696	res, err := c.doRequest("json")
6697	if res != nil && res.StatusCode == http.StatusNotModified {
6698		if res.Body != nil {
6699			res.Body.Close()
6700		}
6701		return nil, &googleapi.Error{
6702			Code:   res.StatusCode,
6703			Header: res.Header,
6704		}
6705	}
6706	if err != nil {
6707		return nil, err
6708	}
6709	defer googleapi.CloseBody(res)
6710	if err := googleapi.CheckResponse(res); err != nil {
6711		return nil, err
6712	}
6713	ret := &ClientUserInvitation{
6714		ServerResponse: googleapi.ServerResponse{
6715			Header:         res.Header,
6716			HTTPStatusCode: res.StatusCode,
6717		},
6718	}
6719	target := &ret
6720	if err := gensupport.DecodeResponse(target, res); err != nil {
6721		return nil, err
6722	}
6723	return ret, nil
6724	// {
6725	//   "description": "Retrieves an existing client user invitation.",
6726	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}",
6727	//   "httpMethod": "GET",
6728	//   "id": "adexchangebuyer2.accounts.clients.invitations.get",
6729	//   "parameterOrder": [
6730	//     "accountId",
6731	//     "clientAccountId",
6732	//     "invitationId"
6733	//   ],
6734	//   "parameters": {
6735	//     "accountId": {
6736	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6737	//       "format": "int64",
6738	//       "location": "path",
6739	//       "required": true,
6740	//       "type": "string"
6741	//     },
6742	//     "clientAccountId": {
6743	//       "description": "Numerical account ID of the client buyer that the user invitation to be retrieved is associated with. (required)",
6744	//       "format": "int64",
6745	//       "location": "path",
6746	//       "required": true,
6747	//       "type": "string"
6748	//     },
6749	//     "invitationId": {
6750	//       "description": "Numerical identifier of the user invitation to retrieve. (required)",
6751	//       "format": "int64",
6752	//       "location": "path",
6753	//       "required": true,
6754	//       "type": "string"
6755	//     }
6756	//   },
6757	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}",
6758	//   "response": {
6759	//     "$ref": "ClientUserInvitation"
6760	//   },
6761	//   "scopes": [
6762	//     "https://www.googleapis.com/auth/adexchange.buyer"
6763	//   ]
6764	// }
6765
6766}
6767
6768// method id "adexchangebuyer2.accounts.clients.invitations.list":
6769
6770type AccountsClientsInvitationsListCall struct {
6771	s               *Service
6772	accountId       int64
6773	clientAccountId string
6774	urlParams_      gensupport.URLParams
6775	ifNoneMatch_    string
6776	ctx_            context.Context
6777	header_         http.Header
6778}
6779
6780// List: Lists all the client users invitations for a client with a
6781// given account ID.
6782//
6783// - accountId: Numerical account ID of the client's sponsor buyer.
6784//   (required).
6785// - clientAccountId: Numerical account ID of the client buyer to list
6786//   invitations for. (required) You must either specify a string
6787//   representation of a numerical account identifier or the `-`
6788//   character to list all the invitations for all the clients of a
6789//   given sponsor buyer.
6790func (r *AccountsClientsInvitationsService) List(accountId int64, clientAccountId string) *AccountsClientsInvitationsListCall {
6791	c := &AccountsClientsInvitationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6792	c.accountId = accountId
6793	c.clientAccountId = clientAccountId
6794	return c
6795}
6796
6797// PageSize sets the optional parameter "pageSize": Requested page size.
6798// Server may return fewer clients than requested. If unspecified,
6799// server will pick an appropriate default.
6800func (c *AccountsClientsInvitationsListCall) PageSize(pageSize int64) *AccountsClientsInvitationsListCall {
6801	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6802	return c
6803}
6804
6805// PageToken sets the optional parameter "pageToken": A token
6806// identifying a page of results the server should return. Typically,
6807// this is the value of ListClientUserInvitationsResponse.nextPageToken
6808// returned from the previous call to the clients.invitations.list
6809// method.
6810func (c *AccountsClientsInvitationsListCall) PageToken(pageToken string) *AccountsClientsInvitationsListCall {
6811	c.urlParams_.Set("pageToken", pageToken)
6812	return c
6813}
6814
6815// Fields allows partial responses to be retrieved. See
6816// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6817// for more information.
6818func (c *AccountsClientsInvitationsListCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsListCall {
6819	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6820	return c
6821}
6822
6823// IfNoneMatch sets the optional parameter which makes the operation
6824// fail if the object's ETag matches the given value. This is useful for
6825// getting updates only after the object has changed since the last
6826// request. Use googleapi.IsNotModified to check whether the response
6827// error from Do is the result of In-None-Match.
6828func (c *AccountsClientsInvitationsListCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsListCall {
6829	c.ifNoneMatch_ = entityTag
6830	return c
6831}
6832
6833// Context sets the context to be used in this call's Do method. Any
6834// pending HTTP request will be aborted if the provided context is
6835// canceled.
6836func (c *AccountsClientsInvitationsListCall) Context(ctx context.Context) *AccountsClientsInvitationsListCall {
6837	c.ctx_ = ctx
6838	return c
6839}
6840
6841// Header returns an http.Header that can be modified by the caller to
6842// add HTTP headers to the request.
6843func (c *AccountsClientsInvitationsListCall) Header() http.Header {
6844	if c.header_ == nil {
6845		c.header_ = make(http.Header)
6846	}
6847	return c.header_
6848}
6849
6850func (c *AccountsClientsInvitationsListCall) doRequest(alt string) (*http.Response, error) {
6851	reqHeaders := make(http.Header)
6852	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6853	for k, v := range c.header_ {
6854		reqHeaders[k] = v
6855	}
6856	reqHeaders.Set("User-Agent", c.s.userAgent())
6857	if c.ifNoneMatch_ != "" {
6858		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6859	}
6860	var body io.Reader = nil
6861	c.urlParams_.Set("alt", alt)
6862	c.urlParams_.Set("prettyPrint", "false")
6863	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations")
6864	urls += "?" + c.urlParams_.Encode()
6865	req, err := http.NewRequest("GET", urls, body)
6866	if err != nil {
6867		return nil, err
6868	}
6869	req.Header = reqHeaders
6870	googleapi.Expand(req.URL, map[string]string{
6871		"accountId":       strconv.FormatInt(c.accountId, 10),
6872		"clientAccountId": c.clientAccountId,
6873	})
6874	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6875}
6876
6877// Do executes the "adexchangebuyer2.accounts.clients.invitations.list" call.
6878// Exactly one of *ListClientUserInvitationsResponse or error will be
6879// non-nil. Any non-2xx status code is an error. Response headers are in
6880// either *ListClientUserInvitationsResponse.ServerResponse.Header or
6881// (if a response was returned at all) in
6882// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6883// whether the returned error was because http.StatusNotModified was
6884// returned.
6885func (c *AccountsClientsInvitationsListCall) Do(opts ...googleapi.CallOption) (*ListClientUserInvitationsResponse, error) {
6886	gensupport.SetOptions(c.urlParams_, opts...)
6887	res, err := c.doRequest("json")
6888	if res != nil && res.StatusCode == http.StatusNotModified {
6889		if res.Body != nil {
6890			res.Body.Close()
6891		}
6892		return nil, &googleapi.Error{
6893			Code:   res.StatusCode,
6894			Header: res.Header,
6895		}
6896	}
6897	if err != nil {
6898		return nil, err
6899	}
6900	defer googleapi.CloseBody(res)
6901	if err := googleapi.CheckResponse(res); err != nil {
6902		return nil, err
6903	}
6904	ret := &ListClientUserInvitationsResponse{
6905		ServerResponse: googleapi.ServerResponse{
6906			Header:         res.Header,
6907			HTTPStatusCode: res.StatusCode,
6908		},
6909	}
6910	target := &ret
6911	if err := gensupport.DecodeResponse(target, res); err != nil {
6912		return nil, err
6913	}
6914	return ret, nil
6915	// {
6916	//   "description": "Lists all the client users invitations for a client with a given account ID.",
6917	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
6918	//   "httpMethod": "GET",
6919	//   "id": "adexchangebuyer2.accounts.clients.invitations.list",
6920	//   "parameterOrder": [
6921	//     "accountId",
6922	//     "clientAccountId"
6923	//   ],
6924	//   "parameters": {
6925	//     "accountId": {
6926	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6927	//       "format": "int64",
6928	//       "location": "path",
6929	//       "required": true,
6930	//       "type": "string"
6931	//     },
6932	//     "clientAccountId": {
6933	//       "description": "Numerical account ID of the client buyer to list invitations for. (required) You must either specify a string representation of a numerical account identifier or the `-` character to list all the invitations for all the clients of a given sponsor buyer.",
6934	//       "location": "path",
6935	//       "required": true,
6936	//       "type": "string"
6937	//     },
6938	//     "pageSize": {
6939	//       "description": "Requested page size. Server may return fewer clients than requested. If unspecified, server will pick an appropriate default.",
6940	//       "format": "int32",
6941	//       "location": "query",
6942	//       "type": "integer"
6943	//     },
6944	//     "pageToken": {
6945	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientUserInvitationsResponse.nextPageToken returned from the previous call to the clients.invitations.list method.",
6946	//       "location": "query",
6947	//       "type": "string"
6948	//     }
6949	//   },
6950	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
6951	//   "response": {
6952	//     "$ref": "ListClientUserInvitationsResponse"
6953	//   },
6954	//   "scopes": [
6955	//     "https://www.googleapis.com/auth/adexchange.buyer"
6956	//   ]
6957	// }
6958
6959}
6960
6961// Pages invokes f for each page of results.
6962// A non-nil error returned from f will halt the iteration.
6963// The provided context supersedes any context provided to the Context method.
6964func (c *AccountsClientsInvitationsListCall) Pages(ctx context.Context, f func(*ListClientUserInvitationsResponse) error) error {
6965	c.ctx_ = ctx
6966	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6967	for {
6968		x, err := c.Do()
6969		if err != nil {
6970			return err
6971		}
6972		if err := f(x); err != nil {
6973			return err
6974		}
6975		if x.NextPageToken == "" {
6976			return nil
6977		}
6978		c.PageToken(x.NextPageToken)
6979	}
6980}
6981
6982// method id "adexchangebuyer2.accounts.clients.users.get":
6983
6984type AccountsClientsUsersGetCall struct {
6985	s               *Service
6986	accountId       int64
6987	clientAccountId int64
6988	userId          int64
6989	urlParams_      gensupport.URLParams
6990	ifNoneMatch_    string
6991	ctx_            context.Context
6992	header_         http.Header
6993}
6994
6995// Get: Retrieves an existing client user.
6996//
6997// - accountId: Numerical account ID of the client's sponsor buyer.
6998//   (required).
6999// - clientAccountId: Numerical account ID of the client buyer that the
7000//   user to be retrieved is associated with. (required).
7001// - userId: Numerical identifier of the user to retrieve. (required).
7002func (r *AccountsClientsUsersService) Get(accountId int64, clientAccountId int64, userId int64) *AccountsClientsUsersGetCall {
7003	c := &AccountsClientsUsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7004	c.accountId = accountId
7005	c.clientAccountId = clientAccountId
7006	c.userId = userId
7007	return c
7008}
7009
7010// Fields allows partial responses to be retrieved. See
7011// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7012// for more information.
7013func (c *AccountsClientsUsersGetCall) Fields(s ...googleapi.Field) *AccountsClientsUsersGetCall {
7014	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7015	return c
7016}
7017
7018// IfNoneMatch sets the optional parameter which makes the operation
7019// fail if the object's ETag matches the given value. This is useful for
7020// getting updates only after the object has changed since the last
7021// request. Use googleapi.IsNotModified to check whether the response
7022// error from Do is the result of In-None-Match.
7023func (c *AccountsClientsUsersGetCall) IfNoneMatch(entityTag string) *AccountsClientsUsersGetCall {
7024	c.ifNoneMatch_ = entityTag
7025	return c
7026}
7027
7028// Context sets the context to be used in this call's Do method. Any
7029// pending HTTP request will be aborted if the provided context is
7030// canceled.
7031func (c *AccountsClientsUsersGetCall) Context(ctx context.Context) *AccountsClientsUsersGetCall {
7032	c.ctx_ = ctx
7033	return c
7034}
7035
7036// Header returns an http.Header that can be modified by the caller to
7037// add HTTP headers to the request.
7038func (c *AccountsClientsUsersGetCall) Header() http.Header {
7039	if c.header_ == nil {
7040		c.header_ = make(http.Header)
7041	}
7042	return c.header_
7043}
7044
7045func (c *AccountsClientsUsersGetCall) doRequest(alt string) (*http.Response, error) {
7046	reqHeaders := make(http.Header)
7047	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7048	for k, v := range c.header_ {
7049		reqHeaders[k] = v
7050	}
7051	reqHeaders.Set("User-Agent", c.s.userAgent())
7052	if c.ifNoneMatch_ != "" {
7053		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7054	}
7055	var body io.Reader = nil
7056	c.urlParams_.Set("alt", alt)
7057	c.urlParams_.Set("prettyPrint", "false")
7058	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}")
7059	urls += "?" + c.urlParams_.Encode()
7060	req, err := http.NewRequest("GET", urls, body)
7061	if err != nil {
7062		return nil, err
7063	}
7064	req.Header = reqHeaders
7065	googleapi.Expand(req.URL, map[string]string{
7066		"accountId":       strconv.FormatInt(c.accountId, 10),
7067		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
7068		"userId":          strconv.FormatInt(c.userId, 10),
7069	})
7070	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7071}
7072
7073// Do executes the "adexchangebuyer2.accounts.clients.users.get" call.
7074// Exactly one of *ClientUser or error will be non-nil. Any non-2xx
7075// status code is an error. Response headers are in either
7076// *ClientUser.ServerResponse.Header or (if a response was returned at
7077// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7078// to check whether the returned error was because
7079// http.StatusNotModified was returned.
7080func (c *AccountsClientsUsersGetCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
7081	gensupport.SetOptions(c.urlParams_, opts...)
7082	res, err := c.doRequest("json")
7083	if res != nil && res.StatusCode == http.StatusNotModified {
7084		if res.Body != nil {
7085			res.Body.Close()
7086		}
7087		return nil, &googleapi.Error{
7088			Code:   res.StatusCode,
7089			Header: res.Header,
7090		}
7091	}
7092	if err != nil {
7093		return nil, err
7094	}
7095	defer googleapi.CloseBody(res)
7096	if err := googleapi.CheckResponse(res); err != nil {
7097		return nil, err
7098	}
7099	ret := &ClientUser{
7100		ServerResponse: googleapi.ServerResponse{
7101			Header:         res.Header,
7102			HTTPStatusCode: res.StatusCode,
7103		},
7104	}
7105	target := &ret
7106	if err := gensupport.DecodeResponse(target, res); err != nil {
7107		return nil, err
7108	}
7109	return ret, nil
7110	// {
7111	//   "description": "Retrieves an existing client user.",
7112	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7113	//   "httpMethod": "GET",
7114	//   "id": "adexchangebuyer2.accounts.clients.users.get",
7115	//   "parameterOrder": [
7116	//     "accountId",
7117	//     "clientAccountId",
7118	//     "userId"
7119	//   ],
7120	//   "parameters": {
7121	//     "accountId": {
7122	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
7123	//       "format": "int64",
7124	//       "location": "path",
7125	//       "required": true,
7126	//       "type": "string"
7127	//     },
7128	//     "clientAccountId": {
7129	//       "description": "Numerical account ID of the client buyer that the user to be retrieved is associated with. (required)",
7130	//       "format": "int64",
7131	//       "location": "path",
7132	//       "required": true,
7133	//       "type": "string"
7134	//     },
7135	//     "userId": {
7136	//       "description": "Numerical identifier of the user to retrieve. (required)",
7137	//       "format": "int64",
7138	//       "location": "path",
7139	//       "required": true,
7140	//       "type": "string"
7141	//     }
7142	//   },
7143	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7144	//   "response": {
7145	//     "$ref": "ClientUser"
7146	//   },
7147	//   "scopes": [
7148	//     "https://www.googleapis.com/auth/adexchange.buyer"
7149	//   ]
7150	// }
7151
7152}
7153
7154// method id "adexchangebuyer2.accounts.clients.users.list":
7155
7156type AccountsClientsUsersListCall struct {
7157	s               *Service
7158	accountId       int64
7159	clientAccountId string
7160	urlParams_      gensupport.URLParams
7161	ifNoneMatch_    string
7162	ctx_            context.Context
7163	header_         http.Header
7164}
7165
7166// List: Lists all the known client users for a specified sponsor buyer
7167// account ID.
7168//
7169// - accountId: Numerical account ID of the sponsor buyer of the client
7170//   to list users for. (required).
7171// - clientAccountId: The account ID of the client buyer to list users
7172//   for. (required) You must specify either a string representation of
7173//   a numerical account identifier or the `-` character to list all the
7174//   client users for all the clients of a given sponsor buyer.
7175func (r *AccountsClientsUsersService) List(accountId int64, clientAccountId string) *AccountsClientsUsersListCall {
7176	c := &AccountsClientsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7177	c.accountId = accountId
7178	c.clientAccountId = clientAccountId
7179	return c
7180}
7181
7182// PageSize sets the optional parameter "pageSize": Requested page size.
7183// The server may return fewer clients than requested. If unspecified,
7184// the server will pick an appropriate default.
7185func (c *AccountsClientsUsersListCall) PageSize(pageSize int64) *AccountsClientsUsersListCall {
7186	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7187	return c
7188}
7189
7190// PageToken sets the optional parameter "pageToken": A token
7191// identifying a page of results the server should return. Typically,
7192// this is the value of ListClientUsersResponse.nextPageToken returned
7193// from the previous call to the accounts.clients.users.list method.
7194func (c *AccountsClientsUsersListCall) PageToken(pageToken string) *AccountsClientsUsersListCall {
7195	c.urlParams_.Set("pageToken", pageToken)
7196	return c
7197}
7198
7199// Fields allows partial responses to be retrieved. See
7200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7201// for more information.
7202func (c *AccountsClientsUsersListCall) Fields(s ...googleapi.Field) *AccountsClientsUsersListCall {
7203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7204	return c
7205}
7206
7207// IfNoneMatch sets the optional parameter which makes the operation
7208// fail if the object's ETag matches the given value. This is useful for
7209// getting updates only after the object has changed since the last
7210// request. Use googleapi.IsNotModified to check whether the response
7211// error from Do is the result of In-None-Match.
7212func (c *AccountsClientsUsersListCall) IfNoneMatch(entityTag string) *AccountsClientsUsersListCall {
7213	c.ifNoneMatch_ = entityTag
7214	return c
7215}
7216
7217// Context sets the context to be used in this call's Do method. Any
7218// pending HTTP request will be aborted if the provided context is
7219// canceled.
7220func (c *AccountsClientsUsersListCall) Context(ctx context.Context) *AccountsClientsUsersListCall {
7221	c.ctx_ = ctx
7222	return c
7223}
7224
7225// Header returns an http.Header that can be modified by the caller to
7226// add HTTP headers to the request.
7227func (c *AccountsClientsUsersListCall) Header() http.Header {
7228	if c.header_ == nil {
7229		c.header_ = make(http.Header)
7230	}
7231	return c.header_
7232}
7233
7234func (c *AccountsClientsUsersListCall) doRequest(alt string) (*http.Response, error) {
7235	reqHeaders := make(http.Header)
7236	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7237	for k, v := range c.header_ {
7238		reqHeaders[k] = v
7239	}
7240	reqHeaders.Set("User-Agent", c.s.userAgent())
7241	if c.ifNoneMatch_ != "" {
7242		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7243	}
7244	var body io.Reader = nil
7245	c.urlParams_.Set("alt", alt)
7246	c.urlParams_.Set("prettyPrint", "false")
7247	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users")
7248	urls += "?" + c.urlParams_.Encode()
7249	req, err := http.NewRequest("GET", urls, body)
7250	if err != nil {
7251		return nil, err
7252	}
7253	req.Header = reqHeaders
7254	googleapi.Expand(req.URL, map[string]string{
7255		"accountId":       strconv.FormatInt(c.accountId, 10),
7256		"clientAccountId": c.clientAccountId,
7257	})
7258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7259}
7260
7261// Do executes the "adexchangebuyer2.accounts.clients.users.list" call.
7262// Exactly one of *ListClientUsersResponse or error will be non-nil. Any
7263// non-2xx status code is an error. Response headers are in either
7264// *ListClientUsersResponse.ServerResponse.Header or (if a response was
7265// returned at all) in error.(*googleapi.Error).Header. Use
7266// googleapi.IsNotModified to check whether the returned error was
7267// because http.StatusNotModified was returned.
7268func (c *AccountsClientsUsersListCall) Do(opts ...googleapi.CallOption) (*ListClientUsersResponse, error) {
7269	gensupport.SetOptions(c.urlParams_, opts...)
7270	res, err := c.doRequest("json")
7271	if res != nil && res.StatusCode == http.StatusNotModified {
7272		if res.Body != nil {
7273			res.Body.Close()
7274		}
7275		return nil, &googleapi.Error{
7276			Code:   res.StatusCode,
7277			Header: res.Header,
7278		}
7279	}
7280	if err != nil {
7281		return nil, err
7282	}
7283	defer googleapi.CloseBody(res)
7284	if err := googleapi.CheckResponse(res); err != nil {
7285		return nil, err
7286	}
7287	ret := &ListClientUsersResponse{
7288		ServerResponse: googleapi.ServerResponse{
7289			Header:         res.Header,
7290			HTTPStatusCode: res.StatusCode,
7291		},
7292	}
7293	target := &ret
7294	if err := gensupport.DecodeResponse(target, res); err != nil {
7295		return nil, err
7296	}
7297	return ret, nil
7298	// {
7299	//   "description": "Lists all the known client users for a specified sponsor buyer account ID.",
7300	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users",
7301	//   "httpMethod": "GET",
7302	//   "id": "adexchangebuyer2.accounts.clients.users.list",
7303	//   "parameterOrder": [
7304	//     "accountId",
7305	//     "clientAccountId"
7306	//   ],
7307	//   "parameters": {
7308	//     "accountId": {
7309	//       "description": "Numerical account ID of the sponsor buyer of the client to list users for. (required)",
7310	//       "format": "int64",
7311	//       "location": "path",
7312	//       "required": true,
7313	//       "type": "string"
7314	//     },
7315	//     "clientAccountId": {
7316	//       "description": "The account ID of the client buyer to list users for. (required) You must specify either a string representation of a numerical account identifier or the `-` character to list all the client users for all the clients of a given sponsor buyer.",
7317	//       "location": "path",
7318	//       "required": true,
7319	//       "type": "string"
7320	//     },
7321	//     "pageSize": {
7322	//       "description": "Requested page size. The server may return fewer clients than requested. If unspecified, the server will pick an appropriate default.",
7323	//       "format": "int32",
7324	//       "location": "query",
7325	//       "type": "integer"
7326	//     },
7327	//     "pageToken": {
7328	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientUsersResponse.nextPageToken returned from the previous call to the accounts.clients.users.list method.",
7329	//       "location": "query",
7330	//       "type": "string"
7331	//     }
7332	//   },
7333	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users",
7334	//   "response": {
7335	//     "$ref": "ListClientUsersResponse"
7336	//   },
7337	//   "scopes": [
7338	//     "https://www.googleapis.com/auth/adexchange.buyer"
7339	//   ]
7340	// }
7341
7342}
7343
7344// Pages invokes f for each page of results.
7345// A non-nil error returned from f will halt the iteration.
7346// The provided context supersedes any context provided to the Context method.
7347func (c *AccountsClientsUsersListCall) Pages(ctx context.Context, f func(*ListClientUsersResponse) error) error {
7348	c.ctx_ = ctx
7349	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7350	for {
7351		x, err := c.Do()
7352		if err != nil {
7353			return err
7354		}
7355		if err := f(x); err != nil {
7356			return err
7357		}
7358		if x.NextPageToken == "" {
7359			return nil
7360		}
7361		c.PageToken(x.NextPageToken)
7362	}
7363}
7364
7365// method id "adexchangebuyer2.accounts.clients.users.update":
7366
7367type AccountsClientsUsersUpdateCall struct {
7368	s               *Service
7369	accountId       int64
7370	clientAccountId int64
7371	userId          int64
7372	clientuser      *ClientUser
7373	urlParams_      gensupport.URLParams
7374	ctx_            context.Context
7375	header_         http.Header
7376}
7377
7378// Update: Updates an existing client user. Only the user status can be
7379// changed on update.
7380//
7381// - accountId: Numerical account ID of the client's sponsor buyer.
7382//   (required).
7383// - clientAccountId: Numerical account ID of the client buyer that the
7384//   user to be retrieved is associated with. (required).
7385// - userId: Numerical identifier of the user to retrieve. (required).
7386func (r *AccountsClientsUsersService) Update(accountId int64, clientAccountId int64, userId int64, clientuser *ClientUser) *AccountsClientsUsersUpdateCall {
7387	c := &AccountsClientsUsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7388	c.accountId = accountId
7389	c.clientAccountId = clientAccountId
7390	c.userId = userId
7391	c.clientuser = clientuser
7392	return c
7393}
7394
7395// Fields allows partial responses to be retrieved. See
7396// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7397// for more information.
7398func (c *AccountsClientsUsersUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUsersUpdateCall {
7399	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7400	return c
7401}
7402
7403// Context sets the context to be used in this call's Do method. Any
7404// pending HTTP request will be aborted if the provided context is
7405// canceled.
7406func (c *AccountsClientsUsersUpdateCall) Context(ctx context.Context) *AccountsClientsUsersUpdateCall {
7407	c.ctx_ = ctx
7408	return c
7409}
7410
7411// Header returns an http.Header that can be modified by the caller to
7412// add HTTP headers to the request.
7413func (c *AccountsClientsUsersUpdateCall) Header() http.Header {
7414	if c.header_ == nil {
7415		c.header_ = make(http.Header)
7416	}
7417	return c.header_
7418}
7419
7420func (c *AccountsClientsUsersUpdateCall) doRequest(alt string) (*http.Response, error) {
7421	reqHeaders := make(http.Header)
7422	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7423	for k, v := range c.header_ {
7424		reqHeaders[k] = v
7425	}
7426	reqHeaders.Set("User-Agent", c.s.userAgent())
7427	var body io.Reader = nil
7428	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuser)
7429	if err != nil {
7430		return nil, err
7431	}
7432	reqHeaders.Set("Content-Type", "application/json")
7433	c.urlParams_.Set("alt", alt)
7434	c.urlParams_.Set("prettyPrint", "false")
7435	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}")
7436	urls += "?" + c.urlParams_.Encode()
7437	req, err := http.NewRequest("PUT", urls, body)
7438	if err != nil {
7439		return nil, err
7440	}
7441	req.Header = reqHeaders
7442	googleapi.Expand(req.URL, map[string]string{
7443		"accountId":       strconv.FormatInt(c.accountId, 10),
7444		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
7445		"userId":          strconv.FormatInt(c.userId, 10),
7446	})
7447	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7448}
7449
7450// Do executes the "adexchangebuyer2.accounts.clients.users.update" call.
7451// Exactly one of *ClientUser or error will be non-nil. Any non-2xx
7452// status code is an error. Response headers are in either
7453// *ClientUser.ServerResponse.Header or (if a response was returned at
7454// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7455// to check whether the returned error was because
7456// http.StatusNotModified was returned.
7457func (c *AccountsClientsUsersUpdateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
7458	gensupport.SetOptions(c.urlParams_, opts...)
7459	res, err := c.doRequest("json")
7460	if res != nil && res.StatusCode == http.StatusNotModified {
7461		if res.Body != nil {
7462			res.Body.Close()
7463		}
7464		return nil, &googleapi.Error{
7465			Code:   res.StatusCode,
7466			Header: res.Header,
7467		}
7468	}
7469	if err != nil {
7470		return nil, err
7471	}
7472	defer googleapi.CloseBody(res)
7473	if err := googleapi.CheckResponse(res); err != nil {
7474		return nil, err
7475	}
7476	ret := &ClientUser{
7477		ServerResponse: googleapi.ServerResponse{
7478			Header:         res.Header,
7479			HTTPStatusCode: res.StatusCode,
7480		},
7481	}
7482	target := &ret
7483	if err := gensupport.DecodeResponse(target, res); err != nil {
7484		return nil, err
7485	}
7486	return ret, nil
7487	// {
7488	//   "description": "Updates an existing client user. Only the user status can be changed on update.",
7489	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7490	//   "httpMethod": "PUT",
7491	//   "id": "adexchangebuyer2.accounts.clients.users.update",
7492	//   "parameterOrder": [
7493	//     "accountId",
7494	//     "clientAccountId",
7495	//     "userId"
7496	//   ],
7497	//   "parameters": {
7498	//     "accountId": {
7499	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
7500	//       "format": "int64",
7501	//       "location": "path",
7502	//       "required": true,
7503	//       "type": "string"
7504	//     },
7505	//     "clientAccountId": {
7506	//       "description": "Numerical account ID of the client buyer that the user to be retrieved is associated with. (required)",
7507	//       "format": "int64",
7508	//       "location": "path",
7509	//       "required": true,
7510	//       "type": "string"
7511	//     },
7512	//     "userId": {
7513	//       "description": "Numerical identifier of the user to retrieve. (required)",
7514	//       "format": "int64",
7515	//       "location": "path",
7516	//       "required": true,
7517	//       "type": "string"
7518	//     }
7519	//   },
7520	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7521	//   "request": {
7522	//     "$ref": "ClientUser"
7523	//   },
7524	//   "response": {
7525	//     "$ref": "ClientUser"
7526	//   },
7527	//   "scopes": [
7528	//     "https://www.googleapis.com/auth/adexchange.buyer"
7529	//   ]
7530	// }
7531
7532}
7533
7534// method id "adexchangebuyer2.accounts.creatives.create":
7535
7536type AccountsCreativesCreateCall struct {
7537	s          *Service
7538	accountId  string
7539	creative   *Creative
7540	urlParams_ gensupport.URLParams
7541	ctx_       context.Context
7542	header_    http.Header
7543}
7544
7545// Create: Creates a creative.
7546//
7547// - accountId: The account that this creative belongs to. Can be used
7548//   to filter the response of the creatives.list method.
7549func (r *AccountsCreativesService) Create(accountId string, creative *Creative) *AccountsCreativesCreateCall {
7550	c := &AccountsCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7551	c.accountId = accountId
7552	c.creative = creative
7553	return c
7554}
7555
7556// DuplicateIdMode sets the optional parameter "duplicateIdMode":
7557// Indicates if multiple creatives can share an ID or not. Default is
7558// NO_DUPLICATES (one ID per creative).
7559//
7560// Possible values:
7561//   "NO_DUPLICATES" - Recommended. This means that an ID will be unique
7562// to a single creative. Multiple creatives will not share an ID.
7563//   "FORCE_ENABLE_DUPLICATE_IDS" - Not recommended. Using this option
7564// will allow multiple creatives to share the same ID. Get and Update
7565// requests will not be possible for any ID that has more than one
7566// creative associated. (List will still function.) This is only
7567// intended for backwards compatibility in cases where a single ID is
7568// already shared by multiple creatives from previous APIs.
7569func (c *AccountsCreativesCreateCall) DuplicateIdMode(duplicateIdMode string) *AccountsCreativesCreateCall {
7570	c.urlParams_.Set("duplicateIdMode", duplicateIdMode)
7571	return c
7572}
7573
7574// Fields allows partial responses to be retrieved. See
7575// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7576// for more information.
7577func (c *AccountsCreativesCreateCall) Fields(s ...googleapi.Field) *AccountsCreativesCreateCall {
7578	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7579	return c
7580}
7581
7582// Context sets the context to be used in this call's Do method. Any
7583// pending HTTP request will be aborted if the provided context is
7584// canceled.
7585func (c *AccountsCreativesCreateCall) Context(ctx context.Context) *AccountsCreativesCreateCall {
7586	c.ctx_ = ctx
7587	return c
7588}
7589
7590// Header returns an http.Header that can be modified by the caller to
7591// add HTTP headers to the request.
7592func (c *AccountsCreativesCreateCall) Header() http.Header {
7593	if c.header_ == nil {
7594		c.header_ = make(http.Header)
7595	}
7596	return c.header_
7597}
7598
7599func (c *AccountsCreativesCreateCall) doRequest(alt string) (*http.Response, error) {
7600	reqHeaders := make(http.Header)
7601	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7602	for k, v := range c.header_ {
7603		reqHeaders[k] = v
7604	}
7605	reqHeaders.Set("User-Agent", c.s.userAgent())
7606	var body io.Reader = nil
7607	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
7608	if err != nil {
7609		return nil, err
7610	}
7611	reqHeaders.Set("Content-Type", "application/json")
7612	c.urlParams_.Set("alt", alt)
7613	c.urlParams_.Set("prettyPrint", "false")
7614	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives")
7615	urls += "?" + c.urlParams_.Encode()
7616	req, err := http.NewRequest("POST", urls, body)
7617	if err != nil {
7618		return nil, err
7619	}
7620	req.Header = reqHeaders
7621	googleapi.Expand(req.URL, map[string]string{
7622		"accountId": c.accountId,
7623	})
7624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7625}
7626
7627// Do executes the "adexchangebuyer2.accounts.creatives.create" call.
7628// Exactly one of *Creative or error will be non-nil. Any non-2xx status
7629// code is an error. Response headers are in either
7630// *Creative.ServerResponse.Header or (if a response was returned at
7631// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7632// to check whether the returned error was because
7633// http.StatusNotModified was returned.
7634func (c *AccountsCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
7635	gensupport.SetOptions(c.urlParams_, opts...)
7636	res, err := c.doRequest("json")
7637	if res != nil && res.StatusCode == http.StatusNotModified {
7638		if res.Body != nil {
7639			res.Body.Close()
7640		}
7641		return nil, &googleapi.Error{
7642			Code:   res.StatusCode,
7643			Header: res.Header,
7644		}
7645	}
7646	if err != nil {
7647		return nil, err
7648	}
7649	defer googleapi.CloseBody(res)
7650	if err := googleapi.CheckResponse(res); err != nil {
7651		return nil, err
7652	}
7653	ret := &Creative{
7654		ServerResponse: googleapi.ServerResponse{
7655			Header:         res.Header,
7656			HTTPStatusCode: res.StatusCode,
7657		},
7658	}
7659	target := &ret
7660	if err := gensupport.DecodeResponse(target, res); err != nil {
7661		return nil, err
7662	}
7663	return ret, nil
7664	// {
7665	//   "description": "Creates a creative.",
7666	//   "flatPath": "v2beta1/accounts/{accountId}/creatives",
7667	//   "httpMethod": "POST",
7668	//   "id": "adexchangebuyer2.accounts.creatives.create",
7669	//   "parameterOrder": [
7670	//     "accountId"
7671	//   ],
7672	//   "parameters": {
7673	//     "accountId": {
7674	//       "description": "The account that this creative belongs to. Can be used to filter the response of the creatives.list method.",
7675	//       "location": "path",
7676	//       "required": true,
7677	//       "type": "string"
7678	//     },
7679	//     "duplicateIdMode": {
7680	//       "description": "Indicates if multiple creatives can share an ID or not. Default is NO_DUPLICATES (one ID per creative).",
7681	//       "enum": [
7682	//         "NO_DUPLICATES",
7683	//         "FORCE_ENABLE_DUPLICATE_IDS"
7684	//       ],
7685	//       "enumDescriptions": [
7686	//         "Recommended. This means that an ID will be unique to a single creative. Multiple creatives will not share an ID.",
7687	//         "Not recommended. Using this option will allow multiple creatives to share the same ID. Get and Update requests will not be possible for any ID that has more than one creative associated. (List will still function.) This is only intended for backwards compatibility in cases where a single ID is already shared by multiple creatives from previous APIs."
7688	//       ],
7689	//       "location": "query",
7690	//       "type": "string"
7691	//     }
7692	//   },
7693	//   "path": "v2beta1/accounts/{accountId}/creatives",
7694	//   "request": {
7695	//     "$ref": "Creative"
7696	//   },
7697	//   "response": {
7698	//     "$ref": "Creative"
7699	//   },
7700	//   "scopes": [
7701	//     "https://www.googleapis.com/auth/adexchange.buyer"
7702	//   ]
7703	// }
7704
7705}
7706
7707// method id "adexchangebuyer2.accounts.creatives.get":
7708
7709type AccountsCreativesGetCall struct {
7710	s            *Service
7711	accountId    string
7712	creativeId   string
7713	urlParams_   gensupport.URLParams
7714	ifNoneMatch_ string
7715	ctx_         context.Context
7716	header_      http.Header
7717}
7718
7719// Get: Gets a creative.
7720//
7721// - accountId: The account the creative belongs to.
7722// - creativeId: The ID of the creative to retrieve.
7723func (r *AccountsCreativesService) Get(accountId string, creativeId string) *AccountsCreativesGetCall {
7724	c := &AccountsCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7725	c.accountId = accountId
7726	c.creativeId = creativeId
7727	return c
7728}
7729
7730// Fields allows partial responses to be retrieved. See
7731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7732// for more information.
7733func (c *AccountsCreativesGetCall) Fields(s ...googleapi.Field) *AccountsCreativesGetCall {
7734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7735	return c
7736}
7737
7738// IfNoneMatch sets the optional parameter which makes the operation
7739// fail if the object's ETag matches the given value. This is useful for
7740// getting updates only after the object has changed since the last
7741// request. Use googleapi.IsNotModified to check whether the response
7742// error from Do is the result of In-None-Match.
7743func (c *AccountsCreativesGetCall) IfNoneMatch(entityTag string) *AccountsCreativesGetCall {
7744	c.ifNoneMatch_ = entityTag
7745	return c
7746}
7747
7748// Context sets the context to be used in this call's Do method. Any
7749// pending HTTP request will be aborted if the provided context is
7750// canceled.
7751func (c *AccountsCreativesGetCall) Context(ctx context.Context) *AccountsCreativesGetCall {
7752	c.ctx_ = ctx
7753	return c
7754}
7755
7756// Header returns an http.Header that can be modified by the caller to
7757// add HTTP headers to the request.
7758func (c *AccountsCreativesGetCall) Header() http.Header {
7759	if c.header_ == nil {
7760		c.header_ = make(http.Header)
7761	}
7762	return c.header_
7763}
7764
7765func (c *AccountsCreativesGetCall) doRequest(alt string) (*http.Response, error) {
7766	reqHeaders := make(http.Header)
7767	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7768	for k, v := range c.header_ {
7769		reqHeaders[k] = v
7770	}
7771	reqHeaders.Set("User-Agent", c.s.userAgent())
7772	if c.ifNoneMatch_ != "" {
7773		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7774	}
7775	var body io.Reader = nil
7776	c.urlParams_.Set("alt", alt)
7777	c.urlParams_.Set("prettyPrint", "false")
7778	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}")
7779	urls += "?" + c.urlParams_.Encode()
7780	req, err := http.NewRequest("GET", urls, body)
7781	if err != nil {
7782		return nil, err
7783	}
7784	req.Header = reqHeaders
7785	googleapi.Expand(req.URL, map[string]string{
7786		"accountId":  c.accountId,
7787		"creativeId": c.creativeId,
7788	})
7789	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7790}
7791
7792// Do executes the "adexchangebuyer2.accounts.creatives.get" call.
7793// Exactly one of *Creative or error will be non-nil. Any non-2xx status
7794// code is an error. Response headers are in either
7795// *Creative.ServerResponse.Header or (if a response was returned at
7796// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7797// to check whether the returned error was because
7798// http.StatusNotModified was returned.
7799func (c *AccountsCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
7800	gensupport.SetOptions(c.urlParams_, opts...)
7801	res, err := c.doRequest("json")
7802	if res != nil && res.StatusCode == http.StatusNotModified {
7803		if res.Body != nil {
7804			res.Body.Close()
7805		}
7806		return nil, &googleapi.Error{
7807			Code:   res.StatusCode,
7808			Header: res.Header,
7809		}
7810	}
7811	if err != nil {
7812		return nil, err
7813	}
7814	defer googleapi.CloseBody(res)
7815	if err := googleapi.CheckResponse(res); err != nil {
7816		return nil, err
7817	}
7818	ret := &Creative{
7819		ServerResponse: googleapi.ServerResponse{
7820			Header:         res.Header,
7821			HTTPStatusCode: res.StatusCode,
7822		},
7823	}
7824	target := &ret
7825	if err := gensupport.DecodeResponse(target, res); err != nil {
7826		return nil, err
7827	}
7828	return ret, nil
7829	// {
7830	//   "description": "Gets a creative.",
7831	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
7832	//   "httpMethod": "GET",
7833	//   "id": "adexchangebuyer2.accounts.creatives.get",
7834	//   "parameterOrder": [
7835	//     "accountId",
7836	//     "creativeId"
7837	//   ],
7838	//   "parameters": {
7839	//     "accountId": {
7840	//       "description": "The account the creative belongs to.",
7841	//       "location": "path",
7842	//       "required": true,
7843	//       "type": "string"
7844	//     },
7845	//     "creativeId": {
7846	//       "description": "The ID of the creative to retrieve.",
7847	//       "location": "path",
7848	//       "required": true,
7849	//       "type": "string"
7850	//     }
7851	//   },
7852	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
7853	//   "response": {
7854	//     "$ref": "Creative"
7855	//   },
7856	//   "scopes": [
7857	//     "https://www.googleapis.com/auth/adexchange.buyer"
7858	//   ]
7859	// }
7860
7861}
7862
7863// method id "adexchangebuyer2.accounts.creatives.list":
7864
7865type AccountsCreativesListCall struct {
7866	s            *Service
7867	accountId    string
7868	urlParams_   gensupport.URLParams
7869	ifNoneMatch_ string
7870	ctx_         context.Context
7871	header_      http.Header
7872}
7873
7874// List: Lists creatives.
7875//
7876// - accountId: The account to list the creatives from. Specify "-" to
7877//   list all creatives the current user has access to.
7878func (r *AccountsCreativesService) List(accountId string) *AccountsCreativesListCall {
7879	c := &AccountsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7880	c.accountId = accountId
7881	return c
7882}
7883
7884// PageSize sets the optional parameter "pageSize": Requested page size.
7885// The server may return fewer creatives than requested (due to timeout
7886// constraint) even if more are available via another call. If
7887// unspecified, server will pick an appropriate default. Acceptable
7888// values are 1 to 1000, inclusive.
7889func (c *AccountsCreativesListCall) PageSize(pageSize int64) *AccountsCreativesListCall {
7890	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7891	return c
7892}
7893
7894// PageToken sets the optional parameter "pageToken": A token
7895// identifying a page of results the server should return. Typically,
7896// this is the value of ListCreativesResponse.next_page_token returned
7897// from the previous call to 'ListCreatives' method.
7898func (c *AccountsCreativesListCall) PageToken(pageToken string) *AccountsCreativesListCall {
7899	c.urlParams_.Set("pageToken", pageToken)
7900	return c
7901}
7902
7903// Query sets the optional parameter "query": An optional query string
7904// to filter creatives. If no filter is specified, all active creatives
7905// will be returned. Supported queries are: -
7906// accountId=*account_id_string* - creativeId=*creative_id_string* -
7907// dealsStatus: {approved, conditionally_approved, disapproved,
7908// not_checked} - openAuctionStatus: {approved, conditionally_approved,
7909// disapproved, not_checked} - attribute: {a numeric attribute from the
7910// list of attributes} - disapprovalReason: {a reason from
7911// DisapprovalReason} Example: 'accountId=12345 AND
7912// (dealsStatus:disapproved AND disapprovalReason:unacceptable_content)
7913// OR attribute:47'
7914func (c *AccountsCreativesListCall) Query(query string) *AccountsCreativesListCall {
7915	c.urlParams_.Set("query", query)
7916	return c
7917}
7918
7919// Fields allows partial responses to be retrieved. See
7920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7921// for more information.
7922func (c *AccountsCreativesListCall) Fields(s ...googleapi.Field) *AccountsCreativesListCall {
7923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7924	return c
7925}
7926
7927// IfNoneMatch sets the optional parameter which makes the operation
7928// fail if the object's ETag matches the given value. This is useful for
7929// getting updates only after the object has changed since the last
7930// request. Use googleapi.IsNotModified to check whether the response
7931// error from Do is the result of In-None-Match.
7932func (c *AccountsCreativesListCall) IfNoneMatch(entityTag string) *AccountsCreativesListCall {
7933	c.ifNoneMatch_ = entityTag
7934	return c
7935}
7936
7937// Context sets the context to be used in this call's Do method. Any
7938// pending HTTP request will be aborted if the provided context is
7939// canceled.
7940func (c *AccountsCreativesListCall) Context(ctx context.Context) *AccountsCreativesListCall {
7941	c.ctx_ = ctx
7942	return c
7943}
7944
7945// Header returns an http.Header that can be modified by the caller to
7946// add HTTP headers to the request.
7947func (c *AccountsCreativesListCall) Header() http.Header {
7948	if c.header_ == nil {
7949		c.header_ = make(http.Header)
7950	}
7951	return c.header_
7952}
7953
7954func (c *AccountsCreativesListCall) doRequest(alt string) (*http.Response, error) {
7955	reqHeaders := make(http.Header)
7956	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7957	for k, v := range c.header_ {
7958		reqHeaders[k] = v
7959	}
7960	reqHeaders.Set("User-Agent", c.s.userAgent())
7961	if c.ifNoneMatch_ != "" {
7962		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7963	}
7964	var body io.Reader = nil
7965	c.urlParams_.Set("alt", alt)
7966	c.urlParams_.Set("prettyPrint", "false")
7967	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives")
7968	urls += "?" + c.urlParams_.Encode()
7969	req, err := http.NewRequest("GET", urls, body)
7970	if err != nil {
7971		return nil, err
7972	}
7973	req.Header = reqHeaders
7974	googleapi.Expand(req.URL, map[string]string{
7975		"accountId": c.accountId,
7976	})
7977	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7978}
7979
7980// Do executes the "adexchangebuyer2.accounts.creatives.list" call.
7981// Exactly one of *ListCreativesResponse or error will be non-nil. Any
7982// non-2xx status code is an error. Response headers are in either
7983// *ListCreativesResponse.ServerResponse.Header or (if a response was
7984// returned at all) in error.(*googleapi.Error).Header. Use
7985// googleapi.IsNotModified to check whether the returned error was
7986// because http.StatusNotModified was returned.
7987func (c *AccountsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
7988	gensupport.SetOptions(c.urlParams_, opts...)
7989	res, err := c.doRequest("json")
7990	if res != nil && res.StatusCode == http.StatusNotModified {
7991		if res.Body != nil {
7992			res.Body.Close()
7993		}
7994		return nil, &googleapi.Error{
7995			Code:   res.StatusCode,
7996			Header: res.Header,
7997		}
7998	}
7999	if err != nil {
8000		return nil, err
8001	}
8002	defer googleapi.CloseBody(res)
8003	if err := googleapi.CheckResponse(res); err != nil {
8004		return nil, err
8005	}
8006	ret := &ListCreativesResponse{
8007		ServerResponse: googleapi.ServerResponse{
8008			Header:         res.Header,
8009			HTTPStatusCode: res.StatusCode,
8010		},
8011	}
8012	target := &ret
8013	if err := gensupport.DecodeResponse(target, res); err != nil {
8014		return nil, err
8015	}
8016	return ret, nil
8017	// {
8018	//   "description": "Lists creatives.",
8019	//   "flatPath": "v2beta1/accounts/{accountId}/creatives",
8020	//   "httpMethod": "GET",
8021	//   "id": "adexchangebuyer2.accounts.creatives.list",
8022	//   "parameterOrder": [
8023	//     "accountId"
8024	//   ],
8025	//   "parameters": {
8026	//     "accountId": {
8027	//       "description": "The account to list the creatives from. Specify \"-\" to list all creatives the current user has access to.",
8028	//       "location": "path",
8029	//       "required": true,
8030	//       "type": "string"
8031	//     },
8032	//     "pageSize": {
8033	//       "description": "Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available via another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive.",
8034	//       "format": "int32",
8035	//       "location": "query",
8036	//       "type": "integer"
8037	//     },
8038	//     "pageToken": {
8039	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.next_page_token returned from the previous call to 'ListCreatives' method.",
8040	//       "location": "query",
8041	//       "type": "string"
8042	//     },
8043	//     "query": {
8044	//       "description": "An optional query string to filter creatives. If no filter is specified, all active creatives will be returned. Supported queries are: - accountId=*account_id_string* - creativeId=*creative_id_string* - dealsStatus: {approved, conditionally_approved, disapproved, not_checked} - openAuctionStatus: {approved, conditionally_approved, disapproved, not_checked} - attribute: {a numeric attribute from the list of attributes} - disapprovalReason: {a reason from DisapprovalReason} Example: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason:unacceptable_content) OR attribute:47'",
8045	//       "location": "query",
8046	//       "type": "string"
8047	//     }
8048	//   },
8049	//   "path": "v2beta1/accounts/{accountId}/creatives",
8050	//   "response": {
8051	//     "$ref": "ListCreativesResponse"
8052	//   },
8053	//   "scopes": [
8054	//     "https://www.googleapis.com/auth/adexchange.buyer"
8055	//   ]
8056	// }
8057
8058}
8059
8060// Pages invokes f for each page of results.
8061// A non-nil error returned from f will halt the iteration.
8062// The provided context supersedes any context provided to the Context method.
8063func (c *AccountsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
8064	c.ctx_ = ctx
8065	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8066	for {
8067		x, err := c.Do()
8068		if err != nil {
8069			return err
8070		}
8071		if err := f(x); err != nil {
8072			return err
8073		}
8074		if x.NextPageToken == "" {
8075			return nil
8076		}
8077		c.PageToken(x.NextPageToken)
8078	}
8079}
8080
8081// method id "adexchangebuyer2.accounts.creatives.stopWatching":
8082
8083type AccountsCreativesStopWatchingCall struct {
8084	s                           *Service
8085	accountId                   string
8086	creativeId                  string
8087	stopwatchingcreativerequest *StopWatchingCreativeRequest
8088	urlParams_                  gensupport.URLParams
8089	ctx_                        context.Context
8090	header_                     http.Header
8091}
8092
8093// StopWatching: Stops watching a creative. Will stop push notifications
8094// being sent to the topics when the creative changes status.
8095//
8096// - accountId: The account of the creative to stop notifications for.
8097// - creativeId: The creative ID of the creative to stop notifications
8098//   for. Specify "-" to specify stopping account level notifications.
8099func (r *AccountsCreativesService) StopWatching(accountId string, creativeId string, stopwatchingcreativerequest *StopWatchingCreativeRequest) *AccountsCreativesStopWatchingCall {
8100	c := &AccountsCreativesStopWatchingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8101	c.accountId = accountId
8102	c.creativeId = creativeId
8103	c.stopwatchingcreativerequest = stopwatchingcreativerequest
8104	return c
8105}
8106
8107// Fields allows partial responses to be retrieved. See
8108// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8109// for more information.
8110func (c *AccountsCreativesStopWatchingCall) Fields(s ...googleapi.Field) *AccountsCreativesStopWatchingCall {
8111	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8112	return c
8113}
8114
8115// Context sets the context to be used in this call's Do method. Any
8116// pending HTTP request will be aborted if the provided context is
8117// canceled.
8118func (c *AccountsCreativesStopWatchingCall) Context(ctx context.Context) *AccountsCreativesStopWatchingCall {
8119	c.ctx_ = ctx
8120	return c
8121}
8122
8123// Header returns an http.Header that can be modified by the caller to
8124// add HTTP headers to the request.
8125func (c *AccountsCreativesStopWatchingCall) Header() http.Header {
8126	if c.header_ == nil {
8127		c.header_ = make(http.Header)
8128	}
8129	return c.header_
8130}
8131
8132func (c *AccountsCreativesStopWatchingCall) doRequest(alt string) (*http.Response, error) {
8133	reqHeaders := make(http.Header)
8134	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8135	for k, v := range c.header_ {
8136		reqHeaders[k] = v
8137	}
8138	reqHeaders.Set("User-Agent", c.s.userAgent())
8139	var body io.Reader = nil
8140	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopwatchingcreativerequest)
8141	if err != nil {
8142		return nil, err
8143	}
8144	reqHeaders.Set("Content-Type", "application/json")
8145	c.urlParams_.Set("alt", alt)
8146	c.urlParams_.Set("prettyPrint", "false")
8147	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching")
8148	urls += "?" + c.urlParams_.Encode()
8149	req, err := http.NewRequest("POST", urls, body)
8150	if err != nil {
8151		return nil, err
8152	}
8153	req.Header = reqHeaders
8154	googleapi.Expand(req.URL, map[string]string{
8155		"accountId":  c.accountId,
8156		"creativeId": c.creativeId,
8157	})
8158	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8159}
8160
8161// Do executes the "adexchangebuyer2.accounts.creatives.stopWatching" call.
8162// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8163// code is an error. Response headers are in either
8164// *Empty.ServerResponse.Header or (if a response was returned at all)
8165// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8166// check whether the returned error was because http.StatusNotModified
8167// was returned.
8168func (c *AccountsCreativesStopWatchingCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8169	gensupport.SetOptions(c.urlParams_, opts...)
8170	res, err := c.doRequest("json")
8171	if res != nil && res.StatusCode == http.StatusNotModified {
8172		if res.Body != nil {
8173			res.Body.Close()
8174		}
8175		return nil, &googleapi.Error{
8176			Code:   res.StatusCode,
8177			Header: res.Header,
8178		}
8179	}
8180	if err != nil {
8181		return nil, err
8182	}
8183	defer googleapi.CloseBody(res)
8184	if err := googleapi.CheckResponse(res); err != nil {
8185		return nil, err
8186	}
8187	ret := &Empty{
8188		ServerResponse: googleapi.ServerResponse{
8189			Header:         res.Header,
8190			HTTPStatusCode: res.StatusCode,
8191		},
8192	}
8193	target := &ret
8194	if err := gensupport.DecodeResponse(target, res); err != nil {
8195		return nil, err
8196	}
8197	return ret, nil
8198	// {
8199	//   "description": "Stops watching a creative. Will stop push notifications being sent to the topics when the creative changes status.",
8200	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching",
8201	//   "httpMethod": "POST",
8202	//   "id": "adexchangebuyer2.accounts.creatives.stopWatching",
8203	//   "parameterOrder": [
8204	//     "accountId",
8205	//     "creativeId"
8206	//   ],
8207	//   "parameters": {
8208	//     "accountId": {
8209	//       "description": "The account of the creative to stop notifications for.",
8210	//       "location": "path",
8211	//       "required": true,
8212	//       "type": "string"
8213	//     },
8214	//     "creativeId": {
8215	//       "description": "The creative ID of the creative to stop notifications for. Specify \"-\" to specify stopping account level notifications.",
8216	//       "location": "path",
8217	//       "required": true,
8218	//       "type": "string"
8219	//     }
8220	//   },
8221	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching",
8222	//   "request": {
8223	//     "$ref": "StopWatchingCreativeRequest"
8224	//   },
8225	//   "response": {
8226	//     "$ref": "Empty"
8227	//   },
8228	//   "scopes": [
8229	//     "https://www.googleapis.com/auth/adexchange.buyer"
8230	//   ]
8231	// }
8232
8233}
8234
8235// method id "adexchangebuyer2.accounts.creatives.update":
8236
8237type AccountsCreativesUpdateCall struct {
8238	s          *Service
8239	accountId  string
8240	creativeId string
8241	creative   *Creative
8242	urlParams_ gensupport.URLParams
8243	ctx_       context.Context
8244	header_    http.Header
8245}
8246
8247// Update: Updates a creative.
8248//
8249// - accountId: The account that this creative belongs to. Can be used
8250//   to filter the response of the creatives.list method.
8251// - creativeId: The buyer-defined creative ID of this creative. Can be
8252//   used to filter the response of the creatives.list method.
8253func (r *AccountsCreativesService) Update(accountId string, creativeId string, creative *Creative) *AccountsCreativesUpdateCall {
8254	c := &AccountsCreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8255	c.accountId = accountId
8256	c.creativeId = creativeId
8257	c.creative = creative
8258	return c
8259}
8260
8261// Fields allows partial responses to be retrieved. See
8262// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8263// for more information.
8264func (c *AccountsCreativesUpdateCall) Fields(s ...googleapi.Field) *AccountsCreativesUpdateCall {
8265	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8266	return c
8267}
8268
8269// Context sets the context to be used in this call's Do method. Any
8270// pending HTTP request will be aborted if the provided context is
8271// canceled.
8272func (c *AccountsCreativesUpdateCall) Context(ctx context.Context) *AccountsCreativesUpdateCall {
8273	c.ctx_ = ctx
8274	return c
8275}
8276
8277// Header returns an http.Header that can be modified by the caller to
8278// add HTTP headers to the request.
8279func (c *AccountsCreativesUpdateCall) Header() http.Header {
8280	if c.header_ == nil {
8281		c.header_ = make(http.Header)
8282	}
8283	return c.header_
8284}
8285
8286func (c *AccountsCreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
8287	reqHeaders := make(http.Header)
8288	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8289	for k, v := range c.header_ {
8290		reqHeaders[k] = v
8291	}
8292	reqHeaders.Set("User-Agent", c.s.userAgent())
8293	var body io.Reader = nil
8294	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
8295	if err != nil {
8296		return nil, err
8297	}
8298	reqHeaders.Set("Content-Type", "application/json")
8299	c.urlParams_.Set("alt", alt)
8300	c.urlParams_.Set("prettyPrint", "false")
8301	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}")
8302	urls += "?" + c.urlParams_.Encode()
8303	req, err := http.NewRequest("PUT", urls, body)
8304	if err != nil {
8305		return nil, err
8306	}
8307	req.Header = reqHeaders
8308	googleapi.Expand(req.URL, map[string]string{
8309		"accountId":  c.accountId,
8310		"creativeId": c.creativeId,
8311	})
8312	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8313}
8314
8315// Do executes the "adexchangebuyer2.accounts.creatives.update" call.
8316// Exactly one of *Creative or error will be non-nil. Any non-2xx status
8317// code is an error. Response headers are in either
8318// *Creative.ServerResponse.Header or (if a response was returned at
8319// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8320// to check whether the returned error was because
8321// http.StatusNotModified was returned.
8322func (c *AccountsCreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
8323	gensupport.SetOptions(c.urlParams_, opts...)
8324	res, err := c.doRequest("json")
8325	if res != nil && res.StatusCode == http.StatusNotModified {
8326		if res.Body != nil {
8327			res.Body.Close()
8328		}
8329		return nil, &googleapi.Error{
8330			Code:   res.StatusCode,
8331			Header: res.Header,
8332		}
8333	}
8334	if err != nil {
8335		return nil, err
8336	}
8337	defer googleapi.CloseBody(res)
8338	if err := googleapi.CheckResponse(res); err != nil {
8339		return nil, err
8340	}
8341	ret := &Creative{
8342		ServerResponse: googleapi.ServerResponse{
8343			Header:         res.Header,
8344			HTTPStatusCode: res.StatusCode,
8345		},
8346	}
8347	target := &ret
8348	if err := gensupport.DecodeResponse(target, res); err != nil {
8349		return nil, err
8350	}
8351	return ret, nil
8352	// {
8353	//   "description": "Updates a creative.",
8354	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
8355	//   "httpMethod": "PUT",
8356	//   "id": "adexchangebuyer2.accounts.creatives.update",
8357	//   "parameterOrder": [
8358	//     "accountId",
8359	//     "creativeId"
8360	//   ],
8361	//   "parameters": {
8362	//     "accountId": {
8363	//       "description": "The account that this creative belongs to. Can be used to filter the response of the creatives.list method.",
8364	//       "location": "path",
8365	//       "required": true,
8366	//       "type": "string"
8367	//     },
8368	//     "creativeId": {
8369	//       "description": "The buyer-defined creative ID of this creative. Can be used to filter the response of the creatives.list method.",
8370	//       "location": "path",
8371	//       "required": true,
8372	//       "type": "string"
8373	//     }
8374	//   },
8375	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
8376	//   "request": {
8377	//     "$ref": "Creative"
8378	//   },
8379	//   "response": {
8380	//     "$ref": "Creative"
8381	//   },
8382	//   "scopes": [
8383	//     "https://www.googleapis.com/auth/adexchange.buyer"
8384	//   ]
8385	// }
8386
8387}
8388
8389// method id "adexchangebuyer2.accounts.creatives.watch":
8390
8391type AccountsCreativesWatchCall struct {
8392	s                    *Service
8393	accountId            string
8394	creativeId           string
8395	watchcreativerequest *WatchCreativeRequest
8396	urlParams_           gensupport.URLParams
8397	ctx_                 context.Context
8398	header_              http.Header
8399}
8400
8401// Watch: Watches a creative. Will result in push notifications being
8402// sent to the topic when the creative changes status.
8403//
8404// - accountId: The account of the creative to watch.
8405// - creativeId: The creative ID to watch for status changes. Specify
8406//   "-" to watch all creatives under the above account. If both
8407//   creative-level and account-level notifications are sent, only a
8408//   single notification will be sent to the creative-level notification
8409//   topic.
8410func (r *AccountsCreativesService) Watch(accountId string, creativeId string, watchcreativerequest *WatchCreativeRequest) *AccountsCreativesWatchCall {
8411	c := &AccountsCreativesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8412	c.accountId = accountId
8413	c.creativeId = creativeId
8414	c.watchcreativerequest = watchcreativerequest
8415	return c
8416}
8417
8418// Fields allows partial responses to be retrieved. See
8419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8420// for more information.
8421func (c *AccountsCreativesWatchCall) Fields(s ...googleapi.Field) *AccountsCreativesWatchCall {
8422	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8423	return c
8424}
8425
8426// Context sets the context to be used in this call's Do method. Any
8427// pending HTTP request will be aborted if the provided context is
8428// canceled.
8429func (c *AccountsCreativesWatchCall) Context(ctx context.Context) *AccountsCreativesWatchCall {
8430	c.ctx_ = ctx
8431	return c
8432}
8433
8434// Header returns an http.Header that can be modified by the caller to
8435// add HTTP headers to the request.
8436func (c *AccountsCreativesWatchCall) Header() http.Header {
8437	if c.header_ == nil {
8438		c.header_ = make(http.Header)
8439	}
8440	return c.header_
8441}
8442
8443func (c *AccountsCreativesWatchCall) doRequest(alt string) (*http.Response, error) {
8444	reqHeaders := make(http.Header)
8445	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8446	for k, v := range c.header_ {
8447		reqHeaders[k] = v
8448	}
8449	reqHeaders.Set("User-Agent", c.s.userAgent())
8450	var body io.Reader = nil
8451	body, err := googleapi.WithoutDataWrapper.JSONReader(c.watchcreativerequest)
8452	if err != nil {
8453		return nil, err
8454	}
8455	reqHeaders.Set("Content-Type", "application/json")
8456	c.urlParams_.Set("alt", alt)
8457	c.urlParams_.Set("prettyPrint", "false")
8458	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch")
8459	urls += "?" + c.urlParams_.Encode()
8460	req, err := http.NewRequest("POST", urls, body)
8461	if err != nil {
8462		return nil, err
8463	}
8464	req.Header = reqHeaders
8465	googleapi.Expand(req.URL, map[string]string{
8466		"accountId":  c.accountId,
8467		"creativeId": c.creativeId,
8468	})
8469	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8470}
8471
8472// Do executes the "adexchangebuyer2.accounts.creatives.watch" call.
8473// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8474// code is an error. Response headers are in either
8475// *Empty.ServerResponse.Header or (if a response was returned at all)
8476// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8477// check whether the returned error was because http.StatusNotModified
8478// was returned.
8479func (c *AccountsCreativesWatchCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8480	gensupport.SetOptions(c.urlParams_, opts...)
8481	res, err := c.doRequest("json")
8482	if res != nil && res.StatusCode == http.StatusNotModified {
8483		if res.Body != nil {
8484			res.Body.Close()
8485		}
8486		return nil, &googleapi.Error{
8487			Code:   res.StatusCode,
8488			Header: res.Header,
8489		}
8490	}
8491	if err != nil {
8492		return nil, err
8493	}
8494	defer googleapi.CloseBody(res)
8495	if err := googleapi.CheckResponse(res); err != nil {
8496		return nil, err
8497	}
8498	ret := &Empty{
8499		ServerResponse: googleapi.ServerResponse{
8500			Header:         res.Header,
8501			HTTPStatusCode: res.StatusCode,
8502		},
8503	}
8504	target := &ret
8505	if err := gensupport.DecodeResponse(target, res); err != nil {
8506		return nil, err
8507	}
8508	return ret, nil
8509	// {
8510	//   "description": "Watches a creative. Will result in push notifications being sent to the topic when the creative changes status.",
8511	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch",
8512	//   "httpMethod": "POST",
8513	//   "id": "adexchangebuyer2.accounts.creatives.watch",
8514	//   "parameterOrder": [
8515	//     "accountId",
8516	//     "creativeId"
8517	//   ],
8518	//   "parameters": {
8519	//     "accountId": {
8520	//       "description": "The account of the creative to watch.",
8521	//       "location": "path",
8522	//       "required": true,
8523	//       "type": "string"
8524	//     },
8525	//     "creativeId": {
8526	//       "description": "The creative ID to watch for status changes. Specify \"-\" to watch all creatives under the above account. If both creative-level and account-level notifications are sent, only a single notification will be sent to the creative-level notification topic.",
8527	//       "location": "path",
8528	//       "required": true,
8529	//       "type": "string"
8530	//     }
8531	//   },
8532	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch",
8533	//   "request": {
8534	//     "$ref": "WatchCreativeRequest"
8535	//   },
8536	//   "response": {
8537	//     "$ref": "Empty"
8538	//   },
8539	//   "scopes": [
8540	//     "https://www.googleapis.com/auth/adexchange.buyer"
8541	//   ]
8542	// }
8543
8544}
8545
8546// method id "adexchangebuyer2.accounts.creatives.dealAssociations.add":
8547
8548type AccountsCreativesDealAssociationsAddCall struct {
8549	s                         *Service
8550	accountId                 string
8551	creativeId                string
8552	adddealassociationrequest *AddDealAssociationRequest
8553	urlParams_                gensupport.URLParams
8554	ctx_                      context.Context
8555	header_                   http.Header
8556}
8557
8558// Add: Associate an existing deal with a creative.
8559//
8560// - accountId: The account the creative belongs to.
8561// - creativeId: The ID of the creative associated with the deal.
8562func (r *AccountsCreativesDealAssociationsService) Add(accountId string, creativeId string, adddealassociationrequest *AddDealAssociationRequest) *AccountsCreativesDealAssociationsAddCall {
8563	c := &AccountsCreativesDealAssociationsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8564	c.accountId = accountId
8565	c.creativeId = creativeId
8566	c.adddealassociationrequest = adddealassociationrequest
8567	return c
8568}
8569
8570// Fields allows partial responses to be retrieved. See
8571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8572// for more information.
8573func (c *AccountsCreativesDealAssociationsAddCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsAddCall {
8574	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8575	return c
8576}
8577
8578// Context sets the context to be used in this call's Do method. Any
8579// pending HTTP request will be aborted if the provided context is
8580// canceled.
8581func (c *AccountsCreativesDealAssociationsAddCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsAddCall {
8582	c.ctx_ = ctx
8583	return c
8584}
8585
8586// Header returns an http.Header that can be modified by the caller to
8587// add HTTP headers to the request.
8588func (c *AccountsCreativesDealAssociationsAddCall) Header() http.Header {
8589	if c.header_ == nil {
8590		c.header_ = make(http.Header)
8591	}
8592	return c.header_
8593}
8594
8595func (c *AccountsCreativesDealAssociationsAddCall) doRequest(alt string) (*http.Response, error) {
8596	reqHeaders := make(http.Header)
8597	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8598	for k, v := range c.header_ {
8599		reqHeaders[k] = v
8600	}
8601	reqHeaders.Set("User-Agent", c.s.userAgent())
8602	var body io.Reader = nil
8603	body, err := googleapi.WithoutDataWrapper.JSONReader(c.adddealassociationrequest)
8604	if err != nil {
8605		return nil, err
8606	}
8607	reqHeaders.Set("Content-Type", "application/json")
8608	c.urlParams_.Set("alt", alt)
8609	c.urlParams_.Set("prettyPrint", "false")
8610	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add")
8611	urls += "?" + c.urlParams_.Encode()
8612	req, err := http.NewRequest("POST", urls, body)
8613	if err != nil {
8614		return nil, err
8615	}
8616	req.Header = reqHeaders
8617	googleapi.Expand(req.URL, map[string]string{
8618		"accountId":  c.accountId,
8619		"creativeId": c.creativeId,
8620	})
8621	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8622}
8623
8624// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.add" call.
8625// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8626// code is an error. Response headers are in either
8627// *Empty.ServerResponse.Header or (if a response was returned at all)
8628// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8629// check whether the returned error was because http.StatusNotModified
8630// was returned.
8631func (c *AccountsCreativesDealAssociationsAddCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8632	gensupport.SetOptions(c.urlParams_, opts...)
8633	res, err := c.doRequest("json")
8634	if res != nil && res.StatusCode == http.StatusNotModified {
8635		if res.Body != nil {
8636			res.Body.Close()
8637		}
8638		return nil, &googleapi.Error{
8639			Code:   res.StatusCode,
8640			Header: res.Header,
8641		}
8642	}
8643	if err != nil {
8644		return nil, err
8645	}
8646	defer googleapi.CloseBody(res)
8647	if err := googleapi.CheckResponse(res); err != nil {
8648		return nil, err
8649	}
8650	ret := &Empty{
8651		ServerResponse: googleapi.ServerResponse{
8652			Header:         res.Header,
8653			HTTPStatusCode: res.StatusCode,
8654		},
8655	}
8656	target := &ret
8657	if err := gensupport.DecodeResponse(target, res); err != nil {
8658		return nil, err
8659	}
8660	return ret, nil
8661	// {
8662	//   "description": "Associate an existing deal with a creative.",
8663	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add",
8664	//   "httpMethod": "POST",
8665	//   "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add",
8666	//   "parameterOrder": [
8667	//     "accountId",
8668	//     "creativeId"
8669	//   ],
8670	//   "parameters": {
8671	//     "accountId": {
8672	//       "description": "The account the creative belongs to.",
8673	//       "location": "path",
8674	//       "required": true,
8675	//       "type": "string"
8676	//     },
8677	//     "creativeId": {
8678	//       "description": "The ID of the creative associated with the deal.",
8679	//       "location": "path",
8680	//       "required": true,
8681	//       "type": "string"
8682	//     }
8683	//   },
8684	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add",
8685	//   "request": {
8686	//     "$ref": "AddDealAssociationRequest"
8687	//   },
8688	//   "response": {
8689	//     "$ref": "Empty"
8690	//   },
8691	//   "scopes": [
8692	//     "https://www.googleapis.com/auth/adexchange.buyer"
8693	//   ]
8694	// }
8695
8696}
8697
8698// method id "adexchangebuyer2.accounts.creatives.dealAssociations.list":
8699
8700type AccountsCreativesDealAssociationsListCall struct {
8701	s            *Service
8702	accountId    string
8703	creativeId   string
8704	urlParams_   gensupport.URLParams
8705	ifNoneMatch_ string
8706	ctx_         context.Context
8707	header_      http.Header
8708}
8709
8710// List: List all creative-deal associations.
8711//
8712// - accountId: The account to list the associations from. Specify "-"
8713//   to list all creatives the current user has access to.
8714// - creativeId: The creative ID to list the associations from. Specify
8715//   "-" to list all creatives under the above account.
8716func (r *AccountsCreativesDealAssociationsService) List(accountId string, creativeId string) *AccountsCreativesDealAssociationsListCall {
8717	c := &AccountsCreativesDealAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8718	c.accountId = accountId
8719	c.creativeId = creativeId
8720	return c
8721}
8722
8723// PageSize sets the optional parameter "pageSize": Requested page size.
8724// Server may return fewer associations than requested. If unspecified,
8725// server will pick an appropriate default.
8726func (c *AccountsCreativesDealAssociationsListCall) PageSize(pageSize int64) *AccountsCreativesDealAssociationsListCall {
8727	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8728	return c
8729}
8730
8731// PageToken sets the optional parameter "pageToken": A token
8732// identifying a page of results the server should return. Typically,
8733// this is the value of ListDealAssociationsResponse.next_page_token
8734// returned from the previous call to 'ListDealAssociations' method.
8735func (c *AccountsCreativesDealAssociationsListCall) PageToken(pageToken string) *AccountsCreativesDealAssociationsListCall {
8736	c.urlParams_.Set("pageToken", pageToken)
8737	return c
8738}
8739
8740// Query sets the optional parameter "query": An optional query string
8741// to filter deal associations. If no filter is specified, all
8742// associations will be returned. Supported queries are: -
8743// accountId=*account_id_string* - creativeId=*creative_id_string* -
8744// dealsId=*deals_id_string* - dealsStatus:{approved,
8745// conditionally_approved, disapproved, not_checked} -
8746// openAuctionStatus:{approved, conditionally_approved, disapproved,
8747// not_checked} Example: 'dealsId=12345 AND dealsStatus:disapproved'
8748func (c *AccountsCreativesDealAssociationsListCall) Query(query string) *AccountsCreativesDealAssociationsListCall {
8749	c.urlParams_.Set("query", query)
8750	return c
8751}
8752
8753// Fields allows partial responses to be retrieved. See
8754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8755// for more information.
8756func (c *AccountsCreativesDealAssociationsListCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsListCall {
8757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8758	return c
8759}
8760
8761// IfNoneMatch sets the optional parameter which makes the operation
8762// fail if the object's ETag matches the given value. This is useful for
8763// getting updates only after the object has changed since the last
8764// request. Use googleapi.IsNotModified to check whether the response
8765// error from Do is the result of In-None-Match.
8766func (c *AccountsCreativesDealAssociationsListCall) IfNoneMatch(entityTag string) *AccountsCreativesDealAssociationsListCall {
8767	c.ifNoneMatch_ = entityTag
8768	return c
8769}
8770
8771// Context sets the context to be used in this call's Do method. Any
8772// pending HTTP request will be aborted if the provided context is
8773// canceled.
8774func (c *AccountsCreativesDealAssociationsListCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsListCall {
8775	c.ctx_ = ctx
8776	return c
8777}
8778
8779// Header returns an http.Header that can be modified by the caller to
8780// add HTTP headers to the request.
8781func (c *AccountsCreativesDealAssociationsListCall) Header() http.Header {
8782	if c.header_ == nil {
8783		c.header_ = make(http.Header)
8784	}
8785	return c.header_
8786}
8787
8788func (c *AccountsCreativesDealAssociationsListCall) doRequest(alt string) (*http.Response, error) {
8789	reqHeaders := make(http.Header)
8790	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8791	for k, v := range c.header_ {
8792		reqHeaders[k] = v
8793	}
8794	reqHeaders.Set("User-Agent", c.s.userAgent())
8795	if c.ifNoneMatch_ != "" {
8796		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8797	}
8798	var body io.Reader = nil
8799	c.urlParams_.Set("alt", alt)
8800	c.urlParams_.Set("prettyPrint", "false")
8801	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations")
8802	urls += "?" + c.urlParams_.Encode()
8803	req, err := http.NewRequest("GET", urls, body)
8804	if err != nil {
8805		return nil, err
8806	}
8807	req.Header = reqHeaders
8808	googleapi.Expand(req.URL, map[string]string{
8809		"accountId":  c.accountId,
8810		"creativeId": c.creativeId,
8811	})
8812	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8813}
8814
8815// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.list" call.
8816// Exactly one of *ListDealAssociationsResponse or error will be
8817// non-nil. Any non-2xx status code is an error. Response headers are in
8818// either *ListDealAssociationsResponse.ServerResponse.Header or (if a
8819// response was returned at all) in error.(*googleapi.Error).Header. Use
8820// googleapi.IsNotModified to check whether the returned error was
8821// because http.StatusNotModified was returned.
8822func (c *AccountsCreativesDealAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListDealAssociationsResponse, error) {
8823	gensupport.SetOptions(c.urlParams_, opts...)
8824	res, err := c.doRequest("json")
8825	if res != nil && res.StatusCode == http.StatusNotModified {
8826		if res.Body != nil {
8827			res.Body.Close()
8828		}
8829		return nil, &googleapi.Error{
8830			Code:   res.StatusCode,
8831			Header: res.Header,
8832		}
8833	}
8834	if err != nil {
8835		return nil, err
8836	}
8837	defer googleapi.CloseBody(res)
8838	if err := googleapi.CheckResponse(res); err != nil {
8839		return nil, err
8840	}
8841	ret := &ListDealAssociationsResponse{
8842		ServerResponse: googleapi.ServerResponse{
8843			Header:         res.Header,
8844			HTTPStatusCode: res.StatusCode,
8845		},
8846	}
8847	target := &ret
8848	if err := gensupport.DecodeResponse(target, res); err != nil {
8849		return nil, err
8850	}
8851	return ret, nil
8852	// {
8853	//   "description": "List all creative-deal associations.",
8854	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations",
8855	//   "httpMethod": "GET",
8856	//   "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list",
8857	//   "parameterOrder": [
8858	//     "accountId",
8859	//     "creativeId"
8860	//   ],
8861	//   "parameters": {
8862	//     "accountId": {
8863	//       "description": "The account to list the associations from. Specify \"-\" to list all creatives the current user has access to.",
8864	//       "location": "path",
8865	//       "required": true,
8866	//       "type": "string"
8867	//     },
8868	//     "creativeId": {
8869	//       "description": "The creative ID to list the associations from. Specify \"-\" to list all creatives under the above account.",
8870	//       "location": "path",
8871	//       "required": true,
8872	//       "type": "string"
8873	//     },
8874	//     "pageSize": {
8875	//       "description": "Requested page size. Server may return fewer associations than requested. If unspecified, server will pick an appropriate default.",
8876	//       "format": "int32",
8877	//       "location": "query",
8878	//       "type": "integer"
8879	//     },
8880	//     "pageToken": {
8881	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListDealAssociationsResponse.next_page_token returned from the previous call to 'ListDealAssociations' method.",
8882	//       "location": "query",
8883	//       "type": "string"
8884	//     },
8885	//     "query": {
8886	//       "description": "An optional query string to filter deal associations. If no filter is specified, all associations will be returned. Supported queries are: - accountId=*account_id_string* - creativeId=*creative_id_string* - dealsId=*deals_id_string* - dealsStatus:{approved, conditionally_approved, disapproved, not_checked} - openAuctionStatus:{approved, conditionally_approved, disapproved, not_checked} Example: 'dealsId=12345 AND dealsStatus:disapproved'",
8887	//       "location": "query",
8888	//       "type": "string"
8889	//     }
8890	//   },
8891	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations",
8892	//   "response": {
8893	//     "$ref": "ListDealAssociationsResponse"
8894	//   },
8895	//   "scopes": [
8896	//     "https://www.googleapis.com/auth/adexchange.buyer"
8897	//   ]
8898	// }
8899
8900}
8901
8902// Pages invokes f for each page of results.
8903// A non-nil error returned from f will halt the iteration.
8904// The provided context supersedes any context provided to the Context method.
8905func (c *AccountsCreativesDealAssociationsListCall) Pages(ctx context.Context, f func(*ListDealAssociationsResponse) error) error {
8906	c.ctx_ = ctx
8907	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8908	for {
8909		x, err := c.Do()
8910		if err != nil {
8911			return err
8912		}
8913		if err := f(x); err != nil {
8914			return err
8915		}
8916		if x.NextPageToken == "" {
8917			return nil
8918		}
8919		c.PageToken(x.NextPageToken)
8920	}
8921}
8922
8923// method id "adexchangebuyer2.accounts.creatives.dealAssociations.remove":
8924
8925type AccountsCreativesDealAssociationsRemoveCall struct {
8926	s                            *Service
8927	accountId                    string
8928	creativeId                   string
8929	removedealassociationrequest *RemoveDealAssociationRequest
8930	urlParams_                   gensupport.URLParams
8931	ctx_                         context.Context
8932	header_                      http.Header
8933}
8934
8935// Remove: Remove the association between a deal and a creative.
8936//
8937// - accountId: The account the creative belongs to.
8938// - creativeId: The ID of the creative associated with the deal.
8939func (r *AccountsCreativesDealAssociationsService) Remove(accountId string, creativeId string, removedealassociationrequest *RemoveDealAssociationRequest) *AccountsCreativesDealAssociationsRemoveCall {
8940	c := &AccountsCreativesDealAssociationsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8941	c.accountId = accountId
8942	c.creativeId = creativeId
8943	c.removedealassociationrequest = removedealassociationrequest
8944	return c
8945}
8946
8947// Fields allows partial responses to be retrieved. See
8948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8949// for more information.
8950func (c *AccountsCreativesDealAssociationsRemoveCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsRemoveCall {
8951	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8952	return c
8953}
8954
8955// Context sets the context to be used in this call's Do method. Any
8956// pending HTTP request will be aborted if the provided context is
8957// canceled.
8958func (c *AccountsCreativesDealAssociationsRemoveCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsRemoveCall {
8959	c.ctx_ = ctx
8960	return c
8961}
8962
8963// Header returns an http.Header that can be modified by the caller to
8964// add HTTP headers to the request.
8965func (c *AccountsCreativesDealAssociationsRemoveCall) Header() http.Header {
8966	if c.header_ == nil {
8967		c.header_ = make(http.Header)
8968	}
8969	return c.header_
8970}
8971
8972func (c *AccountsCreativesDealAssociationsRemoveCall) doRequest(alt string) (*http.Response, error) {
8973	reqHeaders := make(http.Header)
8974	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8975	for k, v := range c.header_ {
8976		reqHeaders[k] = v
8977	}
8978	reqHeaders.Set("User-Agent", c.s.userAgent())
8979	var body io.Reader = nil
8980	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removedealassociationrequest)
8981	if err != nil {
8982		return nil, err
8983	}
8984	reqHeaders.Set("Content-Type", "application/json")
8985	c.urlParams_.Set("alt", alt)
8986	c.urlParams_.Set("prettyPrint", "false")
8987	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove")
8988	urls += "?" + c.urlParams_.Encode()
8989	req, err := http.NewRequest("POST", urls, body)
8990	if err != nil {
8991		return nil, err
8992	}
8993	req.Header = reqHeaders
8994	googleapi.Expand(req.URL, map[string]string{
8995		"accountId":  c.accountId,
8996		"creativeId": c.creativeId,
8997	})
8998	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8999}
9000
9001// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.remove" call.
9002// Exactly one of *Empty or error will be non-nil. Any non-2xx status
9003// code is an error. Response headers are in either
9004// *Empty.ServerResponse.Header or (if a response was returned at all)
9005// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9006// check whether the returned error was because http.StatusNotModified
9007// was returned.
9008func (c *AccountsCreativesDealAssociationsRemoveCall) Do(opts ...googleapi.CallOption) (*Empty, 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, &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, err
9026	}
9027	ret := &Empty{
9028		ServerResponse: googleapi.ServerResponse{
9029			Header:         res.Header,
9030			HTTPStatusCode: res.StatusCode,
9031		},
9032	}
9033	target := &ret
9034	if err := gensupport.DecodeResponse(target, res); err != nil {
9035		return nil, err
9036	}
9037	return ret, nil
9038	// {
9039	//   "description": "Remove the association between a deal and a creative.",
9040	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove",
9041	//   "httpMethod": "POST",
9042	//   "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove",
9043	//   "parameterOrder": [
9044	//     "accountId",
9045	//     "creativeId"
9046	//   ],
9047	//   "parameters": {
9048	//     "accountId": {
9049	//       "description": "The account the creative belongs to.",
9050	//       "location": "path",
9051	//       "required": true,
9052	//       "type": "string"
9053	//     },
9054	//     "creativeId": {
9055	//       "description": "The ID of the creative associated with the deal.",
9056	//       "location": "path",
9057	//       "required": true,
9058	//       "type": "string"
9059	//     }
9060	//   },
9061	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove",
9062	//   "request": {
9063	//     "$ref": "RemoveDealAssociationRequest"
9064	//   },
9065	//   "response": {
9066	//     "$ref": "Empty"
9067	//   },
9068	//   "scopes": [
9069	//     "https://www.googleapis.com/auth/adexchange.buyer"
9070	//   ]
9071	// }
9072
9073}
9074
9075// method id "adexchangebuyer2.accounts.finalizedProposals.list":
9076
9077type AccountsFinalizedProposalsListCall struct {
9078	s            *Service
9079	accountId    string
9080	urlParams_   gensupport.URLParams
9081	ifNoneMatch_ string
9082	ctx_         context.Context
9083	header_      http.Header
9084}
9085
9086// List: List finalized proposals, regardless if a proposal is being
9087// renegotiated. A filter expression (PQL query) may be specified to
9088// filter the results. The notes will not be returned.
9089//
9090// - accountId: Account ID of the buyer.
9091func (r *AccountsFinalizedProposalsService) List(accountId string) *AccountsFinalizedProposalsListCall {
9092	c := &AccountsFinalizedProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9093	c.accountId = accountId
9094	return c
9095}
9096
9097// Filter sets the optional parameter "filter": An optional PQL filter
9098// query used to query for proposals. Nested repeated fields, such as
9099// proposal.deals.targetingCriterion, cannot be filtered.
9100func (c *AccountsFinalizedProposalsListCall) Filter(filter string) *AccountsFinalizedProposalsListCall {
9101	c.urlParams_.Set("filter", filter)
9102	return c
9103}
9104
9105// FilterSyntax sets the optional parameter "filterSyntax": Syntax the
9106// filter is written in. Current implementation defaults to PQL but in
9107// the future it will be LIST_FILTER.
9108//
9109// Possible values:
9110//   "FILTER_SYNTAX_UNSPECIFIED" - A placeholder for an undefined filter
9111// syntax.
9112//   "PQL" - PQL query syntax. Visit
9113// https://developers.google.com/ad-manager/api/pqlreference for PQL
9114// documentation and examples.
9115//   "LIST_FILTER" - API list filtering syntax. Read about syntax and
9116// usage at
9117// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters.
9118func (c *AccountsFinalizedProposalsListCall) FilterSyntax(filterSyntax string) *AccountsFinalizedProposalsListCall {
9119	c.urlParams_.Set("filterSyntax", filterSyntax)
9120	return c
9121}
9122
9123// PageSize sets the optional parameter "pageSize": Requested page size.
9124// The server may return fewer results than requested. If unspecified,
9125// the server will pick an appropriate default.
9126func (c *AccountsFinalizedProposalsListCall) PageSize(pageSize int64) *AccountsFinalizedProposalsListCall {
9127	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9128	return c
9129}
9130
9131// PageToken sets the optional parameter "pageToken": The page token as
9132// returned from ListProposalsResponse.
9133func (c *AccountsFinalizedProposalsListCall) PageToken(pageToken string) *AccountsFinalizedProposalsListCall {
9134	c.urlParams_.Set("pageToken", pageToken)
9135	return c
9136}
9137
9138// Fields allows partial responses to be retrieved. See
9139// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9140// for more information.
9141func (c *AccountsFinalizedProposalsListCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsListCall {
9142	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9143	return c
9144}
9145
9146// IfNoneMatch sets the optional parameter which makes the operation
9147// fail if the object's ETag matches the given value. This is useful for
9148// getting updates only after the object has changed since the last
9149// request. Use googleapi.IsNotModified to check whether the response
9150// error from Do is the result of In-None-Match.
9151func (c *AccountsFinalizedProposalsListCall) IfNoneMatch(entityTag string) *AccountsFinalizedProposalsListCall {
9152	c.ifNoneMatch_ = entityTag
9153	return c
9154}
9155
9156// Context sets the context to be used in this call's Do method. Any
9157// pending HTTP request will be aborted if the provided context is
9158// canceled.
9159func (c *AccountsFinalizedProposalsListCall) Context(ctx context.Context) *AccountsFinalizedProposalsListCall {
9160	c.ctx_ = ctx
9161	return c
9162}
9163
9164// Header returns an http.Header that can be modified by the caller to
9165// add HTTP headers to the request.
9166func (c *AccountsFinalizedProposalsListCall) Header() http.Header {
9167	if c.header_ == nil {
9168		c.header_ = make(http.Header)
9169	}
9170	return c.header_
9171}
9172
9173func (c *AccountsFinalizedProposalsListCall) doRequest(alt string) (*http.Response, error) {
9174	reqHeaders := make(http.Header)
9175	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9176	for k, v := range c.header_ {
9177		reqHeaders[k] = v
9178	}
9179	reqHeaders.Set("User-Agent", c.s.userAgent())
9180	if c.ifNoneMatch_ != "" {
9181		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9182	}
9183	var body io.Reader = nil
9184	c.urlParams_.Set("alt", alt)
9185	c.urlParams_.Set("prettyPrint", "false")
9186	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals")
9187	urls += "?" + c.urlParams_.Encode()
9188	req, err := http.NewRequest("GET", urls, body)
9189	if err != nil {
9190		return nil, err
9191	}
9192	req.Header = reqHeaders
9193	googleapi.Expand(req.URL, map[string]string{
9194		"accountId": c.accountId,
9195	})
9196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9197}
9198
9199// Do executes the "adexchangebuyer2.accounts.finalizedProposals.list" call.
9200// Exactly one of *ListProposalsResponse or error will be non-nil. Any
9201// non-2xx status code is an error. Response headers are in either
9202// *ListProposalsResponse.ServerResponse.Header or (if a response was
9203// returned at all) in error.(*googleapi.Error).Header. Use
9204// googleapi.IsNotModified to check whether the returned error was
9205// because http.StatusNotModified was returned.
9206func (c *AccountsFinalizedProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) {
9207	gensupport.SetOptions(c.urlParams_, opts...)
9208	res, err := c.doRequest("json")
9209	if res != nil && res.StatusCode == http.StatusNotModified {
9210		if res.Body != nil {
9211			res.Body.Close()
9212		}
9213		return nil, &googleapi.Error{
9214			Code:   res.StatusCode,
9215			Header: res.Header,
9216		}
9217	}
9218	if err != nil {
9219		return nil, err
9220	}
9221	defer googleapi.CloseBody(res)
9222	if err := googleapi.CheckResponse(res); err != nil {
9223		return nil, err
9224	}
9225	ret := &ListProposalsResponse{
9226		ServerResponse: googleapi.ServerResponse{
9227			Header:         res.Header,
9228			HTTPStatusCode: res.StatusCode,
9229		},
9230	}
9231	target := &ret
9232	if err := gensupport.DecodeResponse(target, res); err != nil {
9233		return nil, err
9234	}
9235	return ret, nil
9236	// {
9237	//   "description": "List finalized proposals, regardless if a proposal is being renegotiated. A filter expression (PQL query) may be specified to filter the results. The notes will not be returned.",
9238	//   "flatPath": "v2beta1/accounts/{accountId}/finalizedProposals",
9239	//   "httpMethod": "GET",
9240	//   "id": "adexchangebuyer2.accounts.finalizedProposals.list",
9241	//   "parameterOrder": [
9242	//     "accountId"
9243	//   ],
9244	//   "parameters": {
9245	//     "accountId": {
9246	//       "description": "Account ID of the buyer.",
9247	//       "location": "path",
9248	//       "required": true,
9249	//       "type": "string"
9250	//     },
9251	//     "filter": {
9252	//       "description": "An optional PQL filter query used to query for proposals. Nested repeated fields, such as proposal.deals.targetingCriterion, cannot be filtered.",
9253	//       "location": "query",
9254	//       "type": "string"
9255	//     },
9256	//     "filterSyntax": {
9257	//       "description": "Syntax the filter is written in. Current implementation defaults to PQL but in the future it will be LIST_FILTER.",
9258	//       "enum": [
9259	//         "FILTER_SYNTAX_UNSPECIFIED",
9260	//         "PQL",
9261	//         "LIST_FILTER"
9262	//       ],
9263	//       "enumDescriptions": [
9264	//         "A placeholder for an undefined filter syntax.",
9265	//         "PQL query syntax. Visit https://developers.google.com/ad-manager/api/pqlreference for PQL documentation and examples.",
9266	//         "API list filtering syntax. Read about syntax and usage at https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters."
9267	//       ],
9268	//       "location": "query",
9269	//       "type": "string"
9270	//     },
9271	//     "pageSize": {
9272	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
9273	//       "format": "int32",
9274	//       "location": "query",
9275	//       "type": "integer"
9276	//     },
9277	//     "pageToken": {
9278	//       "description": "The page token as returned from ListProposalsResponse.",
9279	//       "location": "query",
9280	//       "type": "string"
9281	//     }
9282	//   },
9283	//   "path": "v2beta1/accounts/{accountId}/finalizedProposals",
9284	//   "response": {
9285	//     "$ref": "ListProposalsResponse"
9286	//   },
9287	//   "scopes": [
9288	//     "https://www.googleapis.com/auth/adexchange.buyer"
9289	//   ]
9290	// }
9291
9292}
9293
9294// Pages invokes f for each page of results.
9295// A non-nil error returned from f will halt the iteration.
9296// The provided context supersedes any context provided to the Context method.
9297func (c *AccountsFinalizedProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error {
9298	c.ctx_ = ctx
9299	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9300	for {
9301		x, err := c.Do()
9302		if err != nil {
9303			return err
9304		}
9305		if err := f(x); err != nil {
9306			return err
9307		}
9308		if x.NextPageToken == "" {
9309			return nil
9310		}
9311		c.PageToken(x.NextPageToken)
9312	}
9313}
9314
9315// method id "adexchangebuyer2.accounts.finalizedProposals.pause":
9316
9317type AccountsFinalizedProposalsPauseCall struct {
9318	s                         *Service
9319	accountId                 string
9320	proposalId                string
9321	pauseproposaldealsrequest *PauseProposalDealsRequest
9322	urlParams_                gensupport.URLParams
9323	ctx_                      context.Context
9324	header_                   http.Header
9325}
9326
9327// Pause: Update given deals to pause serving. This method will set the
9328// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true
9329// for all listed deals in the request. Currently, this method only
9330// applies to PG and PD deals. For PA deals, please call
9331// accounts.proposals.pause endpoint. It is a no-op to pause
9332// already-paused deals. It is an error to call PauseProposalDeals for
9333// deals which are not part of the proposal of proposal_id or which are
9334// not finalized or renegotiating.
9335//
9336// - accountId: Account ID of the buyer.
9337// - proposalId: The proposal_id of the proposal containing the deals.
9338func (r *AccountsFinalizedProposalsService) Pause(accountId string, proposalId string, pauseproposaldealsrequest *PauseProposalDealsRequest) *AccountsFinalizedProposalsPauseCall {
9339	c := &AccountsFinalizedProposalsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9340	c.accountId = accountId
9341	c.proposalId = proposalId
9342	c.pauseproposaldealsrequest = pauseproposaldealsrequest
9343	return c
9344}
9345
9346// Fields allows partial responses to be retrieved. See
9347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9348// for more information.
9349func (c *AccountsFinalizedProposalsPauseCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsPauseCall {
9350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9351	return c
9352}
9353
9354// Context sets the context to be used in this call's Do method. Any
9355// pending HTTP request will be aborted if the provided context is
9356// canceled.
9357func (c *AccountsFinalizedProposalsPauseCall) Context(ctx context.Context) *AccountsFinalizedProposalsPauseCall {
9358	c.ctx_ = ctx
9359	return c
9360}
9361
9362// Header returns an http.Header that can be modified by the caller to
9363// add HTTP headers to the request.
9364func (c *AccountsFinalizedProposalsPauseCall) Header() http.Header {
9365	if c.header_ == nil {
9366		c.header_ = make(http.Header)
9367	}
9368	return c.header_
9369}
9370
9371func (c *AccountsFinalizedProposalsPauseCall) doRequest(alt string) (*http.Response, error) {
9372	reqHeaders := make(http.Header)
9373	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9374	for k, v := range c.header_ {
9375		reqHeaders[k] = v
9376	}
9377	reqHeaders.Set("User-Agent", c.s.userAgent())
9378	var body io.Reader = nil
9379	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pauseproposaldealsrequest)
9380	if err != nil {
9381		return nil, err
9382	}
9383	reqHeaders.Set("Content-Type", "application/json")
9384	c.urlParams_.Set("alt", alt)
9385	c.urlParams_.Set("prettyPrint", "false")
9386	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:pause")
9387	urls += "?" + c.urlParams_.Encode()
9388	req, err := http.NewRequest("POST", urls, body)
9389	if err != nil {
9390		return nil, err
9391	}
9392	req.Header = reqHeaders
9393	googleapi.Expand(req.URL, map[string]string{
9394		"accountId":  c.accountId,
9395		"proposalId": c.proposalId,
9396	})
9397	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9398}
9399
9400// Do executes the "adexchangebuyer2.accounts.finalizedProposals.pause" call.
9401// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
9402// code is an error. Response headers are in either
9403// *Proposal.ServerResponse.Header or (if a response was returned at
9404// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9405// to check whether the returned error was because
9406// http.StatusNotModified was returned.
9407func (c *AccountsFinalizedProposalsPauseCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
9408	gensupport.SetOptions(c.urlParams_, opts...)
9409	res, err := c.doRequest("json")
9410	if res != nil && res.StatusCode == http.StatusNotModified {
9411		if res.Body != nil {
9412			res.Body.Close()
9413		}
9414		return nil, &googleapi.Error{
9415			Code:   res.StatusCode,
9416			Header: res.Header,
9417		}
9418	}
9419	if err != nil {
9420		return nil, err
9421	}
9422	defer googleapi.CloseBody(res)
9423	if err := googleapi.CheckResponse(res); err != nil {
9424		return nil, err
9425	}
9426	ret := &Proposal{
9427		ServerResponse: googleapi.ServerResponse{
9428			Header:         res.Header,
9429			HTTPStatusCode: res.StatusCode,
9430		},
9431	}
9432	target := &ret
9433	if err := gensupport.DecodeResponse(target, res); err != nil {
9434		return nil, err
9435	}
9436	return ret, nil
9437	// {
9438	//   "description": "Update given deals to pause serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all listed deals in the request. Currently, this method only applies to PG and PD deals. For PA deals, please call accounts.proposals.pause endpoint. It is a no-op to pause already-paused deals. It is an error to call PauseProposalDeals for deals which are not part of the proposal of proposal_id or which are not finalized or renegotiating.",
9439	//   "flatPath": "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:pause",
9440	//   "httpMethod": "POST",
9441	//   "id": "adexchangebuyer2.accounts.finalizedProposals.pause",
9442	//   "parameterOrder": [
9443	//     "accountId",
9444	//     "proposalId"
9445	//   ],
9446	//   "parameters": {
9447	//     "accountId": {
9448	//       "description": "Account ID of the buyer.",
9449	//       "location": "path",
9450	//       "required": true,
9451	//       "type": "string"
9452	//     },
9453	//     "proposalId": {
9454	//       "description": "The proposal_id of the proposal containing the deals.",
9455	//       "location": "path",
9456	//       "required": true,
9457	//       "type": "string"
9458	//     }
9459	//   },
9460	//   "path": "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:pause",
9461	//   "request": {
9462	//     "$ref": "PauseProposalDealsRequest"
9463	//   },
9464	//   "response": {
9465	//     "$ref": "Proposal"
9466	//   },
9467	//   "scopes": [
9468	//     "https://www.googleapis.com/auth/adexchange.buyer"
9469	//   ]
9470	// }
9471
9472}
9473
9474// method id "adexchangebuyer2.accounts.finalizedProposals.resume":
9475
9476type AccountsFinalizedProposalsResumeCall struct {
9477	s                          *Service
9478	accountId                  string
9479	proposalId                 string
9480	resumeproposaldealsrequest *ResumeProposalDealsRequest
9481	urlParams_                 gensupport.URLParams
9482	ctx_                       context.Context
9483	header_                    http.Header
9484}
9485
9486// Resume: Update given deals to resume serving. This method will set
9487// the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to
9488// false for all listed deals in the request. Currently, this method
9489// only applies to PG and PD deals. For PA deals, please call
9490// accounts.proposals.resume endpoint. It is a no-op to resume running
9491// deals or deals paused by the other party. It is an error to call
9492// ResumeProposalDeals for deals which are not part of the proposal of
9493// proposal_id or which are not finalized or renegotiating.
9494//
9495// - accountId: Account ID of the buyer.
9496// - proposalId: The proposal_id of the proposal containing the deals.
9497func (r *AccountsFinalizedProposalsService) Resume(accountId string, proposalId string, resumeproposaldealsrequest *ResumeProposalDealsRequest) *AccountsFinalizedProposalsResumeCall {
9498	c := &AccountsFinalizedProposalsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9499	c.accountId = accountId
9500	c.proposalId = proposalId
9501	c.resumeproposaldealsrequest = resumeproposaldealsrequest
9502	return c
9503}
9504
9505// Fields allows partial responses to be retrieved. See
9506// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9507// for more information.
9508func (c *AccountsFinalizedProposalsResumeCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsResumeCall {
9509	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9510	return c
9511}
9512
9513// Context sets the context to be used in this call's Do method. Any
9514// pending HTTP request will be aborted if the provided context is
9515// canceled.
9516func (c *AccountsFinalizedProposalsResumeCall) Context(ctx context.Context) *AccountsFinalizedProposalsResumeCall {
9517	c.ctx_ = ctx
9518	return c
9519}
9520
9521// Header returns an http.Header that can be modified by the caller to
9522// add HTTP headers to the request.
9523func (c *AccountsFinalizedProposalsResumeCall) Header() http.Header {
9524	if c.header_ == nil {
9525		c.header_ = make(http.Header)
9526	}
9527	return c.header_
9528}
9529
9530func (c *AccountsFinalizedProposalsResumeCall) doRequest(alt string) (*http.Response, error) {
9531	reqHeaders := make(http.Header)
9532	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9533	for k, v := range c.header_ {
9534		reqHeaders[k] = v
9535	}
9536	reqHeaders.Set("User-Agent", c.s.userAgent())
9537	var body io.Reader = nil
9538	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumeproposaldealsrequest)
9539	if err != nil {
9540		return nil, err
9541	}
9542	reqHeaders.Set("Content-Type", "application/json")
9543	c.urlParams_.Set("alt", alt)
9544	c.urlParams_.Set("prettyPrint", "false")
9545	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:resume")
9546	urls += "?" + c.urlParams_.Encode()
9547	req, err := http.NewRequest("POST", urls, body)
9548	if err != nil {
9549		return nil, err
9550	}
9551	req.Header = reqHeaders
9552	googleapi.Expand(req.URL, map[string]string{
9553		"accountId":  c.accountId,
9554		"proposalId": c.proposalId,
9555	})
9556	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9557}
9558
9559// Do executes the "adexchangebuyer2.accounts.finalizedProposals.resume" call.
9560// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
9561// code is an error. Response headers are in either
9562// *Proposal.ServerResponse.Header or (if a response was returned at
9563// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9564// to check whether the returned error was because
9565// http.StatusNotModified was returned.
9566func (c *AccountsFinalizedProposalsResumeCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
9567	gensupport.SetOptions(c.urlParams_, opts...)
9568	res, err := c.doRequest("json")
9569	if res != nil && res.StatusCode == http.StatusNotModified {
9570		if res.Body != nil {
9571			res.Body.Close()
9572		}
9573		return nil, &googleapi.Error{
9574			Code:   res.StatusCode,
9575			Header: res.Header,
9576		}
9577	}
9578	if err != nil {
9579		return nil, err
9580	}
9581	defer googleapi.CloseBody(res)
9582	if err := googleapi.CheckResponse(res); err != nil {
9583		return nil, err
9584	}
9585	ret := &Proposal{
9586		ServerResponse: googleapi.ServerResponse{
9587			Header:         res.Header,
9588			HTTPStatusCode: res.StatusCode,
9589		},
9590	}
9591	target := &ret
9592	if err := gensupport.DecodeResponse(target, res); err != nil {
9593		return nil, err
9594	}
9595	return ret, nil
9596	// {
9597	//   "description": "Update given deals to resume serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all listed deals in the request. Currently, this method only applies to PG and PD deals. For PA deals, please call accounts.proposals.resume endpoint. It is a no-op to resume running deals or deals paused by the other party. It is an error to call ResumeProposalDeals for deals which are not part of the proposal of proposal_id or which are not finalized or renegotiating.",
9598	//   "flatPath": "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:resume",
9599	//   "httpMethod": "POST",
9600	//   "id": "adexchangebuyer2.accounts.finalizedProposals.resume",
9601	//   "parameterOrder": [
9602	//     "accountId",
9603	//     "proposalId"
9604	//   ],
9605	//   "parameters": {
9606	//     "accountId": {
9607	//       "description": "Account ID of the buyer.",
9608	//       "location": "path",
9609	//       "required": true,
9610	//       "type": "string"
9611	//     },
9612	//     "proposalId": {
9613	//       "description": "The proposal_id of the proposal containing the deals.",
9614	//       "location": "path",
9615	//       "required": true,
9616	//       "type": "string"
9617	//     }
9618	//   },
9619	//   "path": "v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:resume",
9620	//   "request": {
9621	//     "$ref": "ResumeProposalDealsRequest"
9622	//   },
9623	//   "response": {
9624	//     "$ref": "Proposal"
9625	//   },
9626	//   "scopes": [
9627	//     "https://www.googleapis.com/auth/adexchange.buyer"
9628	//   ]
9629	// }
9630
9631}
9632
9633// method id "adexchangebuyer2.accounts.products.get":
9634
9635type AccountsProductsGetCall struct {
9636	s            *Service
9637	accountId    string
9638	productId    string
9639	urlParams_   gensupport.URLParams
9640	ifNoneMatch_ string
9641	ctx_         context.Context
9642	header_      http.Header
9643}
9644
9645// Get: Gets the requested product by ID.
9646//
9647// - accountId: Account ID of the buyer.
9648// - productId: The ID for the product to get the head revision for.
9649func (r *AccountsProductsService) Get(accountId string, productId string) *AccountsProductsGetCall {
9650	c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9651	c.accountId = accountId
9652	c.productId = productId
9653	return c
9654}
9655
9656// Fields allows partial responses to be retrieved. See
9657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9658// for more information.
9659func (c *AccountsProductsGetCall) Fields(s ...googleapi.Field) *AccountsProductsGetCall {
9660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9661	return c
9662}
9663
9664// IfNoneMatch sets the optional parameter which makes the operation
9665// fail if the object's ETag matches the given value. This is useful for
9666// getting updates only after the object has changed since the last
9667// request. Use googleapi.IsNotModified to check whether the response
9668// error from Do is the result of In-None-Match.
9669func (c *AccountsProductsGetCall) IfNoneMatch(entityTag string) *AccountsProductsGetCall {
9670	c.ifNoneMatch_ = entityTag
9671	return c
9672}
9673
9674// Context sets the context to be used in this call's Do method. Any
9675// pending HTTP request will be aborted if the provided context is
9676// canceled.
9677func (c *AccountsProductsGetCall) Context(ctx context.Context) *AccountsProductsGetCall {
9678	c.ctx_ = ctx
9679	return c
9680}
9681
9682// Header returns an http.Header that can be modified by the caller to
9683// add HTTP headers to the request.
9684func (c *AccountsProductsGetCall) Header() http.Header {
9685	if c.header_ == nil {
9686		c.header_ = make(http.Header)
9687	}
9688	return c.header_
9689}
9690
9691func (c *AccountsProductsGetCall) doRequest(alt string) (*http.Response, error) {
9692	reqHeaders := make(http.Header)
9693	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9694	for k, v := range c.header_ {
9695		reqHeaders[k] = v
9696	}
9697	reqHeaders.Set("User-Agent", c.s.userAgent())
9698	if c.ifNoneMatch_ != "" {
9699		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9700	}
9701	var body io.Reader = nil
9702	c.urlParams_.Set("alt", alt)
9703	c.urlParams_.Set("prettyPrint", "false")
9704	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products/{productId}")
9705	urls += "?" + c.urlParams_.Encode()
9706	req, err := http.NewRequest("GET", urls, body)
9707	if err != nil {
9708		return nil, err
9709	}
9710	req.Header = reqHeaders
9711	googleapi.Expand(req.URL, map[string]string{
9712		"accountId": c.accountId,
9713		"productId": c.productId,
9714	})
9715	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9716}
9717
9718// Do executes the "adexchangebuyer2.accounts.products.get" call.
9719// Exactly one of *Product or error will be non-nil. Any non-2xx status
9720// code is an error. Response headers are in either
9721// *Product.ServerResponse.Header or (if a response was returned at all)
9722// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9723// check whether the returned error was because http.StatusNotModified
9724// was returned.
9725func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
9726	gensupport.SetOptions(c.urlParams_, opts...)
9727	res, err := c.doRequest("json")
9728	if res != nil && res.StatusCode == http.StatusNotModified {
9729		if res.Body != nil {
9730			res.Body.Close()
9731		}
9732		return nil, &googleapi.Error{
9733			Code:   res.StatusCode,
9734			Header: res.Header,
9735		}
9736	}
9737	if err != nil {
9738		return nil, err
9739	}
9740	defer googleapi.CloseBody(res)
9741	if err := googleapi.CheckResponse(res); err != nil {
9742		return nil, err
9743	}
9744	ret := &Product{
9745		ServerResponse: googleapi.ServerResponse{
9746			Header:         res.Header,
9747			HTTPStatusCode: res.StatusCode,
9748		},
9749	}
9750	target := &ret
9751	if err := gensupport.DecodeResponse(target, res); err != nil {
9752		return nil, err
9753	}
9754	return ret, nil
9755	// {
9756	//   "description": "Gets the requested product by ID.",
9757	//   "flatPath": "v2beta1/accounts/{accountId}/products/{productId}",
9758	//   "httpMethod": "GET",
9759	//   "id": "adexchangebuyer2.accounts.products.get",
9760	//   "parameterOrder": [
9761	//     "accountId",
9762	//     "productId"
9763	//   ],
9764	//   "parameters": {
9765	//     "accountId": {
9766	//       "description": "Account ID of the buyer.",
9767	//       "location": "path",
9768	//       "required": true,
9769	//       "type": "string"
9770	//     },
9771	//     "productId": {
9772	//       "description": "The ID for the product to get the head revision for.",
9773	//       "location": "path",
9774	//       "required": true,
9775	//       "type": "string"
9776	//     }
9777	//   },
9778	//   "path": "v2beta1/accounts/{accountId}/products/{productId}",
9779	//   "response": {
9780	//     "$ref": "Product"
9781	//   },
9782	//   "scopes": [
9783	//     "https://www.googleapis.com/auth/adexchange.buyer"
9784	//   ]
9785	// }
9786
9787}
9788
9789// method id "adexchangebuyer2.accounts.products.list":
9790
9791type AccountsProductsListCall struct {
9792	s            *Service
9793	accountId    string
9794	urlParams_   gensupport.URLParams
9795	ifNoneMatch_ string
9796	ctx_         context.Context
9797	header_      http.Header
9798}
9799
9800// List: List all products visible to the buyer (optionally filtered by
9801// the specified PQL query).
9802//
9803// - accountId: Account ID of the buyer.
9804func (r *AccountsProductsService) List(accountId string) *AccountsProductsListCall {
9805	c := &AccountsProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9806	c.accountId = accountId
9807	return c
9808}
9809
9810// Filter sets the optional parameter "filter": An optional PQL query
9811// used to query for products. See
9812// https://developers.google.com/ad-manager/docs/pqlreference for
9813// documentation about PQL and examples. Nested repeated fields, such as
9814// product.targetingCriterion.inclusions, cannot be filtered.
9815func (c *AccountsProductsListCall) Filter(filter string) *AccountsProductsListCall {
9816	c.urlParams_.Set("filter", filter)
9817	return c
9818}
9819
9820// PageSize sets the optional parameter "pageSize": Requested page size.
9821// The server may return fewer results than requested. If unspecified,
9822// the server will pick an appropriate default.
9823func (c *AccountsProductsListCall) PageSize(pageSize int64) *AccountsProductsListCall {
9824	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9825	return c
9826}
9827
9828// PageToken sets the optional parameter "pageToken": The page token as
9829// returned from ListProductsResponse.
9830func (c *AccountsProductsListCall) PageToken(pageToken string) *AccountsProductsListCall {
9831	c.urlParams_.Set("pageToken", pageToken)
9832	return c
9833}
9834
9835// Fields allows partial responses to be retrieved. See
9836// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9837// for more information.
9838func (c *AccountsProductsListCall) Fields(s ...googleapi.Field) *AccountsProductsListCall {
9839	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9840	return c
9841}
9842
9843// IfNoneMatch sets the optional parameter which makes the operation
9844// fail if the object's ETag matches the given value. This is useful for
9845// getting updates only after the object has changed since the last
9846// request. Use googleapi.IsNotModified to check whether the response
9847// error from Do is the result of In-None-Match.
9848func (c *AccountsProductsListCall) IfNoneMatch(entityTag string) *AccountsProductsListCall {
9849	c.ifNoneMatch_ = entityTag
9850	return c
9851}
9852
9853// Context sets the context to be used in this call's Do method. Any
9854// pending HTTP request will be aborted if the provided context is
9855// canceled.
9856func (c *AccountsProductsListCall) Context(ctx context.Context) *AccountsProductsListCall {
9857	c.ctx_ = ctx
9858	return c
9859}
9860
9861// Header returns an http.Header that can be modified by the caller to
9862// add HTTP headers to the request.
9863func (c *AccountsProductsListCall) Header() http.Header {
9864	if c.header_ == nil {
9865		c.header_ = make(http.Header)
9866	}
9867	return c.header_
9868}
9869
9870func (c *AccountsProductsListCall) doRequest(alt string) (*http.Response, error) {
9871	reqHeaders := make(http.Header)
9872	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9873	for k, v := range c.header_ {
9874		reqHeaders[k] = v
9875	}
9876	reqHeaders.Set("User-Agent", c.s.userAgent())
9877	if c.ifNoneMatch_ != "" {
9878		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9879	}
9880	var body io.Reader = nil
9881	c.urlParams_.Set("alt", alt)
9882	c.urlParams_.Set("prettyPrint", "false")
9883	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products")
9884	urls += "?" + c.urlParams_.Encode()
9885	req, err := http.NewRequest("GET", urls, body)
9886	if err != nil {
9887		return nil, err
9888	}
9889	req.Header = reqHeaders
9890	googleapi.Expand(req.URL, map[string]string{
9891		"accountId": c.accountId,
9892	})
9893	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9894}
9895
9896// Do executes the "adexchangebuyer2.accounts.products.list" call.
9897// Exactly one of *ListProductsResponse or error will be non-nil. Any
9898// non-2xx status code is an error. Response headers are in either
9899// *ListProductsResponse.ServerResponse.Header or (if a response was
9900// returned at all) in error.(*googleapi.Error).Header. Use
9901// googleapi.IsNotModified to check whether the returned error was
9902// because http.StatusNotModified was returned.
9903func (c *AccountsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error) {
9904	gensupport.SetOptions(c.urlParams_, opts...)
9905	res, err := c.doRequest("json")
9906	if res != nil && res.StatusCode == http.StatusNotModified {
9907		if res.Body != nil {
9908			res.Body.Close()
9909		}
9910		return nil, &googleapi.Error{
9911			Code:   res.StatusCode,
9912			Header: res.Header,
9913		}
9914	}
9915	if err != nil {
9916		return nil, err
9917	}
9918	defer googleapi.CloseBody(res)
9919	if err := googleapi.CheckResponse(res); err != nil {
9920		return nil, err
9921	}
9922	ret := &ListProductsResponse{
9923		ServerResponse: googleapi.ServerResponse{
9924			Header:         res.Header,
9925			HTTPStatusCode: res.StatusCode,
9926		},
9927	}
9928	target := &ret
9929	if err := gensupport.DecodeResponse(target, res); err != nil {
9930		return nil, err
9931	}
9932	return ret, nil
9933	// {
9934	//   "description": "List all products visible to the buyer (optionally filtered by the specified PQL query).",
9935	//   "flatPath": "v2beta1/accounts/{accountId}/products",
9936	//   "httpMethod": "GET",
9937	//   "id": "adexchangebuyer2.accounts.products.list",
9938	//   "parameterOrder": [
9939	//     "accountId"
9940	//   ],
9941	//   "parameters": {
9942	//     "accountId": {
9943	//       "description": "Account ID of the buyer.",
9944	//       "location": "path",
9945	//       "required": true,
9946	//       "type": "string"
9947	//     },
9948	//     "filter": {
9949	//       "description": "An optional PQL query used to query for products. See https://developers.google.com/ad-manager/docs/pqlreference for documentation about PQL and examples. Nested repeated fields, such as product.targetingCriterion.inclusions, cannot be filtered.",
9950	//       "location": "query",
9951	//       "type": "string"
9952	//     },
9953	//     "pageSize": {
9954	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
9955	//       "format": "int32",
9956	//       "location": "query",
9957	//       "type": "integer"
9958	//     },
9959	//     "pageToken": {
9960	//       "description": "The page token as returned from ListProductsResponse.",
9961	//       "location": "query",
9962	//       "type": "string"
9963	//     }
9964	//   },
9965	//   "path": "v2beta1/accounts/{accountId}/products",
9966	//   "response": {
9967	//     "$ref": "ListProductsResponse"
9968	//   },
9969	//   "scopes": [
9970	//     "https://www.googleapis.com/auth/adexchange.buyer"
9971	//   ]
9972	// }
9973
9974}
9975
9976// Pages invokes f for each page of results.
9977// A non-nil error returned from f will halt the iteration.
9978// The provided context supersedes any context provided to the Context method.
9979func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error {
9980	c.ctx_ = ctx
9981	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9982	for {
9983		x, err := c.Do()
9984		if err != nil {
9985			return err
9986		}
9987		if err := f(x); err != nil {
9988			return err
9989		}
9990		if x.NextPageToken == "" {
9991			return nil
9992		}
9993		c.PageToken(x.NextPageToken)
9994	}
9995}
9996
9997// method id "adexchangebuyer2.accounts.proposals.accept":
9998
9999type AccountsProposalsAcceptCall struct {
10000	s                     *Service
10001	accountId             string
10002	proposalId            string
10003	acceptproposalrequest *AcceptProposalRequest
10004	urlParams_            gensupport.URLParams
10005	ctx_                  context.Context
10006	header_               http.Header
10007}
10008
10009// Accept: Mark the proposal as accepted at the given revision number.
10010// If the number does not match the server's revision number an
10011// `ABORTED` error message will be returned. This call updates the
10012// proposal_state from `PROPOSED` to `BUYER_ACCEPTED`, or from
10013// `SELLER_ACCEPTED` to `FINALIZED`. Upon calling this endpoint, the
10014// buyer implicitly agrees to the terms and conditions optionally set
10015// within the proposal by the publisher.
10016//
10017// - accountId: Account ID of the buyer.
10018// - proposalId: The ID of the proposal to accept.
10019func (r *AccountsProposalsService) Accept(accountId string, proposalId string, acceptproposalrequest *AcceptProposalRequest) *AccountsProposalsAcceptCall {
10020	c := &AccountsProposalsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10021	c.accountId = accountId
10022	c.proposalId = proposalId
10023	c.acceptproposalrequest = acceptproposalrequest
10024	return c
10025}
10026
10027// Fields allows partial responses to be retrieved. See
10028// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10029// for more information.
10030func (c *AccountsProposalsAcceptCall) Fields(s ...googleapi.Field) *AccountsProposalsAcceptCall {
10031	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10032	return c
10033}
10034
10035// Context sets the context to be used in this call's Do method. Any
10036// pending HTTP request will be aborted if the provided context is
10037// canceled.
10038func (c *AccountsProposalsAcceptCall) Context(ctx context.Context) *AccountsProposalsAcceptCall {
10039	c.ctx_ = ctx
10040	return c
10041}
10042
10043// Header returns an http.Header that can be modified by the caller to
10044// add HTTP headers to the request.
10045func (c *AccountsProposalsAcceptCall) Header() http.Header {
10046	if c.header_ == nil {
10047		c.header_ = make(http.Header)
10048	}
10049	return c.header_
10050}
10051
10052func (c *AccountsProposalsAcceptCall) doRequest(alt string) (*http.Response, error) {
10053	reqHeaders := make(http.Header)
10054	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10055	for k, v := range c.header_ {
10056		reqHeaders[k] = v
10057	}
10058	reqHeaders.Set("User-Agent", c.s.userAgent())
10059	var body io.Reader = nil
10060	body, err := googleapi.WithoutDataWrapper.JSONReader(c.acceptproposalrequest)
10061	if err != nil {
10062		return nil, err
10063	}
10064	reqHeaders.Set("Content-Type", "application/json")
10065	c.urlParams_.Set("alt", alt)
10066	c.urlParams_.Set("prettyPrint", "false")
10067	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept")
10068	urls += "?" + c.urlParams_.Encode()
10069	req, err := http.NewRequest("POST", urls, body)
10070	if err != nil {
10071		return nil, err
10072	}
10073	req.Header = reqHeaders
10074	googleapi.Expand(req.URL, map[string]string{
10075		"accountId":  c.accountId,
10076		"proposalId": c.proposalId,
10077	})
10078	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10079}
10080
10081// Do executes the "adexchangebuyer2.accounts.proposals.accept" call.
10082// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10083// code is an error. Response headers are in either
10084// *Proposal.ServerResponse.Header or (if a response was returned at
10085// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10086// to check whether the returned error was because
10087// http.StatusNotModified was returned.
10088func (c *AccountsProposalsAcceptCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10089	gensupport.SetOptions(c.urlParams_, opts...)
10090	res, err := c.doRequest("json")
10091	if res != nil && res.StatusCode == http.StatusNotModified {
10092		if res.Body != nil {
10093			res.Body.Close()
10094		}
10095		return nil, &googleapi.Error{
10096			Code:   res.StatusCode,
10097			Header: res.Header,
10098		}
10099	}
10100	if err != nil {
10101		return nil, err
10102	}
10103	defer googleapi.CloseBody(res)
10104	if err := googleapi.CheckResponse(res); err != nil {
10105		return nil, err
10106	}
10107	ret := &Proposal{
10108		ServerResponse: googleapi.ServerResponse{
10109			Header:         res.Header,
10110			HTTPStatusCode: res.StatusCode,
10111		},
10112	}
10113	target := &ret
10114	if err := gensupport.DecodeResponse(target, res); err != nil {
10115		return nil, err
10116	}
10117	return ret, nil
10118	// {
10119	//   "description": "Mark the proposal as accepted at the given revision number. If the number does not match the server's revision number an `ABORTED` error message will be returned. This call updates the proposal_state from `PROPOSED` to `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`. Upon calling this endpoint, the buyer implicitly agrees to the terms and conditions optionally set within the proposal by the publisher.",
10120	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept",
10121	//   "httpMethod": "POST",
10122	//   "id": "adexchangebuyer2.accounts.proposals.accept",
10123	//   "parameterOrder": [
10124	//     "accountId",
10125	//     "proposalId"
10126	//   ],
10127	//   "parameters": {
10128	//     "accountId": {
10129	//       "description": "Account ID of the buyer.",
10130	//       "location": "path",
10131	//       "required": true,
10132	//       "type": "string"
10133	//     },
10134	//     "proposalId": {
10135	//       "description": "The ID of the proposal to accept.",
10136	//       "location": "path",
10137	//       "required": true,
10138	//       "type": "string"
10139	//     }
10140	//   },
10141	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept",
10142	//   "request": {
10143	//     "$ref": "AcceptProposalRequest"
10144	//   },
10145	//   "response": {
10146	//     "$ref": "Proposal"
10147	//   },
10148	//   "scopes": [
10149	//     "https://www.googleapis.com/auth/adexchange.buyer"
10150	//   ]
10151	// }
10152
10153}
10154
10155// method id "adexchangebuyer2.accounts.proposals.addNote":
10156
10157type AccountsProposalsAddNoteCall struct {
10158	s              *Service
10159	accountId      string
10160	proposalId     string
10161	addnoterequest *AddNoteRequest
10162	urlParams_     gensupport.URLParams
10163	ctx_           context.Context
10164	header_        http.Header
10165}
10166
10167// AddNote: Create a new note and attach it to the proposal. The note is
10168// assigned a unique ID by the server. The proposal revision number will
10169// not increase when associated with a new note.
10170//
10171// - accountId: Account ID of the buyer.
10172// - proposalId: The ID of the proposal to attach the note to.
10173func (r *AccountsProposalsService) AddNote(accountId string, proposalId string, addnoterequest *AddNoteRequest) *AccountsProposalsAddNoteCall {
10174	c := &AccountsProposalsAddNoteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10175	c.accountId = accountId
10176	c.proposalId = proposalId
10177	c.addnoterequest = addnoterequest
10178	return c
10179}
10180
10181// Fields allows partial responses to be retrieved. See
10182// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10183// for more information.
10184func (c *AccountsProposalsAddNoteCall) Fields(s ...googleapi.Field) *AccountsProposalsAddNoteCall {
10185	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10186	return c
10187}
10188
10189// Context sets the context to be used in this call's Do method. Any
10190// pending HTTP request will be aborted if the provided context is
10191// canceled.
10192func (c *AccountsProposalsAddNoteCall) Context(ctx context.Context) *AccountsProposalsAddNoteCall {
10193	c.ctx_ = ctx
10194	return c
10195}
10196
10197// Header returns an http.Header that can be modified by the caller to
10198// add HTTP headers to the request.
10199func (c *AccountsProposalsAddNoteCall) Header() http.Header {
10200	if c.header_ == nil {
10201		c.header_ = make(http.Header)
10202	}
10203	return c.header_
10204}
10205
10206func (c *AccountsProposalsAddNoteCall) doRequest(alt string) (*http.Response, error) {
10207	reqHeaders := make(http.Header)
10208	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10209	for k, v := range c.header_ {
10210		reqHeaders[k] = v
10211	}
10212	reqHeaders.Set("User-Agent", c.s.userAgent())
10213	var body io.Reader = nil
10214	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addnoterequest)
10215	if err != nil {
10216		return nil, err
10217	}
10218	reqHeaders.Set("Content-Type", "application/json")
10219	c.urlParams_.Set("alt", alt)
10220	c.urlParams_.Set("prettyPrint", "false")
10221	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote")
10222	urls += "?" + c.urlParams_.Encode()
10223	req, err := http.NewRequest("POST", urls, body)
10224	if err != nil {
10225		return nil, err
10226	}
10227	req.Header = reqHeaders
10228	googleapi.Expand(req.URL, map[string]string{
10229		"accountId":  c.accountId,
10230		"proposalId": c.proposalId,
10231	})
10232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10233}
10234
10235// Do executes the "adexchangebuyer2.accounts.proposals.addNote" call.
10236// Exactly one of *Note or error will be non-nil. Any non-2xx status
10237// code is an error. Response headers are in either
10238// *Note.ServerResponse.Header or (if a response was returned at all) in
10239// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10240// whether the returned error was because http.StatusNotModified was
10241// returned.
10242func (c *AccountsProposalsAddNoteCall) Do(opts ...googleapi.CallOption) (*Note, error) {
10243	gensupport.SetOptions(c.urlParams_, opts...)
10244	res, err := c.doRequest("json")
10245	if res != nil && res.StatusCode == http.StatusNotModified {
10246		if res.Body != nil {
10247			res.Body.Close()
10248		}
10249		return nil, &googleapi.Error{
10250			Code:   res.StatusCode,
10251			Header: res.Header,
10252		}
10253	}
10254	if err != nil {
10255		return nil, err
10256	}
10257	defer googleapi.CloseBody(res)
10258	if err := googleapi.CheckResponse(res); err != nil {
10259		return nil, err
10260	}
10261	ret := &Note{
10262		ServerResponse: googleapi.ServerResponse{
10263			Header:         res.Header,
10264			HTTPStatusCode: res.StatusCode,
10265		},
10266	}
10267	target := &ret
10268	if err := gensupport.DecodeResponse(target, res); err != nil {
10269		return nil, err
10270	}
10271	return ret, nil
10272	// {
10273	//   "description": "Create a new note and attach it to the proposal. The note is assigned a unique ID by the server. The proposal revision number will not increase when associated with a new note.",
10274	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote",
10275	//   "httpMethod": "POST",
10276	//   "id": "adexchangebuyer2.accounts.proposals.addNote",
10277	//   "parameterOrder": [
10278	//     "accountId",
10279	//     "proposalId"
10280	//   ],
10281	//   "parameters": {
10282	//     "accountId": {
10283	//       "description": "Account ID of the buyer.",
10284	//       "location": "path",
10285	//       "required": true,
10286	//       "type": "string"
10287	//     },
10288	//     "proposalId": {
10289	//       "description": "The ID of the proposal to attach the note to.",
10290	//       "location": "path",
10291	//       "required": true,
10292	//       "type": "string"
10293	//     }
10294	//   },
10295	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote",
10296	//   "request": {
10297	//     "$ref": "AddNoteRequest"
10298	//   },
10299	//   "response": {
10300	//     "$ref": "Note"
10301	//   },
10302	//   "scopes": [
10303	//     "https://www.googleapis.com/auth/adexchange.buyer"
10304	//   ]
10305	// }
10306
10307}
10308
10309// method id "adexchangebuyer2.accounts.proposals.cancelNegotiation":
10310
10311type AccountsProposalsCancelNegotiationCall struct {
10312	s                        *Service
10313	accountId                string
10314	proposalId               string
10315	cancelnegotiationrequest *CancelNegotiationRequest
10316	urlParams_               gensupport.URLParams
10317	ctx_                     context.Context
10318	header_                  http.Header
10319}
10320
10321// CancelNegotiation: Cancel an ongoing negotiation on a proposal. This
10322// does not cancel or end serving for the deals if the proposal has been
10323// finalized, but only cancels a negotiation unilaterally.
10324//
10325// - accountId: Account ID of the buyer.
10326// - proposalId: The ID of the proposal to cancel negotiation for.
10327func (r *AccountsProposalsService) CancelNegotiation(accountId string, proposalId string, cancelnegotiationrequest *CancelNegotiationRequest) *AccountsProposalsCancelNegotiationCall {
10328	c := &AccountsProposalsCancelNegotiationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10329	c.accountId = accountId
10330	c.proposalId = proposalId
10331	c.cancelnegotiationrequest = cancelnegotiationrequest
10332	return c
10333}
10334
10335// Fields allows partial responses to be retrieved. See
10336// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10337// for more information.
10338func (c *AccountsProposalsCancelNegotiationCall) Fields(s ...googleapi.Field) *AccountsProposalsCancelNegotiationCall {
10339	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10340	return c
10341}
10342
10343// Context sets the context to be used in this call's Do method. Any
10344// pending HTTP request will be aborted if the provided context is
10345// canceled.
10346func (c *AccountsProposalsCancelNegotiationCall) Context(ctx context.Context) *AccountsProposalsCancelNegotiationCall {
10347	c.ctx_ = ctx
10348	return c
10349}
10350
10351// Header returns an http.Header that can be modified by the caller to
10352// add HTTP headers to the request.
10353func (c *AccountsProposalsCancelNegotiationCall) Header() http.Header {
10354	if c.header_ == nil {
10355		c.header_ = make(http.Header)
10356	}
10357	return c.header_
10358}
10359
10360func (c *AccountsProposalsCancelNegotiationCall) doRequest(alt string) (*http.Response, error) {
10361	reqHeaders := make(http.Header)
10362	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10363	for k, v := range c.header_ {
10364		reqHeaders[k] = v
10365	}
10366	reqHeaders.Set("User-Agent", c.s.userAgent())
10367	var body io.Reader = nil
10368	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelnegotiationrequest)
10369	if err != nil {
10370		return nil, err
10371	}
10372	reqHeaders.Set("Content-Type", "application/json")
10373	c.urlParams_.Set("alt", alt)
10374	c.urlParams_.Set("prettyPrint", "false")
10375	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation")
10376	urls += "?" + c.urlParams_.Encode()
10377	req, err := http.NewRequest("POST", urls, body)
10378	if err != nil {
10379		return nil, err
10380	}
10381	req.Header = reqHeaders
10382	googleapi.Expand(req.URL, map[string]string{
10383		"accountId":  c.accountId,
10384		"proposalId": c.proposalId,
10385	})
10386	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10387}
10388
10389// Do executes the "adexchangebuyer2.accounts.proposals.cancelNegotiation" call.
10390// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10391// code is an error. Response headers are in either
10392// *Proposal.ServerResponse.Header or (if a response was returned at
10393// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10394// to check whether the returned error was because
10395// http.StatusNotModified was returned.
10396func (c *AccountsProposalsCancelNegotiationCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10397	gensupport.SetOptions(c.urlParams_, opts...)
10398	res, err := c.doRequest("json")
10399	if res != nil && res.StatusCode == http.StatusNotModified {
10400		if res.Body != nil {
10401			res.Body.Close()
10402		}
10403		return nil, &googleapi.Error{
10404			Code:   res.StatusCode,
10405			Header: res.Header,
10406		}
10407	}
10408	if err != nil {
10409		return nil, err
10410	}
10411	defer googleapi.CloseBody(res)
10412	if err := googleapi.CheckResponse(res); err != nil {
10413		return nil, err
10414	}
10415	ret := &Proposal{
10416		ServerResponse: googleapi.ServerResponse{
10417			Header:         res.Header,
10418			HTTPStatusCode: res.StatusCode,
10419		},
10420	}
10421	target := &ret
10422	if err := gensupport.DecodeResponse(target, res); err != nil {
10423		return nil, err
10424	}
10425	return ret, nil
10426	// {
10427	//   "description": "Cancel an ongoing negotiation on a proposal. This does not cancel or end serving for the deals if the proposal has been finalized, but only cancels a negotiation unilaterally.",
10428	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation",
10429	//   "httpMethod": "POST",
10430	//   "id": "adexchangebuyer2.accounts.proposals.cancelNegotiation",
10431	//   "parameterOrder": [
10432	//     "accountId",
10433	//     "proposalId"
10434	//   ],
10435	//   "parameters": {
10436	//     "accountId": {
10437	//       "description": "Account ID of the buyer.",
10438	//       "location": "path",
10439	//       "required": true,
10440	//       "type": "string"
10441	//     },
10442	//     "proposalId": {
10443	//       "description": "The ID of the proposal to cancel negotiation for.",
10444	//       "location": "path",
10445	//       "required": true,
10446	//       "type": "string"
10447	//     }
10448	//   },
10449	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation",
10450	//   "request": {
10451	//     "$ref": "CancelNegotiationRequest"
10452	//   },
10453	//   "response": {
10454	//     "$ref": "Proposal"
10455	//   },
10456	//   "scopes": [
10457	//     "https://www.googleapis.com/auth/adexchange.buyer"
10458	//   ]
10459	// }
10460
10461}
10462
10463// method id "adexchangebuyer2.accounts.proposals.completeSetup":
10464
10465type AccountsProposalsCompleteSetupCall struct {
10466	s                    *Service
10467	accountId            string
10468	proposalId           string
10469	completesetuprequest *CompleteSetupRequest
10470	urlParams_           gensupport.URLParams
10471	ctx_                 context.Context
10472	header_              http.Header
10473}
10474
10475// CompleteSetup: Update the given proposal to indicate that setup has
10476// been completed. This method is called by the buyer when the line
10477// items have been created on their end for a finalized proposal and all
10478// the required creatives have been uploaded using the creatives API.
10479// This call updates the `is_setup_completed` bit on the proposal and
10480// also notifies the seller. The server will advance the revision number
10481// of the most recent proposal.
10482//
10483// - accountId: Account ID of the buyer.
10484// - proposalId: The ID of the proposal to mark as setup completed.
10485func (r *AccountsProposalsService) CompleteSetup(accountId string, proposalId string, completesetuprequest *CompleteSetupRequest) *AccountsProposalsCompleteSetupCall {
10486	c := &AccountsProposalsCompleteSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10487	c.accountId = accountId
10488	c.proposalId = proposalId
10489	c.completesetuprequest = completesetuprequest
10490	return c
10491}
10492
10493// Fields allows partial responses to be retrieved. See
10494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10495// for more information.
10496func (c *AccountsProposalsCompleteSetupCall) Fields(s ...googleapi.Field) *AccountsProposalsCompleteSetupCall {
10497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10498	return c
10499}
10500
10501// Context sets the context to be used in this call's Do method. Any
10502// pending HTTP request will be aborted if the provided context is
10503// canceled.
10504func (c *AccountsProposalsCompleteSetupCall) Context(ctx context.Context) *AccountsProposalsCompleteSetupCall {
10505	c.ctx_ = ctx
10506	return c
10507}
10508
10509// Header returns an http.Header that can be modified by the caller to
10510// add HTTP headers to the request.
10511func (c *AccountsProposalsCompleteSetupCall) Header() http.Header {
10512	if c.header_ == nil {
10513		c.header_ = make(http.Header)
10514	}
10515	return c.header_
10516}
10517
10518func (c *AccountsProposalsCompleteSetupCall) doRequest(alt string) (*http.Response, error) {
10519	reqHeaders := make(http.Header)
10520	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10521	for k, v := range c.header_ {
10522		reqHeaders[k] = v
10523	}
10524	reqHeaders.Set("User-Agent", c.s.userAgent())
10525	var body io.Reader = nil
10526	body, err := googleapi.WithoutDataWrapper.JSONReader(c.completesetuprequest)
10527	if err != nil {
10528		return nil, err
10529	}
10530	reqHeaders.Set("Content-Type", "application/json")
10531	c.urlParams_.Set("alt", alt)
10532	c.urlParams_.Set("prettyPrint", "false")
10533	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup")
10534	urls += "?" + c.urlParams_.Encode()
10535	req, err := http.NewRequest("POST", urls, body)
10536	if err != nil {
10537		return nil, err
10538	}
10539	req.Header = reqHeaders
10540	googleapi.Expand(req.URL, map[string]string{
10541		"accountId":  c.accountId,
10542		"proposalId": c.proposalId,
10543	})
10544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10545}
10546
10547// Do executes the "adexchangebuyer2.accounts.proposals.completeSetup" call.
10548// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10549// code is an error. Response headers are in either
10550// *Proposal.ServerResponse.Header or (if a response was returned at
10551// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10552// to check whether the returned error was because
10553// http.StatusNotModified was returned.
10554func (c *AccountsProposalsCompleteSetupCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10555	gensupport.SetOptions(c.urlParams_, opts...)
10556	res, err := c.doRequest("json")
10557	if res != nil && res.StatusCode == http.StatusNotModified {
10558		if res.Body != nil {
10559			res.Body.Close()
10560		}
10561		return nil, &googleapi.Error{
10562			Code:   res.StatusCode,
10563			Header: res.Header,
10564		}
10565	}
10566	if err != nil {
10567		return nil, err
10568	}
10569	defer googleapi.CloseBody(res)
10570	if err := googleapi.CheckResponse(res); err != nil {
10571		return nil, err
10572	}
10573	ret := &Proposal{
10574		ServerResponse: googleapi.ServerResponse{
10575			Header:         res.Header,
10576			HTTPStatusCode: res.StatusCode,
10577		},
10578	}
10579	target := &ret
10580	if err := gensupport.DecodeResponse(target, res); err != nil {
10581		return nil, err
10582	}
10583	return ret, nil
10584	// {
10585	//   "description": "Update the given proposal to indicate that setup has been completed. This method is called by the buyer when the line items have been created on their end for a finalized proposal and all the required creatives have been uploaded using the creatives API. This call updates the `is_setup_completed` bit on the proposal and also notifies the seller. The server will advance the revision number of the most recent proposal.",
10586	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup",
10587	//   "httpMethod": "POST",
10588	//   "id": "adexchangebuyer2.accounts.proposals.completeSetup",
10589	//   "parameterOrder": [
10590	//     "accountId",
10591	//     "proposalId"
10592	//   ],
10593	//   "parameters": {
10594	//     "accountId": {
10595	//       "description": "Account ID of the buyer.",
10596	//       "location": "path",
10597	//       "required": true,
10598	//       "type": "string"
10599	//     },
10600	//     "proposalId": {
10601	//       "description": "The ID of the proposal to mark as setup completed.",
10602	//       "location": "path",
10603	//       "required": true,
10604	//       "type": "string"
10605	//     }
10606	//   },
10607	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup",
10608	//   "request": {
10609	//     "$ref": "CompleteSetupRequest"
10610	//   },
10611	//   "response": {
10612	//     "$ref": "Proposal"
10613	//   },
10614	//   "scopes": [
10615	//     "https://www.googleapis.com/auth/adexchange.buyer"
10616	//   ]
10617	// }
10618
10619}
10620
10621// method id "adexchangebuyer2.accounts.proposals.create":
10622
10623type AccountsProposalsCreateCall struct {
10624	s          *Service
10625	accountId  string
10626	proposal   *Proposal
10627	urlParams_ gensupport.URLParams
10628	ctx_       context.Context
10629	header_    http.Header
10630}
10631
10632// Create: Create the given proposal. Each created proposal and any
10633// deals it contains are assigned a unique ID by the server.
10634//
10635// - accountId: Account ID of the buyer.
10636func (r *AccountsProposalsService) Create(accountId string, proposal *Proposal) *AccountsProposalsCreateCall {
10637	c := &AccountsProposalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10638	c.accountId = accountId
10639	c.proposal = proposal
10640	return c
10641}
10642
10643// Fields allows partial responses to be retrieved. See
10644// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10645// for more information.
10646func (c *AccountsProposalsCreateCall) Fields(s ...googleapi.Field) *AccountsProposalsCreateCall {
10647	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10648	return c
10649}
10650
10651// Context sets the context to be used in this call's Do method. Any
10652// pending HTTP request will be aborted if the provided context is
10653// canceled.
10654func (c *AccountsProposalsCreateCall) Context(ctx context.Context) *AccountsProposalsCreateCall {
10655	c.ctx_ = ctx
10656	return c
10657}
10658
10659// Header returns an http.Header that can be modified by the caller to
10660// add HTTP headers to the request.
10661func (c *AccountsProposalsCreateCall) Header() http.Header {
10662	if c.header_ == nil {
10663		c.header_ = make(http.Header)
10664	}
10665	return c.header_
10666}
10667
10668func (c *AccountsProposalsCreateCall) doRequest(alt string) (*http.Response, error) {
10669	reqHeaders := make(http.Header)
10670	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10671	for k, v := range c.header_ {
10672		reqHeaders[k] = v
10673	}
10674	reqHeaders.Set("User-Agent", c.s.userAgent())
10675	var body io.Reader = nil
10676	body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
10677	if err != nil {
10678		return nil, err
10679	}
10680	reqHeaders.Set("Content-Type", "application/json")
10681	c.urlParams_.Set("alt", alt)
10682	c.urlParams_.Set("prettyPrint", "false")
10683	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals")
10684	urls += "?" + c.urlParams_.Encode()
10685	req, err := http.NewRequest("POST", urls, body)
10686	if err != nil {
10687		return nil, err
10688	}
10689	req.Header = reqHeaders
10690	googleapi.Expand(req.URL, map[string]string{
10691		"accountId": c.accountId,
10692	})
10693	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10694}
10695
10696// Do executes the "adexchangebuyer2.accounts.proposals.create" call.
10697// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10698// code is an error. Response headers are in either
10699// *Proposal.ServerResponse.Header or (if a response was returned at
10700// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10701// to check whether the returned error was because
10702// http.StatusNotModified was returned.
10703func (c *AccountsProposalsCreateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10704	gensupport.SetOptions(c.urlParams_, opts...)
10705	res, err := c.doRequest("json")
10706	if res != nil && res.StatusCode == http.StatusNotModified {
10707		if res.Body != nil {
10708			res.Body.Close()
10709		}
10710		return nil, &googleapi.Error{
10711			Code:   res.StatusCode,
10712			Header: res.Header,
10713		}
10714	}
10715	if err != nil {
10716		return nil, err
10717	}
10718	defer googleapi.CloseBody(res)
10719	if err := googleapi.CheckResponse(res); err != nil {
10720		return nil, err
10721	}
10722	ret := &Proposal{
10723		ServerResponse: googleapi.ServerResponse{
10724			Header:         res.Header,
10725			HTTPStatusCode: res.StatusCode,
10726		},
10727	}
10728	target := &ret
10729	if err := gensupport.DecodeResponse(target, res); err != nil {
10730		return nil, err
10731	}
10732	return ret, nil
10733	// {
10734	//   "description": "Create the given proposal. Each created proposal and any deals it contains are assigned a unique ID by the server.",
10735	//   "flatPath": "v2beta1/accounts/{accountId}/proposals",
10736	//   "httpMethod": "POST",
10737	//   "id": "adexchangebuyer2.accounts.proposals.create",
10738	//   "parameterOrder": [
10739	//     "accountId"
10740	//   ],
10741	//   "parameters": {
10742	//     "accountId": {
10743	//       "description": "Account ID of the buyer.",
10744	//       "location": "path",
10745	//       "required": true,
10746	//       "type": "string"
10747	//     }
10748	//   },
10749	//   "path": "v2beta1/accounts/{accountId}/proposals",
10750	//   "request": {
10751	//     "$ref": "Proposal"
10752	//   },
10753	//   "response": {
10754	//     "$ref": "Proposal"
10755	//   },
10756	//   "scopes": [
10757	//     "https://www.googleapis.com/auth/adexchange.buyer"
10758	//   ]
10759	// }
10760
10761}
10762
10763// method id "adexchangebuyer2.accounts.proposals.get":
10764
10765type AccountsProposalsGetCall struct {
10766	s            *Service
10767	accountId    string
10768	proposalId   string
10769	urlParams_   gensupport.URLParams
10770	ifNoneMatch_ string
10771	ctx_         context.Context
10772	header_      http.Header
10773}
10774
10775// Get: Gets a proposal given its ID. The proposal is returned at its
10776// head revision.
10777//
10778// - accountId: Account ID of the buyer.
10779// - proposalId: The unique ID of the proposal.
10780func (r *AccountsProposalsService) Get(accountId string, proposalId string) *AccountsProposalsGetCall {
10781	c := &AccountsProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10782	c.accountId = accountId
10783	c.proposalId = proposalId
10784	return c
10785}
10786
10787// Fields allows partial responses to be retrieved. See
10788// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10789// for more information.
10790func (c *AccountsProposalsGetCall) Fields(s ...googleapi.Field) *AccountsProposalsGetCall {
10791	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10792	return c
10793}
10794
10795// IfNoneMatch sets the optional parameter which makes the operation
10796// fail if the object's ETag matches the given value. This is useful for
10797// getting updates only after the object has changed since the last
10798// request. Use googleapi.IsNotModified to check whether the response
10799// error from Do is the result of In-None-Match.
10800func (c *AccountsProposalsGetCall) IfNoneMatch(entityTag string) *AccountsProposalsGetCall {
10801	c.ifNoneMatch_ = entityTag
10802	return c
10803}
10804
10805// Context sets the context to be used in this call's Do method. Any
10806// pending HTTP request will be aborted if the provided context is
10807// canceled.
10808func (c *AccountsProposalsGetCall) Context(ctx context.Context) *AccountsProposalsGetCall {
10809	c.ctx_ = ctx
10810	return c
10811}
10812
10813// Header returns an http.Header that can be modified by the caller to
10814// add HTTP headers to the request.
10815func (c *AccountsProposalsGetCall) Header() http.Header {
10816	if c.header_ == nil {
10817		c.header_ = make(http.Header)
10818	}
10819	return c.header_
10820}
10821
10822func (c *AccountsProposalsGetCall) doRequest(alt string) (*http.Response, error) {
10823	reqHeaders := make(http.Header)
10824	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10825	for k, v := range c.header_ {
10826		reqHeaders[k] = v
10827	}
10828	reqHeaders.Set("User-Agent", c.s.userAgent())
10829	if c.ifNoneMatch_ != "" {
10830		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10831	}
10832	var body io.Reader = nil
10833	c.urlParams_.Set("alt", alt)
10834	c.urlParams_.Set("prettyPrint", "false")
10835	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}")
10836	urls += "?" + c.urlParams_.Encode()
10837	req, err := http.NewRequest("GET", urls, body)
10838	if err != nil {
10839		return nil, err
10840	}
10841	req.Header = reqHeaders
10842	googleapi.Expand(req.URL, map[string]string{
10843		"accountId":  c.accountId,
10844		"proposalId": c.proposalId,
10845	})
10846	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10847}
10848
10849// Do executes the "adexchangebuyer2.accounts.proposals.get" call.
10850// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10851// code is an error. Response headers are in either
10852// *Proposal.ServerResponse.Header or (if a response was returned at
10853// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10854// to check whether the returned error was because
10855// http.StatusNotModified was returned.
10856func (c *AccountsProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10857	gensupport.SetOptions(c.urlParams_, opts...)
10858	res, err := c.doRequest("json")
10859	if res != nil && res.StatusCode == http.StatusNotModified {
10860		if res.Body != nil {
10861			res.Body.Close()
10862		}
10863		return nil, &googleapi.Error{
10864			Code:   res.StatusCode,
10865			Header: res.Header,
10866		}
10867	}
10868	if err != nil {
10869		return nil, err
10870	}
10871	defer googleapi.CloseBody(res)
10872	if err := googleapi.CheckResponse(res); err != nil {
10873		return nil, err
10874	}
10875	ret := &Proposal{
10876		ServerResponse: googleapi.ServerResponse{
10877			Header:         res.Header,
10878			HTTPStatusCode: res.StatusCode,
10879		},
10880	}
10881	target := &ret
10882	if err := gensupport.DecodeResponse(target, res); err != nil {
10883		return nil, err
10884	}
10885	return ret, nil
10886	// {
10887	//   "description": "Gets a proposal given its ID. The proposal is returned at its head revision.",
10888	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
10889	//   "httpMethod": "GET",
10890	//   "id": "adexchangebuyer2.accounts.proposals.get",
10891	//   "parameterOrder": [
10892	//     "accountId",
10893	//     "proposalId"
10894	//   ],
10895	//   "parameters": {
10896	//     "accountId": {
10897	//       "description": "Account ID of the buyer.",
10898	//       "location": "path",
10899	//       "required": true,
10900	//       "type": "string"
10901	//     },
10902	//     "proposalId": {
10903	//       "description": "The unique ID of the proposal",
10904	//       "location": "path",
10905	//       "required": true,
10906	//       "type": "string"
10907	//     }
10908	//   },
10909	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
10910	//   "response": {
10911	//     "$ref": "Proposal"
10912	//   },
10913	//   "scopes": [
10914	//     "https://www.googleapis.com/auth/adexchange.buyer"
10915	//   ]
10916	// }
10917
10918}
10919
10920// method id "adexchangebuyer2.accounts.proposals.list":
10921
10922type AccountsProposalsListCall struct {
10923	s            *Service
10924	accountId    string
10925	urlParams_   gensupport.URLParams
10926	ifNoneMatch_ string
10927	ctx_         context.Context
10928	header_      http.Header
10929}
10930
10931// List: List proposals. A filter expression (PQL query) may be
10932// specified to filter the results. To retrieve all finalized proposals,
10933// regardless if a proposal is being renegotiated, see the
10934// FinalizedProposals resource. Note that Bidder/ChildSeat relationships
10935// differ from the usual behavior. A Bidder account can only see its
10936// child seats' proposals by specifying the ChildSeat's accountId in the
10937// request path.
10938//
10939// - accountId: Account ID of the buyer.
10940func (r *AccountsProposalsService) List(accountId string) *AccountsProposalsListCall {
10941	c := &AccountsProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10942	c.accountId = accountId
10943	return c
10944}
10945
10946// Filter sets the optional parameter "filter": An optional PQL filter
10947// query used to query for proposals. Nested repeated fields, such as
10948// proposal.deals.targetingCriterion, cannot be filtered.
10949func (c *AccountsProposalsListCall) Filter(filter string) *AccountsProposalsListCall {
10950	c.urlParams_.Set("filter", filter)
10951	return c
10952}
10953
10954// FilterSyntax sets the optional parameter "filterSyntax": Syntax the
10955// filter is written in. Current implementation defaults to PQL but in
10956// the future it will be LIST_FILTER.
10957//
10958// Possible values:
10959//   "FILTER_SYNTAX_UNSPECIFIED" - A placeholder for an undefined filter
10960// syntax.
10961//   "PQL" - PQL query syntax. Visit
10962// https://developers.google.com/ad-manager/api/pqlreference for PQL
10963// documentation and examples.
10964//   "LIST_FILTER" - API list filtering syntax. Read about syntax and
10965// usage at
10966// https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters.
10967func (c *AccountsProposalsListCall) FilterSyntax(filterSyntax string) *AccountsProposalsListCall {
10968	c.urlParams_.Set("filterSyntax", filterSyntax)
10969	return c
10970}
10971
10972// PageSize sets the optional parameter "pageSize": Requested page size.
10973// The server may return fewer results than requested. If unspecified,
10974// the server will pick an appropriate default.
10975func (c *AccountsProposalsListCall) PageSize(pageSize int64) *AccountsProposalsListCall {
10976	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10977	return c
10978}
10979
10980// PageToken sets the optional parameter "pageToken": The page token as
10981// returned from ListProposalsResponse.
10982func (c *AccountsProposalsListCall) PageToken(pageToken string) *AccountsProposalsListCall {
10983	c.urlParams_.Set("pageToken", pageToken)
10984	return c
10985}
10986
10987// Fields allows partial responses to be retrieved. See
10988// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10989// for more information.
10990func (c *AccountsProposalsListCall) Fields(s ...googleapi.Field) *AccountsProposalsListCall {
10991	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10992	return c
10993}
10994
10995// IfNoneMatch sets the optional parameter which makes the operation
10996// fail if the object's ETag matches the given value. This is useful for
10997// getting updates only after the object has changed since the last
10998// request. Use googleapi.IsNotModified to check whether the response
10999// error from Do is the result of In-None-Match.
11000func (c *AccountsProposalsListCall) IfNoneMatch(entityTag string) *AccountsProposalsListCall {
11001	c.ifNoneMatch_ = entityTag
11002	return c
11003}
11004
11005// Context sets the context to be used in this call's Do method. Any
11006// pending HTTP request will be aborted if the provided context is
11007// canceled.
11008func (c *AccountsProposalsListCall) Context(ctx context.Context) *AccountsProposalsListCall {
11009	c.ctx_ = ctx
11010	return c
11011}
11012
11013// Header returns an http.Header that can be modified by the caller to
11014// add HTTP headers to the request.
11015func (c *AccountsProposalsListCall) Header() http.Header {
11016	if c.header_ == nil {
11017		c.header_ = make(http.Header)
11018	}
11019	return c.header_
11020}
11021
11022func (c *AccountsProposalsListCall) doRequest(alt string) (*http.Response, error) {
11023	reqHeaders := make(http.Header)
11024	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11025	for k, v := range c.header_ {
11026		reqHeaders[k] = v
11027	}
11028	reqHeaders.Set("User-Agent", c.s.userAgent())
11029	if c.ifNoneMatch_ != "" {
11030		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11031	}
11032	var body io.Reader = nil
11033	c.urlParams_.Set("alt", alt)
11034	c.urlParams_.Set("prettyPrint", "false")
11035	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals")
11036	urls += "?" + c.urlParams_.Encode()
11037	req, err := http.NewRequest("GET", urls, body)
11038	if err != nil {
11039		return nil, err
11040	}
11041	req.Header = reqHeaders
11042	googleapi.Expand(req.URL, map[string]string{
11043		"accountId": c.accountId,
11044	})
11045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11046}
11047
11048// Do executes the "adexchangebuyer2.accounts.proposals.list" call.
11049// Exactly one of *ListProposalsResponse or error will be non-nil. Any
11050// non-2xx status code is an error. Response headers are in either
11051// *ListProposalsResponse.ServerResponse.Header or (if a response was
11052// returned at all) in error.(*googleapi.Error).Header. Use
11053// googleapi.IsNotModified to check whether the returned error was
11054// because http.StatusNotModified was returned.
11055func (c *AccountsProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) {
11056	gensupport.SetOptions(c.urlParams_, opts...)
11057	res, err := c.doRequest("json")
11058	if res != nil && res.StatusCode == http.StatusNotModified {
11059		if res.Body != nil {
11060			res.Body.Close()
11061		}
11062		return nil, &googleapi.Error{
11063			Code:   res.StatusCode,
11064			Header: res.Header,
11065		}
11066	}
11067	if err != nil {
11068		return nil, err
11069	}
11070	defer googleapi.CloseBody(res)
11071	if err := googleapi.CheckResponse(res); err != nil {
11072		return nil, err
11073	}
11074	ret := &ListProposalsResponse{
11075		ServerResponse: googleapi.ServerResponse{
11076			Header:         res.Header,
11077			HTTPStatusCode: res.StatusCode,
11078		},
11079	}
11080	target := &ret
11081	if err := gensupport.DecodeResponse(target, res); err != nil {
11082		return nil, err
11083	}
11084	return ret, nil
11085	// {
11086	//   "description": "List proposals. A filter expression (PQL query) may be specified to filter the results. To retrieve all finalized proposals, regardless if a proposal is being renegotiated, see the FinalizedProposals resource. Note that Bidder/ChildSeat relationships differ from the usual behavior. A Bidder account can only see its child seats' proposals by specifying the ChildSeat's accountId in the request path.",
11087	//   "flatPath": "v2beta1/accounts/{accountId}/proposals",
11088	//   "httpMethod": "GET",
11089	//   "id": "adexchangebuyer2.accounts.proposals.list",
11090	//   "parameterOrder": [
11091	//     "accountId"
11092	//   ],
11093	//   "parameters": {
11094	//     "accountId": {
11095	//       "description": "Account ID of the buyer.",
11096	//       "location": "path",
11097	//       "required": true,
11098	//       "type": "string"
11099	//     },
11100	//     "filter": {
11101	//       "description": "An optional PQL filter query used to query for proposals. Nested repeated fields, such as proposal.deals.targetingCriterion, cannot be filtered.",
11102	//       "location": "query",
11103	//       "type": "string"
11104	//     },
11105	//     "filterSyntax": {
11106	//       "description": "Syntax the filter is written in. Current implementation defaults to PQL but in the future it will be LIST_FILTER.",
11107	//       "enum": [
11108	//         "FILTER_SYNTAX_UNSPECIFIED",
11109	//         "PQL",
11110	//         "LIST_FILTER"
11111	//       ],
11112	//       "enumDescriptions": [
11113	//         "A placeholder for an undefined filter syntax.",
11114	//         "PQL query syntax. Visit https://developers.google.com/ad-manager/api/pqlreference for PQL documentation and examples.",
11115	//         "API list filtering syntax. Read about syntax and usage at https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters."
11116	//       ],
11117	//       "location": "query",
11118	//       "type": "string"
11119	//     },
11120	//     "pageSize": {
11121	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
11122	//       "format": "int32",
11123	//       "location": "query",
11124	//       "type": "integer"
11125	//     },
11126	//     "pageToken": {
11127	//       "description": "The page token as returned from ListProposalsResponse.",
11128	//       "location": "query",
11129	//       "type": "string"
11130	//     }
11131	//   },
11132	//   "path": "v2beta1/accounts/{accountId}/proposals",
11133	//   "response": {
11134	//     "$ref": "ListProposalsResponse"
11135	//   },
11136	//   "scopes": [
11137	//     "https://www.googleapis.com/auth/adexchange.buyer"
11138	//   ]
11139	// }
11140
11141}
11142
11143// Pages invokes f for each page of results.
11144// A non-nil error returned from f will halt the iteration.
11145// The provided context supersedes any context provided to the Context method.
11146func (c *AccountsProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error {
11147	c.ctx_ = ctx
11148	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11149	for {
11150		x, err := c.Do()
11151		if err != nil {
11152			return err
11153		}
11154		if err := f(x); err != nil {
11155			return err
11156		}
11157		if x.NextPageToken == "" {
11158			return nil
11159		}
11160		c.PageToken(x.NextPageToken)
11161	}
11162}
11163
11164// method id "adexchangebuyer2.accounts.proposals.pause":
11165
11166type AccountsProposalsPauseCall struct {
11167	s                    *Service
11168	accountId            string
11169	proposalId           string
11170	pauseproposalrequest *PauseProposalRequest
11171	urlParams_           gensupport.URLParams
11172	ctx_                 context.Context
11173	header_              http.Header
11174}
11175
11176// Pause: Update the given proposal to pause serving. This method will
11177// set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to
11178// true for all deals in the proposal. It is a no-op to pause an
11179// already-paused proposal. It is an error to call PauseProposal for a
11180// proposal that is not finalized or renegotiating.
11181//
11182// - accountId: Account ID of the buyer.
11183// - proposalId: The ID of the proposal to pause.
11184func (r *AccountsProposalsService) Pause(accountId string, proposalId string, pauseproposalrequest *PauseProposalRequest) *AccountsProposalsPauseCall {
11185	c := &AccountsProposalsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11186	c.accountId = accountId
11187	c.proposalId = proposalId
11188	c.pauseproposalrequest = pauseproposalrequest
11189	return c
11190}
11191
11192// Fields allows partial responses to be retrieved. See
11193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11194// for more information.
11195func (c *AccountsProposalsPauseCall) Fields(s ...googleapi.Field) *AccountsProposalsPauseCall {
11196	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11197	return c
11198}
11199
11200// Context sets the context to be used in this call's Do method. Any
11201// pending HTTP request will be aborted if the provided context is
11202// canceled.
11203func (c *AccountsProposalsPauseCall) Context(ctx context.Context) *AccountsProposalsPauseCall {
11204	c.ctx_ = ctx
11205	return c
11206}
11207
11208// Header returns an http.Header that can be modified by the caller to
11209// add HTTP headers to the request.
11210func (c *AccountsProposalsPauseCall) Header() http.Header {
11211	if c.header_ == nil {
11212		c.header_ = make(http.Header)
11213	}
11214	return c.header_
11215}
11216
11217func (c *AccountsProposalsPauseCall) doRequest(alt string) (*http.Response, error) {
11218	reqHeaders := make(http.Header)
11219	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11220	for k, v := range c.header_ {
11221		reqHeaders[k] = v
11222	}
11223	reqHeaders.Set("User-Agent", c.s.userAgent())
11224	var body io.Reader = nil
11225	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pauseproposalrequest)
11226	if err != nil {
11227		return nil, err
11228	}
11229	reqHeaders.Set("Content-Type", "application/json")
11230	c.urlParams_.Set("alt", alt)
11231	c.urlParams_.Set("prettyPrint", "false")
11232	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause")
11233	urls += "?" + c.urlParams_.Encode()
11234	req, err := http.NewRequest("POST", urls, body)
11235	if err != nil {
11236		return nil, err
11237	}
11238	req.Header = reqHeaders
11239	googleapi.Expand(req.URL, map[string]string{
11240		"accountId":  c.accountId,
11241		"proposalId": c.proposalId,
11242	})
11243	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11244}
11245
11246// Do executes the "adexchangebuyer2.accounts.proposals.pause" call.
11247// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
11248// code is an error. Response headers are in either
11249// *Proposal.ServerResponse.Header or (if a response was returned at
11250// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11251// to check whether the returned error was because
11252// http.StatusNotModified was returned.
11253func (c *AccountsProposalsPauseCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
11254	gensupport.SetOptions(c.urlParams_, opts...)
11255	res, err := c.doRequest("json")
11256	if res != nil && res.StatusCode == http.StatusNotModified {
11257		if res.Body != nil {
11258			res.Body.Close()
11259		}
11260		return nil, &googleapi.Error{
11261			Code:   res.StatusCode,
11262			Header: res.Header,
11263		}
11264	}
11265	if err != nil {
11266		return nil, err
11267	}
11268	defer googleapi.CloseBody(res)
11269	if err := googleapi.CheckResponse(res); err != nil {
11270		return nil, err
11271	}
11272	ret := &Proposal{
11273		ServerResponse: googleapi.ServerResponse{
11274			Header:         res.Header,
11275			HTTPStatusCode: res.StatusCode,
11276		},
11277	}
11278	target := &ret
11279	if err := gensupport.DecodeResponse(target, res); err != nil {
11280		return nil, err
11281	}
11282	return ret, nil
11283	// {
11284	//   "description": "Update the given proposal to pause serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all deals in the proposal. It is a no-op to pause an already-paused proposal. It is an error to call PauseProposal for a proposal that is not finalized or renegotiating.",
11285	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause",
11286	//   "httpMethod": "POST",
11287	//   "id": "adexchangebuyer2.accounts.proposals.pause",
11288	//   "parameterOrder": [
11289	//     "accountId",
11290	//     "proposalId"
11291	//   ],
11292	//   "parameters": {
11293	//     "accountId": {
11294	//       "description": "Account ID of the buyer.",
11295	//       "location": "path",
11296	//       "required": true,
11297	//       "type": "string"
11298	//     },
11299	//     "proposalId": {
11300	//       "description": "The ID of the proposal to pause.",
11301	//       "location": "path",
11302	//       "required": true,
11303	//       "type": "string"
11304	//     }
11305	//   },
11306	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause",
11307	//   "request": {
11308	//     "$ref": "PauseProposalRequest"
11309	//   },
11310	//   "response": {
11311	//     "$ref": "Proposal"
11312	//   },
11313	//   "scopes": [
11314	//     "https://www.googleapis.com/auth/adexchange.buyer"
11315	//   ]
11316	// }
11317
11318}
11319
11320// method id "adexchangebuyer2.accounts.proposals.resume":
11321
11322type AccountsProposalsResumeCall struct {
11323	s                     *Service
11324	accountId             string
11325	proposalId            string
11326	resumeproposalrequest *ResumeProposalRequest
11327	urlParams_            gensupport.URLParams
11328	ctx_                  context.Context
11329	header_               http.Header
11330}
11331
11332// Resume: Update the given proposal to resume serving. This method will
11333// set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to
11334// false for all deals in the proposal. Note that if the
11335// `has_seller_paused` bit is also set, serving will not resume until
11336// the seller also resumes. It is a no-op to resume an already-running
11337// proposal. It is an error to call ResumeProposal for a proposal that
11338// is not finalized or renegotiating.
11339//
11340// - accountId: Account ID of the buyer.
11341// - proposalId: The ID of the proposal to resume.
11342func (r *AccountsProposalsService) Resume(accountId string, proposalId string, resumeproposalrequest *ResumeProposalRequest) *AccountsProposalsResumeCall {
11343	c := &AccountsProposalsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11344	c.accountId = accountId
11345	c.proposalId = proposalId
11346	c.resumeproposalrequest = resumeproposalrequest
11347	return c
11348}
11349
11350// Fields allows partial responses to be retrieved. See
11351// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11352// for more information.
11353func (c *AccountsProposalsResumeCall) Fields(s ...googleapi.Field) *AccountsProposalsResumeCall {
11354	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11355	return c
11356}
11357
11358// Context sets the context to be used in this call's Do method. Any
11359// pending HTTP request will be aborted if the provided context is
11360// canceled.
11361func (c *AccountsProposalsResumeCall) Context(ctx context.Context) *AccountsProposalsResumeCall {
11362	c.ctx_ = ctx
11363	return c
11364}
11365
11366// Header returns an http.Header that can be modified by the caller to
11367// add HTTP headers to the request.
11368func (c *AccountsProposalsResumeCall) Header() http.Header {
11369	if c.header_ == nil {
11370		c.header_ = make(http.Header)
11371	}
11372	return c.header_
11373}
11374
11375func (c *AccountsProposalsResumeCall) doRequest(alt string) (*http.Response, error) {
11376	reqHeaders := make(http.Header)
11377	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11378	for k, v := range c.header_ {
11379		reqHeaders[k] = v
11380	}
11381	reqHeaders.Set("User-Agent", c.s.userAgent())
11382	var body io.Reader = nil
11383	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumeproposalrequest)
11384	if err != nil {
11385		return nil, err
11386	}
11387	reqHeaders.Set("Content-Type", "application/json")
11388	c.urlParams_.Set("alt", alt)
11389	c.urlParams_.Set("prettyPrint", "false")
11390	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume")
11391	urls += "?" + c.urlParams_.Encode()
11392	req, err := http.NewRequest("POST", urls, body)
11393	if err != nil {
11394		return nil, err
11395	}
11396	req.Header = reqHeaders
11397	googleapi.Expand(req.URL, map[string]string{
11398		"accountId":  c.accountId,
11399		"proposalId": c.proposalId,
11400	})
11401	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11402}
11403
11404// Do executes the "adexchangebuyer2.accounts.proposals.resume" call.
11405// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
11406// code is an error. Response headers are in either
11407// *Proposal.ServerResponse.Header or (if a response was returned at
11408// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11409// to check whether the returned error was because
11410// http.StatusNotModified was returned.
11411func (c *AccountsProposalsResumeCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
11412	gensupport.SetOptions(c.urlParams_, opts...)
11413	res, err := c.doRequest("json")
11414	if res != nil && res.StatusCode == http.StatusNotModified {
11415		if res.Body != nil {
11416			res.Body.Close()
11417		}
11418		return nil, &googleapi.Error{
11419			Code:   res.StatusCode,
11420			Header: res.Header,
11421		}
11422	}
11423	if err != nil {
11424		return nil, err
11425	}
11426	defer googleapi.CloseBody(res)
11427	if err := googleapi.CheckResponse(res); err != nil {
11428		return nil, err
11429	}
11430	ret := &Proposal{
11431		ServerResponse: googleapi.ServerResponse{
11432			Header:         res.Header,
11433			HTTPStatusCode: res.StatusCode,
11434		},
11435	}
11436	target := &ret
11437	if err := gensupport.DecodeResponse(target, res); err != nil {
11438		return nil, err
11439	}
11440	return ret, nil
11441	// {
11442	//   "description": "Update the given proposal to resume serving. This method will set the `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all deals in the proposal. Note that if the `has_seller_paused` bit is also set, serving will not resume until the seller also resumes. It is a no-op to resume an already-running proposal. It is an error to call ResumeProposal for a proposal that is not finalized or renegotiating.",
11443	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume",
11444	//   "httpMethod": "POST",
11445	//   "id": "adexchangebuyer2.accounts.proposals.resume",
11446	//   "parameterOrder": [
11447	//     "accountId",
11448	//     "proposalId"
11449	//   ],
11450	//   "parameters": {
11451	//     "accountId": {
11452	//       "description": "Account ID of the buyer.",
11453	//       "location": "path",
11454	//       "required": true,
11455	//       "type": "string"
11456	//     },
11457	//     "proposalId": {
11458	//       "description": "The ID of the proposal to resume.",
11459	//       "location": "path",
11460	//       "required": true,
11461	//       "type": "string"
11462	//     }
11463	//   },
11464	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume",
11465	//   "request": {
11466	//     "$ref": "ResumeProposalRequest"
11467	//   },
11468	//   "response": {
11469	//     "$ref": "Proposal"
11470	//   },
11471	//   "scopes": [
11472	//     "https://www.googleapis.com/auth/adexchange.buyer"
11473	//   ]
11474	// }
11475
11476}
11477
11478// method id "adexchangebuyer2.accounts.proposals.update":
11479
11480type AccountsProposalsUpdateCall struct {
11481	s          *Service
11482	accountId  string
11483	proposalId string
11484	proposal   *Proposal
11485	urlParams_ gensupport.URLParams
11486	ctx_       context.Context
11487	header_    http.Header
11488}
11489
11490// Update: Update the given proposal at the client known revision
11491// number. If the server revision has advanced since the passed-in
11492// `proposal.proposal_revision`, an `ABORTED` error message will be
11493// returned. Only the buyer-modifiable fields of the proposal will be
11494// updated. Note that the deals in the proposal will be updated to match
11495// the passed-in copy. If a passed-in deal does not have a `deal_id`,
11496// the server will assign a new unique ID and create the deal. If
11497// passed-in deal has a `deal_id`, it will be updated to match the
11498// passed-in copy. Any existing deals not present in the passed-in
11499// proposal will be deleted. It is an error to pass in a deal with a
11500// `deal_id` not present at head.
11501//
11502// - accountId: Account ID of the buyer.
11503// - proposalId: The unique ID of the proposal.
11504func (r *AccountsProposalsService) Update(accountId string, proposalId string, proposal *Proposal) *AccountsProposalsUpdateCall {
11505	c := &AccountsProposalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11506	c.accountId = accountId
11507	c.proposalId = proposalId
11508	c.proposal = proposal
11509	return c
11510}
11511
11512// Fields allows partial responses to be retrieved. See
11513// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11514// for more information.
11515func (c *AccountsProposalsUpdateCall) Fields(s ...googleapi.Field) *AccountsProposalsUpdateCall {
11516	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11517	return c
11518}
11519
11520// Context sets the context to be used in this call's Do method. Any
11521// pending HTTP request will be aborted if the provided context is
11522// canceled.
11523func (c *AccountsProposalsUpdateCall) Context(ctx context.Context) *AccountsProposalsUpdateCall {
11524	c.ctx_ = ctx
11525	return c
11526}
11527
11528// Header returns an http.Header that can be modified by the caller to
11529// add HTTP headers to the request.
11530func (c *AccountsProposalsUpdateCall) Header() http.Header {
11531	if c.header_ == nil {
11532		c.header_ = make(http.Header)
11533	}
11534	return c.header_
11535}
11536
11537func (c *AccountsProposalsUpdateCall) doRequest(alt string) (*http.Response, error) {
11538	reqHeaders := make(http.Header)
11539	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11540	for k, v := range c.header_ {
11541		reqHeaders[k] = v
11542	}
11543	reqHeaders.Set("User-Agent", c.s.userAgent())
11544	var body io.Reader = nil
11545	body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
11546	if err != nil {
11547		return nil, err
11548	}
11549	reqHeaders.Set("Content-Type", "application/json")
11550	c.urlParams_.Set("alt", alt)
11551	c.urlParams_.Set("prettyPrint", "false")
11552	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}")
11553	urls += "?" + c.urlParams_.Encode()
11554	req, err := http.NewRequest("PUT", urls, body)
11555	if err != nil {
11556		return nil, err
11557	}
11558	req.Header = reqHeaders
11559	googleapi.Expand(req.URL, map[string]string{
11560		"accountId":  c.accountId,
11561		"proposalId": c.proposalId,
11562	})
11563	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11564}
11565
11566// Do executes the "adexchangebuyer2.accounts.proposals.update" call.
11567// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
11568// code is an error. Response headers are in either
11569// *Proposal.ServerResponse.Header or (if a response was returned at
11570// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11571// to check whether the returned error was because
11572// http.StatusNotModified was returned.
11573func (c *AccountsProposalsUpdateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
11574	gensupport.SetOptions(c.urlParams_, opts...)
11575	res, err := c.doRequest("json")
11576	if res != nil && res.StatusCode == http.StatusNotModified {
11577		if res.Body != nil {
11578			res.Body.Close()
11579		}
11580		return nil, &googleapi.Error{
11581			Code:   res.StatusCode,
11582			Header: res.Header,
11583		}
11584	}
11585	if err != nil {
11586		return nil, err
11587	}
11588	defer googleapi.CloseBody(res)
11589	if err := googleapi.CheckResponse(res); err != nil {
11590		return nil, err
11591	}
11592	ret := &Proposal{
11593		ServerResponse: googleapi.ServerResponse{
11594			Header:         res.Header,
11595			HTTPStatusCode: res.StatusCode,
11596		},
11597	}
11598	target := &ret
11599	if err := gensupport.DecodeResponse(target, res); err != nil {
11600		return nil, err
11601	}
11602	return ret, nil
11603	// {
11604	//   "description": "Update the given proposal at the client known revision number. If the server revision has advanced since the passed-in `proposal.proposal_revision`, an `ABORTED` error message will be returned. Only the buyer-modifiable fields of the proposal will be updated. Note that the deals in the proposal will be updated to match the passed-in copy. If a passed-in deal does not have a `deal_id`, the server will assign a new unique ID and create the deal. If passed-in deal has a `deal_id`, it will be updated to match the passed-in copy. Any existing deals not present in the passed-in proposal will be deleted. It is an error to pass in a deal with a `deal_id` not present at head.",
11605	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
11606	//   "httpMethod": "PUT",
11607	//   "id": "adexchangebuyer2.accounts.proposals.update",
11608	//   "parameterOrder": [
11609	//     "accountId",
11610	//     "proposalId"
11611	//   ],
11612	//   "parameters": {
11613	//     "accountId": {
11614	//       "description": "Account ID of the buyer.",
11615	//       "location": "path",
11616	//       "required": true,
11617	//       "type": "string"
11618	//     },
11619	//     "proposalId": {
11620	//       "description": "The unique ID of the proposal.",
11621	//       "location": "path",
11622	//       "required": true,
11623	//       "type": "string"
11624	//     }
11625	//   },
11626	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
11627	//   "request": {
11628	//     "$ref": "Proposal"
11629	//   },
11630	//   "response": {
11631	//     "$ref": "Proposal"
11632	//   },
11633	//   "scopes": [
11634	//     "https://www.googleapis.com/auth/adexchange.buyer"
11635	//   ]
11636	// }
11637
11638}
11639
11640// method id "adexchangebuyer2.accounts.publisherProfiles.get":
11641
11642type AccountsPublisherProfilesGetCall struct {
11643	s                  *Service
11644	accountId          string
11645	publisherProfileId string
11646	urlParams_         gensupport.URLParams
11647	ifNoneMatch_       string
11648	ctx_               context.Context
11649	header_            http.Header
11650}
11651
11652// Get: Gets the requested publisher profile by id.
11653//
11654// - accountId: Account ID of the buyer.
11655// - publisherProfileId: The id for the publisher profile to get.
11656func (r *AccountsPublisherProfilesService) Get(accountId string, publisherProfileId string) *AccountsPublisherProfilesGetCall {
11657	c := &AccountsPublisherProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11658	c.accountId = accountId
11659	c.publisherProfileId = publisherProfileId
11660	return c
11661}
11662
11663// Fields allows partial responses to be retrieved. See
11664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11665// for more information.
11666func (c *AccountsPublisherProfilesGetCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesGetCall {
11667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11668	return c
11669}
11670
11671// IfNoneMatch sets the optional parameter which makes the operation
11672// fail if the object's ETag matches the given value. This is useful for
11673// getting updates only after the object has changed since the last
11674// request. Use googleapi.IsNotModified to check whether the response
11675// error from Do is the result of In-None-Match.
11676func (c *AccountsPublisherProfilesGetCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesGetCall {
11677	c.ifNoneMatch_ = entityTag
11678	return c
11679}
11680
11681// Context sets the context to be used in this call's Do method. Any
11682// pending HTTP request will be aborted if the provided context is
11683// canceled.
11684func (c *AccountsPublisherProfilesGetCall) Context(ctx context.Context) *AccountsPublisherProfilesGetCall {
11685	c.ctx_ = ctx
11686	return c
11687}
11688
11689// Header returns an http.Header that can be modified by the caller to
11690// add HTTP headers to the request.
11691func (c *AccountsPublisherProfilesGetCall) Header() http.Header {
11692	if c.header_ == nil {
11693		c.header_ = make(http.Header)
11694	}
11695	return c.header_
11696}
11697
11698func (c *AccountsPublisherProfilesGetCall) doRequest(alt string) (*http.Response, error) {
11699	reqHeaders := make(http.Header)
11700	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11701	for k, v := range c.header_ {
11702		reqHeaders[k] = v
11703	}
11704	reqHeaders.Set("User-Agent", c.s.userAgent())
11705	if c.ifNoneMatch_ != "" {
11706		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11707	}
11708	var body io.Reader = nil
11709	c.urlParams_.Set("alt", alt)
11710	c.urlParams_.Set("prettyPrint", "false")
11711	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}")
11712	urls += "?" + c.urlParams_.Encode()
11713	req, err := http.NewRequest("GET", urls, body)
11714	if err != nil {
11715		return nil, err
11716	}
11717	req.Header = reqHeaders
11718	googleapi.Expand(req.URL, map[string]string{
11719		"accountId":          c.accountId,
11720		"publisherProfileId": c.publisherProfileId,
11721	})
11722	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11723}
11724
11725// Do executes the "adexchangebuyer2.accounts.publisherProfiles.get" call.
11726// Exactly one of *PublisherProfile or error will be non-nil. Any
11727// non-2xx status code is an error. Response headers are in either
11728// *PublisherProfile.ServerResponse.Header or (if a response was
11729// returned at all) in error.(*googleapi.Error).Header. Use
11730// googleapi.IsNotModified to check whether the returned error was
11731// because http.StatusNotModified was returned.
11732func (c *AccountsPublisherProfilesGetCall) Do(opts ...googleapi.CallOption) (*PublisherProfile, error) {
11733	gensupport.SetOptions(c.urlParams_, opts...)
11734	res, err := c.doRequest("json")
11735	if res != nil && res.StatusCode == http.StatusNotModified {
11736		if res.Body != nil {
11737			res.Body.Close()
11738		}
11739		return nil, &googleapi.Error{
11740			Code:   res.StatusCode,
11741			Header: res.Header,
11742		}
11743	}
11744	if err != nil {
11745		return nil, err
11746	}
11747	defer googleapi.CloseBody(res)
11748	if err := googleapi.CheckResponse(res); err != nil {
11749		return nil, err
11750	}
11751	ret := &PublisherProfile{
11752		ServerResponse: googleapi.ServerResponse{
11753			Header:         res.Header,
11754			HTTPStatusCode: res.StatusCode,
11755		},
11756	}
11757	target := &ret
11758	if err := gensupport.DecodeResponse(target, res); err != nil {
11759		return nil, err
11760	}
11761	return ret, nil
11762	// {
11763	//   "description": "Gets the requested publisher profile by id.",
11764	//   "flatPath": "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}",
11765	//   "httpMethod": "GET",
11766	//   "id": "adexchangebuyer2.accounts.publisherProfiles.get",
11767	//   "parameterOrder": [
11768	//     "accountId",
11769	//     "publisherProfileId"
11770	//   ],
11771	//   "parameters": {
11772	//     "accountId": {
11773	//       "description": "Account ID of the buyer.",
11774	//       "location": "path",
11775	//       "required": true,
11776	//       "type": "string"
11777	//     },
11778	//     "publisherProfileId": {
11779	//       "description": "The id for the publisher profile to get.",
11780	//       "location": "path",
11781	//       "required": true,
11782	//       "type": "string"
11783	//     }
11784	//   },
11785	//   "path": "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}",
11786	//   "response": {
11787	//     "$ref": "PublisherProfile"
11788	//   },
11789	//   "scopes": [
11790	//     "https://www.googleapis.com/auth/adexchange.buyer"
11791	//   ]
11792	// }
11793
11794}
11795
11796// method id "adexchangebuyer2.accounts.publisherProfiles.list":
11797
11798type AccountsPublisherProfilesListCall struct {
11799	s            *Service
11800	accountId    string
11801	urlParams_   gensupport.URLParams
11802	ifNoneMatch_ string
11803	ctx_         context.Context
11804	header_      http.Header
11805}
11806
11807// List: List all publisher profiles visible to the buyer
11808//
11809// - accountId: Account ID of the buyer.
11810func (r *AccountsPublisherProfilesService) List(accountId string) *AccountsPublisherProfilesListCall {
11811	c := &AccountsPublisherProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11812	c.accountId = accountId
11813	return c
11814}
11815
11816// PageSize sets the optional parameter "pageSize": Specify the number
11817// of results to include per page.
11818func (c *AccountsPublisherProfilesListCall) PageSize(pageSize int64) *AccountsPublisherProfilesListCall {
11819	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11820	return c
11821}
11822
11823// PageToken sets the optional parameter "pageToken": The page token as
11824// return from ListPublisherProfilesResponse.
11825func (c *AccountsPublisherProfilesListCall) PageToken(pageToken string) *AccountsPublisherProfilesListCall {
11826	c.urlParams_.Set("pageToken", pageToken)
11827	return c
11828}
11829
11830// Fields allows partial responses to be retrieved. See
11831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11832// for more information.
11833func (c *AccountsPublisherProfilesListCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesListCall {
11834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11835	return c
11836}
11837
11838// IfNoneMatch sets the optional parameter which makes the operation
11839// fail if the object's ETag matches the given value. This is useful for
11840// getting updates only after the object has changed since the last
11841// request. Use googleapi.IsNotModified to check whether the response
11842// error from Do is the result of In-None-Match.
11843func (c *AccountsPublisherProfilesListCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesListCall {
11844	c.ifNoneMatch_ = entityTag
11845	return c
11846}
11847
11848// Context sets the context to be used in this call's Do method. Any
11849// pending HTTP request will be aborted if the provided context is
11850// canceled.
11851func (c *AccountsPublisherProfilesListCall) Context(ctx context.Context) *AccountsPublisherProfilesListCall {
11852	c.ctx_ = ctx
11853	return c
11854}
11855
11856// Header returns an http.Header that can be modified by the caller to
11857// add HTTP headers to the request.
11858func (c *AccountsPublisherProfilesListCall) Header() http.Header {
11859	if c.header_ == nil {
11860		c.header_ = make(http.Header)
11861	}
11862	return c.header_
11863}
11864
11865func (c *AccountsPublisherProfilesListCall) doRequest(alt string) (*http.Response, error) {
11866	reqHeaders := make(http.Header)
11867	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
11868	for k, v := range c.header_ {
11869		reqHeaders[k] = v
11870	}
11871	reqHeaders.Set("User-Agent", c.s.userAgent())
11872	if c.ifNoneMatch_ != "" {
11873		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11874	}
11875	var body io.Reader = nil
11876	c.urlParams_.Set("alt", alt)
11877	c.urlParams_.Set("prettyPrint", "false")
11878	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles")
11879	urls += "?" + c.urlParams_.Encode()
11880	req, err := http.NewRequest("GET", urls, body)
11881	if err != nil {
11882		return nil, err
11883	}
11884	req.Header = reqHeaders
11885	googleapi.Expand(req.URL, map[string]string{
11886		"accountId": c.accountId,
11887	})
11888	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11889}
11890
11891// Do executes the "adexchangebuyer2.accounts.publisherProfiles.list" call.
11892// Exactly one of *ListPublisherProfilesResponse or error will be
11893// non-nil. Any non-2xx status code is an error. Response headers are in
11894// either *ListPublisherProfilesResponse.ServerResponse.Header or (if a
11895// response was returned at all) in error.(*googleapi.Error).Header. Use
11896// googleapi.IsNotModified to check whether the returned error was
11897// because http.StatusNotModified was returned.
11898func (c *AccountsPublisherProfilesListCall) Do(opts ...googleapi.CallOption) (*ListPublisherProfilesResponse, error) {
11899	gensupport.SetOptions(c.urlParams_, opts...)
11900	res, err := c.doRequest("json")
11901	if res != nil && res.StatusCode == http.StatusNotModified {
11902		if res.Body != nil {
11903			res.Body.Close()
11904		}
11905		return nil, &googleapi.Error{
11906			Code:   res.StatusCode,
11907			Header: res.Header,
11908		}
11909	}
11910	if err != nil {
11911		return nil, err
11912	}
11913	defer googleapi.CloseBody(res)
11914	if err := googleapi.CheckResponse(res); err != nil {
11915		return nil, err
11916	}
11917	ret := &ListPublisherProfilesResponse{
11918		ServerResponse: googleapi.ServerResponse{
11919			Header:         res.Header,
11920			HTTPStatusCode: res.StatusCode,
11921		},
11922	}
11923	target := &ret
11924	if err := gensupport.DecodeResponse(target, res); err != nil {
11925		return nil, err
11926	}
11927	return ret, nil
11928	// {
11929	//   "description": "List all publisher profiles visible to the buyer",
11930	//   "flatPath": "v2beta1/accounts/{accountId}/publisherProfiles",
11931	//   "httpMethod": "GET",
11932	//   "id": "adexchangebuyer2.accounts.publisherProfiles.list",
11933	//   "parameterOrder": [
11934	//     "accountId"
11935	//   ],
11936	//   "parameters": {
11937	//     "accountId": {
11938	//       "description": "Account ID of the buyer.",
11939	//       "location": "path",
11940	//       "required": true,
11941	//       "type": "string"
11942	//     },
11943	//     "pageSize": {
11944	//       "description": "Specify the number of results to include per page.",
11945	//       "format": "int32",
11946	//       "location": "query",
11947	//       "type": "integer"
11948	//     },
11949	//     "pageToken": {
11950	//       "description": "The page token as return from ListPublisherProfilesResponse.",
11951	//       "location": "query",
11952	//       "type": "string"
11953	//     }
11954	//   },
11955	//   "path": "v2beta1/accounts/{accountId}/publisherProfiles",
11956	//   "response": {
11957	//     "$ref": "ListPublisherProfilesResponse"
11958	//   },
11959	//   "scopes": [
11960	//     "https://www.googleapis.com/auth/adexchange.buyer"
11961	//   ]
11962	// }
11963
11964}
11965
11966// Pages invokes f for each page of results.
11967// A non-nil error returned from f will halt the iteration.
11968// The provided context supersedes any context provided to the Context method.
11969func (c *AccountsPublisherProfilesListCall) Pages(ctx context.Context, f func(*ListPublisherProfilesResponse) error) error {
11970	c.ctx_ = ctx
11971	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11972	for {
11973		x, err := c.Do()
11974		if err != nil {
11975			return err
11976		}
11977		if err := f(x); err != nil {
11978			return err
11979		}
11980		if x.NextPageToken == "" {
11981			return nil
11982		}
11983		c.PageToken(x.NextPageToken)
11984	}
11985}
11986
11987// method id "adexchangebuyer2.bidders.accounts.filterSets.create":
11988
11989type BiddersAccountsFilterSetsCreateCall struct {
11990	s          *Service
11991	ownerName  string
11992	filterset  *FilterSet
11993	urlParams_ gensupport.URLParams
11994	ctx_       context.Context
11995	header_    http.Header
11996}
11997
11998// Create: Creates the specified filter set for the account with the
11999// given account ID.
12000//
12001// - ownerName: Name of the owner (bidder or account) of the filter set
12002//   to be created. For example: - For a bidder-level filter set for
12003//   bidder 123: `bidders/123` - For an account-level filter set for the
12004//   buyer account representing bidder 123: `bidders/123/accounts/123` -
12005//   For an account-level filter set for the child seat buyer account
12006//   456 whose bidder is 123: `bidders/123/accounts/456`.
12007func (r *BiddersAccountsFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersAccountsFilterSetsCreateCall {
12008	c := &BiddersAccountsFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12009	c.ownerName = ownerName
12010	c.filterset = filterset
12011	return c
12012}
12013
12014// IsTransient sets the optional parameter "isTransient": Whether the
12015// filter set is transient, or should be persisted indefinitely. By
12016// default, filter sets are not transient. If transient, it will be
12017// available for at least 1 hour after creation.
12018func (c *BiddersAccountsFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersAccountsFilterSetsCreateCall {
12019	c.urlParams_.Set("isTransient", fmt.Sprint(isTransient))
12020	return c
12021}
12022
12023// Fields allows partial responses to be retrieved. See
12024// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12025// for more information.
12026func (c *BiddersAccountsFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsCreateCall {
12027	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12028	return c
12029}
12030
12031// Context sets the context to be used in this call's Do method. Any
12032// pending HTTP request will be aborted if the provided context is
12033// canceled.
12034func (c *BiddersAccountsFilterSetsCreateCall) Context(ctx context.Context) *BiddersAccountsFilterSetsCreateCall {
12035	c.ctx_ = ctx
12036	return c
12037}
12038
12039// Header returns an http.Header that can be modified by the caller to
12040// add HTTP headers to the request.
12041func (c *BiddersAccountsFilterSetsCreateCall) Header() http.Header {
12042	if c.header_ == nil {
12043		c.header_ = make(http.Header)
12044	}
12045	return c.header_
12046}
12047
12048func (c *BiddersAccountsFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) {
12049	reqHeaders := make(http.Header)
12050	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12051	for k, v := range c.header_ {
12052		reqHeaders[k] = v
12053	}
12054	reqHeaders.Set("User-Agent", c.s.userAgent())
12055	var body io.Reader = nil
12056	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filterset)
12057	if err != nil {
12058		return nil, err
12059	}
12060	reqHeaders.Set("Content-Type", "application/json")
12061	c.urlParams_.Set("alt", alt)
12062	c.urlParams_.Set("prettyPrint", "false")
12063	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
12064	urls += "?" + c.urlParams_.Encode()
12065	req, err := http.NewRequest("POST", urls, body)
12066	if err != nil {
12067		return nil, err
12068	}
12069	req.Header = reqHeaders
12070	googleapi.Expand(req.URL, map[string]string{
12071		"ownerName": c.ownerName,
12072	})
12073	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12074}
12075
12076// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.create" call.
12077// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
12078// status code is an error. Response headers are in either
12079// *FilterSet.ServerResponse.Header or (if a response was returned at
12080// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12081// to check whether the returned error was because
12082// http.StatusNotModified was returned.
12083func (c *BiddersAccountsFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
12084	gensupport.SetOptions(c.urlParams_, opts...)
12085	res, err := c.doRequest("json")
12086	if res != nil && res.StatusCode == http.StatusNotModified {
12087		if res.Body != nil {
12088			res.Body.Close()
12089		}
12090		return nil, &googleapi.Error{
12091			Code:   res.StatusCode,
12092			Header: res.Header,
12093		}
12094	}
12095	if err != nil {
12096		return nil, err
12097	}
12098	defer googleapi.CloseBody(res)
12099	if err := googleapi.CheckResponse(res); err != nil {
12100		return nil, err
12101	}
12102	ret := &FilterSet{
12103		ServerResponse: googleapi.ServerResponse{
12104			Header:         res.Header,
12105			HTTPStatusCode: res.StatusCode,
12106		},
12107	}
12108	target := &ret
12109	if err := gensupport.DecodeResponse(target, res); err != nil {
12110		return nil, err
12111	}
12112	return ret, nil
12113	// {
12114	//   "description": "Creates the specified filter set for the account with the given account ID.",
12115	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets",
12116	//   "httpMethod": "POST",
12117	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.create",
12118	//   "parameterOrder": [
12119	//     "ownerName"
12120	//   ],
12121	//   "parameters": {
12122	//     "isTransient": {
12123	//       "description": "Whether the filter set is transient, or should be persisted indefinitely. By default, filter sets are not transient. If transient, it will be available for at least 1 hour after creation.",
12124	//       "location": "query",
12125	//       "type": "boolean"
12126	//     },
12127	//     "ownerName": {
12128	//       "description": "Name of the owner (bidder or account) of the filter set to be created. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`",
12129	//       "location": "path",
12130	//       "pattern": "^bidders/[^/]+/accounts/[^/]+$",
12131	//       "required": true,
12132	//       "type": "string"
12133	//     }
12134	//   },
12135	//   "path": "v2beta1/{+ownerName}/filterSets",
12136	//   "request": {
12137	//     "$ref": "FilterSet"
12138	//   },
12139	//   "response": {
12140	//     "$ref": "FilterSet"
12141	//   },
12142	//   "scopes": [
12143	//     "https://www.googleapis.com/auth/adexchange.buyer"
12144	//   ]
12145	// }
12146
12147}
12148
12149// method id "adexchangebuyer2.bidders.accounts.filterSets.delete":
12150
12151type BiddersAccountsFilterSetsDeleteCall struct {
12152	s          *Service
12153	name       string
12154	urlParams_ gensupport.URLParams
12155	ctx_       context.Context
12156	header_    http.Header
12157}
12158
12159// Delete: Deletes the requested filter set from the account with the
12160// given account ID.
12161//
12162// - name: Full name of the resource to delete. For example: - For a
12163//   bidder-level filter set for bidder 123:
12164//   `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
12167//   filter set for the child seat buyer account 456 whose bidder is
12168//   123: `bidders/123/accounts/456/filterSets/abc`.
12169func (r *BiddersAccountsFilterSetsService) Delete(name string) *BiddersAccountsFilterSetsDeleteCall {
12170	c := &BiddersAccountsFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12171	c.name = name
12172	return c
12173}
12174
12175// Fields allows partial responses to be retrieved. See
12176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12177// for more information.
12178func (c *BiddersAccountsFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsDeleteCall {
12179	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12180	return c
12181}
12182
12183// Context sets the context to be used in this call's Do method. Any
12184// pending HTTP request will be aborted if the provided context is
12185// canceled.
12186func (c *BiddersAccountsFilterSetsDeleteCall) Context(ctx context.Context) *BiddersAccountsFilterSetsDeleteCall {
12187	c.ctx_ = ctx
12188	return c
12189}
12190
12191// Header returns an http.Header that can be modified by the caller to
12192// add HTTP headers to the request.
12193func (c *BiddersAccountsFilterSetsDeleteCall) Header() http.Header {
12194	if c.header_ == nil {
12195		c.header_ = make(http.Header)
12196	}
12197	return c.header_
12198}
12199
12200func (c *BiddersAccountsFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
12201	reqHeaders := make(http.Header)
12202	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12203	for k, v := range c.header_ {
12204		reqHeaders[k] = v
12205	}
12206	reqHeaders.Set("User-Agent", c.s.userAgent())
12207	var body io.Reader = nil
12208	c.urlParams_.Set("alt", alt)
12209	c.urlParams_.Set("prettyPrint", "false")
12210	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12211	urls += "?" + c.urlParams_.Encode()
12212	req, err := http.NewRequest("DELETE", urls, body)
12213	if err != nil {
12214		return nil, err
12215	}
12216	req.Header = reqHeaders
12217	googleapi.Expand(req.URL, map[string]string{
12218		"name": c.name,
12219	})
12220	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12221}
12222
12223// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.delete" call.
12224// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12225// code is an error. Response headers are in either
12226// *Empty.ServerResponse.Header or (if a response was returned at all)
12227// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12228// check whether the returned error was because http.StatusNotModified
12229// was returned.
12230func (c *BiddersAccountsFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12231	gensupport.SetOptions(c.urlParams_, opts...)
12232	res, err := c.doRequest("json")
12233	if res != nil && res.StatusCode == http.StatusNotModified {
12234		if res.Body != nil {
12235			res.Body.Close()
12236		}
12237		return nil, &googleapi.Error{
12238			Code:   res.StatusCode,
12239			Header: res.Header,
12240		}
12241	}
12242	if err != nil {
12243		return nil, err
12244	}
12245	defer googleapi.CloseBody(res)
12246	if err := googleapi.CheckResponse(res); err != nil {
12247		return nil, err
12248	}
12249	ret := &Empty{
12250		ServerResponse: googleapi.ServerResponse{
12251			Header:         res.Header,
12252			HTTPStatusCode: res.StatusCode,
12253		},
12254	}
12255	target := &ret
12256	if err := gensupport.DecodeResponse(target, res); err != nil {
12257		return nil, err
12258	}
12259	return ret, nil
12260	// {
12261	//   "description": "Deletes the requested filter set from the account with the given account ID.",
12262	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}",
12263	//   "httpMethod": "DELETE",
12264	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.delete",
12265	//   "parameterOrder": [
12266	//     "name"
12267	//   ],
12268	//   "parameters": {
12269	//     "name": {
12270	//       "description": "Full name of the resource to delete. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12271	//       "location": "path",
12272	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12273	//       "required": true,
12274	//       "type": "string"
12275	//     }
12276	//   },
12277	//   "path": "v2beta1/{+name}",
12278	//   "response": {
12279	//     "$ref": "Empty"
12280	//   },
12281	//   "scopes": [
12282	//     "https://www.googleapis.com/auth/adexchange.buyer"
12283	//   ]
12284	// }
12285
12286}
12287
12288// method id "adexchangebuyer2.bidders.accounts.filterSets.get":
12289
12290type BiddersAccountsFilterSetsGetCall struct {
12291	s            *Service
12292	name         string
12293	urlParams_   gensupport.URLParams
12294	ifNoneMatch_ string
12295	ctx_         context.Context
12296	header_      http.Header
12297}
12298
12299// Get: Retrieves the requested filter set for the account with the
12300// given account ID.
12301//
12302// - name: Full name of the resource being requested. For example: - For
12303//   a bidder-level filter set for bidder 123:
12304//   `bidders/123/filterSets/abc` - For an account-level filter set for
12305//   the buyer account representing bidder 123:
12306//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
12307//   filter set for the child seat buyer account 456 whose bidder is
12308//   123: `bidders/123/accounts/456/filterSets/abc`.
12309func (r *BiddersAccountsFilterSetsService) Get(name string) *BiddersAccountsFilterSetsGetCall {
12310	c := &BiddersAccountsFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12311	c.name = name
12312	return c
12313}
12314
12315// Fields allows partial responses to be retrieved. See
12316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12317// for more information.
12318func (c *BiddersAccountsFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsGetCall {
12319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12320	return c
12321}
12322
12323// IfNoneMatch sets the optional parameter which makes the operation
12324// fail if the object's ETag matches the given value. This is useful for
12325// getting updates only after the object has changed since the last
12326// request. Use googleapi.IsNotModified to check whether the response
12327// error from Do is the result of In-None-Match.
12328func (c *BiddersAccountsFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsGetCall {
12329	c.ifNoneMatch_ = entityTag
12330	return c
12331}
12332
12333// Context sets the context to be used in this call's Do method. Any
12334// pending HTTP request will be aborted if the provided context is
12335// canceled.
12336func (c *BiddersAccountsFilterSetsGetCall) Context(ctx context.Context) *BiddersAccountsFilterSetsGetCall {
12337	c.ctx_ = ctx
12338	return c
12339}
12340
12341// Header returns an http.Header that can be modified by the caller to
12342// add HTTP headers to the request.
12343func (c *BiddersAccountsFilterSetsGetCall) Header() http.Header {
12344	if c.header_ == nil {
12345		c.header_ = make(http.Header)
12346	}
12347	return c.header_
12348}
12349
12350func (c *BiddersAccountsFilterSetsGetCall) doRequest(alt string) (*http.Response, error) {
12351	reqHeaders := make(http.Header)
12352	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12353	for k, v := range c.header_ {
12354		reqHeaders[k] = v
12355	}
12356	reqHeaders.Set("User-Agent", c.s.userAgent())
12357	if c.ifNoneMatch_ != "" {
12358		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12359	}
12360	var body io.Reader = nil
12361	c.urlParams_.Set("alt", alt)
12362	c.urlParams_.Set("prettyPrint", "false")
12363	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12364	urls += "?" + c.urlParams_.Encode()
12365	req, err := http.NewRequest("GET", urls, body)
12366	if err != nil {
12367		return nil, err
12368	}
12369	req.Header = reqHeaders
12370	googleapi.Expand(req.URL, map[string]string{
12371		"name": c.name,
12372	})
12373	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12374}
12375
12376// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.get" call.
12377// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
12378// status code is an error. Response headers are in either
12379// *FilterSet.ServerResponse.Header or (if a response was returned at
12380// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12381// to check whether the returned error was because
12382// http.StatusNotModified was returned.
12383func (c *BiddersAccountsFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
12384	gensupport.SetOptions(c.urlParams_, opts...)
12385	res, err := c.doRequest("json")
12386	if res != nil && res.StatusCode == http.StatusNotModified {
12387		if res.Body != nil {
12388			res.Body.Close()
12389		}
12390		return nil, &googleapi.Error{
12391			Code:   res.StatusCode,
12392			Header: res.Header,
12393		}
12394	}
12395	if err != nil {
12396		return nil, err
12397	}
12398	defer googleapi.CloseBody(res)
12399	if err := googleapi.CheckResponse(res); err != nil {
12400		return nil, err
12401	}
12402	ret := &FilterSet{
12403		ServerResponse: googleapi.ServerResponse{
12404			Header:         res.Header,
12405			HTTPStatusCode: res.StatusCode,
12406		},
12407	}
12408	target := &ret
12409	if err := gensupport.DecodeResponse(target, res); err != nil {
12410		return nil, err
12411	}
12412	return ret, nil
12413	// {
12414	//   "description": "Retrieves the requested filter set for the account with the given account ID.",
12415	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}",
12416	//   "httpMethod": "GET",
12417	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.get",
12418	//   "parameterOrder": [
12419	//     "name"
12420	//   ],
12421	//   "parameters": {
12422	//     "name": {
12423	//       "description": "Full name of the resource being requested. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12424	//       "location": "path",
12425	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12426	//       "required": true,
12427	//       "type": "string"
12428	//     }
12429	//   },
12430	//   "path": "v2beta1/{+name}",
12431	//   "response": {
12432	//     "$ref": "FilterSet"
12433	//   },
12434	//   "scopes": [
12435	//     "https://www.googleapis.com/auth/adexchange.buyer"
12436	//   ]
12437	// }
12438
12439}
12440
12441// method id "adexchangebuyer2.bidders.accounts.filterSets.list":
12442
12443type BiddersAccountsFilterSetsListCall struct {
12444	s            *Service
12445	ownerName    string
12446	urlParams_   gensupport.URLParams
12447	ifNoneMatch_ string
12448	ctx_         context.Context
12449	header_      http.Header
12450}
12451
12452// List: Lists all filter sets for the account with the given account
12453// ID.
12454//
12455// - ownerName: Name of the owner (bidder or account) of the filter sets
12456//   to be listed. For example: - For a bidder-level filter set for
12457//   bidder 123: `bidders/123` - For an account-level filter set for the
12458//   buyer account representing bidder 123: `bidders/123/accounts/123` -
12459//   For an account-level filter set for the child seat buyer account
12460//   456 whose bidder is 123: `bidders/123/accounts/456`.
12461func (r *BiddersAccountsFilterSetsService) List(ownerName string) *BiddersAccountsFilterSetsListCall {
12462	c := &BiddersAccountsFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12463	c.ownerName = ownerName
12464	return c
12465}
12466
12467// PageSize sets the optional parameter "pageSize": Requested page size.
12468// The server may return fewer results than requested. If unspecified,
12469// the server will pick an appropriate default.
12470func (c *BiddersAccountsFilterSetsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsListCall {
12471	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12472	return c
12473}
12474
12475// PageToken sets the optional parameter "pageToken": A token
12476// identifying a page of results the server should return. Typically,
12477// this is the value of ListFilterSetsResponse.nextPageToken returned
12478// from the previous call to the accounts.filterSets.list method.
12479func (c *BiddersAccountsFilterSetsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsListCall {
12480	c.urlParams_.Set("pageToken", pageToken)
12481	return c
12482}
12483
12484// Fields allows partial responses to be retrieved. See
12485// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12486// for more information.
12487func (c *BiddersAccountsFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsListCall {
12488	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12489	return c
12490}
12491
12492// IfNoneMatch sets the optional parameter which makes the operation
12493// fail if the object's ETag matches the given value. This is useful for
12494// getting updates only after the object has changed since the last
12495// request. Use googleapi.IsNotModified to check whether the response
12496// error from Do is the result of In-None-Match.
12497func (c *BiddersAccountsFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsListCall {
12498	c.ifNoneMatch_ = entityTag
12499	return c
12500}
12501
12502// Context sets the context to be used in this call's Do method. Any
12503// pending HTTP request will be aborted if the provided context is
12504// canceled.
12505func (c *BiddersAccountsFilterSetsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsListCall {
12506	c.ctx_ = ctx
12507	return c
12508}
12509
12510// Header returns an http.Header that can be modified by the caller to
12511// add HTTP headers to the request.
12512func (c *BiddersAccountsFilterSetsListCall) Header() http.Header {
12513	if c.header_ == nil {
12514		c.header_ = make(http.Header)
12515	}
12516	return c.header_
12517}
12518
12519func (c *BiddersAccountsFilterSetsListCall) doRequest(alt string) (*http.Response, error) {
12520	reqHeaders := make(http.Header)
12521	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12522	for k, v := range c.header_ {
12523		reqHeaders[k] = v
12524	}
12525	reqHeaders.Set("User-Agent", c.s.userAgent())
12526	if c.ifNoneMatch_ != "" {
12527		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12528	}
12529	var body io.Reader = nil
12530	c.urlParams_.Set("alt", alt)
12531	c.urlParams_.Set("prettyPrint", "false")
12532	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
12533	urls += "?" + c.urlParams_.Encode()
12534	req, err := http.NewRequest("GET", urls, body)
12535	if err != nil {
12536		return nil, err
12537	}
12538	req.Header = reqHeaders
12539	googleapi.Expand(req.URL, map[string]string{
12540		"ownerName": c.ownerName,
12541	})
12542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12543}
12544
12545// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.list" call.
12546// Exactly one of *ListFilterSetsResponse or error will be non-nil. Any
12547// non-2xx status code is an error. Response headers are in either
12548// *ListFilterSetsResponse.ServerResponse.Header or (if a response was
12549// returned at all) in error.(*googleapi.Error).Header. Use
12550// googleapi.IsNotModified to check whether the returned error was
12551// because http.StatusNotModified was returned.
12552func (c *BiddersAccountsFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) {
12553	gensupport.SetOptions(c.urlParams_, opts...)
12554	res, err := c.doRequest("json")
12555	if res != nil && res.StatusCode == http.StatusNotModified {
12556		if res.Body != nil {
12557			res.Body.Close()
12558		}
12559		return nil, &googleapi.Error{
12560			Code:   res.StatusCode,
12561			Header: res.Header,
12562		}
12563	}
12564	if err != nil {
12565		return nil, err
12566	}
12567	defer googleapi.CloseBody(res)
12568	if err := googleapi.CheckResponse(res); err != nil {
12569		return nil, err
12570	}
12571	ret := &ListFilterSetsResponse{
12572		ServerResponse: googleapi.ServerResponse{
12573			Header:         res.Header,
12574			HTTPStatusCode: res.StatusCode,
12575		},
12576	}
12577	target := &ret
12578	if err := gensupport.DecodeResponse(target, res); err != nil {
12579		return nil, err
12580	}
12581	return ret, nil
12582	// {
12583	//   "description": "Lists all filter sets for the account with the given account ID.",
12584	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets",
12585	//   "httpMethod": "GET",
12586	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.list",
12587	//   "parameterOrder": [
12588	//     "ownerName"
12589	//   ],
12590	//   "parameters": {
12591	//     "ownerName": {
12592	//       "description": "Name of the owner (bidder or account) of the filter sets to be listed. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`",
12593	//       "location": "path",
12594	//       "pattern": "^bidders/[^/]+/accounts/[^/]+$",
12595	//       "required": true,
12596	//       "type": "string"
12597	//     },
12598	//     "pageSize": {
12599	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
12600	//       "format": "int32",
12601	//       "location": "query",
12602	//       "type": "integer"
12603	//     },
12604	//     "pageToken": {
12605	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilterSetsResponse.nextPageToken returned from the previous call to the accounts.filterSets.list method.",
12606	//       "location": "query",
12607	//       "type": "string"
12608	//     }
12609	//   },
12610	//   "path": "v2beta1/{+ownerName}/filterSets",
12611	//   "response": {
12612	//     "$ref": "ListFilterSetsResponse"
12613	//   },
12614	//   "scopes": [
12615	//     "https://www.googleapis.com/auth/adexchange.buyer"
12616	//   ]
12617	// }
12618
12619}
12620
12621// Pages invokes f for each page of results.
12622// A non-nil error returned from f will halt the iteration.
12623// The provided context supersedes any context provided to the Context method.
12624func (c *BiddersAccountsFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error {
12625	c.ctx_ = ctx
12626	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12627	for {
12628		x, err := c.Do()
12629		if err != nil {
12630			return err
12631		}
12632		if err := f(x); err != nil {
12633			return err
12634		}
12635		if x.NextPageToken == "" {
12636			return nil
12637		}
12638		c.PageToken(x.NextPageToken)
12639	}
12640}
12641
12642// method id "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list":
12643
12644type BiddersAccountsFilterSetsBidMetricsListCall struct {
12645	s             *Service
12646	filterSetName string
12647	urlParams_    gensupport.URLParams
12648	ifNoneMatch_  string
12649	ctx_          context.Context
12650	header_       http.Header
12651}
12652
12653// List: Lists all metrics that are measured in terms of number of bids.
12654//
12655// - filterSetName: Name of the filter set that should be applied to the
12656//   requested metrics. For example: - For a bidder-level filter set for
12657//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
12658//   filter set for the buyer account representing bidder 123:
12659//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
12660//   filter set for the child seat buyer account 456 whose bidder is
12661//   123: `bidders/123/accounts/456/filterSets/abc`.
12662func (r *BiddersAccountsFilterSetsBidMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsBidMetricsListCall {
12663	c := &BiddersAccountsFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12664	c.filterSetName = filterSetName
12665	return c
12666}
12667
12668// PageSize sets the optional parameter "pageSize": Requested page size.
12669// The server may return fewer results than requested. If unspecified,
12670// the server will pick an appropriate default.
12671func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidMetricsListCall {
12672	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12673	return c
12674}
12675
12676// PageToken sets the optional parameter "pageToken": A token
12677// identifying a page of results the server should return. Typically,
12678// this is the value of ListBidMetricsResponse.nextPageToken returned
12679// from the previous call to the bidMetrics.list method.
12680func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidMetricsListCall {
12681	c.urlParams_.Set("pageToken", pageToken)
12682	return c
12683}
12684
12685// Fields allows partial responses to be retrieved. See
12686// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12687// for more information.
12688func (c *BiddersAccountsFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidMetricsListCall {
12689	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12690	return c
12691}
12692
12693// IfNoneMatch sets the optional parameter which makes the operation
12694// fail if the object's ETag matches the given value. This is useful for
12695// getting updates only after the object has changed since the last
12696// request. Use googleapi.IsNotModified to check whether the response
12697// error from Do is the result of In-None-Match.
12698func (c *BiddersAccountsFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidMetricsListCall {
12699	c.ifNoneMatch_ = entityTag
12700	return c
12701}
12702
12703// Context sets the context to be used in this call's Do method. Any
12704// pending HTTP request will be aborted if the provided context is
12705// canceled.
12706func (c *BiddersAccountsFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidMetricsListCall {
12707	c.ctx_ = ctx
12708	return c
12709}
12710
12711// Header returns an http.Header that can be modified by the caller to
12712// add HTTP headers to the request.
12713func (c *BiddersAccountsFilterSetsBidMetricsListCall) Header() http.Header {
12714	if c.header_ == nil {
12715		c.header_ = make(http.Header)
12716	}
12717	return c.header_
12718}
12719
12720func (c *BiddersAccountsFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) {
12721	reqHeaders := make(http.Header)
12722	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12723	for k, v := range c.header_ {
12724		reqHeaders[k] = v
12725	}
12726	reqHeaders.Set("User-Agent", c.s.userAgent())
12727	if c.ifNoneMatch_ != "" {
12728		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12729	}
12730	var body io.Reader = nil
12731	c.urlParams_.Set("alt", alt)
12732	c.urlParams_.Set("prettyPrint", "false")
12733	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics")
12734	urls += "?" + c.urlParams_.Encode()
12735	req, err := http.NewRequest("GET", urls, body)
12736	if err != nil {
12737		return nil, err
12738	}
12739	req.Header = reqHeaders
12740	googleapi.Expand(req.URL, map[string]string{
12741		"filterSetName": c.filterSetName,
12742	})
12743	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12744}
12745
12746// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list" call.
12747// Exactly one of *ListBidMetricsResponse or error will be non-nil. Any
12748// non-2xx status code is an error. Response headers are in either
12749// *ListBidMetricsResponse.ServerResponse.Header or (if a response was
12750// returned at all) in error.(*googleapi.Error).Header. Use
12751// googleapi.IsNotModified to check whether the returned error was
12752// because http.StatusNotModified was returned.
12753func (c *BiddersAccountsFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) {
12754	gensupport.SetOptions(c.urlParams_, opts...)
12755	res, err := c.doRequest("json")
12756	if res != nil && res.StatusCode == http.StatusNotModified {
12757		if res.Body != nil {
12758			res.Body.Close()
12759		}
12760		return nil, &googleapi.Error{
12761			Code:   res.StatusCode,
12762			Header: res.Header,
12763		}
12764	}
12765	if err != nil {
12766		return nil, err
12767	}
12768	defer googleapi.CloseBody(res)
12769	if err := googleapi.CheckResponse(res); err != nil {
12770		return nil, err
12771	}
12772	ret := &ListBidMetricsResponse{
12773		ServerResponse: googleapi.ServerResponse{
12774			Header:         res.Header,
12775			HTTPStatusCode: res.StatusCode,
12776		},
12777	}
12778	target := &ret
12779	if err := gensupport.DecodeResponse(target, res); err != nil {
12780		return nil, err
12781	}
12782	return ret, nil
12783	// {
12784	//   "description": "Lists all metrics that are measured in terms of number of bids.",
12785	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidMetrics",
12786	//   "httpMethod": "GET",
12787	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list",
12788	//   "parameterOrder": [
12789	//     "filterSetName"
12790	//   ],
12791	//   "parameters": {
12792	//     "filterSetName": {
12793	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12794	//       "location": "path",
12795	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12796	//       "required": true,
12797	//       "type": "string"
12798	//     },
12799	//     "pageSize": {
12800	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
12801	//       "format": "int32",
12802	//       "location": "query",
12803	//       "type": "integer"
12804	//     },
12805	//     "pageToken": {
12806	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidMetricsResponse.nextPageToken returned from the previous call to the bidMetrics.list method.",
12807	//       "location": "query",
12808	//       "type": "string"
12809	//     }
12810	//   },
12811	//   "path": "v2beta1/{+filterSetName}/bidMetrics",
12812	//   "response": {
12813	//     "$ref": "ListBidMetricsResponse"
12814	//   },
12815	//   "scopes": [
12816	//     "https://www.googleapis.com/auth/adexchange.buyer"
12817	//   ]
12818	// }
12819
12820}
12821
12822// Pages invokes f for each page of results.
12823// A non-nil error returned from f will halt the iteration.
12824// The provided context supersedes any context provided to the Context method.
12825func (c *BiddersAccountsFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error {
12826	c.ctx_ = ctx
12827	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12828	for {
12829		x, err := c.Do()
12830		if err != nil {
12831			return err
12832		}
12833		if err := f(x); err != nil {
12834			return err
12835		}
12836		if x.NextPageToken == "" {
12837			return nil
12838		}
12839		c.PageToken(x.NextPageToken)
12840	}
12841}
12842
12843// method id "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list":
12844
12845type BiddersAccountsFilterSetsBidResponseErrorsListCall struct {
12846	s             *Service
12847	filterSetName string
12848	urlParams_    gensupport.URLParams
12849	ifNoneMatch_  string
12850	ctx_          context.Context
12851	header_       http.Header
12852}
12853
12854// List: List all errors that occurred in bid responses, with the number
12855// of bid responses affected for each reason.
12856//
12857// - filterSetName: Name of the filter set that should be applied to the
12858//   requested metrics. For example: - For a bidder-level filter set for
12859//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
12860//   filter set for the buyer account representing bidder 123:
12861//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
12862//   filter set for the child seat buyer account 456 whose bidder is
12863//   123: `bidders/123/accounts/456/filterSets/abc`.
12864func (r *BiddersAccountsFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12865	c := &BiddersAccountsFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12866	c.filterSetName = filterSetName
12867	return c
12868}
12869
12870// PageSize sets the optional parameter "pageSize": Requested page size.
12871// The server may return fewer results than requested. If unspecified,
12872// the server will pick an appropriate default.
12873func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12874	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12875	return c
12876}
12877
12878// PageToken sets the optional parameter "pageToken": A token
12879// identifying a page of results the server should return. Typically,
12880// this is the value of ListBidResponseErrorsResponse.nextPageToken
12881// returned from the previous call to the bidResponseErrors.list method.
12882func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12883	c.urlParams_.Set("pageToken", pageToken)
12884	return c
12885}
12886
12887// Fields allows partial responses to be retrieved. See
12888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12889// for more information.
12890func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12891	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12892	return c
12893}
12894
12895// IfNoneMatch sets the optional parameter which makes the operation
12896// fail if the object's ETag matches the given value. This is useful for
12897// getting updates only after the object has changed since the last
12898// request. Use googleapi.IsNotModified to check whether the response
12899// error from Do is the result of In-None-Match.
12900func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12901	c.ifNoneMatch_ = entityTag
12902	return c
12903}
12904
12905// Context sets the context to be used in this call's Do method. Any
12906// pending HTTP request will be aborted if the provided context is
12907// canceled.
12908func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12909	c.ctx_ = ctx
12910	return c
12911}
12912
12913// Header returns an http.Header that can be modified by the caller to
12914// add HTTP headers to the request.
12915func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Header() http.Header {
12916	if c.header_ == nil {
12917		c.header_ = make(http.Header)
12918	}
12919	return c.header_
12920}
12921
12922func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) {
12923	reqHeaders := make(http.Header)
12924	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
12925	for k, v := range c.header_ {
12926		reqHeaders[k] = v
12927	}
12928	reqHeaders.Set("User-Agent", c.s.userAgent())
12929	if c.ifNoneMatch_ != "" {
12930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12931	}
12932	var body io.Reader = nil
12933	c.urlParams_.Set("alt", alt)
12934	c.urlParams_.Set("prettyPrint", "false")
12935	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors")
12936	urls += "?" + c.urlParams_.Encode()
12937	req, err := http.NewRequest("GET", urls, body)
12938	if err != nil {
12939		return nil, err
12940	}
12941	req.Header = reqHeaders
12942	googleapi.Expand(req.URL, map[string]string{
12943		"filterSetName": c.filterSetName,
12944	})
12945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12946}
12947
12948// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list" call.
12949// Exactly one of *ListBidResponseErrorsResponse or error will be
12950// non-nil. Any non-2xx status code is an error. Response headers are in
12951// either *ListBidResponseErrorsResponse.ServerResponse.Header or (if a
12952// response was returned at all) in error.(*googleapi.Error).Header. Use
12953// googleapi.IsNotModified to check whether the returned error was
12954// because http.StatusNotModified was returned.
12955func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) {
12956	gensupport.SetOptions(c.urlParams_, opts...)
12957	res, err := c.doRequest("json")
12958	if res != nil && res.StatusCode == http.StatusNotModified {
12959		if res.Body != nil {
12960			res.Body.Close()
12961		}
12962		return nil, &googleapi.Error{
12963			Code:   res.StatusCode,
12964			Header: res.Header,
12965		}
12966	}
12967	if err != nil {
12968		return nil, err
12969	}
12970	defer googleapi.CloseBody(res)
12971	if err := googleapi.CheckResponse(res); err != nil {
12972		return nil, err
12973	}
12974	ret := &ListBidResponseErrorsResponse{
12975		ServerResponse: googleapi.ServerResponse{
12976			Header:         res.Header,
12977			HTTPStatusCode: res.StatusCode,
12978		},
12979	}
12980	target := &ret
12981	if err := gensupport.DecodeResponse(target, res); err != nil {
12982		return nil, err
12983	}
12984	return ret, nil
12985	// {
12986	//   "description": "List all errors that occurred in bid responses, with the number of bid responses affected for each reason.",
12987	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidResponseErrors",
12988	//   "httpMethod": "GET",
12989	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list",
12990	//   "parameterOrder": [
12991	//     "filterSetName"
12992	//   ],
12993	//   "parameters": {
12994	//     "filterSetName": {
12995	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12996	//       "location": "path",
12997	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12998	//       "required": true,
12999	//       "type": "string"
13000	//     },
13001	//     "pageSize": {
13002	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
13003	//       "format": "int32",
13004	//       "location": "query",
13005	//       "type": "integer"
13006	//     },
13007	//     "pageToken": {
13008	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponseErrorsResponse.nextPageToken returned from the previous call to the bidResponseErrors.list method.",
13009	//       "location": "query",
13010	//       "type": "string"
13011	//     }
13012	//   },
13013	//   "path": "v2beta1/{+filterSetName}/bidResponseErrors",
13014	//   "response": {
13015	//     "$ref": "ListBidResponseErrorsResponse"
13016	//   },
13017	//   "scopes": [
13018	//     "https://www.googleapis.com/auth/adexchange.buyer"
13019	//   ]
13020	// }
13021
13022}
13023
13024// Pages invokes f for each page of results.
13025// A non-nil error returned from f will halt the iteration.
13026// The provided context supersedes any context provided to the Context method.
13027func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error {
13028	c.ctx_ = ctx
13029	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13030	for {
13031		x, err := c.Do()
13032		if err != nil {
13033			return err
13034		}
13035		if err := f(x); err != nil {
13036			return err
13037		}
13038		if x.NextPageToken == "" {
13039			return nil
13040		}
13041		c.PageToken(x.NextPageToken)
13042	}
13043}
13044
13045// method id "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list":
13046
13047type BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall struct {
13048	s             *Service
13049	filterSetName string
13050	urlParams_    gensupport.URLParams
13051	ifNoneMatch_  string
13052	ctx_          context.Context
13053	header_       http.Header
13054}
13055
13056// List: List all reasons for which bid responses were considered to
13057// have no applicable bids, with the number of bid responses affected
13058// for each reason.
13059//
13060// - filterSetName: Name of the filter set that should be applied to the
13061//   requested metrics. For example: - For a bidder-level filter set for
13062//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
13063//   filter set for the buyer account representing bidder 123:
13064//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
13065//   filter set for the child seat buyer account 456 whose bidder is
13066//   123: `bidders/123/accounts/456/filterSets/abc`.
13067func (r *BiddersAccountsFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
13068	c := &BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13069	c.filterSetName = filterSetName
13070	return c
13071}
13072
13073// PageSize sets the optional parameter "pageSize": Requested page size.
13074// The server may return fewer results than requested. If unspecified,
13075// the server will pick an appropriate default.
13076func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
13077	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13078	return c
13079}
13080
13081// PageToken sets the optional parameter "pageToken": A token
13082// identifying a page of results the server should return. Typically,
13083// this is the value of
13084// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the
13085// previous call to the bidResponsesWithoutBids.list method.
13086func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
13087	c.urlParams_.Set("pageToken", pageToken)
13088	return c
13089}
13090
13091// Fields allows partial responses to be retrieved. See
13092// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13093// for more information.
13094func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
13095	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13096	return c
13097}
13098
13099// IfNoneMatch sets the optional parameter which makes the operation
13100// fail if the object's ETag matches the given value. This is useful for
13101// getting updates only after the object has changed since the last
13102// request. Use googleapi.IsNotModified to check whether the response
13103// error from Do is the result of In-None-Match.
13104func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
13105	c.ifNoneMatch_ = entityTag
13106	return c
13107}
13108
13109// Context sets the context to be used in this call's Do method. Any
13110// pending HTTP request will be aborted if the provided context is
13111// canceled.
13112func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
13113	c.ctx_ = ctx
13114	return c
13115}
13116
13117// Header returns an http.Header that can be modified by the caller to
13118// add HTTP headers to the request.
13119func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header {
13120	if c.header_ == nil {
13121		c.header_ = make(http.Header)
13122	}
13123	return c.header_
13124}
13125
13126func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) {
13127	reqHeaders := make(http.Header)
13128	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13129	for k, v := range c.header_ {
13130		reqHeaders[k] = v
13131	}
13132	reqHeaders.Set("User-Agent", c.s.userAgent())
13133	if c.ifNoneMatch_ != "" {
13134		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13135	}
13136	var body io.Reader = nil
13137	c.urlParams_.Set("alt", alt)
13138	c.urlParams_.Set("prettyPrint", "false")
13139	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids")
13140	urls += "?" + c.urlParams_.Encode()
13141	req, err := http.NewRequest("GET", urls, body)
13142	if err != nil {
13143		return nil, err
13144	}
13145	req.Header = reqHeaders
13146	googleapi.Expand(req.URL, map[string]string{
13147		"filterSetName": c.filterSetName,
13148	})
13149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13150}
13151
13152// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list" call.
13153// Exactly one of *ListBidResponsesWithoutBidsResponse or error will be
13154// non-nil. Any non-2xx status code is an error. Response headers are in
13155// either *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or
13156// (if a response was returned at all) in
13157// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13158// whether the returned error was because http.StatusNotModified was
13159// returned.
13160func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) {
13161	gensupport.SetOptions(c.urlParams_, opts...)
13162	res, err := c.doRequest("json")
13163	if res != nil && res.StatusCode == http.StatusNotModified {
13164		if res.Body != nil {
13165			res.Body.Close()
13166		}
13167		return nil, &googleapi.Error{
13168			Code:   res.StatusCode,
13169			Header: res.Header,
13170		}
13171	}
13172	if err != nil {
13173		return nil, err
13174	}
13175	defer googleapi.CloseBody(res)
13176	if err := googleapi.CheckResponse(res); err != nil {
13177		return nil, err
13178	}
13179	ret := &ListBidResponsesWithoutBidsResponse{
13180		ServerResponse: googleapi.ServerResponse{
13181			Header:         res.Header,
13182			HTTPStatusCode: res.StatusCode,
13183		},
13184	}
13185	target := &ret
13186	if err := gensupport.DecodeResponse(target, res); err != nil {
13187		return nil, err
13188	}
13189	return ret, nil
13190	// {
13191	//   "description": "List all reasons for which bid responses were considered to have no applicable bids, with the number of bid responses affected for each reason.",
13192	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidResponsesWithoutBids",
13193	//   "httpMethod": "GET",
13194	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list",
13195	//   "parameterOrder": [
13196	//     "filterSetName"
13197	//   ],
13198	//   "parameters": {
13199	//     "filterSetName": {
13200	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13201	//       "location": "path",
13202	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13203	//       "required": true,
13204	//       "type": "string"
13205	//     },
13206	//     "pageSize": {
13207	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
13208	//       "format": "int32",
13209	//       "location": "query",
13210	//       "type": "integer"
13211	//     },
13212	//     "pageToken": {
13213	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous call to the bidResponsesWithoutBids.list method.",
13214	//       "location": "query",
13215	//       "type": "string"
13216	//     }
13217	//   },
13218	//   "path": "v2beta1/{+filterSetName}/bidResponsesWithoutBids",
13219	//   "response": {
13220	//     "$ref": "ListBidResponsesWithoutBidsResponse"
13221	//   },
13222	//   "scopes": [
13223	//     "https://www.googleapis.com/auth/adexchange.buyer"
13224	//   ]
13225	// }
13226
13227}
13228
13229// Pages invokes f for each page of results.
13230// A non-nil error returned from f will halt the iteration.
13231// The provided context supersedes any context provided to the Context method.
13232func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error {
13233	c.ctx_ = ctx
13234	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13235	for {
13236		x, err := c.Do()
13237		if err != nil {
13238			return err
13239		}
13240		if err := f(x); err != nil {
13241			return err
13242		}
13243		if x.NextPageToken == "" {
13244			return nil
13245		}
13246		c.PageToken(x.NextPageToken)
13247	}
13248}
13249
13250// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list":
13251
13252type BiddersAccountsFilterSetsFilteredBidRequestsListCall struct {
13253	s             *Service
13254	filterSetName string
13255	urlParams_    gensupport.URLParams
13256	ifNoneMatch_  string
13257	ctx_          context.Context
13258	header_       http.Header
13259}
13260
13261// List: List all reasons that caused a bid request not to be sent for
13262// an impression, with the number of bid requests not sent for each
13263// reason.
13264//
13265// - filterSetName: Name of the filter set that should be applied to the
13266//   requested metrics. For example: - For a bidder-level filter set for
13267//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
13268//   filter set for the buyer account representing bidder 123:
13269//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
13270//   filter set for the child seat buyer account 456 whose bidder is
13271//   123: `bidders/123/accounts/456/filterSets/abc`.
13272func (r *BiddersAccountsFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13273	c := &BiddersAccountsFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13274	c.filterSetName = filterSetName
13275	return c
13276}
13277
13278// PageSize sets the optional parameter "pageSize": Requested page size.
13279// The server may return fewer results than requested. If unspecified,
13280// the server will pick an appropriate default.
13281func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13282	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13283	return c
13284}
13285
13286// PageToken sets the optional parameter "pageToken": A token
13287// identifying a page of results the server should return. Typically,
13288// this is the value of ListFilteredBidRequestsResponse.nextPageToken
13289// returned from the previous call to the filteredBidRequests.list
13290// method.
13291func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13292	c.urlParams_.Set("pageToken", pageToken)
13293	return c
13294}
13295
13296// Fields allows partial responses to be retrieved. See
13297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13298// for more information.
13299func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13301	return c
13302}
13303
13304// IfNoneMatch sets the optional parameter which makes the operation
13305// fail if the object's ETag matches the given value. This is useful for
13306// getting updates only after the object has changed since the last
13307// request. Use googleapi.IsNotModified to check whether the response
13308// error from Do is the result of In-None-Match.
13309func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13310	c.ifNoneMatch_ = entityTag
13311	return c
13312}
13313
13314// Context sets the context to be used in this call's Do method. Any
13315// pending HTTP request will be aborted if the provided context is
13316// canceled.
13317func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13318	c.ctx_ = ctx
13319	return c
13320}
13321
13322// Header returns an http.Header that can be modified by the caller to
13323// add HTTP headers to the request.
13324func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Header() http.Header {
13325	if c.header_ == nil {
13326		c.header_ = make(http.Header)
13327	}
13328	return c.header_
13329}
13330
13331func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) {
13332	reqHeaders := make(http.Header)
13333	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13334	for k, v := range c.header_ {
13335		reqHeaders[k] = v
13336	}
13337	reqHeaders.Set("User-Agent", c.s.userAgent())
13338	if c.ifNoneMatch_ != "" {
13339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13340	}
13341	var body io.Reader = nil
13342	c.urlParams_.Set("alt", alt)
13343	c.urlParams_.Set("prettyPrint", "false")
13344	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests")
13345	urls += "?" + c.urlParams_.Encode()
13346	req, err := http.NewRequest("GET", urls, body)
13347	if err != nil {
13348		return nil, err
13349	}
13350	req.Header = reqHeaders
13351	googleapi.Expand(req.URL, map[string]string{
13352		"filterSetName": c.filterSetName,
13353	})
13354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13355}
13356
13357// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list" call.
13358// Exactly one of *ListFilteredBidRequestsResponse or error will be
13359// non-nil. Any non-2xx status code is an error. Response headers are in
13360// either *ListFilteredBidRequestsResponse.ServerResponse.Header or (if
13361// a response was returned at all) in error.(*googleapi.Error).Header.
13362// Use googleapi.IsNotModified to check whether the returned error was
13363// because http.StatusNotModified was returned.
13364func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) {
13365	gensupport.SetOptions(c.urlParams_, opts...)
13366	res, err := c.doRequest("json")
13367	if res != nil && res.StatusCode == http.StatusNotModified {
13368		if res.Body != nil {
13369			res.Body.Close()
13370		}
13371		return nil, &googleapi.Error{
13372			Code:   res.StatusCode,
13373			Header: res.Header,
13374		}
13375	}
13376	if err != nil {
13377		return nil, err
13378	}
13379	defer googleapi.CloseBody(res)
13380	if err := googleapi.CheckResponse(res); err != nil {
13381		return nil, err
13382	}
13383	ret := &ListFilteredBidRequestsResponse{
13384		ServerResponse: googleapi.ServerResponse{
13385			Header:         res.Header,
13386			HTTPStatusCode: res.StatusCode,
13387		},
13388	}
13389	target := &ret
13390	if err := gensupport.DecodeResponse(target, res); err != nil {
13391		return nil, err
13392	}
13393	return ret, nil
13394	// {
13395	//   "description": "List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.",
13396	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBidRequests",
13397	//   "httpMethod": "GET",
13398	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list",
13399	//   "parameterOrder": [
13400	//     "filterSetName"
13401	//   ],
13402	//   "parameters": {
13403	//     "filterSetName": {
13404	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13405	//       "location": "path",
13406	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13407	//       "required": true,
13408	//       "type": "string"
13409	//     },
13410	//     "pageSize": {
13411	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
13412	//       "format": "int32",
13413	//       "location": "query",
13414	//       "type": "integer"
13415	//     },
13416	//     "pageToken": {
13417	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidRequestsResponse.nextPageToken returned from the previous call to the filteredBidRequests.list method.",
13418	//       "location": "query",
13419	//       "type": "string"
13420	//     }
13421	//   },
13422	//   "path": "v2beta1/{+filterSetName}/filteredBidRequests",
13423	//   "response": {
13424	//     "$ref": "ListFilteredBidRequestsResponse"
13425	//   },
13426	//   "scopes": [
13427	//     "https://www.googleapis.com/auth/adexchange.buyer"
13428	//   ]
13429	// }
13430
13431}
13432
13433// Pages invokes f for each page of results.
13434// A non-nil error returned from f will halt the iteration.
13435// The provided context supersedes any context provided to the Context method.
13436func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error {
13437	c.ctx_ = ctx
13438	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13439	for {
13440		x, err := c.Do()
13441		if err != nil {
13442			return err
13443		}
13444		if err := f(x); err != nil {
13445			return err
13446		}
13447		if x.NextPageToken == "" {
13448			return nil
13449		}
13450		c.PageToken(x.NextPageToken)
13451	}
13452}
13453
13454// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list":
13455
13456type BiddersAccountsFilterSetsFilteredBidsListCall struct {
13457	s             *Service
13458	filterSetName string
13459	urlParams_    gensupport.URLParams
13460	ifNoneMatch_  string
13461	ctx_          context.Context
13462	header_       http.Header
13463}
13464
13465// List: List all reasons for which bids were filtered, with the number
13466// of bids filtered for each reason.
13467//
13468// - filterSetName: Name of the filter set that should be applied to the
13469//   requested metrics. For example: - For a bidder-level filter set for
13470//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
13471//   filter set for the buyer account representing bidder 123:
13472//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
13473//   filter set for the child seat buyer account 456 whose bidder is
13474//   123: `bidders/123/accounts/456/filterSets/abc`.
13475func (r *BiddersAccountsFilterSetsFilteredBidsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidsListCall {
13476	c := &BiddersAccountsFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13477	c.filterSetName = filterSetName
13478	return c
13479}
13480
13481// PageSize sets the optional parameter "pageSize": Requested page size.
13482// The server may return fewer results than requested. If unspecified,
13483// the server will pick an appropriate default.
13484func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsListCall {
13485	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13486	return c
13487}
13488
13489// PageToken sets the optional parameter "pageToken": A token
13490// identifying a page of results the server should return. Typically,
13491// this is the value of ListFilteredBidsResponse.nextPageToken returned
13492// from the previous call to the filteredBids.list method.
13493func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsListCall {
13494	c.urlParams_.Set("pageToken", pageToken)
13495	return c
13496}
13497
13498// Fields allows partial responses to be retrieved. See
13499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13500// for more information.
13501func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsListCall {
13502	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13503	return c
13504}
13505
13506// IfNoneMatch sets the optional parameter which makes the operation
13507// fail if the object's ETag matches the given value. This is useful for
13508// getting updates only after the object has changed since the last
13509// request. Use googleapi.IsNotModified to check whether the response
13510// error from Do is the result of In-None-Match.
13511func (c *BiddersAccountsFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsListCall {
13512	c.ifNoneMatch_ = entityTag
13513	return c
13514}
13515
13516// Context sets the context to be used in this call's Do method. Any
13517// pending HTTP request will be aborted if the provided context is
13518// canceled.
13519func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsListCall {
13520	c.ctx_ = ctx
13521	return c
13522}
13523
13524// Header returns an http.Header that can be modified by the caller to
13525// add HTTP headers to the request.
13526func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Header() http.Header {
13527	if c.header_ == nil {
13528		c.header_ = make(http.Header)
13529	}
13530	return c.header_
13531}
13532
13533func (c *BiddersAccountsFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) {
13534	reqHeaders := make(http.Header)
13535	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13536	for k, v := range c.header_ {
13537		reqHeaders[k] = v
13538	}
13539	reqHeaders.Set("User-Agent", c.s.userAgent())
13540	if c.ifNoneMatch_ != "" {
13541		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13542	}
13543	var body io.Reader = nil
13544	c.urlParams_.Set("alt", alt)
13545	c.urlParams_.Set("prettyPrint", "false")
13546	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids")
13547	urls += "?" + c.urlParams_.Encode()
13548	req, err := http.NewRequest("GET", urls, body)
13549	if err != nil {
13550		return nil, err
13551	}
13552	req.Header = reqHeaders
13553	googleapi.Expand(req.URL, map[string]string{
13554		"filterSetName": c.filterSetName,
13555	})
13556	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13557}
13558
13559// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list" call.
13560// Exactly one of *ListFilteredBidsResponse or error will be non-nil.
13561// Any non-2xx status code is an error. Response headers are in either
13562// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was
13563// returned at all) in error.(*googleapi.Error).Header. Use
13564// googleapi.IsNotModified to check whether the returned error was
13565// because http.StatusNotModified was returned.
13566func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) {
13567	gensupport.SetOptions(c.urlParams_, opts...)
13568	res, err := c.doRequest("json")
13569	if res != nil && res.StatusCode == http.StatusNotModified {
13570		if res.Body != nil {
13571			res.Body.Close()
13572		}
13573		return nil, &googleapi.Error{
13574			Code:   res.StatusCode,
13575			Header: res.Header,
13576		}
13577	}
13578	if err != nil {
13579		return nil, err
13580	}
13581	defer googleapi.CloseBody(res)
13582	if err := googleapi.CheckResponse(res); err != nil {
13583		return nil, err
13584	}
13585	ret := &ListFilteredBidsResponse{
13586		ServerResponse: googleapi.ServerResponse{
13587			Header:         res.Header,
13588			HTTPStatusCode: res.StatusCode,
13589		},
13590	}
13591	target := &ret
13592	if err := gensupport.DecodeResponse(target, res); err != nil {
13593		return nil, err
13594	}
13595	return ret, nil
13596	// {
13597	//   "description": "List all reasons for which bids were filtered, with the number of bids filtered for each reason.",
13598	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids",
13599	//   "httpMethod": "GET",
13600	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list",
13601	//   "parameterOrder": [
13602	//     "filterSetName"
13603	//   ],
13604	//   "parameters": {
13605	//     "filterSetName": {
13606	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13607	//       "location": "path",
13608	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13609	//       "required": true,
13610	//       "type": "string"
13611	//     },
13612	//     "pageSize": {
13613	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
13614	//       "format": "int32",
13615	//       "location": "query",
13616	//       "type": "integer"
13617	//     },
13618	//     "pageToken": {
13619	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidsResponse.nextPageToken returned from the previous call to the filteredBids.list method.",
13620	//       "location": "query",
13621	//       "type": "string"
13622	//     }
13623	//   },
13624	//   "path": "v2beta1/{+filterSetName}/filteredBids",
13625	//   "response": {
13626	//     "$ref": "ListFilteredBidsResponse"
13627	//   },
13628	//   "scopes": [
13629	//     "https://www.googleapis.com/auth/adexchange.buyer"
13630	//   ]
13631	// }
13632
13633}
13634
13635// Pages invokes f for each page of results.
13636// A non-nil error returned from f will halt the iteration.
13637// The provided context supersedes any context provided to the Context method.
13638func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error {
13639	c.ctx_ = ctx
13640	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13641	for {
13642		x, err := c.Do()
13643		if err != nil {
13644			return err
13645		}
13646		if err := f(x); err != nil {
13647			return err
13648		}
13649		if x.NextPageToken == "" {
13650			return nil
13651		}
13652		c.PageToken(x.NextPageToken)
13653	}
13654}
13655
13656// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list":
13657
13658type BiddersAccountsFilterSetsFilteredBidsCreativesListCall struct {
13659	s                *Service
13660	filterSetName    string
13661	creativeStatusId int64
13662	urlParams_       gensupport.URLParams
13663	ifNoneMatch_     string
13664	ctx_             context.Context
13665	header_          http.Header
13666}
13667
13668// List: List all creatives associated with a specific reason for which
13669// bids were filtered, with the number of bids filtered for each
13670// creative.
13671//
13672// - creativeStatusId: The ID of the creative status for which to
13673//   retrieve a breakdown by creative. See creative-status-codes
13674//   (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
13675// - filterSetName: Name of the filter set that should be applied to the
13676//   requested metrics. For example: - For a bidder-level filter set for
13677//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
13678//   filter set for the buyer account representing bidder 123:
13679//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
13680//   filter set for the child seat buyer account 456 whose bidder is
13681//   123: `bidders/123/accounts/456/filterSets/abc`.
13682func (r *BiddersAccountsFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13683	c := &BiddersAccountsFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13684	c.filterSetName = filterSetName
13685	c.creativeStatusId = creativeStatusId
13686	return c
13687}
13688
13689// PageSize sets the optional parameter "pageSize": Requested page size.
13690// The server may return fewer results than requested. If unspecified,
13691// the server will pick an appropriate default.
13692func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13693	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13694	return c
13695}
13696
13697// PageToken sets the optional parameter "pageToken": A token
13698// identifying a page of results the server should return. Typically,
13699// this is the value of
13700// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned
13701// from the previous call to the filteredBids.creatives.list method.
13702func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13703	c.urlParams_.Set("pageToken", pageToken)
13704	return c
13705}
13706
13707// Fields allows partial responses to be retrieved. See
13708// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13709// for more information.
13710func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13711	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13712	return c
13713}
13714
13715// IfNoneMatch sets the optional parameter which makes the operation
13716// fail if the object's ETag matches the given value. This is useful for
13717// getting updates only after the object has changed since the last
13718// request. Use googleapi.IsNotModified to check whether the response
13719// error from Do is the result of In-None-Match.
13720func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13721	c.ifNoneMatch_ = entityTag
13722	return c
13723}
13724
13725// Context sets the context to be used in this call's Do method. Any
13726// pending HTTP request will be aborted if the provided context is
13727// canceled.
13728func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13729	c.ctx_ = ctx
13730	return c
13731}
13732
13733// Header returns an http.Header that can be modified by the caller to
13734// add HTTP headers to the request.
13735func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Header() http.Header {
13736	if c.header_ == nil {
13737		c.header_ = make(http.Header)
13738	}
13739	return c.header_
13740}
13741
13742func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) {
13743	reqHeaders := make(http.Header)
13744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13745	for k, v := range c.header_ {
13746		reqHeaders[k] = v
13747	}
13748	reqHeaders.Set("User-Agent", c.s.userAgent())
13749	if c.ifNoneMatch_ != "" {
13750		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13751	}
13752	var body io.Reader = nil
13753	c.urlParams_.Set("alt", alt)
13754	c.urlParams_.Set("prettyPrint", "false")
13755	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives")
13756	urls += "?" + c.urlParams_.Encode()
13757	req, err := http.NewRequest("GET", urls, body)
13758	if err != nil {
13759		return nil, err
13760	}
13761	req.Header = reqHeaders
13762	googleapi.Expand(req.URL, map[string]string{
13763		"filterSetName":    c.filterSetName,
13764		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
13765	})
13766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13767}
13768
13769// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list" call.
13770// Exactly one of *ListCreativeStatusBreakdownByCreativeResponse or
13771// error will be non-nil. Any non-2xx status code is an error. Response
13772// headers are in either
13773// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header
13774// or (if a response was returned at all) in
13775// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13776// whether the returned error was because http.StatusNotModified was
13777// returned.
13778func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) {
13779	gensupport.SetOptions(c.urlParams_, opts...)
13780	res, err := c.doRequest("json")
13781	if res != nil && res.StatusCode == http.StatusNotModified {
13782		if res.Body != nil {
13783			res.Body.Close()
13784		}
13785		return nil, &googleapi.Error{
13786			Code:   res.StatusCode,
13787			Header: res.Header,
13788		}
13789	}
13790	if err != nil {
13791		return nil, err
13792	}
13793	defer googleapi.CloseBody(res)
13794	if err := googleapi.CheckResponse(res); err != nil {
13795		return nil, err
13796	}
13797	ret := &ListCreativeStatusBreakdownByCreativeResponse{
13798		ServerResponse: googleapi.ServerResponse{
13799			Header:         res.Header,
13800			HTTPStatusCode: res.StatusCode,
13801		},
13802	}
13803	target := &ret
13804	if err := gensupport.DecodeResponse(target, res); err != nil {
13805		return nil, err
13806	}
13807	return ret, nil
13808	// {
13809	//   "description": "List all creatives associated with a specific reason for which bids were filtered, with the number of bids filtered for each creative.",
13810	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/creatives",
13811	//   "httpMethod": "GET",
13812	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list",
13813	//   "parameterOrder": [
13814	//     "filterSetName",
13815	//     "creativeStatusId"
13816	//   ],
13817	//   "parameters": {
13818	//     "creativeStatusId": {
13819	//       "description": "The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).",
13820	//       "format": "int32",
13821	//       "location": "path",
13822	//       "required": true,
13823	//       "type": "integer"
13824	//     },
13825	//     "filterSetName": {
13826	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13827	//       "location": "path",
13828	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13829	//       "required": true,
13830	//       "type": "string"
13831	//     },
13832	//     "pageSize": {
13833	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
13834	//       "format": "int32",
13835	//       "location": "query",
13836	//       "type": "integer"
13837	//     },
13838	//     "pageToken": {
13839	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from the previous call to the filteredBids.creatives.list method.",
13840	//       "location": "query",
13841	//       "type": "string"
13842	//     }
13843	//   },
13844	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives",
13845	//   "response": {
13846	//     "$ref": "ListCreativeStatusBreakdownByCreativeResponse"
13847	//   },
13848	//   "scopes": [
13849	//     "https://www.googleapis.com/auth/adexchange.buyer"
13850	//   ]
13851	// }
13852
13853}
13854
13855// Pages invokes f for each page of results.
13856// A non-nil error returned from f will halt the iteration.
13857// The provided context supersedes any context provided to the Context method.
13858func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error {
13859	c.ctx_ = ctx
13860	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13861	for {
13862		x, err := c.Do()
13863		if err != nil {
13864			return err
13865		}
13866		if err := f(x); err != nil {
13867			return err
13868		}
13869		if x.NextPageToken == "" {
13870			return nil
13871		}
13872		c.PageToken(x.NextPageToken)
13873	}
13874}
13875
13876// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list":
13877
13878type BiddersAccountsFilterSetsFilteredBidsDetailsListCall struct {
13879	s                *Service
13880	filterSetName    string
13881	creativeStatusId int64
13882	urlParams_       gensupport.URLParams
13883	ifNoneMatch_     string
13884	ctx_             context.Context
13885	header_          http.Header
13886}
13887
13888// List: List all details associated with a specific reason for which
13889// bids were filtered, with the number of bids filtered for each detail.
13890//
13891// - creativeStatusId: The ID of the creative status for which to
13892//   retrieve a breakdown by detail. See creative-status-codes
13893//   (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
13894//   Details are only available for statuses 10, 14, 15, 17, 18, 19, 86,
13895//   and 87.
13896// - filterSetName: Name of the filter set that should be applied to the
13897//   requested metrics. For example: - For a bidder-level filter set for
13898//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
13899//   filter set for the buyer account representing bidder 123:
13900//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
13901//   filter set for the child seat buyer account 456 whose bidder is
13902//   123: `bidders/123/accounts/456/filterSets/abc`.
13903func (r *BiddersAccountsFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13904	c := &BiddersAccountsFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13905	c.filterSetName = filterSetName
13906	c.creativeStatusId = creativeStatusId
13907	return c
13908}
13909
13910// PageSize sets the optional parameter "pageSize": Requested page size.
13911// The server may return fewer results than requested. If unspecified,
13912// the server will pick an appropriate default.
13913func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13914	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13915	return c
13916}
13917
13918// PageToken sets the optional parameter "pageToken": A token
13919// identifying a page of results the server should return. Typically,
13920// this is the value of
13921// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned
13922// from the previous call to the filteredBids.details.list method.
13923func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13924	c.urlParams_.Set("pageToken", pageToken)
13925	return c
13926}
13927
13928// Fields allows partial responses to be retrieved. See
13929// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13930// for more information.
13931func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13932	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13933	return c
13934}
13935
13936// IfNoneMatch sets the optional parameter which makes the operation
13937// fail if the object's ETag matches the given value. This is useful for
13938// getting updates only after the object has changed since the last
13939// request. Use googleapi.IsNotModified to check whether the response
13940// error from Do is the result of In-None-Match.
13941func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13942	c.ifNoneMatch_ = entityTag
13943	return c
13944}
13945
13946// Context sets the context to be used in this call's Do method. Any
13947// pending HTTP request will be aborted if the provided context is
13948// canceled.
13949func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13950	c.ctx_ = ctx
13951	return c
13952}
13953
13954// Header returns an http.Header that can be modified by the caller to
13955// add HTTP headers to the request.
13956func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Header() http.Header {
13957	if c.header_ == nil {
13958		c.header_ = make(http.Header)
13959	}
13960	return c.header_
13961}
13962
13963func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) {
13964	reqHeaders := make(http.Header)
13965	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
13966	for k, v := range c.header_ {
13967		reqHeaders[k] = v
13968	}
13969	reqHeaders.Set("User-Agent", c.s.userAgent())
13970	if c.ifNoneMatch_ != "" {
13971		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13972	}
13973	var body io.Reader = nil
13974	c.urlParams_.Set("alt", alt)
13975	c.urlParams_.Set("prettyPrint", "false")
13976	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details")
13977	urls += "?" + c.urlParams_.Encode()
13978	req, err := http.NewRequest("GET", urls, body)
13979	if err != nil {
13980		return nil, err
13981	}
13982	req.Header = reqHeaders
13983	googleapi.Expand(req.URL, map[string]string{
13984		"filterSetName":    c.filterSetName,
13985		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
13986	})
13987	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13988}
13989
13990// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list" call.
13991// Exactly one of *ListCreativeStatusBreakdownByDetailResponse or error
13992// will be non-nil. Any non-2xx status code is an error. Response
13993// headers are in either
13994// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or
13995// (if a response was returned at all) in
13996// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13997// whether the returned error was because http.StatusNotModified was
13998// returned.
13999func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) {
14000	gensupport.SetOptions(c.urlParams_, opts...)
14001	res, err := c.doRequest("json")
14002	if res != nil && res.StatusCode == http.StatusNotModified {
14003		if res.Body != nil {
14004			res.Body.Close()
14005		}
14006		return nil, &googleapi.Error{
14007			Code:   res.StatusCode,
14008			Header: res.Header,
14009		}
14010	}
14011	if err != nil {
14012		return nil, err
14013	}
14014	defer googleapi.CloseBody(res)
14015	if err := googleapi.CheckResponse(res); err != nil {
14016		return nil, err
14017	}
14018	ret := &ListCreativeStatusBreakdownByDetailResponse{
14019		ServerResponse: googleapi.ServerResponse{
14020			Header:         res.Header,
14021			HTTPStatusCode: res.StatusCode,
14022		},
14023	}
14024	target := &ret
14025	if err := gensupport.DecodeResponse(target, res); err != nil {
14026		return nil, err
14027	}
14028	return ret, nil
14029	// {
14030	//   "description": "List all details associated with a specific reason for which bids were filtered, with the number of bids filtered for each detail.",
14031	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/details",
14032	//   "httpMethod": "GET",
14033	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list",
14034	//   "parameterOrder": [
14035	//     "filterSetName",
14036	//     "creativeStatusId"
14037	//   ],
14038	//   "parameters": {
14039	//     "creativeStatusId": {
14040	//       "description": "The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.",
14041	//       "format": "int32",
14042	//       "location": "path",
14043	//       "required": true,
14044	//       "type": "integer"
14045	//     },
14046	//     "filterSetName": {
14047	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14048	//       "location": "path",
14049	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14050	//       "required": true,
14051	//       "type": "string"
14052	//     },
14053	//     "pageSize": {
14054	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
14055	//       "format": "int32",
14056	//       "location": "query",
14057	//       "type": "integer"
14058	//     },
14059	//     "pageToken": {
14060	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the previous call to the filteredBids.details.list method.",
14061	//       "location": "query",
14062	//       "type": "string"
14063	//     }
14064	//   },
14065	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details",
14066	//   "response": {
14067	//     "$ref": "ListCreativeStatusBreakdownByDetailResponse"
14068	//   },
14069	//   "scopes": [
14070	//     "https://www.googleapis.com/auth/adexchange.buyer"
14071	//   ]
14072	// }
14073
14074}
14075
14076// Pages invokes f for each page of results.
14077// A non-nil error returned from f will halt the iteration.
14078// The provided context supersedes any context provided to the Context method.
14079func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error {
14080	c.ctx_ = ctx
14081	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14082	for {
14083		x, err := c.Do()
14084		if err != nil {
14085			return err
14086		}
14087		if err := f(x); err != nil {
14088			return err
14089		}
14090		if x.NextPageToken == "" {
14091			return nil
14092		}
14093		c.PageToken(x.NextPageToken)
14094	}
14095}
14096
14097// method id "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list":
14098
14099type BiddersAccountsFilterSetsImpressionMetricsListCall struct {
14100	s             *Service
14101	filterSetName string
14102	urlParams_    gensupport.URLParams
14103	ifNoneMatch_  string
14104	ctx_          context.Context
14105	header_       http.Header
14106}
14107
14108// List: Lists all metrics that are measured in terms of number of
14109// impressions.
14110//
14111// - filterSetName: Name of the filter set that should be applied to the
14112//   requested metrics. For example: - For a bidder-level filter set for
14113//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
14114//   filter set for the buyer account representing bidder 123:
14115//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
14116//   filter set for the child seat buyer account 456 whose bidder is
14117//   123: `bidders/123/accounts/456/filterSets/abc`.
14118func (r *BiddersAccountsFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsImpressionMetricsListCall {
14119	c := &BiddersAccountsFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14120	c.filterSetName = filterSetName
14121	return c
14122}
14123
14124// PageSize sets the optional parameter "pageSize": Requested page size.
14125// The server may return fewer results than requested. If unspecified,
14126// the server will pick an appropriate default.
14127func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsImpressionMetricsListCall {
14128	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14129	return c
14130}
14131
14132// PageToken sets the optional parameter "pageToken": A token
14133// identifying a page of results the server should return. Typically,
14134// this is the value of ListImpressionMetricsResponse.nextPageToken
14135// returned from the previous call to the impressionMetrics.list method.
14136func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsImpressionMetricsListCall {
14137	c.urlParams_.Set("pageToken", pageToken)
14138	return c
14139}
14140
14141// Fields allows partial responses to be retrieved. See
14142// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14143// for more information.
14144func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsImpressionMetricsListCall {
14145	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14146	return c
14147}
14148
14149// IfNoneMatch sets the optional parameter which makes the operation
14150// fail if the object's ETag matches the given value. This is useful for
14151// getting updates only after the object has changed since the last
14152// request. Use googleapi.IsNotModified to check whether the response
14153// error from Do is the result of In-None-Match.
14154func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsImpressionMetricsListCall {
14155	c.ifNoneMatch_ = entityTag
14156	return c
14157}
14158
14159// Context sets the context to be used in this call's Do method. Any
14160// pending HTTP request will be aborted if the provided context is
14161// canceled.
14162func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsImpressionMetricsListCall {
14163	c.ctx_ = ctx
14164	return c
14165}
14166
14167// Header returns an http.Header that can be modified by the caller to
14168// add HTTP headers to the request.
14169func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Header() http.Header {
14170	if c.header_ == nil {
14171		c.header_ = make(http.Header)
14172	}
14173	return c.header_
14174}
14175
14176func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) {
14177	reqHeaders := make(http.Header)
14178	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14179	for k, v := range c.header_ {
14180		reqHeaders[k] = v
14181	}
14182	reqHeaders.Set("User-Agent", c.s.userAgent())
14183	if c.ifNoneMatch_ != "" {
14184		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14185	}
14186	var body io.Reader = nil
14187	c.urlParams_.Set("alt", alt)
14188	c.urlParams_.Set("prettyPrint", "false")
14189	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics")
14190	urls += "?" + c.urlParams_.Encode()
14191	req, err := http.NewRequest("GET", urls, body)
14192	if err != nil {
14193		return nil, err
14194	}
14195	req.Header = reqHeaders
14196	googleapi.Expand(req.URL, map[string]string{
14197		"filterSetName": c.filterSetName,
14198	})
14199	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14200}
14201
14202// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list" call.
14203// Exactly one of *ListImpressionMetricsResponse or error will be
14204// non-nil. Any non-2xx status code is an error. Response headers are in
14205// either *ListImpressionMetricsResponse.ServerResponse.Header or (if a
14206// response was returned at all) in error.(*googleapi.Error).Header. Use
14207// googleapi.IsNotModified to check whether the returned error was
14208// because http.StatusNotModified was returned.
14209func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) {
14210	gensupport.SetOptions(c.urlParams_, opts...)
14211	res, err := c.doRequest("json")
14212	if res != nil && res.StatusCode == http.StatusNotModified {
14213		if res.Body != nil {
14214			res.Body.Close()
14215		}
14216		return nil, &googleapi.Error{
14217			Code:   res.StatusCode,
14218			Header: res.Header,
14219		}
14220	}
14221	if err != nil {
14222		return nil, err
14223	}
14224	defer googleapi.CloseBody(res)
14225	if err := googleapi.CheckResponse(res); err != nil {
14226		return nil, err
14227	}
14228	ret := &ListImpressionMetricsResponse{
14229		ServerResponse: googleapi.ServerResponse{
14230			Header:         res.Header,
14231			HTTPStatusCode: res.StatusCode,
14232		},
14233	}
14234	target := &ret
14235	if err := gensupport.DecodeResponse(target, res); err != nil {
14236		return nil, err
14237	}
14238	return ret, nil
14239	// {
14240	//   "description": "Lists all metrics that are measured in terms of number of impressions.",
14241	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/impressionMetrics",
14242	//   "httpMethod": "GET",
14243	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list",
14244	//   "parameterOrder": [
14245	//     "filterSetName"
14246	//   ],
14247	//   "parameters": {
14248	//     "filterSetName": {
14249	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14250	//       "location": "path",
14251	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14252	//       "required": true,
14253	//       "type": "string"
14254	//     },
14255	//     "pageSize": {
14256	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
14257	//       "format": "int32",
14258	//       "location": "query",
14259	//       "type": "integer"
14260	//     },
14261	//     "pageToken": {
14262	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListImpressionMetricsResponse.nextPageToken returned from the previous call to the impressionMetrics.list method.",
14263	//       "location": "query",
14264	//       "type": "string"
14265	//     }
14266	//   },
14267	//   "path": "v2beta1/{+filterSetName}/impressionMetrics",
14268	//   "response": {
14269	//     "$ref": "ListImpressionMetricsResponse"
14270	//   },
14271	//   "scopes": [
14272	//     "https://www.googleapis.com/auth/adexchange.buyer"
14273	//   ]
14274	// }
14275
14276}
14277
14278// Pages invokes f for each page of results.
14279// A non-nil error returned from f will halt the iteration.
14280// The provided context supersedes any context provided to the Context method.
14281func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error {
14282	c.ctx_ = ctx
14283	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14284	for {
14285		x, err := c.Do()
14286		if err != nil {
14287			return err
14288		}
14289		if err := f(x); err != nil {
14290			return err
14291		}
14292		if x.NextPageToken == "" {
14293			return nil
14294		}
14295		c.PageToken(x.NextPageToken)
14296	}
14297}
14298
14299// method id "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list":
14300
14301type BiddersAccountsFilterSetsLosingBidsListCall struct {
14302	s             *Service
14303	filterSetName string
14304	urlParams_    gensupport.URLParams
14305	ifNoneMatch_  string
14306	ctx_          context.Context
14307	header_       http.Header
14308}
14309
14310// List: List all reasons for which bids lost in the auction, with the
14311// number of bids that lost for each reason.
14312//
14313// - filterSetName: Name of the filter set that should be applied to the
14314//   requested metrics. For example: - For a bidder-level filter set for
14315//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
14316//   filter set for the buyer account representing bidder 123:
14317//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
14318//   filter set for the child seat buyer account 456 whose bidder is
14319//   123: `bidders/123/accounts/456/filterSets/abc`.
14320func (r *BiddersAccountsFilterSetsLosingBidsService) List(filterSetName string) *BiddersAccountsFilterSetsLosingBidsListCall {
14321	c := &BiddersAccountsFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14322	c.filterSetName = filterSetName
14323	return c
14324}
14325
14326// PageSize sets the optional parameter "pageSize": Requested page size.
14327// The server may return fewer results than requested. If unspecified,
14328// the server will pick an appropriate default.
14329func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsLosingBidsListCall {
14330	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14331	return c
14332}
14333
14334// PageToken sets the optional parameter "pageToken": A token
14335// identifying a page of results the server should return. Typically,
14336// this is the value of ListLosingBidsResponse.nextPageToken returned
14337// from the previous call to the losingBids.list method.
14338func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsLosingBidsListCall {
14339	c.urlParams_.Set("pageToken", pageToken)
14340	return c
14341}
14342
14343// Fields allows partial responses to be retrieved. See
14344// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14345// for more information.
14346func (c *BiddersAccountsFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsLosingBidsListCall {
14347	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14348	return c
14349}
14350
14351// IfNoneMatch sets the optional parameter which makes the operation
14352// fail if the object's ETag matches the given value. This is useful for
14353// getting updates only after the object has changed since the last
14354// request. Use googleapi.IsNotModified to check whether the response
14355// error from Do is the result of In-None-Match.
14356func (c *BiddersAccountsFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsLosingBidsListCall {
14357	c.ifNoneMatch_ = entityTag
14358	return c
14359}
14360
14361// Context sets the context to be used in this call's Do method. Any
14362// pending HTTP request will be aborted if the provided context is
14363// canceled.
14364func (c *BiddersAccountsFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsLosingBidsListCall {
14365	c.ctx_ = ctx
14366	return c
14367}
14368
14369// Header returns an http.Header that can be modified by the caller to
14370// add HTTP headers to the request.
14371func (c *BiddersAccountsFilterSetsLosingBidsListCall) Header() http.Header {
14372	if c.header_ == nil {
14373		c.header_ = make(http.Header)
14374	}
14375	return c.header_
14376}
14377
14378func (c *BiddersAccountsFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) {
14379	reqHeaders := make(http.Header)
14380	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14381	for k, v := range c.header_ {
14382		reqHeaders[k] = v
14383	}
14384	reqHeaders.Set("User-Agent", c.s.userAgent())
14385	if c.ifNoneMatch_ != "" {
14386		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14387	}
14388	var body io.Reader = nil
14389	c.urlParams_.Set("alt", alt)
14390	c.urlParams_.Set("prettyPrint", "false")
14391	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids")
14392	urls += "?" + c.urlParams_.Encode()
14393	req, err := http.NewRequest("GET", urls, body)
14394	if err != nil {
14395		return nil, err
14396	}
14397	req.Header = reqHeaders
14398	googleapi.Expand(req.URL, map[string]string{
14399		"filterSetName": c.filterSetName,
14400	})
14401	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14402}
14403
14404// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list" call.
14405// Exactly one of *ListLosingBidsResponse or error will be non-nil. Any
14406// non-2xx status code is an error. Response headers are in either
14407// *ListLosingBidsResponse.ServerResponse.Header or (if a response was
14408// returned at all) in error.(*googleapi.Error).Header. Use
14409// googleapi.IsNotModified to check whether the returned error was
14410// because http.StatusNotModified was returned.
14411func (c *BiddersAccountsFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) {
14412	gensupport.SetOptions(c.urlParams_, opts...)
14413	res, err := c.doRequest("json")
14414	if res != nil && res.StatusCode == http.StatusNotModified {
14415		if res.Body != nil {
14416			res.Body.Close()
14417		}
14418		return nil, &googleapi.Error{
14419			Code:   res.StatusCode,
14420			Header: res.Header,
14421		}
14422	}
14423	if err != nil {
14424		return nil, err
14425	}
14426	defer googleapi.CloseBody(res)
14427	if err := googleapi.CheckResponse(res); err != nil {
14428		return nil, err
14429	}
14430	ret := &ListLosingBidsResponse{
14431		ServerResponse: googleapi.ServerResponse{
14432			Header:         res.Header,
14433			HTTPStatusCode: res.StatusCode,
14434		},
14435	}
14436	target := &ret
14437	if err := gensupport.DecodeResponse(target, res); err != nil {
14438		return nil, err
14439	}
14440	return ret, nil
14441	// {
14442	//   "description": "List all reasons for which bids lost in the auction, with the number of bids that lost for each reason.",
14443	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/losingBids",
14444	//   "httpMethod": "GET",
14445	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list",
14446	//   "parameterOrder": [
14447	//     "filterSetName"
14448	//   ],
14449	//   "parameters": {
14450	//     "filterSetName": {
14451	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14452	//       "location": "path",
14453	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14454	//       "required": true,
14455	//       "type": "string"
14456	//     },
14457	//     "pageSize": {
14458	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
14459	//       "format": "int32",
14460	//       "location": "query",
14461	//       "type": "integer"
14462	//     },
14463	//     "pageToken": {
14464	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListLosingBidsResponse.nextPageToken returned from the previous call to the losingBids.list method.",
14465	//       "location": "query",
14466	//       "type": "string"
14467	//     }
14468	//   },
14469	//   "path": "v2beta1/{+filterSetName}/losingBids",
14470	//   "response": {
14471	//     "$ref": "ListLosingBidsResponse"
14472	//   },
14473	//   "scopes": [
14474	//     "https://www.googleapis.com/auth/adexchange.buyer"
14475	//   ]
14476	// }
14477
14478}
14479
14480// Pages invokes f for each page of results.
14481// A non-nil error returned from f will halt the iteration.
14482// The provided context supersedes any context provided to the Context method.
14483func (c *BiddersAccountsFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error {
14484	c.ctx_ = ctx
14485	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14486	for {
14487		x, err := c.Do()
14488		if err != nil {
14489			return err
14490		}
14491		if err := f(x); err != nil {
14492			return err
14493		}
14494		if x.NextPageToken == "" {
14495			return nil
14496		}
14497		c.PageToken(x.NextPageToken)
14498	}
14499}
14500
14501// method id "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list":
14502
14503type BiddersAccountsFilterSetsNonBillableWinningBidsListCall struct {
14504	s             *Service
14505	filterSetName string
14506	urlParams_    gensupport.URLParams
14507	ifNoneMatch_  string
14508	ctx_          context.Context
14509	header_       http.Header
14510}
14511
14512// List: List all reasons for which winning bids were not billable, with
14513// the number of bids not billed for each reason.
14514//
14515// - filterSetName: Name of the filter set that should be applied to the
14516//   requested metrics. For example: - For a bidder-level filter set for
14517//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
14518//   filter set for the buyer account representing bidder 123:
14519//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
14520//   filter set for the child seat buyer account 456 whose bidder is
14521//   123: `bidders/123/accounts/456/filterSets/abc`.
14522func (r *BiddersAccountsFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14523	c := &BiddersAccountsFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14524	c.filterSetName = filterSetName
14525	return c
14526}
14527
14528// PageSize sets the optional parameter "pageSize": Requested page size.
14529// The server may return fewer results than requested. If unspecified,
14530// the server will pick an appropriate default.
14531func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14532	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14533	return c
14534}
14535
14536// PageToken sets the optional parameter "pageToken": A token
14537// identifying a page of results the server should return. Typically,
14538// this is the value of ListNonBillableWinningBidsResponse.nextPageToken
14539// returned from the previous call to the nonBillableWinningBids.list
14540// method.
14541func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14542	c.urlParams_.Set("pageToken", pageToken)
14543	return c
14544}
14545
14546// Fields allows partial responses to be retrieved. See
14547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14548// for more information.
14549func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14550	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14551	return c
14552}
14553
14554// IfNoneMatch sets the optional parameter which makes the operation
14555// fail if the object's ETag matches the given value. This is useful for
14556// getting updates only after the object has changed since the last
14557// request. Use googleapi.IsNotModified to check whether the response
14558// error from Do is the result of In-None-Match.
14559func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14560	c.ifNoneMatch_ = entityTag
14561	return c
14562}
14563
14564// Context sets the context to be used in this call's Do method. Any
14565// pending HTTP request will be aborted if the provided context is
14566// canceled.
14567func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14568	c.ctx_ = ctx
14569	return c
14570}
14571
14572// Header returns an http.Header that can be modified by the caller to
14573// add HTTP headers to the request.
14574func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Header() http.Header {
14575	if c.header_ == nil {
14576		c.header_ = make(http.Header)
14577	}
14578	return c.header_
14579}
14580
14581func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) {
14582	reqHeaders := make(http.Header)
14583	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14584	for k, v := range c.header_ {
14585		reqHeaders[k] = v
14586	}
14587	reqHeaders.Set("User-Agent", c.s.userAgent())
14588	if c.ifNoneMatch_ != "" {
14589		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14590	}
14591	var body io.Reader = nil
14592	c.urlParams_.Set("alt", alt)
14593	c.urlParams_.Set("prettyPrint", "false")
14594	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids")
14595	urls += "?" + c.urlParams_.Encode()
14596	req, err := http.NewRequest("GET", urls, body)
14597	if err != nil {
14598		return nil, err
14599	}
14600	req.Header = reqHeaders
14601	googleapi.Expand(req.URL, map[string]string{
14602		"filterSetName": c.filterSetName,
14603	})
14604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14605}
14606
14607// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list" call.
14608// Exactly one of *ListNonBillableWinningBidsResponse or error will be
14609// non-nil. Any non-2xx status code is an error. Response headers are in
14610// either *ListNonBillableWinningBidsResponse.ServerResponse.Header or
14611// (if a response was returned at all) in
14612// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14613// whether the returned error was because http.StatusNotModified was
14614// returned.
14615func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) {
14616	gensupport.SetOptions(c.urlParams_, opts...)
14617	res, err := c.doRequest("json")
14618	if res != nil && res.StatusCode == http.StatusNotModified {
14619		if res.Body != nil {
14620			res.Body.Close()
14621		}
14622		return nil, &googleapi.Error{
14623			Code:   res.StatusCode,
14624			Header: res.Header,
14625		}
14626	}
14627	if err != nil {
14628		return nil, err
14629	}
14630	defer googleapi.CloseBody(res)
14631	if err := googleapi.CheckResponse(res); err != nil {
14632		return nil, err
14633	}
14634	ret := &ListNonBillableWinningBidsResponse{
14635		ServerResponse: googleapi.ServerResponse{
14636			Header:         res.Header,
14637			HTTPStatusCode: res.StatusCode,
14638		},
14639	}
14640	target := &ret
14641	if err := gensupport.DecodeResponse(target, res); err != nil {
14642		return nil, err
14643	}
14644	return ret, nil
14645	// {
14646	//   "description": "List all reasons for which winning bids were not billable, with the number of bids not billed for each reason.",
14647	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/nonBillableWinningBids",
14648	//   "httpMethod": "GET",
14649	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list",
14650	//   "parameterOrder": [
14651	//     "filterSetName"
14652	//   ],
14653	//   "parameters": {
14654	//     "filterSetName": {
14655	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14656	//       "location": "path",
14657	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14658	//       "required": true,
14659	//       "type": "string"
14660	//     },
14661	//     "pageSize": {
14662	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
14663	//       "format": "int32",
14664	//       "location": "query",
14665	//       "type": "integer"
14666	//     },
14667	//     "pageToken": {
14668	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListNonBillableWinningBidsResponse.nextPageToken returned from the previous call to the nonBillableWinningBids.list method.",
14669	//       "location": "query",
14670	//       "type": "string"
14671	//     }
14672	//   },
14673	//   "path": "v2beta1/{+filterSetName}/nonBillableWinningBids",
14674	//   "response": {
14675	//     "$ref": "ListNonBillableWinningBidsResponse"
14676	//   },
14677	//   "scopes": [
14678	//     "https://www.googleapis.com/auth/adexchange.buyer"
14679	//   ]
14680	// }
14681
14682}
14683
14684// Pages invokes f for each page of results.
14685// A non-nil error returned from f will halt the iteration.
14686// The provided context supersedes any context provided to the Context method.
14687func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error {
14688	c.ctx_ = ctx
14689	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14690	for {
14691		x, err := c.Do()
14692		if err != nil {
14693			return err
14694		}
14695		if err := f(x); err != nil {
14696			return err
14697		}
14698		if x.NextPageToken == "" {
14699			return nil
14700		}
14701		c.PageToken(x.NextPageToken)
14702	}
14703}
14704
14705// method id "adexchangebuyer2.bidders.filterSets.create":
14706
14707type BiddersFilterSetsCreateCall struct {
14708	s          *Service
14709	ownerName  string
14710	filterset  *FilterSet
14711	urlParams_ gensupport.URLParams
14712	ctx_       context.Context
14713	header_    http.Header
14714}
14715
14716// Create: Creates the specified filter set for the account with the
14717// given account ID.
14718//
14719// - ownerName: Name of the owner (bidder or account) of the filter set
14720//   to be created. For example: - For a bidder-level filter set for
14721//   bidder 123: `bidders/123` - For an account-level filter set for the
14722//   buyer account representing bidder 123: `bidders/123/accounts/123` -
14723//   For an account-level filter set for the child seat buyer account
14724//   456 whose bidder is 123: `bidders/123/accounts/456`.
14725func (r *BiddersFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersFilterSetsCreateCall {
14726	c := &BiddersFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14727	c.ownerName = ownerName
14728	c.filterset = filterset
14729	return c
14730}
14731
14732// IsTransient sets the optional parameter "isTransient": Whether the
14733// filter set is transient, or should be persisted indefinitely. By
14734// default, filter sets are not transient. If transient, it will be
14735// available for at least 1 hour after creation.
14736func (c *BiddersFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersFilterSetsCreateCall {
14737	c.urlParams_.Set("isTransient", fmt.Sprint(isTransient))
14738	return c
14739}
14740
14741// Fields allows partial responses to be retrieved. See
14742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14743// for more information.
14744func (c *BiddersFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersFilterSetsCreateCall {
14745	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14746	return c
14747}
14748
14749// Context sets the context to be used in this call's Do method. Any
14750// pending HTTP request will be aborted if the provided context is
14751// canceled.
14752func (c *BiddersFilterSetsCreateCall) Context(ctx context.Context) *BiddersFilterSetsCreateCall {
14753	c.ctx_ = ctx
14754	return c
14755}
14756
14757// Header returns an http.Header that can be modified by the caller to
14758// add HTTP headers to the request.
14759func (c *BiddersFilterSetsCreateCall) Header() http.Header {
14760	if c.header_ == nil {
14761		c.header_ = make(http.Header)
14762	}
14763	return c.header_
14764}
14765
14766func (c *BiddersFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) {
14767	reqHeaders := make(http.Header)
14768	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14769	for k, v := range c.header_ {
14770		reqHeaders[k] = v
14771	}
14772	reqHeaders.Set("User-Agent", c.s.userAgent())
14773	var body io.Reader = nil
14774	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filterset)
14775	if err != nil {
14776		return nil, err
14777	}
14778	reqHeaders.Set("Content-Type", "application/json")
14779	c.urlParams_.Set("alt", alt)
14780	c.urlParams_.Set("prettyPrint", "false")
14781	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
14782	urls += "?" + c.urlParams_.Encode()
14783	req, err := http.NewRequest("POST", urls, body)
14784	if err != nil {
14785		return nil, err
14786	}
14787	req.Header = reqHeaders
14788	googleapi.Expand(req.URL, map[string]string{
14789		"ownerName": c.ownerName,
14790	})
14791	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14792}
14793
14794// Do executes the "adexchangebuyer2.bidders.filterSets.create" call.
14795// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
14796// status code is an error. Response headers are in either
14797// *FilterSet.ServerResponse.Header or (if a response was returned at
14798// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14799// to check whether the returned error was because
14800// http.StatusNotModified was returned.
14801func (c *BiddersFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
14802	gensupport.SetOptions(c.urlParams_, opts...)
14803	res, err := c.doRequest("json")
14804	if res != nil && res.StatusCode == http.StatusNotModified {
14805		if res.Body != nil {
14806			res.Body.Close()
14807		}
14808		return nil, &googleapi.Error{
14809			Code:   res.StatusCode,
14810			Header: res.Header,
14811		}
14812	}
14813	if err != nil {
14814		return nil, err
14815	}
14816	defer googleapi.CloseBody(res)
14817	if err := googleapi.CheckResponse(res); err != nil {
14818		return nil, err
14819	}
14820	ret := &FilterSet{
14821		ServerResponse: googleapi.ServerResponse{
14822			Header:         res.Header,
14823			HTTPStatusCode: res.StatusCode,
14824		},
14825	}
14826	target := &ret
14827	if err := gensupport.DecodeResponse(target, res); err != nil {
14828		return nil, err
14829	}
14830	return ret, nil
14831	// {
14832	//   "description": "Creates the specified filter set for the account with the given account ID.",
14833	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets",
14834	//   "httpMethod": "POST",
14835	//   "id": "adexchangebuyer2.bidders.filterSets.create",
14836	//   "parameterOrder": [
14837	//     "ownerName"
14838	//   ],
14839	//   "parameters": {
14840	//     "isTransient": {
14841	//       "description": "Whether the filter set is transient, or should be persisted indefinitely. By default, filter sets are not transient. If transient, it will be available for at least 1 hour after creation.",
14842	//       "location": "query",
14843	//       "type": "boolean"
14844	//     },
14845	//     "ownerName": {
14846	//       "description": "Name of the owner (bidder or account) of the filter set to be created. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`",
14847	//       "location": "path",
14848	//       "pattern": "^bidders/[^/]+$",
14849	//       "required": true,
14850	//       "type": "string"
14851	//     }
14852	//   },
14853	//   "path": "v2beta1/{+ownerName}/filterSets",
14854	//   "request": {
14855	//     "$ref": "FilterSet"
14856	//   },
14857	//   "response": {
14858	//     "$ref": "FilterSet"
14859	//   },
14860	//   "scopes": [
14861	//     "https://www.googleapis.com/auth/adexchange.buyer"
14862	//   ]
14863	// }
14864
14865}
14866
14867// method id "adexchangebuyer2.bidders.filterSets.delete":
14868
14869type BiddersFilterSetsDeleteCall struct {
14870	s          *Service
14871	name       string
14872	urlParams_ gensupport.URLParams
14873	ctx_       context.Context
14874	header_    http.Header
14875}
14876
14877// Delete: Deletes the requested filter set from the account with the
14878// given account ID.
14879//
14880// - name: Full name of the resource to delete. For example: - For a
14881//   bidder-level filter set for bidder 123:
14882//   `bidders/123/filterSets/abc` - For an account-level filter set for
14883//   the buyer account representing bidder 123:
14884//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
14885//   filter set for the child seat buyer account 456 whose bidder is
14886//   123: `bidders/123/accounts/456/filterSets/abc`.
14887func (r *BiddersFilterSetsService) Delete(name string) *BiddersFilterSetsDeleteCall {
14888	c := &BiddersFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14889	c.name = name
14890	return c
14891}
14892
14893// Fields allows partial responses to be retrieved. See
14894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14895// for more information.
14896func (c *BiddersFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersFilterSetsDeleteCall {
14897	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14898	return c
14899}
14900
14901// Context sets the context to be used in this call's Do method. Any
14902// pending HTTP request will be aborted if the provided context is
14903// canceled.
14904func (c *BiddersFilterSetsDeleteCall) Context(ctx context.Context) *BiddersFilterSetsDeleteCall {
14905	c.ctx_ = ctx
14906	return c
14907}
14908
14909// Header returns an http.Header that can be modified by the caller to
14910// add HTTP headers to the request.
14911func (c *BiddersFilterSetsDeleteCall) Header() http.Header {
14912	if c.header_ == nil {
14913		c.header_ = make(http.Header)
14914	}
14915	return c.header_
14916}
14917
14918func (c *BiddersFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
14919	reqHeaders := make(http.Header)
14920	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
14921	for k, v := range c.header_ {
14922		reqHeaders[k] = v
14923	}
14924	reqHeaders.Set("User-Agent", c.s.userAgent())
14925	var body io.Reader = nil
14926	c.urlParams_.Set("alt", alt)
14927	c.urlParams_.Set("prettyPrint", "false")
14928	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14929	urls += "?" + c.urlParams_.Encode()
14930	req, err := http.NewRequest("DELETE", urls, body)
14931	if err != nil {
14932		return nil, err
14933	}
14934	req.Header = reqHeaders
14935	googleapi.Expand(req.URL, map[string]string{
14936		"name": c.name,
14937	})
14938	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14939}
14940
14941// Do executes the "adexchangebuyer2.bidders.filterSets.delete" call.
14942// Exactly one of *Empty or error will be non-nil. Any non-2xx status
14943// code is an error. Response headers are in either
14944// *Empty.ServerResponse.Header or (if a response was returned at all)
14945// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14946// check whether the returned error was because http.StatusNotModified
14947// was returned.
14948func (c *BiddersFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14949	gensupport.SetOptions(c.urlParams_, opts...)
14950	res, err := c.doRequest("json")
14951	if res != nil && res.StatusCode == http.StatusNotModified {
14952		if res.Body != nil {
14953			res.Body.Close()
14954		}
14955		return nil, &googleapi.Error{
14956			Code:   res.StatusCode,
14957			Header: res.Header,
14958		}
14959	}
14960	if err != nil {
14961		return nil, err
14962	}
14963	defer googleapi.CloseBody(res)
14964	if err := googleapi.CheckResponse(res); err != nil {
14965		return nil, err
14966	}
14967	ret := &Empty{
14968		ServerResponse: googleapi.ServerResponse{
14969			Header:         res.Header,
14970			HTTPStatusCode: res.StatusCode,
14971		},
14972	}
14973	target := &ret
14974	if err := gensupport.DecodeResponse(target, res); err != nil {
14975		return nil, err
14976	}
14977	return ret, nil
14978	// {
14979	//   "description": "Deletes the requested filter set from the account with the given account ID.",
14980	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}",
14981	//   "httpMethod": "DELETE",
14982	//   "id": "adexchangebuyer2.bidders.filterSets.delete",
14983	//   "parameterOrder": [
14984	//     "name"
14985	//   ],
14986	//   "parameters": {
14987	//     "name": {
14988	//       "description": "Full name of the resource to delete. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14989	//       "location": "path",
14990	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
14991	//       "required": true,
14992	//       "type": "string"
14993	//     }
14994	//   },
14995	//   "path": "v2beta1/{+name}",
14996	//   "response": {
14997	//     "$ref": "Empty"
14998	//   },
14999	//   "scopes": [
15000	//     "https://www.googleapis.com/auth/adexchange.buyer"
15001	//   ]
15002	// }
15003
15004}
15005
15006// method id "adexchangebuyer2.bidders.filterSets.get":
15007
15008type BiddersFilterSetsGetCall struct {
15009	s            *Service
15010	name         string
15011	urlParams_   gensupport.URLParams
15012	ifNoneMatch_ string
15013	ctx_         context.Context
15014	header_      http.Header
15015}
15016
15017// Get: Retrieves the requested filter set for the account with the
15018// given account ID.
15019//
15020// - name: Full name of the resource being requested. For example: - For
15021//   a bidder-level filter set for bidder 123:
15022//   `bidders/123/filterSets/abc` - For an account-level filter set for
15023//   the buyer account representing bidder 123:
15024//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
15025//   filter set for the child seat buyer account 456 whose bidder is
15026//   123: `bidders/123/accounts/456/filterSets/abc`.
15027func (r *BiddersFilterSetsService) Get(name string) *BiddersFilterSetsGetCall {
15028	c := &BiddersFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15029	c.name = name
15030	return c
15031}
15032
15033// Fields allows partial responses to be retrieved. See
15034// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15035// for more information.
15036func (c *BiddersFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersFilterSetsGetCall {
15037	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15038	return c
15039}
15040
15041// IfNoneMatch sets the optional parameter which makes the operation
15042// fail if the object's ETag matches the given value. This is useful for
15043// getting updates only after the object has changed since the last
15044// request. Use googleapi.IsNotModified to check whether the response
15045// error from Do is the result of In-None-Match.
15046func (c *BiddersFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersFilterSetsGetCall {
15047	c.ifNoneMatch_ = entityTag
15048	return c
15049}
15050
15051// Context sets the context to be used in this call's Do method. Any
15052// pending HTTP request will be aborted if the provided context is
15053// canceled.
15054func (c *BiddersFilterSetsGetCall) Context(ctx context.Context) *BiddersFilterSetsGetCall {
15055	c.ctx_ = ctx
15056	return c
15057}
15058
15059// Header returns an http.Header that can be modified by the caller to
15060// add HTTP headers to the request.
15061func (c *BiddersFilterSetsGetCall) Header() http.Header {
15062	if c.header_ == nil {
15063		c.header_ = make(http.Header)
15064	}
15065	return c.header_
15066}
15067
15068func (c *BiddersFilterSetsGetCall) doRequest(alt string) (*http.Response, error) {
15069	reqHeaders := make(http.Header)
15070	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15071	for k, v := range c.header_ {
15072		reqHeaders[k] = v
15073	}
15074	reqHeaders.Set("User-Agent", c.s.userAgent())
15075	if c.ifNoneMatch_ != "" {
15076		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15077	}
15078	var body io.Reader = nil
15079	c.urlParams_.Set("alt", alt)
15080	c.urlParams_.Set("prettyPrint", "false")
15081	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
15082	urls += "?" + c.urlParams_.Encode()
15083	req, err := http.NewRequest("GET", urls, body)
15084	if err != nil {
15085		return nil, err
15086	}
15087	req.Header = reqHeaders
15088	googleapi.Expand(req.URL, map[string]string{
15089		"name": c.name,
15090	})
15091	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15092}
15093
15094// Do executes the "adexchangebuyer2.bidders.filterSets.get" call.
15095// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
15096// status code is an error. Response headers are in either
15097// *FilterSet.ServerResponse.Header or (if a response was returned at
15098// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15099// to check whether the returned error was because
15100// http.StatusNotModified was returned.
15101func (c *BiddersFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
15102	gensupport.SetOptions(c.urlParams_, opts...)
15103	res, err := c.doRequest("json")
15104	if res != nil && res.StatusCode == http.StatusNotModified {
15105		if res.Body != nil {
15106			res.Body.Close()
15107		}
15108		return nil, &googleapi.Error{
15109			Code:   res.StatusCode,
15110			Header: res.Header,
15111		}
15112	}
15113	if err != nil {
15114		return nil, err
15115	}
15116	defer googleapi.CloseBody(res)
15117	if err := googleapi.CheckResponse(res); err != nil {
15118		return nil, err
15119	}
15120	ret := &FilterSet{
15121		ServerResponse: googleapi.ServerResponse{
15122			Header:         res.Header,
15123			HTTPStatusCode: res.StatusCode,
15124		},
15125	}
15126	target := &ret
15127	if err := gensupport.DecodeResponse(target, res); err != nil {
15128		return nil, err
15129	}
15130	return ret, nil
15131	// {
15132	//   "description": "Retrieves the requested filter set for the account with the given account ID.",
15133	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}",
15134	//   "httpMethod": "GET",
15135	//   "id": "adexchangebuyer2.bidders.filterSets.get",
15136	//   "parameterOrder": [
15137	//     "name"
15138	//   ],
15139	//   "parameters": {
15140	//     "name": {
15141	//       "description": "Full name of the resource being requested. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15142	//       "location": "path",
15143	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15144	//       "required": true,
15145	//       "type": "string"
15146	//     }
15147	//   },
15148	//   "path": "v2beta1/{+name}",
15149	//   "response": {
15150	//     "$ref": "FilterSet"
15151	//   },
15152	//   "scopes": [
15153	//     "https://www.googleapis.com/auth/adexchange.buyer"
15154	//   ]
15155	// }
15156
15157}
15158
15159// method id "adexchangebuyer2.bidders.filterSets.list":
15160
15161type BiddersFilterSetsListCall struct {
15162	s            *Service
15163	ownerName    string
15164	urlParams_   gensupport.URLParams
15165	ifNoneMatch_ string
15166	ctx_         context.Context
15167	header_      http.Header
15168}
15169
15170// List: Lists all filter sets for the account with the given account
15171// ID.
15172//
15173// - ownerName: Name of the owner (bidder or account) of the filter sets
15174//   to be listed. For example: - For a bidder-level filter set for
15175//   bidder 123: `bidders/123` - For an account-level filter set for the
15176//   buyer account representing bidder 123: `bidders/123/accounts/123` -
15177//   For an account-level filter set for the child seat buyer account
15178//   456 whose bidder is 123: `bidders/123/accounts/456`.
15179func (r *BiddersFilterSetsService) List(ownerName string) *BiddersFilterSetsListCall {
15180	c := &BiddersFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15181	c.ownerName = ownerName
15182	return c
15183}
15184
15185// PageSize sets the optional parameter "pageSize": Requested page size.
15186// The server may return fewer results than requested. If unspecified,
15187// the server will pick an appropriate default.
15188func (c *BiddersFilterSetsListCall) PageSize(pageSize int64) *BiddersFilterSetsListCall {
15189	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15190	return c
15191}
15192
15193// PageToken sets the optional parameter "pageToken": A token
15194// identifying a page of results the server should return. Typically,
15195// this is the value of ListFilterSetsResponse.nextPageToken returned
15196// from the previous call to the accounts.filterSets.list method.
15197func (c *BiddersFilterSetsListCall) PageToken(pageToken string) *BiddersFilterSetsListCall {
15198	c.urlParams_.Set("pageToken", pageToken)
15199	return c
15200}
15201
15202// Fields allows partial responses to be retrieved. See
15203// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15204// for more information.
15205func (c *BiddersFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsListCall {
15206	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15207	return c
15208}
15209
15210// IfNoneMatch sets the optional parameter which makes the operation
15211// fail if the object's ETag matches the given value. This is useful for
15212// getting updates only after the object has changed since the last
15213// request. Use googleapi.IsNotModified to check whether the response
15214// error from Do is the result of In-None-Match.
15215func (c *BiddersFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsListCall {
15216	c.ifNoneMatch_ = entityTag
15217	return c
15218}
15219
15220// Context sets the context to be used in this call's Do method. Any
15221// pending HTTP request will be aborted if the provided context is
15222// canceled.
15223func (c *BiddersFilterSetsListCall) Context(ctx context.Context) *BiddersFilterSetsListCall {
15224	c.ctx_ = ctx
15225	return c
15226}
15227
15228// Header returns an http.Header that can be modified by the caller to
15229// add HTTP headers to the request.
15230func (c *BiddersFilterSetsListCall) Header() http.Header {
15231	if c.header_ == nil {
15232		c.header_ = make(http.Header)
15233	}
15234	return c.header_
15235}
15236
15237func (c *BiddersFilterSetsListCall) doRequest(alt string) (*http.Response, error) {
15238	reqHeaders := make(http.Header)
15239	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15240	for k, v := range c.header_ {
15241		reqHeaders[k] = v
15242	}
15243	reqHeaders.Set("User-Agent", c.s.userAgent())
15244	if c.ifNoneMatch_ != "" {
15245		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15246	}
15247	var body io.Reader = nil
15248	c.urlParams_.Set("alt", alt)
15249	c.urlParams_.Set("prettyPrint", "false")
15250	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
15251	urls += "?" + c.urlParams_.Encode()
15252	req, err := http.NewRequest("GET", urls, body)
15253	if err != nil {
15254		return nil, err
15255	}
15256	req.Header = reqHeaders
15257	googleapi.Expand(req.URL, map[string]string{
15258		"ownerName": c.ownerName,
15259	})
15260	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15261}
15262
15263// Do executes the "adexchangebuyer2.bidders.filterSets.list" call.
15264// Exactly one of *ListFilterSetsResponse or error will be non-nil. Any
15265// non-2xx status code is an error. Response headers are in either
15266// *ListFilterSetsResponse.ServerResponse.Header or (if a response was
15267// returned at all) in error.(*googleapi.Error).Header. Use
15268// googleapi.IsNotModified to check whether the returned error was
15269// because http.StatusNotModified was returned.
15270func (c *BiddersFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) {
15271	gensupport.SetOptions(c.urlParams_, opts...)
15272	res, err := c.doRequest("json")
15273	if res != nil && res.StatusCode == http.StatusNotModified {
15274		if res.Body != nil {
15275			res.Body.Close()
15276		}
15277		return nil, &googleapi.Error{
15278			Code:   res.StatusCode,
15279			Header: res.Header,
15280		}
15281	}
15282	if err != nil {
15283		return nil, err
15284	}
15285	defer googleapi.CloseBody(res)
15286	if err := googleapi.CheckResponse(res); err != nil {
15287		return nil, err
15288	}
15289	ret := &ListFilterSetsResponse{
15290		ServerResponse: googleapi.ServerResponse{
15291			Header:         res.Header,
15292			HTTPStatusCode: res.StatusCode,
15293		},
15294	}
15295	target := &ret
15296	if err := gensupport.DecodeResponse(target, res); err != nil {
15297		return nil, err
15298	}
15299	return ret, nil
15300	// {
15301	//   "description": "Lists all filter sets for the account with the given account ID.",
15302	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets",
15303	//   "httpMethod": "GET",
15304	//   "id": "adexchangebuyer2.bidders.filterSets.list",
15305	//   "parameterOrder": [
15306	//     "ownerName"
15307	//   ],
15308	//   "parameters": {
15309	//     "ownerName": {
15310	//       "description": "Name of the owner (bidder or account) of the filter sets to be listed. For example: - For a bidder-level filter set for bidder 123: `bidders/123` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456`",
15311	//       "location": "path",
15312	//       "pattern": "^bidders/[^/]+$",
15313	//       "required": true,
15314	//       "type": "string"
15315	//     },
15316	//     "pageSize": {
15317	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
15318	//       "format": "int32",
15319	//       "location": "query",
15320	//       "type": "integer"
15321	//     },
15322	//     "pageToken": {
15323	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilterSetsResponse.nextPageToken returned from the previous call to the accounts.filterSets.list method.",
15324	//       "location": "query",
15325	//       "type": "string"
15326	//     }
15327	//   },
15328	//   "path": "v2beta1/{+ownerName}/filterSets",
15329	//   "response": {
15330	//     "$ref": "ListFilterSetsResponse"
15331	//   },
15332	//   "scopes": [
15333	//     "https://www.googleapis.com/auth/adexchange.buyer"
15334	//   ]
15335	// }
15336
15337}
15338
15339// Pages invokes f for each page of results.
15340// A non-nil error returned from f will halt the iteration.
15341// The provided context supersedes any context provided to the Context method.
15342func (c *BiddersFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error {
15343	c.ctx_ = ctx
15344	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15345	for {
15346		x, err := c.Do()
15347		if err != nil {
15348			return err
15349		}
15350		if err := f(x); err != nil {
15351			return err
15352		}
15353		if x.NextPageToken == "" {
15354			return nil
15355		}
15356		c.PageToken(x.NextPageToken)
15357	}
15358}
15359
15360// method id "adexchangebuyer2.bidders.filterSets.bidMetrics.list":
15361
15362type BiddersFilterSetsBidMetricsListCall struct {
15363	s             *Service
15364	filterSetName string
15365	urlParams_    gensupport.URLParams
15366	ifNoneMatch_  string
15367	ctx_          context.Context
15368	header_       http.Header
15369}
15370
15371// List: Lists all metrics that are measured in terms of number of bids.
15372//
15373// - filterSetName: Name of the filter set that should be applied to the
15374//   requested metrics. For example: - For a bidder-level filter set for
15375//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
15376//   filter set for the buyer account representing bidder 123:
15377//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
15378//   filter set for the child seat buyer account 456 whose bidder is
15379//   123: `bidders/123/accounts/456/filterSets/abc`.
15380func (r *BiddersFilterSetsBidMetricsService) List(filterSetName string) *BiddersFilterSetsBidMetricsListCall {
15381	c := &BiddersFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15382	c.filterSetName = filterSetName
15383	return c
15384}
15385
15386// PageSize sets the optional parameter "pageSize": Requested page size.
15387// The server may return fewer results than requested. If unspecified,
15388// the server will pick an appropriate default.
15389func (c *BiddersFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidMetricsListCall {
15390	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15391	return c
15392}
15393
15394// PageToken sets the optional parameter "pageToken": A token
15395// identifying a page of results the server should return. Typically,
15396// this is the value of ListBidMetricsResponse.nextPageToken returned
15397// from the previous call to the bidMetrics.list method.
15398func (c *BiddersFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsBidMetricsListCall {
15399	c.urlParams_.Set("pageToken", pageToken)
15400	return c
15401}
15402
15403// Fields allows partial responses to be retrieved. See
15404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15405// for more information.
15406func (c *BiddersFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidMetricsListCall {
15407	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15408	return c
15409}
15410
15411// IfNoneMatch sets the optional parameter which makes the operation
15412// fail if the object's ETag matches the given value. This is useful for
15413// getting updates only after the object has changed since the last
15414// request. Use googleapi.IsNotModified to check whether the response
15415// error from Do is the result of In-None-Match.
15416func (c *BiddersFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidMetricsListCall {
15417	c.ifNoneMatch_ = entityTag
15418	return c
15419}
15420
15421// Context sets the context to be used in this call's Do method. Any
15422// pending HTTP request will be aborted if the provided context is
15423// canceled.
15424func (c *BiddersFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsBidMetricsListCall {
15425	c.ctx_ = ctx
15426	return c
15427}
15428
15429// Header returns an http.Header that can be modified by the caller to
15430// add HTTP headers to the request.
15431func (c *BiddersFilterSetsBidMetricsListCall) Header() http.Header {
15432	if c.header_ == nil {
15433		c.header_ = make(http.Header)
15434	}
15435	return c.header_
15436}
15437
15438func (c *BiddersFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) {
15439	reqHeaders := make(http.Header)
15440	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15441	for k, v := range c.header_ {
15442		reqHeaders[k] = v
15443	}
15444	reqHeaders.Set("User-Agent", c.s.userAgent())
15445	if c.ifNoneMatch_ != "" {
15446		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15447	}
15448	var body io.Reader = nil
15449	c.urlParams_.Set("alt", alt)
15450	c.urlParams_.Set("prettyPrint", "false")
15451	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics")
15452	urls += "?" + c.urlParams_.Encode()
15453	req, err := http.NewRequest("GET", urls, body)
15454	if err != nil {
15455		return nil, err
15456	}
15457	req.Header = reqHeaders
15458	googleapi.Expand(req.URL, map[string]string{
15459		"filterSetName": c.filterSetName,
15460	})
15461	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15462}
15463
15464// Do executes the "adexchangebuyer2.bidders.filterSets.bidMetrics.list" call.
15465// Exactly one of *ListBidMetricsResponse or error will be non-nil. Any
15466// non-2xx status code is an error. Response headers are in either
15467// *ListBidMetricsResponse.ServerResponse.Header or (if a response was
15468// returned at all) in error.(*googleapi.Error).Header. Use
15469// googleapi.IsNotModified to check whether the returned error was
15470// because http.StatusNotModified was returned.
15471func (c *BiddersFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) {
15472	gensupport.SetOptions(c.urlParams_, opts...)
15473	res, err := c.doRequest("json")
15474	if res != nil && res.StatusCode == http.StatusNotModified {
15475		if res.Body != nil {
15476			res.Body.Close()
15477		}
15478		return nil, &googleapi.Error{
15479			Code:   res.StatusCode,
15480			Header: res.Header,
15481		}
15482	}
15483	if err != nil {
15484		return nil, err
15485	}
15486	defer googleapi.CloseBody(res)
15487	if err := googleapi.CheckResponse(res); err != nil {
15488		return nil, err
15489	}
15490	ret := &ListBidMetricsResponse{
15491		ServerResponse: googleapi.ServerResponse{
15492			Header:         res.Header,
15493			HTTPStatusCode: res.StatusCode,
15494		},
15495	}
15496	target := &ret
15497	if err := gensupport.DecodeResponse(target, res); err != nil {
15498		return nil, err
15499	}
15500	return ret, nil
15501	// {
15502	//   "description": "Lists all metrics that are measured in terms of number of bids.",
15503	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidMetrics",
15504	//   "httpMethod": "GET",
15505	//   "id": "adexchangebuyer2.bidders.filterSets.bidMetrics.list",
15506	//   "parameterOrder": [
15507	//     "filterSetName"
15508	//   ],
15509	//   "parameters": {
15510	//     "filterSetName": {
15511	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15512	//       "location": "path",
15513	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15514	//       "required": true,
15515	//       "type": "string"
15516	//     },
15517	//     "pageSize": {
15518	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
15519	//       "format": "int32",
15520	//       "location": "query",
15521	//       "type": "integer"
15522	//     },
15523	//     "pageToken": {
15524	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidMetricsResponse.nextPageToken returned from the previous call to the bidMetrics.list method.",
15525	//       "location": "query",
15526	//       "type": "string"
15527	//     }
15528	//   },
15529	//   "path": "v2beta1/{+filterSetName}/bidMetrics",
15530	//   "response": {
15531	//     "$ref": "ListBidMetricsResponse"
15532	//   },
15533	//   "scopes": [
15534	//     "https://www.googleapis.com/auth/adexchange.buyer"
15535	//   ]
15536	// }
15537
15538}
15539
15540// Pages invokes f for each page of results.
15541// A non-nil error returned from f will halt the iteration.
15542// The provided context supersedes any context provided to the Context method.
15543func (c *BiddersFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error {
15544	c.ctx_ = ctx
15545	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15546	for {
15547		x, err := c.Do()
15548		if err != nil {
15549			return err
15550		}
15551		if err := f(x); err != nil {
15552			return err
15553		}
15554		if x.NextPageToken == "" {
15555			return nil
15556		}
15557		c.PageToken(x.NextPageToken)
15558	}
15559}
15560
15561// method id "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list":
15562
15563type BiddersFilterSetsBidResponseErrorsListCall struct {
15564	s             *Service
15565	filterSetName string
15566	urlParams_    gensupport.URLParams
15567	ifNoneMatch_  string
15568	ctx_          context.Context
15569	header_       http.Header
15570}
15571
15572// List: List all errors that occurred in bid responses, with the number
15573// of bid responses affected for each reason.
15574//
15575// - filterSetName: Name of the filter set that should be applied to the
15576//   requested metrics. For example: - For a bidder-level filter set for
15577//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
15578//   filter set for the buyer account representing bidder 123:
15579//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
15580//   filter set for the child seat buyer account 456 whose bidder is
15581//   123: `bidders/123/accounts/456/filterSets/abc`.
15582func (r *BiddersFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersFilterSetsBidResponseErrorsListCall {
15583	c := &BiddersFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15584	c.filterSetName = filterSetName
15585	return c
15586}
15587
15588// PageSize sets the optional parameter "pageSize": Requested page size.
15589// The server may return fewer results than requested. If unspecified,
15590// the server will pick an appropriate default.
15591func (c *BiddersFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponseErrorsListCall {
15592	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15593	return c
15594}
15595
15596// PageToken sets the optional parameter "pageToken": A token
15597// identifying a page of results the server should return. Typically,
15598// this is the value of ListBidResponseErrorsResponse.nextPageToken
15599// returned from the previous call to the bidResponseErrors.list method.
15600func (c *BiddersFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponseErrorsListCall {
15601	c.urlParams_.Set("pageToken", pageToken)
15602	return c
15603}
15604
15605// Fields allows partial responses to be retrieved. See
15606// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15607// for more information.
15608func (c *BiddersFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponseErrorsListCall {
15609	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15610	return c
15611}
15612
15613// IfNoneMatch sets the optional parameter which makes the operation
15614// fail if the object's ETag matches the given value. This is useful for
15615// getting updates only after the object has changed since the last
15616// request. Use googleapi.IsNotModified to check whether the response
15617// error from Do is the result of In-None-Match.
15618func (c *BiddersFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponseErrorsListCall {
15619	c.ifNoneMatch_ = entityTag
15620	return c
15621}
15622
15623// Context sets the context to be used in this call's Do method. Any
15624// pending HTTP request will be aborted if the provided context is
15625// canceled.
15626func (c *BiddersFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponseErrorsListCall {
15627	c.ctx_ = ctx
15628	return c
15629}
15630
15631// Header returns an http.Header that can be modified by the caller to
15632// add HTTP headers to the request.
15633func (c *BiddersFilterSetsBidResponseErrorsListCall) Header() http.Header {
15634	if c.header_ == nil {
15635		c.header_ = make(http.Header)
15636	}
15637	return c.header_
15638}
15639
15640func (c *BiddersFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) {
15641	reqHeaders := make(http.Header)
15642	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15643	for k, v := range c.header_ {
15644		reqHeaders[k] = v
15645	}
15646	reqHeaders.Set("User-Agent", c.s.userAgent())
15647	if c.ifNoneMatch_ != "" {
15648		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15649	}
15650	var body io.Reader = nil
15651	c.urlParams_.Set("alt", alt)
15652	c.urlParams_.Set("prettyPrint", "false")
15653	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors")
15654	urls += "?" + c.urlParams_.Encode()
15655	req, err := http.NewRequest("GET", urls, body)
15656	if err != nil {
15657		return nil, err
15658	}
15659	req.Header = reqHeaders
15660	googleapi.Expand(req.URL, map[string]string{
15661		"filterSetName": c.filterSetName,
15662	})
15663	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15664}
15665
15666// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list" call.
15667// Exactly one of *ListBidResponseErrorsResponse or error will be
15668// non-nil. Any non-2xx status code is an error. Response headers are in
15669// either *ListBidResponseErrorsResponse.ServerResponse.Header or (if a
15670// response was returned at all) in error.(*googleapi.Error).Header. Use
15671// googleapi.IsNotModified to check whether the returned error was
15672// because http.StatusNotModified was returned.
15673func (c *BiddersFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) {
15674	gensupport.SetOptions(c.urlParams_, opts...)
15675	res, err := c.doRequest("json")
15676	if res != nil && res.StatusCode == http.StatusNotModified {
15677		if res.Body != nil {
15678			res.Body.Close()
15679		}
15680		return nil, &googleapi.Error{
15681			Code:   res.StatusCode,
15682			Header: res.Header,
15683		}
15684	}
15685	if err != nil {
15686		return nil, err
15687	}
15688	defer googleapi.CloseBody(res)
15689	if err := googleapi.CheckResponse(res); err != nil {
15690		return nil, err
15691	}
15692	ret := &ListBidResponseErrorsResponse{
15693		ServerResponse: googleapi.ServerResponse{
15694			Header:         res.Header,
15695			HTTPStatusCode: res.StatusCode,
15696		},
15697	}
15698	target := &ret
15699	if err := gensupport.DecodeResponse(target, res); err != nil {
15700		return nil, err
15701	}
15702	return ret, nil
15703	// {
15704	//   "description": "List all errors that occurred in bid responses, with the number of bid responses affected for each reason.",
15705	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidResponseErrors",
15706	//   "httpMethod": "GET",
15707	//   "id": "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list",
15708	//   "parameterOrder": [
15709	//     "filterSetName"
15710	//   ],
15711	//   "parameters": {
15712	//     "filterSetName": {
15713	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15714	//       "location": "path",
15715	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15716	//       "required": true,
15717	//       "type": "string"
15718	//     },
15719	//     "pageSize": {
15720	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
15721	//       "format": "int32",
15722	//       "location": "query",
15723	//       "type": "integer"
15724	//     },
15725	//     "pageToken": {
15726	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponseErrorsResponse.nextPageToken returned from the previous call to the bidResponseErrors.list method.",
15727	//       "location": "query",
15728	//       "type": "string"
15729	//     }
15730	//   },
15731	//   "path": "v2beta1/{+filterSetName}/bidResponseErrors",
15732	//   "response": {
15733	//     "$ref": "ListBidResponseErrorsResponse"
15734	//   },
15735	//   "scopes": [
15736	//     "https://www.googleapis.com/auth/adexchange.buyer"
15737	//   ]
15738	// }
15739
15740}
15741
15742// Pages invokes f for each page of results.
15743// A non-nil error returned from f will halt the iteration.
15744// The provided context supersedes any context provided to the Context method.
15745func (c *BiddersFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error {
15746	c.ctx_ = ctx
15747	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15748	for {
15749		x, err := c.Do()
15750		if err != nil {
15751			return err
15752		}
15753		if err := f(x); err != nil {
15754			return err
15755		}
15756		if x.NextPageToken == "" {
15757			return nil
15758		}
15759		c.PageToken(x.NextPageToken)
15760	}
15761}
15762
15763// method id "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list":
15764
15765type BiddersFilterSetsBidResponsesWithoutBidsListCall struct {
15766	s             *Service
15767	filterSetName string
15768	urlParams_    gensupport.URLParams
15769	ifNoneMatch_  string
15770	ctx_          context.Context
15771	header_       http.Header
15772}
15773
15774// List: List all reasons for which bid responses were considered to
15775// have no applicable bids, with the number of bid responses affected
15776// for each reason.
15777//
15778// - filterSetName: Name of the filter set that should be applied to the
15779//   requested metrics. For example: - For a bidder-level filter set for
15780//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
15781//   filter set for the buyer account representing bidder 123:
15782//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
15783//   filter set for the child seat buyer account 456 whose bidder is
15784//   123: `bidders/123/accounts/456/filterSets/abc`.
15785func (r *BiddersFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15786	c := &BiddersFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15787	c.filterSetName = filterSetName
15788	return c
15789}
15790
15791// PageSize sets the optional parameter "pageSize": Requested page size.
15792// The server may return fewer results than requested. If unspecified,
15793// the server will pick an appropriate default.
15794func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15795	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15796	return c
15797}
15798
15799// PageToken sets the optional parameter "pageToken": A token
15800// identifying a page of results the server should return. Typically,
15801// this is the value of
15802// ListBidResponsesWithoutBidsResponse.nextPageToken returned from the
15803// previous call to the bidResponsesWithoutBids.list method.
15804func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15805	c.urlParams_.Set("pageToken", pageToken)
15806	return c
15807}
15808
15809// Fields allows partial responses to be retrieved. See
15810// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15811// for more information.
15812func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15813	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15814	return c
15815}
15816
15817// IfNoneMatch sets the optional parameter which makes the operation
15818// fail if the object's ETag matches the given value. This is useful for
15819// getting updates only after the object has changed since the last
15820// request. Use googleapi.IsNotModified to check whether the response
15821// error from Do is the result of In-None-Match.
15822func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15823	c.ifNoneMatch_ = entityTag
15824	return c
15825}
15826
15827// Context sets the context to be used in this call's Do method. Any
15828// pending HTTP request will be aborted if the provided context is
15829// canceled.
15830func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15831	c.ctx_ = ctx
15832	return c
15833}
15834
15835// Header returns an http.Header that can be modified by the caller to
15836// add HTTP headers to the request.
15837func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header {
15838	if c.header_ == nil {
15839		c.header_ = make(http.Header)
15840	}
15841	return c.header_
15842}
15843
15844func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) {
15845	reqHeaders := make(http.Header)
15846	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
15847	for k, v := range c.header_ {
15848		reqHeaders[k] = v
15849	}
15850	reqHeaders.Set("User-Agent", c.s.userAgent())
15851	if c.ifNoneMatch_ != "" {
15852		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15853	}
15854	var body io.Reader = nil
15855	c.urlParams_.Set("alt", alt)
15856	c.urlParams_.Set("prettyPrint", "false")
15857	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids")
15858	urls += "?" + c.urlParams_.Encode()
15859	req, err := http.NewRequest("GET", urls, body)
15860	if err != nil {
15861		return nil, err
15862	}
15863	req.Header = reqHeaders
15864	googleapi.Expand(req.URL, map[string]string{
15865		"filterSetName": c.filterSetName,
15866	})
15867	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15868}
15869
15870// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list" call.
15871// Exactly one of *ListBidResponsesWithoutBidsResponse or error will be
15872// non-nil. Any non-2xx status code is an error. Response headers are in
15873// either *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or
15874// (if a response was returned at all) in
15875// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15876// whether the returned error was because http.StatusNotModified was
15877// returned.
15878func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) {
15879	gensupport.SetOptions(c.urlParams_, opts...)
15880	res, err := c.doRequest("json")
15881	if res != nil && res.StatusCode == http.StatusNotModified {
15882		if res.Body != nil {
15883			res.Body.Close()
15884		}
15885		return nil, &googleapi.Error{
15886			Code:   res.StatusCode,
15887			Header: res.Header,
15888		}
15889	}
15890	if err != nil {
15891		return nil, err
15892	}
15893	defer googleapi.CloseBody(res)
15894	if err := googleapi.CheckResponse(res); err != nil {
15895		return nil, err
15896	}
15897	ret := &ListBidResponsesWithoutBidsResponse{
15898		ServerResponse: googleapi.ServerResponse{
15899			Header:         res.Header,
15900			HTTPStatusCode: res.StatusCode,
15901		},
15902	}
15903	target := &ret
15904	if err := gensupport.DecodeResponse(target, res); err != nil {
15905		return nil, err
15906	}
15907	return ret, nil
15908	// {
15909	//   "description": "List all reasons for which bid responses were considered to have no applicable bids, with the number of bid responses affected for each reason.",
15910	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidResponsesWithoutBids",
15911	//   "httpMethod": "GET",
15912	//   "id": "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list",
15913	//   "parameterOrder": [
15914	//     "filterSetName"
15915	//   ],
15916	//   "parameters": {
15917	//     "filterSetName": {
15918	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15919	//       "location": "path",
15920	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15921	//       "required": true,
15922	//       "type": "string"
15923	//     },
15924	//     "pageSize": {
15925	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
15926	//       "format": "int32",
15927	//       "location": "query",
15928	//       "type": "integer"
15929	//     },
15930	//     "pageToken": {
15931	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListBidResponsesWithoutBidsResponse.nextPageToken returned from the previous call to the bidResponsesWithoutBids.list method.",
15932	//       "location": "query",
15933	//       "type": "string"
15934	//     }
15935	//   },
15936	//   "path": "v2beta1/{+filterSetName}/bidResponsesWithoutBids",
15937	//   "response": {
15938	//     "$ref": "ListBidResponsesWithoutBidsResponse"
15939	//   },
15940	//   "scopes": [
15941	//     "https://www.googleapis.com/auth/adexchange.buyer"
15942	//   ]
15943	// }
15944
15945}
15946
15947// Pages invokes f for each page of results.
15948// A non-nil error returned from f will halt the iteration.
15949// The provided context supersedes any context provided to the Context method.
15950func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error {
15951	c.ctx_ = ctx
15952	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15953	for {
15954		x, err := c.Do()
15955		if err != nil {
15956			return err
15957		}
15958		if err := f(x); err != nil {
15959			return err
15960		}
15961		if x.NextPageToken == "" {
15962			return nil
15963		}
15964		c.PageToken(x.NextPageToken)
15965	}
15966}
15967
15968// method id "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list":
15969
15970type BiddersFilterSetsFilteredBidRequestsListCall struct {
15971	s             *Service
15972	filterSetName string
15973	urlParams_    gensupport.URLParams
15974	ifNoneMatch_  string
15975	ctx_          context.Context
15976	header_       http.Header
15977}
15978
15979// List: List all reasons that caused a bid request not to be sent for
15980// an impression, with the number of bid requests not sent for each
15981// reason.
15982//
15983// - filterSetName: Name of the filter set that should be applied to the
15984//   requested metrics. For example: - For a bidder-level filter set for
15985//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
15986//   filter set for the buyer account representing bidder 123:
15987//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
15988//   filter set for the child seat buyer account 456 whose bidder is
15989//   123: `bidders/123/accounts/456/filterSets/abc`.
15990func (r *BiddersFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersFilterSetsFilteredBidRequestsListCall {
15991	c := &BiddersFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15992	c.filterSetName = filterSetName
15993	return c
15994}
15995
15996// PageSize sets the optional parameter "pageSize": Requested page size.
15997// The server may return fewer results than requested. If unspecified,
15998// the server will pick an appropriate default.
15999func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidRequestsListCall {
16000	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16001	return c
16002}
16003
16004// PageToken sets the optional parameter "pageToken": A token
16005// identifying a page of results the server should return. Typically,
16006// this is the value of ListFilteredBidRequestsResponse.nextPageToken
16007// returned from the previous call to the filteredBidRequests.list
16008// method.
16009func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidRequestsListCall {
16010	c.urlParams_.Set("pageToken", pageToken)
16011	return c
16012}
16013
16014// Fields allows partial responses to be retrieved. See
16015// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16016// for more information.
16017func (c *BiddersFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidRequestsListCall {
16018	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16019	return c
16020}
16021
16022// IfNoneMatch sets the optional parameter which makes the operation
16023// fail if the object's ETag matches the given value. This is useful for
16024// getting updates only after the object has changed since the last
16025// request. Use googleapi.IsNotModified to check whether the response
16026// error from Do is the result of In-None-Match.
16027func (c *BiddersFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidRequestsListCall {
16028	c.ifNoneMatch_ = entityTag
16029	return c
16030}
16031
16032// Context sets the context to be used in this call's Do method. Any
16033// pending HTTP request will be aborted if the provided context is
16034// canceled.
16035func (c *BiddersFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidRequestsListCall {
16036	c.ctx_ = ctx
16037	return c
16038}
16039
16040// Header returns an http.Header that can be modified by the caller to
16041// add HTTP headers to the request.
16042func (c *BiddersFilterSetsFilteredBidRequestsListCall) Header() http.Header {
16043	if c.header_ == nil {
16044		c.header_ = make(http.Header)
16045	}
16046	return c.header_
16047}
16048
16049func (c *BiddersFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) {
16050	reqHeaders := make(http.Header)
16051	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16052	for k, v := range c.header_ {
16053		reqHeaders[k] = v
16054	}
16055	reqHeaders.Set("User-Agent", c.s.userAgent())
16056	if c.ifNoneMatch_ != "" {
16057		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16058	}
16059	var body io.Reader = nil
16060	c.urlParams_.Set("alt", alt)
16061	c.urlParams_.Set("prettyPrint", "false")
16062	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests")
16063	urls += "?" + c.urlParams_.Encode()
16064	req, err := http.NewRequest("GET", urls, body)
16065	if err != nil {
16066		return nil, err
16067	}
16068	req.Header = reqHeaders
16069	googleapi.Expand(req.URL, map[string]string{
16070		"filterSetName": c.filterSetName,
16071	})
16072	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16073}
16074
16075// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list" call.
16076// Exactly one of *ListFilteredBidRequestsResponse or error will be
16077// non-nil. Any non-2xx status code is an error. Response headers are in
16078// either *ListFilteredBidRequestsResponse.ServerResponse.Header or (if
16079// a response was returned at all) in error.(*googleapi.Error).Header.
16080// Use googleapi.IsNotModified to check whether the returned error was
16081// because http.StatusNotModified was returned.
16082func (c *BiddersFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) {
16083	gensupport.SetOptions(c.urlParams_, opts...)
16084	res, err := c.doRequest("json")
16085	if res != nil && res.StatusCode == http.StatusNotModified {
16086		if res.Body != nil {
16087			res.Body.Close()
16088		}
16089		return nil, &googleapi.Error{
16090			Code:   res.StatusCode,
16091			Header: res.Header,
16092		}
16093	}
16094	if err != nil {
16095		return nil, err
16096	}
16097	defer googleapi.CloseBody(res)
16098	if err := googleapi.CheckResponse(res); err != nil {
16099		return nil, err
16100	}
16101	ret := &ListFilteredBidRequestsResponse{
16102		ServerResponse: googleapi.ServerResponse{
16103			Header:         res.Header,
16104			HTTPStatusCode: res.StatusCode,
16105		},
16106	}
16107	target := &ret
16108	if err := gensupport.DecodeResponse(target, res); err != nil {
16109		return nil, err
16110	}
16111	return ret, nil
16112	// {
16113	//   "description": "List all reasons that caused a bid request not to be sent for an impression, with the number of bid requests not sent for each reason.",
16114	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBidRequests",
16115	//   "httpMethod": "GET",
16116	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list",
16117	//   "parameterOrder": [
16118	//     "filterSetName"
16119	//   ],
16120	//   "parameters": {
16121	//     "filterSetName": {
16122	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16123	//       "location": "path",
16124	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16125	//       "required": true,
16126	//       "type": "string"
16127	//     },
16128	//     "pageSize": {
16129	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
16130	//       "format": "int32",
16131	//       "location": "query",
16132	//       "type": "integer"
16133	//     },
16134	//     "pageToken": {
16135	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidRequestsResponse.nextPageToken returned from the previous call to the filteredBidRequests.list method.",
16136	//       "location": "query",
16137	//       "type": "string"
16138	//     }
16139	//   },
16140	//   "path": "v2beta1/{+filterSetName}/filteredBidRequests",
16141	//   "response": {
16142	//     "$ref": "ListFilteredBidRequestsResponse"
16143	//   },
16144	//   "scopes": [
16145	//     "https://www.googleapis.com/auth/adexchange.buyer"
16146	//   ]
16147	// }
16148
16149}
16150
16151// Pages invokes f for each page of results.
16152// A non-nil error returned from f will halt the iteration.
16153// The provided context supersedes any context provided to the Context method.
16154func (c *BiddersFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error {
16155	c.ctx_ = ctx
16156	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16157	for {
16158		x, err := c.Do()
16159		if err != nil {
16160			return err
16161		}
16162		if err := f(x); err != nil {
16163			return err
16164		}
16165		if x.NextPageToken == "" {
16166			return nil
16167		}
16168		c.PageToken(x.NextPageToken)
16169	}
16170}
16171
16172// method id "adexchangebuyer2.bidders.filterSets.filteredBids.list":
16173
16174type BiddersFilterSetsFilteredBidsListCall struct {
16175	s             *Service
16176	filterSetName string
16177	urlParams_    gensupport.URLParams
16178	ifNoneMatch_  string
16179	ctx_          context.Context
16180	header_       http.Header
16181}
16182
16183// List: List all reasons for which bids were filtered, with the number
16184// of bids filtered for each reason.
16185//
16186// - filterSetName: Name of the filter set that should be applied to the
16187//   requested metrics. For example: - For a bidder-level filter set for
16188//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
16189//   filter set for the buyer account representing bidder 123:
16190//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
16191//   filter set for the child seat buyer account 456 whose bidder is
16192//   123: `bidders/123/accounts/456/filterSets/abc`.
16193func (r *BiddersFilterSetsFilteredBidsService) List(filterSetName string) *BiddersFilterSetsFilteredBidsListCall {
16194	c := &BiddersFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16195	c.filterSetName = filterSetName
16196	return c
16197}
16198
16199// PageSize sets the optional parameter "pageSize": Requested page size.
16200// The server may return fewer results than requested. If unspecified,
16201// the server will pick an appropriate default.
16202func (c *BiddersFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsListCall {
16203	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16204	return c
16205}
16206
16207// PageToken sets the optional parameter "pageToken": A token
16208// identifying a page of results the server should return. Typically,
16209// this is the value of ListFilteredBidsResponse.nextPageToken returned
16210// from the previous call to the filteredBids.list method.
16211func (c *BiddersFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsListCall {
16212	c.urlParams_.Set("pageToken", pageToken)
16213	return c
16214}
16215
16216// Fields allows partial responses to be retrieved. See
16217// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16218// for more information.
16219func (c *BiddersFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsListCall {
16220	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16221	return c
16222}
16223
16224// IfNoneMatch sets the optional parameter which makes the operation
16225// fail if the object's ETag matches the given value. This is useful for
16226// getting updates only after the object has changed since the last
16227// request. Use googleapi.IsNotModified to check whether the response
16228// error from Do is the result of In-None-Match.
16229func (c *BiddersFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsListCall {
16230	c.ifNoneMatch_ = entityTag
16231	return c
16232}
16233
16234// Context sets the context to be used in this call's Do method. Any
16235// pending HTTP request will be aborted if the provided context is
16236// canceled.
16237func (c *BiddersFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsListCall {
16238	c.ctx_ = ctx
16239	return c
16240}
16241
16242// Header returns an http.Header that can be modified by the caller to
16243// add HTTP headers to the request.
16244func (c *BiddersFilterSetsFilteredBidsListCall) Header() http.Header {
16245	if c.header_ == nil {
16246		c.header_ = make(http.Header)
16247	}
16248	return c.header_
16249}
16250
16251func (c *BiddersFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) {
16252	reqHeaders := make(http.Header)
16253	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16254	for k, v := range c.header_ {
16255		reqHeaders[k] = v
16256	}
16257	reqHeaders.Set("User-Agent", c.s.userAgent())
16258	if c.ifNoneMatch_ != "" {
16259		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16260	}
16261	var body io.Reader = nil
16262	c.urlParams_.Set("alt", alt)
16263	c.urlParams_.Set("prettyPrint", "false")
16264	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids")
16265	urls += "?" + c.urlParams_.Encode()
16266	req, err := http.NewRequest("GET", urls, body)
16267	if err != nil {
16268		return nil, err
16269	}
16270	req.Header = reqHeaders
16271	googleapi.Expand(req.URL, map[string]string{
16272		"filterSetName": c.filterSetName,
16273	})
16274	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16275}
16276
16277// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.list" call.
16278// Exactly one of *ListFilteredBidsResponse or error will be non-nil.
16279// Any non-2xx status code is an error. Response headers are in either
16280// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was
16281// returned at all) in error.(*googleapi.Error).Header. Use
16282// googleapi.IsNotModified to check whether the returned error was
16283// because http.StatusNotModified was returned.
16284func (c *BiddersFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) {
16285	gensupport.SetOptions(c.urlParams_, opts...)
16286	res, err := c.doRequest("json")
16287	if res != nil && res.StatusCode == http.StatusNotModified {
16288		if res.Body != nil {
16289			res.Body.Close()
16290		}
16291		return nil, &googleapi.Error{
16292			Code:   res.StatusCode,
16293			Header: res.Header,
16294		}
16295	}
16296	if err != nil {
16297		return nil, err
16298	}
16299	defer googleapi.CloseBody(res)
16300	if err := googleapi.CheckResponse(res); err != nil {
16301		return nil, err
16302	}
16303	ret := &ListFilteredBidsResponse{
16304		ServerResponse: googleapi.ServerResponse{
16305			Header:         res.Header,
16306			HTTPStatusCode: res.StatusCode,
16307		},
16308	}
16309	target := &ret
16310	if err := gensupport.DecodeResponse(target, res); err != nil {
16311		return nil, err
16312	}
16313	return ret, nil
16314	// {
16315	//   "description": "List all reasons for which bids were filtered, with the number of bids filtered for each reason.",
16316	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids",
16317	//   "httpMethod": "GET",
16318	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBids.list",
16319	//   "parameterOrder": [
16320	//     "filterSetName"
16321	//   ],
16322	//   "parameters": {
16323	//     "filterSetName": {
16324	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16325	//       "location": "path",
16326	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16327	//       "required": true,
16328	//       "type": "string"
16329	//     },
16330	//     "pageSize": {
16331	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
16332	//       "format": "int32",
16333	//       "location": "query",
16334	//       "type": "integer"
16335	//     },
16336	//     "pageToken": {
16337	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListFilteredBidsResponse.nextPageToken returned from the previous call to the filteredBids.list method.",
16338	//       "location": "query",
16339	//       "type": "string"
16340	//     }
16341	//   },
16342	//   "path": "v2beta1/{+filterSetName}/filteredBids",
16343	//   "response": {
16344	//     "$ref": "ListFilteredBidsResponse"
16345	//   },
16346	//   "scopes": [
16347	//     "https://www.googleapis.com/auth/adexchange.buyer"
16348	//   ]
16349	// }
16350
16351}
16352
16353// Pages invokes f for each page of results.
16354// A non-nil error returned from f will halt the iteration.
16355// The provided context supersedes any context provided to the Context method.
16356func (c *BiddersFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error {
16357	c.ctx_ = ctx
16358	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16359	for {
16360		x, err := c.Do()
16361		if err != nil {
16362			return err
16363		}
16364		if err := f(x); err != nil {
16365			return err
16366		}
16367		if x.NextPageToken == "" {
16368			return nil
16369		}
16370		c.PageToken(x.NextPageToken)
16371	}
16372}
16373
16374// method id "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list":
16375
16376type BiddersFilterSetsFilteredBidsCreativesListCall struct {
16377	s                *Service
16378	filterSetName    string
16379	creativeStatusId int64
16380	urlParams_       gensupport.URLParams
16381	ifNoneMatch_     string
16382	ctx_             context.Context
16383	header_          http.Header
16384}
16385
16386// List: List all creatives associated with a specific reason for which
16387// bids were filtered, with the number of bids filtered for each
16388// creative.
16389//
16390// - creativeStatusId: The ID of the creative status for which to
16391//   retrieve a breakdown by creative. See creative-status-codes
16392//   (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
16393// - filterSetName: Name of the filter set that should be applied to the
16394//   requested metrics. For example: - For a bidder-level filter set for
16395//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
16396//   filter set for the buyer account representing bidder 123:
16397//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
16398//   filter set for the child seat buyer account 456 whose bidder is
16399//   123: `bidders/123/accounts/456/filterSets/abc`.
16400func (r *BiddersFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsCreativesListCall {
16401	c := &BiddersFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16402	c.filterSetName = filterSetName
16403	c.creativeStatusId = creativeStatusId
16404	return c
16405}
16406
16407// PageSize sets the optional parameter "pageSize": Requested page size.
16408// The server may return fewer results than requested. If unspecified,
16409// the server will pick an appropriate default.
16410func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsCreativesListCall {
16411	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16412	return c
16413}
16414
16415// PageToken sets the optional parameter "pageToken": A token
16416// identifying a page of results the server should return. Typically,
16417// this is the value of
16418// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned
16419// from the previous call to the filteredBids.creatives.list method.
16420func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsCreativesListCall {
16421	c.urlParams_.Set("pageToken", pageToken)
16422	return c
16423}
16424
16425// Fields allows partial responses to be retrieved. See
16426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16427// for more information.
16428func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsCreativesListCall {
16429	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16430	return c
16431}
16432
16433// IfNoneMatch sets the optional parameter which makes the operation
16434// fail if the object's ETag matches the given value. This is useful for
16435// getting updates only after the object has changed since the last
16436// request. Use googleapi.IsNotModified to check whether the response
16437// error from Do is the result of In-None-Match.
16438func (c *BiddersFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsCreativesListCall {
16439	c.ifNoneMatch_ = entityTag
16440	return c
16441}
16442
16443// Context sets the context to be used in this call's Do method. Any
16444// pending HTTP request will be aborted if the provided context is
16445// canceled.
16446func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsCreativesListCall {
16447	c.ctx_ = ctx
16448	return c
16449}
16450
16451// Header returns an http.Header that can be modified by the caller to
16452// add HTTP headers to the request.
16453func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Header() http.Header {
16454	if c.header_ == nil {
16455		c.header_ = make(http.Header)
16456	}
16457	return c.header_
16458}
16459
16460func (c *BiddersFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) {
16461	reqHeaders := make(http.Header)
16462	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16463	for k, v := range c.header_ {
16464		reqHeaders[k] = v
16465	}
16466	reqHeaders.Set("User-Agent", c.s.userAgent())
16467	if c.ifNoneMatch_ != "" {
16468		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16469	}
16470	var body io.Reader = nil
16471	c.urlParams_.Set("alt", alt)
16472	c.urlParams_.Set("prettyPrint", "false")
16473	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives")
16474	urls += "?" + c.urlParams_.Encode()
16475	req, err := http.NewRequest("GET", urls, body)
16476	if err != nil {
16477		return nil, err
16478	}
16479	req.Header = reqHeaders
16480	googleapi.Expand(req.URL, map[string]string{
16481		"filterSetName":    c.filterSetName,
16482		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
16483	})
16484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16485}
16486
16487// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list" call.
16488// Exactly one of *ListCreativeStatusBreakdownByCreativeResponse or
16489// error will be non-nil. Any non-2xx status code is an error. Response
16490// headers are in either
16491// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header
16492// or (if a response was returned at all) in
16493// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16494// whether the returned error was because http.StatusNotModified was
16495// returned.
16496func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) {
16497	gensupport.SetOptions(c.urlParams_, opts...)
16498	res, err := c.doRequest("json")
16499	if res != nil && res.StatusCode == http.StatusNotModified {
16500		if res.Body != nil {
16501			res.Body.Close()
16502		}
16503		return nil, &googleapi.Error{
16504			Code:   res.StatusCode,
16505			Header: res.Header,
16506		}
16507	}
16508	if err != nil {
16509		return nil, err
16510	}
16511	defer googleapi.CloseBody(res)
16512	if err := googleapi.CheckResponse(res); err != nil {
16513		return nil, err
16514	}
16515	ret := &ListCreativeStatusBreakdownByCreativeResponse{
16516		ServerResponse: googleapi.ServerResponse{
16517			Header:         res.Header,
16518			HTTPStatusCode: res.StatusCode,
16519		},
16520	}
16521	target := &ret
16522	if err := gensupport.DecodeResponse(target, res); err != nil {
16523		return nil, err
16524	}
16525	return ret, nil
16526	// {
16527	//   "description": "List all creatives associated with a specific reason for which bids were filtered, with the number of bids filtered for each creative.",
16528	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/creatives",
16529	//   "httpMethod": "GET",
16530	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list",
16531	//   "parameterOrder": [
16532	//     "filterSetName",
16533	//     "creativeStatusId"
16534	//   ],
16535	//   "parameters": {
16536	//     "creativeStatusId": {
16537	//       "description": "The ID of the creative status for which to retrieve a breakdown by creative. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).",
16538	//       "format": "int32",
16539	//       "location": "path",
16540	//       "required": true,
16541	//       "type": "integer"
16542	//     },
16543	//     "filterSetName": {
16544	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16545	//       "location": "path",
16546	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16547	//       "required": true,
16548	//       "type": "string"
16549	//     },
16550	//     "pageSize": {
16551	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
16552	//       "format": "int32",
16553	//       "location": "query",
16554	//       "type": "integer"
16555	//     },
16556	//     "pageToken": {
16557	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByCreativeResponse.nextPageToken returned from the previous call to the filteredBids.creatives.list method.",
16558	//       "location": "query",
16559	//       "type": "string"
16560	//     }
16561	//   },
16562	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives",
16563	//   "response": {
16564	//     "$ref": "ListCreativeStatusBreakdownByCreativeResponse"
16565	//   },
16566	//   "scopes": [
16567	//     "https://www.googleapis.com/auth/adexchange.buyer"
16568	//   ]
16569	// }
16570
16571}
16572
16573// Pages invokes f for each page of results.
16574// A non-nil error returned from f will halt the iteration.
16575// The provided context supersedes any context provided to the Context method.
16576func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error {
16577	c.ctx_ = ctx
16578	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16579	for {
16580		x, err := c.Do()
16581		if err != nil {
16582			return err
16583		}
16584		if err := f(x); err != nil {
16585			return err
16586		}
16587		if x.NextPageToken == "" {
16588			return nil
16589		}
16590		c.PageToken(x.NextPageToken)
16591	}
16592}
16593
16594// method id "adexchangebuyer2.bidders.filterSets.filteredBids.details.list":
16595
16596type BiddersFilterSetsFilteredBidsDetailsListCall struct {
16597	s                *Service
16598	filterSetName    string
16599	creativeStatusId int64
16600	urlParams_       gensupport.URLParams
16601	ifNoneMatch_     string
16602	ctx_             context.Context
16603	header_          http.Header
16604}
16605
16606// List: List all details associated with a specific reason for which
16607// bids were filtered, with the number of bids filtered for each detail.
16608//
16609// - creativeStatusId: The ID of the creative status for which to
16610//   retrieve a breakdown by detail. See creative-status-codes
16611//   (https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).
16612//   Details are only available for statuses 10, 14, 15, 17, 18, 19, 86,
16613//   and 87.
16614// - filterSetName: Name of the filter set that should be applied to the
16615//   requested metrics. For example: - For a bidder-level filter set for
16616//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
16617//   filter set for the buyer account representing bidder 123:
16618//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
16619//   filter set for the child seat buyer account 456 whose bidder is
16620//   123: `bidders/123/accounts/456/filterSets/abc`.
16621func (r *BiddersFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsDetailsListCall {
16622	c := &BiddersFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16623	c.filterSetName = filterSetName
16624	c.creativeStatusId = creativeStatusId
16625	return c
16626}
16627
16628// PageSize sets the optional parameter "pageSize": Requested page size.
16629// The server may return fewer results than requested. If unspecified,
16630// the server will pick an appropriate default.
16631func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsDetailsListCall {
16632	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16633	return c
16634}
16635
16636// PageToken sets the optional parameter "pageToken": A token
16637// identifying a page of results the server should return. Typically,
16638// this is the value of
16639// ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned
16640// from the previous call to the filteredBids.details.list method.
16641func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsDetailsListCall {
16642	c.urlParams_.Set("pageToken", pageToken)
16643	return c
16644}
16645
16646// Fields allows partial responses to be retrieved. See
16647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16648// for more information.
16649func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsDetailsListCall {
16650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16651	return c
16652}
16653
16654// IfNoneMatch sets the optional parameter which makes the operation
16655// fail if the object's ETag matches the given value. This is useful for
16656// getting updates only after the object has changed since the last
16657// request. Use googleapi.IsNotModified to check whether the response
16658// error from Do is the result of In-None-Match.
16659func (c *BiddersFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsDetailsListCall {
16660	c.ifNoneMatch_ = entityTag
16661	return c
16662}
16663
16664// Context sets the context to be used in this call's Do method. Any
16665// pending HTTP request will be aborted if the provided context is
16666// canceled.
16667func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsDetailsListCall {
16668	c.ctx_ = ctx
16669	return c
16670}
16671
16672// Header returns an http.Header that can be modified by the caller to
16673// add HTTP headers to the request.
16674func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Header() http.Header {
16675	if c.header_ == nil {
16676		c.header_ = make(http.Header)
16677	}
16678	return c.header_
16679}
16680
16681func (c *BiddersFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) {
16682	reqHeaders := make(http.Header)
16683	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16684	for k, v := range c.header_ {
16685		reqHeaders[k] = v
16686	}
16687	reqHeaders.Set("User-Agent", c.s.userAgent())
16688	if c.ifNoneMatch_ != "" {
16689		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16690	}
16691	var body io.Reader = nil
16692	c.urlParams_.Set("alt", alt)
16693	c.urlParams_.Set("prettyPrint", "false")
16694	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details")
16695	urls += "?" + c.urlParams_.Encode()
16696	req, err := http.NewRequest("GET", urls, body)
16697	if err != nil {
16698		return nil, err
16699	}
16700	req.Header = reqHeaders
16701	googleapi.Expand(req.URL, map[string]string{
16702		"filterSetName":    c.filterSetName,
16703		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
16704	})
16705	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16706}
16707
16708// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.details.list" call.
16709// Exactly one of *ListCreativeStatusBreakdownByDetailResponse or error
16710// will be non-nil. Any non-2xx status code is an error. Response
16711// headers are in either
16712// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or
16713// (if a response was returned at all) in
16714// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16715// whether the returned error was because http.StatusNotModified was
16716// returned.
16717func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) {
16718	gensupport.SetOptions(c.urlParams_, opts...)
16719	res, err := c.doRequest("json")
16720	if res != nil && res.StatusCode == http.StatusNotModified {
16721		if res.Body != nil {
16722			res.Body.Close()
16723		}
16724		return nil, &googleapi.Error{
16725			Code:   res.StatusCode,
16726			Header: res.Header,
16727		}
16728	}
16729	if err != nil {
16730		return nil, err
16731	}
16732	defer googleapi.CloseBody(res)
16733	if err := googleapi.CheckResponse(res); err != nil {
16734		return nil, err
16735	}
16736	ret := &ListCreativeStatusBreakdownByDetailResponse{
16737		ServerResponse: googleapi.ServerResponse{
16738			Header:         res.Header,
16739			HTTPStatusCode: res.StatusCode,
16740		},
16741	}
16742	target := &ret
16743	if err := gensupport.DecodeResponse(target, res); err != nil {
16744		return nil, err
16745	}
16746	return ret, nil
16747	// {
16748	//   "description": "List all details associated with a specific reason for which bids were filtered, with the number of bids filtered for each detail.",
16749	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/details",
16750	//   "httpMethod": "GET",
16751	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBids.details.list",
16752	//   "parameterOrder": [
16753	//     "filterSetName",
16754	//     "creativeStatusId"
16755	//   ],
16756	//   "parameters": {
16757	//     "creativeStatusId": {
16758	//       "description": "The ID of the creative status for which to retrieve a breakdown by detail. See [creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes). Details are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.",
16759	//       "format": "int32",
16760	//       "location": "path",
16761	//       "required": true,
16762	//       "type": "integer"
16763	//     },
16764	//     "filterSetName": {
16765	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16766	//       "location": "path",
16767	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16768	//       "required": true,
16769	//       "type": "string"
16770	//     },
16771	//     "pageSize": {
16772	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
16773	//       "format": "int32",
16774	//       "location": "query",
16775	//       "type": "integer"
16776	//     },
16777	//     "pageToken": {
16778	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativeStatusBreakdownByDetailResponse.nextPageToken returned from the previous call to the filteredBids.details.list method.",
16779	//       "location": "query",
16780	//       "type": "string"
16781	//     }
16782	//   },
16783	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details",
16784	//   "response": {
16785	//     "$ref": "ListCreativeStatusBreakdownByDetailResponse"
16786	//   },
16787	//   "scopes": [
16788	//     "https://www.googleapis.com/auth/adexchange.buyer"
16789	//   ]
16790	// }
16791
16792}
16793
16794// Pages invokes f for each page of results.
16795// A non-nil error returned from f will halt the iteration.
16796// The provided context supersedes any context provided to the Context method.
16797func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error {
16798	c.ctx_ = ctx
16799	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16800	for {
16801		x, err := c.Do()
16802		if err != nil {
16803			return err
16804		}
16805		if err := f(x); err != nil {
16806			return err
16807		}
16808		if x.NextPageToken == "" {
16809			return nil
16810		}
16811		c.PageToken(x.NextPageToken)
16812	}
16813}
16814
16815// method id "adexchangebuyer2.bidders.filterSets.impressionMetrics.list":
16816
16817type BiddersFilterSetsImpressionMetricsListCall struct {
16818	s             *Service
16819	filterSetName string
16820	urlParams_    gensupport.URLParams
16821	ifNoneMatch_  string
16822	ctx_          context.Context
16823	header_       http.Header
16824}
16825
16826// List: Lists all metrics that are measured in terms of number of
16827// impressions.
16828//
16829// - filterSetName: Name of the filter set that should be applied to the
16830//   requested metrics. For example: - For a bidder-level filter set for
16831//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
16832//   filter set for the buyer account representing bidder 123:
16833//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
16834//   filter set for the child seat buyer account 456 whose bidder is
16835//   123: `bidders/123/accounts/456/filterSets/abc`.
16836func (r *BiddersFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersFilterSetsImpressionMetricsListCall {
16837	c := &BiddersFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16838	c.filterSetName = filterSetName
16839	return c
16840}
16841
16842// PageSize sets the optional parameter "pageSize": Requested page size.
16843// The server may return fewer results than requested. If unspecified,
16844// the server will pick an appropriate default.
16845func (c *BiddersFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsImpressionMetricsListCall {
16846	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16847	return c
16848}
16849
16850// PageToken sets the optional parameter "pageToken": A token
16851// identifying a page of results the server should return. Typically,
16852// this is the value of ListImpressionMetricsResponse.nextPageToken
16853// returned from the previous call to the impressionMetrics.list method.
16854func (c *BiddersFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsImpressionMetricsListCall {
16855	c.urlParams_.Set("pageToken", pageToken)
16856	return c
16857}
16858
16859// Fields allows partial responses to be retrieved. See
16860// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16861// for more information.
16862func (c *BiddersFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsImpressionMetricsListCall {
16863	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16864	return c
16865}
16866
16867// IfNoneMatch sets the optional parameter which makes the operation
16868// fail if the object's ETag matches the given value. This is useful for
16869// getting updates only after the object has changed since the last
16870// request. Use googleapi.IsNotModified to check whether the response
16871// error from Do is the result of In-None-Match.
16872func (c *BiddersFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsImpressionMetricsListCall {
16873	c.ifNoneMatch_ = entityTag
16874	return c
16875}
16876
16877// Context sets the context to be used in this call's Do method. Any
16878// pending HTTP request will be aborted if the provided context is
16879// canceled.
16880func (c *BiddersFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsImpressionMetricsListCall {
16881	c.ctx_ = ctx
16882	return c
16883}
16884
16885// Header returns an http.Header that can be modified by the caller to
16886// add HTTP headers to the request.
16887func (c *BiddersFilterSetsImpressionMetricsListCall) Header() http.Header {
16888	if c.header_ == nil {
16889		c.header_ = make(http.Header)
16890	}
16891	return c.header_
16892}
16893
16894func (c *BiddersFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) {
16895	reqHeaders := make(http.Header)
16896	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
16897	for k, v := range c.header_ {
16898		reqHeaders[k] = v
16899	}
16900	reqHeaders.Set("User-Agent", c.s.userAgent())
16901	if c.ifNoneMatch_ != "" {
16902		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16903	}
16904	var body io.Reader = nil
16905	c.urlParams_.Set("alt", alt)
16906	c.urlParams_.Set("prettyPrint", "false")
16907	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics")
16908	urls += "?" + c.urlParams_.Encode()
16909	req, err := http.NewRequest("GET", urls, body)
16910	if err != nil {
16911		return nil, err
16912	}
16913	req.Header = reqHeaders
16914	googleapi.Expand(req.URL, map[string]string{
16915		"filterSetName": c.filterSetName,
16916	})
16917	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16918}
16919
16920// Do executes the "adexchangebuyer2.bidders.filterSets.impressionMetrics.list" call.
16921// Exactly one of *ListImpressionMetricsResponse or error will be
16922// non-nil. Any non-2xx status code is an error. Response headers are in
16923// either *ListImpressionMetricsResponse.ServerResponse.Header or (if a
16924// response was returned at all) in error.(*googleapi.Error).Header. Use
16925// googleapi.IsNotModified to check whether the returned error was
16926// because http.StatusNotModified was returned.
16927func (c *BiddersFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) {
16928	gensupport.SetOptions(c.urlParams_, opts...)
16929	res, err := c.doRequest("json")
16930	if res != nil && res.StatusCode == http.StatusNotModified {
16931		if res.Body != nil {
16932			res.Body.Close()
16933		}
16934		return nil, &googleapi.Error{
16935			Code:   res.StatusCode,
16936			Header: res.Header,
16937		}
16938	}
16939	if err != nil {
16940		return nil, err
16941	}
16942	defer googleapi.CloseBody(res)
16943	if err := googleapi.CheckResponse(res); err != nil {
16944		return nil, err
16945	}
16946	ret := &ListImpressionMetricsResponse{
16947		ServerResponse: googleapi.ServerResponse{
16948			Header:         res.Header,
16949			HTTPStatusCode: res.StatusCode,
16950		},
16951	}
16952	target := &ret
16953	if err := gensupport.DecodeResponse(target, res); err != nil {
16954		return nil, err
16955	}
16956	return ret, nil
16957	// {
16958	//   "description": "Lists all metrics that are measured in terms of number of impressions.",
16959	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/impressionMetrics",
16960	//   "httpMethod": "GET",
16961	//   "id": "adexchangebuyer2.bidders.filterSets.impressionMetrics.list",
16962	//   "parameterOrder": [
16963	//     "filterSetName"
16964	//   ],
16965	//   "parameters": {
16966	//     "filterSetName": {
16967	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16968	//       "location": "path",
16969	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16970	//       "required": true,
16971	//       "type": "string"
16972	//     },
16973	//     "pageSize": {
16974	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
16975	//       "format": "int32",
16976	//       "location": "query",
16977	//       "type": "integer"
16978	//     },
16979	//     "pageToken": {
16980	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListImpressionMetricsResponse.nextPageToken returned from the previous call to the impressionMetrics.list method.",
16981	//       "location": "query",
16982	//       "type": "string"
16983	//     }
16984	//   },
16985	//   "path": "v2beta1/{+filterSetName}/impressionMetrics",
16986	//   "response": {
16987	//     "$ref": "ListImpressionMetricsResponse"
16988	//   },
16989	//   "scopes": [
16990	//     "https://www.googleapis.com/auth/adexchange.buyer"
16991	//   ]
16992	// }
16993
16994}
16995
16996// Pages invokes f for each page of results.
16997// A non-nil error returned from f will halt the iteration.
16998// The provided context supersedes any context provided to the Context method.
16999func (c *BiddersFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error {
17000	c.ctx_ = ctx
17001	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17002	for {
17003		x, err := c.Do()
17004		if err != nil {
17005			return err
17006		}
17007		if err := f(x); err != nil {
17008			return err
17009		}
17010		if x.NextPageToken == "" {
17011			return nil
17012		}
17013		c.PageToken(x.NextPageToken)
17014	}
17015}
17016
17017// method id "adexchangebuyer2.bidders.filterSets.losingBids.list":
17018
17019type BiddersFilterSetsLosingBidsListCall struct {
17020	s             *Service
17021	filterSetName string
17022	urlParams_    gensupport.URLParams
17023	ifNoneMatch_  string
17024	ctx_          context.Context
17025	header_       http.Header
17026}
17027
17028// List: List all reasons for which bids lost in the auction, with the
17029// number of bids that lost for each reason.
17030//
17031// - filterSetName: Name of the filter set that should be applied to the
17032//   requested metrics. For example: - For a bidder-level filter set for
17033//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
17034//   filter set for the buyer account representing bidder 123:
17035//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
17036//   filter set for the child seat buyer account 456 whose bidder is
17037//   123: `bidders/123/accounts/456/filterSets/abc`.
17038func (r *BiddersFilterSetsLosingBidsService) List(filterSetName string) *BiddersFilterSetsLosingBidsListCall {
17039	c := &BiddersFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17040	c.filterSetName = filterSetName
17041	return c
17042}
17043
17044// PageSize sets the optional parameter "pageSize": Requested page size.
17045// The server may return fewer results than requested. If unspecified,
17046// the server will pick an appropriate default.
17047func (c *BiddersFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsLosingBidsListCall {
17048	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17049	return c
17050}
17051
17052// PageToken sets the optional parameter "pageToken": A token
17053// identifying a page of results the server should return. Typically,
17054// this is the value of ListLosingBidsResponse.nextPageToken returned
17055// from the previous call to the losingBids.list method.
17056func (c *BiddersFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersFilterSetsLosingBidsListCall {
17057	c.urlParams_.Set("pageToken", pageToken)
17058	return c
17059}
17060
17061// Fields allows partial responses to be retrieved. See
17062// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17063// for more information.
17064func (c *BiddersFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsLosingBidsListCall {
17065	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17066	return c
17067}
17068
17069// IfNoneMatch sets the optional parameter which makes the operation
17070// fail if the object's ETag matches the given value. This is useful for
17071// getting updates only after the object has changed since the last
17072// request. Use googleapi.IsNotModified to check whether the response
17073// error from Do is the result of In-None-Match.
17074func (c *BiddersFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsLosingBidsListCall {
17075	c.ifNoneMatch_ = entityTag
17076	return c
17077}
17078
17079// Context sets the context to be used in this call's Do method. Any
17080// pending HTTP request will be aborted if the provided context is
17081// canceled.
17082func (c *BiddersFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersFilterSetsLosingBidsListCall {
17083	c.ctx_ = ctx
17084	return c
17085}
17086
17087// Header returns an http.Header that can be modified by the caller to
17088// add HTTP headers to the request.
17089func (c *BiddersFilterSetsLosingBidsListCall) Header() http.Header {
17090	if c.header_ == nil {
17091		c.header_ = make(http.Header)
17092	}
17093	return c.header_
17094}
17095
17096func (c *BiddersFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) {
17097	reqHeaders := make(http.Header)
17098	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17099	for k, v := range c.header_ {
17100		reqHeaders[k] = v
17101	}
17102	reqHeaders.Set("User-Agent", c.s.userAgent())
17103	if c.ifNoneMatch_ != "" {
17104		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17105	}
17106	var body io.Reader = nil
17107	c.urlParams_.Set("alt", alt)
17108	c.urlParams_.Set("prettyPrint", "false")
17109	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids")
17110	urls += "?" + c.urlParams_.Encode()
17111	req, err := http.NewRequest("GET", urls, body)
17112	if err != nil {
17113		return nil, err
17114	}
17115	req.Header = reqHeaders
17116	googleapi.Expand(req.URL, map[string]string{
17117		"filterSetName": c.filterSetName,
17118	})
17119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17120}
17121
17122// Do executes the "adexchangebuyer2.bidders.filterSets.losingBids.list" call.
17123// Exactly one of *ListLosingBidsResponse or error will be non-nil. Any
17124// non-2xx status code is an error. Response headers are in either
17125// *ListLosingBidsResponse.ServerResponse.Header or (if a response was
17126// returned at all) in error.(*googleapi.Error).Header. Use
17127// googleapi.IsNotModified to check whether the returned error was
17128// because http.StatusNotModified was returned.
17129func (c *BiddersFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) {
17130	gensupport.SetOptions(c.urlParams_, opts...)
17131	res, err := c.doRequest("json")
17132	if res != nil && res.StatusCode == http.StatusNotModified {
17133		if res.Body != nil {
17134			res.Body.Close()
17135		}
17136		return nil, &googleapi.Error{
17137			Code:   res.StatusCode,
17138			Header: res.Header,
17139		}
17140	}
17141	if err != nil {
17142		return nil, err
17143	}
17144	defer googleapi.CloseBody(res)
17145	if err := googleapi.CheckResponse(res); err != nil {
17146		return nil, err
17147	}
17148	ret := &ListLosingBidsResponse{
17149		ServerResponse: googleapi.ServerResponse{
17150			Header:         res.Header,
17151			HTTPStatusCode: res.StatusCode,
17152		},
17153	}
17154	target := &ret
17155	if err := gensupport.DecodeResponse(target, res); err != nil {
17156		return nil, err
17157	}
17158	return ret, nil
17159	// {
17160	//   "description": "List all reasons for which bids lost in the auction, with the number of bids that lost for each reason.",
17161	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/losingBids",
17162	//   "httpMethod": "GET",
17163	//   "id": "adexchangebuyer2.bidders.filterSets.losingBids.list",
17164	//   "parameterOrder": [
17165	//     "filterSetName"
17166	//   ],
17167	//   "parameters": {
17168	//     "filterSetName": {
17169	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
17170	//       "location": "path",
17171	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
17172	//       "required": true,
17173	//       "type": "string"
17174	//     },
17175	//     "pageSize": {
17176	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
17177	//       "format": "int32",
17178	//       "location": "query",
17179	//       "type": "integer"
17180	//     },
17181	//     "pageToken": {
17182	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListLosingBidsResponse.nextPageToken returned from the previous call to the losingBids.list method.",
17183	//       "location": "query",
17184	//       "type": "string"
17185	//     }
17186	//   },
17187	//   "path": "v2beta1/{+filterSetName}/losingBids",
17188	//   "response": {
17189	//     "$ref": "ListLosingBidsResponse"
17190	//   },
17191	//   "scopes": [
17192	//     "https://www.googleapis.com/auth/adexchange.buyer"
17193	//   ]
17194	// }
17195
17196}
17197
17198// Pages invokes f for each page of results.
17199// A non-nil error returned from f will halt the iteration.
17200// The provided context supersedes any context provided to the Context method.
17201func (c *BiddersFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error {
17202	c.ctx_ = ctx
17203	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17204	for {
17205		x, err := c.Do()
17206		if err != nil {
17207			return err
17208		}
17209		if err := f(x); err != nil {
17210			return err
17211		}
17212		if x.NextPageToken == "" {
17213			return nil
17214		}
17215		c.PageToken(x.NextPageToken)
17216	}
17217}
17218
17219// method id "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list":
17220
17221type BiddersFilterSetsNonBillableWinningBidsListCall struct {
17222	s             *Service
17223	filterSetName string
17224	urlParams_    gensupport.URLParams
17225	ifNoneMatch_  string
17226	ctx_          context.Context
17227	header_       http.Header
17228}
17229
17230// List: List all reasons for which winning bids were not billable, with
17231// the number of bids not billed for each reason.
17232//
17233// - filterSetName: Name of the filter set that should be applied to the
17234//   requested metrics. For example: - For a bidder-level filter set for
17235//   bidder 123: `bidders/123/filterSets/abc` - For an account-level
17236//   filter set for the buyer account representing bidder 123:
17237//   `bidders/123/accounts/123/filterSets/abc` - For an account-level
17238//   filter set for the child seat buyer account 456 whose bidder is
17239//   123: `bidders/123/accounts/456/filterSets/abc`.
17240func (r *BiddersFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersFilterSetsNonBillableWinningBidsListCall {
17241	c := &BiddersFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17242	c.filterSetName = filterSetName
17243	return c
17244}
17245
17246// PageSize sets the optional parameter "pageSize": Requested page size.
17247// The server may return fewer results than requested. If unspecified,
17248// the server will pick an appropriate default.
17249func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsNonBillableWinningBidsListCall {
17250	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17251	return c
17252}
17253
17254// PageToken sets the optional parameter "pageToken": A token
17255// identifying a page of results the server should return. Typically,
17256// this is the value of ListNonBillableWinningBidsResponse.nextPageToken
17257// returned from the previous call to the nonBillableWinningBids.list
17258// method.
17259func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersFilterSetsNonBillableWinningBidsListCall {
17260	c.urlParams_.Set("pageToken", pageToken)
17261	return c
17262}
17263
17264// Fields allows partial responses to be retrieved. See
17265// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17266// for more information.
17267func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsNonBillableWinningBidsListCall {
17268	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17269	return c
17270}
17271
17272// IfNoneMatch sets the optional parameter which makes the operation
17273// fail if the object's ETag matches the given value. This is useful for
17274// getting updates only after the object has changed since the last
17275// request. Use googleapi.IsNotModified to check whether the response
17276// error from Do is the result of In-None-Match.
17277func (c *BiddersFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsNonBillableWinningBidsListCall {
17278	c.ifNoneMatch_ = entityTag
17279	return c
17280}
17281
17282// Context sets the context to be used in this call's Do method. Any
17283// pending HTTP request will be aborted if the provided context is
17284// canceled.
17285func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersFilterSetsNonBillableWinningBidsListCall {
17286	c.ctx_ = ctx
17287	return c
17288}
17289
17290// Header returns an http.Header that can be modified by the caller to
17291// add HTTP headers to the request.
17292func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Header() http.Header {
17293	if c.header_ == nil {
17294		c.header_ = make(http.Header)
17295	}
17296	return c.header_
17297}
17298
17299func (c *BiddersFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) {
17300	reqHeaders := make(http.Header)
17301	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
17302	for k, v := range c.header_ {
17303		reqHeaders[k] = v
17304	}
17305	reqHeaders.Set("User-Agent", c.s.userAgent())
17306	if c.ifNoneMatch_ != "" {
17307		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17308	}
17309	var body io.Reader = nil
17310	c.urlParams_.Set("alt", alt)
17311	c.urlParams_.Set("prettyPrint", "false")
17312	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids")
17313	urls += "?" + c.urlParams_.Encode()
17314	req, err := http.NewRequest("GET", urls, body)
17315	if err != nil {
17316		return nil, err
17317	}
17318	req.Header = reqHeaders
17319	googleapi.Expand(req.URL, map[string]string{
17320		"filterSetName": c.filterSetName,
17321	})
17322	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17323}
17324
17325// Do executes the "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list" call.
17326// Exactly one of *ListNonBillableWinningBidsResponse or error will be
17327// non-nil. Any non-2xx status code is an error. Response headers are in
17328// either *ListNonBillableWinningBidsResponse.ServerResponse.Header or
17329// (if a response was returned at all) in
17330// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17331// whether the returned error was because http.StatusNotModified was
17332// returned.
17333func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) {
17334	gensupport.SetOptions(c.urlParams_, opts...)
17335	res, err := c.doRequest("json")
17336	if res != nil && res.StatusCode == http.StatusNotModified {
17337		if res.Body != nil {
17338			res.Body.Close()
17339		}
17340		return nil, &googleapi.Error{
17341			Code:   res.StatusCode,
17342			Header: res.Header,
17343		}
17344	}
17345	if err != nil {
17346		return nil, err
17347	}
17348	defer googleapi.CloseBody(res)
17349	if err := googleapi.CheckResponse(res); err != nil {
17350		return nil, err
17351	}
17352	ret := &ListNonBillableWinningBidsResponse{
17353		ServerResponse: googleapi.ServerResponse{
17354			Header:         res.Header,
17355			HTTPStatusCode: res.StatusCode,
17356		},
17357	}
17358	target := &ret
17359	if err := gensupport.DecodeResponse(target, res); err != nil {
17360		return nil, err
17361	}
17362	return ret, nil
17363	// {
17364	//   "description": "List all reasons for which winning bids were not billable, with the number of bids not billed for each reason.",
17365	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/nonBillableWinningBids",
17366	//   "httpMethod": "GET",
17367	//   "id": "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list",
17368	//   "parameterOrder": [
17369	//     "filterSetName"
17370	//   ],
17371	//   "parameters": {
17372	//     "filterSetName": {
17373	//       "description": "Name of the filter set that should be applied to the requested metrics. For example: - For a bidder-level filter set for bidder 123: `bidders/123/filterSets/abc` - For an account-level filter set for the buyer account representing bidder 123: `bidders/123/accounts/123/filterSets/abc` - For an account-level filter set for the child seat buyer account 456 whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
17374	//       "location": "path",
17375	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
17376	//       "required": true,
17377	//       "type": "string"
17378	//     },
17379	//     "pageSize": {
17380	//       "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.",
17381	//       "format": "int32",
17382	//       "location": "query",
17383	//       "type": "integer"
17384	//     },
17385	//     "pageToken": {
17386	//       "description": "A token identifying a page of results the server should return. Typically, this is the value of ListNonBillableWinningBidsResponse.nextPageToken returned from the previous call to the nonBillableWinningBids.list method.",
17387	//       "location": "query",
17388	//       "type": "string"
17389	//     }
17390	//   },
17391	//   "path": "v2beta1/{+filterSetName}/nonBillableWinningBids",
17392	//   "response": {
17393	//     "$ref": "ListNonBillableWinningBidsResponse"
17394	//   },
17395	//   "scopes": [
17396	//     "https://www.googleapis.com/auth/adexchange.buyer"
17397	//   ]
17398	// }
17399
17400}
17401
17402// Pages invokes f for each page of results.
17403// A non-nil error returned from f will halt the iteration.
17404// The provided context supersedes any context provided to the Context method.
17405func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error {
17406	c.ctx_ = ctx
17407	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17408	for {
17409		x, err := c.Do()
17410		if err != nil {
17411			return err
17412		}
17413		if err := f(x); err != nil {
17414			return err
17415		}
17416		if x.NextPageToken == "" {
17417			return nil
17418		}
17419		c.PageToken(x.NextPageToken)
17420	}
17421}
17422