1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package 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.
545// The supported range of dates begins 30 days before today and ends
546// today.
547// Validity checked upon filter set creation. If a filter set with an
548// absolute
549// date range is run at a later date more than 30 days after start_date,
550// it will
551// fail.
552type AbsoluteDateRange struct {
553	// EndDate: The end date of the range (inclusive).
554	// Must be within the 30 days leading up to current date, and must be
555	// equal to
556	// or after start_date.
557	EndDate *Date `json:"endDate,omitempty"`
558
559	// StartDate: The start date of the range (inclusive).
560	// Must be within the 30 days leading up to current date, and must be
561	// equal to
562	// or before end_date.
563	StartDate *Date `json:"startDate,omitempty"`
564
565	// ForceSendFields is a list of field names (e.g. "EndDate") to
566	// unconditionally include in API requests. By default, fields with
567	// empty values are omitted from API requests. However, any non-pointer,
568	// non-interface field appearing in ForceSendFields will be sent to the
569	// server regardless of whether the field is empty or not. This may be
570	// used to include empty fields in Patch requests.
571	ForceSendFields []string `json:"-"`
572
573	// NullFields is a list of field names (e.g. "EndDate") to include in
574	// API requests with the JSON null value. By default, fields with empty
575	// values are omitted from API requests. However, any field with an
576	// empty value appearing in NullFields will be sent to the server as
577	// null. It is an error if a field in this list has a non-empty value.
578	// This may be used to include null fields in Patch requests.
579	NullFields []string `json:"-"`
580}
581
582func (s *AbsoluteDateRange) MarshalJSON() ([]byte, error) {
583	type NoMethod AbsoluteDateRange
584	raw := NoMethod(*s)
585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
586}
587
588// AcceptProposalRequest: Request to accept a proposal.
589type AcceptProposalRequest struct {
590	// ProposalRevision: The last known client revision number of the
591	// proposal.
592	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
593
594	// ForceSendFields is a list of field names (e.g. "ProposalRevision") to
595	// unconditionally include in API requests. By default, fields with
596	// empty values are omitted from API requests. However, any non-pointer,
597	// non-interface field appearing in ForceSendFields will be sent to the
598	// server regardless of whether the field is empty or not. This may be
599	// used to include empty fields in Patch requests.
600	ForceSendFields []string `json:"-"`
601
602	// NullFields is a list of field names (e.g. "ProposalRevision") to
603	// include in API requests with the JSON null value. By default, fields
604	// with empty values are omitted from API requests. However, any field
605	// with an empty value appearing in NullFields will be sent to the
606	// server as null. It is an error if a field in this list has a
607	// non-empty value. This may be used to include null fields in Patch
608	// requests.
609	NullFields []string `json:"-"`
610}
611
612func (s *AcceptProposalRequest) MarshalJSON() ([]byte, error) {
613	type NoMethod AcceptProposalRequest
614	raw := NoMethod(*s)
615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
616}
617
618// AdSize: Represents size of a single ad slot, or a creative.
619type AdSize struct {
620	// Height: The height of the ad slot in pixels.
621	// This field will be present only when size type is `PIXEL`.
622	Height int64 `json:"height,omitempty,string"`
623
624	// SizeType: The size type of the ad slot.
625	//
626	// Possible values:
627	//   "SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined size type.
628	//   "PIXEL" - Ad slot with size specified by height and width in
629	// pixels.
630	//   "INTERSTITIAL" - Special size to describe an interstitial ad slot.
631	//   "NATIVE" - Native (mobile) ads rendered by the publisher.
632	//   "FLUID" - Fluid size (i.e., responsive size) can be resized
633	// automatically with the
634	// change of outside environment.
635	SizeType string `json:"sizeType,omitempty"`
636
637	// Width: The width of the ad slot in pixels.
638	// This field will be present only when size type is `PIXEL`.
639	Width int64 `json:"width,omitempty,string"`
640
641	// ForceSendFields is a list of field names (e.g. "Height") to
642	// unconditionally include in API requests. By default, fields with
643	// empty values are omitted from API requests. However, any non-pointer,
644	// non-interface field appearing in ForceSendFields will be sent to the
645	// server regardless of whether the field is empty or not. This may be
646	// used to include empty fields in Patch requests.
647	ForceSendFields []string `json:"-"`
648
649	// NullFields is a list of field names (e.g. "Height") to include in API
650	// requests with the JSON null value. By default, fields with empty
651	// values are omitted from API requests. However, any field with an
652	// empty value appearing in NullFields will be sent to the server as
653	// null. It is an error if a field in this list has a non-empty value.
654	// This may be used to include null fields in Patch requests.
655	NullFields []string `json:"-"`
656}
657
658func (s *AdSize) MarshalJSON() ([]byte, error) {
659	type NoMethod AdSize
660	raw := NoMethod(*s)
661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
662}
663
664// AdTechnologyProviders: Detected ad technology provider information.
665type AdTechnologyProviders struct {
666	// DetectedProviderIds: The detected ad technology provider IDs for this
667	// creative.
668	// See https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv
669	// for
670	// mapping of provider ID to provided name, a privacy policy URL, and a
671	// list
672	// of domains which can be attributed to the provider.
673	//
674	// If the creative contains provider IDs that are outside of those
675	// listed in
676	// the
677	// `BidRequest.adslot.consented_providers_settings.consented_providers`
678	// f
679	// ield on the (Google
680	// bid
681	// protocol)[https://developers.google.com/authorized-buyers/rtb/down
682	// loads/realtime-bidding-proto]
683	// and
684	// the
685	// `BidRequest.user.ext.consented_providers_settings.consented_provid
686	// ers`
687	// field on the
688	// (OpenRTB
689	// protocol)[https://developers.google.com/authorized-buyers/rtb
690	// /downloads/openrtb-adx-proto],
691	// and a bid is submitted with that creative for an impression that
692	// will
693	// serve to an EEA user, the bid will be filtered before the auction.
694	DetectedProviderIds googleapi.Int64s `json:"detectedProviderIds,omitempty"`
695
696	// HasUnidentifiedProvider: Whether the creative contains an
697	// unidentified ad technology provider.
698	//
699	// If true for a given creative, any bid submitted with that creative
700	// for an
701	// impression that will serve to an EEA user will be filtered before
702	// the
703	// auction.
704	HasUnidentifiedProvider bool `json:"hasUnidentifiedProvider,omitempty"`
705
706	// ForceSendFields is a list of field names (e.g. "DetectedProviderIds")
707	// to unconditionally include in API requests. By default, fields with
708	// empty values are omitted from API requests. However, any non-pointer,
709	// non-interface field appearing in ForceSendFields will be sent to the
710	// server regardless of whether the field is empty or not. This may be
711	// used to include empty fields in Patch requests.
712	ForceSendFields []string `json:"-"`
713
714	// NullFields is a list of field names (e.g. "DetectedProviderIds") to
715	// include in API requests with the JSON null value. By default, fields
716	// with empty values are omitted from API requests. However, any field
717	// with an empty value appearing in NullFields will be sent to the
718	// server as null. It is an error if a field in this list has a
719	// non-empty value. This may be used to include null fields in Patch
720	// requests.
721	NullFields []string `json:"-"`
722}
723
724func (s *AdTechnologyProviders) MarshalJSON() ([]byte, error) {
725	type NoMethod AdTechnologyProviders
726	raw := NoMethod(*s)
727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
728}
729
730// AddDealAssociationRequest: A request for associating a deal and a
731// creative.
732type AddDealAssociationRequest struct {
733	// Association: The association between a creative and a deal that
734	// should be added.
735	Association *CreativeDealAssociation `json:"association,omitempty"`
736
737	// ForceSendFields is a list of field names (e.g. "Association") to
738	// unconditionally include in API requests. By default, fields with
739	// empty values are omitted from API requests. However, any non-pointer,
740	// non-interface field appearing in ForceSendFields will be sent to the
741	// server regardless of whether the field is empty or not. This may be
742	// used to include empty fields in Patch requests.
743	ForceSendFields []string `json:"-"`
744
745	// NullFields is a list of field names (e.g. "Association") to include
746	// in API requests with the JSON null value. By default, fields with
747	// empty values are omitted from API requests. However, any field with
748	// an empty value appearing in NullFields will be sent to the server as
749	// null. It is an error if a field in this list has a non-empty value.
750	// This may be used to include null fields in Patch requests.
751	NullFields []string `json:"-"`
752}
753
754func (s *AddDealAssociationRequest) MarshalJSON() ([]byte, error) {
755	type NoMethod AddDealAssociationRequest
756	raw := NoMethod(*s)
757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
758}
759
760// AddNoteRequest: Request message for adding a note to a given
761// proposal.
762type AddNoteRequest struct {
763	// Note: Details of the note to add.
764	Note *Note `json:"note,omitempty"`
765
766	// ForceSendFields is a list of field names (e.g. "Note") to
767	// unconditionally include in API requests. By default, fields with
768	// empty values are omitted from API requests. However, any non-pointer,
769	// non-interface field appearing in ForceSendFields will be sent to the
770	// server regardless of whether the field is empty or not. This may be
771	// used to include empty fields in Patch requests.
772	ForceSendFields []string `json:"-"`
773
774	// NullFields is a list of field names (e.g. "Note") to include in API
775	// requests with the JSON null value. By default, fields with empty
776	// values are omitted from API requests. However, any field with an
777	// empty value appearing in NullFields will be sent to the server as
778	// null. It is an error if a field in this list has a non-empty value.
779	// This may be used to include null fields in Patch requests.
780	NullFields []string `json:"-"`
781}
782
783func (s *AddNoteRequest) MarshalJSON() ([]byte, error) {
784	type NoMethod AddNoteRequest
785	raw := NoMethod(*s)
786	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
787}
788
789// AppContext: Output only. The app type the restriction applies to for
790// mobile device.
791type AppContext struct {
792	// AppTypes: The app types this restriction applies to.
793	//
794	// Possible values:
795	//   "NATIVE" - Native app context.
796	//   "WEB" - Mobile web app context.
797	AppTypes []string `json:"appTypes,omitempty"`
798
799	// ForceSendFields is a list of field names (e.g. "AppTypes") to
800	// unconditionally include in API requests. By default, fields with
801	// empty values are omitted from API requests. However, any non-pointer,
802	// non-interface field appearing in ForceSendFields will be sent to the
803	// server regardless of whether the field is empty or not. This may be
804	// used to include empty fields in Patch requests.
805	ForceSendFields []string `json:"-"`
806
807	// NullFields is a list of field names (e.g. "AppTypes") to include in
808	// API requests with the JSON null value. By default, fields with empty
809	// values are omitted from API requests. However, any field with an
810	// empty value appearing in NullFields will be sent to the server as
811	// null. It is an error if a field in this list has a non-empty value.
812	// This may be used to include null fields in Patch requests.
813	NullFields []string `json:"-"`
814}
815
816func (s *AppContext) MarshalJSON() ([]byte, error) {
817	type NoMethod AppContext
818	raw := NoMethod(*s)
819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
820}
821
822// AuctionContext: Output only. The auction type the restriction applies
823// to.
824type AuctionContext struct {
825	// AuctionTypes: The auction types this restriction applies to.
826	//
827	// Possible values:
828	//   "OPEN_AUCTION" - The restriction applies to open auction.
829	//   "DIRECT_DEALS" - The restriction applies to direct deals.
830	AuctionTypes []string `json:"auctionTypes,omitempty"`
831
832	// ForceSendFields is a list of field names (e.g. "AuctionTypes") to
833	// unconditionally include in API requests. By default, fields with
834	// empty values are omitted from API requests. However, any non-pointer,
835	// non-interface field appearing in ForceSendFields will be sent to the
836	// server regardless of whether the field is empty or not. This may be
837	// used to include empty fields in Patch requests.
838	ForceSendFields []string `json:"-"`
839
840	// NullFields is a list of field names (e.g. "AuctionTypes") to include
841	// in API requests with the JSON null value. By default, fields with
842	// empty values are omitted from API requests. However, any field with
843	// an empty value appearing in NullFields will be sent to the server as
844	// null. It is an error if a field in this list has a non-empty value.
845	// This may be used to include null fields in Patch requests.
846	NullFields []string `json:"-"`
847}
848
849func (s *AuctionContext) MarshalJSON() ([]byte, error) {
850	type NoMethod AuctionContext
851	raw := NoMethod(*s)
852	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
853}
854
855// BidMetricsRow: The set of metrics that are measured in numbers of
856// bids, representing how
857// many bids with the specified dimension values were considered
858// eligible at
859// each stage of the bidding funnel;
860type BidMetricsRow struct {
861	// Bids: The number of bids that Ad Exchange received from the buyer.
862	Bids *MetricValue `json:"bids,omitempty"`
863
864	// BidsInAuction: The number of bids that were permitted to compete in
865	// the auction.
866	BidsInAuction *MetricValue `json:"bidsInAuction,omitempty"`
867
868	// BilledImpressions: The number of bids for which the buyer was billed.
869	BilledImpressions *MetricValue `json:"billedImpressions,omitempty"`
870
871	// ImpressionsWon: The number of bids that won the auction.
872	ImpressionsWon *MetricValue `json:"impressionsWon,omitempty"`
873
874	// MeasurableImpressions: The number of bids for which the corresponding
875	// impression was measurable
876	// for viewability (as defined by Active View).
877	MeasurableImpressions *MetricValue `json:"measurableImpressions,omitempty"`
878
879	// ReachedQueries: The number of bids that won the auction and also won
880	// the mediation
881	// waterfall (if any).
882	ReachedQueries *MetricValue `json:"reachedQueries,omitempty"`
883
884	// RowDimensions: The values of all dimensions associated with metric
885	// values in this row.
886	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
887
888	// ViewableImpressions: The number of bids for which the corresponding
889	// impression was viewable (as
890	// defined by Active View).
891	ViewableImpressions *MetricValue `json:"viewableImpressions,omitempty"`
892
893	// ForceSendFields is a list of field names (e.g. "Bids") to
894	// unconditionally include in API requests. By default, fields with
895	// empty values are omitted from API requests. However, any non-pointer,
896	// non-interface field appearing in ForceSendFields will be sent to the
897	// server regardless of whether the field is empty or not. This may be
898	// used to include empty fields in Patch requests.
899	ForceSendFields []string `json:"-"`
900
901	// NullFields is a list of field names (e.g. "Bids") to include in API
902	// requests with the JSON null value. By default, fields with empty
903	// values are omitted from API requests. However, any field with an
904	// empty value appearing in NullFields will be sent to the server as
905	// null. It is an error if a field in this list has a non-empty value.
906	// This may be used to include null fields in Patch requests.
907	NullFields []string `json:"-"`
908}
909
910func (s *BidMetricsRow) MarshalJSON() ([]byte, error) {
911	type NoMethod BidMetricsRow
912	raw := NoMethod(*s)
913	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
914}
915
916// BidResponseWithoutBidsStatusRow: The number of impressions with the
917// specified dimension values that were
918// considered to have no applicable bids, as described by the specified
919// status.
920type BidResponseWithoutBidsStatusRow struct {
921	// ImpressionCount: The number of impressions for which there was a bid
922	// response with the
923	// specified status.
924	ImpressionCount *MetricValue `json:"impressionCount,omitempty"`
925
926	// RowDimensions: The values of all dimensions associated with metric
927	// values in this row.
928	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
929
930	// Status: The status specifying why the bid responses were considered
931	// to have no
932	// applicable bids.
933	//
934	// Possible values:
935	//   "STATUS_UNSPECIFIED" - A placeholder for an undefined status.
936	// This value will never be returned in responses.
937	//   "RESPONSES_WITHOUT_BIDS" - The response had no bids.
938	//   "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT" - The response had no bids for
939	// the specified account, though it may have
940	// included bids on behalf of other accounts.
941	// Applies if:
942	// 1. Request is on behalf of a bidder and an account filter is
943	// present.
944	// 2. Request is on behalf of a child seat.
945	//   "RESPONSES_WITHOUT_BIDS_FOR_DEAL" - The response had no bids for
946	// the specified deal, though it may have
947	// included bids on other deals on behalf of the account to which the
948	// deal
949	// belongs. If request is on behalf of a bidder and an account filter is
950	// not
951	// present, this also includes responses that have bids on behalf
952	// of
953	// accounts other than the account to which the deal belongs.
954	Status string `json:"status,omitempty"`
955
956	// ForceSendFields is a list of field names (e.g. "ImpressionCount") to
957	// unconditionally include in API requests. By default, fields with
958	// empty values are omitted from API requests. However, any non-pointer,
959	// non-interface field appearing in ForceSendFields will be sent to the
960	// server regardless of whether the field is empty or not. This may be
961	// used to include empty fields in Patch requests.
962	ForceSendFields []string `json:"-"`
963
964	// NullFields is a list of field names (e.g. "ImpressionCount") to
965	// include in API requests with the JSON null value. By default, fields
966	// with empty values are omitted from API requests. However, any field
967	// with an empty value appearing in NullFields will be sent to the
968	// server as null. It is an error if a field in this list has a
969	// non-empty value. This may be used to include null fields in Patch
970	// requests.
971	NullFields []string `json:"-"`
972}
973
974func (s *BidResponseWithoutBidsStatusRow) MarshalJSON() ([]byte, error) {
975	type NoMethod BidResponseWithoutBidsStatusRow
976	raw := NoMethod(*s)
977	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
978}
979
980// Buyer: Represents a buyer of inventory. Each buyer is identified by a
981// unique
982// Authorized Buyers account ID.
983type Buyer struct {
984	// AccountId: Authorized Buyers account ID of the buyer.
985	AccountId string `json:"accountId,omitempty"`
986
987	// ForceSendFields is a list of field names (e.g. "AccountId") to
988	// unconditionally include in API requests. By default, fields with
989	// empty values are omitted from API requests. However, any non-pointer,
990	// non-interface field appearing in ForceSendFields will be sent to the
991	// server regardless of whether the field is empty or not. This may be
992	// used to include empty fields in Patch requests.
993	ForceSendFields []string `json:"-"`
994
995	// NullFields is a list of field names (e.g. "AccountId") to include in
996	// API requests with the JSON null value. By default, fields with empty
997	// values are omitted from API requests. However, any field with an
998	// empty value appearing in NullFields will be sent to the server as
999	// null. It is an error if a field in this list has a non-empty value.
1000	// This may be used to include null fields in Patch requests.
1001	NullFields []string `json:"-"`
1002}
1003
1004func (s *Buyer) MarshalJSON() ([]byte, error) {
1005	type NoMethod Buyer
1006	raw := NoMethod(*s)
1007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1008}
1009
1010// CalloutStatusRow: The number of impressions with the specified
1011// dimension values where the
1012// corresponding bid request or bid response was not successful, as
1013// described by
1014// the specified callout status.
1015type CalloutStatusRow struct {
1016	// CalloutStatusId: The ID of the callout
1017	// status.
1018	// See
1019	// [callout-status-codes](https://developers.google.com/autho
1020	// rized-buyers/rtb/downloads/callout-status-codes).
1021	CalloutStatusId int64 `json:"calloutStatusId,omitempty"`
1022
1023	// ImpressionCount: The number of impressions for which there was a bid
1024	// request or bid response
1025	// with the specified callout status.
1026	ImpressionCount *MetricValue `json:"impressionCount,omitempty"`
1027
1028	// RowDimensions: The values of all dimensions associated with metric
1029	// values in this row.
1030	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
1031
1032	// ForceSendFields is a list of field names (e.g. "CalloutStatusId") to
1033	// unconditionally include in API requests. By default, fields with
1034	// empty values are omitted from API requests. However, any non-pointer,
1035	// non-interface field appearing in ForceSendFields will be sent to the
1036	// server regardless of whether the field is empty or not. This may be
1037	// used to include empty fields in Patch requests.
1038	ForceSendFields []string `json:"-"`
1039
1040	// NullFields is a list of field names (e.g. "CalloutStatusId") to
1041	// include in API requests with the JSON null value. By default, fields
1042	// with empty values are omitted from API requests. However, any field
1043	// with an empty value appearing in NullFields will be sent to the
1044	// server as null. It is an error if a field in this list has a
1045	// non-empty value. This may be used to include null fields in Patch
1046	// requests.
1047	NullFields []string `json:"-"`
1048}
1049
1050func (s *CalloutStatusRow) MarshalJSON() ([]byte, error) {
1051	type NoMethod CalloutStatusRow
1052	raw := NoMethod(*s)
1053	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1054}
1055
1056// CancelNegotiationRequest: Request to cancel an ongoing negotiation.
1057type CancelNegotiationRequest struct {
1058}
1059
1060// Client: A client resource represents a client buyer—an agency,
1061// a brand, or an
1062// advertiser customer of the sponsor buyer. Users associated with the
1063// client
1064// buyer have restricted access to the Marketplace and certain other
1065// sections of
1066// the Authorized Buyers UI based on the role granted to the client
1067// buyer. All
1068// fields are required unless otherwise specified.
1069type Client struct {
1070	// ClientAccountId: The globally-unique numerical ID of the client.
1071	// The value of this field is ignored in create and update operations.
1072	ClientAccountId int64 `json:"clientAccountId,omitempty,string"`
1073
1074	// ClientName: Name used to represent this client to publishers.
1075	// You may have multiple clients that map to the same entity,
1076	// but for each client the combination of `clientName` and entity
1077	// must be unique.
1078	// You can specify this field as empty.
1079	ClientName string `json:"clientName,omitempty"`
1080
1081	// EntityId: Numerical identifier of the client entity.
1082	// The entity can be an advertiser, a brand, or an agency.
1083	// This identifier is unique among all the entities with the same
1084	// type.
1085	// The value of this field is ignored if the entity type is not
1086	// provided.
1087	//
1088	// A list of all known advertisers with their identifiers is available
1089	// in
1090	// the
1091	// [advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionar
1092	// ies/advertisers.txt)
1093	// file.
1094	//
1095	// A list of all known brands with their identifiers is available in
1096	// the
1097	// [brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/b
1098	// rands.txt)
1099	// file.
1100	//
1101	// A list of all known agencies with their identifiers is available in
1102	// the
1103	// [agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries
1104	// /agencies.txt)
1105	// file.
1106	EntityId int64 `json:"entityId,omitempty,string"`
1107
1108	// EntityName: The name of the entity. This field is automatically
1109	// fetched based on
1110	// the type and ID.
1111	// The value of this field is ignored in create and update operations.
1112	EntityName string `json:"entityName,omitempty"`
1113
1114	// EntityType: An optional field for specifying the type of the client
1115	// entity:
1116	// `ADVERTISER`, `BRAND`, or `AGENCY`.
1117	//
1118	// Possible values:
1119	//   "ENTITY_TYPE_UNSPECIFIED" - A placeholder for an undefined client
1120	// entity type. Should not be used.
1121	//   "ADVERTISER" - An advertiser.
1122	//   "BRAND" - A brand.
1123	//   "AGENCY" - An advertising agency.
1124	//   "ENTITY_TYPE_UNCLASSIFIED" - An explicit value for a client that
1125	// was not yet classified
1126	// as any particular entity.
1127	EntityType string `json:"entityType,omitempty"`
1128
1129	// PartnerClientId: Optional arbitrary unique identifier of this client
1130	// buyer from the
1131	// standpoint of its Ad Exchange sponsor buyer.
1132	//
1133	// This field can be used to associate a client buyer with the
1134	// identifier
1135	// in the namespace of its sponsor buyer, lookup client buyers by
1136	// that
1137	// identifier and verify whether an Ad Exchange counterpart of a given
1138	// client
1139	// buyer already exists.
1140	//
1141	// If present, must be unique among all the client buyers for its
1142	// Ad Exchange sponsor buyer.
1143	PartnerClientId string `json:"partnerClientId,omitempty"`
1144
1145	// Role: The role which is assigned to the client buyer. Each role
1146	// implies a set of
1147	// permissions granted to the client. Must be one of
1148	// `CLIENT_DEAL_VIEWER`,
1149	// `CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`.
1150	//
1151	// Possible values:
1152	//   "CLIENT_ROLE_UNSPECIFIED" - A placeholder for an undefined client
1153	// role.
1154	//   "CLIENT_DEAL_VIEWER" - Users associated with this client can see
1155	// publisher deal offers
1156	// in the Marketplace.
1157	// They can neither negotiate proposals nor approve deals.
1158	// If this client is visible to publishers, they can send deal
1159	// proposals
1160	// to this client.
1161	//   "CLIENT_DEAL_NEGOTIATOR" - Users associated with this client can
1162	// respond to deal proposals
1163	// sent to them by publishers. They can also initiate deal proposals
1164	// of their own.
1165	//   "CLIENT_DEAL_APPROVER" - Users associated with this client can
1166	// approve eligible deals
1167	// on your behalf. Some deals may still explicitly require
1168	// publisher
1169	// finalization. If this role is not selected, the sponsor buyer
1170	// will need to manually approve each of their deals.
1171	Role string `json:"role,omitempty"`
1172
1173	// Status: The status of the client buyer.
1174	//
1175	// Possible values:
1176	//   "CLIENT_STATUS_UNSPECIFIED" - A placeholder for an undefined client
1177	// status.
1178	//   "DISABLED" - A client that is currently disabled.
1179	//   "ACTIVE" - A client that is currently active.
1180	Status string `json:"status,omitempty"`
1181
1182	// VisibleToSeller: Whether the client buyer will be visible to sellers.
1183	VisibleToSeller bool `json:"visibleToSeller,omitempty"`
1184
1185	// ServerResponse contains the HTTP response code and headers from the
1186	// server.
1187	googleapi.ServerResponse `json:"-"`
1188
1189	// ForceSendFields is a list of field names (e.g. "ClientAccountId") to
1190	// unconditionally include in API requests. By default, fields with
1191	// empty values are omitted from API requests. However, any non-pointer,
1192	// non-interface field appearing in ForceSendFields will be sent to the
1193	// server regardless of whether the field is empty or not. This may be
1194	// used to include empty fields in Patch requests.
1195	ForceSendFields []string `json:"-"`
1196
1197	// NullFields is a list of field names (e.g. "ClientAccountId") to
1198	// include in API requests with the JSON null value. By default, fields
1199	// with empty values are omitted from API requests. However, any field
1200	// with an empty value appearing in NullFields will be sent to the
1201	// server as null. It is an error if a field in this list has a
1202	// non-empty value. This may be used to include null fields in Patch
1203	// requests.
1204	NullFields []string `json:"-"`
1205}
1206
1207func (s *Client) MarshalJSON() ([]byte, error) {
1208	type NoMethod Client
1209	raw := NoMethod(*s)
1210	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1211}
1212
1213// ClientUser: A client user is created under a client buyer and has
1214// restricted access to
1215// the Marketplace and certain other sections of the Authorized Buyers
1216// UI based
1217// on the role granted to the associated client buyer.
1218//
1219// The only way a new client user can be created is via accepting
1220// an
1221// email invitation
1222// (see the
1223// accounts.clients.invitations.create
1224// method).
1225//
1226// All fields are required unless otherwise specified.
1227type ClientUser struct {
1228	// ClientAccountId: Numerical account ID of the client buyer
1229	// with which the user is associated; the
1230	// buyer must be a client of the current sponsor buyer.
1231	// The value of this field is ignored in an update operation.
1232	ClientAccountId int64 `json:"clientAccountId,omitempty,string"`
1233
1234	// Email: User's email address. The value of this field
1235	// is ignored in an update operation.
1236	Email string `json:"email,omitempty"`
1237
1238	// Status: The status of the client user.
1239	//
1240	// Possible values:
1241	//   "USER_STATUS_UNSPECIFIED" - A placeholder for an undefined user
1242	// status.
1243	//   "PENDING" - A user who was already created but hasn't accepted the
1244	// invitation yet.
1245	//   "ACTIVE" - A user that is currently active.
1246	//   "DISABLED" - A user that is currently disabled.
1247	Status string `json:"status,omitempty"`
1248
1249	// UserId: The unique numerical ID of the client user
1250	// that has accepted an invitation.
1251	// The value of this field is ignored in an update operation.
1252	UserId int64 `json:"userId,omitempty,string"`
1253
1254	// ServerResponse contains the HTTP response code and headers from the
1255	// server.
1256	googleapi.ServerResponse `json:"-"`
1257
1258	// ForceSendFields is a list of field names (e.g. "ClientAccountId") to
1259	// unconditionally include in API requests. By default, fields with
1260	// empty values are omitted from API requests. However, any non-pointer,
1261	// non-interface field appearing in ForceSendFields will be sent to the
1262	// server regardless of whether the field is empty or not. This may be
1263	// used to include empty fields in Patch requests.
1264	ForceSendFields []string `json:"-"`
1265
1266	// NullFields is a list of field names (e.g. "ClientAccountId") to
1267	// include in API requests with the JSON null value. By default, fields
1268	// with empty values are omitted from API requests. However, any field
1269	// with an empty value appearing in NullFields will be sent to the
1270	// server as null. It is an error if a field in this list has a
1271	// non-empty value. This may be used to include null fields in Patch
1272	// requests.
1273	NullFields []string `json:"-"`
1274}
1275
1276func (s *ClientUser) MarshalJSON() ([]byte, error) {
1277	type NoMethod ClientUser
1278	raw := NoMethod(*s)
1279	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1280}
1281
1282// ClientUserInvitation: An invitation for a new client user to get
1283// access to the Authorized Buyers
1284// UI. All fields are required unless otherwise specified.
1285type ClientUserInvitation struct {
1286	// ClientAccountId: Numerical account ID of the client buyer
1287	// that the invited user is associated with.
1288	// The value of this field is ignored in create operations.
1289	ClientAccountId int64 `json:"clientAccountId,omitempty,string"`
1290
1291	// Email: The email address to which the invitation is sent.
1292	// Email
1293	// addresses should be unique among all client users under each
1294	// sponsor
1295	// buyer.
1296	Email string `json:"email,omitempty"`
1297
1298	// InvitationId: The unique numerical ID of the invitation that is sent
1299	// to the user.
1300	// The value of this field is ignored in create operations.
1301	InvitationId int64 `json:"invitationId,omitempty,string"`
1302
1303	// ServerResponse contains the HTTP response code and headers from the
1304	// server.
1305	googleapi.ServerResponse `json:"-"`
1306
1307	// ForceSendFields is a list of field names (e.g. "ClientAccountId") to
1308	// unconditionally include in API requests. By default, fields with
1309	// empty values are omitted from API requests. However, any non-pointer,
1310	// non-interface field appearing in ForceSendFields will be sent to the
1311	// server regardless of whether the field is empty or not. This may be
1312	// used to include empty fields in Patch requests.
1313	ForceSendFields []string `json:"-"`
1314
1315	// NullFields is a list of field names (e.g. "ClientAccountId") to
1316	// include in API requests with the JSON null value. By default, fields
1317	// with empty values are omitted from API requests. However, any field
1318	// with an empty value appearing in NullFields will be sent to the
1319	// server as null. It is an error if a field in this list has a
1320	// non-empty value. This may be used to include null fields in Patch
1321	// requests.
1322	NullFields []string `json:"-"`
1323}
1324
1325func (s *ClientUserInvitation) MarshalJSON() ([]byte, error) {
1326	type NoMethod ClientUserInvitation
1327	raw := NoMethod(*s)
1328	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1329}
1330
1331// CompleteSetupRequest: Request message for indicating that the
1332// proposal's setup step is complete.
1333type CompleteSetupRequest struct {
1334}
1335
1336// ContactInformation: Contains information on how a buyer or seller can
1337// be reached.
1338type ContactInformation struct {
1339	// Email: Email address for the contact.
1340	Email string `json:"email,omitempty"`
1341
1342	// Name: The name of the contact.
1343	Name string `json:"name,omitempty"`
1344
1345	// ForceSendFields is a list of field names (e.g. "Email") to
1346	// unconditionally include in API requests. By default, fields with
1347	// empty values are omitted from API requests. However, any non-pointer,
1348	// non-interface field appearing in ForceSendFields will be sent to the
1349	// server regardless of whether the field is empty or not. This may be
1350	// used to include empty fields in Patch requests.
1351	ForceSendFields []string `json:"-"`
1352
1353	// NullFields is a list of field names (e.g. "Email") to include in API
1354	// requests with the JSON null value. By default, fields with empty
1355	// values are omitted from API requests. However, any field with an
1356	// empty value appearing in NullFields will be sent to the server as
1357	// null. It is an error if a field in this list has a non-empty value.
1358	// This may be used to include null fields in Patch requests.
1359	NullFields []string `json:"-"`
1360}
1361
1362func (s *ContactInformation) MarshalJSON() ([]byte, error) {
1363	type NoMethod ContactInformation
1364	raw := NoMethod(*s)
1365	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1366}
1367
1368// Correction: Output only. Shows any corrections that were applied to
1369// this creative.
1370type Correction struct {
1371	// Contexts: The contexts for the correction.
1372	Contexts []*ServingContext `json:"contexts,omitempty"`
1373
1374	// Details: Additional details about what was corrected.
1375	Details []string `json:"details,omitempty"`
1376
1377	// Type: The type of correction that was applied to the creative.
1378	//
1379	// Possible values:
1380	//   "CORRECTION_TYPE_UNSPECIFIED" - The correction type is unknown.
1381	// Refer to the details for more information.
1382	//   "VENDOR_IDS_ADDED" - The ad's declared vendors did not match the
1383	// vendors that were detected.
1384	// The detected vendors were added.
1385	//   "SSL_ATTRIBUTE_REMOVED" - The ad had the SSL attribute declared but
1386	// was not SSL-compliant.
1387	// The SSL attribute was removed.
1388	//   "FLASH_FREE_ATTRIBUTE_REMOVED" - The ad was declared as Flash-free
1389	// but contained Flash, so the Flash-free
1390	// attribute was removed.
1391	//   "FLASH_FREE_ATTRIBUTE_ADDED" - The ad was not declared as
1392	// Flash-free but it did not reference any flash
1393	// content, so the Flash-free attribute was added.
1394	//   "REQUIRED_ATTRIBUTE_ADDED" - The ad did not declare a required
1395	// creative attribute.
1396	// The attribute was added.
1397	//   "REQUIRED_VENDOR_ADDED" - The ad did not declare a required
1398	// technology vendor.
1399	// The technology vendor was added.
1400	//   "SSL_ATTRIBUTE_ADDED" - The ad did not declare the SSL attribute
1401	// but was SSL-compliant, so the
1402	// SSL attribute was added.
1403	//   "IN_BANNER_VIDEO_ATTRIBUTE_ADDED" - Properties consistent with
1404	// In-banner video were found, so an
1405	// In-Banner Video attribute was added.
1406	//   "MRAID_ATTRIBUTE_ADDED" - The ad makes calls to the MRAID API so
1407	// the MRAID attribute was added.
1408	//   "FLASH_ATTRIBUTE_REMOVED" - The ad unnecessarily declared the Flash
1409	// attribute, so the Flash attribute
1410	// was removed.
1411	//   "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" - The ad contains video content.
1412	Type string `json:"type,omitempty"`
1413
1414	// ForceSendFields is a list of field names (e.g. "Contexts") to
1415	// unconditionally include in API requests. By default, fields with
1416	// empty values are omitted from API requests. However, any non-pointer,
1417	// non-interface field appearing in ForceSendFields will be sent to the
1418	// server regardless of whether the field is empty or not. This may be
1419	// used to include empty fields in Patch requests.
1420	ForceSendFields []string `json:"-"`
1421
1422	// NullFields is a list of field names (e.g. "Contexts") to include in
1423	// API requests with the JSON null value. By default, fields with empty
1424	// values are omitted from API requests. However, any field with an
1425	// empty value appearing in NullFields will be sent to the server as
1426	// null. It is an error if a field in this list has a non-empty value.
1427	// This may be used to include null fields in Patch requests.
1428	NullFields []string `json:"-"`
1429}
1430
1431func (s *Correction) MarshalJSON() ([]byte, error) {
1432	type NoMethod Correction
1433	raw := NoMethod(*s)
1434	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1435}
1436
1437// Creative: A creative and its classification data.
1438type Creative struct {
1439	// AccountId: The account that this creative belongs to.
1440	// Can be used to filter the response of the
1441	// creatives.list
1442	// method.
1443	AccountId string `json:"accountId,omitempty"`
1444
1445	// AdChoicesDestinationUrl: The link to AdChoices destination page.
1446	AdChoicesDestinationUrl string `json:"adChoicesDestinationUrl,omitempty"`
1447
1448	// AdTechnologyProviders: Output only. The detected ad technology
1449	// providers.
1450	AdTechnologyProviders *AdTechnologyProviders `json:"adTechnologyProviders,omitempty"`
1451
1452	// AdvertiserName: The name of the company being advertised in the
1453	// creative.
1454	AdvertiserName string `json:"advertiserName,omitempty"`
1455
1456	// AgencyId: The agency ID for this creative.
1457	AgencyId int64 `json:"agencyId,omitempty,string"`
1458
1459	// ApiUpdateTime: Output only. The last update timestamp of the creative
1460	// via API.
1461	ApiUpdateTime string `json:"apiUpdateTime,omitempty"`
1462
1463	// Attributes: All attributes for the ads that may be shown from this
1464	// creative.
1465	// Can be used to filter the response of the
1466	// creatives.list
1467	// method.
1468	//
1469	// Possible values:
1470	//   "ATTRIBUTE_UNSPECIFIED" - Do not use. This is a placeholder value
1471	// only.
1472	//   "IMAGE_RICH_MEDIA" - The creative is of type image/rich media. For
1473	// pretargeting.
1474	//   "ADOBE_FLASH_FLV" - The creative is of video type Adobe Flash FLV.
1475	// For pretargeting.
1476	//   "IS_TAGGED" - The creative is tagged.
1477	//   "IS_COOKIE_TARGETED" - The creative is cookie targeted.
1478	//   "IS_USER_INTEREST_TARGETED" - The creative is user interest
1479	// targeted.
1480	//   "EXPANDING_DIRECTION_NONE" - The creative does not expand.
1481	//   "EXPANDING_DIRECTION_UP" - The creative expands up.
1482	//   "EXPANDING_DIRECTION_DOWN" - The creative expands down.
1483	//   "EXPANDING_DIRECTION_LEFT" - The creative expands left.
1484	//   "EXPANDING_DIRECTION_RIGHT" - The creative expands right.
1485	//   "EXPANDING_DIRECTION_UP_LEFT" - The creative expands up and left.
1486	//   "EXPANDING_DIRECTION_UP_RIGHT" - The creative expands up and right.
1487	//   "EXPANDING_DIRECTION_DOWN_LEFT" - The creative expands down and
1488	// left.
1489	//   "EXPANDING_DIRECTION_DOWN_RIGHT" - The creative expands down and
1490	// right.
1491	//   "CREATIVE_TYPE_HTML" - The creative type is HTML.
1492	//   "CREATIVE_TYPE_VAST_VIDEO" - The creative type is VAST video.
1493	//   "EXPANDING_DIRECTION_UP_OR_DOWN" - The creative expands up or down.
1494	//   "EXPANDING_DIRECTION_LEFT_OR_RIGHT" - The creative expands left or
1495	// right.
1496	//   "EXPANDING_DIRECTION_ANY_DIAGONAL" - The creative expands on any
1497	// diagonal.
1498	//   "EXPANDING_ACTION_ROLLOVER_TO_EXPAND" - The creative expands when
1499	// rolled over.
1500	//   "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH" - The instream vast video
1501	// type is vpaid flash.
1502	//   "RICH_MEDIA_CAPABILITY_TYPE_MRAID" - The creative is MRAID.
1503	//   "RICH_MEDIA_CAPABILITY_TYPE_FLASH" - The creative is Flash.
1504	//   "RICH_MEDIA_CAPABILITY_TYPE_HTML5" - The creative is HTML5.
1505	//   "SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST
1506	// video type of skippable instream video.
1507	// For pretargeting.
1508	//   "RICH_MEDIA_CAPABILITY_TYPE_SSL" - The creative is SSL.
1509	//   "RICH_MEDIA_CAPABILITY_TYPE_NON_SSL" - The creative is non-SSL.
1510	//   "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL" - The creative is an
1511	// interstitial.
1512	//   "NON_SKIPPABLE_INSTREAM_VIDEO" - The creative has an instream VAST
1513	// video type of non-skippable instream
1514	// video. For pretargeting.
1515	//   "NATIVE_ELIGIBILITY_ELIGIBLE" - The creative is eligible for
1516	// native.
1517	//   "NON_VPAID" - The creative has an instream VAST video type of
1518	// non-VPAID. For
1519	// pretargeting.
1520	//   "NATIVE_ELIGIBILITY_NOT_ELIGIBLE" - The creative is not eligible
1521	// for native.
1522	//   "ANY_INTERSTITIAL" - The creative has an interstitial size of any
1523	// interstitial. For
1524	// pretargeting.
1525	//   "NON_INTERSTITIAL" - The creative has an interstitial size of non
1526	// interstitial. For
1527	// pretargeting.
1528	//   "IN_BANNER_VIDEO" - The video type is in-banner video.
1529	//   "RENDERING_SIZELESS_ADX" - The creative can dynamically resize to
1530	// fill a variety of slot sizes.
1531	//   "OMSDK_1_0" - The open measurement SDK is supported.
1532	Attributes []string `json:"attributes,omitempty"`
1533
1534	// ClickThroughUrls: The set of destination URLs for the creative.
1535	ClickThroughUrls []string `json:"clickThroughUrls,omitempty"`
1536
1537	// Corrections: Output only. Shows any corrections that were applied to
1538	// this creative.
1539	Corrections []*Correction `json:"corrections,omitempty"`
1540
1541	// CreativeId: The buyer-defined creative ID of this creative.
1542	// Can be used to filter the response of the
1543	// creatives.list
1544	// method.
1545	CreativeId string `json:"creativeId,omitempty"`
1546
1547	// DealsStatus: Output only. The top-level deals status of this
1548	// creative.
1549	// If disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL')
1550	// in
1551	// serving_restrictions will also exist. Note
1552	// that this may be nuanced with other contextual restrictions, in which
1553	// case,
1554	// it may be preferable to read from serving_restrictions directly.
1555	// Can be used to filter the response of the
1556	// creatives.list
1557	// method.
1558	//
1559	// Possible values:
1560	//   "STATUS_UNSPECIFIED" - The status is unknown.
1561	//   "NOT_CHECKED" - The creative has not been checked.
1562	//   "CONDITIONALLY_APPROVED" - The creative has been conditionally
1563	// approved.
1564	// See serving_restrictions for details.
1565	//   "APPROVED" - The creative has been approved.
1566	//   "DISAPPROVED" - The creative has been disapproved.
1567	//   "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently
1568	// not used.
1569	//   "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1.
1570	// Currently not used.
1571	DealsStatus string `json:"dealsStatus,omitempty"`
1572
1573	// DeclaredClickThroughUrls: The set of declared destination URLs for
1574	// the creative.
1575	DeclaredClickThroughUrls []string `json:"declaredClickThroughUrls,omitempty"`
1576
1577	// DetectedAdvertiserIds: Output only. Detected advertiser IDs, if any.
1578	DetectedAdvertiserIds googleapi.Int64s `json:"detectedAdvertiserIds,omitempty"`
1579
1580	// DetectedDomains: Output only. The detected domains for this creative.
1581	DetectedDomains []string `json:"detectedDomains,omitempty"`
1582
1583	// DetectedLanguages: Output only. The detected languages for this
1584	// creative. The order is
1585	// arbitrary. The codes are 2 or 5 characters and are documented
1586	// at
1587	// https://developers.google.com/adwords/api/docs/appendix/languagecod
1588	// es.
1589	DetectedLanguages []string `json:"detectedLanguages,omitempty"`
1590
1591	// DetectedProductCategories: Output only. Detected product categories,
1592	// if any.
1593	// See the ad-product-categories.txt file in the technical
1594	// documentation
1595	// for a list of IDs.
1596	DetectedProductCategories []int64 `json:"detectedProductCategories,omitempty"`
1597
1598	// DetectedSensitiveCategories: Output only. Detected sensitive
1599	// categories, if any.
1600	// See the ad-sensitive-categories.txt file in the technical
1601	// documentation for
1602	// a list of IDs. You should use these IDs along with
1603	// the
1604	// excluded-sensitive-category field in the bid request to filter your
1605	// bids.
1606	DetectedSensitiveCategories []int64 `json:"detectedSensitiveCategories,omitempty"`
1607
1608	// Html: An HTML creative.
1609	Html *HtmlContent `json:"html,omitempty"`
1610
1611	// ImpressionTrackingUrls: The set of URLs to be called to record an
1612	// impression.
1613	ImpressionTrackingUrls []string `json:"impressionTrackingUrls,omitempty"`
1614
1615	// Native: A native creative.
1616	Native *NativeContent `json:"native,omitempty"`
1617
1618	// OpenAuctionStatus: Output only. The top-level open auction status of
1619	// this creative.
1620	// If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL')
1621	// in
1622	// serving_restrictions will also exist. Note
1623	// that this may be nuanced with other contextual restrictions, in which
1624	// case,
1625	// it may be preferable to read from serving_restrictions directly.
1626	// Can be used to filter the response of the
1627	// creatives.list
1628	// method.
1629	//
1630	// Possible values:
1631	//   "STATUS_UNSPECIFIED" - The status is unknown.
1632	//   "NOT_CHECKED" - The creative has not been checked.
1633	//   "CONDITIONALLY_APPROVED" - The creative has been conditionally
1634	// approved.
1635	// See serving_restrictions for details.
1636	//   "APPROVED" - The creative has been approved.
1637	//   "DISAPPROVED" - The creative has been disapproved.
1638	//   "PENDING_REVIEW" - Placeholder for transition to v1beta1. Currently
1639	// not used.
1640	//   "STATUS_TYPE_UNSPECIFIED" - Placeholder for transition to v1beta1.
1641	// Currently not used.
1642	OpenAuctionStatus string `json:"openAuctionStatus,omitempty"`
1643
1644	// RestrictedCategories: All restricted categories for the ads that may
1645	// be shown from this creative.
1646	//
1647	// Possible values:
1648	//   "NO_RESTRICTED_CATEGORIES" - The ad has no restricted categories
1649	//   "ALCOHOL" - The alcohol restricted category.
1650	RestrictedCategories []string `json:"restrictedCategories,omitempty"`
1651
1652	// ServingRestrictions: Output only. The granular status of this ad in
1653	// specific contexts.
1654	// A context here relates to where something ultimately serves (for
1655	// example,
1656	// a physical location, a platform, an HTTPS vs HTTP request, or the
1657	// type
1658	// of auction).
1659	ServingRestrictions []*ServingRestriction `json:"servingRestrictions,omitempty"`
1660
1661	// VendorIds: All vendor IDs for the ads that may be shown from this
1662	// creative.
1663	// See
1664	// https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt
1665	// for possible values.
1666	VendorIds []int64 `json:"vendorIds,omitempty"`
1667
1668	// Version: Output only. The version of this creative.
1669	Version int64 `json:"version,omitempty"`
1670
1671	// Video: A video creative.
1672	Video *VideoContent `json:"video,omitempty"`
1673
1674	// ServerResponse contains the HTTP response code and headers from the
1675	// server.
1676	googleapi.ServerResponse `json:"-"`
1677
1678	// ForceSendFields is a list of field names (e.g. "AccountId") to
1679	// unconditionally include in API requests. By default, fields with
1680	// empty values are omitted from API requests. However, any non-pointer,
1681	// non-interface field appearing in ForceSendFields will be sent to the
1682	// server regardless of whether the field is empty or not. This may be
1683	// used to include empty fields in Patch requests.
1684	ForceSendFields []string `json:"-"`
1685
1686	// NullFields is a list of field names (e.g. "AccountId") to include in
1687	// API requests with the JSON null value. By default, fields with empty
1688	// values are omitted from API requests. However, any field with an
1689	// empty value appearing in NullFields will be sent to the server as
1690	// null. It is an error if a field in this list has a non-empty value.
1691	// This may be used to include null fields in Patch requests.
1692	NullFields []string `json:"-"`
1693}
1694
1695func (s *Creative) MarshalJSON() ([]byte, error) {
1696	type NoMethod Creative
1697	raw := NoMethod(*s)
1698	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1699}
1700
1701// CreativeDealAssociation: The association between a creative and a
1702// deal.
1703type CreativeDealAssociation struct {
1704	// AccountId: The account the creative belongs to.
1705	AccountId string `json:"accountId,omitempty"`
1706
1707	// CreativeId: The ID of the creative associated with the deal.
1708	CreativeId string `json:"creativeId,omitempty"`
1709
1710	// DealsId: The externalDealId for the deal associated with the
1711	// creative.
1712	DealsId string `json:"dealsId,omitempty"`
1713
1714	// ForceSendFields is a list of field names (e.g. "AccountId") to
1715	// unconditionally include in API requests. By default, fields with
1716	// empty values are omitted from API requests. However, any non-pointer,
1717	// non-interface field appearing in ForceSendFields will be sent to the
1718	// server regardless of whether the field is empty or not. This may be
1719	// used to include empty fields in Patch requests.
1720	ForceSendFields []string `json:"-"`
1721
1722	// NullFields is a list of field names (e.g. "AccountId") to include in
1723	// API requests with the JSON null value. By default, fields with empty
1724	// values are omitted from API requests. However, any field with an
1725	// empty value appearing in NullFields will be sent to the server as
1726	// null. It is an error if a field in this list has a non-empty value.
1727	// This may be used to include null fields in Patch requests.
1728	NullFields []string `json:"-"`
1729}
1730
1731func (s *CreativeDealAssociation) MarshalJSON() ([]byte, error) {
1732	type NoMethod CreativeDealAssociation
1733	raw := NoMethod(*s)
1734	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1735}
1736
1737// CreativeRestrictions: Represents creative restrictions associated to
1738// Programmatic Guaranteed/
1739// Preferred Deal in Ad Manager.
1740// This doesn't apply to Private Auction and AdX Preferred Deals.
1741type CreativeRestrictions struct {
1742	// CreativeFormat: The format of the environment that the creatives will
1743	// be displayed in.
1744	//
1745	// Possible values:
1746	//   "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an undefined
1747	// creative format.
1748	//   "DISPLAY" - A creative that will be displayed in environments such
1749	// as a browser.
1750	//   "VIDEO" - A video creative that will be displayed in environments
1751	// such as a video
1752	// player.
1753	CreativeFormat string `json:"creativeFormat,omitempty"`
1754
1755	CreativeSpecifications []*CreativeSpecification `json:"creativeSpecifications,omitempty"`
1756
1757	// SkippableAdType: Skippable video ads allow viewers to skip ads after
1758	// 5 seconds.
1759	//
1760	// Possible values:
1761	//   "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined
1762	// skippable ad type.
1763	//   "SKIPPABLE" - This video ad can be skipped after 5 seconds.
1764	//   "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds,
1765	// and is counted as
1766	// engaged view after 30 seconds. The creative is hosted on
1767	// YouTube only, and viewcount of the YouTube video increments
1768	// after the engaged view.
1769	//   "NOT_SKIPPABLE" - This video ad is not skippable.
1770	SkippableAdType string `json:"skippableAdType,omitempty"`
1771
1772	// ForceSendFields is a list of field names (e.g. "CreativeFormat") to
1773	// unconditionally include in API requests. By default, fields with
1774	// empty values are omitted from API requests. However, any non-pointer,
1775	// non-interface field appearing in ForceSendFields will be sent to the
1776	// server regardless of whether the field is empty or not. This may be
1777	// used to include empty fields in Patch requests.
1778	ForceSendFields []string `json:"-"`
1779
1780	// NullFields is a list of field names (e.g. "CreativeFormat") to
1781	// include in API requests with the JSON null value. By default, fields
1782	// with empty values are omitted from API requests. However, any field
1783	// with an empty value appearing in NullFields will be sent to the
1784	// server as null. It is an error if a field in this list has a
1785	// non-empty value. This may be used to include null fields in Patch
1786	// requests.
1787	NullFields []string `json:"-"`
1788}
1789
1790func (s *CreativeRestrictions) MarshalJSON() ([]byte, error) {
1791	type NoMethod CreativeRestrictions
1792	raw := NoMethod(*s)
1793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1794}
1795
1796// CreativeSize: Specifies the size of the creative.
1797type CreativeSize struct {
1798	// AllowedFormats: What formats are allowed by the publisher.
1799	// If this repeated field is empty then all formats are allowed.
1800	// For example, if this field contains AllowedFormatType.AUDIO then
1801	// the
1802	// publisher only allows an audio ad (without any video).
1803	//
1804	// Possible values:
1805	//   "UNKNOWN" - A placeholder for an undefined allowed format.
1806	//   "AUDIO" - An audio-only ad (without any video).
1807	AllowedFormats []string `json:"allowedFormats,omitempty"`
1808
1809	// CompanionSizes: For video creatives specifies the sizes of companion
1810	// ads (if present).
1811	// Companion sizes may be filled in only when creative_size_type = VIDEO
1812	CompanionSizes []*Size `json:"companionSizes,omitempty"`
1813
1814	// CreativeSizeType: The creative size type.
1815	//
1816	// Possible values:
1817	//   "CREATIVE_SIZE_TYPE_UNSPECIFIED" - A placeholder for an undefined
1818	// creative size type.
1819	//   "REGULAR" - The creative is a regular desktop creative.
1820	//   "INTERSTITIAL" - The creative is an interstitial creative.
1821	//   "VIDEO" - The creative is a video creative.
1822	//   "NATIVE" - The creative is a native (mobile) creative.
1823	CreativeSizeType string `json:"creativeSizeType,omitempty"`
1824
1825	// NativeTemplate: Output only. The native template for this creative.
1826	// It will have a value
1827	// only if creative_size_type = CreativeSizeType.NATIVE.
1828	//
1829	// Possible values:
1830	//   "UNKNOWN_NATIVE_TEMPLATE" - A placeholder for an undefined native
1831	// template.
1832	//   "NATIVE_CONTENT_AD" - The creative is linked to native content ad.
1833	//   "NATIVE_APP_INSTALL_AD" - The creative is linked to native app
1834	// install ad.
1835	//   "NATIVE_VIDEO_CONTENT_AD" - The creative is linked to native video
1836	// content ad.
1837	//   "NATIVE_VIDEO_APP_INSTALL_AD" - The creative is linked to native
1838	// video app install ad.
1839	NativeTemplate string `json:"nativeTemplate,omitempty"`
1840
1841	// Size: For regular or video creative size type, specifies the size
1842	// of the creative
1843	Size *Size `json:"size,omitempty"`
1844
1845	// SkippableAdType: The type of skippable ad for this creative. It will
1846	// have a value only if
1847	// creative_size_type = CreativeSizeType.VIDEO.
1848	//
1849	// Possible values:
1850	//   "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an undefined
1851	// skippable ad type.
1852	//   "GENERIC" - This video ad can be skipped after 5 seconds.
1853	//   "INSTREAM_SELECT" - This video ad can be skipped after 5 seconds,
1854	// and count as
1855	// engaged view after 30 seconds. The creative is hosted on
1856	// YouTube only, and viewcount of the YouTube video increments
1857	// after the engaged view.
1858	//   "NOT_SKIPPABLE" - This video ad is not skippable.
1859	SkippableAdType string `json:"skippableAdType,omitempty"`
1860
1861	// ForceSendFields is a list of field names (e.g. "AllowedFormats") to
1862	// unconditionally include in API requests. By default, fields with
1863	// empty values are omitted from API requests. However, any non-pointer,
1864	// non-interface field appearing in ForceSendFields will be sent to the
1865	// server regardless of whether the field is empty or not. This may be
1866	// used to include empty fields in Patch requests.
1867	ForceSendFields []string `json:"-"`
1868
1869	// NullFields is a list of field names (e.g. "AllowedFormats") to
1870	// include in API requests with the JSON null value. By default, fields
1871	// with empty values are omitted from API requests. However, any field
1872	// with an empty value appearing in NullFields will be sent to the
1873	// server as null. It is an error if a field in this list has a
1874	// non-empty value. This may be used to include null fields in Patch
1875	// requests.
1876	NullFields []string `json:"-"`
1877}
1878
1879func (s *CreativeSize) MarshalJSON() ([]byte, error) {
1880	type NoMethod CreativeSize
1881	raw := NoMethod(*s)
1882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1883}
1884
1885// CreativeSpecification: Represents information for a creative that is
1886// associated with a Programmatic
1887// Guaranteed/Preferred Deal in Ad Manager.
1888type CreativeSpecification struct {
1889	// CreativeCompanionSizes: Companion sizes may be filled in only when
1890	// this is a video creative.
1891	CreativeCompanionSizes []*AdSize `json:"creativeCompanionSizes,omitempty"`
1892
1893	// CreativeSize: The size of the creative.
1894	CreativeSize *AdSize `json:"creativeSize,omitempty"`
1895
1896	// ForceSendFields is a list of field names (e.g.
1897	// "CreativeCompanionSizes") to unconditionally include in API requests.
1898	// By default, fields with empty values are omitted from API requests.
1899	// However, any non-pointer, non-interface field appearing in
1900	// ForceSendFields will be sent to the server regardless of whether the
1901	// field is empty or not. This may be used to include empty fields in
1902	// Patch requests.
1903	ForceSendFields []string `json:"-"`
1904
1905	// NullFields is a list of field names (e.g. "CreativeCompanionSizes")
1906	// to include in API requests with the JSON null value. By default,
1907	// fields with empty values are omitted from API requests. However, any
1908	// field with an empty value appearing in NullFields will be sent to the
1909	// server as null. It is an error if a field in this list has a
1910	// non-empty value. This may be used to include null fields in Patch
1911	// requests.
1912	NullFields []string `json:"-"`
1913}
1914
1915func (s *CreativeSpecification) MarshalJSON() ([]byte, error) {
1916	type NoMethod CreativeSpecification
1917	raw := NoMethod(*s)
1918	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1919}
1920
1921// CreativeStatusRow: The number of bids with the specified dimension
1922// values that did not win the
1923// auction (either were filtered pre-auction or lost the auction), as
1924// described
1925// by the specified creative status.
1926type CreativeStatusRow struct {
1927	// BidCount: The number of bids with the specified status.
1928	BidCount *MetricValue `json:"bidCount,omitempty"`
1929
1930	// CreativeStatusId: The ID of the creative
1931	// status.
1932	// See
1933	// [creative-status-codes](https://developers.google.com/auth
1934	// orized-buyers/rtb/downloads/creative-status-codes).
1935	CreativeStatusId int64 `json:"creativeStatusId,omitempty"`
1936
1937	// RowDimensions: The values of all dimensions associated with metric
1938	// values in this row.
1939	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
1940
1941	// ForceSendFields is a list of field names (e.g. "BidCount") to
1942	// unconditionally include in API requests. By default, fields with
1943	// empty values are omitted from API requests. However, any non-pointer,
1944	// non-interface field appearing in ForceSendFields will be sent to the
1945	// server regardless of whether the field is empty or not. This may be
1946	// used to include empty fields in Patch requests.
1947	ForceSendFields []string `json:"-"`
1948
1949	// NullFields is a list of field names (e.g. "BidCount") 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 *CreativeStatusRow) MarshalJSON() ([]byte, error) {
1959	type NoMethod CreativeStatusRow
1960	raw := NoMethod(*s)
1961	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1962}
1963
1964// CriteriaTargeting: Generic targeting used for targeting dimensions
1965// that contains a list of
1966// included and excluded numeric IDs.
1967type CriteriaTargeting struct {
1968	// ExcludedCriteriaIds: A list of numeric IDs to be excluded.
1969	ExcludedCriteriaIds googleapi.Int64s `json:"excludedCriteriaIds,omitempty"`
1970
1971	// TargetedCriteriaIds: A list of numeric IDs to be included.
1972	TargetedCriteriaIds googleapi.Int64s `json:"targetedCriteriaIds,omitempty"`
1973
1974	// ForceSendFields is a list of field names (e.g. "ExcludedCriteriaIds")
1975	// to unconditionally include in API requests. By default, fields with
1976	// empty values are omitted from API requests. However, any non-pointer,
1977	// non-interface field appearing in ForceSendFields will be sent to the
1978	// server regardless of whether the field is empty or not. This may be
1979	// used to include empty fields in Patch requests.
1980	ForceSendFields []string `json:"-"`
1981
1982	// NullFields is a list of field names (e.g. "ExcludedCriteriaIds") to
1983	// include in API requests with the JSON null value. By default, fields
1984	// with empty values are omitted from API requests. However, any field
1985	// with an empty value appearing in NullFields will be sent to the
1986	// server as null. It is an error if a field in this list has a
1987	// non-empty value. This may be used to include null fields in Patch
1988	// requests.
1989	NullFields []string `json:"-"`
1990}
1991
1992func (s *CriteriaTargeting) MarshalJSON() ([]byte, error) {
1993	type NoMethod CriteriaTargeting
1994	raw := NoMethod(*s)
1995	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1996}
1997
1998// Date: Represents a whole or partial calendar date, e.g. a birthday.
1999// The time of day
2000// and time zone are either specified elsewhere or are not significant.
2001// The date
2002// is relative to the Proleptic Gregorian Calendar. This can
2003// represent:
2004//
2005// * A full date, with non-zero year, month and day values
2006// * A month and day value, with a zero year, e.g. an anniversary
2007// * A year on its own, with zero month and day values
2008// * A year and month value, with a zero day, e.g. a credit card
2009// expiration date
2010//
2011// Related types are google.type.TimeOfDay and
2012// `google.protobuf.Timestamp`.
2013type Date struct {
2014	// Day: Day of month. Must be from 1 to 31 and valid for the year and
2015	// month, or 0
2016	// if specifying a year by itself or a year and month where the day is
2017	// not
2018	// significant.
2019	Day int64 `json:"day,omitempty"`
2020
2021	// Month: Month of year. Must be from 1 to 12, or 0 if specifying a year
2022	// without a
2023	// month and day.
2024	Month int64 `json:"month,omitempty"`
2025
2026	// Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
2027	// without
2028	// a year.
2029	Year int64 `json:"year,omitempty"`
2030
2031	// ForceSendFields is a list of field names (e.g. "Day") to
2032	// unconditionally include in API requests. By default, fields with
2033	// empty values are omitted from API requests. However, any non-pointer,
2034	// non-interface field appearing in ForceSendFields will be sent to the
2035	// server regardless of whether the field is empty or not. This may be
2036	// used to include empty fields in Patch requests.
2037	ForceSendFields []string `json:"-"`
2038
2039	// NullFields is a list of field names (e.g. "Day") to include in API
2040	// requests with the JSON null value. By default, fields with empty
2041	// values are omitted from API requests. However, any field with an
2042	// empty value appearing in NullFields will be sent to the server as
2043	// null. It is an error if a field in this list has a non-empty value.
2044	// This may be used to include null fields in Patch requests.
2045	NullFields []string `json:"-"`
2046}
2047
2048func (s *Date) MarshalJSON() ([]byte, error) {
2049	type NoMethod Date
2050	raw := NoMethod(*s)
2051	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2052}
2053
2054// DayPart: Daypart targeting message that specifies if the ad can be
2055// shown
2056// only during certain parts of a day/week.
2057type DayPart struct {
2058	// DayOfWeek: The day of the week to target. If unspecified, applicable
2059	// to all days.
2060	//
2061	// Possible values:
2062	//   "DAY_OF_WEEK_UNSPECIFIED" - A placeholder for when the day of the
2063	// week is not specified.
2064	//   "MONDAY" - Monday
2065	//   "TUESDAY" - Tuesday
2066	//   "WEDNESDAY" - Wednesday
2067	//   "THURSDAY" - Thursday
2068	//   "FRIDAY" - Friday
2069	//   "SATURDAY" - Saturday
2070	//   "SUNDAY" - Sunday
2071	DayOfWeek string `json:"dayOfWeek,omitempty"`
2072
2073	// EndTime: The ending time of the day for the ad to show (minute
2074	// level
2075	// granularity). The end time is exclusive. This field is not
2076	// available
2077	// for filtering in PQL queries.
2078	EndTime *TimeOfDay `json:"endTime,omitempty"`
2079
2080	// StartTime: The starting time of day for the ad to show (minute level
2081	// granularity).
2082	// The start time is inclusive.
2083	// This field is not available for filtering in PQL queries.
2084	StartTime *TimeOfDay `json:"startTime,omitempty"`
2085
2086	// ForceSendFields is a list of field names (e.g. "DayOfWeek") to
2087	// unconditionally include in API requests. By default, fields with
2088	// empty values are omitted from API requests. However, any non-pointer,
2089	// non-interface field appearing in ForceSendFields will be sent to the
2090	// server regardless of whether the field is empty or not. This may be
2091	// used to include empty fields in Patch requests.
2092	ForceSendFields []string `json:"-"`
2093
2094	// NullFields is a list of field names (e.g. "DayOfWeek") to include in
2095	// API requests with the JSON null value. By default, fields with empty
2096	// values are omitted from API requests. However, any field with an
2097	// empty value appearing in NullFields will be sent to the server as
2098	// null. It is an error if a field in this list has a non-empty value.
2099	// This may be used to include null fields in Patch requests.
2100	NullFields []string `json:"-"`
2101}
2102
2103func (s *DayPart) MarshalJSON() ([]byte, error) {
2104	type NoMethod DayPart
2105	raw := NoMethod(*s)
2106	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2107}
2108
2109// DayPartTargeting: Specifies the day part targeting criteria.
2110type DayPartTargeting struct {
2111	// DayParts: A list of day part targeting criterion.
2112	DayParts []*DayPart `json:"dayParts,omitempty"`
2113
2114	// TimeZoneType: The timezone to use for interpreting the day part
2115	// targeting.
2116	//
2117	// Possible values:
2118	//   "TIME_ZONE_SOURCE_UNSPECIFIED" - A placeholder for an undefined
2119	// time zone source.
2120	//   "PUBLISHER" - Use publisher's time zone setting.
2121	//   "USER" - Use the user's time zone setting.
2122	TimeZoneType string `json:"timeZoneType,omitempty"`
2123
2124	// ForceSendFields is a list of field names (e.g. "DayParts") to
2125	// unconditionally include in API requests. By default, fields with
2126	// empty values are omitted from API requests. However, any non-pointer,
2127	// non-interface field appearing in ForceSendFields will be sent to the
2128	// server regardless of whether the field is empty or not. This may be
2129	// used to include empty fields in Patch requests.
2130	ForceSendFields []string `json:"-"`
2131
2132	// NullFields is a list of field names (e.g. "DayParts") to include in
2133	// API requests with the JSON null value. By default, fields with empty
2134	// values are omitted from API requests. However, any field with an
2135	// empty value appearing in NullFields will be sent to the server as
2136	// null. It is an error if a field in this list has a non-empty value.
2137	// This may be used to include null fields in Patch requests.
2138	NullFields []string `json:"-"`
2139}
2140
2141func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
2142	type NoMethod DayPartTargeting
2143	raw := NoMethod(*s)
2144	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2145}
2146
2147// Deal: A deal represents a segment of inventory for displaying ads
2148// on.
2149// A proposal can contain multiple deals. A deal contains the terms
2150// and
2151// targeting information that is used for serving.
2152type Deal struct {
2153	// AvailableEndTime: Proposed flight end time of the deal.
2154	// This will generally be stored in a granularity of a second.
2155	// A value is not required for Private Auction deals or Preferred Deals.
2156	AvailableEndTime string `json:"availableEndTime,omitempty"`
2157
2158	// AvailableStartTime: Optional proposed flight start time of the
2159	// deal.
2160	// This will generally be stored in the granularity of one second since
2161	// deal
2162	// serving starts at seconds boundary. Any time specified with
2163	// more
2164	// granularity (e.g., in milliseconds) will be truncated towards the
2165	// start of
2166	// time in seconds.
2167	AvailableStartTime string `json:"availableStartTime,omitempty"`
2168
2169	// BuyerPrivateData: Buyer private data (hidden from seller).
2170	BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
2171
2172	// CreateProductId: The product ID from which this deal was
2173	// created.
2174	//
2175	// Note: This field may be set only when creating the resource.
2176	// Modifying
2177	// this field while updating the resource will result in an error.
2178	CreateProductId string `json:"createProductId,omitempty"`
2179
2180	// CreateProductRevision: Optional revision number of the product that
2181	// the deal was created from.
2182	// If present on create, and the server `product_revision` has advanced
2183	// sinced
2184	// the passed-in `create_product_revision`, an `ABORTED` error will
2185	// be
2186	// returned.
2187	//
2188	// Note: This field may be set only when creating the resource.
2189	// Modifying
2190	// this field while updating the resource will result in an error.
2191	CreateProductRevision int64 `json:"createProductRevision,omitempty,string"`
2192
2193	// CreateTime: Output only. The time of the deal creation.
2194	CreateTime string `json:"createTime,omitempty"`
2195
2196	// CreativePreApprovalPolicy: Output only. Specifies the creative
2197	// pre-approval policy.
2198	//
2199	// Possible values:
2200	//   "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" - A placeholder for an
2201	// undefined creative pre-approval policy.
2202	//   "SELLER_PRE_APPROVAL_REQUIRED" - The seller needs to approve each
2203	// creative before it can serve.
2204	//   "SELLER_PRE_APPROVAL_NOT_REQUIRED" - The seller does not need to
2205	// approve each creative before it can serve.
2206	CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"`
2207
2208	// CreativeRestrictions: Output only. Restricitions about the creatives
2209	// associated with the deal
2210	// (i.e., size) This is available for Programmatic Guaranteed/Preferred
2211	// Deals
2212	// in Ad Manager.
2213	CreativeRestrictions *CreativeRestrictions `json:"creativeRestrictions,omitempty"`
2214
2215	// CreativeSafeFrameCompatibility: Output only. Specifies whether the
2216	// creative is safeFrame compatible.
2217	//
2218	// Possible values:
2219	//   "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" - A placeholder for
2220	// an undefined creative safe-frame compatibility.
2221	//   "COMPATIBLE" - The creatives need to be compatible with the safe
2222	// frame option.
2223	//   "INCOMPATIBLE" - The creatives can be incompatible with the safe
2224	// frame option.
2225	CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"`
2226
2227	// DealId: Output only. A unique deal ID for the deal (server-assigned).
2228	DealId string `json:"dealId,omitempty"`
2229
2230	// DealServingMetadata: Output only. Metadata about the serving status
2231	// of this deal.
2232	DealServingMetadata *DealServingMetadata `json:"dealServingMetadata,omitempty"`
2233
2234	// DealTerms: The negotiable terms of the deal.
2235	DealTerms *DealTerms `json:"dealTerms,omitempty"`
2236
2237	// DeliveryControl: The set of fields around delivery control that are
2238	// interesting for a buyer
2239	// to see but are non-negotiable. These are set by the publisher.
2240	DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"`
2241
2242	// Description: Description for the deal terms.
2243	Description string `json:"description,omitempty"`
2244
2245	// DisplayName: The name of the deal.
2246	DisplayName string `json:"displayName,omitempty"`
2247
2248	// ExternalDealId: Output only. The external deal ID assigned to this
2249	// deal once the deal is
2250	// finalized. This is the deal ID that shows up in serving/reporting
2251	// etc.
2252	ExternalDealId string `json:"externalDealId,omitempty"`
2253
2254	// IsSetupComplete: Output only. True, if the buyside inventory setup is
2255	// complete for this
2256	// deal.
2257	IsSetupComplete bool `json:"isSetupComplete,omitempty"`
2258
2259	// ProgrammaticCreativeSource: Output only. Specifies the creative
2260	// source for programmatic deals.
2261	// PUBLISHER means creative is provided by seller and ADVERTISER
2262	// means
2263	// creative is provided by buyer.
2264	//
2265	// Possible values:
2266	//   "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" - A placeholder for an
2267	// undefined programmatic creative source.
2268	//   "ADVERTISER" - The advertiser provides the creatives.
2269	//   "PUBLISHER" - The publisher provides the creatives to be served.
2270	ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"`
2271
2272	// ProposalId: Output only. ID of the proposal that this deal is part
2273	// of.
2274	ProposalId string `json:"proposalId,omitempty"`
2275
2276	// SellerContacts: Output only. Seller contact information for the deal.
2277	SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"`
2278
2279	// SyndicationProduct: The syndication product associated with the
2280	// deal.
2281	//
2282	// Note: This field may be set only when creating the resource.
2283	// Modifying
2284	// this field while updating the resource will result in an error.
2285	//
2286	// Possible values:
2287	//   "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined
2288	// syndication product.
2289	//   "CONTENT" - This typically represents a web page.
2290	//   "MOBILE" - This represents a mobile property.
2291	//   "VIDEO" - This represents video ad formats.
2292	//   "GAMES" - This represents ads shown within games.
2293	SyndicationProduct string `json:"syndicationProduct,omitempty"`
2294
2295	// Targeting: Output only. Specifies the subset of inventory targeted by
2296	// the deal.
2297	Targeting *MarketplaceTargeting `json:"targeting,omitempty"`
2298
2299	// TargetingCriterion: The shared targeting visible to buyers and
2300	// sellers. Each shared
2301	// targeting entity is AND'd together.
2302	TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"`
2303
2304	// UpdateTime: Output only. The time when the deal was last updated.
2305	UpdateTime string `json:"updateTime,omitempty"`
2306
2307	// WebPropertyCode: The web property code for the seller copied over
2308	// from the product.
2309	WebPropertyCode string `json:"webPropertyCode,omitempty"`
2310
2311	// ForceSendFields is a list of field names (e.g. "AvailableEndTime") to
2312	// unconditionally include in API requests. By default, fields with
2313	// empty values are omitted from API requests. However, any non-pointer,
2314	// non-interface field appearing in ForceSendFields will be sent to the
2315	// server regardless of whether the field is empty or not. This may be
2316	// used to include empty fields in Patch requests.
2317	ForceSendFields []string `json:"-"`
2318
2319	// NullFields is a list of field names (e.g. "AvailableEndTime") to
2320	// include in API requests with the JSON null value. By default, fields
2321	// with empty values are omitted from API requests. However, any field
2322	// with an empty value appearing in NullFields will be sent to the
2323	// server as null. It is an error if a field in this list has a
2324	// non-empty value. This may be used to include null fields in Patch
2325	// requests.
2326	NullFields []string `json:"-"`
2327}
2328
2329func (s *Deal) MarshalJSON() ([]byte, error) {
2330	type NoMethod Deal
2331	raw := NoMethod(*s)
2332	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2333}
2334
2335// DealPauseStatus: Tracks which parties (if any) have paused a
2336// deal.
2337// The deal is considered paused if either hasBuyerPaused
2338// or
2339// hasSellPaused is true.
2340type DealPauseStatus struct {
2341	// BuyerPauseReason: The buyer's reason for pausing, if the buyer paused
2342	// the deal.
2343	BuyerPauseReason string `json:"buyerPauseReason,omitempty"`
2344
2345	// FirstPausedBy: The role of the person who first paused this deal.
2346	//
2347	// Possible values:
2348	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
2349	// buyer/seller role.
2350	//   "BUYER" - Specifies the role as buyer.
2351	//   "SELLER" - Specifies the role as seller.
2352	FirstPausedBy string `json:"firstPausedBy,omitempty"`
2353
2354	// HasBuyerPaused: True, if the buyer has paused the deal unilaterally.
2355	HasBuyerPaused bool `json:"hasBuyerPaused,omitempty"`
2356
2357	// HasSellerPaused: True, if the seller has paused the deal
2358	// unilaterally.
2359	HasSellerPaused bool `json:"hasSellerPaused,omitempty"`
2360
2361	// SellerPauseReason: The seller's reason for pausing, if the seller
2362	// paused the deal.
2363	SellerPauseReason string `json:"sellerPauseReason,omitempty"`
2364
2365	// ForceSendFields is a list of field names (e.g. "BuyerPauseReason") to
2366	// unconditionally include in API requests. By default, fields with
2367	// empty values are omitted from API requests. However, any non-pointer,
2368	// non-interface field appearing in ForceSendFields will be sent to the
2369	// server regardless of whether the field is empty or not. This may be
2370	// used to include empty fields in Patch requests.
2371	ForceSendFields []string `json:"-"`
2372
2373	// NullFields is a list of field names (e.g. "BuyerPauseReason") to
2374	// include in API requests with the JSON null value. By default, fields
2375	// with empty values are omitted from API requests. However, any field
2376	// with an empty value appearing in NullFields will be sent to the
2377	// server as null. It is an error if a field in this list has a
2378	// non-empty value. This may be used to include null fields in Patch
2379	// requests.
2380	NullFields []string `json:"-"`
2381}
2382
2383func (s *DealPauseStatus) MarshalJSON() ([]byte, error) {
2384	type NoMethod DealPauseStatus
2385	raw := NoMethod(*s)
2386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2387}
2388
2389// DealServingMetadata: Message captures metadata about the serving
2390// status of a deal.
2391type DealServingMetadata struct {
2392	// DealPauseStatus: Output only. Tracks which parties (if any) have
2393	// paused a deal.
2394	DealPauseStatus *DealPauseStatus `json:"dealPauseStatus,omitempty"`
2395
2396	// ForceSendFields is a list of field names (e.g. "DealPauseStatus") to
2397	// unconditionally include in API requests. By default, fields with
2398	// empty values are omitted from API requests. However, any non-pointer,
2399	// non-interface field appearing in ForceSendFields will be sent to the
2400	// server regardless of whether the field is empty or not. This may be
2401	// used to include empty fields in Patch requests.
2402	ForceSendFields []string `json:"-"`
2403
2404	// NullFields is a list of field names (e.g. "DealPauseStatus") to
2405	// include in API requests with the JSON null value. By default, fields
2406	// with empty values are omitted from API requests. However, any field
2407	// with an empty value appearing in NullFields will be sent to the
2408	// server as null. It is an error if a field in this list has a
2409	// non-empty value. This may be used to include null fields in Patch
2410	// requests.
2411	NullFields []string `json:"-"`
2412}
2413
2414func (s *DealServingMetadata) MarshalJSON() ([]byte, error) {
2415	type NoMethod DealServingMetadata
2416	raw := NoMethod(*s)
2417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2418}
2419
2420// DealTerms: The deal terms specify the details of a Product/deal. They
2421// specify things
2422// like price per buyer, the type of pricing model (e.g., fixed price,
2423// auction)
2424// and expected impressions from the publisher.
2425type DealTerms struct {
2426	// BrandingType: Visibility of the URL in bid requests. (default:
2427	// BRANDED)
2428	//
2429	// Possible values:
2430	//   "BRANDING_TYPE_UNSPECIFIED" - A placeholder for an undefined
2431	// branding type.
2432	//   "BRANDED" - Full URL is included in bid requests.
2433	//   "SEMI_TRANSPARENT" - A TopLevelDomain or masked URL is sent in bid
2434	// requests
2435	// rather than the full one.
2436	BrandingType string `json:"brandingType,omitempty"`
2437
2438	// Description: Publisher provided description for the terms.
2439	Description string `json:"description,omitempty"`
2440
2441	// EstimatedGrossSpend: Non-binding estimate of the estimated gross
2442	// spend for this deal.
2443	// Can be set by buyer or seller.
2444	EstimatedGrossSpend *Price `json:"estimatedGrossSpend,omitempty"`
2445
2446	// EstimatedImpressionsPerDay: Non-binding estimate of the impressions
2447	// served per day.
2448	// Can be set by buyer or seller.
2449	EstimatedImpressionsPerDay int64 `json:"estimatedImpressionsPerDay,omitempty,string"`
2450
2451	// GuaranteedFixedPriceTerms: The terms for guaranteed fixed price
2452	// deals.
2453	GuaranteedFixedPriceTerms *GuaranteedFixedPriceTerms `json:"guaranteedFixedPriceTerms,omitempty"`
2454
2455	// NonGuaranteedAuctionTerms: The terms for non-guaranteed auction
2456	// deals.
2457	NonGuaranteedAuctionTerms *NonGuaranteedAuctionTerms `json:"nonGuaranteedAuctionTerms,omitempty"`
2458
2459	// NonGuaranteedFixedPriceTerms: The terms for non-guaranteed fixed
2460	// price deals.
2461	NonGuaranteedFixedPriceTerms *NonGuaranteedFixedPriceTerms `json:"nonGuaranteedFixedPriceTerms,omitempty"`
2462
2463	// SellerTimeZone: The time zone name. For deals with Cost Per Day
2464	// billing, defines the
2465	// time zone used to mark the boundaries of a day. It should be an
2466	// IANA TZ name, such as "America/Los_Angeles". For more
2467	// information,
2468	// see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
2469	SellerTimeZone string `json:"sellerTimeZone,omitempty"`
2470
2471	// ForceSendFields is a list of field names (e.g. "BrandingType") to
2472	// unconditionally include in API requests. By default, fields with
2473	// empty values are omitted from API requests. However, any non-pointer,
2474	// non-interface field appearing in ForceSendFields will be sent to the
2475	// server regardless of whether the field is empty or not. This may be
2476	// used to include empty fields in Patch requests.
2477	ForceSendFields []string `json:"-"`
2478
2479	// NullFields is a list of field names (e.g. "BrandingType") to include
2480	// in API requests with the JSON null value. By default, fields with
2481	// empty values are omitted from API requests. However, any field with
2482	// an empty value appearing in NullFields will be sent to the server as
2483	// null. It is an error if a field in this list has a non-empty value.
2484	// This may be used to include null fields in Patch requests.
2485	NullFields []string `json:"-"`
2486}
2487
2488func (s *DealTerms) MarshalJSON() ([]byte, error) {
2489	type NoMethod DealTerms
2490	raw := NoMethod(*s)
2491	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2492}
2493
2494// DeliveryControl: Message contains details about how the deals will be
2495// paced.
2496type DeliveryControl struct {
2497	// CreativeBlockingLevel: Output only. Specified the creative blocking
2498	// levels to be applied.
2499	//
2500	// Possible values:
2501	//   "CREATIVE_BLOCKING_LEVEL_UNSPECIFIED" - A placeholder for an
2502	// undefined creative blocking level.
2503	//   "PUBLISHER_BLOCKING_RULES" - Publisher blocking rules will be
2504	// applied.
2505	//   "ADX_POLICY_BLOCKING_ONLY" - The Ad Exchange policy blocking rules
2506	// will be applied.
2507	CreativeBlockingLevel string `json:"creativeBlockingLevel,omitempty"`
2508
2509	// DeliveryRateType: Output only. Specifies how the impression delivery
2510	// will be paced.
2511	//
2512	// Possible values:
2513	//   "DELIVERY_RATE_TYPE_UNSPECIFIED" - A placeholder for an undefined
2514	// delivery rate type.
2515	//   "EVENLY" - Impressions are served uniformly over the life of the
2516	// deal.
2517	//   "FRONT_LOADED" - Impressions are served front-loaded.
2518	//   "AS_FAST_AS_POSSIBLE" - Impressions are served as fast as possible.
2519	DeliveryRateType string `json:"deliveryRateType,omitempty"`
2520
2521	// FrequencyCaps: Output only. Specifies any frequency caps.
2522	FrequencyCaps []*FrequencyCap `json:"frequencyCaps,omitempty"`
2523
2524	// ForceSendFields is a list of field names (e.g.
2525	// "CreativeBlockingLevel") to unconditionally include in API requests.
2526	// By default, fields with empty values are omitted from API requests.
2527	// However, any non-pointer, non-interface field appearing in
2528	// ForceSendFields will be sent to the server regardless of whether the
2529	// field is empty or not. This may be used to include empty fields in
2530	// Patch requests.
2531	ForceSendFields []string `json:"-"`
2532
2533	// NullFields is a list of field names (e.g. "CreativeBlockingLevel") to
2534	// include in API requests with the JSON null value. By default, fields
2535	// with empty values are omitted from API requests. However, any field
2536	// with an empty value appearing in NullFields will be sent to the
2537	// server as null. It is an error if a field in this list has a
2538	// non-empty value. This may be used to include null fields in Patch
2539	// requests.
2540	NullFields []string `json:"-"`
2541}
2542
2543func (s *DeliveryControl) MarshalJSON() ([]byte, error) {
2544	type NoMethod DeliveryControl
2545	raw := NoMethod(*s)
2546	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2547}
2548
2549// Disapproval: Output only. The reason and details for a disapproval.
2550type Disapproval struct {
2551	// Details: Additional details about the reason for disapproval.
2552	Details []string `json:"details,omitempty"`
2553
2554	// Reason: The categorized reason for disapproval.
2555	//
2556	// Possible values:
2557	//   "LENGTH_OF_IMAGE_ANIMATION" - The length of the image animation is
2558	// longer than allowed.
2559	//   "BROKEN_URL" - The click through URL doesn't work properly.
2560	//   "MEDIA_NOT_FUNCTIONAL" - Something is wrong with the creative
2561	// itself.
2562	//   "INVALID_FOURTH_PARTY_CALL" - The ad makes a fourth party call to
2563	// an unapproved vendor.
2564	//   "INCORRECT_REMARKETING_DECLARATION" - The ad targets consumers
2565	// using remarketing lists and/or collects
2566	// data for subsequent use in retargeting, but does not correctly
2567	// declare
2568	// that use.
2569	//   "LANDING_PAGE_ERROR" - Clicking on the ad leads to an error page.
2570	//   "AD_SIZE_DOES_NOT_MATCH_AD_SLOT" - The ad size when rendered does
2571	// not match the declaration.
2572	//   "NO_BORDER" - Ads with a white background require a border, which
2573	// was missing.
2574	//   "FOURTH_PARTY_BROWSER_COOKIES" - The creative attempts to set
2575	// cookies from a fourth party that is not
2576	// certified.
2577	//   "LSO_OBJECTS" - The creative sets an LSO object.
2578	//   "BLANK_CREATIVE" - The ad serves a blank.
2579	//   "DESTINATION_URLS_UNDECLARED" - The ad uses rotation, but not all
2580	// destination URLs were declared.
2581	//   "PROBLEM_WITH_CLICK_MACRO" - There is a problem with the way the
2582	// click macro is used.
2583	//   "INCORRECT_AD_TECHNOLOGY_DECLARATION" - The ad technology
2584	// declaration is not accurate.
2585	//   "INCORRECT_DESTINATION_URL_DECLARATION" - The actual destination
2586	// URL does not match the declared destination URL.
2587	//   "EXPANDABLE_INCORRECT_DIRECTION" - The declared expanding direction
2588	// does not match the actual direction.
2589	//   "EXPANDABLE_DIRECTION_NOT_SUPPORTED" - The ad does not expand in a
2590	// supported direction.
2591	//   "EXPANDABLE_INVALID_VENDOR" - The ad uses an expandable vendor that
2592	// is not supported.
2593	//   "EXPANDABLE_FUNCTIONALITY" - There was an issue with the expandable
2594	// ad.
2595	//   "VIDEO_INVALID_VENDOR" - The ad uses a video vendor that is not
2596	// supported.
2597	//   "VIDEO_UNSUPPORTED_LENGTH" - The length of the video ad is not
2598	// supported.
2599	//   "VIDEO_UNSUPPORTED_FORMAT" - The format of the video ad is not
2600	// supported.
2601	//   "VIDEO_FUNCTIONALITY" - There was an issue with the video ad.
2602	//   "LANDING_PAGE_DISABLED" - The landing page does not conform to Ad
2603	// Exchange policy.
2604	//   "MALWARE_SUSPECTED" - The ad or the landing page may contain
2605	// malware.
2606	//   "ADULT_IMAGE_OR_VIDEO" - The ad contains adult images or video
2607	// content.
2608	//   "INACCURATE_AD_TEXT" - The ad contains text that is unclear or
2609	// inaccurate.
2610	//   "COUNTERFEIT_DESIGNER_GOODS" - The ad promotes counterfeit designer
2611	// goods.
2612	//   "POP_UP" - The ad causes a popup window to appear.
2613	//   "INVALID_RTB_PROTOCOL_USAGE" - The creative does not follow
2614	// policies set for the RTB protocol.
2615	//   "RAW_IP_ADDRESS_IN_SNIPPET" - The ad contains a URL that uses a
2616	// numeric IP address for the domain.
2617	//   "UNACCEPTABLE_CONTENT_SOFTWARE" - The ad or landing page contains
2618	// unacceptable content because it initiated
2619	// a software or executable download.
2620	//   "UNAUTHORIZED_COOKIE_ON_GOOGLE_DOMAIN" - The ad set an unauthorized
2621	// cookie on a Google domain.
2622	//   "UNDECLARED_FLASH_OBJECTS" - Flash content found when no flash was
2623	// declared.
2624	//   "INVALID_SSL_DECLARATION" - SSL support declared but not working
2625	// correctly.
2626	//   "DIRECT_DOWNLOAD_IN_AD" - Rich Media - Direct Download in Ad (ex.
2627	// PDF download).
2628	//   "MAXIMUM_DOWNLOAD_SIZE_EXCEEDED" - Maximum download size exceeded.
2629	//   "DESTINATION_URL_SITE_NOT_CRAWLABLE" - Bad Destination URL: Site
2630	// Not Crawlable.
2631	//   "BAD_URL_LEGAL_DISAPPROVAL" - Bad URL: Legal disapproval.
2632	//   "PHARMA_GAMBLING_ALCOHOL_NOT_ALLOWED" - Pharmaceuticals, Gambling,
2633	// Alcohol not allowed and at least one was
2634	// detected.
2635	//   "DYNAMIC_DNS_AT_DESTINATION_URL" - Dynamic DNS at Destination URL.
2636	//   "POOR_IMAGE_OR_VIDEO_QUALITY" - Poor Image / Video Quality.
2637	//   "UNACCEPTABLE_IMAGE_CONTENT" - For example, Image Trick to Click.
2638	//   "INCORRECT_IMAGE_LAYOUT" - Incorrect Image Layout.
2639	//   "IRRELEVANT_IMAGE_OR_VIDEO" - Irrelevant Image / Video.
2640	//   "DESTINATION_SITE_DOES_NOT_ALLOW_GOING_BACK" - Broken back button.
2641	//   "MISLEADING_CLAIMS_IN_AD" - Misleading/Inaccurate claims in ads.
2642	//   "RESTRICTED_PRODUCTS" - Restricted Products.
2643	//   "UNACCEPTABLE_CONTENT" - Unacceptable content. For example,
2644	// malware.
2645	//   "AUTOMATED_AD_CLICKING" - The ad automatically redirects to the
2646	// destination site without a click,
2647	// or reports a click when none were made.
2648	//   "INVALID_URL_PROTOCOL" - The ad uses URL protocols that do not
2649	// exist or are not allowed on AdX.
2650	//   "UNDECLARED_RESTRICTED_CONTENT" - Restricted content (for example,
2651	// alcohol) was found in the ad but not
2652	// declared.
2653	//   "INVALID_REMARKETING_LIST_USAGE" - Violation of the remarketing
2654	// list policy.
2655	//   "DESTINATION_SITE_NOT_CRAWLABLE_ROBOTS_TXT" - The destination
2656	// site's robot.txt file prevents it from being crawled.
2657	//   "CLICK_TO_DOWNLOAD_NOT_AN_APP" - Click to download must link to an
2658	// app.
2659	//   "INACCURATE_REVIEW_EXTENSION" - A review extension must be an
2660	// accurate review.
2661	//   "SEXUALLY_EXPLICIT_CONTENT" - Sexually explicit content.
2662	//   "GAINING_AN_UNFAIR_ADVANTAGE" - The ad tries to gain an unfair
2663	// traffic advantage.
2664	//   "GAMING_THE_GOOGLE_NETWORK" - The ad tries to circumvent Google's
2665	// advertising systems.
2666	//   "DANGEROUS_PRODUCTS_KNIVES" - The ad promotes dangerous knives.
2667	//   "DANGEROUS_PRODUCTS_EXPLOSIVES" - The ad promotes explosives.
2668	//   "DANGEROUS_PRODUCTS_GUNS" - The ad promotes guns & parts.
2669	//   "DANGEROUS_PRODUCTS_DRUGS" - The ad promotes recreational
2670	// drugs/services & related equipment.
2671	//   "DANGEROUS_PRODUCTS_TOBACCO" - The ad promotes tobacco
2672	// products/services & related equipment.
2673	//   "DANGEROUS_PRODUCTS_WEAPONS" - The ad promotes weapons.
2674	//   "UNCLEAR_OR_IRRELEVANT_AD" - The ad is unclear or irrelevant to the
2675	// destination site.
2676	//   "PROFESSIONAL_STANDARDS" - The ad does not meet professional
2677	// standards.
2678	//   "DYSFUNCTIONAL_PROMOTION" - The promotion is unnecessarily
2679	// difficult to navigate.
2680	//   "INVALID_INTEREST_BASED_AD" - Violation of Google's policy for
2681	// interest-based ads.
2682	//   "MISUSE_OF_PERSONAL_INFORMATION" - Misuse of personal information.
2683	//   "OMISSION_OF_RELEVANT_INFORMATION" - Omission of relevant
2684	// information.
2685	//   "UNAVAILABLE_PROMOTIONS" - Unavailable promotions.
2686	//   "MISLEADING_PROMOTIONS" - Misleading or unrealistic promotions.
2687	//   "INAPPROPRIATE_CONTENT" - Offensive or inappropriate content.
2688	//   "SENSITIVE_EVENTS" - Capitalizing on sensitive events.
2689	//   "SHOCKING_CONTENT" - Shocking content.
2690	//   "ENABLING_DISHONEST_BEHAVIOR" - Products & Services that enable
2691	// dishonest behavior.
2692	//   "TECHNICAL_REQUIREMENTS" - The ad does not meet technical
2693	// requirements.
2694	//   "RESTRICTED_POLITICAL_CONTENT" - Restricted political content.
2695	//   "UNSUPPORTED_CONTENT" - Unsupported content.
2696	//   "INVALID_BIDDING_METHOD" - Invalid bidding method.
2697	//   "VIDEO_TOO_LONG" - Video length exceeds limits.
2698	//   "VIOLATES_JAPANESE_PHARMACY_LAW" - Unacceptable content: Japanese
2699	// healthcare.
2700	//   "UNACCREDITED_PET_PHARMACY" - Online pharmacy ID required.
2701	//   "ABORTION" - Unacceptable content: Abortion.
2702	//   "CONTRACEPTIVES" - Unacceptable content: Birth control.
2703	//   "NEED_CERTIFICATES_TO_ADVERTISE_IN_CHINA" - Restricted in China.
2704	//   "KCDSP_REGISTRATION" - Unacceptable content: Korean healthcare.
2705	//   "NOT_FAMILY_SAFE" - Non-family safe or adult content.
2706	//   "CLINICAL_TRIAL_RECRUITMENT" - Clinical trial recruitment.
2707	//   "MAXIMUM_NUMBER_OF_HTTP_CALLS_EXCEEDED" - Maximum number of HTTP
2708	// calls exceeded.
2709	//   "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED" - Maximum number of cookies
2710	// exceeded.
2711	//   "PERSONAL_LOANS" - Financial service ad does not adhere to
2712	// specifications.
2713	//   "UNSUPPORTED_FLASH_CONTENT" - Flash content was found in an
2714	// unsupported context.
2715	//   "MISUSE_BY_OMID_SCRIPT" - Misuse by an Open Measurement SDK script.
2716	//   "NON_WHITELISTED_OMID_VENDOR" - Use of an Open Measurement SDK
2717	// vendor not on approved whitelist.
2718	//   "DESTINATION_EXPERIENCE" - Unacceptable landing page.
2719	//   "UNSUPPORTED_LANGUAGE" - Unsupported language.
2720	//   "NON_SSL_COMPLIANT" - Non-SSL compliant.
2721	//   "TEMPORARY_PAUSE" - Temporary pausing of creative.
2722	//   "BAIL_BONDS" - Promotes services related to bail bonds.
2723	//   "EXPERIMENTAL_MEDICAL_TREATMENT" - Promotes speculative and/or
2724	// experimental medical treatments.
2725	Reason string `json:"reason,omitempty"`
2726
2727	// ForceSendFields is a list of field names (e.g. "Details") to
2728	// unconditionally include in API requests. By default, fields with
2729	// empty values are omitted from API requests. However, any non-pointer,
2730	// non-interface field appearing in ForceSendFields will be sent to the
2731	// server regardless of whether the field is empty or not. This may be
2732	// used to include empty fields in Patch requests.
2733	ForceSendFields []string `json:"-"`
2734
2735	// NullFields is a list of field names (e.g. "Details") to include in
2736	// API requests with the JSON null value. By default, fields with empty
2737	// values are omitted from API requests. However, any field with an
2738	// empty value appearing in NullFields will be sent to the server as
2739	// null. It is an error if a field in this list has a non-empty value.
2740	// This may be used to include null fields in Patch requests.
2741	NullFields []string `json:"-"`
2742}
2743
2744func (s *Disapproval) MarshalJSON() ([]byte, error) {
2745	type NoMethod Disapproval
2746	raw := NoMethod(*s)
2747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2748}
2749
2750// Empty: A generic empty message that you can re-use to avoid defining
2751// duplicated
2752// empty messages in your APIs. A typical example is to use it as the
2753// request
2754// or the response type of an API method. For instance:
2755//
2756//     service Foo {
2757//       rpc Bar(google.protobuf.Empty) returns
2758// (google.protobuf.Empty);
2759//     }
2760//
2761// The JSON representation for `Empty` is empty JSON object `{}`.
2762type Empty struct {
2763	// ServerResponse contains the HTTP response code and headers from the
2764	// server.
2765	googleapi.ServerResponse `json:"-"`
2766}
2767
2768// FilterSet: A set of filters that is applied to a request for
2769// data.
2770// Within a filter set, an AND operation is performed across the
2771// filters
2772// represented by each field. An OR operation is performed across the
2773// filters
2774// represented by the multiple values of a repeated field,
2775// e.g.,
2776// "format=VIDEO AND deal_id=12 AND (seller_network_id=34
2777// OR
2778// seller_network_id=56)".
2779type FilterSet struct {
2780	// AbsoluteDateRange: An absolute date range, defined by a start date
2781	// and an end date.
2782	// Interpreted relative to Pacific time zone.
2783	AbsoluteDateRange *AbsoluteDateRange `json:"absoluteDateRange,omitempty"`
2784
2785	// BreakdownDimensions: The set of dimensions along which to break down
2786	// the response; may be empty.
2787	// If multiple dimensions are requested, the breakdown is along the
2788	// Cartesian
2789	// product of the requested dimensions.
2790	//
2791	// Possible values:
2792	//   "BREAKDOWN_DIMENSION_UNSPECIFIED" - A placeholder for an
2793	// unspecified dimension; should not be used.
2794	//   "PUBLISHER_IDENTIFIER" - The response should be broken down by
2795	// publisher identifier.
2796	// This option is available only for Open Bidding buyers.
2797	BreakdownDimensions []string `json:"breakdownDimensions,omitempty"`
2798
2799	// CreativeId: The ID of the creative on which to filter; optional. This
2800	// field may be set
2801	// only for a filter set that accesses account-level troubleshooting
2802	// data,
2803	// i.e., one whose name matches the
2804	// `bidders/*/accounts/*/filterSets/*`
2805	// pattern.
2806	CreativeId string `json:"creativeId,omitempty"`
2807
2808	// DealId: The ID of the deal on which to filter; optional. This field
2809	// may be set
2810	// only for a filter set that accesses account-level troubleshooting
2811	// data,
2812	// i.e., one whose name matches the
2813	// `bidders/*/accounts/*/filterSets/*`
2814	// pattern.
2815	DealId int64 `json:"dealId,omitempty,string"`
2816
2817	// Environment: The environment on which to filter; optional.
2818	//
2819	// Possible values:
2820	//   "ENVIRONMENT_UNSPECIFIED" - A placeholder for an undefined
2821	// environment; indicates that no environment
2822	// filter will be applied.
2823	//   "WEB" - The ad impression appears on the web.
2824	//   "APP" - The ad impression appears in an app.
2825	Environment string `json:"environment,omitempty"`
2826
2827	// Format: Creative format bidded on or allowed to bid on, can be empty.
2828	//
2829	// Possible values:
2830	//   "FORMAT_UNSPECIFIED" - A placeholder for an undefined format;
2831	// indicates that no format filter
2832	// will be applied.
2833	//   "NATIVE_DISPLAY" - The ad impression is a native ad, and display
2834	// (i.e., image) format.
2835	//   "NATIVE_VIDEO" - The ad impression is a native ad, and video
2836	// format.
2837	//   "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and
2838	// display (i.e., image) format.
2839	//   "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and
2840	// video format.
2841	Format string `json:"format,omitempty"`
2842
2843	// Formats: Creative formats bidded on or allowed to bid on, can be
2844	// empty. Although
2845	// this field is a list, it can only be populated with a single item.
2846	// A
2847	// HTTP 400 bad request error will be returned in the response if you
2848	// specify
2849	// multiple items.
2850	//
2851	// Possible values:
2852	//   "FORMAT_UNSPECIFIED" - A placeholder for an undefined format;
2853	// indicates that no format filter
2854	// will be applied.
2855	//   "NATIVE_DISPLAY" - The ad impression is a native ad, and display
2856	// (i.e., image) format.
2857	//   "NATIVE_VIDEO" - The ad impression is a native ad, and video
2858	// format.
2859	//   "NON_NATIVE_DISPLAY" - The ad impression is not a native ad, and
2860	// display (i.e., image) format.
2861	//   "NON_NATIVE_VIDEO" - The ad impression is not a native ad, and
2862	// video format.
2863	Formats []string `json:"formats,omitempty"`
2864
2865	// Name: A user-defined name of the filter set. Filter set names must be
2866	// unique
2867	// globally and match one of the patterns:
2868	//
2869	// - `bidders/*/filterSets/*` (for accessing bidder-level
2870	// troubleshooting
2871	// data)
2872	// - `bidders/*/accounts/*/filterSets/*` (for accessing
2873	// account-level
2874	// troubleshooting data)
2875	//
2876	// This field is required in create operations.
2877	Name string `json:"name,omitempty"`
2878
2879	// Platforms: The list of platforms on which to filter; may be empty.
2880	// The filters
2881	// represented by multiple platforms are ORed together (i.e., if
2882	// non-empty,
2883	// results must match any one of the platforms).
2884	//
2885	// Possible values:
2886	//   "PLATFORM_UNSPECIFIED" - A placeholder for an undefined platform;
2887	// indicates that no platform
2888	// filter will be applied.
2889	//   "DESKTOP" - The ad impression appears on a desktop.
2890	//   "TABLET" - The ad impression appears on a tablet.
2891	//   "MOBILE" - The ad impression appears on a mobile device.
2892	Platforms []string `json:"platforms,omitempty"`
2893
2894	// PublisherIdentifiers: For Open Bidding partners only.
2895	// The list of publisher identifiers on which to filter; may be
2896	// empty.
2897	// The filters represented by multiple publisher identifiers are
2898	// ORed
2899	// together.
2900	PublisherIdentifiers []string `json:"publisherIdentifiers,omitempty"`
2901
2902	// RealtimeTimeRange: An open-ended realtime time range, defined by the
2903	// aggregation start
2904	// timestamp.
2905	RealtimeTimeRange *RealtimeTimeRange `json:"realtimeTimeRange,omitempty"`
2906
2907	// RelativeDateRange: A relative date range, defined by an offset from
2908	// today and a duration.
2909	// Interpreted relative to Pacific time zone.
2910	RelativeDateRange *RelativeDateRange `json:"relativeDateRange,omitempty"`
2911
2912	// SellerNetworkIds: For Authorized Buyers only.
2913	// The list of IDs of the seller (publisher) networks on which to
2914	// filter;
2915	// may be empty. The filters represented by multiple seller network IDs
2916	// are
2917	// ORed together (i.e., if non-empty, results must match any one of
2918	// the
2919	// publisher networks).
2920	// See
2921	// [seller-network-ids](https://developers.google.com/authorized-buye
2922	// rs/rtb/downloads/seller-network-ids)
2923	// file for the set of existing seller network IDs.
2924	SellerNetworkIds []int64 `json:"sellerNetworkIds,omitempty"`
2925
2926	// TimeSeriesGranularity: The granularity of time intervals if a time
2927	// series breakdown is desired;
2928	// optional.
2929	//
2930	// Possible values:
2931	//   "TIME_SERIES_GRANULARITY_UNSPECIFIED" - A placeholder for an
2932	// unspecified interval; no time series is applied.
2933	// All rows in response will contain data for the entire requested time
2934	// range.
2935	//   "HOURLY" - Indicates that data will be broken down by the hour.
2936	//   "DAILY" - Indicates that data will be broken down by the day.
2937	TimeSeriesGranularity string `json:"timeSeriesGranularity,omitempty"`
2938
2939	// ServerResponse contains the HTTP response code and headers from the
2940	// server.
2941	googleapi.ServerResponse `json:"-"`
2942
2943	// ForceSendFields is a list of field names (e.g. "AbsoluteDateRange")
2944	// to unconditionally include in API requests. By default, fields with
2945	// empty values are omitted from API requests. However, any non-pointer,
2946	// non-interface field appearing in ForceSendFields will be sent to the
2947	// server regardless of whether the field is empty or not. This may be
2948	// used to include empty fields in Patch requests.
2949	ForceSendFields []string `json:"-"`
2950
2951	// NullFields is a list of field names (e.g. "AbsoluteDateRange") to
2952	// include in API requests with the JSON null value. By default, fields
2953	// with empty values are omitted from API requests. However, any field
2954	// with an empty value appearing in NullFields will be sent to the
2955	// server as null. It is an error if a field in this list has a
2956	// non-empty value. This may be used to include null fields in Patch
2957	// requests.
2958	NullFields []string `json:"-"`
2959}
2960
2961func (s *FilterSet) MarshalJSON() ([]byte, error) {
2962	type NoMethod FilterSet
2963	raw := NoMethod(*s)
2964	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2965}
2966
2967// FilteredBidCreativeRow: The number of filtered bids with the
2968// specified dimension values that have the
2969// specified creative.
2970type FilteredBidCreativeRow struct {
2971	// BidCount: The number of bids with the specified creative.
2972	BidCount *MetricValue `json:"bidCount,omitempty"`
2973
2974	// CreativeId: The ID of the creative.
2975	CreativeId string `json:"creativeId,omitempty"`
2976
2977	// RowDimensions: The values of all dimensions associated with metric
2978	// values in this row.
2979	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
2980
2981	// ForceSendFields is a list of field names (e.g. "BidCount") to
2982	// unconditionally include in API requests. By default, fields with
2983	// empty values are omitted from API requests. However, any non-pointer,
2984	// non-interface field appearing in ForceSendFields will be sent to the
2985	// server regardless of whether the field is empty or not. This may be
2986	// used to include empty fields in Patch requests.
2987	ForceSendFields []string `json:"-"`
2988
2989	// NullFields is a list of field names (e.g. "BidCount") to include in
2990	// API requests with the JSON null value. By default, fields with empty
2991	// values are omitted from API requests. However, any field with an
2992	// empty value appearing in NullFields will be sent to the server as
2993	// null. It is an error if a field in this list has a non-empty value.
2994	// This may be used to include null fields in Patch requests.
2995	NullFields []string `json:"-"`
2996}
2997
2998func (s *FilteredBidCreativeRow) MarshalJSON() ([]byte, error) {
2999	type NoMethod FilteredBidCreativeRow
3000	raw := NoMethod(*s)
3001	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3002}
3003
3004// FilteredBidDetailRow: The number of filtered bids with the specified
3005// dimension values, among those
3006// filtered due to the requested filtering reason (i.e. creative
3007// status), that
3008// have the specified detail.
3009type FilteredBidDetailRow struct {
3010	// BidCount: The number of bids with the specified detail.
3011	BidCount *MetricValue `json:"bidCount,omitempty"`
3012
3013	// DetailId: The ID of the detail. The associated value can be looked up
3014	// in the
3015	// dictionary file corresponding to the DetailType in the response
3016	// message.
3017	DetailId int64 `json:"detailId,omitempty"`
3018
3019	// RowDimensions: The values of all dimensions associated with metric
3020	// values in this row.
3021	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
3022
3023	// ForceSendFields is a list of field names (e.g. "BidCount") to
3024	// unconditionally include in API requests. By default, fields with
3025	// empty values are omitted from API requests. However, any non-pointer,
3026	// non-interface field appearing in ForceSendFields will be sent to the
3027	// server regardless of whether the field is empty or not. This may be
3028	// used to include empty fields in Patch requests.
3029	ForceSendFields []string `json:"-"`
3030
3031	// NullFields is a list of field names (e.g. "BidCount") to include in
3032	// API requests with the JSON null value. By default, fields with empty
3033	// values are omitted from API requests. However, any field with an
3034	// empty value appearing in NullFields will be sent to the server as
3035	// null. It is an error if a field in this list has a non-empty value.
3036	// This may be used to include null fields in Patch requests.
3037	NullFields []string `json:"-"`
3038}
3039
3040func (s *FilteredBidDetailRow) MarshalJSON() ([]byte, error) {
3041	type NoMethod FilteredBidDetailRow
3042	raw := NoMethod(*s)
3043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3044}
3045
3046// FirstPartyMobileApplicationTargeting: Represents a list of targeted
3047// and excluded mobile application IDs that
3048// publishers own.
3049// Mobile application IDs are from App Store and Google Play
3050// Store.
3051// Android App ID, for example, com.google.android.apps.maps, can be
3052// found in
3053// Google Play Store URL.
3054// iOS App ID (which is a number) can be found at the end of iTunes
3055// store URL.
3056// First party mobile applications is either included or excluded.
3057type FirstPartyMobileApplicationTargeting struct {
3058	// ExcludedAppIds: A list of application IDs to be excluded.
3059	ExcludedAppIds []string `json:"excludedAppIds,omitempty"`
3060
3061	// TargetedAppIds: A list of application IDs to be included.
3062	TargetedAppIds []string `json:"targetedAppIds,omitempty"`
3063
3064	// ForceSendFields is a list of field names (e.g. "ExcludedAppIds") to
3065	// unconditionally include in API requests. By default, fields with
3066	// empty values are omitted from API requests. However, any non-pointer,
3067	// non-interface field appearing in ForceSendFields will be sent to the
3068	// server regardless of whether the field is empty or not. This may be
3069	// used to include empty fields in Patch requests.
3070	ForceSendFields []string `json:"-"`
3071
3072	// NullFields is a list of field names (e.g. "ExcludedAppIds") to
3073	// include in API requests with the JSON null value. By default, fields
3074	// with empty values are omitted from API requests. However, any field
3075	// with an empty value appearing in NullFields will be sent to the
3076	// server as null. It is an error if a field in this list has a
3077	// non-empty value. This may be used to include null fields in Patch
3078	// requests.
3079	NullFields []string `json:"-"`
3080}
3081
3082func (s *FirstPartyMobileApplicationTargeting) MarshalJSON() ([]byte, error) {
3083	type NoMethod FirstPartyMobileApplicationTargeting
3084	raw := NoMethod(*s)
3085	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3086}
3087
3088// FrequencyCap: Frequency cap.
3089type FrequencyCap struct {
3090	// MaxImpressions: The maximum number of impressions that can be served
3091	// to a user within the
3092	// specified time period.
3093	MaxImpressions int64 `json:"maxImpressions,omitempty"`
3094
3095	// NumTimeUnits: The amount of time, in the units specified by
3096	// time_unit_type. Defines the
3097	// amount of time over which impressions per user are counted and
3098	// capped.
3099	NumTimeUnits int64 `json:"numTimeUnits,omitempty"`
3100
3101	// TimeUnitType: The time unit. Along with num_time_units defines the
3102	// amount of time over
3103	// which impressions per user are counted and capped.
3104	//
3105	// Possible values:
3106	//   "TIME_UNIT_TYPE_UNSPECIFIED" - A placeholder for an undefined time
3107	// unit type. This just indicates the
3108	// variable with this value hasn't been initialized.
3109	//   "MINUTE" - Minute
3110	//   "HOUR" - Hour
3111	//   "DAY" - Day
3112	//   "WEEK" - Week
3113	//   "MONTH" - Month
3114	//   "LIFETIME" - Lifetime
3115	TimeUnitType string `json:"timeUnitType,omitempty"`
3116
3117	// ForceSendFields is a list of field names (e.g. "MaxImpressions") to
3118	// unconditionally include in API requests. By default, fields with
3119	// empty values are omitted from API requests. However, any non-pointer,
3120	// non-interface field appearing in ForceSendFields will be sent to the
3121	// server regardless of whether the field is empty or not. This may be
3122	// used to include empty fields in Patch requests.
3123	ForceSendFields []string `json:"-"`
3124
3125	// NullFields is a list of field names (e.g. "MaxImpressions") to
3126	// include in API requests with the JSON null value. By default, fields
3127	// with empty values are omitted from API requests. However, any field
3128	// with an empty value appearing in NullFields will be sent to the
3129	// server as null. It is an error if a field in this list has a
3130	// non-empty value. This may be used to include null fields in Patch
3131	// requests.
3132	NullFields []string `json:"-"`
3133}
3134
3135func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
3136	type NoMethod FrequencyCap
3137	raw := NoMethod(*s)
3138	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3139}
3140
3141// GuaranteedFixedPriceTerms: Terms for Programmatic Guaranteed Deals.
3142type GuaranteedFixedPriceTerms struct {
3143	// FixedPrices: Fixed price for the specified buyer.
3144	FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"`
3145
3146	// GuaranteedImpressions: Guaranteed impressions as a percentage. This
3147	// is the percentage
3148	// of guaranteed looks that the buyer is guaranteeing to buy.
3149	GuaranteedImpressions int64 `json:"guaranteedImpressions,omitempty,string"`
3150
3151	// GuaranteedLooks: Count of guaranteed looks. Required for deal,
3152	// optional for product.
3153	GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"`
3154
3155	// MinimumDailyLooks: Daily minimum looks for CPD deal types.
3156	MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"`
3157
3158	// ForceSendFields is a list of field names (e.g. "FixedPrices") to
3159	// unconditionally include in API requests. By default, fields with
3160	// empty values are omitted from API requests. However, any non-pointer,
3161	// non-interface field appearing in ForceSendFields will be sent to the
3162	// server regardless of whether the field is empty or not. This may be
3163	// used to include empty fields in Patch requests.
3164	ForceSendFields []string `json:"-"`
3165
3166	// NullFields is a list of field names (e.g. "FixedPrices") to include
3167	// in API requests with the JSON null value. By default, fields with
3168	// empty values are omitted from API requests. However, any field with
3169	// an empty value appearing in NullFields will be sent to the server as
3170	// null. It is an error if a field in this list has a non-empty value.
3171	// This may be used to include null fields in Patch requests.
3172	NullFields []string `json:"-"`
3173}
3174
3175func (s *GuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) {
3176	type NoMethod GuaranteedFixedPriceTerms
3177	raw := NoMethod(*s)
3178	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3179}
3180
3181// HtmlContent: HTML content for a creative.
3182type HtmlContent struct {
3183	// Height: The height of the HTML snippet in pixels.
3184	Height int64 `json:"height,omitempty"`
3185
3186	// Snippet: The HTML snippet that displays the ad when inserted in the
3187	// web page.
3188	Snippet string `json:"snippet,omitempty"`
3189
3190	// Width: The width of the HTML snippet in pixels.
3191	Width int64 `json:"width,omitempty"`
3192
3193	// ForceSendFields is a list of field names (e.g. "Height") to
3194	// unconditionally include in API requests. By default, fields with
3195	// empty values are omitted from API requests. However, any non-pointer,
3196	// non-interface field appearing in ForceSendFields will be sent to the
3197	// server regardless of whether the field is empty or not. This may be
3198	// used to include empty fields in Patch requests.
3199	ForceSendFields []string `json:"-"`
3200
3201	// NullFields is a list of field names (e.g. "Height") to include in API
3202	// requests with the JSON null value. By default, fields with empty
3203	// values are omitted from API requests. However, any field with an
3204	// empty value appearing in NullFields will be sent to the server as
3205	// null. It is an error if a field in this list has a non-empty value.
3206	// This may be used to include null fields in Patch requests.
3207	NullFields []string `json:"-"`
3208}
3209
3210func (s *HtmlContent) MarshalJSON() ([]byte, error) {
3211	type NoMethod HtmlContent
3212	raw := NoMethod(*s)
3213	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3214}
3215
3216// Image: An image resource. You may provide a larger image than was
3217// requested,
3218// so long as the aspect ratio is preserved.
3219type Image struct {
3220	// Height: Image height in pixels.
3221	Height int64 `json:"height,omitempty"`
3222
3223	// Url: The URL of the image.
3224	Url string `json:"url,omitempty"`
3225
3226	// Width: Image width in pixels.
3227	Width int64 `json:"width,omitempty"`
3228
3229	// ForceSendFields is a list of field names (e.g. "Height") to
3230	// unconditionally include in API requests. By default, fields with
3231	// empty values are omitted from API requests. However, any non-pointer,
3232	// non-interface field appearing in ForceSendFields will be sent to the
3233	// server regardless of whether the field is empty or not. This may be
3234	// used to include empty fields in Patch requests.
3235	ForceSendFields []string `json:"-"`
3236
3237	// NullFields is a list of field names (e.g. "Height") to include in API
3238	// requests with the JSON null value. By default, fields with empty
3239	// values are omitted from API requests. However, any field with an
3240	// empty value appearing in NullFields will be sent to the server as
3241	// null. It is an error if a field in this list has a non-empty value.
3242	// This may be used to include null fields in Patch requests.
3243	NullFields []string `json:"-"`
3244}
3245
3246func (s *Image) MarshalJSON() ([]byte, error) {
3247	type NoMethod Image
3248	raw := NoMethod(*s)
3249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3250}
3251
3252// ImpressionMetricsRow: The set of metrics that are measured in numbers
3253// of impressions, representing
3254// how many impressions with the specified dimension values were
3255// considered
3256// eligible at each stage of the bidding funnel.
3257type ImpressionMetricsRow struct {
3258	// AvailableImpressions: The number of impressions available to the
3259	// buyer on Ad Exchange.
3260	// In some cases this value may be unavailable.
3261	AvailableImpressions *MetricValue `json:"availableImpressions,omitempty"`
3262
3263	// BidRequests: The number of impressions for which Ad Exchange sent the
3264	// buyer a bid
3265	// request.
3266	BidRequests *MetricValue `json:"bidRequests,omitempty"`
3267
3268	// InventoryMatches: The number of impressions that match the buyer's
3269	// inventory pretargeting.
3270	InventoryMatches *MetricValue `json:"inventoryMatches,omitempty"`
3271
3272	// ResponsesWithBids: The number of impressions for which Ad Exchange
3273	// received a response from
3274	// the buyer that contained at least one applicable bid.
3275	ResponsesWithBids *MetricValue `json:"responsesWithBids,omitempty"`
3276
3277	// RowDimensions: The values of all dimensions associated with metric
3278	// values in this row.
3279	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
3280
3281	// SuccessfulResponses: The number of impressions for which the buyer
3282	// successfully sent a response
3283	// to Ad Exchange.
3284	SuccessfulResponses *MetricValue `json:"successfulResponses,omitempty"`
3285
3286	// ForceSendFields is a list of field names (e.g.
3287	// "AvailableImpressions") to unconditionally include in API requests.
3288	// By default, fields with empty values are omitted from API requests.
3289	// However, any non-pointer, non-interface field appearing in
3290	// ForceSendFields will be sent to the server regardless of whether the
3291	// field is empty or not. This may be used to include empty fields in
3292	// Patch requests.
3293	ForceSendFields []string `json:"-"`
3294
3295	// NullFields is a list of field names (e.g. "AvailableImpressions") to
3296	// include in API requests with the JSON null value. By default, fields
3297	// with empty values are omitted from API requests. However, any field
3298	// with an empty value appearing in NullFields will be sent to the
3299	// server as null. It is an error if a field in this list has a
3300	// non-empty value. This may be used to include null fields in Patch
3301	// requests.
3302	NullFields []string `json:"-"`
3303}
3304
3305func (s *ImpressionMetricsRow) MarshalJSON() ([]byte, error) {
3306	type NoMethod ImpressionMetricsRow
3307	raw := NoMethod(*s)
3308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3309}
3310
3311// InventorySizeTargeting: Represents the size of an ad unit that can be
3312// targeted on an ad
3313// request. It only applies to Private Auction, AdX Preferred Deals
3314// and
3315// Auction Packages. This targeting does not apply to Programmatic
3316// Guaranteed
3317// and Preferred Deals in Ad Manager.
3318type InventorySizeTargeting struct {
3319	// ExcludedInventorySizes: A list of inventory sizes to be excluded.
3320	ExcludedInventorySizes []*AdSize `json:"excludedInventorySizes,omitempty"`
3321
3322	// TargetedInventorySizes: A list of inventory sizes to be included.
3323	TargetedInventorySizes []*AdSize `json:"targetedInventorySizes,omitempty"`
3324
3325	// ForceSendFields is a list of field names (e.g.
3326	// "ExcludedInventorySizes") to unconditionally include in API requests.
3327	// By default, fields with empty values are omitted from API requests.
3328	// However, any non-pointer, non-interface field appearing in
3329	// ForceSendFields will be sent to the server regardless of whether the
3330	// field is empty or not. This may be used to include empty fields in
3331	// Patch requests.
3332	ForceSendFields []string `json:"-"`
3333
3334	// NullFields is a list of field names (e.g. "ExcludedInventorySizes")
3335	// to include in API requests with the JSON null value. By default,
3336	// fields with empty values are omitted from API requests. However, any
3337	// field with an empty value appearing in NullFields will be sent to the
3338	// server as null. It is an error if a field in this list has a
3339	// non-empty value. This may be used to include null fields in Patch
3340	// requests.
3341	NullFields []string `json:"-"`
3342}
3343
3344func (s *InventorySizeTargeting) MarshalJSON() ([]byte, error) {
3345	type NoMethod InventorySizeTargeting
3346	raw := NoMethod(*s)
3347	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3348}
3349
3350// ListBidMetricsResponse: Response message for listing the metrics that
3351// are measured in number of bids.
3352type ListBidMetricsResponse struct {
3353	// BidMetricsRows: List of rows, each containing a set of bid metrics.
3354	BidMetricsRows []*BidMetricsRow `json:"bidMetricsRows,omitempty"`
3355
3356	// NextPageToken: A token to retrieve the next page of results.
3357	// Pass this value in the
3358	// ListBidMetricsRequest.pageToken
3359	// field in the subsequent call to the bidMetrics.list
3360	// method to retrieve the next page of results.
3361	NextPageToken string `json:"nextPageToken,omitempty"`
3362
3363	// ServerResponse contains the HTTP response code and headers from the
3364	// server.
3365	googleapi.ServerResponse `json:"-"`
3366
3367	// ForceSendFields is a list of field names (e.g. "BidMetricsRows") to
3368	// unconditionally include in API requests. By default, fields with
3369	// empty values are omitted from API requests. However, any non-pointer,
3370	// non-interface field appearing in ForceSendFields will be sent to the
3371	// server regardless of whether the field is empty or not. This may be
3372	// used to include empty fields in Patch requests.
3373	ForceSendFields []string `json:"-"`
3374
3375	// NullFields is a list of field names (e.g. "BidMetricsRows") to
3376	// include in API requests with the JSON null value. By default, fields
3377	// with empty values are omitted from API requests. However, any field
3378	// with an empty value appearing in NullFields will be sent to the
3379	// server as null. It is an error if a field in this list has a
3380	// non-empty value. This may be used to include null fields in Patch
3381	// requests.
3382	NullFields []string `json:"-"`
3383}
3384
3385func (s *ListBidMetricsResponse) MarshalJSON() ([]byte, error) {
3386	type NoMethod ListBidMetricsResponse
3387	raw := NoMethod(*s)
3388	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3389}
3390
3391// ListBidResponseErrorsResponse: Response message for listing all
3392// reasons that bid responses resulted in an
3393// error.
3394type ListBidResponseErrorsResponse struct {
3395	// CalloutStatusRows: List of rows, with counts of bid responses
3396	// aggregated by callout status.
3397	CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"`
3398
3399	// NextPageToken: A token to retrieve the next page of results.
3400	// Pass this value in the
3401	// ListBidResponseErrorsRequest.pageToken
3402	// field in the subsequent call to the bidResponseErrors.list
3403	// method to retrieve the next page of results.
3404	NextPageToken string `json:"nextPageToken,omitempty"`
3405
3406	// ServerResponse contains the HTTP response code and headers from the
3407	// server.
3408	googleapi.ServerResponse `json:"-"`
3409
3410	// ForceSendFields is a list of field names (e.g. "CalloutStatusRows")
3411	// to unconditionally include in API requests. By default, fields with
3412	// empty values are omitted from API requests. However, any non-pointer,
3413	// non-interface field appearing in ForceSendFields will be sent to the
3414	// server regardless of whether the field is empty or not. This may be
3415	// used to include empty fields in Patch requests.
3416	ForceSendFields []string `json:"-"`
3417
3418	// NullFields is a list of field names (e.g. "CalloutStatusRows") to
3419	// include in API requests with the JSON null value. By default, fields
3420	// with empty values are omitted from API requests. However, any field
3421	// with an empty value appearing in NullFields will be sent to the
3422	// server as null. It is an error if a field in this list has a
3423	// non-empty value. This may be used to include null fields in Patch
3424	// requests.
3425	NullFields []string `json:"-"`
3426}
3427
3428func (s *ListBidResponseErrorsResponse) MarshalJSON() ([]byte, error) {
3429	type NoMethod ListBidResponseErrorsResponse
3430	raw := NoMethod(*s)
3431	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3432}
3433
3434// ListBidResponsesWithoutBidsResponse: Response message for listing all
3435// reasons that bid responses were considered
3436// to have no applicable bids.
3437type ListBidResponsesWithoutBidsResponse struct {
3438	// BidResponseWithoutBidsStatusRows: List of rows, with counts of bid
3439	// responses without bids aggregated by
3440	// status.
3441	BidResponseWithoutBidsStatusRows []*BidResponseWithoutBidsStatusRow `json:"bidResponseWithoutBidsStatusRows,omitempty"`
3442
3443	// NextPageToken: A token to retrieve the next page of results.
3444	// Pass this value in
3445	// the
3446	// ListBidResponsesWithoutBidsRequest.pageToken
3447	// field in the subsequent call to the
3448	// bidResponsesWithoutBids.list
3449	// method to retrieve the next page of results.
3450	NextPageToken string `json:"nextPageToken,omitempty"`
3451
3452	// ServerResponse contains the HTTP response code and headers from the
3453	// server.
3454	googleapi.ServerResponse `json:"-"`
3455
3456	// ForceSendFields is a list of field names (e.g.
3457	// "BidResponseWithoutBidsStatusRows") to unconditionally include in API
3458	// requests. By default, fields with empty values are omitted from API
3459	// requests. However, any non-pointer, non-interface field appearing in
3460	// ForceSendFields will be sent to the server regardless of whether the
3461	// field is empty or not. This may be used to include empty fields in
3462	// Patch requests.
3463	ForceSendFields []string `json:"-"`
3464
3465	// NullFields is a list of field names (e.g.
3466	// "BidResponseWithoutBidsStatusRows") to include in API requests with
3467	// the JSON null value. By default, fields with empty values are omitted
3468	// from API requests. However, any field with an empty value appearing
3469	// in NullFields will be sent to the server as null. It is an error if a
3470	// field in this list has a non-empty value. This may be used to include
3471	// null fields in Patch requests.
3472	NullFields []string `json:"-"`
3473}
3474
3475func (s *ListBidResponsesWithoutBidsResponse) MarshalJSON() ([]byte, error) {
3476	type NoMethod ListBidResponsesWithoutBidsResponse
3477	raw := NoMethod(*s)
3478	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3479}
3480
3481type ListClientUserInvitationsResponse struct {
3482	// Invitations: The returned list of client users.
3483	Invitations []*ClientUserInvitation `json:"invitations,omitempty"`
3484
3485	// NextPageToken: A token to retrieve the next page of results.
3486	// Pass this value in
3487	// the
3488	// ListClientUserInvitationsRequest.pageToken
3489	// field in the subsequent call to the
3490	// clients.invitations.list
3491	// method to retrieve the next
3492	// page of results.
3493	NextPageToken string `json:"nextPageToken,omitempty"`
3494
3495	// ServerResponse contains the HTTP response code and headers from the
3496	// server.
3497	googleapi.ServerResponse `json:"-"`
3498
3499	// ForceSendFields is a list of field names (e.g. "Invitations") to
3500	// unconditionally include in API requests. By default, fields with
3501	// empty values are omitted from API requests. However, any non-pointer,
3502	// non-interface field appearing in ForceSendFields will be sent to the
3503	// server regardless of whether the field is empty or not. This may be
3504	// used to include empty fields in Patch requests.
3505	ForceSendFields []string `json:"-"`
3506
3507	// NullFields is a list of field names (e.g. "Invitations") to include
3508	// in API requests with the JSON null value. By default, fields with
3509	// empty values are omitted from API requests. However, any field with
3510	// an empty value appearing in NullFields will be sent to the server as
3511	// null. It is an error if a field in this list has a non-empty value.
3512	// This may be used to include null fields in Patch requests.
3513	NullFields []string `json:"-"`
3514}
3515
3516func (s *ListClientUserInvitationsResponse) MarshalJSON() ([]byte, error) {
3517	type NoMethod ListClientUserInvitationsResponse
3518	raw := NoMethod(*s)
3519	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3520}
3521
3522type ListClientUsersResponse struct {
3523	// NextPageToken: A token to retrieve the next page of results.
3524	// Pass this value in the
3525	// ListClientUsersRequest.pageToken
3526	// field in the subsequent call to the
3527	// clients.invitations.list
3528	// method to retrieve the next
3529	// page of results.
3530	NextPageToken string `json:"nextPageToken,omitempty"`
3531
3532	// Users: The returned list of client users.
3533	Users []*ClientUser `json:"users,omitempty"`
3534
3535	// ServerResponse contains the HTTP response code and headers from the
3536	// server.
3537	googleapi.ServerResponse `json:"-"`
3538
3539	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
3540	// unconditionally include in API requests. By default, fields with
3541	// empty values are omitted from API requests. However, any non-pointer,
3542	// non-interface field appearing in ForceSendFields will be sent to the
3543	// server regardless of whether the field is empty or not. This may be
3544	// used to include empty fields in Patch requests.
3545	ForceSendFields []string `json:"-"`
3546
3547	// NullFields is a list of field names (e.g. "NextPageToken") to include
3548	// in API requests with the JSON null value. By default, fields with
3549	// empty values are omitted from API requests. However, any field with
3550	// an empty value appearing in NullFields will be sent to the server as
3551	// null. It is an error if a field in this list has a non-empty value.
3552	// This may be used to include null fields in Patch requests.
3553	NullFields []string `json:"-"`
3554}
3555
3556func (s *ListClientUsersResponse) MarshalJSON() ([]byte, error) {
3557	type NoMethod ListClientUsersResponse
3558	raw := NoMethod(*s)
3559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3560}
3561
3562type ListClientsResponse struct {
3563	// Clients: The returned list of clients.
3564	Clients []*Client `json:"clients,omitempty"`
3565
3566	// NextPageToken: A token to retrieve the next page of results.
3567	// Pass this value in the
3568	// ListClientsRequest.pageToken
3569	// field in the subsequent call to the
3570	// accounts.clients.list
3571	// method to retrieve the next page of results.
3572	NextPageToken string `json:"nextPageToken,omitempty"`
3573
3574	// ServerResponse contains the HTTP response code and headers from the
3575	// server.
3576	googleapi.ServerResponse `json:"-"`
3577
3578	// ForceSendFields is a list of field names (e.g. "Clients") to
3579	// unconditionally include in API requests. By default, fields with
3580	// empty values are omitted from API requests. However, any non-pointer,
3581	// non-interface field appearing in ForceSendFields will be sent to the
3582	// server regardless of whether the field is empty or not. This may be
3583	// used to include empty fields in Patch requests.
3584	ForceSendFields []string `json:"-"`
3585
3586	// NullFields is a list of field names (e.g. "Clients") to include in
3587	// API requests with the JSON null value. By default, fields with empty
3588	// values are omitted from API requests. However, any field with an
3589	// empty value appearing in NullFields will be sent to the server as
3590	// null. It is an error if a field in this list has a non-empty value.
3591	// This may be used to include null fields in Patch requests.
3592	NullFields []string `json:"-"`
3593}
3594
3595func (s *ListClientsResponse) MarshalJSON() ([]byte, error) {
3596	type NoMethod ListClientsResponse
3597	raw := NoMethod(*s)
3598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3599}
3600
3601// ListCreativeStatusBreakdownByCreativeResponse: Response message for
3602// listing all creatives associated with a given filtered
3603// bid reason.
3604type ListCreativeStatusBreakdownByCreativeResponse struct {
3605	// FilteredBidCreativeRows: List of rows, with counts of bids with a
3606	// given creative status aggregated
3607	// by creative.
3608	FilteredBidCreativeRows []*FilteredBidCreativeRow `json:"filteredBidCreativeRows,omitempty"`
3609
3610	// NextPageToken: A token to retrieve the next page of results.
3611	// Pass this value in
3612	// the
3613	// ListCreativeStatusBreakdownByCreativeRequest.pageToken
3614	// field in the subsequent call to the
3615	// filteredBids.creatives.list
3616	// method to retrieve the next page of results.
3617	NextPageToken string `json:"nextPageToken,omitempty"`
3618
3619	// ServerResponse contains the HTTP response code and headers from the
3620	// server.
3621	googleapi.ServerResponse `json:"-"`
3622
3623	// ForceSendFields is a list of field names (e.g.
3624	// "FilteredBidCreativeRows") to unconditionally include in API
3625	// requests. By default, fields with empty values are omitted from API
3626	// requests. However, any non-pointer, non-interface field appearing in
3627	// ForceSendFields will be sent to the server regardless of whether the
3628	// field is empty or not. This may be used to include empty fields in
3629	// Patch requests.
3630	ForceSendFields []string `json:"-"`
3631
3632	// NullFields is a list of field names (e.g. "FilteredBidCreativeRows")
3633	// to include in API requests with the JSON null value. By default,
3634	// fields with empty values are omitted from API requests. However, any
3635	// field with an empty value appearing in NullFields will be sent to the
3636	// server as null. It is an error if a field in this list has a
3637	// non-empty value. This may be used to include null fields in Patch
3638	// requests.
3639	NullFields []string `json:"-"`
3640}
3641
3642func (s *ListCreativeStatusBreakdownByCreativeResponse) MarshalJSON() ([]byte, error) {
3643	type NoMethod ListCreativeStatusBreakdownByCreativeResponse
3644	raw := NoMethod(*s)
3645	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3646}
3647
3648// ListCreativeStatusBreakdownByDetailResponse: Response message for
3649// listing all details associated with a given filtered bid
3650// reason.
3651type ListCreativeStatusBreakdownByDetailResponse struct {
3652	// DetailType: The type of detail that the detail IDs represent.
3653	//
3654	// Possible values:
3655	//   "DETAIL_TYPE_UNSPECIFIED" - A placeholder for an undefined
3656	// status.
3657	// This value will never be returned in responses.
3658	//   "CREATIVE_ATTRIBUTE" - Indicates that the detail ID refers to a
3659	// creative attribute;
3660	// see
3661	// [publisher-excludable-creative-attributes](https://developers.goog
3662	// le.com/authorized-buyers/rtb/downloads/publisher-excludable-creative-a
3663	// ttributes).
3664	//   "VENDOR" - Indicates that the detail ID refers to a vendor;
3665	// see
3666	// [vendors](https://developers.google.com/authorized-buyers/rtb/down
3667	// loads/vendors).
3668	//   "SENSITIVE_CATEGORY" - Indicates that the detail ID refers to a
3669	// sensitive category;
3670	// see
3671	// [ad-sensitive-categories](https://developers.google.com/authorized
3672	// -buyers/rtb/downloads/ad-sensitive-categories).
3673	//   "PRODUCT_CATEGORY" - Indicates that the detail ID refers to a
3674	// product category;
3675	// see
3676	// [ad-product-categories](https://developers.google.com/authorized-b
3677	// uyers/rtb/downloads/ad-product-categories).
3678	//   "DISAPPROVAL_REASON" - Indicates that the detail ID refers to a
3679	// disapproval reason; see
3680	// DisapprovalReason enum
3681	// in
3682	// [snippet-status-report-proto](https://developers.google.com/authori
3683	// zed-buyers/rtb/downloads/snippet-status-report-proto).
3684	DetailType string `json:"detailType,omitempty"`
3685
3686	// FilteredBidDetailRows: List of rows, with counts of bids with a given
3687	// creative status aggregated
3688	// by detail.
3689	FilteredBidDetailRows []*FilteredBidDetailRow `json:"filteredBidDetailRows,omitempty"`
3690
3691	// NextPageToken: A token to retrieve the next page of results.
3692	// Pass this value in
3693	// the
3694	// ListCreativeStatusBreakdownByDetailRequest.pageToken
3695	// field in the subsequent call to the filteredBids.details.list
3696	// method to retrieve the next page of results.
3697	NextPageToken string `json:"nextPageToken,omitempty"`
3698
3699	// ServerResponse contains the HTTP response code and headers from the
3700	// server.
3701	googleapi.ServerResponse `json:"-"`
3702
3703	// ForceSendFields is a list of field names (e.g. "DetailType") to
3704	// unconditionally include in API requests. By default, fields with
3705	// empty values are omitted from API requests. However, any non-pointer,
3706	// non-interface field appearing in ForceSendFields will be sent to the
3707	// server regardless of whether the field is empty or not. This may be
3708	// used to include empty fields in Patch requests.
3709	ForceSendFields []string `json:"-"`
3710
3711	// NullFields is a list of field names (e.g. "DetailType") to include in
3712	// API requests with the JSON null value. By default, fields with empty
3713	// values are omitted from API requests. However, any field with an
3714	// empty value appearing in NullFields will be sent to the server as
3715	// null. It is an error if a field in this list has a non-empty value.
3716	// This may be used to include null fields in Patch requests.
3717	NullFields []string `json:"-"`
3718}
3719
3720func (s *ListCreativeStatusBreakdownByDetailResponse) MarshalJSON() ([]byte, error) {
3721	type NoMethod ListCreativeStatusBreakdownByDetailResponse
3722	raw := NoMethod(*s)
3723	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3724}
3725
3726// ListCreativesResponse: A response for listing creatives.
3727type ListCreativesResponse struct {
3728	// Creatives: The list of creatives.
3729	Creatives []*Creative `json:"creatives,omitempty"`
3730
3731	// NextPageToken: A token to retrieve the next page of results.
3732	// Pass this value in the
3733	// ListCreativesRequest.page_token
3734	// field in the subsequent call to `ListCreatives` method to retrieve
3735	// the next
3736	// page of results.
3737	NextPageToken string `json:"nextPageToken,omitempty"`
3738
3739	// ServerResponse contains the HTTP response code and headers from the
3740	// server.
3741	googleapi.ServerResponse `json:"-"`
3742
3743	// ForceSendFields is a list of field names (e.g. "Creatives") to
3744	// unconditionally include in API requests. By default, fields with
3745	// empty values are omitted from API requests. However, any non-pointer,
3746	// non-interface field appearing in ForceSendFields will be sent to the
3747	// server regardless of whether the field is empty or not. This may be
3748	// used to include empty fields in Patch requests.
3749	ForceSendFields []string `json:"-"`
3750
3751	// NullFields is a list of field names (e.g. "Creatives") to include in
3752	// API requests with the JSON null value. By default, fields with empty
3753	// values are omitted from API requests. However, any field with an
3754	// empty value appearing in NullFields will be sent to the server as
3755	// null. It is an error if a field in this list has a non-empty value.
3756	// This may be used to include null fields in Patch requests.
3757	NullFields []string `json:"-"`
3758}
3759
3760func (s *ListCreativesResponse) MarshalJSON() ([]byte, error) {
3761	type NoMethod ListCreativesResponse
3762	raw := NoMethod(*s)
3763	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3764}
3765
3766// ListDealAssociationsResponse: A response for listing creative and
3767// deal associations
3768type ListDealAssociationsResponse struct {
3769	// Associations: The list of associations.
3770	Associations []*CreativeDealAssociation `json:"associations,omitempty"`
3771
3772	// NextPageToken: A token to retrieve the next page of results.
3773	// Pass this value in the
3774	// ListDealAssociationsRequest.page_token
3775	// field in the subsequent call to 'ListDealAssociation' method to
3776	// retrieve
3777	// the next page of results.
3778	NextPageToken string `json:"nextPageToken,omitempty"`
3779
3780	// ServerResponse contains the HTTP response code and headers from the
3781	// server.
3782	googleapi.ServerResponse `json:"-"`
3783
3784	// ForceSendFields is a list of field names (e.g. "Associations") to
3785	// unconditionally include in API requests. By default, fields with
3786	// empty values are omitted from API requests. However, any non-pointer,
3787	// non-interface field appearing in ForceSendFields will be sent to the
3788	// server regardless of whether the field is empty or not. This may be
3789	// used to include empty fields in Patch requests.
3790	ForceSendFields []string `json:"-"`
3791
3792	// NullFields is a list of field names (e.g. "Associations") to include
3793	// in API requests with the JSON null value. By default, fields with
3794	// empty values are omitted from API requests. However, any field with
3795	// an empty value appearing in NullFields will be sent to the server as
3796	// null. It is an error if a field in this list has a non-empty value.
3797	// This may be used to include null fields in Patch requests.
3798	NullFields []string `json:"-"`
3799}
3800
3801func (s *ListDealAssociationsResponse) MarshalJSON() ([]byte, error) {
3802	type NoMethod ListDealAssociationsResponse
3803	raw := NoMethod(*s)
3804	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3805}
3806
3807// ListFilterSetsResponse: Response message for listing filter sets.
3808type ListFilterSetsResponse struct {
3809	// FilterSets: The filter sets belonging to the buyer.
3810	FilterSets []*FilterSet `json:"filterSets,omitempty"`
3811
3812	// NextPageToken: A token to retrieve the next page of results.
3813	// Pass this value in the
3814	// ListFilterSetsRequest.pageToken
3815	// field in the subsequent call to the
3816	// accounts.filterSets.list
3817	// method to retrieve the next page of results.
3818	NextPageToken string `json:"nextPageToken,omitempty"`
3819
3820	// ServerResponse contains the HTTP response code and headers from the
3821	// server.
3822	googleapi.ServerResponse `json:"-"`
3823
3824	// ForceSendFields is a list of field names (e.g. "FilterSets") to
3825	// unconditionally include in API requests. By default, fields with
3826	// empty values are omitted from API requests. However, any non-pointer,
3827	// non-interface field appearing in ForceSendFields will be sent to the
3828	// server regardless of whether the field is empty or not. This may be
3829	// used to include empty fields in Patch requests.
3830	ForceSendFields []string `json:"-"`
3831
3832	// NullFields is a list of field names (e.g. "FilterSets") to include in
3833	// API requests with the JSON null value. By default, fields with empty
3834	// values are omitted from API requests. However, any field with an
3835	// empty value appearing in NullFields will be sent to the server as
3836	// null. It is an error if a field in this list has a non-empty value.
3837	// This may be used to include null fields in Patch requests.
3838	NullFields []string `json:"-"`
3839}
3840
3841func (s *ListFilterSetsResponse) MarshalJSON() ([]byte, error) {
3842	type NoMethod ListFilterSetsResponse
3843	raw := NoMethod(*s)
3844	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3845}
3846
3847// ListFilteredBidRequestsResponse: Response message for listing all
3848// reasons that bid requests were filtered and
3849// not sent to the buyer.
3850type ListFilteredBidRequestsResponse struct {
3851	// CalloutStatusRows: List of rows, with counts of filtered bid requests
3852	// aggregated by callout
3853	// status.
3854	CalloutStatusRows []*CalloutStatusRow `json:"calloutStatusRows,omitempty"`
3855
3856	// NextPageToken: A token to retrieve the next page of results.
3857	// Pass this value in the
3858	// ListFilteredBidRequestsRequest.pageToken
3859	// field in the subsequent call to the filteredBidRequests.list
3860	// method to retrieve the next page of results.
3861	NextPageToken string `json:"nextPageToken,omitempty"`
3862
3863	// ServerResponse contains the HTTP response code and headers from the
3864	// server.
3865	googleapi.ServerResponse `json:"-"`
3866
3867	// ForceSendFields is a list of field names (e.g. "CalloutStatusRows")
3868	// to unconditionally include in API requests. By default, fields with
3869	// empty values are omitted from API requests. However, any non-pointer,
3870	// non-interface field appearing in ForceSendFields will be sent to the
3871	// server regardless of whether the field is empty or not. This may be
3872	// used to include empty fields in Patch requests.
3873	ForceSendFields []string `json:"-"`
3874
3875	// NullFields is a list of field names (e.g. "CalloutStatusRows") to
3876	// include in API requests with the JSON null value. By default, fields
3877	// with empty values are omitted from API requests. However, any field
3878	// with an empty value appearing in NullFields will be sent to the
3879	// server as null. It is an error if a field in this list has a
3880	// non-empty value. This may be used to include null fields in Patch
3881	// requests.
3882	NullFields []string `json:"-"`
3883}
3884
3885func (s *ListFilteredBidRequestsResponse) MarshalJSON() ([]byte, error) {
3886	type NoMethod ListFilteredBidRequestsResponse
3887	raw := NoMethod(*s)
3888	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3889}
3890
3891// ListFilteredBidsResponse: Response message for listing all reasons
3892// that bids were filtered from the
3893// auction.
3894type ListFilteredBidsResponse struct {
3895	// CreativeStatusRows: List of rows, with counts of filtered bids
3896	// aggregated by filtering reason
3897	// (i.e. creative status).
3898	CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"`
3899
3900	// NextPageToken: A token to retrieve the next page of results.
3901	// Pass this value in the
3902	// ListFilteredBidsRequest.pageToken
3903	// field in the subsequent call to the filteredBids.list
3904	// method to retrieve the next page of results.
3905	NextPageToken string `json:"nextPageToken,omitempty"`
3906
3907	// ServerResponse contains the HTTP response code and headers from the
3908	// server.
3909	googleapi.ServerResponse `json:"-"`
3910
3911	// ForceSendFields is a list of field names (e.g. "CreativeStatusRows")
3912	// to unconditionally include in API requests. By default, fields with
3913	// empty values are omitted from API requests. However, any non-pointer,
3914	// non-interface field appearing in ForceSendFields will be sent to the
3915	// server regardless of whether the field is empty or not. This may be
3916	// used to include empty fields in Patch requests.
3917	ForceSendFields []string `json:"-"`
3918
3919	// NullFields is a list of field names (e.g. "CreativeStatusRows") to
3920	// include in API requests with the JSON null value. By default, fields
3921	// with empty values are omitted from API requests. However, any field
3922	// with an empty value appearing in NullFields will be sent to the
3923	// server as null. It is an error if a field in this list has a
3924	// non-empty value. This may be used to include null fields in Patch
3925	// requests.
3926	NullFields []string `json:"-"`
3927}
3928
3929func (s *ListFilteredBidsResponse) MarshalJSON() ([]byte, error) {
3930	type NoMethod ListFilteredBidsResponse
3931	raw := NoMethod(*s)
3932	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3933}
3934
3935// ListImpressionMetricsResponse: Response message for listing the
3936// metrics that are measured in number of
3937// impressions.
3938type ListImpressionMetricsResponse struct {
3939	// ImpressionMetricsRows: List of rows, each containing a set of
3940	// impression metrics.
3941	ImpressionMetricsRows []*ImpressionMetricsRow `json:"impressionMetricsRows,omitempty"`
3942
3943	// NextPageToken: A token to retrieve the next page of results.
3944	// Pass this value in the
3945	// ListImpressionMetricsRequest.pageToken
3946	// field in the subsequent call to the impressionMetrics.list
3947	// method to retrieve the next page of results.
3948	NextPageToken string `json:"nextPageToken,omitempty"`
3949
3950	// ServerResponse contains the HTTP response code and headers from the
3951	// server.
3952	googleapi.ServerResponse `json:"-"`
3953
3954	// ForceSendFields is a list of field names (e.g.
3955	// "ImpressionMetricsRows") to unconditionally include in API requests.
3956	// By default, fields with empty values are omitted from API requests.
3957	// However, any non-pointer, non-interface field appearing in
3958	// ForceSendFields will be sent to the server regardless of whether the
3959	// field is empty or not. This may be used to include empty fields in
3960	// Patch requests.
3961	ForceSendFields []string `json:"-"`
3962
3963	// NullFields is a list of field names (e.g. "ImpressionMetricsRows") to
3964	// include in API requests with the JSON null value. By default, fields
3965	// with empty values are omitted from API requests. However, any field
3966	// with an empty value appearing in NullFields will be sent to the
3967	// server as null. It is an error if a field in this list has a
3968	// non-empty value. This may be used to include null fields in Patch
3969	// requests.
3970	NullFields []string `json:"-"`
3971}
3972
3973func (s *ListImpressionMetricsResponse) MarshalJSON() ([]byte, error) {
3974	type NoMethod ListImpressionMetricsResponse
3975	raw := NoMethod(*s)
3976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3977}
3978
3979// ListLosingBidsResponse: Response message for listing all reasons that
3980// bids lost in the auction.
3981type ListLosingBidsResponse struct {
3982	// CreativeStatusRows: List of rows, with counts of losing bids
3983	// aggregated by loss reason (i.e.
3984	// creative status).
3985	CreativeStatusRows []*CreativeStatusRow `json:"creativeStatusRows,omitempty"`
3986
3987	// NextPageToken: A token to retrieve the next page of results.
3988	// Pass this value in the
3989	// ListLosingBidsRequest.pageToken
3990	// field in the subsequent call to the losingBids.list
3991	// method to retrieve the next page of results.
3992	NextPageToken string `json:"nextPageToken,omitempty"`
3993
3994	// ServerResponse contains the HTTP response code and headers from the
3995	// server.
3996	googleapi.ServerResponse `json:"-"`
3997
3998	// ForceSendFields is a list of field names (e.g. "CreativeStatusRows")
3999	// to unconditionally include in API requests. By default, fields with
4000	// empty values are omitted from API requests. However, any non-pointer,
4001	// non-interface field appearing in ForceSendFields will be sent to the
4002	// server regardless of whether the field is empty or not. This may be
4003	// used to include empty fields in Patch requests.
4004	ForceSendFields []string `json:"-"`
4005
4006	// NullFields is a list of field names (e.g. "CreativeStatusRows") to
4007	// include in API requests with the JSON null value. By default, fields
4008	// with empty values are omitted from API requests. However, any field
4009	// with an empty value appearing in NullFields will be sent to the
4010	// server as null. It is an error if a field in this list has a
4011	// non-empty value. This may be used to include null fields in Patch
4012	// requests.
4013	NullFields []string `json:"-"`
4014}
4015
4016func (s *ListLosingBidsResponse) MarshalJSON() ([]byte, error) {
4017	type NoMethod ListLosingBidsResponse
4018	raw := NoMethod(*s)
4019	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4020}
4021
4022// ListNonBillableWinningBidsResponse: Response message for listing all
4023// reasons for which a buyer was not billed for
4024// a winning bid.
4025type ListNonBillableWinningBidsResponse struct {
4026	// NextPageToken: A token to retrieve the next page of results.
4027	// Pass this value in
4028	// the
4029	// ListNonBillableWinningBidsRequest.pageToken
4030	// field in the subsequent call to the
4031	// nonBillableWinningBids.list
4032	// method to retrieve the next page of results.
4033	NextPageToken string `json:"nextPageToken,omitempty"`
4034
4035	// NonBillableWinningBidStatusRows: List of rows, with counts of bids
4036	// not billed aggregated by reason.
4037	NonBillableWinningBidStatusRows []*NonBillableWinningBidStatusRow `json:"nonBillableWinningBidStatusRows,omitempty"`
4038
4039	// ServerResponse contains the HTTP response code and headers from the
4040	// server.
4041	googleapi.ServerResponse `json:"-"`
4042
4043	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
4044	// unconditionally include in API requests. By default, fields with
4045	// empty values are omitted from API requests. However, any non-pointer,
4046	// non-interface field appearing in ForceSendFields will be sent to the
4047	// server regardless of whether the field is empty or not. This may be
4048	// used to include empty fields in Patch requests.
4049	ForceSendFields []string `json:"-"`
4050
4051	// NullFields is a list of field names (e.g. "NextPageToken") to include
4052	// in API requests with the JSON null value. By default, fields with
4053	// empty values are omitted from API requests. However, any field with
4054	// an empty value appearing in NullFields will be sent to the server as
4055	// null. It is an error if a field in this list has a non-empty value.
4056	// This may be used to include null fields in Patch requests.
4057	NullFields []string `json:"-"`
4058}
4059
4060func (s *ListNonBillableWinningBidsResponse) MarshalJSON() ([]byte, error) {
4061	type NoMethod ListNonBillableWinningBidsResponse
4062	raw := NoMethod(*s)
4063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4064}
4065
4066// ListProductsResponse: Response message for listing products visible
4067// to the buyer.
4068type ListProductsResponse struct {
4069	// NextPageToken: List pagination support.
4070	NextPageToken string `json:"nextPageToken,omitempty"`
4071
4072	// Products: The list of matching products at their head revision
4073	// number.
4074	Products []*Product `json:"products,omitempty"`
4075
4076	// ServerResponse contains the HTTP response code and headers from the
4077	// server.
4078	googleapi.ServerResponse `json:"-"`
4079
4080	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
4081	// unconditionally include in API requests. By default, fields with
4082	// empty values are omitted from API requests. However, any non-pointer,
4083	// non-interface field appearing in ForceSendFields will be sent to the
4084	// server regardless of whether the field is empty or not. This may be
4085	// used to include empty fields in Patch requests.
4086	ForceSendFields []string `json:"-"`
4087
4088	// NullFields is a list of field names (e.g. "NextPageToken") to include
4089	// in API requests with the JSON null value. By default, fields with
4090	// empty values are omitted from API requests. However, any field with
4091	// an empty value appearing in NullFields will be sent to the server as
4092	// null. It is an error if a field in this list has a non-empty value.
4093	// This may be used to include null fields in Patch requests.
4094	NullFields []string `json:"-"`
4095}
4096
4097func (s *ListProductsResponse) MarshalJSON() ([]byte, error) {
4098	type NoMethod ListProductsResponse
4099	raw := NoMethod(*s)
4100	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4101}
4102
4103// ListProposalsResponse: Response message for listing proposals.
4104type ListProposalsResponse struct {
4105	// NextPageToken: Continuation token for fetching the next page of
4106	// results.
4107	NextPageToken string `json:"nextPageToken,omitempty"`
4108
4109	// Proposals: The list of proposals.
4110	Proposals []*Proposal `json:"proposals,omitempty"`
4111
4112	// ServerResponse contains the HTTP response code and headers from the
4113	// server.
4114	googleapi.ServerResponse `json:"-"`
4115
4116	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
4117	// unconditionally include in API requests. By default, fields with
4118	// empty values are omitted from API requests. However, any non-pointer,
4119	// non-interface field appearing in ForceSendFields will be sent to the
4120	// server regardless of whether the field is empty or not. This may be
4121	// used to include empty fields in Patch requests.
4122	ForceSendFields []string `json:"-"`
4123
4124	// NullFields is a list of field names (e.g. "NextPageToken") to include
4125	// in API requests with the JSON null value. By default, fields with
4126	// empty values are omitted from API requests. However, any field with
4127	// an empty value appearing in NullFields will be sent to the server as
4128	// null. It is an error if a field in this list has a non-empty value.
4129	// This may be used to include null fields in Patch requests.
4130	NullFields []string `json:"-"`
4131}
4132
4133func (s *ListProposalsResponse) MarshalJSON() ([]byte, error) {
4134	type NoMethod ListProposalsResponse
4135	raw := NoMethod(*s)
4136	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4137}
4138
4139// ListPublisherProfilesResponse: Response message for profiles visible
4140// to the buyer.
4141type ListPublisherProfilesResponse struct {
4142	// NextPageToken: List pagination support
4143	NextPageToken string `json:"nextPageToken,omitempty"`
4144
4145	// PublisherProfiles: The list of matching publisher profiles.
4146	PublisherProfiles []*PublisherProfile `json:"publisherProfiles,omitempty"`
4147
4148	// ServerResponse contains the HTTP response code and headers from the
4149	// server.
4150	googleapi.ServerResponse `json:"-"`
4151
4152	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
4153	// unconditionally include in API requests. By default, fields with
4154	// empty values are omitted from API requests. However, any non-pointer,
4155	// non-interface field appearing in ForceSendFields will be sent to the
4156	// server regardless of whether the field is empty or not. This may be
4157	// used to include empty fields in Patch requests.
4158	ForceSendFields []string `json:"-"`
4159
4160	// NullFields is a list of field names (e.g. "NextPageToken") to include
4161	// in API requests with the JSON null value. By default, fields with
4162	// empty values are omitted from API requests. However, any field with
4163	// an empty value appearing in NullFields will be sent to the server as
4164	// null. It is an error if a field in this list has a non-empty value.
4165	// This may be used to include null fields in Patch requests.
4166	NullFields []string `json:"-"`
4167}
4168
4169func (s *ListPublisherProfilesResponse) MarshalJSON() ([]byte, error) {
4170	type NoMethod ListPublisherProfilesResponse
4171	raw := NoMethod(*s)
4172	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4173}
4174
4175// LocationContext: Output only. The Geo criteria the restriction
4176// applies to.
4177type LocationContext struct {
4178	// GeoCriteriaIds: IDs representing the geo location for this
4179	// context.
4180	// Please refer to
4181	// the
4182	// [geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionarie
4183	// s/geo-table.csv)
4184	// file for different geo criteria IDs.
4185	GeoCriteriaIds []int64 `json:"geoCriteriaIds,omitempty"`
4186
4187	// ForceSendFields is a list of field names (e.g. "GeoCriteriaIds") to
4188	// unconditionally include in API requests. By default, fields with
4189	// empty values are omitted from API requests. However, any non-pointer,
4190	// non-interface field appearing in ForceSendFields will be sent to the
4191	// server regardless of whether the field is empty or not. This may be
4192	// used to include empty fields in Patch requests.
4193	ForceSendFields []string `json:"-"`
4194
4195	// NullFields is a list of field names (e.g. "GeoCriteriaIds") to
4196	// include in API requests with the JSON null value. By default, fields
4197	// with empty values are omitted from API requests. However, any field
4198	// with an empty value appearing in NullFields will be sent to the
4199	// server as null. It is an error if a field in this list has a
4200	// non-empty value. This may be used to include null fields in Patch
4201	// requests.
4202	NullFields []string `json:"-"`
4203}
4204
4205func (s *LocationContext) MarshalJSON() ([]byte, error) {
4206	type NoMethod LocationContext
4207	raw := NoMethod(*s)
4208	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4209}
4210
4211// MarketplaceTargeting: Targeting represents different criteria that
4212// can be used by advertisers to
4213// target ad inventory. For example, they can choose to target ad
4214// requests only
4215// if the user is in the US.
4216// Multiple types of targeting are always applied as a logical AND,
4217// unless noted
4218// otherwise.
4219type MarketplaceTargeting struct {
4220	// GeoTargeting: Geo criteria IDs to be included/excluded.
4221	GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"`
4222
4223	// InventorySizeTargeting: Inventory sizes to be included/excluded.
4224	InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"`
4225
4226	// PlacementTargeting: Placement targeting information, e.g., URL,
4227	// mobile applications.
4228	PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"`
4229
4230	// TechnologyTargeting: Technology targeting information, e.g.,
4231	// operating system, device category.
4232	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
4233
4234	// VideoTargeting: Video targeting information.
4235	VideoTargeting *VideoTargeting `json:"videoTargeting,omitempty"`
4236
4237	// ForceSendFields is a list of field names (e.g. "GeoTargeting") to
4238	// unconditionally include in API requests. By default, fields with
4239	// empty values are omitted from API requests. However, any non-pointer,
4240	// non-interface field appearing in ForceSendFields will be sent to the
4241	// server regardless of whether the field is empty or not. This may be
4242	// used to include empty fields in Patch requests.
4243	ForceSendFields []string `json:"-"`
4244
4245	// NullFields is a list of field names (e.g. "GeoTargeting") to include
4246	// in API requests with the JSON null value. By default, fields with
4247	// empty values are omitted from API requests. However, any field with
4248	// an empty value appearing in NullFields will be sent to the server as
4249	// null. It is an error if a field in this list has a non-empty value.
4250	// This may be used to include null fields in Patch requests.
4251	NullFields []string `json:"-"`
4252}
4253
4254func (s *MarketplaceTargeting) MarshalJSON() ([]byte, error) {
4255	type NoMethod MarketplaceTargeting
4256	raw := NoMethod(*s)
4257	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4258}
4259
4260// MetricValue: A metric value, with an expected value and a variance;
4261// represents a count
4262// that may be either exact or estimated (i.e. when sampled).
4263type MetricValue struct {
4264	// Value: The expected value of the metric.
4265	Value int64 `json:"value,omitempty,string"`
4266
4267	// Variance: The variance (i.e. square of the standard deviation) of the
4268	// metric value.
4269	// If value is exact, variance is 0.
4270	// Can be used to calculate margin of error as a percentage of value,
4271	// using
4272	// the following formula, where Z is the standard constant that depends
4273	// on the
4274	// desired size of the confidence interval (e.g. for 90% confidence
4275	// interval,
4276	// use Z = 1.645):
4277	//
4278	//   marginOfError = 100 * Z * sqrt(variance) / value
4279	Variance int64 `json:"variance,omitempty,string"`
4280
4281	// ForceSendFields is a list of field names (e.g. "Value") to
4282	// unconditionally include in API requests. By default, fields with
4283	// empty values are omitted from API requests. However, any non-pointer,
4284	// non-interface field appearing in ForceSendFields will be sent to the
4285	// server regardless of whether the field is empty or not. This may be
4286	// used to include empty fields in Patch requests.
4287	ForceSendFields []string `json:"-"`
4288
4289	// NullFields is a list of field names (e.g. "Value") to include in API
4290	// requests with the JSON null value. By default, fields with empty
4291	// values are omitted from API requests. However, any field with an
4292	// empty value appearing in NullFields will be sent to the server as
4293	// null. It is an error if a field in this list has a non-empty value.
4294	// This may be used to include null fields in Patch requests.
4295	NullFields []string `json:"-"`
4296}
4297
4298func (s *MetricValue) MarshalJSON() ([]byte, error) {
4299	type NoMethod MetricValue
4300	raw := NoMethod(*s)
4301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4302}
4303
4304// MobileApplicationTargeting: Mobile application targeting settings.
4305type MobileApplicationTargeting struct {
4306	// FirstPartyTargeting: Publisher owned apps to be targeted or excluded
4307	// by the publisher to
4308	// display the ads in.
4309	FirstPartyTargeting *FirstPartyMobileApplicationTargeting `json:"firstPartyTargeting,omitempty"`
4310
4311	// ForceSendFields is a list of field names (e.g. "FirstPartyTargeting")
4312	// to unconditionally include in API requests. By default, fields with
4313	// empty values are omitted from API requests. However, any non-pointer,
4314	// non-interface field appearing in ForceSendFields will be sent to the
4315	// server regardless of whether the field is empty or not. This may be
4316	// used to include empty fields in Patch requests.
4317	ForceSendFields []string `json:"-"`
4318
4319	// NullFields is a list of field names (e.g. "FirstPartyTargeting") to
4320	// include in API requests with the JSON null value. By default, fields
4321	// with empty values are omitted from API requests. However, any field
4322	// with an empty value appearing in NullFields will be sent to the
4323	// server as null. It is an error if a field in this list has a
4324	// non-empty value. This may be used to include null fields in Patch
4325	// requests.
4326	NullFields []string `json:"-"`
4327}
4328
4329func (s *MobileApplicationTargeting) MarshalJSON() ([]byte, error) {
4330	type NoMethod MobileApplicationTargeting
4331	raw := NoMethod(*s)
4332	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4333}
4334
4335// Money: Represents an amount of money with its currency type.
4336type Money struct {
4337	// CurrencyCode: The 3-letter currency code defined in ISO 4217.
4338	CurrencyCode string `json:"currencyCode,omitempty"`
4339
4340	// Nanos: Number of nano (10^-9) units of the amount.
4341	// The value must be between -999,999,999 and +999,999,999 inclusive.
4342	// If `units` is positive, `nanos` must be positive or zero.
4343	// If `units` is zero, `nanos` can be positive, zero, or negative.
4344	// If `units` is negative, `nanos` must be negative or zero.
4345	// For example $-1.75 is represented as `units`=-1 and
4346	// `nanos`=-750,000,000.
4347	Nanos int64 `json:"nanos,omitempty"`
4348
4349	// Units: The whole units of the amount.
4350	// For example if `currencyCode` is "USD", then 1 unit is one US
4351	// dollar.
4352	Units int64 `json:"units,omitempty,string"`
4353
4354	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
4355	// unconditionally include in API requests. By default, fields with
4356	// empty values are omitted from API requests. However, any non-pointer,
4357	// non-interface field appearing in ForceSendFields will be sent to the
4358	// server regardless of whether the field is empty or not. This may be
4359	// used to include empty fields in Patch requests.
4360	ForceSendFields []string `json:"-"`
4361
4362	// NullFields is a list of field names (e.g. "CurrencyCode") to include
4363	// in API requests with the JSON null value. By default, fields with
4364	// empty values are omitted from API requests. However, any field with
4365	// an empty value appearing in NullFields will be sent to the server as
4366	// null. It is an error if a field in this list has a non-empty value.
4367	// This may be used to include null fields in Patch requests.
4368	NullFields []string `json:"-"`
4369}
4370
4371func (s *Money) MarshalJSON() ([]byte, error) {
4372	type NoMethod Money
4373	raw := NoMethod(*s)
4374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4375}
4376
4377// NativeContent: Native content for a creative.
4378type NativeContent struct {
4379	// AdvertiserName: The name of the advertiser or sponsor, to be
4380	// displayed in the ad creative.
4381	AdvertiserName string `json:"advertiserName,omitempty"`
4382
4383	// AppIcon: The app icon, for app download ads.
4384	AppIcon *Image `json:"appIcon,omitempty"`
4385
4386	// Body: A long description of the ad.
4387	Body string `json:"body,omitempty"`
4388
4389	// CallToAction: A label for the button that the user is supposed to
4390	// click.
4391	CallToAction string `json:"callToAction,omitempty"`
4392
4393	// ClickLinkUrl: The URL that the browser/SDK will load when the user
4394	// clicks the ad.
4395	ClickLinkUrl string `json:"clickLinkUrl,omitempty"`
4396
4397	// ClickTrackingUrl: The URL to use for click tracking.
4398	ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"`
4399
4400	// Headline: A short title for the ad.
4401	Headline string `json:"headline,omitempty"`
4402
4403	// Image: A large image.
4404	Image *Image `json:"image,omitempty"`
4405
4406	// Logo: A smaller image, for the advertiser's logo.
4407	Logo *Image `json:"logo,omitempty"`
4408
4409	// PriceDisplayText: The price of the promoted app including currency
4410	// info.
4411	PriceDisplayText string `json:"priceDisplayText,omitempty"`
4412
4413	// StarRating: The app rating in the app store. Must be in the range
4414	// [0-5].
4415	StarRating float64 `json:"starRating,omitempty"`
4416
4417	// StoreUrl: The URL to the app store to purchase/download the promoted
4418	// app.
4419	StoreUrl string `json:"storeUrl,omitempty"`
4420
4421	// VideoUrl: The URL to fetch a native video ad.
4422	VideoUrl string `json:"videoUrl,omitempty"`
4423
4424	// ForceSendFields is a list of field names (e.g. "AdvertiserName") to
4425	// unconditionally include in API requests. By default, fields with
4426	// empty values are omitted from API requests. However, any non-pointer,
4427	// non-interface field appearing in ForceSendFields will be sent to the
4428	// server regardless of whether the field is empty or not. This may be
4429	// used to include empty fields in Patch requests.
4430	ForceSendFields []string `json:"-"`
4431
4432	// NullFields is a list of field names (e.g. "AdvertiserName") to
4433	// include in API requests with the JSON null value. By default, fields
4434	// with empty values are omitted from API requests. However, any field
4435	// with an empty value appearing in NullFields will be sent to the
4436	// server as null. It is an error if a field in this list has a
4437	// non-empty value. This may be used to include null fields in Patch
4438	// requests.
4439	NullFields []string `json:"-"`
4440}
4441
4442func (s *NativeContent) MarshalJSON() ([]byte, error) {
4443	type NoMethod NativeContent
4444	raw := NoMethod(*s)
4445	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4446}
4447
4448func (s *NativeContent) UnmarshalJSON(data []byte) error {
4449	type NoMethod NativeContent
4450	var s1 struct {
4451		StarRating gensupport.JSONFloat64 `json:"starRating"`
4452		*NoMethod
4453	}
4454	s1.NoMethod = (*NoMethod)(s)
4455	if err := json.Unmarshal(data, &s1); err != nil {
4456		return err
4457	}
4458	s.StarRating = float64(s1.StarRating)
4459	return nil
4460}
4461
4462// NonBillableWinningBidStatusRow: The number of winning bids with the
4463// specified dimension values for which the
4464// buyer was not billed, as described by the specified status.
4465type NonBillableWinningBidStatusRow struct {
4466	// BidCount: The number of bids with the specified status.
4467	BidCount *MetricValue `json:"bidCount,omitempty"`
4468
4469	// RowDimensions: The values of all dimensions associated with metric
4470	// values in this row.
4471	RowDimensions *RowDimensions `json:"rowDimensions,omitempty"`
4472
4473	// Status: The status specifying why the winning bids were not billed.
4474	//
4475	// Possible values:
4476	//   "STATUS_UNSPECIFIED" - A placeholder for an undefined status.
4477	// This value will never be returned in responses.
4478	//   "AD_NOT_RENDERED" - The buyer was not billed because the ad was not
4479	// rendered by the
4480	// publisher.
4481	//   "INVALID_IMPRESSION" - The buyer was not billed because the
4482	// impression won by the bid was
4483	// determined to be invalid.
4484	//   "FATAL_VAST_ERROR" - A video impression was served but a fatal
4485	// error was reported from the
4486	// client during playback.
4487	//   "LOST_IN_MEDIATION" - The buyer was not billed because the ad was
4488	// outplaced in the mediation
4489	// waterfall.
4490	Status string `json:"status,omitempty"`
4491
4492	// ForceSendFields is a list of field names (e.g. "BidCount") to
4493	// unconditionally include in API requests. By default, fields with
4494	// empty values are omitted from API requests. However, any non-pointer,
4495	// non-interface field appearing in ForceSendFields will be sent to the
4496	// server regardless of whether the field is empty or not. This may be
4497	// used to include empty fields in Patch requests.
4498	ForceSendFields []string `json:"-"`
4499
4500	// NullFields is a list of field names (e.g. "BidCount") to include in
4501	// API requests with the JSON null value. By default, fields with empty
4502	// values are omitted from API requests. However, any field with an
4503	// empty value appearing in NullFields will be sent to the server as
4504	// null. It is an error if a field in this list has a non-empty value.
4505	// This may be used to include null fields in Patch requests.
4506	NullFields []string `json:"-"`
4507}
4508
4509func (s *NonBillableWinningBidStatusRow) MarshalJSON() ([]byte, error) {
4510	type NoMethod NonBillableWinningBidStatusRow
4511	raw := NoMethod(*s)
4512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4513}
4514
4515// NonGuaranteedAuctionTerms: Terms for Private Auctions. Note that
4516// Private Auctions can be created only
4517// by the seller, but they can be returned in a get or list request.
4518type NonGuaranteedAuctionTerms struct {
4519	// AutoOptimizePrivateAuction: True if open auction buyers are allowed
4520	// to compete with invited buyers
4521	// in this private auction.
4522	AutoOptimizePrivateAuction bool `json:"autoOptimizePrivateAuction,omitempty"`
4523
4524	// ReservePricesPerBuyer: Reserve price for the specified buyer.
4525	ReservePricesPerBuyer []*PricePerBuyer `json:"reservePricesPerBuyer,omitempty"`
4526
4527	// ForceSendFields is a list of field names (e.g.
4528	// "AutoOptimizePrivateAuction") to unconditionally include in API
4529	// requests. By default, fields with empty values are omitted from API
4530	// requests. However, any non-pointer, non-interface field appearing in
4531	// ForceSendFields will be sent to the server regardless of whether the
4532	// field is empty or not. This may be used to include empty fields in
4533	// Patch requests.
4534	ForceSendFields []string `json:"-"`
4535
4536	// NullFields is a list of field names (e.g.
4537	// "AutoOptimizePrivateAuction") to include in API requests with the
4538	// JSON null value. By default, fields with empty values are omitted
4539	// from API requests. However, any field with an empty value appearing
4540	// in NullFields will be sent to the server as null. It is an error if a
4541	// field in this list has a non-empty value. This may be used to include
4542	// null fields in Patch requests.
4543	NullFields []string `json:"-"`
4544}
4545
4546func (s *NonGuaranteedAuctionTerms) MarshalJSON() ([]byte, error) {
4547	type NoMethod NonGuaranteedAuctionTerms
4548	raw := NoMethod(*s)
4549	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4550}
4551
4552// NonGuaranteedFixedPriceTerms: Terms for Preferred Deals. Note that
4553// Preferred Deals cannot be created via
4554// the API at this time, but can be returned in a get or list request.
4555type NonGuaranteedFixedPriceTerms struct {
4556	// FixedPrices: Fixed price for the specified buyer.
4557	FixedPrices []*PricePerBuyer `json:"fixedPrices,omitempty"`
4558
4559	// ForceSendFields is a list of field names (e.g. "FixedPrices") to
4560	// unconditionally include in API requests. By default, fields with
4561	// empty values are omitted from API requests. However, any non-pointer,
4562	// non-interface field appearing in ForceSendFields will be sent to the
4563	// server regardless of whether the field is empty or not. This may be
4564	// used to include empty fields in Patch requests.
4565	ForceSendFields []string `json:"-"`
4566
4567	// NullFields is a list of field names (e.g. "FixedPrices") to include
4568	// in API requests with the JSON null value. By default, fields with
4569	// empty values are omitted from API requests. However, any field with
4570	// an empty value appearing in NullFields will be sent to the server as
4571	// null. It is an error if a field in this list has a non-empty value.
4572	// This may be used to include null fields in Patch requests.
4573	NullFields []string `json:"-"`
4574}
4575
4576func (s *NonGuaranteedFixedPriceTerms) MarshalJSON() ([]byte, error) {
4577	type NoMethod NonGuaranteedFixedPriceTerms
4578	raw := NoMethod(*s)
4579	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4580}
4581
4582// Note: A proposal may be associated to several notes.
4583type Note struct {
4584	// CreateTime: Output only. The timestamp for when this note was
4585	// created.
4586	CreateTime string `json:"createTime,omitempty"`
4587
4588	// CreatorRole: Output only. The role of the person (buyer/seller)
4589	// creating the note.
4590	//
4591	// Possible values:
4592	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
4593	// buyer/seller role.
4594	//   "BUYER" - Specifies the role as buyer.
4595	//   "SELLER" - Specifies the role as seller.
4596	CreatorRole string `json:"creatorRole,omitempty"`
4597
4598	// Note: The actual note to attach.
4599	// (max-length: 1024 unicode code units)
4600	//
4601	// Note: This field may be set only when creating the resource.
4602	// Modifying
4603	// this field while updating the resource will result in an error.
4604	Note string `json:"note,omitempty"`
4605
4606	// NoteId: Output only. The unique ID for the note.
4607	NoteId string `json:"noteId,omitempty"`
4608
4609	// ProposalRevision: Output only. The revision number of the proposal
4610	// when the note is created.
4611	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
4612
4613	// ServerResponse contains the HTTP response code and headers from the
4614	// server.
4615	googleapi.ServerResponse `json:"-"`
4616
4617	// ForceSendFields is a list of field names (e.g. "CreateTime") to
4618	// unconditionally include in API requests. By default, fields with
4619	// empty values are omitted from API requests. However, any non-pointer,
4620	// non-interface field appearing in ForceSendFields will be sent to the
4621	// server regardless of whether the field is empty or not. This may be
4622	// used to include empty fields in Patch requests.
4623	ForceSendFields []string `json:"-"`
4624
4625	// NullFields is a list of field names (e.g. "CreateTime") to include in
4626	// API requests with the JSON null value. By default, fields with empty
4627	// values are omitted from API requests. However, any field with an
4628	// empty value appearing in NullFields will be sent to the server as
4629	// null. It is an error if a field in this list has a non-empty value.
4630	// This may be used to include null fields in Patch requests.
4631	NullFields []string `json:"-"`
4632}
4633
4634func (s *Note) MarshalJSON() ([]byte, error) {
4635	type NoMethod Note
4636	raw := NoMethod(*s)
4637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4638}
4639
4640// OperatingSystemTargeting: Represents targeting information for
4641// operating systems.
4642type OperatingSystemTargeting struct {
4643	// OperatingSystemCriteria: IDs of operating systems to be
4644	// included/excluded.
4645	OperatingSystemCriteria *CriteriaTargeting `json:"operatingSystemCriteria,omitempty"`
4646
4647	// OperatingSystemVersionCriteria: IDs of operating system versions to
4648	// be included/excluded.
4649	OperatingSystemVersionCriteria *CriteriaTargeting `json:"operatingSystemVersionCriteria,omitempty"`
4650
4651	// ForceSendFields is a list of field names (e.g.
4652	// "OperatingSystemCriteria") to unconditionally include in API
4653	// requests. By default, fields with empty values are omitted from API
4654	// requests. However, any non-pointer, non-interface field appearing in
4655	// ForceSendFields will be sent to the server regardless of whether the
4656	// field is empty or not. This may be used to include empty fields in
4657	// Patch requests.
4658	ForceSendFields []string `json:"-"`
4659
4660	// NullFields is a list of field names (e.g. "OperatingSystemCriteria")
4661	// to include in API requests with the JSON null value. By default,
4662	// fields with empty values are omitted from API requests. However, any
4663	// field with an empty value appearing in NullFields will be sent to the
4664	// server as null. It is an error if a field in this list has a
4665	// non-empty value. This may be used to include null fields in Patch
4666	// requests.
4667	NullFields []string `json:"-"`
4668}
4669
4670func (s *OperatingSystemTargeting) MarshalJSON() ([]byte, error) {
4671	type NoMethod OperatingSystemTargeting
4672	raw := NoMethod(*s)
4673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4674}
4675
4676// PauseProposalRequest: Request message to pause serving for an
4677// already-finalized proposal.
4678type PauseProposalRequest struct {
4679	// Reason: The reason why the proposal is being paused.
4680	// This human readable message will be displayed in the seller's
4681	// UI.
4682	// (Max length: 1000 unicode code units.)
4683	Reason string `json:"reason,omitempty"`
4684
4685	// ForceSendFields is a list of field names (e.g. "Reason") to
4686	// unconditionally include in API requests. By default, fields with
4687	// empty values are omitted from API requests. However, any non-pointer,
4688	// non-interface field appearing in ForceSendFields will be sent to the
4689	// server regardless of whether the field is empty or not. This may be
4690	// used to include empty fields in Patch requests.
4691	ForceSendFields []string `json:"-"`
4692
4693	// NullFields is a list of field names (e.g. "Reason") to include in API
4694	// requests with the JSON null value. By default, fields with empty
4695	// values are omitted from API requests. However, any field with an
4696	// empty value appearing in NullFields will be sent to the server as
4697	// null. It is an error if a field in this list has a non-empty value.
4698	// This may be used to include null fields in Patch requests.
4699	NullFields []string `json:"-"`
4700}
4701
4702func (s *PauseProposalRequest) MarshalJSON() ([]byte, error) {
4703	type NoMethod PauseProposalRequest
4704	raw := NoMethod(*s)
4705	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4706}
4707
4708// PlacementTargeting: Represents targeting about where the ads can
4709// appear, e.g., certain sites or
4710// mobile applications.
4711// Different placement targeting types will be logically OR'ed.
4712type PlacementTargeting struct {
4713	// MobileApplicationTargeting: Mobile application targeting information
4714	// in a deal.
4715	// This doesn't apply to Auction Packages.
4716	MobileApplicationTargeting *MobileApplicationTargeting `json:"mobileApplicationTargeting,omitempty"`
4717
4718	// UrlTargeting: URLs to be included/excluded.
4719	UrlTargeting *UrlTargeting `json:"urlTargeting,omitempty"`
4720
4721	// ForceSendFields is a list of field names (e.g.
4722	// "MobileApplicationTargeting") to unconditionally include in API
4723	// requests. By default, fields with empty values are omitted from API
4724	// requests. However, any non-pointer, non-interface field appearing in
4725	// ForceSendFields will be sent to the server regardless of whether the
4726	// field is empty or not. This may be used to include empty fields in
4727	// Patch requests.
4728	ForceSendFields []string `json:"-"`
4729
4730	// NullFields is a list of field names (e.g.
4731	// "MobileApplicationTargeting") to include in API requests with the
4732	// JSON null value. By default, fields with empty values are omitted
4733	// from API requests. However, any field with an empty value appearing
4734	// in NullFields will be sent to the server as null. It is an error if a
4735	// field in this list has a non-empty value. This may be used to include
4736	// null fields in Patch requests.
4737	NullFields []string `json:"-"`
4738}
4739
4740func (s *PlacementTargeting) MarshalJSON() ([]byte, error) {
4741	type NoMethod PlacementTargeting
4742	raw := NoMethod(*s)
4743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4744}
4745
4746// PlatformContext: Output only. The type of platform the restriction
4747// applies to.
4748type PlatformContext struct {
4749	// Platforms: The platforms this restriction applies to.
4750	//
4751	// Possible values:
4752	//   "DESKTOP" - Desktop platform.
4753	//   "ANDROID" - Android platform.
4754	//   "IOS" - iOS platform.
4755	Platforms []string `json:"platforms,omitempty"`
4756
4757	// ForceSendFields is a list of field names (e.g. "Platforms") to
4758	// unconditionally include in API requests. By default, fields with
4759	// empty values are omitted from API requests. However, any non-pointer,
4760	// non-interface field appearing in ForceSendFields will be sent to the
4761	// server regardless of whether the field is empty or not. This may be
4762	// used to include empty fields in Patch requests.
4763	ForceSendFields []string `json:"-"`
4764
4765	// NullFields is a list of field names (e.g. "Platforms") to include in
4766	// API requests with the JSON null value. By default, fields with empty
4767	// values are omitted from API requests. However, any field with an
4768	// empty value appearing in NullFields will be sent to the server as
4769	// null. It is an error if a field in this list has a non-empty value.
4770	// This may be used to include null fields in Patch requests.
4771	NullFields []string `json:"-"`
4772}
4773
4774func (s *PlatformContext) MarshalJSON() ([]byte, error) {
4775	type NoMethod PlatformContext
4776	raw := NoMethod(*s)
4777	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4778}
4779
4780// Price: Represents a price and a pricing type for a product / deal.
4781type Price struct {
4782	// Amount: The actual price with currency specified.
4783	Amount *Money `json:"amount,omitempty"`
4784
4785	// PricingType: The pricing type for the deal/product. (default: CPM)
4786	//
4787	// Possible values:
4788	//   "PRICING_TYPE_UNSPECIFIED" - A placeholder for an undefined pricing
4789	// type. If the pricing type is
4790	// unpsecified, `COST_PER_MILLE` will be used instead.
4791	//   "COST_PER_MILLE" - Cost per thousand impressions.
4792	//   "COST_PER_DAY" - Cost per day
4793	PricingType string `json:"pricingType,omitempty"`
4794
4795	// ForceSendFields is a list of field names (e.g. "Amount") to
4796	// unconditionally include in API requests. By default, fields with
4797	// empty values are omitted from API requests. However, any non-pointer,
4798	// non-interface field appearing in ForceSendFields will be sent to the
4799	// server regardless of whether the field is empty or not. This may be
4800	// used to include empty fields in Patch requests.
4801	ForceSendFields []string `json:"-"`
4802
4803	// NullFields is a list of field names (e.g. "Amount") to include in API
4804	// requests with the JSON null value. By default, fields with empty
4805	// values are omitted from API requests. However, any field with an
4806	// empty value appearing in NullFields will be sent to the server as
4807	// null. It is an error if a field in this list has a non-empty value.
4808	// This may be used to include null fields in Patch requests.
4809	NullFields []string `json:"-"`
4810}
4811
4812func (s *Price) MarshalJSON() ([]byte, error) {
4813	type NoMethod Price
4814	raw := NoMethod(*s)
4815	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4816}
4817
4818// PricePerBuyer: Used to specify pricing rules for buyers/advertisers.
4819// Each PricePerBuyer in
4820// a product can become 0 or 1 deals. To check if there is a
4821// PricePerBuyer for
4822// a particular buyer or buyer/advertiser pair, we look for the most
4823// specific
4824// matching rule - we first look for a rule matching the buyer and
4825// advertiser,
4826// next a rule with the buyer but an empty advertiser list, and
4827// otherwise look
4828// for a matching rule where no buyer is set.
4829type PricePerBuyer struct {
4830	// AdvertiserIds: The list of advertisers for this price when associated
4831	// with this buyer.
4832	// If empty, all advertisers with this buyer pay this price.
4833	AdvertiserIds []string `json:"advertiserIds,omitempty"`
4834
4835	// Buyer: The buyer who will pay this price. If unset, all buyers can
4836	// pay this price
4837	// (if the
4838	// advertisers match, and there's no more specific rule matching the
4839	// buyer).
4840	Buyer *Buyer `json:"buyer,omitempty"`
4841
4842	// Price: The specified price.
4843	Price *Price `json:"price,omitempty"`
4844
4845	// ForceSendFields is a list of field names (e.g. "AdvertiserIds") to
4846	// unconditionally include in API requests. By default, fields with
4847	// empty values are omitted from API requests. However, any non-pointer,
4848	// non-interface field appearing in ForceSendFields will be sent to the
4849	// server regardless of whether the field is empty or not. This may be
4850	// used to include empty fields in Patch requests.
4851	ForceSendFields []string `json:"-"`
4852
4853	// NullFields is a list of field names (e.g. "AdvertiserIds") to include
4854	// in API requests with the JSON null value. By default, fields with
4855	// empty values are omitted from API requests. However, any field with
4856	// an empty value appearing in NullFields will be sent to the server as
4857	// null. It is an error if a field in this list has a non-empty value.
4858	// This may be used to include null fields in Patch requests.
4859	NullFields []string `json:"-"`
4860}
4861
4862func (s *PricePerBuyer) MarshalJSON() ([]byte, error) {
4863	type NoMethod PricePerBuyer
4864	raw := NoMethod(*s)
4865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4866}
4867
4868// PrivateData: Buyers are allowed to store certain types of private
4869// data in a proposal/deal.
4870type PrivateData struct {
4871	// ReferenceId: A buyer or seller specified reference ID. This can be
4872	// queried in the list
4873	// operations (max-length: 1024 unicode code units).
4874	ReferenceId string `json:"referenceId,omitempty"`
4875
4876	// ForceSendFields is a list of field names (e.g. "ReferenceId") to
4877	// unconditionally include in API requests. By default, fields with
4878	// empty values are omitted from API requests. However, any non-pointer,
4879	// non-interface field appearing in ForceSendFields will be sent to the
4880	// server regardless of whether the field is empty or not. This may be
4881	// used to include empty fields in Patch requests.
4882	ForceSendFields []string `json:"-"`
4883
4884	// NullFields is a list of field names (e.g. "ReferenceId") to include
4885	// in API requests with the JSON null value. By default, fields with
4886	// empty values are omitted from API requests. However, any field with
4887	// an empty value appearing in NullFields will be sent to the server as
4888	// null. It is an error if a field in this list has a non-empty value.
4889	// This may be used to include null fields in Patch requests.
4890	NullFields []string `json:"-"`
4891}
4892
4893func (s *PrivateData) MarshalJSON() ([]byte, error) {
4894	type NoMethod PrivateData
4895	raw := NoMethod(*s)
4896	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4897}
4898
4899// Product: Note: this resource requires whitelisting for access. Please
4900// contact your
4901// account manager for access to Marketplace resources.
4902//
4903// A product is a segment of inventory that a seller wishes to sell. It
4904// is
4905// associated with certain terms and targeting information which helps
4906// the buyer
4907// know more about the inventory.
4908type Product struct {
4909	// AvailableEndTime: The proposed end time for the deal. The field will
4910	// be truncated to the
4911	// order of seconds during serving.
4912	AvailableEndTime string `json:"availableEndTime,omitempty"`
4913
4914	// AvailableStartTime: Inventory availability dates. The start time will
4915	// be truncated to seconds
4916	// during serving. Thus, a field specified as 3:23:34.456 (HH:mm:ss.SSS)
4917	// will
4918	// be truncated to 3:23:34 when serving.
4919	AvailableStartTime string `json:"availableStartTime,omitempty"`
4920
4921	// CreateTime: Creation time.
4922	CreateTime string `json:"createTime,omitempty"`
4923
4924	// CreatorContacts: Optional contact information for the creator of this
4925	// product.
4926	CreatorContacts []*ContactInformation `json:"creatorContacts,omitempty"`
4927
4928	// DisplayName: The display name for this product as set by the seller.
4929	DisplayName string `json:"displayName,omitempty"`
4930
4931	// HasCreatorSignedOff: If the creator has already signed off on the
4932	// product, then the buyer can
4933	// finalize the deal by accepting the product as is. When copying to
4934	// a
4935	// proposal, if any of the terms are changed, then auto_finalize
4936	// is
4937	// automatically set to false.
4938	HasCreatorSignedOff bool `json:"hasCreatorSignedOff,omitempty"`
4939
4940	// ProductId: The unique ID for the product.
4941	ProductId string `json:"productId,omitempty"`
4942
4943	// ProductRevision: The revision number of the product (auto-assigned by
4944	// Marketplace).
4945	ProductRevision int64 `json:"productRevision,omitempty,string"`
4946
4947	// PublisherProfileId: An ID which can be used by the Publisher Profile
4948	// API to get more
4949	// information about the seller that created this product.
4950	PublisherProfileId string `json:"publisherProfileId,omitempty"`
4951
4952	// Seller: Information about the seller that created this product.
4953	Seller *Seller `json:"seller,omitempty"`
4954
4955	// SyndicationProduct: The syndication product associated with the deal.
4956	//
4957	// Possible values:
4958	//   "SYNDICATION_PRODUCT_UNSPECIFIED" - A placeholder for an undefined
4959	// syndication product.
4960	//   "CONTENT" - This typically represents a web page.
4961	//   "MOBILE" - This represents a mobile property.
4962	//   "VIDEO" - This represents video ad formats.
4963	//   "GAMES" - This represents ads shown within games.
4964	SyndicationProduct string `json:"syndicationProduct,omitempty"`
4965
4966	// TargetingCriterion: Targeting that is shared between the buyer and
4967	// the seller. Each targeting
4968	// criterion has a specified key and for each key there is a list of
4969	// inclusion
4970	// value or exclusion values.
4971	TargetingCriterion []*TargetingCriteria `json:"targetingCriterion,omitempty"`
4972
4973	// Terms: The negotiable terms of the deal.
4974	Terms *DealTerms `json:"terms,omitempty"`
4975
4976	// UpdateTime: Time of last update.
4977	UpdateTime string `json:"updateTime,omitempty"`
4978
4979	// WebPropertyCode: The web-property code for the seller. This needs to
4980	// be copied as is when
4981	// adding a new deal to a proposal.
4982	WebPropertyCode string `json:"webPropertyCode,omitempty"`
4983
4984	// ServerResponse contains the HTTP response code and headers from the
4985	// server.
4986	googleapi.ServerResponse `json:"-"`
4987
4988	// ForceSendFields is a list of field names (e.g. "AvailableEndTime") to
4989	// unconditionally include in API requests. By default, fields with
4990	// empty values are omitted from API requests. However, any non-pointer,
4991	// non-interface field appearing in ForceSendFields will be sent to the
4992	// server regardless of whether the field is empty or not. This may be
4993	// used to include empty fields in Patch requests.
4994	ForceSendFields []string `json:"-"`
4995
4996	// NullFields is a list of field names (e.g. "AvailableEndTime") to
4997	// include in API requests with the JSON null value. By default, fields
4998	// with empty values are omitted from API requests. However, any field
4999	// with an empty value appearing in NullFields will be sent to the
5000	// server as null. It is an error if a field in this list has a
5001	// non-empty value. This may be used to include null fields in Patch
5002	// requests.
5003	NullFields []string `json:"-"`
5004}
5005
5006func (s *Product) MarshalJSON() ([]byte, error) {
5007	type NoMethod Product
5008	raw := NoMethod(*s)
5009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5010}
5011
5012// Proposal: Note: this resource requires whitelisting for access.
5013// Please contact your
5014// account manager for access to Marketplace resources.
5015//
5016// Represents a proposal in the Marketplace. A proposal is the unit
5017// of
5018// negotiation between a seller and a buyer and contains deals which
5019// are served.
5020//
5021// Note: you can not update, create, or otherwise modify Private
5022// Auction or Preferred Deals deals through the API.
5023//
5024// Fields are updatable unless noted otherwise.
5025type Proposal struct {
5026	// BilledBuyer: Output only. Reference to the buyer that will get billed
5027	// for this proposal.
5028	BilledBuyer *Buyer `json:"billedBuyer,omitempty"`
5029
5030	// Buyer: Reference to the buyer on the proposal.
5031	//
5032	// Note: This field may be set only when creating the resource.
5033	// Modifying
5034	// this field while updating the resource will result in an error.
5035	Buyer *Buyer `json:"buyer,omitempty"`
5036
5037	// BuyerContacts: Contact information for the buyer.
5038	BuyerContacts []*ContactInformation `json:"buyerContacts,omitempty"`
5039
5040	// BuyerPrivateData: Private data for buyer. (hidden from seller).
5041	BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
5042
5043	// Deals: The deals associated with this proposal. For Private Auction
5044	// proposals
5045	// (whose deals have NonGuaranteedAuctionTerms), there will only be one
5046	// deal.
5047	Deals []*Deal `json:"deals,omitempty"`
5048
5049	// DisplayName: The name for the proposal.
5050	DisplayName string `json:"displayName,omitempty"`
5051
5052	// IsRenegotiating: Output only. True if the proposal is being
5053	// renegotiated.
5054	IsRenegotiating bool `json:"isRenegotiating,omitempty"`
5055
5056	// IsSetupComplete: Output only. True, if the buyside inventory setup is
5057	// complete for this
5058	// proposal.
5059	IsSetupComplete bool `json:"isSetupComplete,omitempty"`
5060
5061	// LastUpdaterOrCommentorRole: Output only. The role of the last user
5062	// that either updated the proposal or
5063	// left a comment.
5064	//
5065	// Possible values:
5066	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
5067	// buyer/seller role.
5068	//   "BUYER" - Specifies the role as buyer.
5069	//   "SELLER" - Specifies the role as seller.
5070	LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"`
5071
5072	// Notes: Output only. The notes associated with this proposal.
5073	Notes []*Note `json:"notes,omitempty"`
5074
5075	// OriginatorRole: Output only. Indicates whether the buyer/seller
5076	// created the proposal.
5077	//
5078	// Possible values:
5079	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
5080	// buyer/seller role.
5081	//   "BUYER" - Specifies the role as buyer.
5082	//   "SELLER" - Specifies the role as seller.
5083	OriginatorRole string `json:"originatorRole,omitempty"`
5084
5085	// PrivateAuctionId: Output only. Private auction ID if this proposal is
5086	// a private auction
5087	// proposal.
5088	PrivateAuctionId string `json:"privateAuctionId,omitempty"`
5089
5090	// ProposalId: Output only. The unique ID of the proposal.
5091	ProposalId string `json:"proposalId,omitempty"`
5092
5093	// ProposalRevision: Output only. The revision number for the
5094	// proposal.
5095	// Each update to the proposal or the deal causes the proposal revision
5096	// number
5097	// to auto-increment. The buyer keeps track of the last revision number
5098	// they
5099	// know of and pass it in when making an update. If the head revision
5100	// number
5101	// on the server has since incremented, then an ABORTED error is
5102	// returned
5103	// during the update operation to let the buyer know that a subsequent
5104	// update
5105	// was made.
5106	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
5107
5108	// ProposalState: Output only. The current state of the proposal.
5109	//
5110	// Possible values:
5111	//   "PROPOSAL_STATE_UNSPECIFIED" - A placeholder for an undefined
5112	// proposal state.
5113	//   "PROPOSED" - The proposal is under negotiation or renegotiation.
5114	//   "BUYER_ACCEPTED" - The proposal has been accepted by the buyer.
5115	//   "SELLER_ACCEPTED" - The proposal has been accepted by the seller.
5116	//   "CANCELED" - The negotiations on the proposal were canceled and the
5117	// proposal was never
5118	// finalized.
5119	//   "FINALIZED" - The proposal is finalized. During renegotiation, the
5120	// proposal may
5121	// not be in this state.
5122	ProposalState string `json:"proposalState,omitempty"`
5123
5124	// Seller: Reference to the seller on the proposal.
5125	//
5126	// Note: This field may be set only when creating the resource.
5127	// Modifying
5128	// this field while updating the resource will result in an error.
5129	Seller *Seller `json:"seller,omitempty"`
5130
5131	// SellerContacts: Output only. Contact information for the seller.
5132	SellerContacts []*ContactInformation `json:"sellerContacts,omitempty"`
5133
5134	// UpdateTime: Output only. The time when the proposal was last revised.
5135	UpdateTime string `json:"updateTime,omitempty"`
5136
5137	// ServerResponse contains the HTTP response code and headers from the
5138	// server.
5139	googleapi.ServerResponse `json:"-"`
5140
5141	// ForceSendFields is a list of field names (e.g. "BilledBuyer") to
5142	// unconditionally include in API requests. By default, fields with
5143	// empty values are omitted from API requests. However, any non-pointer,
5144	// non-interface field appearing in ForceSendFields will be sent to the
5145	// server regardless of whether the field is empty or not. This may be
5146	// used to include empty fields in Patch requests.
5147	ForceSendFields []string `json:"-"`
5148
5149	// NullFields is a list of field names (e.g. "BilledBuyer") to include
5150	// in API requests with the JSON null value. By default, fields with
5151	// empty values are omitted from API requests. However, any field with
5152	// an empty value appearing in NullFields will be sent to the server as
5153	// null. It is an error if a field in this list has a non-empty value.
5154	// This may be used to include null fields in Patch requests.
5155	NullFields []string `json:"-"`
5156}
5157
5158func (s *Proposal) MarshalJSON() ([]byte, error) {
5159	type NoMethod Proposal
5160	raw := NoMethod(*s)
5161	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5162}
5163
5164// PublisherProfile: Note: this resource requires whitelisting for
5165// access. Please contact your
5166// account manager for access to Marketplace resources.
5167//
5168// Represents a publisher
5169// profile
5170// (https://support.google.com/admanager/answer/6035806?hl=en) in
5171// Marketplace.
5172//
5173// All fields are read only. All string fields are free-form text
5174// entered by the
5175// publisher unless noted otherwise.
5176type PublisherProfile struct {
5177	// AudienceDescription: Description on the publisher's audience.
5178	AudienceDescription string `json:"audienceDescription,omitempty"`
5179
5180	// BuyerPitchStatement: Statement explaining what's unique about
5181	// publisher's business, and why
5182	// buyers should partner with the publisher.
5183	BuyerPitchStatement string `json:"buyerPitchStatement,omitempty"`
5184
5185	// DirectDealsContact: Contact information for direct reservation deals.
5186	// This is free text entered
5187	// by the publisher and may include information like names, phone
5188	// numbers and
5189	// email addresses.
5190	DirectDealsContact string `json:"directDealsContact,omitempty"`
5191
5192	// DisplayName: Name of the publisher profile.
5193	DisplayName string `json:"displayName,omitempty"`
5194
5195	// Domains: The list of domains represented in this publisher profile.
5196	// Empty if this is
5197	// a parent profile. These are top private domains, meaning that these
5198	// will
5199	// not contain a string like "photos.google.co.uk/123", but will
5200	// instead
5201	// contain "google.co.uk".
5202	Domains []string `json:"domains,omitempty"`
5203
5204	// GooglePlusUrl: URL to publisher's Google+ page.
5205	GooglePlusUrl string `json:"googlePlusUrl,omitempty"`
5206
5207	// IsParent: Indicates if this profile is the parent profile of the
5208	// seller. A parent
5209	// profile represents all the inventory from the seller, as opposed to
5210	// child
5211	// profile that is created to brand a portion of inventory. One seller
5212	// should
5213	// have only one parent publisher profile, and can have multiple
5214	// child
5215	// profiles. Publisher profiles for the same seller will have same value
5216	// of
5217	// field
5218	// google.ads.adexchange.buyer.v2beta1.PublisherProfile.seller.
5219	// See https://support.google.com/admanager/answer/6035806?hl=en for
5220	// details.
5221	IsParent bool `json:"isParent,omitempty"`
5222
5223	// LogoUrl: A Google public URL to the logo for this publisher profile.
5224	// The logo is
5225	// stored as a PNG, JPG, or GIF image.
5226	LogoUrl string `json:"logoUrl,omitempty"`
5227
5228	// MediaKitUrl: URL to additional marketing and sales materials.
5229	MediaKitUrl string `json:"mediaKitUrl,omitempty"`
5230
5231	// Overview: Overview of the publisher.
5232	Overview string `json:"overview,omitempty"`
5233
5234	// ProgrammaticDealsContact: Contact information for programmatic deals.
5235	// This is free text entered by
5236	// the publisher and may include information like names, phone numbers
5237	// and
5238	// email addresses.
5239	ProgrammaticDealsContact string `json:"programmaticDealsContact,omitempty"`
5240
5241	// PublisherProfileId: Unique ID for publisher profile.
5242	PublisherProfileId string `json:"publisherProfileId,omitempty"`
5243
5244	// RateCardInfoUrl: URL to a publisher rate card.
5245	RateCardInfoUrl string `json:"rateCardInfoUrl,omitempty"`
5246
5247	// SamplePageUrl: URL to a sample content page.
5248	SamplePageUrl string `json:"samplePageUrl,omitempty"`
5249
5250	// Seller: Seller of the publisher profile.
5251	Seller *Seller `json:"seller,omitempty"`
5252
5253	// TopHeadlines: Up to three key metrics and rankings. Max 100
5254	// characters each.
5255	// For example "#1 Mobile News Site for 20 Straight Months".
5256	TopHeadlines []string `json:"topHeadlines,omitempty"`
5257
5258	// ServerResponse contains the HTTP response code and headers from the
5259	// server.
5260	googleapi.ServerResponse `json:"-"`
5261
5262	// ForceSendFields is a list of field names (e.g. "AudienceDescription")
5263	// to unconditionally include in API requests. By default, fields with
5264	// empty values are omitted from API requests. However, any non-pointer,
5265	// non-interface field appearing in ForceSendFields will be sent to the
5266	// server regardless of whether the field is empty or not. This may be
5267	// used to include empty fields in Patch requests.
5268	ForceSendFields []string `json:"-"`
5269
5270	// NullFields is a list of field names (e.g. "AudienceDescription") to
5271	// include in API requests with the JSON null value. By default, fields
5272	// with empty values are omitted from API requests. However, any field
5273	// with an empty value appearing in NullFields will be sent to the
5274	// server as null. It is an error if a field in this list has a
5275	// non-empty value. This may be used to include null fields in Patch
5276	// requests.
5277	NullFields []string `json:"-"`
5278}
5279
5280func (s *PublisherProfile) MarshalJSON() ([]byte, error) {
5281	type NoMethod PublisherProfile
5282	raw := NoMethod(*s)
5283	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5284}
5285
5286// RealtimeTimeRange: An open-ended realtime time range specified by the
5287// start timestamp.
5288// For filter sets that specify a realtime time range RTB metrics
5289// continue to
5290// be aggregated throughout the lifetime of the filter set.
5291type RealtimeTimeRange struct {
5292	// StartTimestamp: The start timestamp of the real-time RTB metrics
5293	// aggregation.
5294	StartTimestamp string `json:"startTimestamp,omitempty"`
5295
5296	// ForceSendFields is a list of field names (e.g. "StartTimestamp") to
5297	// unconditionally include in API requests. By default, fields with
5298	// empty values are omitted from API requests. However, any non-pointer,
5299	// non-interface field appearing in ForceSendFields will be sent to the
5300	// server regardless of whether the field is empty or not. This may be
5301	// used to include empty fields in Patch requests.
5302	ForceSendFields []string `json:"-"`
5303
5304	// NullFields is a list of field names (e.g. "StartTimestamp") to
5305	// include in API requests with the JSON null value. By default, fields
5306	// with empty values are omitted from API requests. However, any field
5307	// with an empty value appearing in NullFields will be sent to the
5308	// server as null. It is an error if a field in this list has a
5309	// non-empty value. This may be used to include null fields in Patch
5310	// requests.
5311	NullFields []string `json:"-"`
5312}
5313
5314func (s *RealtimeTimeRange) MarshalJSON() ([]byte, error) {
5315	type NoMethod RealtimeTimeRange
5316	raw := NoMethod(*s)
5317	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5318}
5319
5320// RelativeDateRange: A relative date range, specified by an offset and
5321// a duration.
5322// The supported range of dates begins 30 days before today and ends
5323// today,
5324// i.e., the limits for these values are:
5325// offset_days >= 0
5326// duration_days >= 1
5327// offset_days + duration_days <= 30
5328type RelativeDateRange struct {
5329	// DurationDays: The number of days in the requested date range, e.g.,
5330	// for a range spanning
5331	// today: 1. For a range spanning the last 7 days: 7.
5332	DurationDays int64 `json:"durationDays,omitempty"`
5333
5334	// OffsetDays: The end date of the filter set, specified as the number
5335	// of days before
5336	// today, e.g., for a range where the last date is today: 0.
5337	OffsetDays int64 `json:"offsetDays,omitempty"`
5338
5339	// ForceSendFields is a list of field names (e.g. "DurationDays") to
5340	// unconditionally include in API requests. By default, fields with
5341	// empty values are omitted from API requests. However, any non-pointer,
5342	// non-interface field appearing in ForceSendFields will be sent to the
5343	// server regardless of whether the field is empty or not. This may be
5344	// used to include empty fields in Patch requests.
5345	ForceSendFields []string `json:"-"`
5346
5347	// NullFields is a list of field names (e.g. "DurationDays") to include
5348	// in API requests with the JSON null value. By default, fields with
5349	// empty values are omitted from API requests. However, any field with
5350	// an empty value appearing in NullFields will be sent to the server as
5351	// null. It is an error if a field in this list has a non-empty value.
5352	// This may be used to include null fields in Patch requests.
5353	NullFields []string `json:"-"`
5354}
5355
5356func (s *RelativeDateRange) MarshalJSON() ([]byte, error) {
5357	type NoMethod RelativeDateRange
5358	raw := NoMethod(*s)
5359	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5360}
5361
5362// RemoveDealAssociationRequest: A request for removing the association
5363// between a deal and a creative.
5364type RemoveDealAssociationRequest struct {
5365	// Association: The association between a creative and a deal that
5366	// should be removed.
5367	Association *CreativeDealAssociation `json:"association,omitempty"`
5368
5369	// ForceSendFields is a list of field names (e.g. "Association") to
5370	// unconditionally include in API requests. By default, fields with
5371	// empty values are omitted from API requests. However, any non-pointer,
5372	// non-interface field appearing in ForceSendFields will be sent to the
5373	// server regardless of whether the field is empty or not. This may be
5374	// used to include empty fields in Patch requests.
5375	ForceSendFields []string `json:"-"`
5376
5377	// NullFields is a list of field names (e.g. "Association") to include
5378	// in API requests with the JSON null value. By default, fields with
5379	// empty values are omitted from API requests. However, any field with
5380	// an empty value appearing in NullFields will be sent to the server as
5381	// null. It is an error if a field in this list has a non-empty value.
5382	// This may be used to include null fields in Patch requests.
5383	NullFields []string `json:"-"`
5384}
5385
5386func (s *RemoveDealAssociationRequest) MarshalJSON() ([]byte, error) {
5387	type NoMethod RemoveDealAssociationRequest
5388	raw := NoMethod(*s)
5389	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5390}
5391
5392// ResumeProposalRequest: Request message to resume (unpause) serving
5393// for an already-finalized
5394// proposal.
5395type ResumeProposalRequest struct {
5396}
5397
5398// RowDimensions: A response may include multiple rows, breaking down
5399// along various dimensions.
5400// Encapsulates the values of all dimensions for a given row.
5401type RowDimensions struct {
5402	// PublisherIdentifier: The publisher identifier for this row, if a
5403	// breakdown
5404	// by
5405	// [BreakdownDimension.PUBLISHER_IDENTIFIER](https://developers.google
5406	// .com/authorized-buyers/apis/reference/rest/v2beta1/bidders.accounts.fi
5407	// lterSets#FilterSet.BreakdownDimension)
5408	// was requested.
5409	PublisherIdentifier string `json:"publisherIdentifier,omitempty"`
5410
5411	// TimeInterval: The time interval that this row represents.
5412	TimeInterval *TimeInterval `json:"timeInterval,omitempty"`
5413
5414	// ForceSendFields is a list of field names (e.g. "PublisherIdentifier")
5415	// to unconditionally include in API requests. By default, fields with
5416	// empty values are omitted from API requests. However, any non-pointer,
5417	// non-interface field appearing in ForceSendFields will be sent to the
5418	// server regardless of whether the field is empty or not. This may be
5419	// used to include empty fields in Patch requests.
5420	ForceSendFields []string `json:"-"`
5421
5422	// NullFields is a list of field names (e.g. "PublisherIdentifier") to
5423	// include in API requests with the JSON null value. By default, fields
5424	// with empty values are omitted from API requests. However, any field
5425	// with an empty value appearing in NullFields will be sent to the
5426	// server as null. It is an error if a field in this list has a
5427	// non-empty value. This may be used to include null fields in Patch
5428	// requests.
5429	NullFields []string `json:"-"`
5430}
5431
5432func (s *RowDimensions) MarshalJSON() ([]byte, error) {
5433	type NoMethod RowDimensions
5434	raw := NoMethod(*s)
5435	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5436}
5437
5438// SecurityContext: Output only. A security context.
5439type SecurityContext struct {
5440	// Securities: The security types in this context.
5441	//
5442	// Possible values:
5443	//   "INSECURE" - Matches impressions that require insecure
5444	// compatibility.
5445	//   "SSL" - Matches impressions that require SSL compatibility.
5446	Securities []string `json:"securities,omitempty"`
5447
5448	// ForceSendFields is a list of field names (e.g. "Securities") to
5449	// unconditionally include in API requests. By default, fields with
5450	// empty values are omitted from API requests. However, any non-pointer,
5451	// non-interface field appearing in ForceSendFields will be sent to the
5452	// server regardless of whether the field is empty or not. This may be
5453	// used to include empty fields in Patch requests.
5454	ForceSendFields []string `json:"-"`
5455
5456	// NullFields is a list of field names (e.g. "Securities") to include in
5457	// API requests with the JSON null value. By default, fields with empty
5458	// values are omitted from API requests. However, any field with an
5459	// empty value appearing in NullFields will be sent to the server as
5460	// null. It is an error if a field in this list has a non-empty value.
5461	// This may be used to include null fields in Patch requests.
5462	NullFields []string `json:"-"`
5463}
5464
5465func (s *SecurityContext) MarshalJSON() ([]byte, error) {
5466	type NoMethod SecurityContext
5467	raw := NoMethod(*s)
5468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5469}
5470
5471// Seller: Represents a seller of inventory. Each seller is identified
5472// by a unique
5473// Ad Manager account ID.
5474type Seller struct {
5475	// AccountId: The unique ID for the seller. The seller fills in this
5476	// field.
5477	// The seller account ID is then available to buyer in the product.
5478	AccountId string `json:"accountId,omitempty"`
5479
5480	// SubAccountId: Optional sub-account ID for the seller.
5481	SubAccountId string `json:"subAccountId,omitempty"`
5482
5483	// ForceSendFields is a list of field names (e.g. "AccountId") to
5484	// unconditionally include in API requests. By default, fields with
5485	// empty values are omitted from API requests. However, any non-pointer,
5486	// non-interface field appearing in ForceSendFields will be sent to the
5487	// server regardless of whether the field is empty or not. This may be
5488	// used to include empty fields in Patch requests.
5489	ForceSendFields []string `json:"-"`
5490
5491	// NullFields is a list of field names (e.g. "AccountId") to include in
5492	// API requests with the JSON null value. By default, fields with empty
5493	// values are omitted from API requests. However, any field with an
5494	// empty value appearing in NullFields will be sent to the server as
5495	// null. It is an error if a field in this list has a non-empty value.
5496	// This may be used to include null fields in Patch requests.
5497	NullFields []string `json:"-"`
5498}
5499
5500func (s *Seller) MarshalJSON() ([]byte, error) {
5501	type NoMethod Seller
5502	raw := NoMethod(*s)
5503	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5504}
5505
5506// ServingContext: The serving context for this restriction.
5507type ServingContext struct {
5508	// All: Matches all contexts.
5509	//
5510	// Possible values:
5511	//   "SIMPLE_CONTEXT" - A simple context.
5512	All string `json:"all,omitempty"`
5513
5514	// AppType: Matches impressions for a particular app type.
5515	AppType *AppContext `json:"appType,omitempty"`
5516
5517	// AuctionType: Matches impressions for a particular auction type.
5518	AuctionType *AuctionContext `json:"auctionType,omitempty"`
5519
5520	// Location: Matches impressions coming from users *or* publishers in a
5521	// specific
5522	// location.
5523	Location *LocationContext `json:"location,omitempty"`
5524
5525	// Platform: Matches impressions coming from a particular platform.
5526	Platform *PlatformContext `json:"platform,omitempty"`
5527
5528	// SecurityType: Matches impressions for a particular security type.
5529	SecurityType *SecurityContext `json:"securityType,omitempty"`
5530
5531	// ForceSendFields is a list of field names (e.g. "All") to
5532	// unconditionally include in API requests. By default, fields with
5533	// empty values are omitted from API requests. However, any non-pointer,
5534	// non-interface field appearing in ForceSendFields will be sent to the
5535	// server regardless of whether the field is empty or not. This may be
5536	// used to include empty fields in Patch requests.
5537	ForceSendFields []string `json:"-"`
5538
5539	// NullFields is a list of field names (e.g. "All") to include in API
5540	// requests with the JSON null value. By default, fields with empty
5541	// values are omitted from API requests. However, any field with an
5542	// empty value appearing in NullFields will be sent to the server as
5543	// null. It is an error if a field in this list has a non-empty value.
5544	// This may be used to include null fields in Patch requests.
5545	NullFields []string `json:"-"`
5546}
5547
5548func (s *ServingContext) MarshalJSON() ([]byte, error) {
5549	type NoMethod ServingContext
5550	raw := NoMethod(*s)
5551	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5552}
5553
5554// ServingRestriction: Output only. A representation of the status of an
5555// ad in a
5556// specific context. A context here relates to where something
5557// ultimately serves
5558// (for example, a user or publisher geo, a platform, an HTTPS vs HTTP
5559// request,
5560// or the type of auction).
5561type ServingRestriction struct {
5562	// Contexts: The contexts for the restriction.
5563	Contexts []*ServingContext `json:"contexts,omitempty"`
5564
5565	// Disapproval: Disapproval bound to this restriction.
5566	// Only present if status=DISAPPROVED.
5567	// Can be used to filter the response of the
5568	// creatives.list
5569	// method.
5570	Disapproval *Disapproval `json:"disapproval,omitempty"`
5571
5572	// DisapprovalReasons: Any disapprovals bound to this restriction.
5573	// Only present if status=DISAPPROVED.
5574	// Can be used to filter the response of
5575	// the
5576	// creatives.list
5577	// method.
5578	// Deprecated; please use
5579	// disapproval
5580	// field instead.
5581	DisapprovalReasons []*Disapproval `json:"disapprovalReasons,omitempty"`
5582
5583	// Status: The status of the creative in this context (for example, it
5584	// has been
5585	// explicitly disapproved or is pending review).
5586	//
5587	// Possible values:
5588	//   "STATUS_UNSPECIFIED" - The status is not known.
5589	//   "DISAPPROVAL" - The ad was disapproved in this context.
5590	//   "PENDING_REVIEW" - The ad is pending review in this context.
5591	Status string `json:"status,omitempty"`
5592
5593	// ForceSendFields is a list of field names (e.g. "Contexts") to
5594	// unconditionally include in API requests. By default, fields with
5595	// empty values are omitted from API requests. However, any non-pointer,
5596	// non-interface field appearing in ForceSendFields will be sent to the
5597	// server regardless of whether the field is empty or not. This may be
5598	// used to include empty fields in Patch requests.
5599	ForceSendFields []string `json:"-"`
5600
5601	// NullFields is a list of field names (e.g. "Contexts") to include in
5602	// API requests with the JSON null value. By default, fields with empty
5603	// values are omitted from API requests. However, any field with an
5604	// empty value appearing in NullFields will be sent to the server as
5605	// null. It is an error if a field in this list has a non-empty value.
5606	// This may be used to include null fields in Patch requests.
5607	NullFields []string `json:"-"`
5608}
5609
5610func (s *ServingRestriction) MarshalJSON() ([]byte, error) {
5611	type NoMethod ServingRestriction
5612	raw := NoMethod(*s)
5613	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5614}
5615
5616// Size: Message depicting the size of the creative. The units of width
5617// and
5618// height depend on the type of the targeting.
5619type Size struct {
5620	// Height: The height of the creative.
5621	Height int64 `json:"height,omitempty"`
5622
5623	// Width: The width of the creative
5624	Width int64 `json:"width,omitempty"`
5625
5626	// ForceSendFields is a list of field names (e.g. "Height") to
5627	// unconditionally include in API requests. By default, fields with
5628	// empty values are omitted from API requests. However, any non-pointer,
5629	// non-interface field appearing in ForceSendFields will be sent to the
5630	// server regardless of whether the field is empty or not. This may be
5631	// used to include empty fields in Patch requests.
5632	ForceSendFields []string `json:"-"`
5633
5634	// NullFields is a list of field names (e.g. "Height") to include in API
5635	// requests with the JSON null value. By default, fields with empty
5636	// values are omitted from API requests. However, any field with an
5637	// empty value appearing in NullFields will be sent to the server as
5638	// null. It is an error if a field in this list has a non-empty value.
5639	// This may be used to include null fields in Patch requests.
5640	NullFields []string `json:"-"`
5641}
5642
5643func (s *Size) MarshalJSON() ([]byte, error) {
5644	type NoMethod Size
5645	raw := NoMethod(*s)
5646	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5647}
5648
5649// StopWatchingCreativeRequest: A request for stopping notifications for
5650// changes to creative Status.
5651type StopWatchingCreativeRequest struct {
5652}
5653
5654// TargetingCriteria: Advertisers can target different attributes of an
5655// ad slot. For example,
5656// they can choose to show ads only if the user is in the U.S.
5657// Such
5658// targeting criteria can be specified as part of Shared Targeting.
5659type TargetingCriteria struct {
5660	// Exclusions: The list of values to exclude from targeting. Each value
5661	// is AND'd
5662	// together.
5663	Exclusions []*TargetingValue `json:"exclusions,omitempty"`
5664
5665	// Inclusions: The list of value to include as part of the targeting.
5666	// Each value is OR'd
5667	// together.
5668	Inclusions []*TargetingValue `json:"inclusions,omitempty"`
5669
5670	// Key: The key representing the shared targeting criterion.
5671	// Targeting criteria defined by Google ad servers will begin with
5672	// GOOG_.
5673	// Third parties may define their own keys.
5674	// A list of permissible keys along with the acceptable values will
5675	// be
5676	// provided as part of the external documentation.
5677	Key string `json:"key,omitempty"`
5678
5679	// ForceSendFields is a list of field names (e.g. "Exclusions") to
5680	// unconditionally include in API requests. By default, fields with
5681	// empty values are omitted from API requests. However, any non-pointer,
5682	// non-interface field appearing in ForceSendFields will be sent to the
5683	// server regardless of whether the field is empty or not. This may be
5684	// used to include empty fields in Patch requests.
5685	ForceSendFields []string `json:"-"`
5686
5687	// NullFields is a list of field names (e.g. "Exclusions") to include in
5688	// API requests with the JSON null value. By default, fields with empty
5689	// values are omitted from API requests. However, any field with an
5690	// empty value appearing in NullFields will be sent to the server as
5691	// null. It is an error if a field in this list has a non-empty value.
5692	// This may be used to include null fields in Patch requests.
5693	NullFields []string `json:"-"`
5694}
5695
5696func (s *TargetingCriteria) MarshalJSON() ([]byte, error) {
5697	type NoMethod TargetingCriteria
5698	raw := NoMethod(*s)
5699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5700}
5701
5702// TargetingValue: A polymorphic targeting value used as part of Shared
5703// Targeting.
5704type TargetingValue struct {
5705	// CreativeSizeValue: The creative size value to include/exclude.
5706	// Filled in when key = GOOG_CREATIVE_SIZE
5707	CreativeSizeValue *CreativeSize `json:"creativeSizeValue,omitempty"`
5708
5709	// DayPartTargetingValue: The daypart targeting to include /
5710	// exclude.
5711	// Filled in when the key is GOOG_DAYPART_TARGETING.
5712	// The definition of this targeting is derived from the structure
5713	// used by Ad Manager.
5714	DayPartTargetingValue *DayPartTargeting `json:"dayPartTargetingValue,omitempty"`
5715
5716	// LongValue: The long value to include/exclude.
5717	LongValue int64 `json:"longValue,omitempty,string"`
5718
5719	// StringValue: The string value to include/exclude.
5720	StringValue string `json:"stringValue,omitempty"`
5721
5722	// ForceSendFields is a list of field names (e.g. "CreativeSizeValue")
5723	// to unconditionally include in API requests. By default, fields with
5724	// empty values are omitted from API requests. However, any non-pointer,
5725	// non-interface field appearing in ForceSendFields will be sent to the
5726	// server regardless of whether the field is empty or not. This may be
5727	// used to include empty fields in Patch requests.
5728	ForceSendFields []string `json:"-"`
5729
5730	// NullFields is a list of field names (e.g. "CreativeSizeValue") to
5731	// include in API requests with the JSON null value. By default, fields
5732	// with empty values are omitted from API requests. However, any field
5733	// with an empty value appearing in NullFields will be sent to the
5734	// server as null. It is an error if a field in this list has a
5735	// non-empty value. This may be used to include null fields in Patch
5736	// requests.
5737	NullFields []string `json:"-"`
5738}
5739
5740func (s *TargetingValue) MarshalJSON() ([]byte, error) {
5741	type NoMethod TargetingValue
5742	raw := NoMethod(*s)
5743	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5744}
5745
5746// TechnologyTargeting: Represents targeting about various types of
5747// technology.
5748type TechnologyTargeting struct {
5749	// DeviceCapabilityTargeting: IDs of device capabilities to be
5750	// included/excluded.
5751	DeviceCapabilityTargeting *CriteriaTargeting `json:"deviceCapabilityTargeting,omitempty"`
5752
5753	// DeviceCategoryTargeting: IDs of device categories to be
5754	// included/excluded.
5755	DeviceCategoryTargeting *CriteriaTargeting `json:"deviceCategoryTargeting,omitempty"`
5756
5757	// OperatingSystemTargeting: Operating system related targeting
5758	// information.
5759	OperatingSystemTargeting *OperatingSystemTargeting `json:"operatingSystemTargeting,omitempty"`
5760
5761	// ForceSendFields is a list of field names (e.g.
5762	// "DeviceCapabilityTargeting") to unconditionally include in API
5763	// requests. By default, fields with empty values are omitted from API
5764	// requests. However, any non-pointer, non-interface field appearing in
5765	// ForceSendFields will be sent to the server regardless of whether the
5766	// field is empty or not. This may be used to include empty fields in
5767	// Patch requests.
5768	ForceSendFields []string `json:"-"`
5769
5770	// NullFields is a list of field names (e.g.
5771	// "DeviceCapabilityTargeting") to include in API requests with the JSON
5772	// null value. By default, fields with empty values are omitted from API
5773	// requests. However, any field with an empty value appearing in
5774	// NullFields will be sent to the server as null. It is an error if a
5775	// field in this list has a non-empty value. This may be used to include
5776	// null fields in Patch requests.
5777	NullFields []string `json:"-"`
5778}
5779
5780func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
5781	type NoMethod TechnologyTargeting
5782	raw := NoMethod(*s)
5783	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5784}
5785
5786// TimeInterval: An interval of time, with an absolute start and end.
5787type TimeInterval struct {
5788	// EndTime: The timestamp marking the end of the range (exclusive) for
5789	// which data is
5790	// included.
5791	EndTime string `json:"endTime,omitempty"`
5792
5793	// StartTime: The timestamp marking the start of the range (inclusive)
5794	// for which data is
5795	// included.
5796	StartTime string `json:"startTime,omitempty"`
5797
5798	// ForceSendFields is a list of field names (e.g. "EndTime") to
5799	// unconditionally include in API requests. By default, fields with
5800	// empty values are omitted from API requests. However, any non-pointer,
5801	// non-interface field appearing in ForceSendFields will be sent to the
5802	// server regardless of whether the field is empty or not. This may be
5803	// used to include empty fields in Patch requests.
5804	ForceSendFields []string `json:"-"`
5805
5806	// NullFields is a list of field names (e.g. "EndTime") to include in
5807	// API requests with the JSON null value. By default, fields with empty
5808	// values are omitted from API requests. However, any field with an
5809	// empty value appearing in NullFields will be sent to the server as
5810	// null. It is an error if a field in this list has a non-empty value.
5811	// This may be used to include null fields in Patch requests.
5812	NullFields []string `json:"-"`
5813}
5814
5815func (s *TimeInterval) MarshalJSON() ([]byte, error) {
5816	type NoMethod TimeInterval
5817	raw := NoMethod(*s)
5818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5819}
5820
5821// TimeOfDay: Represents a time of day. The date and time zone are
5822// either not significant
5823// or are specified elsewhere. An API may choose to allow leap seconds.
5824// Related
5825// types are google.type.Date and `google.protobuf.Timestamp`.
5826type TimeOfDay struct {
5827	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API
5828	// may choose
5829	// to allow the value "24:00:00" for scenarios like business closing
5830	// time.
5831	Hours int64 `json:"hours,omitempty"`
5832
5833	// Minutes: Minutes of hour of day. Must be from 0 to 59.
5834	Minutes int64 `json:"minutes,omitempty"`
5835
5836	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to
5837	// 999,999,999.
5838	Nanos int64 `json:"nanos,omitempty"`
5839
5840	// Seconds: Seconds of minutes of the time. Must normally be from 0 to
5841	// 59. An API may
5842	// allow the value 60 if it allows leap-seconds.
5843	Seconds int64 `json:"seconds,omitempty"`
5844
5845	// ForceSendFields is a list of field names (e.g. "Hours") to
5846	// unconditionally include in API requests. By default, fields with
5847	// empty values are omitted from API requests. However, any non-pointer,
5848	// non-interface field appearing in ForceSendFields will be sent to the
5849	// server regardless of whether the field is empty or not. This may be
5850	// used to include empty fields in Patch requests.
5851	ForceSendFields []string `json:"-"`
5852
5853	// NullFields is a list of field names (e.g. "Hours") to include in API
5854	// requests with the JSON null value. By default, fields with empty
5855	// values are omitted from API requests. However, any field with an
5856	// empty value appearing in NullFields will be sent to the server as
5857	// null. It is an error if a field in this list has a non-empty value.
5858	// This may be used to include null fields in Patch requests.
5859	NullFields []string `json:"-"`
5860}
5861
5862func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
5863	type NoMethod TimeOfDay
5864	raw := NoMethod(*s)
5865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5866}
5867
5868// UrlTargeting: Represents a list of targeted and excluded URLs (e.g.,
5869// google.com).
5870// For Private Auction and AdX Preferred Deals, URLs are either included
5871// or
5872// excluded.
5873// For Programmatic Guaranteed and Preferred Deals, this doesn't
5874// apply.
5875type UrlTargeting struct {
5876	// ExcludedUrls: A list of URLs to be excluded.
5877	ExcludedUrls []string `json:"excludedUrls,omitempty"`
5878
5879	// TargetedUrls: A list of URLs to be included.
5880	TargetedUrls []string `json:"targetedUrls,omitempty"`
5881
5882	// ForceSendFields is a list of field names (e.g. "ExcludedUrls") to
5883	// unconditionally include in API requests. By default, fields with
5884	// empty values are omitted from API requests. However, any non-pointer,
5885	// non-interface field appearing in ForceSendFields will be sent to the
5886	// server regardless of whether the field is empty or not. This may be
5887	// used to include empty fields in Patch requests.
5888	ForceSendFields []string `json:"-"`
5889
5890	// NullFields is a list of field names (e.g. "ExcludedUrls") to include
5891	// in API requests with the JSON null value. By default, fields with
5892	// empty values are omitted from API requests. However, any field with
5893	// an empty value appearing in NullFields will be sent to the server as
5894	// null. It is an error if a field in this list has a non-empty value.
5895	// This may be used to include null fields in Patch requests.
5896	NullFields []string `json:"-"`
5897}
5898
5899func (s *UrlTargeting) MarshalJSON() ([]byte, error) {
5900	type NoMethod UrlTargeting
5901	raw := NoMethod(*s)
5902	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5903}
5904
5905// VideoContent: Video content for a creative.
5906type VideoContent struct {
5907	// VideoUrl: The URL to fetch a video ad.
5908	VideoUrl string `json:"videoUrl,omitempty"`
5909
5910	// VideoVastXml: The contents of a VAST document for a video ad.
5911	// This document should conform to the VAST 2.0 or 3.0 standard.
5912	VideoVastXml string `json:"videoVastXml,omitempty"`
5913
5914	// ForceSendFields is a list of field names (e.g. "VideoUrl") to
5915	// unconditionally include in API requests. By default, fields with
5916	// empty values are omitted from API requests. However, any non-pointer,
5917	// non-interface field appearing in ForceSendFields will be sent to the
5918	// server regardless of whether the field is empty or not. This may be
5919	// used to include empty fields in Patch requests.
5920	ForceSendFields []string `json:"-"`
5921
5922	// NullFields is a list of field names (e.g. "VideoUrl") to include in
5923	// API requests with the JSON null value. By default, fields with empty
5924	// values are omitted from API requests. However, any field with an
5925	// empty value appearing in NullFields will be sent to the server as
5926	// null. It is an error if a field in this list has a non-empty value.
5927	// This may be used to include null fields in Patch requests.
5928	NullFields []string `json:"-"`
5929}
5930
5931func (s *VideoContent) MarshalJSON() ([]byte, error) {
5932	type NoMethod VideoContent
5933	raw := NoMethod(*s)
5934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5935}
5936
5937// VideoTargeting: Represents targeting information about video.
5938type VideoTargeting struct {
5939	// ExcludedPositionTypes: A list of video positions to be
5940	// excluded.
5941	// Position types can either be included or excluded (XOR).
5942	//
5943	// Possible values:
5944	//   "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video
5945	// position.
5946	//   "PREROLL" - Ad is played before the video.
5947	//   "MIDROLL" - Ad is played during the video.
5948	//   "POSTROLL" - Ad is played after the video.
5949	ExcludedPositionTypes []string `json:"excludedPositionTypes,omitempty"`
5950
5951	// TargetedPositionTypes: A list of video positions to be included.
5952	// When the included list is present, the excluded list must be
5953	// empty.
5954	// When the excluded list is present, the included list must be empty.
5955	//
5956	// Possible values:
5957	//   "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video
5958	// position.
5959	//   "PREROLL" - Ad is played before the video.
5960	//   "MIDROLL" - Ad is played during the video.
5961	//   "POSTROLL" - Ad is played after the video.
5962	TargetedPositionTypes []string `json:"targetedPositionTypes,omitempty"`
5963
5964	// ForceSendFields is a list of field names (e.g.
5965	// "ExcludedPositionTypes") to unconditionally include in API requests.
5966	// By default, fields with empty values are omitted from API requests.
5967	// However, any non-pointer, non-interface field appearing in
5968	// ForceSendFields will be sent to the server regardless of whether the
5969	// field is empty or not. This may be used to include empty fields in
5970	// Patch requests.
5971	ForceSendFields []string `json:"-"`
5972
5973	// NullFields is a list of field names (e.g. "ExcludedPositionTypes") to
5974	// include in API requests with the JSON null value. By default, fields
5975	// with empty values are omitted from API requests. However, any field
5976	// with an empty value appearing in NullFields will be sent to the
5977	// server as null. It is an error if a field in this list has a
5978	// non-empty value. This may be used to include null fields in Patch
5979	// requests.
5980	NullFields []string `json:"-"`
5981}
5982
5983func (s *VideoTargeting) MarshalJSON() ([]byte, error) {
5984	type NoMethod VideoTargeting
5985	raw := NoMethod(*s)
5986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5987}
5988
5989// WatchCreativeRequest: A request for watching changes to creative
5990// Status.
5991type WatchCreativeRequest struct {
5992	// Topic: The Pub/Sub topic to publish notifications to.
5993	// This topic must already exist and must give permission
5994	// to
5995	// ad-exchange-buyside-reports@google.com to write to the topic.
5996	// This should be the full resource name
5997	// in
5998	// "projects/{project_id}/topics/{topic_id}" format.
5999	Topic string `json:"topic,omitempty"`
6000
6001	// ForceSendFields is a list of field names (e.g. "Topic") to
6002	// unconditionally include in API requests. By default, fields with
6003	// empty values are omitted from API requests. However, any non-pointer,
6004	// non-interface field appearing in ForceSendFields will be sent to the
6005	// server regardless of whether the field is empty or not. This may be
6006	// used to include empty fields in Patch requests.
6007	ForceSendFields []string `json:"-"`
6008
6009	// NullFields is a list of field names (e.g. "Topic") to include in API
6010	// requests with the JSON null value. By default, fields with empty
6011	// values are omitted from API requests. However, any field with an
6012	// empty value appearing in NullFields will be sent to the server as
6013	// null. It is an error if a field in this list has a non-empty value.
6014	// This may be used to include null fields in Patch requests.
6015	NullFields []string `json:"-"`
6016}
6017
6018func (s *WatchCreativeRequest) MarshalJSON() ([]byte, error) {
6019	type NoMethod WatchCreativeRequest
6020	raw := NoMethod(*s)
6021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6022}
6023
6024// method id "adexchangebuyer2.accounts.clients.create":
6025
6026type AccountsClientsCreateCall struct {
6027	s          *Service
6028	accountId  int64
6029	client     *Client
6030	urlParams_ gensupport.URLParams
6031	ctx_       context.Context
6032	header_    http.Header
6033}
6034
6035// Create: Creates a new client buyer.
6036func (r *AccountsClientsService) Create(accountId int64, client *Client) *AccountsClientsCreateCall {
6037	c := &AccountsClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6038	c.accountId = accountId
6039	c.client = client
6040	return c
6041}
6042
6043// Fields allows partial responses to be retrieved. See
6044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6045// for more information.
6046func (c *AccountsClientsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsCreateCall {
6047	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6048	return c
6049}
6050
6051// Context sets the context to be used in this call's Do method. Any
6052// pending HTTP request will be aborted if the provided context is
6053// canceled.
6054func (c *AccountsClientsCreateCall) Context(ctx context.Context) *AccountsClientsCreateCall {
6055	c.ctx_ = ctx
6056	return c
6057}
6058
6059// Header returns an http.Header that can be modified by the caller to
6060// add HTTP headers to the request.
6061func (c *AccountsClientsCreateCall) Header() http.Header {
6062	if c.header_ == nil {
6063		c.header_ = make(http.Header)
6064	}
6065	return c.header_
6066}
6067
6068func (c *AccountsClientsCreateCall) doRequest(alt string) (*http.Response, error) {
6069	reqHeaders := make(http.Header)
6070	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
6071	for k, v := range c.header_ {
6072		reqHeaders[k] = v
6073	}
6074	reqHeaders.Set("User-Agent", c.s.userAgent())
6075	var body io.Reader = nil
6076	body, err := googleapi.WithoutDataWrapper.JSONReader(c.client)
6077	if err != nil {
6078		return nil, err
6079	}
6080	reqHeaders.Set("Content-Type", "application/json")
6081	c.urlParams_.Set("alt", alt)
6082	c.urlParams_.Set("prettyPrint", "false")
6083	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients")
6084	urls += "?" + c.urlParams_.Encode()
6085	req, err := http.NewRequest("POST", urls, body)
6086	if err != nil {
6087		return nil, err
6088	}
6089	req.Header = reqHeaders
6090	googleapi.Expand(req.URL, map[string]string{
6091		"accountId": strconv.FormatInt(c.accountId, 10),
6092	})
6093	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6094}
6095
6096// Do executes the "adexchangebuyer2.accounts.clients.create" call.
6097// Exactly one of *Client or error will be non-nil. Any non-2xx status
6098// code is an error. Response headers are in either
6099// *Client.ServerResponse.Header or (if a response was returned at all)
6100// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6101// check whether the returned error was because http.StatusNotModified
6102// was returned.
6103func (c *AccountsClientsCreateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
6104	gensupport.SetOptions(c.urlParams_, opts...)
6105	res, err := c.doRequest("json")
6106	if res != nil && res.StatusCode == http.StatusNotModified {
6107		if res.Body != nil {
6108			res.Body.Close()
6109		}
6110		return nil, &googleapi.Error{
6111			Code:   res.StatusCode,
6112			Header: res.Header,
6113		}
6114	}
6115	if err != nil {
6116		return nil, err
6117	}
6118	defer googleapi.CloseBody(res)
6119	if err := googleapi.CheckResponse(res); err != nil {
6120		return nil, err
6121	}
6122	ret := &Client{
6123		ServerResponse: googleapi.ServerResponse{
6124			Header:         res.Header,
6125			HTTPStatusCode: res.StatusCode,
6126		},
6127	}
6128	target := &ret
6129	if err := gensupport.DecodeResponse(target, res); err != nil {
6130		return nil, err
6131	}
6132	return ret, nil
6133	// {
6134	//   "description": "Creates a new client buyer.",
6135	//   "flatPath": "v2beta1/accounts/{accountId}/clients",
6136	//   "httpMethod": "POST",
6137	//   "id": "adexchangebuyer2.accounts.clients.create",
6138	//   "parameterOrder": [
6139	//     "accountId"
6140	//   ],
6141	//   "parameters": {
6142	//     "accountId": {
6143	//       "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)",
6144	//       "format": "int64",
6145	//       "location": "path",
6146	//       "required": true,
6147	//       "type": "string"
6148	//     }
6149	//   },
6150	//   "path": "v2beta1/accounts/{accountId}/clients",
6151	//   "request": {
6152	//     "$ref": "Client"
6153	//   },
6154	//   "response": {
6155	//     "$ref": "Client"
6156	//   },
6157	//   "scopes": [
6158	//     "https://www.googleapis.com/auth/adexchange.buyer"
6159	//   ]
6160	// }
6161
6162}
6163
6164// method id "adexchangebuyer2.accounts.clients.get":
6165
6166type AccountsClientsGetCall struct {
6167	s               *Service
6168	accountId       int64
6169	clientAccountId int64
6170	urlParams_      gensupport.URLParams
6171	ifNoneMatch_    string
6172	ctx_            context.Context
6173	header_         http.Header
6174}
6175
6176// Get: Gets a client buyer with a given client account ID.
6177func (r *AccountsClientsService) Get(accountId int64, clientAccountId int64) *AccountsClientsGetCall {
6178	c := &AccountsClientsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6179	c.accountId = accountId
6180	c.clientAccountId = clientAccountId
6181	return c
6182}
6183
6184// Fields allows partial responses to be retrieved. See
6185// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6186// for more information.
6187func (c *AccountsClientsGetCall) Fields(s ...googleapi.Field) *AccountsClientsGetCall {
6188	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6189	return c
6190}
6191
6192// IfNoneMatch sets the optional parameter which makes the operation
6193// fail if the object's ETag matches the given value. This is useful for
6194// getting updates only after the object has changed since the last
6195// request. Use googleapi.IsNotModified to check whether the response
6196// error from Do is the result of In-None-Match.
6197func (c *AccountsClientsGetCall) IfNoneMatch(entityTag string) *AccountsClientsGetCall {
6198	c.ifNoneMatch_ = entityTag
6199	return c
6200}
6201
6202// Context sets the context to be used in this call's Do method. Any
6203// pending HTTP request will be aborted if the provided context is
6204// canceled.
6205func (c *AccountsClientsGetCall) Context(ctx context.Context) *AccountsClientsGetCall {
6206	c.ctx_ = ctx
6207	return c
6208}
6209
6210// Header returns an http.Header that can be modified by the caller to
6211// add HTTP headers to the request.
6212func (c *AccountsClientsGetCall) Header() http.Header {
6213	if c.header_ == nil {
6214		c.header_ = make(http.Header)
6215	}
6216	return c.header_
6217}
6218
6219func (c *AccountsClientsGetCall) doRequest(alt string) (*http.Response, error) {
6220	reqHeaders := make(http.Header)
6221	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
6222	for k, v := range c.header_ {
6223		reqHeaders[k] = v
6224	}
6225	reqHeaders.Set("User-Agent", c.s.userAgent())
6226	if c.ifNoneMatch_ != "" {
6227		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6228	}
6229	var body io.Reader = nil
6230	c.urlParams_.Set("alt", alt)
6231	c.urlParams_.Set("prettyPrint", "false")
6232	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}")
6233	urls += "?" + c.urlParams_.Encode()
6234	req, err := http.NewRequest("GET", urls, body)
6235	if err != nil {
6236		return nil, err
6237	}
6238	req.Header = reqHeaders
6239	googleapi.Expand(req.URL, map[string]string{
6240		"accountId":       strconv.FormatInt(c.accountId, 10),
6241		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6242	})
6243	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6244}
6245
6246// Do executes the "adexchangebuyer2.accounts.clients.get" call.
6247// Exactly one of *Client or error will be non-nil. Any non-2xx status
6248// code is an error. Response headers are in either
6249// *Client.ServerResponse.Header or (if a response was returned at all)
6250// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6251// check whether the returned error was because http.StatusNotModified
6252// was returned.
6253func (c *AccountsClientsGetCall) Do(opts ...googleapi.CallOption) (*Client, error) {
6254	gensupport.SetOptions(c.urlParams_, opts...)
6255	res, err := c.doRequest("json")
6256	if res != nil && res.StatusCode == http.StatusNotModified {
6257		if res.Body != nil {
6258			res.Body.Close()
6259		}
6260		return nil, &googleapi.Error{
6261			Code:   res.StatusCode,
6262			Header: res.Header,
6263		}
6264	}
6265	if err != nil {
6266		return nil, err
6267	}
6268	defer googleapi.CloseBody(res)
6269	if err := googleapi.CheckResponse(res); err != nil {
6270		return nil, err
6271	}
6272	ret := &Client{
6273		ServerResponse: googleapi.ServerResponse{
6274			Header:         res.Header,
6275			HTTPStatusCode: res.StatusCode,
6276		},
6277	}
6278	target := &ret
6279	if err := gensupport.DecodeResponse(target, res); err != nil {
6280		return nil, err
6281	}
6282	return ret, nil
6283	// {
6284	//   "description": "Gets a client buyer with a given client account ID.",
6285	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6286	//   "httpMethod": "GET",
6287	//   "id": "adexchangebuyer2.accounts.clients.get",
6288	//   "parameterOrder": [
6289	//     "accountId",
6290	//     "clientAccountId"
6291	//   ],
6292	//   "parameters": {
6293	//     "accountId": {
6294	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6295	//       "format": "int64",
6296	//       "location": "path",
6297	//       "required": true,
6298	//       "type": "string"
6299	//     },
6300	//     "clientAccountId": {
6301	//       "description": "Numerical account ID of the client buyer to retrieve. (required)",
6302	//       "format": "int64",
6303	//       "location": "path",
6304	//       "required": true,
6305	//       "type": "string"
6306	//     }
6307	//   },
6308	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6309	//   "response": {
6310	//     "$ref": "Client"
6311	//   },
6312	//   "scopes": [
6313	//     "https://www.googleapis.com/auth/adexchange.buyer"
6314	//   ]
6315	// }
6316
6317}
6318
6319// method id "adexchangebuyer2.accounts.clients.list":
6320
6321type AccountsClientsListCall struct {
6322	s            *Service
6323	accountId    int64
6324	urlParams_   gensupport.URLParams
6325	ifNoneMatch_ string
6326	ctx_         context.Context
6327	header_      http.Header
6328}
6329
6330// List: Lists all the clients for the current sponsor buyer.
6331func (r *AccountsClientsService) List(accountId int64) *AccountsClientsListCall {
6332	c := &AccountsClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6333	c.accountId = accountId
6334	return c
6335}
6336
6337// PageSize sets the optional parameter "pageSize": Requested page size.
6338// The server may return fewer clients than requested.
6339// If unspecified, the server will pick an appropriate default.
6340func (c *AccountsClientsListCall) PageSize(pageSize int64) *AccountsClientsListCall {
6341	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6342	return c
6343}
6344
6345// PageToken sets the optional parameter "pageToken": A token
6346// identifying a page of results the server should return.
6347// Typically, this is the value
6348// of
6349// ListClientsResponse.nextPageToken
6350// returned from the previous call to the
6351// accounts.clients.list
6352// method.
6353func (c *AccountsClientsListCall) PageToken(pageToken string) *AccountsClientsListCall {
6354	c.urlParams_.Set("pageToken", pageToken)
6355	return c
6356}
6357
6358// PartnerClientId sets the optional parameter "partnerClientId":
6359// Optional unique identifier (from the standpoint of an Ad Exchange
6360// sponsor
6361// buyer partner) of the client to return.
6362// If specified, at most one client will be returned in the response.
6363func (c *AccountsClientsListCall) PartnerClientId(partnerClientId string) *AccountsClientsListCall {
6364	c.urlParams_.Set("partnerClientId", partnerClientId)
6365	return c
6366}
6367
6368// Fields allows partial responses to be retrieved. See
6369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6370// for more information.
6371func (c *AccountsClientsListCall) Fields(s ...googleapi.Field) *AccountsClientsListCall {
6372	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6373	return c
6374}
6375
6376// IfNoneMatch sets the optional parameter which makes the operation
6377// fail if the object's ETag matches the given value. This is useful for
6378// getting updates only after the object has changed since the last
6379// request. Use googleapi.IsNotModified to check whether the response
6380// error from Do is the result of In-None-Match.
6381func (c *AccountsClientsListCall) IfNoneMatch(entityTag string) *AccountsClientsListCall {
6382	c.ifNoneMatch_ = entityTag
6383	return c
6384}
6385
6386// Context sets the context to be used in this call's Do method. Any
6387// pending HTTP request will be aborted if the provided context is
6388// canceled.
6389func (c *AccountsClientsListCall) Context(ctx context.Context) *AccountsClientsListCall {
6390	c.ctx_ = ctx
6391	return c
6392}
6393
6394// Header returns an http.Header that can be modified by the caller to
6395// add HTTP headers to the request.
6396func (c *AccountsClientsListCall) Header() http.Header {
6397	if c.header_ == nil {
6398		c.header_ = make(http.Header)
6399	}
6400	return c.header_
6401}
6402
6403func (c *AccountsClientsListCall) doRequest(alt string) (*http.Response, error) {
6404	reqHeaders := make(http.Header)
6405	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
6406	for k, v := range c.header_ {
6407		reqHeaders[k] = v
6408	}
6409	reqHeaders.Set("User-Agent", c.s.userAgent())
6410	if c.ifNoneMatch_ != "" {
6411		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6412	}
6413	var body io.Reader = nil
6414	c.urlParams_.Set("alt", alt)
6415	c.urlParams_.Set("prettyPrint", "false")
6416	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients")
6417	urls += "?" + c.urlParams_.Encode()
6418	req, err := http.NewRequest("GET", urls, body)
6419	if err != nil {
6420		return nil, err
6421	}
6422	req.Header = reqHeaders
6423	googleapi.Expand(req.URL, map[string]string{
6424		"accountId": strconv.FormatInt(c.accountId, 10),
6425	})
6426	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6427}
6428
6429// Do executes the "adexchangebuyer2.accounts.clients.list" call.
6430// Exactly one of *ListClientsResponse or error will be non-nil. Any
6431// non-2xx status code is an error. Response headers are in either
6432// *ListClientsResponse.ServerResponse.Header or (if a response was
6433// returned at all) in error.(*googleapi.Error).Header. Use
6434// googleapi.IsNotModified to check whether the returned error was
6435// because http.StatusNotModified was returned.
6436func (c *AccountsClientsListCall) Do(opts ...googleapi.CallOption) (*ListClientsResponse, error) {
6437	gensupport.SetOptions(c.urlParams_, opts...)
6438	res, err := c.doRequest("json")
6439	if res != nil && res.StatusCode == http.StatusNotModified {
6440		if res.Body != nil {
6441			res.Body.Close()
6442		}
6443		return nil, &googleapi.Error{
6444			Code:   res.StatusCode,
6445			Header: res.Header,
6446		}
6447	}
6448	if err != nil {
6449		return nil, err
6450	}
6451	defer googleapi.CloseBody(res)
6452	if err := googleapi.CheckResponse(res); err != nil {
6453		return nil, err
6454	}
6455	ret := &ListClientsResponse{
6456		ServerResponse: googleapi.ServerResponse{
6457			Header:         res.Header,
6458			HTTPStatusCode: res.StatusCode,
6459		},
6460	}
6461	target := &ret
6462	if err := gensupport.DecodeResponse(target, res); err != nil {
6463		return nil, err
6464	}
6465	return ret, nil
6466	// {
6467	//   "description": "Lists all the clients for the current sponsor buyer.",
6468	//   "flatPath": "v2beta1/accounts/{accountId}/clients",
6469	//   "httpMethod": "GET",
6470	//   "id": "adexchangebuyer2.accounts.clients.list",
6471	//   "parameterOrder": [
6472	//     "accountId"
6473	//   ],
6474	//   "parameters": {
6475	//     "accountId": {
6476	//       "description": "Unique numerical account ID of the sponsor buyer to list the clients for.",
6477	//       "format": "int64",
6478	//       "location": "path",
6479	//       "required": true,
6480	//       "type": "string"
6481	//     },
6482	//     "pageSize": {
6483	//       "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.",
6484	//       "format": "int32",
6485	//       "location": "query",
6486	//       "type": "integer"
6487	//     },
6488	//     "pageToken": {
6489	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list\nmethod.",
6490	//       "location": "query",
6491	//       "type": "string"
6492	//     },
6493	//     "partnerClientId": {
6494	//       "description": "Optional unique identifier (from the standpoint of an Ad Exchange sponsor\nbuyer partner) of the client to return.\nIf specified, at most one client will be returned in the response.",
6495	//       "location": "query",
6496	//       "type": "string"
6497	//     }
6498	//   },
6499	//   "path": "v2beta1/accounts/{accountId}/clients",
6500	//   "response": {
6501	//     "$ref": "ListClientsResponse"
6502	//   },
6503	//   "scopes": [
6504	//     "https://www.googleapis.com/auth/adexchange.buyer"
6505	//   ]
6506	// }
6507
6508}
6509
6510// Pages invokes f for each page of results.
6511// A non-nil error returned from f will halt the iteration.
6512// The provided context supersedes any context provided to the Context method.
6513func (c *AccountsClientsListCall) Pages(ctx context.Context, f func(*ListClientsResponse) error) error {
6514	c.ctx_ = ctx
6515	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6516	for {
6517		x, err := c.Do()
6518		if err != nil {
6519			return err
6520		}
6521		if err := f(x); err != nil {
6522			return err
6523		}
6524		if x.NextPageToken == "" {
6525			return nil
6526		}
6527		c.PageToken(x.NextPageToken)
6528	}
6529}
6530
6531// method id "adexchangebuyer2.accounts.clients.update":
6532
6533type AccountsClientsUpdateCall struct {
6534	s               *Service
6535	accountId       int64
6536	clientAccountId int64
6537	client          *Client
6538	urlParams_      gensupport.URLParams
6539	ctx_            context.Context
6540	header_         http.Header
6541}
6542
6543// Update: Updates an existing client buyer.
6544func (r *AccountsClientsService) Update(accountId int64, clientAccountId int64, client *Client) *AccountsClientsUpdateCall {
6545	c := &AccountsClientsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6546	c.accountId = accountId
6547	c.clientAccountId = clientAccountId
6548	c.client = client
6549	return c
6550}
6551
6552// Fields allows partial responses to be retrieved. See
6553// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6554// for more information.
6555func (c *AccountsClientsUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUpdateCall {
6556	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6557	return c
6558}
6559
6560// Context sets the context to be used in this call's Do method. Any
6561// pending HTTP request will be aborted if the provided context is
6562// canceled.
6563func (c *AccountsClientsUpdateCall) Context(ctx context.Context) *AccountsClientsUpdateCall {
6564	c.ctx_ = ctx
6565	return c
6566}
6567
6568// Header returns an http.Header that can be modified by the caller to
6569// add HTTP headers to the request.
6570func (c *AccountsClientsUpdateCall) Header() http.Header {
6571	if c.header_ == nil {
6572		c.header_ = make(http.Header)
6573	}
6574	return c.header_
6575}
6576
6577func (c *AccountsClientsUpdateCall) doRequest(alt string) (*http.Response, error) {
6578	reqHeaders := make(http.Header)
6579	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
6580	for k, v := range c.header_ {
6581		reqHeaders[k] = v
6582	}
6583	reqHeaders.Set("User-Agent", c.s.userAgent())
6584	var body io.Reader = nil
6585	body, err := googleapi.WithoutDataWrapper.JSONReader(c.client)
6586	if err != nil {
6587		return nil, err
6588	}
6589	reqHeaders.Set("Content-Type", "application/json")
6590	c.urlParams_.Set("alt", alt)
6591	c.urlParams_.Set("prettyPrint", "false")
6592	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}")
6593	urls += "?" + c.urlParams_.Encode()
6594	req, err := http.NewRequest("PUT", urls, body)
6595	if err != nil {
6596		return nil, err
6597	}
6598	req.Header = reqHeaders
6599	googleapi.Expand(req.URL, map[string]string{
6600		"accountId":       strconv.FormatInt(c.accountId, 10),
6601		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6602	})
6603	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6604}
6605
6606// Do executes the "adexchangebuyer2.accounts.clients.update" call.
6607// Exactly one of *Client or error will be non-nil. Any non-2xx status
6608// code is an error. Response headers are in either
6609// *Client.ServerResponse.Header or (if a response was returned at all)
6610// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6611// check whether the returned error was because http.StatusNotModified
6612// was returned.
6613func (c *AccountsClientsUpdateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
6614	gensupport.SetOptions(c.urlParams_, opts...)
6615	res, err := c.doRequest("json")
6616	if res != nil && res.StatusCode == http.StatusNotModified {
6617		if res.Body != nil {
6618			res.Body.Close()
6619		}
6620		return nil, &googleapi.Error{
6621			Code:   res.StatusCode,
6622			Header: res.Header,
6623		}
6624	}
6625	if err != nil {
6626		return nil, err
6627	}
6628	defer googleapi.CloseBody(res)
6629	if err := googleapi.CheckResponse(res); err != nil {
6630		return nil, err
6631	}
6632	ret := &Client{
6633		ServerResponse: googleapi.ServerResponse{
6634			Header:         res.Header,
6635			HTTPStatusCode: res.StatusCode,
6636		},
6637	}
6638	target := &ret
6639	if err := gensupport.DecodeResponse(target, res); err != nil {
6640		return nil, err
6641	}
6642	return ret, nil
6643	// {
6644	//   "description": "Updates an existing client buyer.",
6645	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6646	//   "httpMethod": "PUT",
6647	//   "id": "adexchangebuyer2.accounts.clients.update",
6648	//   "parameterOrder": [
6649	//     "accountId",
6650	//     "clientAccountId"
6651	//   ],
6652	//   "parameters": {
6653	//     "accountId": {
6654	//       "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)",
6655	//       "format": "int64",
6656	//       "location": "path",
6657	//       "required": true,
6658	//       "type": "string"
6659	//     },
6660	//     "clientAccountId": {
6661	//       "description": "Unique numerical account ID of the client to update. (required)",
6662	//       "format": "int64",
6663	//       "location": "path",
6664	//       "required": true,
6665	//       "type": "string"
6666	//     }
6667	//   },
6668	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}",
6669	//   "request": {
6670	//     "$ref": "Client"
6671	//   },
6672	//   "response": {
6673	//     "$ref": "Client"
6674	//   },
6675	//   "scopes": [
6676	//     "https://www.googleapis.com/auth/adexchange.buyer"
6677	//   ]
6678	// }
6679
6680}
6681
6682// method id "adexchangebuyer2.accounts.clients.invitations.create":
6683
6684type AccountsClientsInvitationsCreateCall struct {
6685	s                    *Service
6686	accountId            int64
6687	clientAccountId      int64
6688	clientuserinvitation *ClientUserInvitation
6689	urlParams_           gensupport.URLParams
6690	ctx_                 context.Context
6691	header_              http.Header
6692}
6693
6694// Create: Creates and sends out an email invitation to access
6695// an Ad Exchange client buyer account.
6696func (r *AccountsClientsInvitationsService) Create(accountId int64, clientAccountId int64, clientuserinvitation *ClientUserInvitation) *AccountsClientsInvitationsCreateCall {
6697	c := &AccountsClientsInvitationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6698	c.accountId = accountId
6699	c.clientAccountId = clientAccountId
6700	c.clientuserinvitation = clientuserinvitation
6701	return c
6702}
6703
6704// Fields allows partial responses to be retrieved. See
6705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6706// for more information.
6707func (c *AccountsClientsInvitationsCreateCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsCreateCall {
6708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6709	return c
6710}
6711
6712// Context sets the context to be used in this call's Do method. Any
6713// pending HTTP request will be aborted if the provided context is
6714// canceled.
6715func (c *AccountsClientsInvitationsCreateCall) Context(ctx context.Context) *AccountsClientsInvitationsCreateCall {
6716	c.ctx_ = ctx
6717	return c
6718}
6719
6720// Header returns an http.Header that can be modified by the caller to
6721// add HTTP headers to the request.
6722func (c *AccountsClientsInvitationsCreateCall) Header() http.Header {
6723	if c.header_ == nil {
6724		c.header_ = make(http.Header)
6725	}
6726	return c.header_
6727}
6728
6729func (c *AccountsClientsInvitationsCreateCall) doRequest(alt string) (*http.Response, error) {
6730	reqHeaders := make(http.Header)
6731	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
6732	for k, v := range c.header_ {
6733		reqHeaders[k] = v
6734	}
6735	reqHeaders.Set("User-Agent", c.s.userAgent())
6736	var body io.Reader = nil
6737	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuserinvitation)
6738	if err != nil {
6739		return nil, err
6740	}
6741	reqHeaders.Set("Content-Type", "application/json")
6742	c.urlParams_.Set("alt", alt)
6743	c.urlParams_.Set("prettyPrint", "false")
6744	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations")
6745	urls += "?" + c.urlParams_.Encode()
6746	req, err := http.NewRequest("POST", urls, body)
6747	if err != nil {
6748		return nil, err
6749	}
6750	req.Header = reqHeaders
6751	googleapi.Expand(req.URL, map[string]string{
6752		"accountId":       strconv.FormatInt(c.accountId, 10),
6753		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6754	})
6755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6756}
6757
6758// Do executes the "adexchangebuyer2.accounts.clients.invitations.create" call.
6759// Exactly one of *ClientUserInvitation or error will be non-nil. Any
6760// non-2xx status code is an error. Response headers are in either
6761// *ClientUserInvitation.ServerResponse.Header or (if a response was
6762// returned at all) in error.(*googleapi.Error).Header. Use
6763// googleapi.IsNotModified to check whether the returned error was
6764// because http.StatusNotModified was returned.
6765func (c *AccountsClientsInvitationsCreateCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) {
6766	gensupport.SetOptions(c.urlParams_, opts...)
6767	res, err := c.doRequest("json")
6768	if res != nil && res.StatusCode == http.StatusNotModified {
6769		if res.Body != nil {
6770			res.Body.Close()
6771		}
6772		return nil, &googleapi.Error{
6773			Code:   res.StatusCode,
6774			Header: res.Header,
6775		}
6776	}
6777	if err != nil {
6778		return nil, err
6779	}
6780	defer googleapi.CloseBody(res)
6781	if err := googleapi.CheckResponse(res); err != nil {
6782		return nil, err
6783	}
6784	ret := &ClientUserInvitation{
6785		ServerResponse: googleapi.ServerResponse{
6786			Header:         res.Header,
6787			HTTPStatusCode: res.StatusCode,
6788		},
6789	}
6790	target := &ret
6791	if err := gensupport.DecodeResponse(target, res); err != nil {
6792		return nil, err
6793	}
6794	return ret, nil
6795	// {
6796	//   "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account.",
6797	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
6798	//   "httpMethod": "POST",
6799	//   "id": "adexchangebuyer2.accounts.clients.invitations.create",
6800	//   "parameterOrder": [
6801	//     "accountId",
6802	//     "clientAccountId"
6803	//   ],
6804	//   "parameters": {
6805	//     "accountId": {
6806	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6807	//       "format": "int64",
6808	//       "location": "path",
6809	//       "required": true,
6810	//       "type": "string"
6811	//     },
6812	//     "clientAccountId": {
6813	//       "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)",
6814	//       "format": "int64",
6815	//       "location": "path",
6816	//       "required": true,
6817	//       "type": "string"
6818	//     }
6819	//   },
6820	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
6821	//   "request": {
6822	//     "$ref": "ClientUserInvitation"
6823	//   },
6824	//   "response": {
6825	//     "$ref": "ClientUserInvitation"
6826	//   },
6827	//   "scopes": [
6828	//     "https://www.googleapis.com/auth/adexchange.buyer"
6829	//   ]
6830	// }
6831
6832}
6833
6834// method id "adexchangebuyer2.accounts.clients.invitations.get":
6835
6836type AccountsClientsInvitationsGetCall struct {
6837	s               *Service
6838	accountId       int64
6839	clientAccountId int64
6840	invitationId    int64
6841	urlParams_      gensupport.URLParams
6842	ifNoneMatch_    string
6843	ctx_            context.Context
6844	header_         http.Header
6845}
6846
6847// Get: Retrieves an existing client user invitation.
6848func (r *AccountsClientsInvitationsService) Get(accountId int64, clientAccountId int64, invitationId int64) *AccountsClientsInvitationsGetCall {
6849	c := &AccountsClientsInvitationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6850	c.accountId = accountId
6851	c.clientAccountId = clientAccountId
6852	c.invitationId = invitationId
6853	return c
6854}
6855
6856// Fields allows partial responses to be retrieved. See
6857// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6858// for more information.
6859func (c *AccountsClientsInvitationsGetCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsGetCall {
6860	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6861	return c
6862}
6863
6864// IfNoneMatch sets the optional parameter which makes the operation
6865// fail if the object's ETag matches the given value. This is useful for
6866// getting updates only after the object has changed since the last
6867// request. Use googleapi.IsNotModified to check whether the response
6868// error from Do is the result of In-None-Match.
6869func (c *AccountsClientsInvitationsGetCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsGetCall {
6870	c.ifNoneMatch_ = entityTag
6871	return c
6872}
6873
6874// Context sets the context to be used in this call's Do method. Any
6875// pending HTTP request will be aborted if the provided context is
6876// canceled.
6877func (c *AccountsClientsInvitationsGetCall) Context(ctx context.Context) *AccountsClientsInvitationsGetCall {
6878	c.ctx_ = ctx
6879	return c
6880}
6881
6882// Header returns an http.Header that can be modified by the caller to
6883// add HTTP headers to the request.
6884func (c *AccountsClientsInvitationsGetCall) Header() http.Header {
6885	if c.header_ == nil {
6886		c.header_ = make(http.Header)
6887	}
6888	return c.header_
6889}
6890
6891func (c *AccountsClientsInvitationsGetCall) doRequest(alt string) (*http.Response, error) {
6892	reqHeaders := make(http.Header)
6893	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
6894	for k, v := range c.header_ {
6895		reqHeaders[k] = v
6896	}
6897	reqHeaders.Set("User-Agent", c.s.userAgent())
6898	if c.ifNoneMatch_ != "" {
6899		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6900	}
6901	var body io.Reader = nil
6902	c.urlParams_.Set("alt", alt)
6903	c.urlParams_.Set("prettyPrint", "false")
6904	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}")
6905	urls += "?" + c.urlParams_.Encode()
6906	req, err := http.NewRequest("GET", urls, body)
6907	if err != nil {
6908		return nil, err
6909	}
6910	req.Header = reqHeaders
6911	googleapi.Expand(req.URL, map[string]string{
6912		"accountId":       strconv.FormatInt(c.accountId, 10),
6913		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
6914		"invitationId":    strconv.FormatInt(c.invitationId, 10),
6915	})
6916	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6917}
6918
6919// Do executes the "adexchangebuyer2.accounts.clients.invitations.get" call.
6920// Exactly one of *ClientUserInvitation or error will be non-nil. Any
6921// non-2xx status code is an error. Response headers are in either
6922// *ClientUserInvitation.ServerResponse.Header or (if a response was
6923// returned at all) in error.(*googleapi.Error).Header. Use
6924// googleapi.IsNotModified to check whether the returned error was
6925// because http.StatusNotModified was returned.
6926func (c *AccountsClientsInvitationsGetCall) Do(opts ...googleapi.CallOption) (*ClientUserInvitation, error) {
6927	gensupport.SetOptions(c.urlParams_, opts...)
6928	res, err := c.doRequest("json")
6929	if res != nil && res.StatusCode == http.StatusNotModified {
6930		if res.Body != nil {
6931			res.Body.Close()
6932		}
6933		return nil, &googleapi.Error{
6934			Code:   res.StatusCode,
6935			Header: res.Header,
6936		}
6937	}
6938	if err != nil {
6939		return nil, err
6940	}
6941	defer googleapi.CloseBody(res)
6942	if err := googleapi.CheckResponse(res); err != nil {
6943		return nil, err
6944	}
6945	ret := &ClientUserInvitation{
6946		ServerResponse: googleapi.ServerResponse{
6947			Header:         res.Header,
6948			HTTPStatusCode: res.StatusCode,
6949		},
6950	}
6951	target := &ret
6952	if err := gensupport.DecodeResponse(target, res); err != nil {
6953		return nil, err
6954	}
6955	return ret, nil
6956	// {
6957	//   "description": "Retrieves an existing client user invitation.",
6958	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}",
6959	//   "httpMethod": "GET",
6960	//   "id": "adexchangebuyer2.accounts.clients.invitations.get",
6961	//   "parameterOrder": [
6962	//     "accountId",
6963	//     "clientAccountId",
6964	//     "invitationId"
6965	//   ],
6966	//   "parameters": {
6967	//     "accountId": {
6968	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
6969	//       "format": "int64",
6970	//       "location": "path",
6971	//       "required": true,
6972	//       "type": "string"
6973	//     },
6974	//     "clientAccountId": {
6975	//       "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)",
6976	//       "format": "int64",
6977	//       "location": "path",
6978	//       "required": true,
6979	//       "type": "string"
6980	//     },
6981	//     "invitationId": {
6982	//       "description": "Numerical identifier of the user invitation to retrieve. (required)",
6983	//       "format": "int64",
6984	//       "location": "path",
6985	//       "required": true,
6986	//       "type": "string"
6987	//     }
6988	//   },
6989	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}",
6990	//   "response": {
6991	//     "$ref": "ClientUserInvitation"
6992	//   },
6993	//   "scopes": [
6994	//     "https://www.googleapis.com/auth/adexchange.buyer"
6995	//   ]
6996	// }
6997
6998}
6999
7000// method id "adexchangebuyer2.accounts.clients.invitations.list":
7001
7002type AccountsClientsInvitationsListCall struct {
7003	s               *Service
7004	accountId       int64
7005	clientAccountId string
7006	urlParams_      gensupport.URLParams
7007	ifNoneMatch_    string
7008	ctx_            context.Context
7009	header_         http.Header
7010}
7011
7012// List: Lists all the client users invitations for a client
7013// with a given account ID.
7014func (r *AccountsClientsInvitationsService) List(accountId int64, clientAccountId string) *AccountsClientsInvitationsListCall {
7015	c := &AccountsClientsInvitationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7016	c.accountId = accountId
7017	c.clientAccountId = clientAccountId
7018	return c
7019}
7020
7021// PageSize sets the optional parameter "pageSize": Requested page size.
7022// Server may return fewer clients than requested.
7023// If unspecified, server will pick an appropriate default.
7024func (c *AccountsClientsInvitationsListCall) PageSize(pageSize int64) *AccountsClientsInvitationsListCall {
7025	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7026	return c
7027}
7028
7029// PageToken sets the optional parameter "pageToken": A token
7030// identifying a page of results the server should return.
7031// Typically, this is the value
7032// of
7033// ListClientUserInvitationsResponse.nextPageToken
7034// returned from the previous call to
7035// the
7036// clients.invitations.list
7037// method.
7038func (c *AccountsClientsInvitationsListCall) PageToken(pageToken string) *AccountsClientsInvitationsListCall {
7039	c.urlParams_.Set("pageToken", pageToken)
7040	return c
7041}
7042
7043// Fields allows partial responses to be retrieved. See
7044// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7045// for more information.
7046func (c *AccountsClientsInvitationsListCall) Fields(s ...googleapi.Field) *AccountsClientsInvitationsListCall {
7047	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7048	return c
7049}
7050
7051// IfNoneMatch sets the optional parameter which makes the operation
7052// fail if the object's ETag matches the given value. This is useful for
7053// getting updates only after the object has changed since the last
7054// request. Use googleapi.IsNotModified to check whether the response
7055// error from Do is the result of In-None-Match.
7056func (c *AccountsClientsInvitationsListCall) IfNoneMatch(entityTag string) *AccountsClientsInvitationsListCall {
7057	c.ifNoneMatch_ = entityTag
7058	return c
7059}
7060
7061// Context sets the context to be used in this call's Do method. Any
7062// pending HTTP request will be aborted if the provided context is
7063// canceled.
7064func (c *AccountsClientsInvitationsListCall) Context(ctx context.Context) *AccountsClientsInvitationsListCall {
7065	c.ctx_ = ctx
7066	return c
7067}
7068
7069// Header returns an http.Header that can be modified by the caller to
7070// add HTTP headers to the request.
7071func (c *AccountsClientsInvitationsListCall) Header() http.Header {
7072	if c.header_ == nil {
7073		c.header_ = make(http.Header)
7074	}
7075	return c.header_
7076}
7077
7078func (c *AccountsClientsInvitationsListCall) doRequest(alt string) (*http.Response, error) {
7079	reqHeaders := make(http.Header)
7080	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
7081	for k, v := range c.header_ {
7082		reqHeaders[k] = v
7083	}
7084	reqHeaders.Set("User-Agent", c.s.userAgent())
7085	if c.ifNoneMatch_ != "" {
7086		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7087	}
7088	var body io.Reader = nil
7089	c.urlParams_.Set("alt", alt)
7090	c.urlParams_.Set("prettyPrint", "false")
7091	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations")
7092	urls += "?" + c.urlParams_.Encode()
7093	req, err := http.NewRequest("GET", urls, body)
7094	if err != nil {
7095		return nil, err
7096	}
7097	req.Header = reqHeaders
7098	googleapi.Expand(req.URL, map[string]string{
7099		"accountId":       strconv.FormatInt(c.accountId, 10),
7100		"clientAccountId": c.clientAccountId,
7101	})
7102	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7103}
7104
7105// Do executes the "adexchangebuyer2.accounts.clients.invitations.list" call.
7106// Exactly one of *ListClientUserInvitationsResponse or error will be
7107// non-nil. Any non-2xx status code is an error. Response headers are in
7108// either *ListClientUserInvitationsResponse.ServerResponse.Header or
7109// (if a response was returned at all) in
7110// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7111// whether the returned error was because http.StatusNotModified was
7112// returned.
7113func (c *AccountsClientsInvitationsListCall) Do(opts ...googleapi.CallOption) (*ListClientUserInvitationsResponse, error) {
7114	gensupport.SetOptions(c.urlParams_, opts...)
7115	res, err := c.doRequest("json")
7116	if res != nil && res.StatusCode == http.StatusNotModified {
7117		if res.Body != nil {
7118			res.Body.Close()
7119		}
7120		return nil, &googleapi.Error{
7121			Code:   res.StatusCode,
7122			Header: res.Header,
7123		}
7124	}
7125	if err != nil {
7126		return nil, err
7127	}
7128	defer googleapi.CloseBody(res)
7129	if err := googleapi.CheckResponse(res); err != nil {
7130		return nil, err
7131	}
7132	ret := &ListClientUserInvitationsResponse{
7133		ServerResponse: googleapi.ServerResponse{
7134			Header:         res.Header,
7135			HTTPStatusCode: res.StatusCode,
7136		},
7137	}
7138	target := &ret
7139	if err := gensupport.DecodeResponse(target, res); err != nil {
7140		return nil, err
7141	}
7142	return ret, nil
7143	// {
7144	//   "description": "Lists all the client users invitations for a client\nwith a given account ID.",
7145	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
7146	//   "httpMethod": "GET",
7147	//   "id": "adexchangebuyer2.accounts.clients.invitations.list",
7148	//   "parameterOrder": [
7149	//     "accountId",
7150	//     "clientAccountId"
7151	//   ],
7152	//   "parameters": {
7153	//     "accountId": {
7154	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
7155	//       "format": "int64",
7156	//       "location": "path",
7157	//       "required": true,
7158	//       "type": "string"
7159	//     },
7160	//     "clientAccountId": {
7161	//       "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.",
7162	//       "location": "path",
7163	//       "required": true,
7164	//       "type": "string"
7165	//     },
7166	//     "pageSize": {
7167	//       "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default.",
7168	//       "format": "int32",
7169	//       "location": "query",
7170	//       "type": "integer"
7171	//     },
7172	//     "pageToken": {
7173	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.",
7174	//       "location": "query",
7175	//       "type": "string"
7176	//     }
7177	//   },
7178	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations",
7179	//   "response": {
7180	//     "$ref": "ListClientUserInvitationsResponse"
7181	//   },
7182	//   "scopes": [
7183	//     "https://www.googleapis.com/auth/adexchange.buyer"
7184	//   ]
7185	// }
7186
7187}
7188
7189// Pages invokes f for each page of results.
7190// A non-nil error returned from f will halt the iteration.
7191// The provided context supersedes any context provided to the Context method.
7192func (c *AccountsClientsInvitationsListCall) Pages(ctx context.Context, f func(*ListClientUserInvitationsResponse) error) error {
7193	c.ctx_ = ctx
7194	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7195	for {
7196		x, err := c.Do()
7197		if err != nil {
7198			return err
7199		}
7200		if err := f(x); err != nil {
7201			return err
7202		}
7203		if x.NextPageToken == "" {
7204			return nil
7205		}
7206		c.PageToken(x.NextPageToken)
7207	}
7208}
7209
7210// method id "adexchangebuyer2.accounts.clients.users.get":
7211
7212type AccountsClientsUsersGetCall struct {
7213	s               *Service
7214	accountId       int64
7215	clientAccountId int64
7216	userId          int64
7217	urlParams_      gensupport.URLParams
7218	ifNoneMatch_    string
7219	ctx_            context.Context
7220	header_         http.Header
7221}
7222
7223// Get: Retrieves an existing client user.
7224func (r *AccountsClientsUsersService) Get(accountId int64, clientAccountId int64, userId int64) *AccountsClientsUsersGetCall {
7225	c := &AccountsClientsUsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7226	c.accountId = accountId
7227	c.clientAccountId = clientAccountId
7228	c.userId = userId
7229	return c
7230}
7231
7232// Fields allows partial responses to be retrieved. See
7233// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7234// for more information.
7235func (c *AccountsClientsUsersGetCall) Fields(s ...googleapi.Field) *AccountsClientsUsersGetCall {
7236	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7237	return c
7238}
7239
7240// IfNoneMatch sets the optional parameter which makes the operation
7241// fail if the object's ETag matches the given value. This is useful for
7242// getting updates only after the object has changed since the last
7243// request. Use googleapi.IsNotModified to check whether the response
7244// error from Do is the result of In-None-Match.
7245func (c *AccountsClientsUsersGetCall) IfNoneMatch(entityTag string) *AccountsClientsUsersGetCall {
7246	c.ifNoneMatch_ = entityTag
7247	return c
7248}
7249
7250// Context sets the context to be used in this call's Do method. Any
7251// pending HTTP request will be aborted if the provided context is
7252// canceled.
7253func (c *AccountsClientsUsersGetCall) Context(ctx context.Context) *AccountsClientsUsersGetCall {
7254	c.ctx_ = ctx
7255	return c
7256}
7257
7258// Header returns an http.Header that can be modified by the caller to
7259// add HTTP headers to the request.
7260func (c *AccountsClientsUsersGetCall) Header() http.Header {
7261	if c.header_ == nil {
7262		c.header_ = make(http.Header)
7263	}
7264	return c.header_
7265}
7266
7267func (c *AccountsClientsUsersGetCall) doRequest(alt string) (*http.Response, error) {
7268	reqHeaders := make(http.Header)
7269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
7270	for k, v := range c.header_ {
7271		reqHeaders[k] = v
7272	}
7273	reqHeaders.Set("User-Agent", c.s.userAgent())
7274	if c.ifNoneMatch_ != "" {
7275		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7276	}
7277	var body io.Reader = nil
7278	c.urlParams_.Set("alt", alt)
7279	c.urlParams_.Set("prettyPrint", "false")
7280	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}")
7281	urls += "?" + c.urlParams_.Encode()
7282	req, err := http.NewRequest("GET", urls, body)
7283	if err != nil {
7284		return nil, err
7285	}
7286	req.Header = reqHeaders
7287	googleapi.Expand(req.URL, map[string]string{
7288		"accountId":       strconv.FormatInt(c.accountId, 10),
7289		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
7290		"userId":          strconv.FormatInt(c.userId, 10),
7291	})
7292	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7293}
7294
7295// Do executes the "adexchangebuyer2.accounts.clients.users.get" call.
7296// Exactly one of *ClientUser or error will be non-nil. Any non-2xx
7297// status code is an error. Response headers are in either
7298// *ClientUser.ServerResponse.Header or (if a response was returned at
7299// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7300// to check whether the returned error was because
7301// http.StatusNotModified was returned.
7302func (c *AccountsClientsUsersGetCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
7303	gensupport.SetOptions(c.urlParams_, opts...)
7304	res, err := c.doRequest("json")
7305	if res != nil && res.StatusCode == http.StatusNotModified {
7306		if res.Body != nil {
7307			res.Body.Close()
7308		}
7309		return nil, &googleapi.Error{
7310			Code:   res.StatusCode,
7311			Header: res.Header,
7312		}
7313	}
7314	if err != nil {
7315		return nil, err
7316	}
7317	defer googleapi.CloseBody(res)
7318	if err := googleapi.CheckResponse(res); err != nil {
7319		return nil, err
7320	}
7321	ret := &ClientUser{
7322		ServerResponse: googleapi.ServerResponse{
7323			Header:         res.Header,
7324			HTTPStatusCode: res.StatusCode,
7325		},
7326	}
7327	target := &ret
7328	if err := gensupport.DecodeResponse(target, res); err != nil {
7329		return nil, err
7330	}
7331	return ret, nil
7332	// {
7333	//   "description": "Retrieves an existing client user.",
7334	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7335	//   "httpMethod": "GET",
7336	//   "id": "adexchangebuyer2.accounts.clients.users.get",
7337	//   "parameterOrder": [
7338	//     "accountId",
7339	//     "clientAccountId",
7340	//     "userId"
7341	//   ],
7342	//   "parameters": {
7343	//     "accountId": {
7344	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
7345	//       "format": "int64",
7346	//       "location": "path",
7347	//       "required": true,
7348	//       "type": "string"
7349	//     },
7350	//     "clientAccountId": {
7351	//       "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)",
7352	//       "format": "int64",
7353	//       "location": "path",
7354	//       "required": true,
7355	//       "type": "string"
7356	//     },
7357	//     "userId": {
7358	//       "description": "Numerical identifier of the user to retrieve. (required)",
7359	//       "format": "int64",
7360	//       "location": "path",
7361	//       "required": true,
7362	//       "type": "string"
7363	//     }
7364	//   },
7365	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7366	//   "response": {
7367	//     "$ref": "ClientUser"
7368	//   },
7369	//   "scopes": [
7370	//     "https://www.googleapis.com/auth/adexchange.buyer"
7371	//   ]
7372	// }
7373
7374}
7375
7376// method id "adexchangebuyer2.accounts.clients.users.list":
7377
7378type AccountsClientsUsersListCall struct {
7379	s               *Service
7380	accountId       int64
7381	clientAccountId string
7382	urlParams_      gensupport.URLParams
7383	ifNoneMatch_    string
7384	ctx_            context.Context
7385	header_         http.Header
7386}
7387
7388// List: Lists all the known client users for a specified
7389// sponsor buyer account ID.
7390func (r *AccountsClientsUsersService) List(accountId int64, clientAccountId string) *AccountsClientsUsersListCall {
7391	c := &AccountsClientsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7392	c.accountId = accountId
7393	c.clientAccountId = clientAccountId
7394	return c
7395}
7396
7397// PageSize sets the optional parameter "pageSize": Requested page size.
7398// The server may return fewer clients than requested.
7399// If unspecified, the server will pick an appropriate default.
7400func (c *AccountsClientsUsersListCall) PageSize(pageSize int64) *AccountsClientsUsersListCall {
7401	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7402	return c
7403}
7404
7405// PageToken sets the optional parameter "pageToken": A token
7406// identifying a page of results the server should return.
7407// Typically, this is the value
7408// of
7409// ListClientUsersResponse.nextPageToken
7410// returned from the previous call to
7411// the
7412// accounts.clients.users.list
7413// method.
7414func (c *AccountsClientsUsersListCall) PageToken(pageToken string) *AccountsClientsUsersListCall {
7415	c.urlParams_.Set("pageToken", pageToken)
7416	return c
7417}
7418
7419// Fields allows partial responses to be retrieved. See
7420// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7421// for more information.
7422func (c *AccountsClientsUsersListCall) Fields(s ...googleapi.Field) *AccountsClientsUsersListCall {
7423	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7424	return c
7425}
7426
7427// IfNoneMatch sets the optional parameter which makes the operation
7428// fail if the object's ETag matches the given value. This is useful for
7429// getting updates only after the object has changed since the last
7430// request. Use googleapi.IsNotModified to check whether the response
7431// error from Do is the result of In-None-Match.
7432func (c *AccountsClientsUsersListCall) IfNoneMatch(entityTag string) *AccountsClientsUsersListCall {
7433	c.ifNoneMatch_ = entityTag
7434	return c
7435}
7436
7437// Context sets the context to be used in this call's Do method. Any
7438// pending HTTP request will be aborted if the provided context is
7439// canceled.
7440func (c *AccountsClientsUsersListCall) Context(ctx context.Context) *AccountsClientsUsersListCall {
7441	c.ctx_ = ctx
7442	return c
7443}
7444
7445// Header returns an http.Header that can be modified by the caller to
7446// add HTTP headers to the request.
7447func (c *AccountsClientsUsersListCall) Header() http.Header {
7448	if c.header_ == nil {
7449		c.header_ = make(http.Header)
7450	}
7451	return c.header_
7452}
7453
7454func (c *AccountsClientsUsersListCall) doRequest(alt string) (*http.Response, error) {
7455	reqHeaders := make(http.Header)
7456	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
7457	for k, v := range c.header_ {
7458		reqHeaders[k] = v
7459	}
7460	reqHeaders.Set("User-Agent", c.s.userAgent())
7461	if c.ifNoneMatch_ != "" {
7462		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7463	}
7464	var body io.Reader = nil
7465	c.urlParams_.Set("alt", alt)
7466	c.urlParams_.Set("prettyPrint", "false")
7467	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users")
7468	urls += "?" + c.urlParams_.Encode()
7469	req, err := http.NewRequest("GET", urls, body)
7470	if err != nil {
7471		return nil, err
7472	}
7473	req.Header = reqHeaders
7474	googleapi.Expand(req.URL, map[string]string{
7475		"accountId":       strconv.FormatInt(c.accountId, 10),
7476		"clientAccountId": c.clientAccountId,
7477	})
7478	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7479}
7480
7481// Do executes the "adexchangebuyer2.accounts.clients.users.list" call.
7482// Exactly one of *ListClientUsersResponse or error will be non-nil. Any
7483// non-2xx status code is an error. Response headers are in either
7484// *ListClientUsersResponse.ServerResponse.Header or (if a response was
7485// returned at all) in error.(*googleapi.Error).Header. Use
7486// googleapi.IsNotModified to check whether the returned error was
7487// because http.StatusNotModified was returned.
7488func (c *AccountsClientsUsersListCall) Do(opts ...googleapi.CallOption) (*ListClientUsersResponse, error) {
7489	gensupport.SetOptions(c.urlParams_, opts...)
7490	res, err := c.doRequest("json")
7491	if res != nil && res.StatusCode == http.StatusNotModified {
7492		if res.Body != nil {
7493			res.Body.Close()
7494		}
7495		return nil, &googleapi.Error{
7496			Code:   res.StatusCode,
7497			Header: res.Header,
7498		}
7499	}
7500	if err != nil {
7501		return nil, err
7502	}
7503	defer googleapi.CloseBody(res)
7504	if err := googleapi.CheckResponse(res); err != nil {
7505		return nil, err
7506	}
7507	ret := &ListClientUsersResponse{
7508		ServerResponse: googleapi.ServerResponse{
7509			Header:         res.Header,
7510			HTTPStatusCode: res.StatusCode,
7511		},
7512	}
7513	target := &ret
7514	if err := gensupport.DecodeResponse(target, res); err != nil {
7515		return nil, err
7516	}
7517	return ret, nil
7518	// {
7519	//   "description": "Lists all the known client users for a specified\nsponsor buyer account ID.",
7520	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users",
7521	//   "httpMethod": "GET",
7522	//   "id": "adexchangebuyer2.accounts.clients.users.list",
7523	//   "parameterOrder": [
7524	//     "accountId",
7525	//     "clientAccountId"
7526	//   ],
7527	//   "parameters": {
7528	//     "accountId": {
7529	//       "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)",
7530	//       "format": "int64",
7531	//       "location": "path",
7532	//       "required": true,
7533	//       "type": "string"
7534	//     },
7535	//     "clientAccountId": {
7536	//       "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.",
7537	//       "location": "path",
7538	//       "required": true,
7539	//       "type": "string"
7540	//     },
7541	//     "pageSize": {
7542	//       "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.",
7543	//       "format": "int32",
7544	//       "location": "query",
7545	//       "type": "integer"
7546	//     },
7547	//     "pageToken": {
7548	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list\nmethod.",
7549	//       "location": "query",
7550	//       "type": "string"
7551	//     }
7552	//   },
7553	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users",
7554	//   "response": {
7555	//     "$ref": "ListClientUsersResponse"
7556	//   },
7557	//   "scopes": [
7558	//     "https://www.googleapis.com/auth/adexchange.buyer"
7559	//   ]
7560	// }
7561
7562}
7563
7564// Pages invokes f for each page of results.
7565// A non-nil error returned from f will halt the iteration.
7566// The provided context supersedes any context provided to the Context method.
7567func (c *AccountsClientsUsersListCall) Pages(ctx context.Context, f func(*ListClientUsersResponse) error) error {
7568	c.ctx_ = ctx
7569	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7570	for {
7571		x, err := c.Do()
7572		if err != nil {
7573			return err
7574		}
7575		if err := f(x); err != nil {
7576			return err
7577		}
7578		if x.NextPageToken == "" {
7579			return nil
7580		}
7581		c.PageToken(x.NextPageToken)
7582	}
7583}
7584
7585// method id "adexchangebuyer2.accounts.clients.users.update":
7586
7587type AccountsClientsUsersUpdateCall struct {
7588	s               *Service
7589	accountId       int64
7590	clientAccountId int64
7591	userId          int64
7592	clientuser      *ClientUser
7593	urlParams_      gensupport.URLParams
7594	ctx_            context.Context
7595	header_         http.Header
7596}
7597
7598// Update: Updates an existing client user.
7599// Only the user status can be changed on update.
7600func (r *AccountsClientsUsersService) Update(accountId int64, clientAccountId int64, userId int64, clientuser *ClientUser) *AccountsClientsUsersUpdateCall {
7601	c := &AccountsClientsUsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7602	c.accountId = accountId
7603	c.clientAccountId = clientAccountId
7604	c.userId = userId
7605	c.clientuser = clientuser
7606	return c
7607}
7608
7609// Fields allows partial responses to be retrieved. See
7610// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7611// for more information.
7612func (c *AccountsClientsUsersUpdateCall) Fields(s ...googleapi.Field) *AccountsClientsUsersUpdateCall {
7613	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7614	return c
7615}
7616
7617// Context sets the context to be used in this call's Do method. Any
7618// pending HTTP request will be aborted if the provided context is
7619// canceled.
7620func (c *AccountsClientsUsersUpdateCall) Context(ctx context.Context) *AccountsClientsUsersUpdateCall {
7621	c.ctx_ = ctx
7622	return c
7623}
7624
7625// Header returns an http.Header that can be modified by the caller to
7626// add HTTP headers to the request.
7627func (c *AccountsClientsUsersUpdateCall) Header() http.Header {
7628	if c.header_ == nil {
7629		c.header_ = make(http.Header)
7630	}
7631	return c.header_
7632}
7633
7634func (c *AccountsClientsUsersUpdateCall) doRequest(alt string) (*http.Response, error) {
7635	reqHeaders := make(http.Header)
7636	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
7637	for k, v := range c.header_ {
7638		reqHeaders[k] = v
7639	}
7640	reqHeaders.Set("User-Agent", c.s.userAgent())
7641	var body io.Reader = nil
7642	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuser)
7643	if err != nil {
7644		return nil, err
7645	}
7646	reqHeaders.Set("Content-Type", "application/json")
7647	c.urlParams_.Set("alt", alt)
7648	c.urlParams_.Set("prettyPrint", "false")
7649	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}")
7650	urls += "?" + c.urlParams_.Encode()
7651	req, err := http.NewRequest("PUT", urls, body)
7652	if err != nil {
7653		return nil, err
7654	}
7655	req.Header = reqHeaders
7656	googleapi.Expand(req.URL, map[string]string{
7657		"accountId":       strconv.FormatInt(c.accountId, 10),
7658		"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
7659		"userId":          strconv.FormatInt(c.userId, 10),
7660	})
7661	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7662}
7663
7664// Do executes the "adexchangebuyer2.accounts.clients.users.update" call.
7665// Exactly one of *ClientUser or error will be non-nil. Any non-2xx
7666// status code is an error. Response headers are in either
7667// *ClientUser.ServerResponse.Header or (if a response was returned at
7668// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7669// to check whether the returned error was because
7670// http.StatusNotModified was returned.
7671func (c *AccountsClientsUsersUpdateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
7672	gensupport.SetOptions(c.urlParams_, opts...)
7673	res, err := c.doRequest("json")
7674	if res != nil && res.StatusCode == http.StatusNotModified {
7675		if res.Body != nil {
7676			res.Body.Close()
7677		}
7678		return nil, &googleapi.Error{
7679			Code:   res.StatusCode,
7680			Header: res.Header,
7681		}
7682	}
7683	if err != nil {
7684		return nil, err
7685	}
7686	defer googleapi.CloseBody(res)
7687	if err := googleapi.CheckResponse(res); err != nil {
7688		return nil, err
7689	}
7690	ret := &ClientUser{
7691		ServerResponse: googleapi.ServerResponse{
7692			Header:         res.Header,
7693			HTTPStatusCode: res.StatusCode,
7694		},
7695	}
7696	target := &ret
7697	if err := gensupport.DecodeResponse(target, res); err != nil {
7698		return nil, err
7699	}
7700	return ret, nil
7701	// {
7702	//   "description": "Updates an existing client user.\nOnly the user status can be changed on update.",
7703	//   "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7704	//   "httpMethod": "PUT",
7705	//   "id": "adexchangebuyer2.accounts.clients.users.update",
7706	//   "parameterOrder": [
7707	//     "accountId",
7708	//     "clientAccountId",
7709	//     "userId"
7710	//   ],
7711	//   "parameters": {
7712	//     "accountId": {
7713	//       "description": "Numerical account ID of the client's sponsor buyer. (required)",
7714	//       "format": "int64",
7715	//       "location": "path",
7716	//       "required": true,
7717	//       "type": "string"
7718	//     },
7719	//     "clientAccountId": {
7720	//       "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)",
7721	//       "format": "int64",
7722	//       "location": "path",
7723	//       "required": true,
7724	//       "type": "string"
7725	//     },
7726	//     "userId": {
7727	//       "description": "Numerical identifier of the user to retrieve. (required)",
7728	//       "format": "int64",
7729	//       "location": "path",
7730	//       "required": true,
7731	//       "type": "string"
7732	//     }
7733	//   },
7734	//   "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}",
7735	//   "request": {
7736	//     "$ref": "ClientUser"
7737	//   },
7738	//   "response": {
7739	//     "$ref": "ClientUser"
7740	//   },
7741	//   "scopes": [
7742	//     "https://www.googleapis.com/auth/adexchange.buyer"
7743	//   ]
7744	// }
7745
7746}
7747
7748// method id "adexchangebuyer2.accounts.creatives.create":
7749
7750type AccountsCreativesCreateCall struct {
7751	s          *Service
7752	accountId  string
7753	creative   *Creative
7754	urlParams_ gensupport.URLParams
7755	ctx_       context.Context
7756	header_    http.Header
7757}
7758
7759// Create: Creates a creative.
7760func (r *AccountsCreativesService) Create(accountId string, creative *Creative) *AccountsCreativesCreateCall {
7761	c := &AccountsCreativesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7762	c.accountId = accountId
7763	c.creative = creative
7764	return c
7765}
7766
7767// DuplicateIdMode sets the optional parameter "duplicateIdMode":
7768// Indicates if multiple creatives can share an ID or not. Default
7769// is
7770// NO_DUPLICATES (one ID per creative).
7771//
7772// Possible values:
7773//   "NO_DUPLICATES"
7774//   "FORCE_ENABLE_DUPLICATE_IDS"
7775func (c *AccountsCreativesCreateCall) DuplicateIdMode(duplicateIdMode string) *AccountsCreativesCreateCall {
7776	c.urlParams_.Set("duplicateIdMode", duplicateIdMode)
7777	return c
7778}
7779
7780// Fields allows partial responses to be retrieved. See
7781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7782// for more information.
7783func (c *AccountsCreativesCreateCall) Fields(s ...googleapi.Field) *AccountsCreativesCreateCall {
7784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7785	return c
7786}
7787
7788// Context sets the context to be used in this call's Do method. Any
7789// pending HTTP request will be aborted if the provided context is
7790// canceled.
7791func (c *AccountsCreativesCreateCall) Context(ctx context.Context) *AccountsCreativesCreateCall {
7792	c.ctx_ = ctx
7793	return c
7794}
7795
7796// Header returns an http.Header that can be modified by the caller to
7797// add HTTP headers to the request.
7798func (c *AccountsCreativesCreateCall) Header() http.Header {
7799	if c.header_ == nil {
7800		c.header_ = make(http.Header)
7801	}
7802	return c.header_
7803}
7804
7805func (c *AccountsCreativesCreateCall) doRequest(alt string) (*http.Response, error) {
7806	reqHeaders := make(http.Header)
7807	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
7808	for k, v := range c.header_ {
7809		reqHeaders[k] = v
7810	}
7811	reqHeaders.Set("User-Agent", c.s.userAgent())
7812	var body io.Reader = nil
7813	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
7814	if err != nil {
7815		return nil, err
7816	}
7817	reqHeaders.Set("Content-Type", "application/json")
7818	c.urlParams_.Set("alt", alt)
7819	c.urlParams_.Set("prettyPrint", "false")
7820	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives")
7821	urls += "?" + c.urlParams_.Encode()
7822	req, err := http.NewRequest("POST", urls, body)
7823	if err != nil {
7824		return nil, err
7825	}
7826	req.Header = reqHeaders
7827	googleapi.Expand(req.URL, map[string]string{
7828		"accountId": c.accountId,
7829	})
7830	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7831}
7832
7833// Do executes the "adexchangebuyer2.accounts.creatives.create" call.
7834// Exactly one of *Creative or error will be non-nil. Any non-2xx status
7835// code is an error. Response headers are in either
7836// *Creative.ServerResponse.Header or (if a response was returned at
7837// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7838// to check whether the returned error was because
7839// http.StatusNotModified was returned.
7840func (c *AccountsCreativesCreateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
7841	gensupport.SetOptions(c.urlParams_, opts...)
7842	res, err := c.doRequest("json")
7843	if res != nil && res.StatusCode == http.StatusNotModified {
7844		if res.Body != nil {
7845			res.Body.Close()
7846		}
7847		return nil, &googleapi.Error{
7848			Code:   res.StatusCode,
7849			Header: res.Header,
7850		}
7851	}
7852	if err != nil {
7853		return nil, err
7854	}
7855	defer googleapi.CloseBody(res)
7856	if err := googleapi.CheckResponse(res); err != nil {
7857		return nil, err
7858	}
7859	ret := &Creative{
7860		ServerResponse: googleapi.ServerResponse{
7861			Header:         res.Header,
7862			HTTPStatusCode: res.StatusCode,
7863		},
7864	}
7865	target := &ret
7866	if err := gensupport.DecodeResponse(target, res); err != nil {
7867		return nil, err
7868	}
7869	return ret, nil
7870	// {
7871	//   "description": "Creates a creative.",
7872	//   "flatPath": "v2beta1/accounts/{accountId}/creatives",
7873	//   "httpMethod": "POST",
7874	//   "id": "adexchangebuyer2.accounts.creatives.create",
7875	//   "parameterOrder": [
7876	//     "accountId"
7877	//   ],
7878	//   "parameters": {
7879	//     "accountId": {
7880	//       "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.",
7881	//       "location": "path",
7882	//       "required": true,
7883	//       "type": "string"
7884	//     },
7885	//     "duplicateIdMode": {
7886	//       "description": "Indicates if multiple creatives can share an ID or not. Default is\nNO_DUPLICATES (one ID per creative).",
7887	//       "enum": [
7888	//         "NO_DUPLICATES",
7889	//         "FORCE_ENABLE_DUPLICATE_IDS"
7890	//       ],
7891	//       "location": "query",
7892	//       "type": "string"
7893	//     }
7894	//   },
7895	//   "path": "v2beta1/accounts/{accountId}/creatives",
7896	//   "request": {
7897	//     "$ref": "Creative"
7898	//   },
7899	//   "response": {
7900	//     "$ref": "Creative"
7901	//   },
7902	//   "scopes": [
7903	//     "https://www.googleapis.com/auth/adexchange.buyer"
7904	//   ]
7905	// }
7906
7907}
7908
7909// method id "adexchangebuyer2.accounts.creatives.get":
7910
7911type AccountsCreativesGetCall struct {
7912	s            *Service
7913	accountId    string
7914	creativeId   string
7915	urlParams_   gensupport.URLParams
7916	ifNoneMatch_ string
7917	ctx_         context.Context
7918	header_      http.Header
7919}
7920
7921// Get: Gets a creative.
7922func (r *AccountsCreativesService) Get(accountId string, creativeId string) *AccountsCreativesGetCall {
7923	c := &AccountsCreativesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7924	c.accountId = accountId
7925	c.creativeId = creativeId
7926	return c
7927}
7928
7929// Fields allows partial responses to be retrieved. See
7930// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7931// for more information.
7932func (c *AccountsCreativesGetCall) Fields(s ...googleapi.Field) *AccountsCreativesGetCall {
7933	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7934	return c
7935}
7936
7937// IfNoneMatch sets the optional parameter which makes the operation
7938// fail if the object's ETag matches the given value. This is useful for
7939// getting updates only after the object has changed since the last
7940// request. Use googleapi.IsNotModified to check whether the response
7941// error from Do is the result of In-None-Match.
7942func (c *AccountsCreativesGetCall) IfNoneMatch(entityTag string) *AccountsCreativesGetCall {
7943	c.ifNoneMatch_ = entityTag
7944	return c
7945}
7946
7947// Context sets the context to be used in this call's Do method. Any
7948// pending HTTP request will be aborted if the provided context is
7949// canceled.
7950func (c *AccountsCreativesGetCall) Context(ctx context.Context) *AccountsCreativesGetCall {
7951	c.ctx_ = ctx
7952	return c
7953}
7954
7955// Header returns an http.Header that can be modified by the caller to
7956// add HTTP headers to the request.
7957func (c *AccountsCreativesGetCall) Header() http.Header {
7958	if c.header_ == nil {
7959		c.header_ = make(http.Header)
7960	}
7961	return c.header_
7962}
7963
7964func (c *AccountsCreativesGetCall) doRequest(alt string) (*http.Response, error) {
7965	reqHeaders := make(http.Header)
7966	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
7967	for k, v := range c.header_ {
7968		reqHeaders[k] = v
7969	}
7970	reqHeaders.Set("User-Agent", c.s.userAgent())
7971	if c.ifNoneMatch_ != "" {
7972		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7973	}
7974	var body io.Reader = nil
7975	c.urlParams_.Set("alt", alt)
7976	c.urlParams_.Set("prettyPrint", "false")
7977	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}")
7978	urls += "?" + c.urlParams_.Encode()
7979	req, err := http.NewRequest("GET", urls, body)
7980	if err != nil {
7981		return nil, err
7982	}
7983	req.Header = reqHeaders
7984	googleapi.Expand(req.URL, map[string]string{
7985		"accountId":  c.accountId,
7986		"creativeId": c.creativeId,
7987	})
7988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7989}
7990
7991// Do executes the "adexchangebuyer2.accounts.creatives.get" call.
7992// Exactly one of *Creative or error will be non-nil. Any non-2xx status
7993// code is an error. Response headers are in either
7994// *Creative.ServerResponse.Header or (if a response was returned at
7995// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7996// to check whether the returned error was because
7997// http.StatusNotModified was returned.
7998func (c *AccountsCreativesGetCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
7999	gensupport.SetOptions(c.urlParams_, opts...)
8000	res, err := c.doRequest("json")
8001	if res != nil && res.StatusCode == http.StatusNotModified {
8002		if res.Body != nil {
8003			res.Body.Close()
8004		}
8005		return nil, &googleapi.Error{
8006			Code:   res.StatusCode,
8007			Header: res.Header,
8008		}
8009	}
8010	if err != nil {
8011		return nil, err
8012	}
8013	defer googleapi.CloseBody(res)
8014	if err := googleapi.CheckResponse(res); err != nil {
8015		return nil, err
8016	}
8017	ret := &Creative{
8018		ServerResponse: googleapi.ServerResponse{
8019			Header:         res.Header,
8020			HTTPStatusCode: res.StatusCode,
8021		},
8022	}
8023	target := &ret
8024	if err := gensupport.DecodeResponse(target, res); err != nil {
8025		return nil, err
8026	}
8027	return ret, nil
8028	// {
8029	//   "description": "Gets a creative.",
8030	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
8031	//   "httpMethod": "GET",
8032	//   "id": "adexchangebuyer2.accounts.creatives.get",
8033	//   "parameterOrder": [
8034	//     "accountId",
8035	//     "creativeId"
8036	//   ],
8037	//   "parameters": {
8038	//     "accountId": {
8039	//       "description": "The account the creative belongs to.",
8040	//       "location": "path",
8041	//       "required": true,
8042	//       "type": "string"
8043	//     },
8044	//     "creativeId": {
8045	//       "description": "The ID of the creative to retrieve.",
8046	//       "location": "path",
8047	//       "required": true,
8048	//       "type": "string"
8049	//     }
8050	//   },
8051	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
8052	//   "response": {
8053	//     "$ref": "Creative"
8054	//   },
8055	//   "scopes": [
8056	//     "https://www.googleapis.com/auth/adexchange.buyer"
8057	//   ]
8058	// }
8059
8060}
8061
8062// method id "adexchangebuyer2.accounts.creatives.list":
8063
8064type AccountsCreativesListCall struct {
8065	s            *Service
8066	accountId    string
8067	urlParams_   gensupport.URLParams
8068	ifNoneMatch_ string
8069	ctx_         context.Context
8070	header_      http.Header
8071}
8072
8073// List: Lists creatives.
8074func (r *AccountsCreativesService) List(accountId string) *AccountsCreativesListCall {
8075	c := &AccountsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8076	c.accountId = accountId
8077	return c
8078}
8079
8080// PageSize sets the optional parameter "pageSize": Requested page size.
8081// The server may return fewer creatives than requested
8082// (due to timeout constraint) even if more are available via another
8083// call.
8084// If unspecified, server will pick an appropriate default.
8085// Acceptable values are 1 to 1000, inclusive.
8086func (c *AccountsCreativesListCall) PageSize(pageSize int64) *AccountsCreativesListCall {
8087	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8088	return c
8089}
8090
8091// PageToken sets the optional parameter "pageToken": A token
8092// identifying a page of results the server should return.
8093// Typically, this is the value
8094// of
8095// ListCreativesResponse.next_page_token
8096// returned from the previous call to 'ListCreatives' method.
8097func (c *AccountsCreativesListCall) PageToken(pageToken string) *AccountsCreativesListCall {
8098	c.urlParams_.Set("pageToken", pageToken)
8099	return c
8100}
8101
8102// Query sets the optional parameter "query": An optional query string
8103// to filter creatives. If no filter is specified,
8104// all active creatives will be returned.
8105// <p>Supported queries
8106// are:
8107// <ul>
8108// <li>accountId=<i>account_id_string</i>
8109// <li>creativeId=<i>cre
8110// ative_id_string</i>
8111// <li>dealsStatus: {approved, conditionally_approved, disapproved,
8112//                    not_checked}
8113// <li>openAuctionStatus: {approved, conditionally_approved,
8114// disapproved,
8115//                           not_checked}
8116// <li>attribute: {a numeric attribute from the list of
8117// attributes}
8118// <li>disapprovalReason: {a reason
8119// from
8120// DisapprovalReason}
8121// </ul>
8122// Example: 'accountId=12345 AND (dealsStatus:disapproved
8123// AND
8124// disapprovalReason:unacceptable_content) OR attribute:47'
8125func (c *AccountsCreativesListCall) Query(query string) *AccountsCreativesListCall {
8126	c.urlParams_.Set("query", query)
8127	return c
8128}
8129
8130// Fields allows partial responses to be retrieved. See
8131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8132// for more information.
8133func (c *AccountsCreativesListCall) Fields(s ...googleapi.Field) *AccountsCreativesListCall {
8134	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8135	return c
8136}
8137
8138// IfNoneMatch sets the optional parameter which makes the operation
8139// fail if the object's ETag matches the given value. This is useful for
8140// getting updates only after the object has changed since the last
8141// request. Use googleapi.IsNotModified to check whether the response
8142// error from Do is the result of In-None-Match.
8143func (c *AccountsCreativesListCall) IfNoneMatch(entityTag string) *AccountsCreativesListCall {
8144	c.ifNoneMatch_ = entityTag
8145	return c
8146}
8147
8148// Context sets the context to be used in this call's Do method. Any
8149// pending HTTP request will be aborted if the provided context is
8150// canceled.
8151func (c *AccountsCreativesListCall) Context(ctx context.Context) *AccountsCreativesListCall {
8152	c.ctx_ = ctx
8153	return c
8154}
8155
8156// Header returns an http.Header that can be modified by the caller to
8157// add HTTP headers to the request.
8158func (c *AccountsCreativesListCall) Header() http.Header {
8159	if c.header_ == nil {
8160		c.header_ = make(http.Header)
8161	}
8162	return c.header_
8163}
8164
8165func (c *AccountsCreativesListCall) doRequest(alt string) (*http.Response, error) {
8166	reqHeaders := make(http.Header)
8167	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
8168	for k, v := range c.header_ {
8169		reqHeaders[k] = v
8170	}
8171	reqHeaders.Set("User-Agent", c.s.userAgent())
8172	if c.ifNoneMatch_ != "" {
8173		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8174	}
8175	var body io.Reader = nil
8176	c.urlParams_.Set("alt", alt)
8177	c.urlParams_.Set("prettyPrint", "false")
8178	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives")
8179	urls += "?" + c.urlParams_.Encode()
8180	req, err := http.NewRequest("GET", urls, body)
8181	if err != nil {
8182		return nil, err
8183	}
8184	req.Header = reqHeaders
8185	googleapi.Expand(req.URL, map[string]string{
8186		"accountId": c.accountId,
8187	})
8188	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8189}
8190
8191// Do executes the "adexchangebuyer2.accounts.creatives.list" call.
8192// Exactly one of *ListCreativesResponse or error will be non-nil. Any
8193// non-2xx status code is an error. Response headers are in either
8194// *ListCreativesResponse.ServerResponse.Header or (if a response was
8195// returned at all) in error.(*googleapi.Error).Header. Use
8196// googleapi.IsNotModified to check whether the returned error was
8197// because http.StatusNotModified was returned.
8198func (c *AccountsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativesResponse, error) {
8199	gensupport.SetOptions(c.urlParams_, opts...)
8200	res, err := c.doRequest("json")
8201	if res != nil && res.StatusCode == http.StatusNotModified {
8202		if res.Body != nil {
8203			res.Body.Close()
8204		}
8205		return nil, &googleapi.Error{
8206			Code:   res.StatusCode,
8207			Header: res.Header,
8208		}
8209	}
8210	if err != nil {
8211		return nil, err
8212	}
8213	defer googleapi.CloseBody(res)
8214	if err := googleapi.CheckResponse(res); err != nil {
8215		return nil, err
8216	}
8217	ret := &ListCreativesResponse{
8218		ServerResponse: googleapi.ServerResponse{
8219			Header:         res.Header,
8220			HTTPStatusCode: res.StatusCode,
8221		},
8222	}
8223	target := &ret
8224	if err := gensupport.DecodeResponse(target, res); err != nil {
8225		return nil, err
8226	}
8227	return ret, nil
8228	// {
8229	//   "description": "Lists creatives.",
8230	//   "flatPath": "v2beta1/accounts/{accountId}/creatives",
8231	//   "httpMethod": "GET",
8232	//   "id": "adexchangebuyer2.accounts.creatives.list",
8233	//   "parameterOrder": [
8234	//     "accountId"
8235	//   ],
8236	//   "parameters": {
8237	//     "accountId": {
8238	//       "description": "The account to list the creatives from.\nSpecify \"-\" to list all creatives the current user has access to.",
8239	//       "location": "path",
8240	//       "required": true,
8241	//       "type": "string"
8242	//     },
8243	//     "pageSize": {
8244	//       "description": "Requested page size. The server may return fewer creatives than requested\n(due to timeout constraint) even if more are available via another call.\nIf unspecified, server will pick an appropriate default.\nAcceptable values are 1 to 1000, inclusive.",
8245	//       "format": "int32",
8246	//       "location": "query",
8247	//       "type": "integer"
8248	//     },
8249	//     "pageToken": {
8250	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativesResponse.next_page_token\nreturned from the previous call to 'ListCreatives' method.",
8251	//       "location": "query",
8252	//       "type": "string"
8253	//     },
8254	//     "query": {
8255	//       "description": "An optional query string to filter creatives. If no filter is specified,\nall active creatives will be returned.\n\u003cp\u003eSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus: {approved, conditionally_approved, disapproved,\n                   not_checked}\n\u003cli\u003eopenAuctionStatus: {approved, conditionally_approved, disapproved,\n                          not_checked}\n\u003cli\u003eattribute: {a numeric attribute from the list of attributes}\n\u003cli\u003edisapprovalReason: {a reason from\nDisapprovalReason}\n\u003c/ul\u003e\nExample: 'accountId=12345 AND (dealsStatus:disapproved AND\ndisapprovalReason:unacceptable_content) OR attribute:47'",
8256	//       "location": "query",
8257	//       "type": "string"
8258	//     }
8259	//   },
8260	//   "path": "v2beta1/accounts/{accountId}/creatives",
8261	//   "response": {
8262	//     "$ref": "ListCreativesResponse"
8263	//   },
8264	//   "scopes": [
8265	//     "https://www.googleapis.com/auth/adexchange.buyer"
8266	//   ]
8267	// }
8268
8269}
8270
8271// Pages invokes f for each page of results.
8272// A non-nil error returned from f will halt the iteration.
8273// The provided context supersedes any context provided to the Context method.
8274func (c *AccountsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativesResponse) error) error {
8275	c.ctx_ = ctx
8276	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8277	for {
8278		x, err := c.Do()
8279		if err != nil {
8280			return err
8281		}
8282		if err := f(x); err != nil {
8283			return err
8284		}
8285		if x.NextPageToken == "" {
8286			return nil
8287		}
8288		c.PageToken(x.NextPageToken)
8289	}
8290}
8291
8292// method id "adexchangebuyer2.accounts.creatives.stopWatching":
8293
8294type AccountsCreativesStopWatchingCall struct {
8295	s                           *Service
8296	accountId                   string
8297	creativeId                  string
8298	stopwatchingcreativerequest *StopWatchingCreativeRequest
8299	urlParams_                  gensupport.URLParams
8300	ctx_                        context.Context
8301	header_                     http.Header
8302}
8303
8304// StopWatching: Stops watching a creative. Will stop push notifications
8305// being sent to the
8306// topics when the creative changes status.
8307func (r *AccountsCreativesService) StopWatching(accountId string, creativeId string, stopwatchingcreativerequest *StopWatchingCreativeRequest) *AccountsCreativesStopWatchingCall {
8308	c := &AccountsCreativesStopWatchingCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8309	c.accountId = accountId
8310	c.creativeId = creativeId
8311	c.stopwatchingcreativerequest = stopwatchingcreativerequest
8312	return c
8313}
8314
8315// Fields allows partial responses to be retrieved. See
8316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8317// for more information.
8318func (c *AccountsCreativesStopWatchingCall) Fields(s ...googleapi.Field) *AccountsCreativesStopWatchingCall {
8319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8320	return c
8321}
8322
8323// Context sets the context to be used in this call's Do method. Any
8324// pending HTTP request will be aborted if the provided context is
8325// canceled.
8326func (c *AccountsCreativesStopWatchingCall) Context(ctx context.Context) *AccountsCreativesStopWatchingCall {
8327	c.ctx_ = ctx
8328	return c
8329}
8330
8331// Header returns an http.Header that can be modified by the caller to
8332// add HTTP headers to the request.
8333func (c *AccountsCreativesStopWatchingCall) Header() http.Header {
8334	if c.header_ == nil {
8335		c.header_ = make(http.Header)
8336	}
8337	return c.header_
8338}
8339
8340func (c *AccountsCreativesStopWatchingCall) doRequest(alt string) (*http.Response, error) {
8341	reqHeaders := make(http.Header)
8342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
8343	for k, v := range c.header_ {
8344		reqHeaders[k] = v
8345	}
8346	reqHeaders.Set("User-Agent", c.s.userAgent())
8347	var body io.Reader = nil
8348	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopwatchingcreativerequest)
8349	if err != nil {
8350		return nil, err
8351	}
8352	reqHeaders.Set("Content-Type", "application/json")
8353	c.urlParams_.Set("alt", alt)
8354	c.urlParams_.Set("prettyPrint", "false")
8355	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching")
8356	urls += "?" + c.urlParams_.Encode()
8357	req, err := http.NewRequest("POST", urls, body)
8358	if err != nil {
8359		return nil, err
8360	}
8361	req.Header = reqHeaders
8362	googleapi.Expand(req.URL, map[string]string{
8363		"accountId":  c.accountId,
8364		"creativeId": c.creativeId,
8365	})
8366	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8367}
8368
8369// Do executes the "adexchangebuyer2.accounts.creatives.stopWatching" call.
8370// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8371// code is an error. Response headers are in either
8372// *Empty.ServerResponse.Header or (if a response was returned at all)
8373// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8374// check whether the returned error was because http.StatusNotModified
8375// was returned.
8376func (c *AccountsCreativesStopWatchingCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8377	gensupport.SetOptions(c.urlParams_, opts...)
8378	res, err := c.doRequest("json")
8379	if res != nil && res.StatusCode == http.StatusNotModified {
8380		if res.Body != nil {
8381			res.Body.Close()
8382		}
8383		return nil, &googleapi.Error{
8384			Code:   res.StatusCode,
8385			Header: res.Header,
8386		}
8387	}
8388	if err != nil {
8389		return nil, err
8390	}
8391	defer googleapi.CloseBody(res)
8392	if err := googleapi.CheckResponse(res); err != nil {
8393		return nil, err
8394	}
8395	ret := &Empty{
8396		ServerResponse: googleapi.ServerResponse{
8397			Header:         res.Header,
8398			HTTPStatusCode: res.StatusCode,
8399		},
8400	}
8401	target := &ret
8402	if err := gensupport.DecodeResponse(target, res); err != nil {
8403		return nil, err
8404	}
8405	return ret, nil
8406	// {
8407	//   "description": "Stops watching a creative. Will stop push notifications being sent to the\ntopics when the creative changes status.",
8408	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching",
8409	//   "httpMethod": "POST",
8410	//   "id": "adexchangebuyer2.accounts.creatives.stopWatching",
8411	//   "parameterOrder": [
8412	//     "accountId",
8413	//     "creativeId"
8414	//   ],
8415	//   "parameters": {
8416	//     "accountId": {
8417	//       "description": "The account of the creative to stop notifications for.",
8418	//       "location": "path",
8419	//       "required": true,
8420	//       "type": "string"
8421	//     },
8422	//     "creativeId": {
8423	//       "description": "The creative ID of the creative to stop notifications for.\nSpecify \"-\" to specify stopping account level notifications.",
8424	//       "location": "path",
8425	//       "required": true,
8426	//       "type": "string"
8427	//     }
8428	//   },
8429	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching",
8430	//   "request": {
8431	//     "$ref": "StopWatchingCreativeRequest"
8432	//   },
8433	//   "response": {
8434	//     "$ref": "Empty"
8435	//   },
8436	//   "scopes": [
8437	//     "https://www.googleapis.com/auth/adexchange.buyer"
8438	//   ]
8439	// }
8440
8441}
8442
8443// method id "adexchangebuyer2.accounts.creatives.update":
8444
8445type AccountsCreativesUpdateCall struct {
8446	s          *Service
8447	accountId  string
8448	creativeId string
8449	creative   *Creative
8450	urlParams_ gensupport.URLParams
8451	ctx_       context.Context
8452	header_    http.Header
8453}
8454
8455// Update: Updates a creative.
8456func (r *AccountsCreativesService) Update(accountId string, creativeId string, creative *Creative) *AccountsCreativesUpdateCall {
8457	c := &AccountsCreativesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8458	c.accountId = accountId
8459	c.creativeId = creativeId
8460	c.creative = creative
8461	return c
8462}
8463
8464// Fields allows partial responses to be retrieved. See
8465// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8466// for more information.
8467func (c *AccountsCreativesUpdateCall) Fields(s ...googleapi.Field) *AccountsCreativesUpdateCall {
8468	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8469	return c
8470}
8471
8472// Context sets the context to be used in this call's Do method. Any
8473// pending HTTP request will be aborted if the provided context is
8474// canceled.
8475func (c *AccountsCreativesUpdateCall) Context(ctx context.Context) *AccountsCreativesUpdateCall {
8476	c.ctx_ = ctx
8477	return c
8478}
8479
8480// Header returns an http.Header that can be modified by the caller to
8481// add HTTP headers to the request.
8482func (c *AccountsCreativesUpdateCall) Header() http.Header {
8483	if c.header_ == nil {
8484		c.header_ = make(http.Header)
8485	}
8486	return c.header_
8487}
8488
8489func (c *AccountsCreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
8490	reqHeaders := make(http.Header)
8491	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
8492	for k, v := range c.header_ {
8493		reqHeaders[k] = v
8494	}
8495	reqHeaders.Set("User-Agent", c.s.userAgent())
8496	var body io.Reader = nil
8497	body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
8498	if err != nil {
8499		return nil, err
8500	}
8501	reqHeaders.Set("Content-Type", "application/json")
8502	c.urlParams_.Set("alt", alt)
8503	c.urlParams_.Set("prettyPrint", "false")
8504	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}")
8505	urls += "?" + c.urlParams_.Encode()
8506	req, err := http.NewRequest("PUT", urls, body)
8507	if err != nil {
8508		return nil, err
8509	}
8510	req.Header = reqHeaders
8511	googleapi.Expand(req.URL, map[string]string{
8512		"accountId":  c.accountId,
8513		"creativeId": c.creativeId,
8514	})
8515	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8516}
8517
8518// Do executes the "adexchangebuyer2.accounts.creatives.update" call.
8519// Exactly one of *Creative or error will be non-nil. Any non-2xx status
8520// code is an error. Response headers are in either
8521// *Creative.ServerResponse.Header or (if a response was returned at
8522// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8523// to check whether the returned error was because
8524// http.StatusNotModified was returned.
8525func (c *AccountsCreativesUpdateCall) Do(opts ...googleapi.CallOption) (*Creative, error) {
8526	gensupport.SetOptions(c.urlParams_, opts...)
8527	res, err := c.doRequest("json")
8528	if res != nil && res.StatusCode == http.StatusNotModified {
8529		if res.Body != nil {
8530			res.Body.Close()
8531		}
8532		return nil, &googleapi.Error{
8533			Code:   res.StatusCode,
8534			Header: res.Header,
8535		}
8536	}
8537	if err != nil {
8538		return nil, err
8539	}
8540	defer googleapi.CloseBody(res)
8541	if err := googleapi.CheckResponse(res); err != nil {
8542		return nil, err
8543	}
8544	ret := &Creative{
8545		ServerResponse: googleapi.ServerResponse{
8546			Header:         res.Header,
8547			HTTPStatusCode: res.StatusCode,
8548		},
8549	}
8550	target := &ret
8551	if err := gensupport.DecodeResponse(target, res); err != nil {
8552		return nil, err
8553	}
8554	return ret, nil
8555	// {
8556	//   "description": "Updates a creative.",
8557	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
8558	//   "httpMethod": "PUT",
8559	//   "id": "adexchangebuyer2.accounts.creatives.update",
8560	//   "parameterOrder": [
8561	//     "accountId",
8562	//     "creativeId"
8563	//   ],
8564	//   "parameters": {
8565	//     "accountId": {
8566	//       "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.",
8567	//       "location": "path",
8568	//       "required": true,
8569	//       "type": "string"
8570	//     },
8571	//     "creativeId": {
8572	//       "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.",
8573	//       "location": "path",
8574	//       "required": true,
8575	//       "type": "string"
8576	//     }
8577	//   },
8578	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}",
8579	//   "request": {
8580	//     "$ref": "Creative"
8581	//   },
8582	//   "response": {
8583	//     "$ref": "Creative"
8584	//   },
8585	//   "scopes": [
8586	//     "https://www.googleapis.com/auth/adexchange.buyer"
8587	//   ]
8588	// }
8589
8590}
8591
8592// method id "adexchangebuyer2.accounts.creatives.watch":
8593
8594type AccountsCreativesWatchCall struct {
8595	s                    *Service
8596	accountId            string
8597	creativeId           string
8598	watchcreativerequest *WatchCreativeRequest
8599	urlParams_           gensupport.URLParams
8600	ctx_                 context.Context
8601	header_              http.Header
8602}
8603
8604// Watch: Watches a creative. Will result in push notifications being
8605// sent to the
8606// topic when the creative changes status.
8607func (r *AccountsCreativesService) Watch(accountId string, creativeId string, watchcreativerequest *WatchCreativeRequest) *AccountsCreativesWatchCall {
8608	c := &AccountsCreativesWatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8609	c.accountId = accountId
8610	c.creativeId = creativeId
8611	c.watchcreativerequest = watchcreativerequest
8612	return c
8613}
8614
8615// Fields allows partial responses to be retrieved. See
8616// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8617// for more information.
8618func (c *AccountsCreativesWatchCall) Fields(s ...googleapi.Field) *AccountsCreativesWatchCall {
8619	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8620	return c
8621}
8622
8623// Context sets the context to be used in this call's Do method. Any
8624// pending HTTP request will be aborted if the provided context is
8625// canceled.
8626func (c *AccountsCreativesWatchCall) Context(ctx context.Context) *AccountsCreativesWatchCall {
8627	c.ctx_ = ctx
8628	return c
8629}
8630
8631// Header returns an http.Header that can be modified by the caller to
8632// add HTTP headers to the request.
8633func (c *AccountsCreativesWatchCall) Header() http.Header {
8634	if c.header_ == nil {
8635		c.header_ = make(http.Header)
8636	}
8637	return c.header_
8638}
8639
8640func (c *AccountsCreativesWatchCall) doRequest(alt string) (*http.Response, error) {
8641	reqHeaders := make(http.Header)
8642	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
8643	for k, v := range c.header_ {
8644		reqHeaders[k] = v
8645	}
8646	reqHeaders.Set("User-Agent", c.s.userAgent())
8647	var body io.Reader = nil
8648	body, err := googleapi.WithoutDataWrapper.JSONReader(c.watchcreativerequest)
8649	if err != nil {
8650		return nil, err
8651	}
8652	reqHeaders.Set("Content-Type", "application/json")
8653	c.urlParams_.Set("alt", alt)
8654	c.urlParams_.Set("prettyPrint", "false")
8655	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch")
8656	urls += "?" + c.urlParams_.Encode()
8657	req, err := http.NewRequest("POST", urls, body)
8658	if err != nil {
8659		return nil, err
8660	}
8661	req.Header = reqHeaders
8662	googleapi.Expand(req.URL, map[string]string{
8663		"accountId":  c.accountId,
8664		"creativeId": c.creativeId,
8665	})
8666	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8667}
8668
8669// Do executes the "adexchangebuyer2.accounts.creatives.watch" call.
8670// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8671// code is an error. Response headers are in either
8672// *Empty.ServerResponse.Header or (if a response was returned at all)
8673// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8674// check whether the returned error was because http.StatusNotModified
8675// was returned.
8676func (c *AccountsCreativesWatchCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8677	gensupport.SetOptions(c.urlParams_, opts...)
8678	res, err := c.doRequest("json")
8679	if res != nil && res.StatusCode == http.StatusNotModified {
8680		if res.Body != nil {
8681			res.Body.Close()
8682		}
8683		return nil, &googleapi.Error{
8684			Code:   res.StatusCode,
8685			Header: res.Header,
8686		}
8687	}
8688	if err != nil {
8689		return nil, err
8690	}
8691	defer googleapi.CloseBody(res)
8692	if err := googleapi.CheckResponse(res); err != nil {
8693		return nil, err
8694	}
8695	ret := &Empty{
8696		ServerResponse: googleapi.ServerResponse{
8697			Header:         res.Header,
8698			HTTPStatusCode: res.StatusCode,
8699		},
8700	}
8701	target := &ret
8702	if err := gensupport.DecodeResponse(target, res); err != nil {
8703		return nil, err
8704	}
8705	return ret, nil
8706	// {
8707	//   "description": "Watches a creative. Will result in push notifications being sent to the\ntopic when the creative changes status.",
8708	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch",
8709	//   "httpMethod": "POST",
8710	//   "id": "adexchangebuyer2.accounts.creatives.watch",
8711	//   "parameterOrder": [
8712	//     "accountId",
8713	//     "creativeId"
8714	//   ],
8715	//   "parameters": {
8716	//     "accountId": {
8717	//       "description": "The account of the creative to watch.",
8718	//       "location": "path",
8719	//       "required": true,
8720	//       "type": "string"
8721	//     },
8722	//     "creativeId": {
8723	//       "description": "The creative ID to watch for status changes.\nSpecify \"-\" to watch all creatives under the above account.\nIf both creative-level and account-level notifications are\nsent, only a single notification will be sent to the\ncreative-level notification topic.",
8724	//       "location": "path",
8725	//       "required": true,
8726	//       "type": "string"
8727	//     }
8728	//   },
8729	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch",
8730	//   "request": {
8731	//     "$ref": "WatchCreativeRequest"
8732	//   },
8733	//   "response": {
8734	//     "$ref": "Empty"
8735	//   },
8736	//   "scopes": [
8737	//     "https://www.googleapis.com/auth/adexchange.buyer"
8738	//   ]
8739	// }
8740
8741}
8742
8743// method id "adexchangebuyer2.accounts.creatives.dealAssociations.add":
8744
8745type AccountsCreativesDealAssociationsAddCall struct {
8746	s                         *Service
8747	accountId                 string
8748	creativeId                string
8749	adddealassociationrequest *AddDealAssociationRequest
8750	urlParams_                gensupport.URLParams
8751	ctx_                      context.Context
8752	header_                   http.Header
8753}
8754
8755// Add: Associate an existing deal with a creative.
8756func (r *AccountsCreativesDealAssociationsService) Add(accountId string, creativeId string, adddealassociationrequest *AddDealAssociationRequest) *AccountsCreativesDealAssociationsAddCall {
8757	c := &AccountsCreativesDealAssociationsAddCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8758	c.accountId = accountId
8759	c.creativeId = creativeId
8760	c.adddealassociationrequest = adddealassociationrequest
8761	return c
8762}
8763
8764// Fields allows partial responses to be retrieved. See
8765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8766// for more information.
8767func (c *AccountsCreativesDealAssociationsAddCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsAddCall {
8768	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8769	return c
8770}
8771
8772// Context sets the context to be used in this call's Do method. Any
8773// pending HTTP request will be aborted if the provided context is
8774// canceled.
8775func (c *AccountsCreativesDealAssociationsAddCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsAddCall {
8776	c.ctx_ = ctx
8777	return c
8778}
8779
8780// Header returns an http.Header that can be modified by the caller to
8781// add HTTP headers to the request.
8782func (c *AccountsCreativesDealAssociationsAddCall) Header() http.Header {
8783	if c.header_ == nil {
8784		c.header_ = make(http.Header)
8785	}
8786	return c.header_
8787}
8788
8789func (c *AccountsCreativesDealAssociationsAddCall) doRequest(alt string) (*http.Response, error) {
8790	reqHeaders := make(http.Header)
8791	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
8792	for k, v := range c.header_ {
8793		reqHeaders[k] = v
8794	}
8795	reqHeaders.Set("User-Agent", c.s.userAgent())
8796	var body io.Reader = nil
8797	body, err := googleapi.WithoutDataWrapper.JSONReader(c.adddealassociationrequest)
8798	if err != nil {
8799		return nil, err
8800	}
8801	reqHeaders.Set("Content-Type", "application/json")
8802	c.urlParams_.Set("alt", alt)
8803	c.urlParams_.Set("prettyPrint", "false")
8804	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add")
8805	urls += "?" + c.urlParams_.Encode()
8806	req, err := http.NewRequest("POST", urls, body)
8807	if err != nil {
8808		return nil, err
8809	}
8810	req.Header = reqHeaders
8811	googleapi.Expand(req.URL, map[string]string{
8812		"accountId":  c.accountId,
8813		"creativeId": c.creativeId,
8814	})
8815	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8816}
8817
8818// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.add" call.
8819// Exactly one of *Empty or error will be non-nil. Any non-2xx status
8820// code is an error. Response headers are in either
8821// *Empty.ServerResponse.Header or (if a response was returned at all)
8822// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8823// check whether the returned error was because http.StatusNotModified
8824// was returned.
8825func (c *AccountsCreativesDealAssociationsAddCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
8826	gensupport.SetOptions(c.urlParams_, opts...)
8827	res, err := c.doRequest("json")
8828	if res != nil && res.StatusCode == http.StatusNotModified {
8829		if res.Body != nil {
8830			res.Body.Close()
8831		}
8832		return nil, &googleapi.Error{
8833			Code:   res.StatusCode,
8834			Header: res.Header,
8835		}
8836	}
8837	if err != nil {
8838		return nil, err
8839	}
8840	defer googleapi.CloseBody(res)
8841	if err := googleapi.CheckResponse(res); err != nil {
8842		return nil, err
8843	}
8844	ret := &Empty{
8845		ServerResponse: googleapi.ServerResponse{
8846			Header:         res.Header,
8847			HTTPStatusCode: res.StatusCode,
8848		},
8849	}
8850	target := &ret
8851	if err := gensupport.DecodeResponse(target, res); err != nil {
8852		return nil, err
8853	}
8854	return ret, nil
8855	// {
8856	//   "description": "Associate an existing deal with a creative.",
8857	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add",
8858	//   "httpMethod": "POST",
8859	//   "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add",
8860	//   "parameterOrder": [
8861	//     "accountId",
8862	//     "creativeId"
8863	//   ],
8864	//   "parameters": {
8865	//     "accountId": {
8866	//       "description": "The account the creative belongs to.",
8867	//       "location": "path",
8868	//       "required": true,
8869	//       "type": "string"
8870	//     },
8871	//     "creativeId": {
8872	//       "description": "The ID of the creative associated with the deal.",
8873	//       "location": "path",
8874	//       "required": true,
8875	//       "type": "string"
8876	//     }
8877	//   },
8878	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add",
8879	//   "request": {
8880	//     "$ref": "AddDealAssociationRequest"
8881	//   },
8882	//   "response": {
8883	//     "$ref": "Empty"
8884	//   },
8885	//   "scopes": [
8886	//     "https://www.googleapis.com/auth/adexchange.buyer"
8887	//   ]
8888	// }
8889
8890}
8891
8892// method id "adexchangebuyer2.accounts.creatives.dealAssociations.list":
8893
8894type AccountsCreativesDealAssociationsListCall struct {
8895	s            *Service
8896	accountId    string
8897	creativeId   string
8898	urlParams_   gensupport.URLParams
8899	ifNoneMatch_ string
8900	ctx_         context.Context
8901	header_      http.Header
8902}
8903
8904// List: List all creative-deal associations.
8905func (r *AccountsCreativesDealAssociationsService) List(accountId string, creativeId string) *AccountsCreativesDealAssociationsListCall {
8906	c := &AccountsCreativesDealAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8907	c.accountId = accountId
8908	c.creativeId = creativeId
8909	return c
8910}
8911
8912// PageSize sets the optional parameter "pageSize": Requested page size.
8913// Server may return fewer associations than requested.
8914// If unspecified, server will pick an appropriate default.
8915func (c *AccountsCreativesDealAssociationsListCall) PageSize(pageSize int64) *AccountsCreativesDealAssociationsListCall {
8916	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8917	return c
8918}
8919
8920// PageToken sets the optional parameter "pageToken": A token
8921// identifying a page of results the server should return.
8922// Typically, this is the value
8923// of
8924// ListDealAssociationsResponse.next_page_token
8925// returned from the previous call to 'ListDealAssociations' method.
8926func (c *AccountsCreativesDealAssociationsListCall) PageToken(pageToken string) *AccountsCreativesDealAssociationsListCall {
8927	c.urlParams_.Set("pageToken", pageToken)
8928	return c
8929}
8930
8931// Query sets the optional parameter "query": An optional query string
8932// to filter deal associations. If no filter is
8933// specified, all associations will be returned.
8934// Supported queries
8935// are:
8936// <ul>
8937// <li>accountId=<i>account_id_string</i>
8938// <li>creativeId=<i>cre
8939// ative_id_string</i>
8940// <li>dealsId=<i>deals_id_string</i>
8941// <li>dealsStatus
8942// :{approved, conditionally_approved, disapproved,
8943//                   not_checked}
8944// <li>openAuctionStatus:{approved, conditionally_approved,
8945// disapproved,
8946//                          not_checked}
8947// </ul>
8948// Example: 'dealsId=12345 AND dealsStatus:disapproved'
8949func (c *AccountsCreativesDealAssociationsListCall) Query(query string) *AccountsCreativesDealAssociationsListCall {
8950	c.urlParams_.Set("query", query)
8951	return c
8952}
8953
8954// Fields allows partial responses to be retrieved. See
8955// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8956// for more information.
8957func (c *AccountsCreativesDealAssociationsListCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsListCall {
8958	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8959	return c
8960}
8961
8962// IfNoneMatch sets the optional parameter which makes the operation
8963// fail if the object's ETag matches the given value. This is useful for
8964// getting updates only after the object has changed since the last
8965// request. Use googleapi.IsNotModified to check whether the response
8966// error from Do is the result of In-None-Match.
8967func (c *AccountsCreativesDealAssociationsListCall) IfNoneMatch(entityTag string) *AccountsCreativesDealAssociationsListCall {
8968	c.ifNoneMatch_ = entityTag
8969	return c
8970}
8971
8972// Context sets the context to be used in this call's Do method. Any
8973// pending HTTP request will be aborted if the provided context is
8974// canceled.
8975func (c *AccountsCreativesDealAssociationsListCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsListCall {
8976	c.ctx_ = ctx
8977	return c
8978}
8979
8980// Header returns an http.Header that can be modified by the caller to
8981// add HTTP headers to the request.
8982func (c *AccountsCreativesDealAssociationsListCall) Header() http.Header {
8983	if c.header_ == nil {
8984		c.header_ = make(http.Header)
8985	}
8986	return c.header_
8987}
8988
8989func (c *AccountsCreativesDealAssociationsListCall) doRequest(alt string) (*http.Response, error) {
8990	reqHeaders := make(http.Header)
8991	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
8992	for k, v := range c.header_ {
8993		reqHeaders[k] = v
8994	}
8995	reqHeaders.Set("User-Agent", c.s.userAgent())
8996	if c.ifNoneMatch_ != "" {
8997		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8998	}
8999	var body io.Reader = nil
9000	c.urlParams_.Set("alt", alt)
9001	c.urlParams_.Set("prettyPrint", "false")
9002	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations")
9003	urls += "?" + c.urlParams_.Encode()
9004	req, err := http.NewRequest("GET", urls, body)
9005	if err != nil {
9006		return nil, err
9007	}
9008	req.Header = reqHeaders
9009	googleapi.Expand(req.URL, map[string]string{
9010		"accountId":  c.accountId,
9011		"creativeId": c.creativeId,
9012	})
9013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9014}
9015
9016// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.list" call.
9017// Exactly one of *ListDealAssociationsResponse or error will be
9018// non-nil. Any non-2xx status code is an error. Response headers are in
9019// either *ListDealAssociationsResponse.ServerResponse.Header or (if a
9020// response was returned at all) in error.(*googleapi.Error).Header. Use
9021// googleapi.IsNotModified to check whether the returned error was
9022// because http.StatusNotModified was returned.
9023func (c *AccountsCreativesDealAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListDealAssociationsResponse, error) {
9024	gensupport.SetOptions(c.urlParams_, opts...)
9025	res, err := c.doRequest("json")
9026	if res != nil && res.StatusCode == http.StatusNotModified {
9027		if res.Body != nil {
9028			res.Body.Close()
9029		}
9030		return nil, &googleapi.Error{
9031			Code:   res.StatusCode,
9032			Header: res.Header,
9033		}
9034	}
9035	if err != nil {
9036		return nil, err
9037	}
9038	defer googleapi.CloseBody(res)
9039	if err := googleapi.CheckResponse(res); err != nil {
9040		return nil, err
9041	}
9042	ret := &ListDealAssociationsResponse{
9043		ServerResponse: googleapi.ServerResponse{
9044			Header:         res.Header,
9045			HTTPStatusCode: res.StatusCode,
9046		},
9047	}
9048	target := &ret
9049	if err := gensupport.DecodeResponse(target, res); err != nil {
9050		return nil, err
9051	}
9052	return ret, nil
9053	// {
9054	//   "description": "List all creative-deal associations.",
9055	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations",
9056	//   "httpMethod": "GET",
9057	//   "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list",
9058	//   "parameterOrder": [
9059	//     "accountId",
9060	//     "creativeId"
9061	//   ],
9062	//   "parameters": {
9063	//     "accountId": {
9064	//       "description": "The account to list the associations from.\nSpecify \"-\" to list all creatives the current user has access to.",
9065	//       "location": "path",
9066	//       "required": true,
9067	//       "type": "string"
9068	//     },
9069	//     "creativeId": {
9070	//       "description": "The creative ID to list the associations from.\nSpecify \"-\" to list all creatives under the above account.",
9071	//       "location": "path",
9072	//       "required": true,
9073	//       "type": "string"
9074	//     },
9075	//     "pageSize": {
9076	//       "description": "Requested page size. Server may return fewer associations than requested.\nIf unspecified, server will pick an appropriate default.",
9077	//       "format": "int32",
9078	//       "location": "query",
9079	//       "type": "integer"
9080	//     },
9081	//     "pageToken": {
9082	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListDealAssociationsResponse.next_page_token\nreturned from the previous call to 'ListDealAssociations' method.",
9083	//       "location": "query",
9084	//       "type": "string"
9085	//     },
9086	//     "query": {
9087	//       "description": "An optional query string to filter deal associations. If no filter is\nspecified, all associations will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsId=\u003ci\u003edeals_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus:{approved, conditionally_approved, disapproved,\n                  not_checked}\n\u003cli\u003eopenAuctionStatus:{approved, conditionally_approved, disapproved,\n                         not_checked}\n\u003c/ul\u003e\nExample: 'dealsId=12345 AND dealsStatus:disapproved'",
9088	//       "location": "query",
9089	//       "type": "string"
9090	//     }
9091	//   },
9092	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations",
9093	//   "response": {
9094	//     "$ref": "ListDealAssociationsResponse"
9095	//   },
9096	//   "scopes": [
9097	//     "https://www.googleapis.com/auth/adexchange.buyer"
9098	//   ]
9099	// }
9100
9101}
9102
9103// Pages invokes f for each page of results.
9104// A non-nil error returned from f will halt the iteration.
9105// The provided context supersedes any context provided to the Context method.
9106func (c *AccountsCreativesDealAssociationsListCall) Pages(ctx context.Context, f func(*ListDealAssociationsResponse) error) error {
9107	c.ctx_ = ctx
9108	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9109	for {
9110		x, err := c.Do()
9111		if err != nil {
9112			return err
9113		}
9114		if err := f(x); err != nil {
9115			return err
9116		}
9117		if x.NextPageToken == "" {
9118			return nil
9119		}
9120		c.PageToken(x.NextPageToken)
9121	}
9122}
9123
9124// method id "adexchangebuyer2.accounts.creatives.dealAssociations.remove":
9125
9126type AccountsCreativesDealAssociationsRemoveCall struct {
9127	s                            *Service
9128	accountId                    string
9129	creativeId                   string
9130	removedealassociationrequest *RemoveDealAssociationRequest
9131	urlParams_                   gensupport.URLParams
9132	ctx_                         context.Context
9133	header_                      http.Header
9134}
9135
9136// Remove: Remove the association between a deal and a creative.
9137func (r *AccountsCreativesDealAssociationsService) Remove(accountId string, creativeId string, removedealassociationrequest *RemoveDealAssociationRequest) *AccountsCreativesDealAssociationsRemoveCall {
9138	c := &AccountsCreativesDealAssociationsRemoveCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9139	c.accountId = accountId
9140	c.creativeId = creativeId
9141	c.removedealassociationrequest = removedealassociationrequest
9142	return c
9143}
9144
9145// Fields allows partial responses to be retrieved. See
9146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9147// for more information.
9148func (c *AccountsCreativesDealAssociationsRemoveCall) Fields(s ...googleapi.Field) *AccountsCreativesDealAssociationsRemoveCall {
9149	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9150	return c
9151}
9152
9153// Context sets the context to be used in this call's Do method. Any
9154// pending HTTP request will be aborted if the provided context is
9155// canceled.
9156func (c *AccountsCreativesDealAssociationsRemoveCall) Context(ctx context.Context) *AccountsCreativesDealAssociationsRemoveCall {
9157	c.ctx_ = ctx
9158	return c
9159}
9160
9161// Header returns an http.Header that can be modified by the caller to
9162// add HTTP headers to the request.
9163func (c *AccountsCreativesDealAssociationsRemoveCall) Header() http.Header {
9164	if c.header_ == nil {
9165		c.header_ = make(http.Header)
9166	}
9167	return c.header_
9168}
9169
9170func (c *AccountsCreativesDealAssociationsRemoveCall) doRequest(alt string) (*http.Response, error) {
9171	reqHeaders := make(http.Header)
9172	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
9173	for k, v := range c.header_ {
9174		reqHeaders[k] = v
9175	}
9176	reqHeaders.Set("User-Agent", c.s.userAgent())
9177	var body io.Reader = nil
9178	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removedealassociationrequest)
9179	if err != nil {
9180		return nil, err
9181	}
9182	reqHeaders.Set("Content-Type", "application/json")
9183	c.urlParams_.Set("alt", alt)
9184	c.urlParams_.Set("prettyPrint", "false")
9185	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove")
9186	urls += "?" + c.urlParams_.Encode()
9187	req, err := http.NewRequest("POST", urls, body)
9188	if err != nil {
9189		return nil, err
9190	}
9191	req.Header = reqHeaders
9192	googleapi.Expand(req.URL, map[string]string{
9193		"accountId":  c.accountId,
9194		"creativeId": c.creativeId,
9195	})
9196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9197}
9198
9199// Do executes the "adexchangebuyer2.accounts.creatives.dealAssociations.remove" call.
9200// Exactly one of *Empty or error will be non-nil. Any non-2xx status
9201// code is an error. Response headers are in either
9202// *Empty.ServerResponse.Header or (if a response was returned at all)
9203// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9204// check whether the returned error was because http.StatusNotModified
9205// was returned.
9206func (c *AccountsCreativesDealAssociationsRemoveCall) Do(opts ...googleapi.CallOption) (*Empty, 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 := &Empty{
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": "Remove the association between a deal and a creative.",
9238	//   "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove",
9239	//   "httpMethod": "POST",
9240	//   "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove",
9241	//   "parameterOrder": [
9242	//     "accountId",
9243	//     "creativeId"
9244	//   ],
9245	//   "parameters": {
9246	//     "accountId": {
9247	//       "description": "The account the creative belongs to.",
9248	//       "location": "path",
9249	//       "required": true,
9250	//       "type": "string"
9251	//     },
9252	//     "creativeId": {
9253	//       "description": "The ID of the creative associated with the deal.",
9254	//       "location": "path",
9255	//       "required": true,
9256	//       "type": "string"
9257	//     }
9258	//   },
9259	//   "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove",
9260	//   "request": {
9261	//     "$ref": "RemoveDealAssociationRequest"
9262	//   },
9263	//   "response": {
9264	//     "$ref": "Empty"
9265	//   },
9266	//   "scopes": [
9267	//     "https://www.googleapis.com/auth/adexchange.buyer"
9268	//   ]
9269	// }
9270
9271}
9272
9273// method id "adexchangebuyer2.accounts.finalizedProposals.list":
9274
9275type AccountsFinalizedProposalsListCall struct {
9276	s            *Service
9277	accountId    string
9278	urlParams_   gensupport.URLParams
9279	ifNoneMatch_ string
9280	ctx_         context.Context
9281	header_      http.Header
9282}
9283
9284// List: List finalized proposals, regardless if a proposal is being
9285// renegotiated.
9286// A filter expression (PQL query) may be specified to filter the
9287// results.
9288// The notes will not be returned.
9289func (r *AccountsFinalizedProposalsService) List(accountId string) *AccountsFinalizedProposalsListCall {
9290	c := &AccountsFinalizedProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9291	c.accountId = accountId
9292	return c
9293}
9294
9295// Filter sets the optional parameter "filter": An optional PQL filter
9296// query used to query for proposals.
9297//
9298// Nested repeated fields, such as
9299// proposal.deals.targetingCriterion,
9300// cannot be filtered.
9301func (c *AccountsFinalizedProposalsListCall) Filter(filter string) *AccountsFinalizedProposalsListCall {
9302	c.urlParams_.Set("filter", filter)
9303	return c
9304}
9305
9306// FilterSyntax sets the optional parameter "filterSyntax": Syntax the
9307// filter is written in. Current implementation defaults to PQL
9308// but in the future it will be LIST_FILTER.
9309//
9310// Possible values:
9311//   "FILTER_SYNTAX_UNSPECIFIED"
9312//   "PQL"
9313//   "LIST_FILTER"
9314func (c *AccountsFinalizedProposalsListCall) FilterSyntax(filterSyntax string) *AccountsFinalizedProposalsListCall {
9315	c.urlParams_.Set("filterSyntax", filterSyntax)
9316	return c
9317}
9318
9319// PageSize sets the optional parameter "pageSize": Requested page size.
9320// The server may return fewer results than requested.
9321// If unspecified, the server will pick an appropriate default.
9322func (c *AccountsFinalizedProposalsListCall) PageSize(pageSize int64) *AccountsFinalizedProposalsListCall {
9323	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9324	return c
9325}
9326
9327// PageToken sets the optional parameter "pageToken": The page token as
9328// returned from ListProposalsResponse.
9329func (c *AccountsFinalizedProposalsListCall) PageToken(pageToken string) *AccountsFinalizedProposalsListCall {
9330	c.urlParams_.Set("pageToken", pageToken)
9331	return c
9332}
9333
9334// Fields allows partial responses to be retrieved. See
9335// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9336// for more information.
9337func (c *AccountsFinalizedProposalsListCall) Fields(s ...googleapi.Field) *AccountsFinalizedProposalsListCall {
9338	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9339	return c
9340}
9341
9342// IfNoneMatch sets the optional parameter which makes the operation
9343// fail if the object's ETag matches the given value. This is useful for
9344// getting updates only after the object has changed since the last
9345// request. Use googleapi.IsNotModified to check whether the response
9346// error from Do is the result of In-None-Match.
9347func (c *AccountsFinalizedProposalsListCall) IfNoneMatch(entityTag string) *AccountsFinalizedProposalsListCall {
9348	c.ifNoneMatch_ = entityTag
9349	return c
9350}
9351
9352// Context sets the context to be used in this call's Do method. Any
9353// pending HTTP request will be aborted if the provided context is
9354// canceled.
9355func (c *AccountsFinalizedProposalsListCall) Context(ctx context.Context) *AccountsFinalizedProposalsListCall {
9356	c.ctx_ = ctx
9357	return c
9358}
9359
9360// Header returns an http.Header that can be modified by the caller to
9361// add HTTP headers to the request.
9362func (c *AccountsFinalizedProposalsListCall) Header() http.Header {
9363	if c.header_ == nil {
9364		c.header_ = make(http.Header)
9365	}
9366	return c.header_
9367}
9368
9369func (c *AccountsFinalizedProposalsListCall) doRequest(alt string) (*http.Response, error) {
9370	reqHeaders := make(http.Header)
9371	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
9372	for k, v := range c.header_ {
9373		reqHeaders[k] = v
9374	}
9375	reqHeaders.Set("User-Agent", c.s.userAgent())
9376	if c.ifNoneMatch_ != "" {
9377		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9378	}
9379	var body io.Reader = nil
9380	c.urlParams_.Set("alt", alt)
9381	c.urlParams_.Set("prettyPrint", "false")
9382	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/finalizedProposals")
9383	urls += "?" + c.urlParams_.Encode()
9384	req, err := http.NewRequest("GET", urls, body)
9385	if err != nil {
9386		return nil, err
9387	}
9388	req.Header = reqHeaders
9389	googleapi.Expand(req.URL, map[string]string{
9390		"accountId": c.accountId,
9391	})
9392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9393}
9394
9395// Do executes the "adexchangebuyer2.accounts.finalizedProposals.list" call.
9396// Exactly one of *ListProposalsResponse or error will be non-nil. Any
9397// non-2xx status code is an error. Response headers are in either
9398// *ListProposalsResponse.ServerResponse.Header or (if a response was
9399// returned at all) in error.(*googleapi.Error).Header. Use
9400// googleapi.IsNotModified to check whether the returned error was
9401// because http.StatusNotModified was returned.
9402func (c *AccountsFinalizedProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) {
9403	gensupport.SetOptions(c.urlParams_, opts...)
9404	res, err := c.doRequest("json")
9405	if res != nil && res.StatusCode == http.StatusNotModified {
9406		if res.Body != nil {
9407			res.Body.Close()
9408		}
9409		return nil, &googleapi.Error{
9410			Code:   res.StatusCode,
9411			Header: res.Header,
9412		}
9413	}
9414	if err != nil {
9415		return nil, err
9416	}
9417	defer googleapi.CloseBody(res)
9418	if err := googleapi.CheckResponse(res); err != nil {
9419		return nil, err
9420	}
9421	ret := &ListProposalsResponse{
9422		ServerResponse: googleapi.ServerResponse{
9423			Header:         res.Header,
9424			HTTPStatusCode: res.StatusCode,
9425		},
9426	}
9427	target := &ret
9428	if err := gensupport.DecodeResponse(target, res); err != nil {
9429		return nil, err
9430	}
9431	return ret, nil
9432	// {
9433	//   "description": "List finalized proposals, regardless if a proposal is being renegotiated.\nA filter expression (PQL query) may be specified to filter the results.\nThe notes will not be returned.",
9434	//   "flatPath": "v2beta1/accounts/{accountId}/finalizedProposals",
9435	//   "httpMethod": "GET",
9436	//   "id": "adexchangebuyer2.accounts.finalizedProposals.list",
9437	//   "parameterOrder": [
9438	//     "accountId"
9439	//   ],
9440	//   "parameters": {
9441	//     "accountId": {
9442	//       "description": "Account ID of the buyer.",
9443	//       "location": "path",
9444	//       "required": true,
9445	//       "type": "string"
9446	//     },
9447	//     "filter": {
9448	//       "description": "An optional PQL filter query used to query for proposals.\n\nNested repeated fields, such as proposal.deals.targetingCriterion,\ncannot be filtered.",
9449	//       "location": "query",
9450	//       "type": "string"
9451	//     },
9452	//     "filterSyntax": {
9453	//       "description": "Syntax the filter is written in. Current implementation defaults to PQL\nbut in the future it will be LIST_FILTER.",
9454	//       "enum": [
9455	//         "FILTER_SYNTAX_UNSPECIFIED",
9456	//         "PQL",
9457	//         "LIST_FILTER"
9458	//       ],
9459	//       "location": "query",
9460	//       "type": "string"
9461	//     },
9462	//     "pageSize": {
9463	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
9464	//       "format": "int32",
9465	//       "location": "query",
9466	//       "type": "integer"
9467	//     },
9468	//     "pageToken": {
9469	//       "description": "The page token as returned from ListProposalsResponse.",
9470	//       "location": "query",
9471	//       "type": "string"
9472	//     }
9473	//   },
9474	//   "path": "v2beta1/accounts/{accountId}/finalizedProposals",
9475	//   "response": {
9476	//     "$ref": "ListProposalsResponse"
9477	//   },
9478	//   "scopes": [
9479	//     "https://www.googleapis.com/auth/adexchange.buyer"
9480	//   ]
9481	// }
9482
9483}
9484
9485// Pages invokes f for each page of results.
9486// A non-nil error returned from f will halt the iteration.
9487// The provided context supersedes any context provided to the Context method.
9488func (c *AccountsFinalizedProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error {
9489	c.ctx_ = ctx
9490	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9491	for {
9492		x, err := c.Do()
9493		if err != nil {
9494			return err
9495		}
9496		if err := f(x); err != nil {
9497			return err
9498		}
9499		if x.NextPageToken == "" {
9500			return nil
9501		}
9502		c.PageToken(x.NextPageToken)
9503	}
9504}
9505
9506// method id "adexchangebuyer2.accounts.products.get":
9507
9508type AccountsProductsGetCall struct {
9509	s            *Service
9510	accountId    string
9511	productId    string
9512	urlParams_   gensupport.URLParams
9513	ifNoneMatch_ string
9514	ctx_         context.Context
9515	header_      http.Header
9516}
9517
9518// Get: Gets the requested product by ID.
9519func (r *AccountsProductsService) Get(accountId string, productId string) *AccountsProductsGetCall {
9520	c := &AccountsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9521	c.accountId = accountId
9522	c.productId = productId
9523	return c
9524}
9525
9526// Fields allows partial responses to be retrieved. See
9527// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9528// for more information.
9529func (c *AccountsProductsGetCall) Fields(s ...googleapi.Field) *AccountsProductsGetCall {
9530	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9531	return c
9532}
9533
9534// IfNoneMatch sets the optional parameter which makes the operation
9535// fail if the object's ETag matches the given value. This is useful for
9536// getting updates only after the object has changed since the last
9537// request. Use googleapi.IsNotModified to check whether the response
9538// error from Do is the result of In-None-Match.
9539func (c *AccountsProductsGetCall) IfNoneMatch(entityTag string) *AccountsProductsGetCall {
9540	c.ifNoneMatch_ = entityTag
9541	return c
9542}
9543
9544// Context sets the context to be used in this call's Do method. Any
9545// pending HTTP request will be aborted if the provided context is
9546// canceled.
9547func (c *AccountsProductsGetCall) Context(ctx context.Context) *AccountsProductsGetCall {
9548	c.ctx_ = ctx
9549	return c
9550}
9551
9552// Header returns an http.Header that can be modified by the caller to
9553// add HTTP headers to the request.
9554func (c *AccountsProductsGetCall) Header() http.Header {
9555	if c.header_ == nil {
9556		c.header_ = make(http.Header)
9557	}
9558	return c.header_
9559}
9560
9561func (c *AccountsProductsGetCall) doRequest(alt string) (*http.Response, error) {
9562	reqHeaders := make(http.Header)
9563	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
9564	for k, v := range c.header_ {
9565		reqHeaders[k] = v
9566	}
9567	reqHeaders.Set("User-Agent", c.s.userAgent())
9568	if c.ifNoneMatch_ != "" {
9569		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9570	}
9571	var body io.Reader = nil
9572	c.urlParams_.Set("alt", alt)
9573	c.urlParams_.Set("prettyPrint", "false")
9574	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products/{productId}")
9575	urls += "?" + c.urlParams_.Encode()
9576	req, err := http.NewRequest("GET", urls, body)
9577	if err != nil {
9578		return nil, err
9579	}
9580	req.Header = reqHeaders
9581	googleapi.Expand(req.URL, map[string]string{
9582		"accountId": c.accountId,
9583		"productId": c.productId,
9584	})
9585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9586}
9587
9588// Do executes the "adexchangebuyer2.accounts.products.get" call.
9589// Exactly one of *Product or error will be non-nil. Any non-2xx status
9590// code is an error. Response headers are in either
9591// *Product.ServerResponse.Header or (if a response was returned at all)
9592// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9593// check whether the returned error was because http.StatusNotModified
9594// was returned.
9595func (c *AccountsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
9596	gensupport.SetOptions(c.urlParams_, opts...)
9597	res, err := c.doRequest("json")
9598	if res != nil && res.StatusCode == http.StatusNotModified {
9599		if res.Body != nil {
9600			res.Body.Close()
9601		}
9602		return nil, &googleapi.Error{
9603			Code:   res.StatusCode,
9604			Header: res.Header,
9605		}
9606	}
9607	if err != nil {
9608		return nil, err
9609	}
9610	defer googleapi.CloseBody(res)
9611	if err := googleapi.CheckResponse(res); err != nil {
9612		return nil, err
9613	}
9614	ret := &Product{
9615		ServerResponse: googleapi.ServerResponse{
9616			Header:         res.Header,
9617			HTTPStatusCode: res.StatusCode,
9618		},
9619	}
9620	target := &ret
9621	if err := gensupport.DecodeResponse(target, res); err != nil {
9622		return nil, err
9623	}
9624	return ret, nil
9625	// {
9626	//   "description": "Gets the requested product by ID.",
9627	//   "flatPath": "v2beta1/accounts/{accountId}/products/{productId}",
9628	//   "httpMethod": "GET",
9629	//   "id": "adexchangebuyer2.accounts.products.get",
9630	//   "parameterOrder": [
9631	//     "accountId",
9632	//     "productId"
9633	//   ],
9634	//   "parameters": {
9635	//     "accountId": {
9636	//       "description": "Account ID of the buyer.",
9637	//       "location": "path",
9638	//       "required": true,
9639	//       "type": "string"
9640	//     },
9641	//     "productId": {
9642	//       "description": "The ID for the product to get the head revision for.",
9643	//       "location": "path",
9644	//       "required": true,
9645	//       "type": "string"
9646	//     }
9647	//   },
9648	//   "path": "v2beta1/accounts/{accountId}/products/{productId}",
9649	//   "response": {
9650	//     "$ref": "Product"
9651	//   },
9652	//   "scopes": [
9653	//     "https://www.googleapis.com/auth/adexchange.buyer"
9654	//   ]
9655	// }
9656
9657}
9658
9659// method id "adexchangebuyer2.accounts.products.list":
9660
9661type AccountsProductsListCall struct {
9662	s            *Service
9663	accountId    string
9664	urlParams_   gensupport.URLParams
9665	ifNoneMatch_ string
9666	ctx_         context.Context
9667	header_      http.Header
9668}
9669
9670// List: List all products visible to the buyer (optionally filtered by
9671// the
9672// specified PQL query).
9673func (r *AccountsProductsService) List(accountId string) *AccountsProductsListCall {
9674	c := &AccountsProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9675	c.accountId = accountId
9676	return c
9677}
9678
9679// Filter sets the optional parameter "filter": An optional PQL query
9680// used to query for products.
9681// See
9682// https://developers.google.com/ad-manager/docs/pqlreference
9683// for documentation about PQL and examples.
9684//
9685// Nested repeated fields, such as
9686// product.targetingCriterion.inclusions,
9687// cannot be filtered.
9688func (c *AccountsProductsListCall) Filter(filter string) *AccountsProductsListCall {
9689	c.urlParams_.Set("filter", filter)
9690	return c
9691}
9692
9693// PageSize sets the optional parameter "pageSize": Requested page size.
9694// The server may return fewer results than requested.
9695// If unspecified, the server will pick an appropriate default.
9696func (c *AccountsProductsListCall) PageSize(pageSize int64) *AccountsProductsListCall {
9697	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9698	return c
9699}
9700
9701// PageToken sets the optional parameter "pageToken": The page token as
9702// returned from ListProductsResponse.
9703func (c *AccountsProductsListCall) PageToken(pageToken string) *AccountsProductsListCall {
9704	c.urlParams_.Set("pageToken", pageToken)
9705	return c
9706}
9707
9708// Fields allows partial responses to be retrieved. See
9709// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9710// for more information.
9711func (c *AccountsProductsListCall) Fields(s ...googleapi.Field) *AccountsProductsListCall {
9712	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9713	return c
9714}
9715
9716// IfNoneMatch sets the optional parameter which makes the operation
9717// fail if the object's ETag matches the given value. This is useful for
9718// getting updates only after the object has changed since the last
9719// request. Use googleapi.IsNotModified to check whether the response
9720// error from Do is the result of In-None-Match.
9721func (c *AccountsProductsListCall) IfNoneMatch(entityTag string) *AccountsProductsListCall {
9722	c.ifNoneMatch_ = entityTag
9723	return c
9724}
9725
9726// Context sets the context to be used in this call's Do method. Any
9727// pending HTTP request will be aborted if the provided context is
9728// canceled.
9729func (c *AccountsProductsListCall) Context(ctx context.Context) *AccountsProductsListCall {
9730	c.ctx_ = ctx
9731	return c
9732}
9733
9734// Header returns an http.Header that can be modified by the caller to
9735// add HTTP headers to the request.
9736func (c *AccountsProductsListCall) Header() http.Header {
9737	if c.header_ == nil {
9738		c.header_ = make(http.Header)
9739	}
9740	return c.header_
9741}
9742
9743func (c *AccountsProductsListCall) doRequest(alt string) (*http.Response, error) {
9744	reqHeaders := make(http.Header)
9745	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
9746	for k, v := range c.header_ {
9747		reqHeaders[k] = v
9748	}
9749	reqHeaders.Set("User-Agent", c.s.userAgent())
9750	if c.ifNoneMatch_ != "" {
9751		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9752	}
9753	var body io.Reader = nil
9754	c.urlParams_.Set("alt", alt)
9755	c.urlParams_.Set("prettyPrint", "false")
9756	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/products")
9757	urls += "?" + c.urlParams_.Encode()
9758	req, err := http.NewRequest("GET", urls, body)
9759	if err != nil {
9760		return nil, err
9761	}
9762	req.Header = reqHeaders
9763	googleapi.Expand(req.URL, map[string]string{
9764		"accountId": c.accountId,
9765	})
9766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9767}
9768
9769// Do executes the "adexchangebuyer2.accounts.products.list" call.
9770// Exactly one of *ListProductsResponse or error will be non-nil. Any
9771// non-2xx status code is an error. Response headers are in either
9772// *ListProductsResponse.ServerResponse.Header or (if a response was
9773// returned at all) in error.(*googleapi.Error).Header. Use
9774// googleapi.IsNotModified to check whether the returned error was
9775// because http.StatusNotModified was returned.
9776func (c *AccountsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error) {
9777	gensupport.SetOptions(c.urlParams_, opts...)
9778	res, err := c.doRequest("json")
9779	if res != nil && res.StatusCode == http.StatusNotModified {
9780		if res.Body != nil {
9781			res.Body.Close()
9782		}
9783		return nil, &googleapi.Error{
9784			Code:   res.StatusCode,
9785			Header: res.Header,
9786		}
9787	}
9788	if err != nil {
9789		return nil, err
9790	}
9791	defer googleapi.CloseBody(res)
9792	if err := googleapi.CheckResponse(res); err != nil {
9793		return nil, err
9794	}
9795	ret := &ListProductsResponse{
9796		ServerResponse: googleapi.ServerResponse{
9797			Header:         res.Header,
9798			HTTPStatusCode: res.StatusCode,
9799		},
9800	}
9801	target := &ret
9802	if err := gensupport.DecodeResponse(target, res); err != nil {
9803		return nil, err
9804	}
9805	return ret, nil
9806	// {
9807	//   "description": "List all products visible to the buyer (optionally filtered by the\nspecified PQL query).",
9808	//   "flatPath": "v2beta1/accounts/{accountId}/products",
9809	//   "httpMethod": "GET",
9810	//   "id": "adexchangebuyer2.accounts.products.list",
9811	//   "parameterOrder": [
9812	//     "accountId"
9813	//   ],
9814	//   "parameters": {
9815	//     "accountId": {
9816	//       "description": "Account ID of the buyer.",
9817	//       "location": "path",
9818	//       "required": true,
9819	//       "type": "string"
9820	//     },
9821	//     "filter": {
9822	//       "description": "An optional PQL query used to query for products. See\nhttps://developers.google.com/ad-manager/docs/pqlreference\nfor documentation about PQL and examples.\n\nNested repeated fields, such as product.targetingCriterion.inclusions,\ncannot be filtered.",
9823	//       "location": "query",
9824	//       "type": "string"
9825	//     },
9826	//     "pageSize": {
9827	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
9828	//       "format": "int32",
9829	//       "location": "query",
9830	//       "type": "integer"
9831	//     },
9832	//     "pageToken": {
9833	//       "description": "The page token as returned from ListProductsResponse.",
9834	//       "location": "query",
9835	//       "type": "string"
9836	//     }
9837	//   },
9838	//   "path": "v2beta1/accounts/{accountId}/products",
9839	//   "response": {
9840	//     "$ref": "ListProductsResponse"
9841	//   },
9842	//   "scopes": [
9843	//     "https://www.googleapis.com/auth/adexchange.buyer"
9844	//   ]
9845	// }
9846
9847}
9848
9849// Pages invokes f for each page of results.
9850// A non-nil error returned from f will halt the iteration.
9851// The provided context supersedes any context provided to the Context method.
9852func (c *AccountsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error {
9853	c.ctx_ = ctx
9854	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9855	for {
9856		x, err := c.Do()
9857		if err != nil {
9858			return err
9859		}
9860		if err := f(x); err != nil {
9861			return err
9862		}
9863		if x.NextPageToken == "" {
9864			return nil
9865		}
9866		c.PageToken(x.NextPageToken)
9867	}
9868}
9869
9870// method id "adexchangebuyer2.accounts.proposals.accept":
9871
9872type AccountsProposalsAcceptCall struct {
9873	s                     *Service
9874	accountId             string
9875	proposalId            string
9876	acceptproposalrequest *AcceptProposalRequest
9877	urlParams_            gensupport.URLParams
9878	ctx_                  context.Context
9879	header_               http.Header
9880}
9881
9882// Accept: Mark the proposal as accepted at the given revision number.
9883// If the number
9884// does not match the server's revision number an `ABORTED` error
9885// message will
9886// be returned. This call updates the proposal_state from `PROPOSED`
9887// to
9888// `BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`.
9889func (r *AccountsProposalsService) Accept(accountId string, proposalId string, acceptproposalrequest *AcceptProposalRequest) *AccountsProposalsAcceptCall {
9890	c := &AccountsProposalsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9891	c.accountId = accountId
9892	c.proposalId = proposalId
9893	c.acceptproposalrequest = acceptproposalrequest
9894	return c
9895}
9896
9897// Fields allows partial responses to be retrieved. See
9898// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9899// for more information.
9900func (c *AccountsProposalsAcceptCall) Fields(s ...googleapi.Field) *AccountsProposalsAcceptCall {
9901	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9902	return c
9903}
9904
9905// Context sets the context to be used in this call's Do method. Any
9906// pending HTTP request will be aborted if the provided context is
9907// canceled.
9908func (c *AccountsProposalsAcceptCall) Context(ctx context.Context) *AccountsProposalsAcceptCall {
9909	c.ctx_ = ctx
9910	return c
9911}
9912
9913// Header returns an http.Header that can be modified by the caller to
9914// add HTTP headers to the request.
9915func (c *AccountsProposalsAcceptCall) Header() http.Header {
9916	if c.header_ == nil {
9917		c.header_ = make(http.Header)
9918	}
9919	return c.header_
9920}
9921
9922func (c *AccountsProposalsAcceptCall) doRequest(alt string) (*http.Response, error) {
9923	reqHeaders := make(http.Header)
9924	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
9925	for k, v := range c.header_ {
9926		reqHeaders[k] = v
9927	}
9928	reqHeaders.Set("User-Agent", c.s.userAgent())
9929	var body io.Reader = nil
9930	body, err := googleapi.WithoutDataWrapper.JSONReader(c.acceptproposalrequest)
9931	if err != nil {
9932		return nil, err
9933	}
9934	reqHeaders.Set("Content-Type", "application/json")
9935	c.urlParams_.Set("alt", alt)
9936	c.urlParams_.Set("prettyPrint", "false")
9937	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept")
9938	urls += "?" + c.urlParams_.Encode()
9939	req, err := http.NewRequest("POST", urls, body)
9940	if err != nil {
9941		return nil, err
9942	}
9943	req.Header = reqHeaders
9944	googleapi.Expand(req.URL, map[string]string{
9945		"accountId":  c.accountId,
9946		"proposalId": c.proposalId,
9947	})
9948	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9949}
9950
9951// Do executes the "adexchangebuyer2.accounts.proposals.accept" call.
9952// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
9953// code is an error. Response headers are in either
9954// *Proposal.ServerResponse.Header or (if a response was returned at
9955// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9956// to check whether the returned error was because
9957// http.StatusNotModified was returned.
9958func (c *AccountsProposalsAcceptCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
9959	gensupport.SetOptions(c.urlParams_, opts...)
9960	res, err := c.doRequest("json")
9961	if res != nil && res.StatusCode == http.StatusNotModified {
9962		if res.Body != nil {
9963			res.Body.Close()
9964		}
9965		return nil, &googleapi.Error{
9966			Code:   res.StatusCode,
9967			Header: res.Header,
9968		}
9969	}
9970	if err != nil {
9971		return nil, err
9972	}
9973	defer googleapi.CloseBody(res)
9974	if err := googleapi.CheckResponse(res); err != nil {
9975		return nil, err
9976	}
9977	ret := &Proposal{
9978		ServerResponse: googleapi.ServerResponse{
9979			Header:         res.Header,
9980			HTTPStatusCode: res.StatusCode,
9981		},
9982	}
9983	target := &ret
9984	if err := gensupport.DecodeResponse(target, res); err != nil {
9985		return nil, err
9986	}
9987	return ret, nil
9988	// {
9989	//   "description": "Mark the proposal as accepted at the given revision number. If the number\ndoes not match the server's revision number an `ABORTED` error message will\nbe returned. This call updates the proposal_state from `PROPOSED` to\n`BUYER_ACCEPTED`, or from `SELLER_ACCEPTED` to `FINALIZED`.",
9990	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept",
9991	//   "httpMethod": "POST",
9992	//   "id": "adexchangebuyer2.accounts.proposals.accept",
9993	//   "parameterOrder": [
9994	//     "accountId",
9995	//     "proposalId"
9996	//   ],
9997	//   "parameters": {
9998	//     "accountId": {
9999	//       "description": "Account ID of the buyer.",
10000	//       "location": "path",
10001	//       "required": true,
10002	//       "type": "string"
10003	//     },
10004	//     "proposalId": {
10005	//       "description": "The ID of the proposal to accept.",
10006	//       "location": "path",
10007	//       "required": true,
10008	//       "type": "string"
10009	//     }
10010	//   },
10011	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:accept",
10012	//   "request": {
10013	//     "$ref": "AcceptProposalRequest"
10014	//   },
10015	//   "response": {
10016	//     "$ref": "Proposal"
10017	//   },
10018	//   "scopes": [
10019	//     "https://www.googleapis.com/auth/adexchange.buyer"
10020	//   ]
10021	// }
10022
10023}
10024
10025// method id "adexchangebuyer2.accounts.proposals.addNote":
10026
10027type AccountsProposalsAddNoteCall struct {
10028	s              *Service
10029	accountId      string
10030	proposalId     string
10031	addnoterequest *AddNoteRequest
10032	urlParams_     gensupport.URLParams
10033	ctx_           context.Context
10034	header_        http.Header
10035}
10036
10037// AddNote: Create a new note and attach it to the proposal. The note is
10038// assigned
10039// a unique ID by the server.
10040// The proposal revision number will not increase when associated with
10041// a
10042// new note.
10043func (r *AccountsProposalsService) AddNote(accountId string, proposalId string, addnoterequest *AddNoteRequest) *AccountsProposalsAddNoteCall {
10044	c := &AccountsProposalsAddNoteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10045	c.accountId = accountId
10046	c.proposalId = proposalId
10047	c.addnoterequest = addnoterequest
10048	return c
10049}
10050
10051// Fields allows partial responses to be retrieved. See
10052// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10053// for more information.
10054func (c *AccountsProposalsAddNoteCall) Fields(s ...googleapi.Field) *AccountsProposalsAddNoteCall {
10055	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10056	return c
10057}
10058
10059// Context sets the context to be used in this call's Do method. Any
10060// pending HTTP request will be aborted if the provided context is
10061// canceled.
10062func (c *AccountsProposalsAddNoteCall) Context(ctx context.Context) *AccountsProposalsAddNoteCall {
10063	c.ctx_ = ctx
10064	return c
10065}
10066
10067// Header returns an http.Header that can be modified by the caller to
10068// add HTTP headers to the request.
10069func (c *AccountsProposalsAddNoteCall) Header() http.Header {
10070	if c.header_ == nil {
10071		c.header_ = make(http.Header)
10072	}
10073	return c.header_
10074}
10075
10076func (c *AccountsProposalsAddNoteCall) doRequest(alt string) (*http.Response, error) {
10077	reqHeaders := make(http.Header)
10078	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
10079	for k, v := range c.header_ {
10080		reqHeaders[k] = v
10081	}
10082	reqHeaders.Set("User-Agent", c.s.userAgent())
10083	var body io.Reader = nil
10084	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addnoterequest)
10085	if err != nil {
10086		return nil, err
10087	}
10088	reqHeaders.Set("Content-Type", "application/json")
10089	c.urlParams_.Set("alt", alt)
10090	c.urlParams_.Set("prettyPrint", "false")
10091	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote")
10092	urls += "?" + c.urlParams_.Encode()
10093	req, err := http.NewRequest("POST", urls, body)
10094	if err != nil {
10095		return nil, err
10096	}
10097	req.Header = reqHeaders
10098	googleapi.Expand(req.URL, map[string]string{
10099		"accountId":  c.accountId,
10100		"proposalId": c.proposalId,
10101	})
10102	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10103}
10104
10105// Do executes the "adexchangebuyer2.accounts.proposals.addNote" call.
10106// Exactly one of *Note or error will be non-nil. Any non-2xx status
10107// code is an error. Response headers are in either
10108// *Note.ServerResponse.Header or (if a response was returned at all) in
10109// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10110// whether the returned error was because http.StatusNotModified was
10111// returned.
10112func (c *AccountsProposalsAddNoteCall) Do(opts ...googleapi.CallOption) (*Note, error) {
10113	gensupport.SetOptions(c.urlParams_, opts...)
10114	res, err := c.doRequest("json")
10115	if res != nil && res.StatusCode == http.StatusNotModified {
10116		if res.Body != nil {
10117			res.Body.Close()
10118		}
10119		return nil, &googleapi.Error{
10120			Code:   res.StatusCode,
10121			Header: res.Header,
10122		}
10123	}
10124	if err != nil {
10125		return nil, err
10126	}
10127	defer googleapi.CloseBody(res)
10128	if err := googleapi.CheckResponse(res); err != nil {
10129		return nil, err
10130	}
10131	ret := &Note{
10132		ServerResponse: googleapi.ServerResponse{
10133			Header:         res.Header,
10134			HTTPStatusCode: res.StatusCode,
10135		},
10136	}
10137	target := &ret
10138	if err := gensupport.DecodeResponse(target, res); err != nil {
10139		return nil, err
10140	}
10141	return ret, nil
10142	// {
10143	//   "description": "Create a new note and attach it to the proposal. The note is assigned\na unique ID by the server.\nThe proposal revision number will not increase when associated with a\nnew note.",
10144	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote",
10145	//   "httpMethod": "POST",
10146	//   "id": "adexchangebuyer2.accounts.proposals.addNote",
10147	//   "parameterOrder": [
10148	//     "accountId",
10149	//     "proposalId"
10150	//   ],
10151	//   "parameters": {
10152	//     "accountId": {
10153	//       "description": "Account ID of the buyer.",
10154	//       "location": "path",
10155	//       "required": true,
10156	//       "type": "string"
10157	//     },
10158	//     "proposalId": {
10159	//       "description": "The ID of the proposal to attach the note to.",
10160	//       "location": "path",
10161	//       "required": true,
10162	//       "type": "string"
10163	//     }
10164	//   },
10165	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:addNote",
10166	//   "request": {
10167	//     "$ref": "AddNoteRequest"
10168	//   },
10169	//   "response": {
10170	//     "$ref": "Note"
10171	//   },
10172	//   "scopes": [
10173	//     "https://www.googleapis.com/auth/adexchange.buyer"
10174	//   ]
10175	// }
10176
10177}
10178
10179// method id "adexchangebuyer2.accounts.proposals.cancelNegotiation":
10180
10181type AccountsProposalsCancelNegotiationCall struct {
10182	s                        *Service
10183	accountId                string
10184	proposalId               string
10185	cancelnegotiationrequest *CancelNegotiationRequest
10186	urlParams_               gensupport.URLParams
10187	ctx_                     context.Context
10188	header_                  http.Header
10189}
10190
10191// CancelNegotiation: Cancel an ongoing negotiation on a proposal. This
10192// does not cancel or end
10193// serving for the deals if the proposal has been finalized, but only
10194// cancels
10195// a negotiation unilaterally.
10196func (r *AccountsProposalsService) CancelNegotiation(accountId string, proposalId string, cancelnegotiationrequest *CancelNegotiationRequest) *AccountsProposalsCancelNegotiationCall {
10197	c := &AccountsProposalsCancelNegotiationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10198	c.accountId = accountId
10199	c.proposalId = proposalId
10200	c.cancelnegotiationrequest = cancelnegotiationrequest
10201	return c
10202}
10203
10204// Fields allows partial responses to be retrieved. See
10205// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10206// for more information.
10207func (c *AccountsProposalsCancelNegotiationCall) Fields(s ...googleapi.Field) *AccountsProposalsCancelNegotiationCall {
10208	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10209	return c
10210}
10211
10212// Context sets the context to be used in this call's Do method. Any
10213// pending HTTP request will be aborted if the provided context is
10214// canceled.
10215func (c *AccountsProposalsCancelNegotiationCall) Context(ctx context.Context) *AccountsProposalsCancelNegotiationCall {
10216	c.ctx_ = ctx
10217	return c
10218}
10219
10220// Header returns an http.Header that can be modified by the caller to
10221// add HTTP headers to the request.
10222func (c *AccountsProposalsCancelNegotiationCall) Header() http.Header {
10223	if c.header_ == nil {
10224		c.header_ = make(http.Header)
10225	}
10226	return c.header_
10227}
10228
10229func (c *AccountsProposalsCancelNegotiationCall) doRequest(alt string) (*http.Response, error) {
10230	reqHeaders := make(http.Header)
10231	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
10232	for k, v := range c.header_ {
10233		reqHeaders[k] = v
10234	}
10235	reqHeaders.Set("User-Agent", c.s.userAgent())
10236	var body io.Reader = nil
10237	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelnegotiationrequest)
10238	if err != nil {
10239		return nil, err
10240	}
10241	reqHeaders.Set("Content-Type", "application/json")
10242	c.urlParams_.Set("alt", alt)
10243	c.urlParams_.Set("prettyPrint", "false")
10244	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation")
10245	urls += "?" + c.urlParams_.Encode()
10246	req, err := http.NewRequest("POST", urls, body)
10247	if err != nil {
10248		return nil, err
10249	}
10250	req.Header = reqHeaders
10251	googleapi.Expand(req.URL, map[string]string{
10252		"accountId":  c.accountId,
10253		"proposalId": c.proposalId,
10254	})
10255	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10256}
10257
10258// Do executes the "adexchangebuyer2.accounts.proposals.cancelNegotiation" call.
10259// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10260// code is an error. Response headers are in either
10261// *Proposal.ServerResponse.Header or (if a response was returned at
10262// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10263// to check whether the returned error was because
10264// http.StatusNotModified was returned.
10265func (c *AccountsProposalsCancelNegotiationCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10266	gensupport.SetOptions(c.urlParams_, opts...)
10267	res, err := c.doRequest("json")
10268	if res != nil && res.StatusCode == http.StatusNotModified {
10269		if res.Body != nil {
10270			res.Body.Close()
10271		}
10272		return nil, &googleapi.Error{
10273			Code:   res.StatusCode,
10274			Header: res.Header,
10275		}
10276	}
10277	if err != nil {
10278		return nil, err
10279	}
10280	defer googleapi.CloseBody(res)
10281	if err := googleapi.CheckResponse(res); err != nil {
10282		return nil, err
10283	}
10284	ret := &Proposal{
10285		ServerResponse: googleapi.ServerResponse{
10286			Header:         res.Header,
10287			HTTPStatusCode: res.StatusCode,
10288		},
10289	}
10290	target := &ret
10291	if err := gensupport.DecodeResponse(target, res); err != nil {
10292		return nil, err
10293	}
10294	return ret, nil
10295	// {
10296	//   "description": "Cancel an ongoing negotiation on a proposal. This does not cancel or end\nserving for the deals if the proposal has been finalized, but only cancels\na negotiation unilaterally.",
10297	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation",
10298	//   "httpMethod": "POST",
10299	//   "id": "adexchangebuyer2.accounts.proposals.cancelNegotiation",
10300	//   "parameterOrder": [
10301	//     "accountId",
10302	//     "proposalId"
10303	//   ],
10304	//   "parameters": {
10305	//     "accountId": {
10306	//       "description": "Account ID of the buyer.",
10307	//       "location": "path",
10308	//       "required": true,
10309	//       "type": "string"
10310	//     },
10311	//     "proposalId": {
10312	//       "description": "The ID of the proposal to cancel negotiation for.",
10313	//       "location": "path",
10314	//       "required": true,
10315	//       "type": "string"
10316	//     }
10317	//   },
10318	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:cancelNegotiation",
10319	//   "request": {
10320	//     "$ref": "CancelNegotiationRequest"
10321	//   },
10322	//   "response": {
10323	//     "$ref": "Proposal"
10324	//   },
10325	//   "scopes": [
10326	//     "https://www.googleapis.com/auth/adexchange.buyer"
10327	//   ]
10328	// }
10329
10330}
10331
10332// method id "adexchangebuyer2.accounts.proposals.completeSetup":
10333
10334type AccountsProposalsCompleteSetupCall struct {
10335	s                    *Service
10336	accountId            string
10337	proposalId           string
10338	completesetuprequest *CompleteSetupRequest
10339	urlParams_           gensupport.URLParams
10340	ctx_                 context.Context
10341	header_              http.Header
10342}
10343
10344// CompleteSetup: Update the given proposal to indicate that setup has
10345// been completed.
10346// This method is called by the buyer when the line items have been
10347// created
10348// on their end for a finalized proposal and all the required
10349// creatives
10350// have been uploaded using the creatives API. This call updates
10351// the
10352// `is_setup_completed` bit on the proposal and also notifies the
10353// seller.
10354// The server will advance the revision number of the most recent
10355// proposal.
10356func (r *AccountsProposalsService) CompleteSetup(accountId string, proposalId string, completesetuprequest *CompleteSetupRequest) *AccountsProposalsCompleteSetupCall {
10357	c := &AccountsProposalsCompleteSetupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10358	c.accountId = accountId
10359	c.proposalId = proposalId
10360	c.completesetuprequest = completesetuprequest
10361	return c
10362}
10363
10364// Fields allows partial responses to be retrieved. See
10365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10366// for more information.
10367func (c *AccountsProposalsCompleteSetupCall) Fields(s ...googleapi.Field) *AccountsProposalsCompleteSetupCall {
10368	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10369	return c
10370}
10371
10372// Context sets the context to be used in this call's Do method. Any
10373// pending HTTP request will be aborted if the provided context is
10374// canceled.
10375func (c *AccountsProposalsCompleteSetupCall) Context(ctx context.Context) *AccountsProposalsCompleteSetupCall {
10376	c.ctx_ = ctx
10377	return c
10378}
10379
10380// Header returns an http.Header that can be modified by the caller to
10381// add HTTP headers to the request.
10382func (c *AccountsProposalsCompleteSetupCall) Header() http.Header {
10383	if c.header_ == nil {
10384		c.header_ = make(http.Header)
10385	}
10386	return c.header_
10387}
10388
10389func (c *AccountsProposalsCompleteSetupCall) doRequest(alt string) (*http.Response, error) {
10390	reqHeaders := make(http.Header)
10391	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
10392	for k, v := range c.header_ {
10393		reqHeaders[k] = v
10394	}
10395	reqHeaders.Set("User-Agent", c.s.userAgent())
10396	var body io.Reader = nil
10397	body, err := googleapi.WithoutDataWrapper.JSONReader(c.completesetuprequest)
10398	if err != nil {
10399		return nil, err
10400	}
10401	reqHeaders.Set("Content-Type", "application/json")
10402	c.urlParams_.Set("alt", alt)
10403	c.urlParams_.Set("prettyPrint", "false")
10404	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup")
10405	urls += "?" + c.urlParams_.Encode()
10406	req, err := http.NewRequest("POST", urls, body)
10407	if err != nil {
10408		return nil, err
10409	}
10410	req.Header = reqHeaders
10411	googleapi.Expand(req.URL, map[string]string{
10412		"accountId":  c.accountId,
10413		"proposalId": c.proposalId,
10414	})
10415	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10416}
10417
10418// Do executes the "adexchangebuyer2.accounts.proposals.completeSetup" call.
10419// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10420// code is an error. Response headers are in either
10421// *Proposal.ServerResponse.Header or (if a response was returned at
10422// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10423// to check whether the returned error was because
10424// http.StatusNotModified was returned.
10425func (c *AccountsProposalsCompleteSetupCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10426	gensupport.SetOptions(c.urlParams_, opts...)
10427	res, err := c.doRequest("json")
10428	if res != nil && res.StatusCode == http.StatusNotModified {
10429		if res.Body != nil {
10430			res.Body.Close()
10431		}
10432		return nil, &googleapi.Error{
10433			Code:   res.StatusCode,
10434			Header: res.Header,
10435		}
10436	}
10437	if err != nil {
10438		return nil, err
10439	}
10440	defer googleapi.CloseBody(res)
10441	if err := googleapi.CheckResponse(res); err != nil {
10442		return nil, err
10443	}
10444	ret := &Proposal{
10445		ServerResponse: googleapi.ServerResponse{
10446			Header:         res.Header,
10447			HTTPStatusCode: res.StatusCode,
10448		},
10449	}
10450	target := &ret
10451	if err := gensupport.DecodeResponse(target, res); err != nil {
10452		return nil, err
10453	}
10454	return ret, nil
10455	// {
10456	//   "description": "Update the given proposal to indicate that setup has been completed.\nThis method is called by the buyer when the line items have been created\non their end for a finalized proposal and all the required creatives\nhave been uploaded using the creatives API. This call updates the\n`is_setup_completed` bit on the proposal and also notifies the seller.\nThe server will advance the revision number of the most recent proposal.",
10457	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup",
10458	//   "httpMethod": "POST",
10459	//   "id": "adexchangebuyer2.accounts.proposals.completeSetup",
10460	//   "parameterOrder": [
10461	//     "accountId",
10462	//     "proposalId"
10463	//   ],
10464	//   "parameters": {
10465	//     "accountId": {
10466	//       "description": "Account ID of the buyer.",
10467	//       "location": "path",
10468	//       "required": true,
10469	//       "type": "string"
10470	//     },
10471	//     "proposalId": {
10472	//       "description": "The ID of the proposal to mark as setup completed.",
10473	//       "location": "path",
10474	//       "required": true,
10475	//       "type": "string"
10476	//     }
10477	//   },
10478	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:completeSetup",
10479	//   "request": {
10480	//     "$ref": "CompleteSetupRequest"
10481	//   },
10482	//   "response": {
10483	//     "$ref": "Proposal"
10484	//   },
10485	//   "scopes": [
10486	//     "https://www.googleapis.com/auth/adexchange.buyer"
10487	//   ]
10488	// }
10489
10490}
10491
10492// method id "adexchangebuyer2.accounts.proposals.create":
10493
10494type AccountsProposalsCreateCall struct {
10495	s          *Service
10496	accountId  string
10497	proposal   *Proposal
10498	urlParams_ gensupport.URLParams
10499	ctx_       context.Context
10500	header_    http.Header
10501}
10502
10503// Create: Create the given proposal. Each created proposal and any
10504// deals it contains
10505// are assigned a unique ID by the server.
10506func (r *AccountsProposalsService) Create(accountId string, proposal *Proposal) *AccountsProposalsCreateCall {
10507	c := &AccountsProposalsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10508	c.accountId = accountId
10509	c.proposal = proposal
10510	return c
10511}
10512
10513// Fields allows partial responses to be retrieved. See
10514// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10515// for more information.
10516func (c *AccountsProposalsCreateCall) Fields(s ...googleapi.Field) *AccountsProposalsCreateCall {
10517	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10518	return c
10519}
10520
10521// Context sets the context to be used in this call's Do method. Any
10522// pending HTTP request will be aborted if the provided context is
10523// canceled.
10524func (c *AccountsProposalsCreateCall) Context(ctx context.Context) *AccountsProposalsCreateCall {
10525	c.ctx_ = ctx
10526	return c
10527}
10528
10529// Header returns an http.Header that can be modified by the caller to
10530// add HTTP headers to the request.
10531func (c *AccountsProposalsCreateCall) Header() http.Header {
10532	if c.header_ == nil {
10533		c.header_ = make(http.Header)
10534	}
10535	return c.header_
10536}
10537
10538func (c *AccountsProposalsCreateCall) doRequest(alt string) (*http.Response, error) {
10539	reqHeaders := make(http.Header)
10540	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
10541	for k, v := range c.header_ {
10542		reqHeaders[k] = v
10543	}
10544	reqHeaders.Set("User-Agent", c.s.userAgent())
10545	var body io.Reader = nil
10546	body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
10547	if err != nil {
10548		return nil, err
10549	}
10550	reqHeaders.Set("Content-Type", "application/json")
10551	c.urlParams_.Set("alt", alt)
10552	c.urlParams_.Set("prettyPrint", "false")
10553	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals")
10554	urls += "?" + c.urlParams_.Encode()
10555	req, err := http.NewRequest("POST", urls, body)
10556	if err != nil {
10557		return nil, err
10558	}
10559	req.Header = reqHeaders
10560	googleapi.Expand(req.URL, map[string]string{
10561		"accountId": c.accountId,
10562	})
10563	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10564}
10565
10566// Do executes the "adexchangebuyer2.accounts.proposals.create" call.
10567// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10568// code is an error. Response headers are in either
10569// *Proposal.ServerResponse.Header or (if a response was returned at
10570// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10571// to check whether the returned error was because
10572// http.StatusNotModified was returned.
10573func (c *AccountsProposalsCreateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10574	gensupport.SetOptions(c.urlParams_, opts...)
10575	res, err := c.doRequest("json")
10576	if res != nil && res.StatusCode == http.StatusNotModified {
10577		if res.Body != nil {
10578			res.Body.Close()
10579		}
10580		return nil, &googleapi.Error{
10581			Code:   res.StatusCode,
10582			Header: res.Header,
10583		}
10584	}
10585	if err != nil {
10586		return nil, err
10587	}
10588	defer googleapi.CloseBody(res)
10589	if err := googleapi.CheckResponse(res); err != nil {
10590		return nil, err
10591	}
10592	ret := &Proposal{
10593		ServerResponse: googleapi.ServerResponse{
10594			Header:         res.Header,
10595			HTTPStatusCode: res.StatusCode,
10596		},
10597	}
10598	target := &ret
10599	if err := gensupport.DecodeResponse(target, res); err != nil {
10600		return nil, err
10601	}
10602	return ret, nil
10603	// {
10604	//   "description": "Create the given proposal. Each created proposal and any deals it contains\nare assigned a unique ID by the server.",
10605	//   "flatPath": "v2beta1/accounts/{accountId}/proposals",
10606	//   "httpMethod": "POST",
10607	//   "id": "adexchangebuyer2.accounts.proposals.create",
10608	//   "parameterOrder": [
10609	//     "accountId"
10610	//   ],
10611	//   "parameters": {
10612	//     "accountId": {
10613	//       "description": "Account ID of the buyer.",
10614	//       "location": "path",
10615	//       "required": true,
10616	//       "type": "string"
10617	//     }
10618	//   },
10619	//   "path": "v2beta1/accounts/{accountId}/proposals",
10620	//   "request": {
10621	//     "$ref": "Proposal"
10622	//   },
10623	//   "response": {
10624	//     "$ref": "Proposal"
10625	//   },
10626	//   "scopes": [
10627	//     "https://www.googleapis.com/auth/adexchange.buyer"
10628	//   ]
10629	// }
10630
10631}
10632
10633// method id "adexchangebuyer2.accounts.proposals.get":
10634
10635type AccountsProposalsGetCall struct {
10636	s            *Service
10637	accountId    string
10638	proposalId   string
10639	urlParams_   gensupport.URLParams
10640	ifNoneMatch_ string
10641	ctx_         context.Context
10642	header_      http.Header
10643}
10644
10645// Get: Gets a proposal given its ID. The proposal is returned at its
10646// head
10647// revision.
10648func (r *AccountsProposalsService) Get(accountId string, proposalId string) *AccountsProposalsGetCall {
10649	c := &AccountsProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10650	c.accountId = accountId
10651	c.proposalId = proposalId
10652	return c
10653}
10654
10655// Fields allows partial responses to be retrieved. See
10656// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10657// for more information.
10658func (c *AccountsProposalsGetCall) Fields(s ...googleapi.Field) *AccountsProposalsGetCall {
10659	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10660	return c
10661}
10662
10663// IfNoneMatch sets the optional parameter which makes the operation
10664// fail if the object's ETag matches the given value. This is useful for
10665// getting updates only after the object has changed since the last
10666// request. Use googleapi.IsNotModified to check whether the response
10667// error from Do is the result of In-None-Match.
10668func (c *AccountsProposalsGetCall) IfNoneMatch(entityTag string) *AccountsProposalsGetCall {
10669	c.ifNoneMatch_ = entityTag
10670	return c
10671}
10672
10673// Context sets the context to be used in this call's Do method. Any
10674// pending HTTP request will be aborted if the provided context is
10675// canceled.
10676func (c *AccountsProposalsGetCall) Context(ctx context.Context) *AccountsProposalsGetCall {
10677	c.ctx_ = ctx
10678	return c
10679}
10680
10681// Header returns an http.Header that can be modified by the caller to
10682// add HTTP headers to the request.
10683func (c *AccountsProposalsGetCall) Header() http.Header {
10684	if c.header_ == nil {
10685		c.header_ = make(http.Header)
10686	}
10687	return c.header_
10688}
10689
10690func (c *AccountsProposalsGetCall) doRequest(alt string) (*http.Response, error) {
10691	reqHeaders := make(http.Header)
10692	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
10693	for k, v := range c.header_ {
10694		reqHeaders[k] = v
10695	}
10696	reqHeaders.Set("User-Agent", c.s.userAgent())
10697	if c.ifNoneMatch_ != "" {
10698		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10699	}
10700	var body io.Reader = nil
10701	c.urlParams_.Set("alt", alt)
10702	c.urlParams_.Set("prettyPrint", "false")
10703	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}")
10704	urls += "?" + c.urlParams_.Encode()
10705	req, err := http.NewRequest("GET", urls, body)
10706	if err != nil {
10707		return nil, err
10708	}
10709	req.Header = reqHeaders
10710	googleapi.Expand(req.URL, map[string]string{
10711		"accountId":  c.accountId,
10712		"proposalId": c.proposalId,
10713	})
10714	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10715}
10716
10717// Do executes the "adexchangebuyer2.accounts.proposals.get" call.
10718// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
10719// code is an error. Response headers are in either
10720// *Proposal.ServerResponse.Header or (if a response was returned at
10721// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10722// to check whether the returned error was because
10723// http.StatusNotModified was returned.
10724func (c *AccountsProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
10725	gensupport.SetOptions(c.urlParams_, opts...)
10726	res, err := c.doRequest("json")
10727	if res != nil && res.StatusCode == http.StatusNotModified {
10728		if res.Body != nil {
10729			res.Body.Close()
10730		}
10731		return nil, &googleapi.Error{
10732			Code:   res.StatusCode,
10733			Header: res.Header,
10734		}
10735	}
10736	if err != nil {
10737		return nil, err
10738	}
10739	defer googleapi.CloseBody(res)
10740	if err := googleapi.CheckResponse(res); err != nil {
10741		return nil, err
10742	}
10743	ret := &Proposal{
10744		ServerResponse: googleapi.ServerResponse{
10745			Header:         res.Header,
10746			HTTPStatusCode: res.StatusCode,
10747		},
10748	}
10749	target := &ret
10750	if err := gensupport.DecodeResponse(target, res); err != nil {
10751		return nil, err
10752	}
10753	return ret, nil
10754	// {
10755	//   "description": "Gets a proposal given its ID. The proposal is returned at its head\nrevision.",
10756	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
10757	//   "httpMethod": "GET",
10758	//   "id": "adexchangebuyer2.accounts.proposals.get",
10759	//   "parameterOrder": [
10760	//     "accountId",
10761	//     "proposalId"
10762	//   ],
10763	//   "parameters": {
10764	//     "accountId": {
10765	//       "description": "Account ID of the buyer.",
10766	//       "location": "path",
10767	//       "required": true,
10768	//       "type": "string"
10769	//     },
10770	//     "proposalId": {
10771	//       "description": "The unique ID of the proposal",
10772	//       "location": "path",
10773	//       "required": true,
10774	//       "type": "string"
10775	//     }
10776	//   },
10777	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
10778	//   "response": {
10779	//     "$ref": "Proposal"
10780	//   },
10781	//   "scopes": [
10782	//     "https://www.googleapis.com/auth/adexchange.buyer"
10783	//   ]
10784	// }
10785
10786}
10787
10788// method id "adexchangebuyer2.accounts.proposals.list":
10789
10790type AccountsProposalsListCall struct {
10791	s            *Service
10792	accountId    string
10793	urlParams_   gensupport.URLParams
10794	ifNoneMatch_ string
10795	ctx_         context.Context
10796	header_      http.Header
10797}
10798
10799// List: List proposals. A filter expression (PQL query) may be
10800// specified to
10801// filter the results. To retrieve all finalized proposals, regardless
10802// if a
10803// proposal is being renegotiated, see the FinalizedProposals
10804// resource.
10805// Note that Bidder/ChildSeat relationships differ from the usual
10806// behavior.
10807// A Bidder account can only see its child seats' proposals by
10808// specifying
10809// the ChildSeat's accountId in the request path.
10810func (r *AccountsProposalsService) List(accountId string) *AccountsProposalsListCall {
10811	c := &AccountsProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10812	c.accountId = accountId
10813	return c
10814}
10815
10816// Filter sets the optional parameter "filter": An optional PQL filter
10817// query used to query for proposals.
10818//
10819// Nested repeated fields, such as
10820// proposal.deals.targetingCriterion,
10821// cannot be filtered.
10822func (c *AccountsProposalsListCall) Filter(filter string) *AccountsProposalsListCall {
10823	c.urlParams_.Set("filter", filter)
10824	return c
10825}
10826
10827// FilterSyntax sets the optional parameter "filterSyntax": Syntax the
10828// filter is written in. Current implementation defaults to PQL
10829// but in the future it will be LIST_FILTER.
10830//
10831// Possible values:
10832//   "FILTER_SYNTAX_UNSPECIFIED"
10833//   "PQL"
10834//   "LIST_FILTER"
10835func (c *AccountsProposalsListCall) FilterSyntax(filterSyntax string) *AccountsProposalsListCall {
10836	c.urlParams_.Set("filterSyntax", filterSyntax)
10837	return c
10838}
10839
10840// PageSize sets the optional parameter "pageSize": Requested page size.
10841// The server may return fewer results than requested.
10842// If unspecified, the server will pick an appropriate default.
10843func (c *AccountsProposalsListCall) PageSize(pageSize int64) *AccountsProposalsListCall {
10844	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10845	return c
10846}
10847
10848// PageToken sets the optional parameter "pageToken": The page token as
10849// returned from ListProposalsResponse.
10850func (c *AccountsProposalsListCall) PageToken(pageToken string) *AccountsProposalsListCall {
10851	c.urlParams_.Set("pageToken", pageToken)
10852	return c
10853}
10854
10855// Fields allows partial responses to be retrieved. See
10856// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10857// for more information.
10858func (c *AccountsProposalsListCall) Fields(s ...googleapi.Field) *AccountsProposalsListCall {
10859	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10860	return c
10861}
10862
10863// IfNoneMatch sets the optional parameter which makes the operation
10864// fail if the object's ETag matches the given value. This is useful for
10865// getting updates only after the object has changed since the last
10866// request. Use googleapi.IsNotModified to check whether the response
10867// error from Do is the result of In-None-Match.
10868func (c *AccountsProposalsListCall) IfNoneMatch(entityTag string) *AccountsProposalsListCall {
10869	c.ifNoneMatch_ = entityTag
10870	return c
10871}
10872
10873// Context sets the context to be used in this call's Do method. Any
10874// pending HTTP request will be aborted if the provided context is
10875// canceled.
10876func (c *AccountsProposalsListCall) Context(ctx context.Context) *AccountsProposalsListCall {
10877	c.ctx_ = ctx
10878	return c
10879}
10880
10881// Header returns an http.Header that can be modified by the caller to
10882// add HTTP headers to the request.
10883func (c *AccountsProposalsListCall) Header() http.Header {
10884	if c.header_ == nil {
10885		c.header_ = make(http.Header)
10886	}
10887	return c.header_
10888}
10889
10890func (c *AccountsProposalsListCall) doRequest(alt string) (*http.Response, error) {
10891	reqHeaders := make(http.Header)
10892	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
10893	for k, v := range c.header_ {
10894		reqHeaders[k] = v
10895	}
10896	reqHeaders.Set("User-Agent", c.s.userAgent())
10897	if c.ifNoneMatch_ != "" {
10898		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10899	}
10900	var body io.Reader = nil
10901	c.urlParams_.Set("alt", alt)
10902	c.urlParams_.Set("prettyPrint", "false")
10903	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals")
10904	urls += "?" + c.urlParams_.Encode()
10905	req, err := http.NewRequest("GET", urls, body)
10906	if err != nil {
10907		return nil, err
10908	}
10909	req.Header = reqHeaders
10910	googleapi.Expand(req.URL, map[string]string{
10911		"accountId": c.accountId,
10912	})
10913	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10914}
10915
10916// Do executes the "adexchangebuyer2.accounts.proposals.list" call.
10917// Exactly one of *ListProposalsResponse or error will be non-nil. Any
10918// non-2xx status code is an error. Response headers are in either
10919// *ListProposalsResponse.ServerResponse.Header or (if a response was
10920// returned at all) in error.(*googleapi.Error).Header. Use
10921// googleapi.IsNotModified to check whether the returned error was
10922// because http.StatusNotModified was returned.
10923func (c *AccountsProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) {
10924	gensupport.SetOptions(c.urlParams_, opts...)
10925	res, err := c.doRequest("json")
10926	if res != nil && res.StatusCode == http.StatusNotModified {
10927		if res.Body != nil {
10928			res.Body.Close()
10929		}
10930		return nil, &googleapi.Error{
10931			Code:   res.StatusCode,
10932			Header: res.Header,
10933		}
10934	}
10935	if err != nil {
10936		return nil, err
10937	}
10938	defer googleapi.CloseBody(res)
10939	if err := googleapi.CheckResponse(res); err != nil {
10940		return nil, err
10941	}
10942	ret := &ListProposalsResponse{
10943		ServerResponse: googleapi.ServerResponse{
10944			Header:         res.Header,
10945			HTTPStatusCode: res.StatusCode,
10946		},
10947	}
10948	target := &ret
10949	if err := gensupport.DecodeResponse(target, res); err != nil {
10950		return nil, err
10951	}
10952	return ret, nil
10953	// {
10954	//   "description": "List proposals. A filter expression (PQL query) may be specified to\nfilter the results. To retrieve all finalized proposals, regardless if a\nproposal is being renegotiated, see the FinalizedProposals resource.\nNote that Bidder/ChildSeat relationships differ from the usual behavior.\nA Bidder account can only see its child seats' proposals by specifying\nthe ChildSeat's accountId in the request path.",
10955	//   "flatPath": "v2beta1/accounts/{accountId}/proposals",
10956	//   "httpMethod": "GET",
10957	//   "id": "adexchangebuyer2.accounts.proposals.list",
10958	//   "parameterOrder": [
10959	//     "accountId"
10960	//   ],
10961	//   "parameters": {
10962	//     "accountId": {
10963	//       "description": "Account ID of the buyer.",
10964	//       "location": "path",
10965	//       "required": true,
10966	//       "type": "string"
10967	//     },
10968	//     "filter": {
10969	//       "description": "An optional PQL filter query used to query for proposals.\n\nNested repeated fields, such as proposal.deals.targetingCriterion,\ncannot be filtered.",
10970	//       "location": "query",
10971	//       "type": "string"
10972	//     },
10973	//     "filterSyntax": {
10974	//       "description": "Syntax the filter is written in. Current implementation defaults to PQL\nbut in the future it will be LIST_FILTER.",
10975	//       "enum": [
10976	//         "FILTER_SYNTAX_UNSPECIFIED",
10977	//         "PQL",
10978	//         "LIST_FILTER"
10979	//       ],
10980	//       "location": "query",
10981	//       "type": "string"
10982	//     },
10983	//     "pageSize": {
10984	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
10985	//       "format": "int32",
10986	//       "location": "query",
10987	//       "type": "integer"
10988	//     },
10989	//     "pageToken": {
10990	//       "description": "The page token as returned from ListProposalsResponse.",
10991	//       "location": "query",
10992	//       "type": "string"
10993	//     }
10994	//   },
10995	//   "path": "v2beta1/accounts/{accountId}/proposals",
10996	//   "response": {
10997	//     "$ref": "ListProposalsResponse"
10998	//   },
10999	//   "scopes": [
11000	//     "https://www.googleapis.com/auth/adexchange.buyer"
11001	//   ]
11002	// }
11003
11004}
11005
11006// Pages invokes f for each page of results.
11007// A non-nil error returned from f will halt the iteration.
11008// The provided context supersedes any context provided to the Context method.
11009func (c *AccountsProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error {
11010	c.ctx_ = ctx
11011	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11012	for {
11013		x, err := c.Do()
11014		if err != nil {
11015			return err
11016		}
11017		if err := f(x); err != nil {
11018			return err
11019		}
11020		if x.NextPageToken == "" {
11021			return nil
11022		}
11023		c.PageToken(x.NextPageToken)
11024	}
11025}
11026
11027// method id "adexchangebuyer2.accounts.proposals.pause":
11028
11029type AccountsProposalsPauseCall struct {
11030	s                    *Service
11031	accountId            string
11032	proposalId           string
11033	pauseproposalrequest *PauseProposalRequest
11034	urlParams_           gensupport.URLParams
11035	ctx_                 context.Context
11036	header_              http.Header
11037}
11038
11039// Pause: Update the given proposal to pause serving.
11040// This method will set
11041// the
11042// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true
11043// for all
11044// deals in the proposal.
11045//
11046// It is a no-op to pause an already-paused proposal.
11047// It is an error to call PauseProposal for a proposal that is
11048// not
11049// finalized or renegotiating.
11050func (r *AccountsProposalsService) Pause(accountId string, proposalId string, pauseproposalrequest *PauseProposalRequest) *AccountsProposalsPauseCall {
11051	c := &AccountsProposalsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11052	c.accountId = accountId
11053	c.proposalId = proposalId
11054	c.pauseproposalrequest = pauseproposalrequest
11055	return c
11056}
11057
11058// Fields allows partial responses to be retrieved. See
11059// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11060// for more information.
11061func (c *AccountsProposalsPauseCall) Fields(s ...googleapi.Field) *AccountsProposalsPauseCall {
11062	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11063	return c
11064}
11065
11066// Context sets the context to be used in this call's Do method. Any
11067// pending HTTP request will be aborted if the provided context is
11068// canceled.
11069func (c *AccountsProposalsPauseCall) Context(ctx context.Context) *AccountsProposalsPauseCall {
11070	c.ctx_ = ctx
11071	return c
11072}
11073
11074// Header returns an http.Header that can be modified by the caller to
11075// add HTTP headers to the request.
11076func (c *AccountsProposalsPauseCall) Header() http.Header {
11077	if c.header_ == nil {
11078		c.header_ = make(http.Header)
11079	}
11080	return c.header_
11081}
11082
11083func (c *AccountsProposalsPauseCall) doRequest(alt string) (*http.Response, error) {
11084	reqHeaders := make(http.Header)
11085	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
11086	for k, v := range c.header_ {
11087		reqHeaders[k] = v
11088	}
11089	reqHeaders.Set("User-Agent", c.s.userAgent())
11090	var body io.Reader = nil
11091	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pauseproposalrequest)
11092	if err != nil {
11093		return nil, err
11094	}
11095	reqHeaders.Set("Content-Type", "application/json")
11096	c.urlParams_.Set("alt", alt)
11097	c.urlParams_.Set("prettyPrint", "false")
11098	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause")
11099	urls += "?" + c.urlParams_.Encode()
11100	req, err := http.NewRequest("POST", urls, body)
11101	if err != nil {
11102		return nil, err
11103	}
11104	req.Header = reqHeaders
11105	googleapi.Expand(req.URL, map[string]string{
11106		"accountId":  c.accountId,
11107		"proposalId": c.proposalId,
11108	})
11109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11110}
11111
11112// Do executes the "adexchangebuyer2.accounts.proposals.pause" call.
11113// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
11114// code is an error. Response headers are in either
11115// *Proposal.ServerResponse.Header or (if a response was returned at
11116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11117// to check whether the returned error was because
11118// http.StatusNotModified was returned.
11119func (c *AccountsProposalsPauseCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
11120	gensupport.SetOptions(c.urlParams_, opts...)
11121	res, err := c.doRequest("json")
11122	if res != nil && res.StatusCode == http.StatusNotModified {
11123		if res.Body != nil {
11124			res.Body.Close()
11125		}
11126		return nil, &googleapi.Error{
11127			Code:   res.StatusCode,
11128			Header: res.Header,
11129		}
11130	}
11131	if err != nil {
11132		return nil, err
11133	}
11134	defer googleapi.CloseBody(res)
11135	if err := googleapi.CheckResponse(res); err != nil {
11136		return nil, err
11137	}
11138	ret := &Proposal{
11139		ServerResponse: googleapi.ServerResponse{
11140			Header:         res.Header,
11141			HTTPStatusCode: res.StatusCode,
11142		},
11143	}
11144	target := &ret
11145	if err := gensupport.DecodeResponse(target, res); err != nil {
11146		return nil, err
11147	}
11148	return ret, nil
11149	// {
11150	//   "description": "Update the given proposal to pause serving.\nThis method will set the\n`DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all\ndeals in the proposal.\n\nIt is a no-op to pause an already-paused proposal.\nIt is an error to call PauseProposal for a proposal that is not\nfinalized or renegotiating.",
11151	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause",
11152	//   "httpMethod": "POST",
11153	//   "id": "adexchangebuyer2.accounts.proposals.pause",
11154	//   "parameterOrder": [
11155	//     "accountId",
11156	//     "proposalId"
11157	//   ],
11158	//   "parameters": {
11159	//     "accountId": {
11160	//       "description": "Account ID of the buyer.",
11161	//       "location": "path",
11162	//       "required": true,
11163	//       "type": "string"
11164	//     },
11165	//     "proposalId": {
11166	//       "description": "The ID of the proposal to pause.",
11167	//       "location": "path",
11168	//       "required": true,
11169	//       "type": "string"
11170	//     }
11171	//   },
11172	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:pause",
11173	//   "request": {
11174	//     "$ref": "PauseProposalRequest"
11175	//   },
11176	//   "response": {
11177	//     "$ref": "Proposal"
11178	//   },
11179	//   "scopes": [
11180	//     "https://www.googleapis.com/auth/adexchange.buyer"
11181	//   ]
11182	// }
11183
11184}
11185
11186// method id "adexchangebuyer2.accounts.proposals.resume":
11187
11188type AccountsProposalsResumeCall struct {
11189	s                     *Service
11190	accountId             string
11191	proposalId            string
11192	resumeproposalrequest *ResumeProposalRequest
11193	urlParams_            gensupport.URLParams
11194	ctx_                  context.Context
11195	header_               http.Header
11196}
11197
11198// Resume: Update the given proposal to resume serving.
11199// This method will set
11200// the
11201// `DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false
11202// for all
11203// deals in the proposal.
11204//
11205// Note that if the `has_seller_paused` bit is also set, serving will
11206// not
11207// resume until the seller also resumes.
11208//
11209// It is a no-op to resume an already-running proposal.
11210// It is an error to call ResumeProposal for a proposal that is
11211// not
11212// finalized or renegotiating.
11213func (r *AccountsProposalsService) Resume(accountId string, proposalId string, resumeproposalrequest *ResumeProposalRequest) *AccountsProposalsResumeCall {
11214	c := &AccountsProposalsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11215	c.accountId = accountId
11216	c.proposalId = proposalId
11217	c.resumeproposalrequest = resumeproposalrequest
11218	return c
11219}
11220
11221// Fields allows partial responses to be retrieved. See
11222// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11223// for more information.
11224func (c *AccountsProposalsResumeCall) Fields(s ...googleapi.Field) *AccountsProposalsResumeCall {
11225	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11226	return c
11227}
11228
11229// Context sets the context to be used in this call's Do method. Any
11230// pending HTTP request will be aborted if the provided context is
11231// canceled.
11232func (c *AccountsProposalsResumeCall) Context(ctx context.Context) *AccountsProposalsResumeCall {
11233	c.ctx_ = ctx
11234	return c
11235}
11236
11237// Header returns an http.Header that can be modified by the caller to
11238// add HTTP headers to the request.
11239func (c *AccountsProposalsResumeCall) Header() http.Header {
11240	if c.header_ == nil {
11241		c.header_ = make(http.Header)
11242	}
11243	return c.header_
11244}
11245
11246func (c *AccountsProposalsResumeCall) doRequest(alt string) (*http.Response, error) {
11247	reqHeaders := make(http.Header)
11248	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
11249	for k, v := range c.header_ {
11250		reqHeaders[k] = v
11251	}
11252	reqHeaders.Set("User-Agent", c.s.userAgent())
11253	var body io.Reader = nil
11254	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumeproposalrequest)
11255	if err != nil {
11256		return nil, err
11257	}
11258	reqHeaders.Set("Content-Type", "application/json")
11259	c.urlParams_.Set("alt", alt)
11260	c.urlParams_.Set("prettyPrint", "false")
11261	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume")
11262	urls += "?" + c.urlParams_.Encode()
11263	req, err := http.NewRequest("POST", urls, body)
11264	if err != nil {
11265		return nil, err
11266	}
11267	req.Header = reqHeaders
11268	googleapi.Expand(req.URL, map[string]string{
11269		"accountId":  c.accountId,
11270		"proposalId": c.proposalId,
11271	})
11272	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11273}
11274
11275// Do executes the "adexchangebuyer2.accounts.proposals.resume" call.
11276// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
11277// code is an error. Response headers are in either
11278// *Proposal.ServerResponse.Header or (if a response was returned at
11279// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11280// to check whether the returned error was because
11281// http.StatusNotModified was returned.
11282func (c *AccountsProposalsResumeCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
11283	gensupport.SetOptions(c.urlParams_, opts...)
11284	res, err := c.doRequest("json")
11285	if res != nil && res.StatusCode == http.StatusNotModified {
11286		if res.Body != nil {
11287			res.Body.Close()
11288		}
11289		return nil, &googleapi.Error{
11290			Code:   res.StatusCode,
11291			Header: res.Header,
11292		}
11293	}
11294	if err != nil {
11295		return nil, err
11296	}
11297	defer googleapi.CloseBody(res)
11298	if err := googleapi.CheckResponse(res); err != nil {
11299		return nil, err
11300	}
11301	ret := &Proposal{
11302		ServerResponse: googleapi.ServerResponse{
11303			Header:         res.Header,
11304			HTTPStatusCode: res.StatusCode,
11305		},
11306	}
11307	target := &ret
11308	if err := gensupport.DecodeResponse(target, res); err != nil {
11309		return nil, err
11310	}
11311	return ret, nil
11312	// {
11313	//   "description": "Update the given proposal to resume serving.\nThis method will set the\n`DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all\ndeals in the proposal.\n\nNote that if the `has_seller_paused` bit is also set, serving will not\nresume until the seller also resumes.\n\nIt is a no-op to resume an already-running proposal.\nIt is an error to call ResumeProposal for a proposal that is not\nfinalized or renegotiating.",
11314	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume",
11315	//   "httpMethod": "POST",
11316	//   "id": "adexchangebuyer2.accounts.proposals.resume",
11317	//   "parameterOrder": [
11318	//     "accountId",
11319	//     "proposalId"
11320	//   ],
11321	//   "parameters": {
11322	//     "accountId": {
11323	//       "description": "Account ID of the buyer.",
11324	//       "location": "path",
11325	//       "required": true,
11326	//       "type": "string"
11327	//     },
11328	//     "proposalId": {
11329	//       "description": "The ID of the proposal to resume.",
11330	//       "location": "path",
11331	//       "required": true,
11332	//       "type": "string"
11333	//     }
11334	//   },
11335	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}:resume",
11336	//   "request": {
11337	//     "$ref": "ResumeProposalRequest"
11338	//   },
11339	//   "response": {
11340	//     "$ref": "Proposal"
11341	//   },
11342	//   "scopes": [
11343	//     "https://www.googleapis.com/auth/adexchange.buyer"
11344	//   ]
11345	// }
11346
11347}
11348
11349// method id "adexchangebuyer2.accounts.proposals.update":
11350
11351type AccountsProposalsUpdateCall struct {
11352	s          *Service
11353	accountId  string
11354	proposalId string
11355	proposal   *Proposal
11356	urlParams_ gensupport.URLParams
11357	ctx_       context.Context
11358	header_    http.Header
11359}
11360
11361// Update: Update the given proposal at the client known revision
11362// number. If the
11363// server revision has advanced since the
11364// passed-in
11365// `proposal.proposal_revision`, an `ABORTED` error message will be
11366// returned.
11367// Only the buyer-modifiable fields of the proposal will be
11368// updated.
11369//
11370// Note that the deals in the proposal will be updated to match the
11371// passed-in
11372// copy.
11373// If a passed-in deal does not have a `deal_id`, the server will assign
11374// a new
11375// unique ID and create the deal.
11376// If passed-in deal has a `deal_id`, it will be updated to match
11377// the
11378// passed-in copy.
11379// Any existing deals not present in the passed-in proposal will be
11380// deleted.
11381// It is an error to pass in a deal with a `deal_id` not present at
11382// head.
11383func (r *AccountsProposalsService) Update(accountId string, proposalId string, proposal *Proposal) *AccountsProposalsUpdateCall {
11384	c := &AccountsProposalsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11385	c.accountId = accountId
11386	c.proposalId = proposalId
11387	c.proposal = proposal
11388	return c
11389}
11390
11391// Fields allows partial responses to be retrieved. See
11392// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11393// for more information.
11394func (c *AccountsProposalsUpdateCall) Fields(s ...googleapi.Field) *AccountsProposalsUpdateCall {
11395	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11396	return c
11397}
11398
11399// Context sets the context to be used in this call's Do method. Any
11400// pending HTTP request will be aborted if the provided context is
11401// canceled.
11402func (c *AccountsProposalsUpdateCall) Context(ctx context.Context) *AccountsProposalsUpdateCall {
11403	c.ctx_ = ctx
11404	return c
11405}
11406
11407// Header returns an http.Header that can be modified by the caller to
11408// add HTTP headers to the request.
11409func (c *AccountsProposalsUpdateCall) Header() http.Header {
11410	if c.header_ == nil {
11411		c.header_ = make(http.Header)
11412	}
11413	return c.header_
11414}
11415
11416func (c *AccountsProposalsUpdateCall) doRequest(alt string) (*http.Response, error) {
11417	reqHeaders := make(http.Header)
11418	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
11419	for k, v := range c.header_ {
11420		reqHeaders[k] = v
11421	}
11422	reqHeaders.Set("User-Agent", c.s.userAgent())
11423	var body io.Reader = nil
11424	body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
11425	if err != nil {
11426		return nil, err
11427	}
11428	reqHeaders.Set("Content-Type", "application/json")
11429	c.urlParams_.Set("alt", alt)
11430	c.urlParams_.Set("prettyPrint", "false")
11431	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/proposals/{proposalId}")
11432	urls += "?" + c.urlParams_.Encode()
11433	req, err := http.NewRequest("PUT", urls, body)
11434	if err != nil {
11435		return nil, err
11436	}
11437	req.Header = reqHeaders
11438	googleapi.Expand(req.URL, map[string]string{
11439		"accountId":  c.accountId,
11440		"proposalId": c.proposalId,
11441	})
11442	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11443}
11444
11445// Do executes the "adexchangebuyer2.accounts.proposals.update" call.
11446// Exactly one of *Proposal or error will be non-nil. Any non-2xx status
11447// code is an error. Response headers are in either
11448// *Proposal.ServerResponse.Header or (if a response was returned at
11449// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11450// to check whether the returned error was because
11451// http.StatusNotModified was returned.
11452func (c *AccountsProposalsUpdateCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
11453	gensupport.SetOptions(c.urlParams_, opts...)
11454	res, err := c.doRequest("json")
11455	if res != nil && res.StatusCode == http.StatusNotModified {
11456		if res.Body != nil {
11457			res.Body.Close()
11458		}
11459		return nil, &googleapi.Error{
11460			Code:   res.StatusCode,
11461			Header: res.Header,
11462		}
11463	}
11464	if err != nil {
11465		return nil, err
11466	}
11467	defer googleapi.CloseBody(res)
11468	if err := googleapi.CheckResponse(res); err != nil {
11469		return nil, err
11470	}
11471	ret := &Proposal{
11472		ServerResponse: googleapi.ServerResponse{
11473			Header:         res.Header,
11474			HTTPStatusCode: res.StatusCode,
11475		},
11476	}
11477	target := &ret
11478	if err := gensupport.DecodeResponse(target, res); err != nil {
11479		return nil, err
11480	}
11481	return ret, nil
11482	// {
11483	//   "description": "Update the given proposal at the client known revision number. If the\nserver revision has advanced since the passed-in\n`proposal.proposal_revision`, an `ABORTED` error message will be returned.\nOnly the buyer-modifiable fields of the proposal will be updated.\n\nNote that the deals in the proposal will be updated to match the passed-in\ncopy.\nIf a passed-in deal does not have a `deal_id`, the server will assign a new\nunique ID and create the deal.\nIf passed-in deal has a `deal_id`, it will be updated to match the\npassed-in copy.\nAny existing deals not present in the passed-in proposal will be deleted.\nIt is an error to pass in a deal with a `deal_id` not present at head.",
11484	//   "flatPath": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
11485	//   "httpMethod": "PUT",
11486	//   "id": "adexchangebuyer2.accounts.proposals.update",
11487	//   "parameterOrder": [
11488	//     "accountId",
11489	//     "proposalId"
11490	//   ],
11491	//   "parameters": {
11492	//     "accountId": {
11493	//       "description": "Account ID of the buyer.",
11494	//       "location": "path",
11495	//       "required": true,
11496	//       "type": "string"
11497	//     },
11498	//     "proposalId": {
11499	//       "description": "The unique ID of the proposal.",
11500	//       "location": "path",
11501	//       "required": true,
11502	//       "type": "string"
11503	//     }
11504	//   },
11505	//   "path": "v2beta1/accounts/{accountId}/proposals/{proposalId}",
11506	//   "request": {
11507	//     "$ref": "Proposal"
11508	//   },
11509	//   "response": {
11510	//     "$ref": "Proposal"
11511	//   },
11512	//   "scopes": [
11513	//     "https://www.googleapis.com/auth/adexchange.buyer"
11514	//   ]
11515	// }
11516
11517}
11518
11519// method id "adexchangebuyer2.accounts.publisherProfiles.get":
11520
11521type AccountsPublisherProfilesGetCall struct {
11522	s                  *Service
11523	accountId          string
11524	publisherProfileId string
11525	urlParams_         gensupport.URLParams
11526	ifNoneMatch_       string
11527	ctx_               context.Context
11528	header_            http.Header
11529}
11530
11531// Get: Gets the requested publisher profile by id.
11532func (r *AccountsPublisherProfilesService) Get(accountId string, publisherProfileId string) *AccountsPublisherProfilesGetCall {
11533	c := &AccountsPublisherProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11534	c.accountId = accountId
11535	c.publisherProfileId = publisherProfileId
11536	return c
11537}
11538
11539// Fields allows partial responses to be retrieved. See
11540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11541// for more information.
11542func (c *AccountsPublisherProfilesGetCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesGetCall {
11543	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11544	return c
11545}
11546
11547// IfNoneMatch sets the optional parameter which makes the operation
11548// fail if the object's ETag matches the given value. This is useful for
11549// getting updates only after the object has changed since the last
11550// request. Use googleapi.IsNotModified to check whether the response
11551// error from Do is the result of In-None-Match.
11552func (c *AccountsPublisherProfilesGetCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesGetCall {
11553	c.ifNoneMatch_ = entityTag
11554	return c
11555}
11556
11557// Context sets the context to be used in this call's Do method. Any
11558// pending HTTP request will be aborted if the provided context is
11559// canceled.
11560func (c *AccountsPublisherProfilesGetCall) Context(ctx context.Context) *AccountsPublisherProfilesGetCall {
11561	c.ctx_ = ctx
11562	return c
11563}
11564
11565// Header returns an http.Header that can be modified by the caller to
11566// add HTTP headers to the request.
11567func (c *AccountsPublisherProfilesGetCall) Header() http.Header {
11568	if c.header_ == nil {
11569		c.header_ = make(http.Header)
11570	}
11571	return c.header_
11572}
11573
11574func (c *AccountsPublisherProfilesGetCall) doRequest(alt string) (*http.Response, error) {
11575	reqHeaders := make(http.Header)
11576	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
11577	for k, v := range c.header_ {
11578		reqHeaders[k] = v
11579	}
11580	reqHeaders.Set("User-Agent", c.s.userAgent())
11581	if c.ifNoneMatch_ != "" {
11582		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11583	}
11584	var body io.Reader = nil
11585	c.urlParams_.Set("alt", alt)
11586	c.urlParams_.Set("prettyPrint", "false")
11587	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}")
11588	urls += "?" + c.urlParams_.Encode()
11589	req, err := http.NewRequest("GET", urls, body)
11590	if err != nil {
11591		return nil, err
11592	}
11593	req.Header = reqHeaders
11594	googleapi.Expand(req.URL, map[string]string{
11595		"accountId":          c.accountId,
11596		"publisherProfileId": c.publisherProfileId,
11597	})
11598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11599}
11600
11601// Do executes the "adexchangebuyer2.accounts.publisherProfiles.get" call.
11602// Exactly one of *PublisherProfile or error will be non-nil. Any
11603// non-2xx status code is an error. Response headers are in either
11604// *PublisherProfile.ServerResponse.Header or (if a response was
11605// returned at all) in error.(*googleapi.Error).Header. Use
11606// googleapi.IsNotModified to check whether the returned error was
11607// because http.StatusNotModified was returned.
11608func (c *AccountsPublisherProfilesGetCall) Do(opts ...googleapi.CallOption) (*PublisherProfile, error) {
11609	gensupport.SetOptions(c.urlParams_, opts...)
11610	res, err := c.doRequest("json")
11611	if res != nil && res.StatusCode == http.StatusNotModified {
11612		if res.Body != nil {
11613			res.Body.Close()
11614		}
11615		return nil, &googleapi.Error{
11616			Code:   res.StatusCode,
11617			Header: res.Header,
11618		}
11619	}
11620	if err != nil {
11621		return nil, err
11622	}
11623	defer googleapi.CloseBody(res)
11624	if err := googleapi.CheckResponse(res); err != nil {
11625		return nil, err
11626	}
11627	ret := &PublisherProfile{
11628		ServerResponse: googleapi.ServerResponse{
11629			Header:         res.Header,
11630			HTTPStatusCode: res.StatusCode,
11631		},
11632	}
11633	target := &ret
11634	if err := gensupport.DecodeResponse(target, res); err != nil {
11635		return nil, err
11636	}
11637	return ret, nil
11638	// {
11639	//   "description": "Gets the requested publisher profile by id.",
11640	//   "flatPath": "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}",
11641	//   "httpMethod": "GET",
11642	//   "id": "adexchangebuyer2.accounts.publisherProfiles.get",
11643	//   "parameterOrder": [
11644	//     "accountId",
11645	//     "publisherProfileId"
11646	//   ],
11647	//   "parameters": {
11648	//     "accountId": {
11649	//       "description": "Account ID of the buyer.",
11650	//       "location": "path",
11651	//       "required": true,
11652	//       "type": "string"
11653	//     },
11654	//     "publisherProfileId": {
11655	//       "description": "The id for the publisher profile to get.",
11656	//       "location": "path",
11657	//       "required": true,
11658	//       "type": "string"
11659	//     }
11660	//   },
11661	//   "path": "v2beta1/accounts/{accountId}/publisherProfiles/{publisherProfileId}",
11662	//   "response": {
11663	//     "$ref": "PublisherProfile"
11664	//   },
11665	//   "scopes": [
11666	//     "https://www.googleapis.com/auth/adexchange.buyer"
11667	//   ]
11668	// }
11669
11670}
11671
11672// method id "adexchangebuyer2.accounts.publisherProfiles.list":
11673
11674type AccountsPublisherProfilesListCall struct {
11675	s            *Service
11676	accountId    string
11677	urlParams_   gensupport.URLParams
11678	ifNoneMatch_ string
11679	ctx_         context.Context
11680	header_      http.Header
11681}
11682
11683// List: List all publisher profiles visible to the buyer
11684func (r *AccountsPublisherProfilesService) List(accountId string) *AccountsPublisherProfilesListCall {
11685	c := &AccountsPublisherProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11686	c.accountId = accountId
11687	return c
11688}
11689
11690// PageSize sets the optional parameter "pageSize": Specify the number
11691// of results to include per page.
11692func (c *AccountsPublisherProfilesListCall) PageSize(pageSize int64) *AccountsPublisherProfilesListCall {
11693	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11694	return c
11695}
11696
11697// PageToken sets the optional parameter "pageToken": The page token as
11698// return from ListPublisherProfilesResponse.
11699func (c *AccountsPublisherProfilesListCall) PageToken(pageToken string) *AccountsPublisherProfilesListCall {
11700	c.urlParams_.Set("pageToken", pageToken)
11701	return c
11702}
11703
11704// Fields allows partial responses to be retrieved. See
11705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11706// for more information.
11707func (c *AccountsPublisherProfilesListCall) Fields(s ...googleapi.Field) *AccountsPublisherProfilesListCall {
11708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11709	return c
11710}
11711
11712// IfNoneMatch sets the optional parameter which makes the operation
11713// fail if the object's ETag matches the given value. This is useful for
11714// getting updates only after the object has changed since the last
11715// request. Use googleapi.IsNotModified to check whether the response
11716// error from Do is the result of In-None-Match.
11717func (c *AccountsPublisherProfilesListCall) IfNoneMatch(entityTag string) *AccountsPublisherProfilesListCall {
11718	c.ifNoneMatch_ = entityTag
11719	return c
11720}
11721
11722// Context sets the context to be used in this call's Do method. Any
11723// pending HTTP request will be aborted if the provided context is
11724// canceled.
11725func (c *AccountsPublisherProfilesListCall) Context(ctx context.Context) *AccountsPublisherProfilesListCall {
11726	c.ctx_ = ctx
11727	return c
11728}
11729
11730// Header returns an http.Header that can be modified by the caller to
11731// add HTTP headers to the request.
11732func (c *AccountsPublisherProfilesListCall) Header() http.Header {
11733	if c.header_ == nil {
11734		c.header_ = make(http.Header)
11735	}
11736	return c.header_
11737}
11738
11739func (c *AccountsPublisherProfilesListCall) doRequest(alt string) (*http.Response, error) {
11740	reqHeaders := make(http.Header)
11741	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
11742	for k, v := range c.header_ {
11743		reqHeaders[k] = v
11744	}
11745	reqHeaders.Set("User-Agent", c.s.userAgent())
11746	if c.ifNoneMatch_ != "" {
11747		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11748	}
11749	var body io.Reader = nil
11750	c.urlParams_.Set("alt", alt)
11751	c.urlParams_.Set("prettyPrint", "false")
11752	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/accounts/{accountId}/publisherProfiles")
11753	urls += "?" + c.urlParams_.Encode()
11754	req, err := http.NewRequest("GET", urls, body)
11755	if err != nil {
11756		return nil, err
11757	}
11758	req.Header = reqHeaders
11759	googleapi.Expand(req.URL, map[string]string{
11760		"accountId": c.accountId,
11761	})
11762	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11763}
11764
11765// Do executes the "adexchangebuyer2.accounts.publisherProfiles.list" call.
11766// Exactly one of *ListPublisherProfilesResponse or error will be
11767// non-nil. Any non-2xx status code is an error. Response headers are in
11768// either *ListPublisherProfilesResponse.ServerResponse.Header or (if a
11769// response was returned at all) in error.(*googleapi.Error).Header. Use
11770// googleapi.IsNotModified to check whether the returned error was
11771// because http.StatusNotModified was returned.
11772func (c *AccountsPublisherProfilesListCall) Do(opts ...googleapi.CallOption) (*ListPublisherProfilesResponse, error) {
11773	gensupport.SetOptions(c.urlParams_, opts...)
11774	res, err := c.doRequest("json")
11775	if res != nil && res.StatusCode == http.StatusNotModified {
11776		if res.Body != nil {
11777			res.Body.Close()
11778		}
11779		return nil, &googleapi.Error{
11780			Code:   res.StatusCode,
11781			Header: res.Header,
11782		}
11783	}
11784	if err != nil {
11785		return nil, err
11786	}
11787	defer googleapi.CloseBody(res)
11788	if err := googleapi.CheckResponse(res); err != nil {
11789		return nil, err
11790	}
11791	ret := &ListPublisherProfilesResponse{
11792		ServerResponse: googleapi.ServerResponse{
11793			Header:         res.Header,
11794			HTTPStatusCode: res.StatusCode,
11795		},
11796	}
11797	target := &ret
11798	if err := gensupport.DecodeResponse(target, res); err != nil {
11799		return nil, err
11800	}
11801	return ret, nil
11802	// {
11803	//   "description": "List all publisher profiles visible to the buyer",
11804	//   "flatPath": "v2beta1/accounts/{accountId}/publisherProfiles",
11805	//   "httpMethod": "GET",
11806	//   "id": "adexchangebuyer2.accounts.publisherProfiles.list",
11807	//   "parameterOrder": [
11808	//     "accountId"
11809	//   ],
11810	//   "parameters": {
11811	//     "accountId": {
11812	//       "description": "Account ID of the buyer.",
11813	//       "location": "path",
11814	//       "required": true,
11815	//       "type": "string"
11816	//     },
11817	//     "pageSize": {
11818	//       "description": "Specify the number of results to include per page.",
11819	//       "format": "int32",
11820	//       "location": "query",
11821	//       "type": "integer"
11822	//     },
11823	//     "pageToken": {
11824	//       "description": "The page token as return from ListPublisherProfilesResponse.",
11825	//       "location": "query",
11826	//       "type": "string"
11827	//     }
11828	//   },
11829	//   "path": "v2beta1/accounts/{accountId}/publisherProfiles",
11830	//   "response": {
11831	//     "$ref": "ListPublisherProfilesResponse"
11832	//   },
11833	//   "scopes": [
11834	//     "https://www.googleapis.com/auth/adexchange.buyer"
11835	//   ]
11836	// }
11837
11838}
11839
11840// Pages invokes f for each page of results.
11841// A non-nil error returned from f will halt the iteration.
11842// The provided context supersedes any context provided to the Context method.
11843func (c *AccountsPublisherProfilesListCall) Pages(ctx context.Context, f func(*ListPublisherProfilesResponse) error) error {
11844	c.ctx_ = ctx
11845	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11846	for {
11847		x, err := c.Do()
11848		if err != nil {
11849			return err
11850		}
11851		if err := f(x); err != nil {
11852			return err
11853		}
11854		if x.NextPageToken == "" {
11855			return nil
11856		}
11857		c.PageToken(x.NextPageToken)
11858	}
11859}
11860
11861// method id "adexchangebuyer2.bidders.accounts.filterSets.create":
11862
11863type BiddersAccountsFilterSetsCreateCall struct {
11864	s          *Service
11865	ownerName  string
11866	filterset  *FilterSet
11867	urlParams_ gensupport.URLParams
11868	ctx_       context.Context
11869	header_    http.Header
11870}
11871
11872// Create: Creates the specified filter set for the account with the
11873// given account ID.
11874func (r *BiddersAccountsFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersAccountsFilterSetsCreateCall {
11875	c := &BiddersAccountsFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11876	c.ownerName = ownerName
11877	c.filterset = filterset
11878	return c
11879}
11880
11881// IsTransient sets the optional parameter "isTransient": Whether the
11882// filter set is transient, or should be persisted indefinitely.
11883// By default, filter sets are not transient.
11884// If transient, it will be available for at least 1 hour after
11885// creation.
11886func (c *BiddersAccountsFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersAccountsFilterSetsCreateCall {
11887	c.urlParams_.Set("isTransient", fmt.Sprint(isTransient))
11888	return c
11889}
11890
11891// Fields allows partial responses to be retrieved. See
11892// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11893// for more information.
11894func (c *BiddersAccountsFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsCreateCall {
11895	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11896	return c
11897}
11898
11899// Context sets the context to be used in this call's Do method. Any
11900// pending HTTP request will be aborted if the provided context is
11901// canceled.
11902func (c *BiddersAccountsFilterSetsCreateCall) Context(ctx context.Context) *BiddersAccountsFilterSetsCreateCall {
11903	c.ctx_ = ctx
11904	return c
11905}
11906
11907// Header returns an http.Header that can be modified by the caller to
11908// add HTTP headers to the request.
11909func (c *BiddersAccountsFilterSetsCreateCall) Header() http.Header {
11910	if c.header_ == nil {
11911		c.header_ = make(http.Header)
11912	}
11913	return c.header_
11914}
11915
11916func (c *BiddersAccountsFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) {
11917	reqHeaders := make(http.Header)
11918	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
11919	for k, v := range c.header_ {
11920		reqHeaders[k] = v
11921	}
11922	reqHeaders.Set("User-Agent", c.s.userAgent())
11923	var body io.Reader = nil
11924	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filterset)
11925	if err != nil {
11926		return nil, err
11927	}
11928	reqHeaders.Set("Content-Type", "application/json")
11929	c.urlParams_.Set("alt", alt)
11930	c.urlParams_.Set("prettyPrint", "false")
11931	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
11932	urls += "?" + c.urlParams_.Encode()
11933	req, err := http.NewRequest("POST", urls, body)
11934	if err != nil {
11935		return nil, err
11936	}
11937	req.Header = reqHeaders
11938	googleapi.Expand(req.URL, map[string]string{
11939		"ownerName": c.ownerName,
11940	})
11941	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11942}
11943
11944// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.create" call.
11945// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
11946// status code is an error. Response headers are in either
11947// *FilterSet.ServerResponse.Header or (if a response was returned at
11948// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11949// to check whether the returned error was because
11950// http.StatusNotModified was returned.
11951func (c *BiddersAccountsFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
11952	gensupport.SetOptions(c.urlParams_, opts...)
11953	res, err := c.doRequest("json")
11954	if res != nil && res.StatusCode == http.StatusNotModified {
11955		if res.Body != nil {
11956			res.Body.Close()
11957		}
11958		return nil, &googleapi.Error{
11959			Code:   res.StatusCode,
11960			Header: res.Header,
11961		}
11962	}
11963	if err != nil {
11964		return nil, err
11965	}
11966	defer googleapi.CloseBody(res)
11967	if err := googleapi.CheckResponse(res); err != nil {
11968		return nil, err
11969	}
11970	ret := &FilterSet{
11971		ServerResponse: googleapi.ServerResponse{
11972			Header:         res.Header,
11973			HTTPStatusCode: res.StatusCode,
11974		},
11975	}
11976	target := &ret
11977	if err := gensupport.DecodeResponse(target, res); err != nil {
11978		return nil, err
11979	}
11980	return ret, nil
11981	// {
11982	//   "description": "Creates the specified filter set for the account with the given account ID.",
11983	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets",
11984	//   "httpMethod": "POST",
11985	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.create",
11986	//   "parameterOrder": [
11987	//     "ownerName"
11988	//   ],
11989	//   "parameters": {
11990	//     "isTransient": {
11991	//       "description": "Whether the filter set is transient, or should be persisted indefinitely.\nBy default, filter sets are not transient.\nIf transient, it will be available for at least 1 hour after creation.",
11992	//       "location": "query",
11993	//       "type": "boolean"
11994	//     },
11995	//     "ownerName": {
11996	//       "description": "Name of the owner (bidder or account) of the filter set to be created.\nFor example:\n\n- For a bidder-level filter set for bidder 123: `bidders/123`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456`",
11997	//       "location": "path",
11998	//       "pattern": "^bidders/[^/]+/accounts/[^/]+$",
11999	//       "required": true,
12000	//       "type": "string"
12001	//     }
12002	//   },
12003	//   "path": "v2beta1/{+ownerName}/filterSets",
12004	//   "request": {
12005	//     "$ref": "FilterSet"
12006	//   },
12007	//   "response": {
12008	//     "$ref": "FilterSet"
12009	//   },
12010	//   "scopes": [
12011	//     "https://www.googleapis.com/auth/adexchange.buyer"
12012	//   ]
12013	// }
12014
12015}
12016
12017// method id "adexchangebuyer2.bidders.accounts.filterSets.delete":
12018
12019type BiddersAccountsFilterSetsDeleteCall struct {
12020	s          *Service
12021	name       string
12022	urlParams_ gensupport.URLParams
12023	ctx_       context.Context
12024	header_    http.Header
12025}
12026
12027// Delete: Deletes the requested filter set from the account with the
12028// given account
12029// ID.
12030func (r *BiddersAccountsFilterSetsService) Delete(name string) *BiddersAccountsFilterSetsDeleteCall {
12031	c := &BiddersAccountsFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12032	c.name = name
12033	return c
12034}
12035
12036// Fields allows partial responses to be retrieved. See
12037// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12038// for more information.
12039func (c *BiddersAccountsFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsDeleteCall {
12040	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12041	return c
12042}
12043
12044// Context sets the context to be used in this call's Do method. Any
12045// pending HTTP request will be aborted if the provided context is
12046// canceled.
12047func (c *BiddersAccountsFilterSetsDeleteCall) Context(ctx context.Context) *BiddersAccountsFilterSetsDeleteCall {
12048	c.ctx_ = ctx
12049	return c
12050}
12051
12052// Header returns an http.Header that can be modified by the caller to
12053// add HTTP headers to the request.
12054func (c *BiddersAccountsFilterSetsDeleteCall) Header() http.Header {
12055	if c.header_ == nil {
12056		c.header_ = make(http.Header)
12057	}
12058	return c.header_
12059}
12060
12061func (c *BiddersAccountsFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
12062	reqHeaders := make(http.Header)
12063	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
12064	for k, v := range c.header_ {
12065		reqHeaders[k] = v
12066	}
12067	reqHeaders.Set("User-Agent", c.s.userAgent())
12068	var body io.Reader = nil
12069	c.urlParams_.Set("alt", alt)
12070	c.urlParams_.Set("prettyPrint", "false")
12071	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12072	urls += "?" + c.urlParams_.Encode()
12073	req, err := http.NewRequest("DELETE", urls, body)
12074	if err != nil {
12075		return nil, err
12076	}
12077	req.Header = reqHeaders
12078	googleapi.Expand(req.URL, map[string]string{
12079		"name": c.name,
12080	})
12081	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12082}
12083
12084// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.delete" call.
12085// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12086// code is an error. Response headers are in either
12087// *Empty.ServerResponse.Header or (if a response was returned at all)
12088// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12089// check whether the returned error was because http.StatusNotModified
12090// was returned.
12091func (c *BiddersAccountsFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12092	gensupport.SetOptions(c.urlParams_, opts...)
12093	res, err := c.doRequest("json")
12094	if res != nil && res.StatusCode == http.StatusNotModified {
12095		if res.Body != nil {
12096			res.Body.Close()
12097		}
12098		return nil, &googleapi.Error{
12099			Code:   res.StatusCode,
12100			Header: res.Header,
12101		}
12102	}
12103	if err != nil {
12104		return nil, err
12105	}
12106	defer googleapi.CloseBody(res)
12107	if err := googleapi.CheckResponse(res); err != nil {
12108		return nil, err
12109	}
12110	ret := &Empty{
12111		ServerResponse: googleapi.ServerResponse{
12112			Header:         res.Header,
12113			HTTPStatusCode: res.StatusCode,
12114		},
12115	}
12116	target := &ret
12117	if err := gensupport.DecodeResponse(target, res); err != nil {
12118		return nil, err
12119	}
12120	return ret, nil
12121	// {
12122	//   "description": "Deletes the requested filter set from the account with the given account\nID.",
12123	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}",
12124	//   "httpMethod": "DELETE",
12125	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.delete",
12126	//   "parameterOrder": [
12127	//     "name"
12128	//   ],
12129	//   "parameters": {
12130	//     "name": {
12131	//       "description": "Full name of the resource to delete.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12132	//       "location": "path",
12133	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12134	//       "required": true,
12135	//       "type": "string"
12136	//     }
12137	//   },
12138	//   "path": "v2beta1/{+name}",
12139	//   "response": {
12140	//     "$ref": "Empty"
12141	//   },
12142	//   "scopes": [
12143	//     "https://www.googleapis.com/auth/adexchange.buyer"
12144	//   ]
12145	// }
12146
12147}
12148
12149// method id "adexchangebuyer2.bidders.accounts.filterSets.get":
12150
12151type BiddersAccountsFilterSetsGetCall struct {
12152	s            *Service
12153	name         string
12154	urlParams_   gensupport.URLParams
12155	ifNoneMatch_ string
12156	ctx_         context.Context
12157	header_      http.Header
12158}
12159
12160// Get: Retrieves the requested filter set for the account with the
12161// given account
12162// ID.
12163func (r *BiddersAccountsFilterSetsService) Get(name string) *BiddersAccountsFilterSetsGetCall {
12164	c := &BiddersAccountsFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12165	c.name = name
12166	return c
12167}
12168
12169// Fields allows partial responses to be retrieved. See
12170// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12171// for more information.
12172func (c *BiddersAccountsFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsGetCall {
12173	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12174	return c
12175}
12176
12177// IfNoneMatch sets the optional parameter which makes the operation
12178// fail if the object's ETag matches the given value. This is useful for
12179// getting updates only after the object has changed since the last
12180// request. Use googleapi.IsNotModified to check whether the response
12181// error from Do is the result of In-None-Match.
12182func (c *BiddersAccountsFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsGetCall {
12183	c.ifNoneMatch_ = entityTag
12184	return c
12185}
12186
12187// Context sets the context to be used in this call's Do method. Any
12188// pending HTTP request will be aborted if the provided context is
12189// canceled.
12190func (c *BiddersAccountsFilterSetsGetCall) Context(ctx context.Context) *BiddersAccountsFilterSetsGetCall {
12191	c.ctx_ = ctx
12192	return c
12193}
12194
12195// Header returns an http.Header that can be modified by the caller to
12196// add HTTP headers to the request.
12197func (c *BiddersAccountsFilterSetsGetCall) Header() http.Header {
12198	if c.header_ == nil {
12199		c.header_ = make(http.Header)
12200	}
12201	return c.header_
12202}
12203
12204func (c *BiddersAccountsFilterSetsGetCall) doRequest(alt string) (*http.Response, error) {
12205	reqHeaders := make(http.Header)
12206	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
12207	for k, v := range c.header_ {
12208		reqHeaders[k] = v
12209	}
12210	reqHeaders.Set("User-Agent", c.s.userAgent())
12211	if c.ifNoneMatch_ != "" {
12212		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12213	}
12214	var body io.Reader = nil
12215	c.urlParams_.Set("alt", alt)
12216	c.urlParams_.Set("prettyPrint", "false")
12217	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
12218	urls += "?" + c.urlParams_.Encode()
12219	req, err := http.NewRequest("GET", urls, body)
12220	if err != nil {
12221		return nil, err
12222	}
12223	req.Header = reqHeaders
12224	googleapi.Expand(req.URL, map[string]string{
12225		"name": c.name,
12226	})
12227	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12228}
12229
12230// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.get" call.
12231// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
12232// status code is an error. Response headers are in either
12233// *FilterSet.ServerResponse.Header or (if a response was returned at
12234// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12235// to check whether the returned error was because
12236// http.StatusNotModified was returned.
12237func (c *BiddersAccountsFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
12238	gensupport.SetOptions(c.urlParams_, opts...)
12239	res, err := c.doRequest("json")
12240	if res != nil && res.StatusCode == http.StatusNotModified {
12241		if res.Body != nil {
12242			res.Body.Close()
12243		}
12244		return nil, &googleapi.Error{
12245			Code:   res.StatusCode,
12246			Header: res.Header,
12247		}
12248	}
12249	if err != nil {
12250		return nil, err
12251	}
12252	defer googleapi.CloseBody(res)
12253	if err := googleapi.CheckResponse(res); err != nil {
12254		return nil, err
12255	}
12256	ret := &FilterSet{
12257		ServerResponse: googleapi.ServerResponse{
12258			Header:         res.Header,
12259			HTTPStatusCode: res.StatusCode,
12260		},
12261	}
12262	target := &ret
12263	if err := gensupport.DecodeResponse(target, res); err != nil {
12264		return nil, err
12265	}
12266	return ret, nil
12267	// {
12268	//   "description": "Retrieves the requested filter set for the account with the given account\nID.",
12269	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}",
12270	//   "httpMethod": "GET",
12271	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.get",
12272	//   "parameterOrder": [
12273	//     "name"
12274	//   ],
12275	//   "parameters": {
12276	//     "name": {
12277	//       "description": "Full name of the resource being requested.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12278	//       "location": "path",
12279	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12280	//       "required": true,
12281	//       "type": "string"
12282	//     }
12283	//   },
12284	//   "path": "v2beta1/{+name}",
12285	//   "response": {
12286	//     "$ref": "FilterSet"
12287	//   },
12288	//   "scopes": [
12289	//     "https://www.googleapis.com/auth/adexchange.buyer"
12290	//   ]
12291	// }
12292
12293}
12294
12295// method id "adexchangebuyer2.bidders.accounts.filterSets.list":
12296
12297type BiddersAccountsFilterSetsListCall struct {
12298	s            *Service
12299	ownerName    string
12300	urlParams_   gensupport.URLParams
12301	ifNoneMatch_ string
12302	ctx_         context.Context
12303	header_      http.Header
12304}
12305
12306// List: Lists all filter sets for the account with the given account
12307// ID.
12308func (r *BiddersAccountsFilterSetsService) List(ownerName string) *BiddersAccountsFilterSetsListCall {
12309	c := &BiddersAccountsFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12310	c.ownerName = ownerName
12311	return c
12312}
12313
12314// PageSize sets the optional parameter "pageSize": Requested page size.
12315// The server may return fewer results than requested.
12316// If unspecified, the server will pick an appropriate default.
12317func (c *BiddersAccountsFilterSetsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsListCall {
12318	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12319	return c
12320}
12321
12322// PageToken sets the optional parameter "pageToken": A token
12323// identifying a page of results the server should return.
12324// Typically, this is the value
12325// of
12326// ListFilterSetsResponse.nextPageToken
12327// returned from the previous call to
12328// the
12329// accounts.filterSets.list
12330// method.
12331func (c *BiddersAccountsFilterSetsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsListCall {
12332	c.urlParams_.Set("pageToken", pageToken)
12333	return c
12334}
12335
12336// Fields allows partial responses to be retrieved. See
12337// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12338// for more information.
12339func (c *BiddersAccountsFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsListCall {
12340	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12341	return c
12342}
12343
12344// IfNoneMatch sets the optional parameter which makes the operation
12345// fail if the object's ETag matches the given value. This is useful for
12346// getting updates only after the object has changed since the last
12347// request. Use googleapi.IsNotModified to check whether the response
12348// error from Do is the result of In-None-Match.
12349func (c *BiddersAccountsFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsListCall {
12350	c.ifNoneMatch_ = entityTag
12351	return c
12352}
12353
12354// Context sets the context to be used in this call's Do method. Any
12355// pending HTTP request will be aborted if the provided context is
12356// canceled.
12357func (c *BiddersAccountsFilterSetsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsListCall {
12358	c.ctx_ = ctx
12359	return c
12360}
12361
12362// Header returns an http.Header that can be modified by the caller to
12363// add HTTP headers to the request.
12364func (c *BiddersAccountsFilterSetsListCall) Header() http.Header {
12365	if c.header_ == nil {
12366		c.header_ = make(http.Header)
12367	}
12368	return c.header_
12369}
12370
12371func (c *BiddersAccountsFilterSetsListCall) doRequest(alt string) (*http.Response, error) {
12372	reqHeaders := make(http.Header)
12373	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
12374	for k, v := range c.header_ {
12375		reqHeaders[k] = v
12376	}
12377	reqHeaders.Set("User-Agent", c.s.userAgent())
12378	if c.ifNoneMatch_ != "" {
12379		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12380	}
12381	var body io.Reader = nil
12382	c.urlParams_.Set("alt", alt)
12383	c.urlParams_.Set("prettyPrint", "false")
12384	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
12385	urls += "?" + c.urlParams_.Encode()
12386	req, err := http.NewRequest("GET", urls, body)
12387	if err != nil {
12388		return nil, err
12389	}
12390	req.Header = reqHeaders
12391	googleapi.Expand(req.URL, map[string]string{
12392		"ownerName": c.ownerName,
12393	})
12394	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12395}
12396
12397// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.list" call.
12398// Exactly one of *ListFilterSetsResponse or error will be non-nil. Any
12399// non-2xx status code is an error. Response headers are in either
12400// *ListFilterSetsResponse.ServerResponse.Header or (if a response was
12401// returned at all) in error.(*googleapi.Error).Header. Use
12402// googleapi.IsNotModified to check whether the returned error was
12403// because http.StatusNotModified was returned.
12404func (c *BiddersAccountsFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) {
12405	gensupport.SetOptions(c.urlParams_, opts...)
12406	res, err := c.doRequest("json")
12407	if res != nil && res.StatusCode == http.StatusNotModified {
12408		if res.Body != nil {
12409			res.Body.Close()
12410		}
12411		return nil, &googleapi.Error{
12412			Code:   res.StatusCode,
12413			Header: res.Header,
12414		}
12415	}
12416	if err != nil {
12417		return nil, err
12418	}
12419	defer googleapi.CloseBody(res)
12420	if err := googleapi.CheckResponse(res); err != nil {
12421		return nil, err
12422	}
12423	ret := &ListFilterSetsResponse{
12424		ServerResponse: googleapi.ServerResponse{
12425			Header:         res.Header,
12426			HTTPStatusCode: res.StatusCode,
12427		},
12428	}
12429	target := &ret
12430	if err := gensupport.DecodeResponse(target, res); err != nil {
12431		return nil, err
12432	}
12433	return ret, nil
12434	// {
12435	//   "description": "Lists all filter sets for the account with the given account ID.",
12436	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets",
12437	//   "httpMethod": "GET",
12438	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.list",
12439	//   "parameterOrder": [
12440	//     "ownerName"
12441	//   ],
12442	//   "parameters": {
12443	//     "ownerName": {
12444	//       "description": "Name of the owner (bidder or account) of the filter sets to be listed.\nFor example:\n\n- For a bidder-level filter set for bidder 123: `bidders/123`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456`",
12445	//       "location": "path",
12446	//       "pattern": "^bidders/[^/]+/accounts/[^/]+$",
12447	//       "required": true,
12448	//       "type": "string"
12449	//     },
12450	//     "pageSize": {
12451	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
12452	//       "format": "int32",
12453	//       "location": "query",
12454	//       "type": "integer"
12455	//     },
12456	//     "pageToken": {
12457	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilterSetsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.list\nmethod.",
12458	//       "location": "query",
12459	//       "type": "string"
12460	//     }
12461	//   },
12462	//   "path": "v2beta1/{+ownerName}/filterSets",
12463	//   "response": {
12464	//     "$ref": "ListFilterSetsResponse"
12465	//   },
12466	//   "scopes": [
12467	//     "https://www.googleapis.com/auth/adexchange.buyer"
12468	//   ]
12469	// }
12470
12471}
12472
12473// Pages invokes f for each page of results.
12474// A non-nil error returned from f will halt the iteration.
12475// The provided context supersedes any context provided to the Context method.
12476func (c *BiddersAccountsFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error {
12477	c.ctx_ = ctx
12478	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12479	for {
12480		x, err := c.Do()
12481		if err != nil {
12482			return err
12483		}
12484		if err := f(x); err != nil {
12485			return err
12486		}
12487		if x.NextPageToken == "" {
12488			return nil
12489		}
12490		c.PageToken(x.NextPageToken)
12491	}
12492}
12493
12494// method id "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list":
12495
12496type BiddersAccountsFilterSetsBidMetricsListCall struct {
12497	s             *Service
12498	filterSetName string
12499	urlParams_    gensupport.URLParams
12500	ifNoneMatch_  string
12501	ctx_          context.Context
12502	header_       http.Header
12503}
12504
12505// List: Lists all metrics that are measured in terms of number of bids.
12506func (r *BiddersAccountsFilterSetsBidMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsBidMetricsListCall {
12507	c := &BiddersAccountsFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12508	c.filterSetName = filterSetName
12509	return c
12510}
12511
12512// PageSize sets the optional parameter "pageSize": Requested page size.
12513// The server may return fewer results than requested.
12514// If unspecified, the server will pick an appropriate default.
12515func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidMetricsListCall {
12516	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12517	return c
12518}
12519
12520// PageToken sets the optional parameter "pageToken": A token
12521// identifying a page of results the server should return.
12522// Typically, this is the value
12523// of
12524// ListBidMetricsResponse.nextPageToken
12525// returned from the previous call to the bidMetrics.list
12526// method.
12527func (c *BiddersAccountsFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidMetricsListCall {
12528	c.urlParams_.Set("pageToken", pageToken)
12529	return c
12530}
12531
12532// Fields allows partial responses to be retrieved. See
12533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12534// for more information.
12535func (c *BiddersAccountsFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidMetricsListCall {
12536	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12537	return c
12538}
12539
12540// IfNoneMatch sets the optional parameter which makes the operation
12541// fail if the object's ETag matches the given value. This is useful for
12542// getting updates only after the object has changed since the last
12543// request. Use googleapi.IsNotModified to check whether the response
12544// error from Do is the result of In-None-Match.
12545func (c *BiddersAccountsFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidMetricsListCall {
12546	c.ifNoneMatch_ = entityTag
12547	return c
12548}
12549
12550// Context sets the context to be used in this call's Do method. Any
12551// pending HTTP request will be aborted if the provided context is
12552// canceled.
12553func (c *BiddersAccountsFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidMetricsListCall {
12554	c.ctx_ = ctx
12555	return c
12556}
12557
12558// Header returns an http.Header that can be modified by the caller to
12559// add HTTP headers to the request.
12560func (c *BiddersAccountsFilterSetsBidMetricsListCall) Header() http.Header {
12561	if c.header_ == nil {
12562		c.header_ = make(http.Header)
12563	}
12564	return c.header_
12565}
12566
12567func (c *BiddersAccountsFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) {
12568	reqHeaders := make(http.Header)
12569	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
12570	for k, v := range c.header_ {
12571		reqHeaders[k] = v
12572	}
12573	reqHeaders.Set("User-Agent", c.s.userAgent())
12574	if c.ifNoneMatch_ != "" {
12575		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12576	}
12577	var body io.Reader = nil
12578	c.urlParams_.Set("alt", alt)
12579	c.urlParams_.Set("prettyPrint", "false")
12580	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics")
12581	urls += "?" + c.urlParams_.Encode()
12582	req, err := http.NewRequest("GET", urls, body)
12583	if err != nil {
12584		return nil, err
12585	}
12586	req.Header = reqHeaders
12587	googleapi.Expand(req.URL, map[string]string{
12588		"filterSetName": c.filterSetName,
12589	})
12590	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12591}
12592
12593// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list" call.
12594// Exactly one of *ListBidMetricsResponse or error will be non-nil. Any
12595// non-2xx status code is an error. Response headers are in either
12596// *ListBidMetricsResponse.ServerResponse.Header or (if a response was
12597// returned at all) in error.(*googleapi.Error).Header. Use
12598// googleapi.IsNotModified to check whether the returned error was
12599// because http.StatusNotModified was returned.
12600func (c *BiddersAccountsFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) {
12601	gensupport.SetOptions(c.urlParams_, opts...)
12602	res, err := c.doRequest("json")
12603	if res != nil && res.StatusCode == http.StatusNotModified {
12604		if res.Body != nil {
12605			res.Body.Close()
12606		}
12607		return nil, &googleapi.Error{
12608			Code:   res.StatusCode,
12609			Header: res.Header,
12610		}
12611	}
12612	if err != nil {
12613		return nil, err
12614	}
12615	defer googleapi.CloseBody(res)
12616	if err := googleapi.CheckResponse(res); err != nil {
12617		return nil, err
12618	}
12619	ret := &ListBidMetricsResponse{
12620		ServerResponse: googleapi.ServerResponse{
12621			Header:         res.Header,
12622			HTTPStatusCode: res.StatusCode,
12623		},
12624	}
12625	target := &ret
12626	if err := gensupport.DecodeResponse(target, res); err != nil {
12627		return nil, err
12628	}
12629	return ret, nil
12630	// {
12631	//   "description": "Lists all metrics that are measured in terms of number of bids.",
12632	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidMetrics",
12633	//   "httpMethod": "GET",
12634	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.bidMetrics.list",
12635	//   "parameterOrder": [
12636	//     "filterSetName"
12637	//   ],
12638	//   "parameters": {
12639	//     "filterSetName": {
12640	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12641	//       "location": "path",
12642	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12643	//       "required": true,
12644	//       "type": "string"
12645	//     },
12646	//     "pageSize": {
12647	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
12648	//       "format": "int32",
12649	//       "location": "query",
12650	//       "type": "integer"
12651	//     },
12652	//     "pageToken": {
12653	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidMetricsResponse.nextPageToken\nreturned from the previous call to the bidMetrics.list\nmethod.",
12654	//       "location": "query",
12655	//       "type": "string"
12656	//     }
12657	//   },
12658	//   "path": "v2beta1/{+filterSetName}/bidMetrics",
12659	//   "response": {
12660	//     "$ref": "ListBidMetricsResponse"
12661	//   },
12662	//   "scopes": [
12663	//     "https://www.googleapis.com/auth/adexchange.buyer"
12664	//   ]
12665	// }
12666
12667}
12668
12669// Pages invokes f for each page of results.
12670// A non-nil error returned from f will halt the iteration.
12671// The provided context supersedes any context provided to the Context method.
12672func (c *BiddersAccountsFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error {
12673	c.ctx_ = ctx
12674	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12675	for {
12676		x, err := c.Do()
12677		if err != nil {
12678			return err
12679		}
12680		if err := f(x); err != nil {
12681			return err
12682		}
12683		if x.NextPageToken == "" {
12684			return nil
12685		}
12686		c.PageToken(x.NextPageToken)
12687	}
12688}
12689
12690// method id "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list":
12691
12692type BiddersAccountsFilterSetsBidResponseErrorsListCall struct {
12693	s             *Service
12694	filterSetName string
12695	urlParams_    gensupport.URLParams
12696	ifNoneMatch_  string
12697	ctx_          context.Context
12698	header_       http.Header
12699}
12700
12701// List: List all errors that occurred in bid responses, with the number
12702// of bid
12703// responses affected for each reason.
12704func (r *BiddersAccountsFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12705	c := &BiddersAccountsFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12706	c.filterSetName = filterSetName
12707	return c
12708}
12709
12710// PageSize sets the optional parameter "pageSize": Requested page size.
12711// The server may return fewer results than requested.
12712// If unspecified, the server will pick an appropriate default.
12713func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12714	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12715	return c
12716}
12717
12718// PageToken sets the optional parameter "pageToken": A token
12719// identifying a page of results the server should return.
12720// Typically, this is the value
12721// of
12722// ListBidResponseErrorsResponse.nextPageToken
12723// returned from the previous call to the bidResponseErrors.list
12724// method.
12725func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12726	c.urlParams_.Set("pageToken", pageToken)
12727	return c
12728}
12729
12730// Fields allows partial responses to be retrieved. See
12731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12732// for more information.
12733func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12735	return c
12736}
12737
12738// IfNoneMatch sets the optional parameter which makes the operation
12739// fail if the object's ETag matches the given value. This is useful for
12740// getting updates only after the object has changed since the last
12741// request. Use googleapi.IsNotModified to check whether the response
12742// error from Do is the result of In-None-Match.
12743func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12744	c.ifNoneMatch_ = entityTag
12745	return c
12746}
12747
12748// Context sets the context to be used in this call's Do method. Any
12749// pending HTTP request will be aborted if the provided context is
12750// canceled.
12751func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponseErrorsListCall {
12752	c.ctx_ = ctx
12753	return c
12754}
12755
12756// Header returns an http.Header that can be modified by the caller to
12757// add HTTP headers to the request.
12758func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Header() http.Header {
12759	if c.header_ == nil {
12760		c.header_ = make(http.Header)
12761	}
12762	return c.header_
12763}
12764
12765func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) {
12766	reqHeaders := make(http.Header)
12767	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
12768	for k, v := range c.header_ {
12769		reqHeaders[k] = v
12770	}
12771	reqHeaders.Set("User-Agent", c.s.userAgent())
12772	if c.ifNoneMatch_ != "" {
12773		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12774	}
12775	var body io.Reader = nil
12776	c.urlParams_.Set("alt", alt)
12777	c.urlParams_.Set("prettyPrint", "false")
12778	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors")
12779	urls += "?" + c.urlParams_.Encode()
12780	req, err := http.NewRequest("GET", urls, body)
12781	if err != nil {
12782		return nil, err
12783	}
12784	req.Header = reqHeaders
12785	googleapi.Expand(req.URL, map[string]string{
12786		"filterSetName": c.filterSetName,
12787	})
12788	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12789}
12790
12791// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list" call.
12792// Exactly one of *ListBidResponseErrorsResponse or error will be
12793// non-nil. Any non-2xx status code is an error. Response headers are in
12794// either *ListBidResponseErrorsResponse.ServerResponse.Header or (if a
12795// response was returned at all) in error.(*googleapi.Error).Header. Use
12796// googleapi.IsNotModified to check whether the returned error was
12797// because http.StatusNotModified was returned.
12798func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) {
12799	gensupport.SetOptions(c.urlParams_, opts...)
12800	res, err := c.doRequest("json")
12801	if res != nil && res.StatusCode == http.StatusNotModified {
12802		if res.Body != nil {
12803			res.Body.Close()
12804		}
12805		return nil, &googleapi.Error{
12806			Code:   res.StatusCode,
12807			Header: res.Header,
12808		}
12809	}
12810	if err != nil {
12811		return nil, err
12812	}
12813	defer googleapi.CloseBody(res)
12814	if err := googleapi.CheckResponse(res); err != nil {
12815		return nil, err
12816	}
12817	ret := &ListBidResponseErrorsResponse{
12818		ServerResponse: googleapi.ServerResponse{
12819			Header:         res.Header,
12820			HTTPStatusCode: res.StatusCode,
12821		},
12822	}
12823	target := &ret
12824	if err := gensupport.DecodeResponse(target, res); err != nil {
12825		return nil, err
12826	}
12827	return ret, nil
12828	// {
12829	//   "description": "List all errors that occurred in bid responses, with the number of bid\nresponses affected for each reason.",
12830	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidResponseErrors",
12831	//   "httpMethod": "GET",
12832	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.bidResponseErrors.list",
12833	//   "parameterOrder": [
12834	//     "filterSetName"
12835	//   ],
12836	//   "parameters": {
12837	//     "filterSetName": {
12838	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
12839	//       "location": "path",
12840	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
12841	//       "required": true,
12842	//       "type": "string"
12843	//     },
12844	//     "pageSize": {
12845	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
12846	//       "format": "int32",
12847	//       "location": "query",
12848	//       "type": "integer"
12849	//     },
12850	//     "pageToken": {
12851	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponseErrorsResponse.nextPageToken\nreturned from the previous call to the bidResponseErrors.list\nmethod.",
12852	//       "location": "query",
12853	//       "type": "string"
12854	//     }
12855	//   },
12856	//   "path": "v2beta1/{+filterSetName}/bidResponseErrors",
12857	//   "response": {
12858	//     "$ref": "ListBidResponseErrorsResponse"
12859	//   },
12860	//   "scopes": [
12861	//     "https://www.googleapis.com/auth/adexchange.buyer"
12862	//   ]
12863	// }
12864
12865}
12866
12867// Pages invokes f for each page of results.
12868// A non-nil error returned from f will halt the iteration.
12869// The provided context supersedes any context provided to the Context method.
12870func (c *BiddersAccountsFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error {
12871	c.ctx_ = ctx
12872	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12873	for {
12874		x, err := c.Do()
12875		if err != nil {
12876			return err
12877		}
12878		if err := f(x); err != nil {
12879			return err
12880		}
12881		if x.NextPageToken == "" {
12882			return nil
12883		}
12884		c.PageToken(x.NextPageToken)
12885	}
12886}
12887
12888// method id "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list":
12889
12890type BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall struct {
12891	s             *Service
12892	filterSetName string
12893	urlParams_    gensupport.URLParams
12894	ifNoneMatch_  string
12895	ctx_          context.Context
12896	header_       http.Header
12897}
12898
12899// List: List all reasons for which bid responses were considered to
12900// have no
12901// applicable bids, with the number of bid responses affected for each
12902// reason.
12903func (r *BiddersAccountsFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
12904	c := &BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12905	c.filterSetName = filterSetName
12906	return c
12907}
12908
12909// PageSize sets the optional parameter "pageSize": Requested page size.
12910// The server may return fewer results than requested.
12911// If unspecified, the server will pick an appropriate default.
12912func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
12913	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12914	return c
12915}
12916
12917// PageToken sets the optional parameter "pageToken": A token
12918// identifying a page of results the server should return.
12919// Typically, this is the value
12920// of
12921// ListBidResponsesWithoutBidsResponse.nextPageToken
12922// returned from the previous call to the
12923// bidResponsesWithoutBids.list
12924// method.
12925func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
12926	c.urlParams_.Set("pageToken", pageToken)
12927	return c
12928}
12929
12930// Fields allows partial responses to be retrieved. See
12931// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12932// for more information.
12933func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
12934	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12935	return c
12936}
12937
12938// IfNoneMatch sets the optional parameter which makes the operation
12939// fail if the object's ETag matches the given value. This is useful for
12940// getting updates only after the object has changed since the last
12941// request. Use googleapi.IsNotModified to check whether the response
12942// error from Do is the result of In-None-Match.
12943func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
12944	c.ifNoneMatch_ = entityTag
12945	return c
12946}
12947
12948// Context sets the context to be used in this call's Do method. Any
12949// pending HTTP request will be aborted if the provided context is
12950// canceled.
12951func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall {
12952	c.ctx_ = ctx
12953	return c
12954}
12955
12956// Header returns an http.Header that can be modified by the caller to
12957// add HTTP headers to the request.
12958func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header {
12959	if c.header_ == nil {
12960		c.header_ = make(http.Header)
12961	}
12962	return c.header_
12963}
12964
12965func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) {
12966	reqHeaders := make(http.Header)
12967	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
12968	for k, v := range c.header_ {
12969		reqHeaders[k] = v
12970	}
12971	reqHeaders.Set("User-Agent", c.s.userAgent())
12972	if c.ifNoneMatch_ != "" {
12973		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12974	}
12975	var body io.Reader = nil
12976	c.urlParams_.Set("alt", alt)
12977	c.urlParams_.Set("prettyPrint", "false")
12978	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids")
12979	urls += "?" + c.urlParams_.Encode()
12980	req, err := http.NewRequest("GET", urls, body)
12981	if err != nil {
12982		return nil, err
12983	}
12984	req.Header = reqHeaders
12985	googleapi.Expand(req.URL, map[string]string{
12986		"filterSetName": c.filterSetName,
12987	})
12988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12989}
12990
12991// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list" call.
12992// Exactly one of *ListBidResponsesWithoutBidsResponse or error will be
12993// non-nil. Any non-2xx status code is an error. Response headers are in
12994// either *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or
12995// (if a response was returned at all) in
12996// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12997// whether the returned error was because http.StatusNotModified was
12998// returned.
12999func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) {
13000	gensupport.SetOptions(c.urlParams_, opts...)
13001	res, err := c.doRequest("json")
13002	if res != nil && res.StatusCode == http.StatusNotModified {
13003		if res.Body != nil {
13004			res.Body.Close()
13005		}
13006		return nil, &googleapi.Error{
13007			Code:   res.StatusCode,
13008			Header: res.Header,
13009		}
13010	}
13011	if err != nil {
13012		return nil, err
13013	}
13014	defer googleapi.CloseBody(res)
13015	if err := googleapi.CheckResponse(res); err != nil {
13016		return nil, err
13017	}
13018	ret := &ListBidResponsesWithoutBidsResponse{
13019		ServerResponse: googleapi.ServerResponse{
13020			Header:         res.Header,
13021			HTTPStatusCode: res.StatusCode,
13022		},
13023	}
13024	target := &ret
13025	if err := gensupport.DecodeResponse(target, res); err != nil {
13026		return nil, err
13027	}
13028	return ret, nil
13029	// {
13030	//   "description": "List all reasons for which bid responses were considered to have no\napplicable bids, with the number of bid responses affected for each reason.",
13031	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/bidResponsesWithoutBids",
13032	//   "httpMethod": "GET",
13033	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.bidResponsesWithoutBids.list",
13034	//   "parameterOrder": [
13035	//     "filterSetName"
13036	//   ],
13037	//   "parameters": {
13038	//     "filterSetName": {
13039	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13040	//       "location": "path",
13041	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13042	//       "required": true,
13043	//       "type": "string"
13044	//     },
13045	//     "pageSize": {
13046	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
13047	//       "format": "int32",
13048	//       "location": "query",
13049	//       "type": "integer"
13050	//     },
13051	//     "pageToken": {
13052	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponsesWithoutBidsResponse.nextPageToken\nreturned from the previous call to the bidResponsesWithoutBids.list\nmethod.",
13053	//       "location": "query",
13054	//       "type": "string"
13055	//     }
13056	//   },
13057	//   "path": "v2beta1/{+filterSetName}/bidResponsesWithoutBids",
13058	//   "response": {
13059	//     "$ref": "ListBidResponsesWithoutBidsResponse"
13060	//   },
13061	//   "scopes": [
13062	//     "https://www.googleapis.com/auth/adexchange.buyer"
13063	//   ]
13064	// }
13065
13066}
13067
13068// Pages invokes f for each page of results.
13069// A non-nil error returned from f will halt the iteration.
13070// The provided context supersedes any context provided to the Context method.
13071func (c *BiddersAccountsFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error {
13072	c.ctx_ = ctx
13073	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13074	for {
13075		x, err := c.Do()
13076		if err != nil {
13077			return err
13078		}
13079		if err := f(x); err != nil {
13080			return err
13081		}
13082		if x.NextPageToken == "" {
13083			return nil
13084		}
13085		c.PageToken(x.NextPageToken)
13086	}
13087}
13088
13089// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list":
13090
13091type BiddersAccountsFilterSetsFilteredBidRequestsListCall struct {
13092	s             *Service
13093	filterSetName string
13094	urlParams_    gensupport.URLParams
13095	ifNoneMatch_  string
13096	ctx_          context.Context
13097	header_       http.Header
13098}
13099
13100// List: List all reasons that caused a bid request not to be sent for
13101// an
13102// impression, with the number of bid requests not sent for each reason.
13103func (r *BiddersAccountsFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13104	c := &BiddersAccountsFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13105	c.filterSetName = filterSetName
13106	return c
13107}
13108
13109// PageSize sets the optional parameter "pageSize": Requested page size.
13110// The server may return fewer results than requested.
13111// If unspecified, the server will pick an appropriate default.
13112func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13113	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13114	return c
13115}
13116
13117// PageToken sets the optional parameter "pageToken": A token
13118// identifying a page of results the server should return.
13119// Typically, this is the value
13120// of
13121// ListFilteredBidRequestsResponse.nextPageToken
13122// returned from the previous call to the
13123// filteredBidRequests.list
13124// method.
13125func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13126	c.urlParams_.Set("pageToken", pageToken)
13127	return c
13128}
13129
13130// Fields allows partial responses to be retrieved. See
13131// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13132// for more information.
13133func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13134	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13135	return c
13136}
13137
13138// IfNoneMatch sets the optional parameter which makes the operation
13139// fail if the object's ETag matches the given value. This is useful for
13140// getting updates only after the object has changed since the last
13141// request. Use googleapi.IsNotModified to check whether the response
13142// error from Do is the result of In-None-Match.
13143func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13144	c.ifNoneMatch_ = entityTag
13145	return c
13146}
13147
13148// Context sets the context to be used in this call's Do method. Any
13149// pending HTTP request will be aborted if the provided context is
13150// canceled.
13151func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidRequestsListCall {
13152	c.ctx_ = ctx
13153	return c
13154}
13155
13156// Header returns an http.Header that can be modified by the caller to
13157// add HTTP headers to the request.
13158func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Header() http.Header {
13159	if c.header_ == nil {
13160		c.header_ = make(http.Header)
13161	}
13162	return c.header_
13163}
13164
13165func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) {
13166	reqHeaders := make(http.Header)
13167	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
13168	for k, v := range c.header_ {
13169		reqHeaders[k] = v
13170	}
13171	reqHeaders.Set("User-Agent", c.s.userAgent())
13172	if c.ifNoneMatch_ != "" {
13173		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13174	}
13175	var body io.Reader = nil
13176	c.urlParams_.Set("alt", alt)
13177	c.urlParams_.Set("prettyPrint", "false")
13178	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests")
13179	urls += "?" + c.urlParams_.Encode()
13180	req, err := http.NewRequest("GET", urls, body)
13181	if err != nil {
13182		return nil, err
13183	}
13184	req.Header = reqHeaders
13185	googleapi.Expand(req.URL, map[string]string{
13186		"filterSetName": c.filterSetName,
13187	})
13188	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13189}
13190
13191// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list" call.
13192// Exactly one of *ListFilteredBidRequestsResponse or error will be
13193// non-nil. Any non-2xx status code is an error. Response headers are in
13194// either *ListFilteredBidRequestsResponse.ServerResponse.Header or (if
13195// a response was returned at all) in error.(*googleapi.Error).Header.
13196// Use googleapi.IsNotModified to check whether the returned error was
13197// because http.StatusNotModified was returned.
13198func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) {
13199	gensupport.SetOptions(c.urlParams_, opts...)
13200	res, err := c.doRequest("json")
13201	if res != nil && res.StatusCode == http.StatusNotModified {
13202		if res.Body != nil {
13203			res.Body.Close()
13204		}
13205		return nil, &googleapi.Error{
13206			Code:   res.StatusCode,
13207			Header: res.Header,
13208		}
13209	}
13210	if err != nil {
13211		return nil, err
13212	}
13213	defer googleapi.CloseBody(res)
13214	if err := googleapi.CheckResponse(res); err != nil {
13215		return nil, err
13216	}
13217	ret := &ListFilteredBidRequestsResponse{
13218		ServerResponse: googleapi.ServerResponse{
13219			Header:         res.Header,
13220			HTTPStatusCode: res.StatusCode,
13221		},
13222	}
13223	target := &ret
13224	if err := gensupport.DecodeResponse(target, res); err != nil {
13225		return nil, err
13226	}
13227	return ret, nil
13228	// {
13229	//   "description": "List all reasons that caused a bid request not to be sent for an\nimpression, with the number of bid requests not sent for each reason.",
13230	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBidRequests",
13231	//   "httpMethod": "GET",
13232	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBidRequests.list",
13233	//   "parameterOrder": [
13234	//     "filterSetName"
13235	//   ],
13236	//   "parameters": {
13237	//     "filterSetName": {
13238	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13239	//       "location": "path",
13240	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13241	//       "required": true,
13242	//       "type": "string"
13243	//     },
13244	//     "pageSize": {
13245	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
13246	//       "format": "int32",
13247	//       "location": "query",
13248	//       "type": "integer"
13249	//     },
13250	//     "pageToken": {
13251	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidRequestsResponse.nextPageToken\nreturned from the previous call to the filteredBidRequests.list\nmethod.",
13252	//       "location": "query",
13253	//       "type": "string"
13254	//     }
13255	//   },
13256	//   "path": "v2beta1/{+filterSetName}/filteredBidRequests",
13257	//   "response": {
13258	//     "$ref": "ListFilteredBidRequestsResponse"
13259	//   },
13260	//   "scopes": [
13261	//     "https://www.googleapis.com/auth/adexchange.buyer"
13262	//   ]
13263	// }
13264
13265}
13266
13267// Pages invokes f for each page of results.
13268// A non-nil error returned from f will halt the iteration.
13269// The provided context supersedes any context provided to the Context method.
13270func (c *BiddersAccountsFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error {
13271	c.ctx_ = ctx
13272	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13273	for {
13274		x, err := c.Do()
13275		if err != nil {
13276			return err
13277		}
13278		if err := f(x); err != nil {
13279			return err
13280		}
13281		if x.NextPageToken == "" {
13282			return nil
13283		}
13284		c.PageToken(x.NextPageToken)
13285	}
13286}
13287
13288// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list":
13289
13290type BiddersAccountsFilterSetsFilteredBidsListCall struct {
13291	s             *Service
13292	filterSetName string
13293	urlParams_    gensupport.URLParams
13294	ifNoneMatch_  string
13295	ctx_          context.Context
13296	header_       http.Header
13297}
13298
13299// List: List all reasons for which bids were filtered, with the number
13300// of bids
13301// filtered for each reason.
13302func (r *BiddersAccountsFilterSetsFilteredBidsService) List(filterSetName string) *BiddersAccountsFilterSetsFilteredBidsListCall {
13303	c := &BiddersAccountsFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13304	c.filterSetName = filterSetName
13305	return c
13306}
13307
13308// PageSize sets the optional parameter "pageSize": Requested page size.
13309// The server may return fewer results than requested.
13310// If unspecified, the server will pick an appropriate default.
13311func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsListCall {
13312	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13313	return c
13314}
13315
13316// PageToken sets the optional parameter "pageToken": A token
13317// identifying a page of results the server should return.
13318// Typically, this is the value
13319// of
13320// ListFilteredBidsResponse.nextPageToken
13321// returned from the previous call to the filteredBids.list
13322// method.
13323func (c *BiddersAccountsFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsListCall {
13324	c.urlParams_.Set("pageToken", pageToken)
13325	return c
13326}
13327
13328// Fields allows partial responses to be retrieved. See
13329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13330// for more information.
13331func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsListCall {
13332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13333	return c
13334}
13335
13336// IfNoneMatch sets the optional parameter which makes the operation
13337// fail if the object's ETag matches the given value. This is useful for
13338// getting updates only after the object has changed since the last
13339// request. Use googleapi.IsNotModified to check whether the response
13340// error from Do is the result of In-None-Match.
13341func (c *BiddersAccountsFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsListCall {
13342	c.ifNoneMatch_ = entityTag
13343	return c
13344}
13345
13346// Context sets the context to be used in this call's Do method. Any
13347// pending HTTP request will be aborted if the provided context is
13348// canceled.
13349func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsListCall {
13350	c.ctx_ = ctx
13351	return c
13352}
13353
13354// Header returns an http.Header that can be modified by the caller to
13355// add HTTP headers to the request.
13356func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Header() http.Header {
13357	if c.header_ == nil {
13358		c.header_ = make(http.Header)
13359	}
13360	return c.header_
13361}
13362
13363func (c *BiddersAccountsFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) {
13364	reqHeaders := make(http.Header)
13365	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
13366	for k, v := range c.header_ {
13367		reqHeaders[k] = v
13368	}
13369	reqHeaders.Set("User-Agent", c.s.userAgent())
13370	if c.ifNoneMatch_ != "" {
13371		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13372	}
13373	var body io.Reader = nil
13374	c.urlParams_.Set("alt", alt)
13375	c.urlParams_.Set("prettyPrint", "false")
13376	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids")
13377	urls += "?" + c.urlParams_.Encode()
13378	req, err := http.NewRequest("GET", urls, body)
13379	if err != nil {
13380		return nil, err
13381	}
13382	req.Header = reqHeaders
13383	googleapi.Expand(req.URL, map[string]string{
13384		"filterSetName": c.filterSetName,
13385	})
13386	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13387}
13388
13389// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list" call.
13390// Exactly one of *ListFilteredBidsResponse or error will be non-nil.
13391// Any non-2xx status code is an error. Response headers are in either
13392// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was
13393// returned at all) in error.(*googleapi.Error).Header. Use
13394// googleapi.IsNotModified to check whether the returned error was
13395// because http.StatusNotModified was returned.
13396func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) {
13397	gensupport.SetOptions(c.urlParams_, opts...)
13398	res, err := c.doRequest("json")
13399	if res != nil && res.StatusCode == http.StatusNotModified {
13400		if res.Body != nil {
13401			res.Body.Close()
13402		}
13403		return nil, &googleapi.Error{
13404			Code:   res.StatusCode,
13405			Header: res.Header,
13406		}
13407	}
13408	if err != nil {
13409		return nil, err
13410	}
13411	defer googleapi.CloseBody(res)
13412	if err := googleapi.CheckResponse(res); err != nil {
13413		return nil, err
13414	}
13415	ret := &ListFilteredBidsResponse{
13416		ServerResponse: googleapi.ServerResponse{
13417			Header:         res.Header,
13418			HTTPStatusCode: res.StatusCode,
13419		},
13420	}
13421	target := &ret
13422	if err := gensupport.DecodeResponse(target, res); err != nil {
13423		return nil, err
13424	}
13425	return ret, nil
13426	// {
13427	//   "description": "List all reasons for which bids were filtered, with the number of bids\nfiltered for each reason.",
13428	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids",
13429	//   "httpMethod": "GET",
13430	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.list",
13431	//   "parameterOrder": [
13432	//     "filterSetName"
13433	//   ],
13434	//   "parameters": {
13435	//     "filterSetName": {
13436	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13437	//       "location": "path",
13438	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13439	//       "required": true,
13440	//       "type": "string"
13441	//     },
13442	//     "pageSize": {
13443	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
13444	//       "format": "int32",
13445	//       "location": "query",
13446	//       "type": "integer"
13447	//     },
13448	//     "pageToken": {
13449	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidsResponse.nextPageToken\nreturned from the previous call to the filteredBids.list\nmethod.",
13450	//       "location": "query",
13451	//       "type": "string"
13452	//     }
13453	//   },
13454	//   "path": "v2beta1/{+filterSetName}/filteredBids",
13455	//   "response": {
13456	//     "$ref": "ListFilteredBidsResponse"
13457	//   },
13458	//   "scopes": [
13459	//     "https://www.googleapis.com/auth/adexchange.buyer"
13460	//   ]
13461	// }
13462
13463}
13464
13465// Pages invokes f for each page of results.
13466// A non-nil error returned from f will halt the iteration.
13467// The provided context supersedes any context provided to the Context method.
13468func (c *BiddersAccountsFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error {
13469	c.ctx_ = ctx
13470	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13471	for {
13472		x, err := c.Do()
13473		if err != nil {
13474			return err
13475		}
13476		if err := f(x); err != nil {
13477			return err
13478		}
13479		if x.NextPageToken == "" {
13480			return nil
13481		}
13482		c.PageToken(x.NextPageToken)
13483	}
13484}
13485
13486// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list":
13487
13488type BiddersAccountsFilterSetsFilteredBidsCreativesListCall struct {
13489	s                *Service
13490	filterSetName    string
13491	creativeStatusId int64
13492	urlParams_       gensupport.URLParams
13493	ifNoneMatch_     string
13494	ctx_             context.Context
13495	header_          http.Header
13496}
13497
13498// List: List all creatives associated with a specific reason for which
13499// bids were
13500// filtered, with the number of bids filtered for each creative.
13501func (r *BiddersAccountsFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13502	c := &BiddersAccountsFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13503	c.filterSetName = filterSetName
13504	c.creativeStatusId = creativeStatusId
13505	return c
13506}
13507
13508// PageSize sets the optional parameter "pageSize": Requested page size.
13509// The server may return fewer results than requested.
13510// If unspecified, the server will pick an appropriate default.
13511func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13512	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13513	return c
13514}
13515
13516// PageToken sets the optional parameter "pageToken": A token
13517// identifying a page of results the server should return.
13518// Typically, this is the value
13519// of
13520// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken
13521// returne
13522// d from the previous call to the filteredBids.creatives.list
13523// method.
13524func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13525	c.urlParams_.Set("pageToken", pageToken)
13526	return c
13527}
13528
13529// Fields allows partial responses to be retrieved. See
13530// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13531// for more information.
13532func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13533	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13534	return c
13535}
13536
13537// IfNoneMatch sets the optional parameter which makes the operation
13538// fail if the object's ETag matches the given value. This is useful for
13539// getting updates only after the object has changed since the last
13540// request. Use googleapi.IsNotModified to check whether the response
13541// error from Do is the result of In-None-Match.
13542func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13543	c.ifNoneMatch_ = entityTag
13544	return c
13545}
13546
13547// Context sets the context to be used in this call's Do method. Any
13548// pending HTTP request will be aborted if the provided context is
13549// canceled.
13550func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsCreativesListCall {
13551	c.ctx_ = ctx
13552	return c
13553}
13554
13555// Header returns an http.Header that can be modified by the caller to
13556// add HTTP headers to the request.
13557func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Header() http.Header {
13558	if c.header_ == nil {
13559		c.header_ = make(http.Header)
13560	}
13561	return c.header_
13562}
13563
13564func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) {
13565	reqHeaders := make(http.Header)
13566	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
13567	for k, v := range c.header_ {
13568		reqHeaders[k] = v
13569	}
13570	reqHeaders.Set("User-Agent", c.s.userAgent())
13571	if c.ifNoneMatch_ != "" {
13572		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13573	}
13574	var body io.Reader = nil
13575	c.urlParams_.Set("alt", alt)
13576	c.urlParams_.Set("prettyPrint", "false")
13577	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives")
13578	urls += "?" + c.urlParams_.Encode()
13579	req, err := http.NewRequest("GET", urls, body)
13580	if err != nil {
13581		return nil, err
13582	}
13583	req.Header = reqHeaders
13584	googleapi.Expand(req.URL, map[string]string{
13585		"filterSetName":    c.filterSetName,
13586		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
13587	})
13588	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13589}
13590
13591// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list" call.
13592// Exactly one of *ListCreativeStatusBreakdownByCreativeResponse or
13593// error will be non-nil. Any non-2xx status code is an error. Response
13594// headers are in either
13595// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header
13596// or (if a response was returned at all) in
13597// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13598// whether the returned error was because http.StatusNotModified was
13599// returned.
13600func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) {
13601	gensupport.SetOptions(c.urlParams_, opts...)
13602	res, err := c.doRequest("json")
13603	if res != nil && res.StatusCode == http.StatusNotModified {
13604		if res.Body != nil {
13605			res.Body.Close()
13606		}
13607		return nil, &googleapi.Error{
13608			Code:   res.StatusCode,
13609			Header: res.Header,
13610		}
13611	}
13612	if err != nil {
13613		return nil, err
13614	}
13615	defer googleapi.CloseBody(res)
13616	if err := googleapi.CheckResponse(res); err != nil {
13617		return nil, err
13618	}
13619	ret := &ListCreativeStatusBreakdownByCreativeResponse{
13620		ServerResponse: googleapi.ServerResponse{
13621			Header:         res.Header,
13622			HTTPStatusCode: res.StatusCode,
13623		},
13624	}
13625	target := &ret
13626	if err := gensupport.DecodeResponse(target, res); err != nil {
13627		return nil, err
13628	}
13629	return ret, nil
13630	// {
13631	//   "description": "List all creatives associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each creative.",
13632	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/creatives",
13633	//   "httpMethod": "GET",
13634	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.creatives.list",
13635	//   "parameterOrder": [
13636	//     "filterSetName",
13637	//     "creativeStatusId"
13638	//   ],
13639	//   "parameters": {
13640	//     "creativeStatusId": {
13641	//       "description": "The ID of the creative status for which to retrieve a breakdown by\ncreative.\nSee\n[creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).",
13642	//       "format": "int32",
13643	//       "location": "path",
13644	//       "required": true,
13645	//       "type": "integer"
13646	//     },
13647	//     "filterSetName": {
13648	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13649	//       "location": "path",
13650	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13651	//       "required": true,
13652	//       "type": "string"
13653	//     },
13654	//     "pageSize": {
13655	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
13656	//       "format": "int32",
13657	//       "location": "query",
13658	//       "type": "integer"
13659	//     },
13660	//     "pageToken": {
13661	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByCreativeResponse.nextPageToken\nreturned from the previous call to the filteredBids.creatives.list\nmethod.",
13662	//       "location": "query",
13663	//       "type": "string"
13664	//     }
13665	//   },
13666	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives",
13667	//   "response": {
13668	//     "$ref": "ListCreativeStatusBreakdownByCreativeResponse"
13669	//   },
13670	//   "scopes": [
13671	//     "https://www.googleapis.com/auth/adexchange.buyer"
13672	//   ]
13673	// }
13674
13675}
13676
13677// Pages invokes f for each page of results.
13678// A non-nil error returned from f will halt the iteration.
13679// The provided context supersedes any context provided to the Context method.
13680func (c *BiddersAccountsFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error {
13681	c.ctx_ = ctx
13682	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13683	for {
13684		x, err := c.Do()
13685		if err != nil {
13686			return err
13687		}
13688		if err := f(x); err != nil {
13689			return err
13690		}
13691		if x.NextPageToken == "" {
13692			return nil
13693		}
13694		c.PageToken(x.NextPageToken)
13695	}
13696}
13697
13698// method id "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list":
13699
13700type BiddersAccountsFilterSetsFilteredBidsDetailsListCall struct {
13701	s                *Service
13702	filterSetName    string
13703	creativeStatusId int64
13704	urlParams_       gensupport.URLParams
13705	ifNoneMatch_     string
13706	ctx_             context.Context
13707	header_          http.Header
13708}
13709
13710// List: List all details associated with a specific reason for which
13711// bids were
13712// filtered, with the number of bids filtered for each detail.
13713func (r *BiddersAccountsFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13714	c := &BiddersAccountsFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13715	c.filterSetName = filterSetName
13716	c.creativeStatusId = creativeStatusId
13717	return c
13718}
13719
13720// PageSize sets the optional parameter "pageSize": Requested page size.
13721// The server may return fewer results than requested.
13722// If unspecified, the server will pick an appropriate default.
13723func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13724	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13725	return c
13726}
13727
13728// PageToken sets the optional parameter "pageToken": A token
13729// identifying a page of results the server should return.
13730// Typically, this is the value
13731// of
13732// ListCreativeStatusBreakdownByDetailResponse.nextPageToken
13733// returned from the previous call to the
13734// filteredBids.details.list
13735// method.
13736func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13737	c.urlParams_.Set("pageToken", pageToken)
13738	return c
13739}
13740
13741// Fields allows partial responses to be retrieved. See
13742// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13743// for more information.
13744func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13745	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13746	return c
13747}
13748
13749// IfNoneMatch sets the optional parameter which makes the operation
13750// fail if the object's ETag matches the given value. This is useful for
13751// getting updates only after the object has changed since the last
13752// request. Use googleapi.IsNotModified to check whether the response
13753// error from Do is the result of In-None-Match.
13754func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13755	c.ifNoneMatch_ = entityTag
13756	return c
13757}
13758
13759// Context sets the context to be used in this call's Do method. Any
13760// pending HTTP request will be aborted if the provided context is
13761// canceled.
13762func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsFilteredBidsDetailsListCall {
13763	c.ctx_ = ctx
13764	return c
13765}
13766
13767// Header returns an http.Header that can be modified by the caller to
13768// add HTTP headers to the request.
13769func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Header() http.Header {
13770	if c.header_ == nil {
13771		c.header_ = make(http.Header)
13772	}
13773	return c.header_
13774}
13775
13776func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) {
13777	reqHeaders := make(http.Header)
13778	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
13779	for k, v := range c.header_ {
13780		reqHeaders[k] = v
13781	}
13782	reqHeaders.Set("User-Agent", c.s.userAgent())
13783	if c.ifNoneMatch_ != "" {
13784		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13785	}
13786	var body io.Reader = nil
13787	c.urlParams_.Set("alt", alt)
13788	c.urlParams_.Set("prettyPrint", "false")
13789	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details")
13790	urls += "?" + c.urlParams_.Encode()
13791	req, err := http.NewRequest("GET", urls, body)
13792	if err != nil {
13793		return nil, err
13794	}
13795	req.Header = reqHeaders
13796	googleapi.Expand(req.URL, map[string]string{
13797		"filterSetName":    c.filterSetName,
13798		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
13799	})
13800	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13801}
13802
13803// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list" call.
13804// Exactly one of *ListCreativeStatusBreakdownByDetailResponse or error
13805// will be non-nil. Any non-2xx status code is an error. Response
13806// headers are in either
13807// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or
13808// (if a response was returned at all) in
13809// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
13810// whether the returned error was because http.StatusNotModified was
13811// returned.
13812func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) {
13813	gensupport.SetOptions(c.urlParams_, opts...)
13814	res, err := c.doRequest("json")
13815	if res != nil && res.StatusCode == http.StatusNotModified {
13816		if res.Body != nil {
13817			res.Body.Close()
13818		}
13819		return nil, &googleapi.Error{
13820			Code:   res.StatusCode,
13821			Header: res.Header,
13822		}
13823	}
13824	if err != nil {
13825		return nil, err
13826	}
13827	defer googleapi.CloseBody(res)
13828	if err := googleapi.CheckResponse(res); err != nil {
13829		return nil, err
13830	}
13831	ret := &ListCreativeStatusBreakdownByDetailResponse{
13832		ServerResponse: googleapi.ServerResponse{
13833			Header:         res.Header,
13834			HTTPStatusCode: res.StatusCode,
13835		},
13836	}
13837	target := &ret
13838	if err := gensupport.DecodeResponse(target, res); err != nil {
13839		return nil, err
13840	}
13841	return ret, nil
13842	// {
13843	//   "description": "List all details associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each detail.",
13844	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/details",
13845	//   "httpMethod": "GET",
13846	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.filteredBids.details.list",
13847	//   "parameterOrder": [
13848	//     "filterSetName",
13849	//     "creativeStatusId"
13850	//   ],
13851	//   "parameters": {
13852	//     "creativeStatusId": {
13853	//       "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.",
13854	//       "format": "int32",
13855	//       "location": "path",
13856	//       "required": true,
13857	//       "type": "integer"
13858	//     },
13859	//     "filterSetName": {
13860	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
13861	//       "location": "path",
13862	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
13863	//       "required": true,
13864	//       "type": "string"
13865	//     },
13866	//     "pageSize": {
13867	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
13868	//       "format": "int32",
13869	//       "location": "query",
13870	//       "type": "integer"
13871	//     },
13872	//     "pageToken": {
13873	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByDetailResponse.nextPageToken\nreturned from the previous call to the filteredBids.details.list\nmethod.",
13874	//       "location": "query",
13875	//       "type": "string"
13876	//     }
13877	//   },
13878	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details",
13879	//   "response": {
13880	//     "$ref": "ListCreativeStatusBreakdownByDetailResponse"
13881	//   },
13882	//   "scopes": [
13883	//     "https://www.googleapis.com/auth/adexchange.buyer"
13884	//   ]
13885	// }
13886
13887}
13888
13889// Pages invokes f for each page of results.
13890// A non-nil error returned from f will halt the iteration.
13891// The provided context supersedes any context provided to the Context method.
13892func (c *BiddersAccountsFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error {
13893	c.ctx_ = ctx
13894	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13895	for {
13896		x, err := c.Do()
13897		if err != nil {
13898			return err
13899		}
13900		if err := f(x); err != nil {
13901			return err
13902		}
13903		if x.NextPageToken == "" {
13904			return nil
13905		}
13906		c.PageToken(x.NextPageToken)
13907	}
13908}
13909
13910// method id "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list":
13911
13912type BiddersAccountsFilterSetsImpressionMetricsListCall struct {
13913	s             *Service
13914	filterSetName string
13915	urlParams_    gensupport.URLParams
13916	ifNoneMatch_  string
13917	ctx_          context.Context
13918	header_       http.Header
13919}
13920
13921// List: Lists all metrics that are measured in terms of number of
13922// impressions.
13923func (r *BiddersAccountsFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersAccountsFilterSetsImpressionMetricsListCall {
13924	c := &BiddersAccountsFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13925	c.filterSetName = filterSetName
13926	return c
13927}
13928
13929// PageSize sets the optional parameter "pageSize": Requested page size.
13930// The server may return fewer results than requested.
13931// If unspecified, the server will pick an appropriate default.
13932func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsImpressionMetricsListCall {
13933	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13934	return c
13935}
13936
13937// PageToken sets the optional parameter "pageToken": A token
13938// identifying a page of results the server should return.
13939// Typically, this is the value
13940// of
13941// ListImpressionMetricsResponse.nextPageToken
13942// returned from the previous call to the impressionMetrics.list
13943// method.
13944func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsImpressionMetricsListCall {
13945	c.urlParams_.Set("pageToken", pageToken)
13946	return c
13947}
13948
13949// Fields allows partial responses to be retrieved. See
13950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13951// for more information.
13952func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsImpressionMetricsListCall {
13953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13954	return c
13955}
13956
13957// IfNoneMatch sets the optional parameter which makes the operation
13958// fail if the object's ETag matches the given value. This is useful for
13959// getting updates only after the object has changed since the last
13960// request. Use googleapi.IsNotModified to check whether the response
13961// error from Do is the result of In-None-Match.
13962func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsImpressionMetricsListCall {
13963	c.ifNoneMatch_ = entityTag
13964	return c
13965}
13966
13967// Context sets the context to be used in this call's Do method. Any
13968// pending HTTP request will be aborted if the provided context is
13969// canceled.
13970func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsImpressionMetricsListCall {
13971	c.ctx_ = ctx
13972	return c
13973}
13974
13975// Header returns an http.Header that can be modified by the caller to
13976// add HTTP headers to the request.
13977func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Header() http.Header {
13978	if c.header_ == nil {
13979		c.header_ = make(http.Header)
13980	}
13981	return c.header_
13982}
13983
13984func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) {
13985	reqHeaders := make(http.Header)
13986	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
13987	for k, v := range c.header_ {
13988		reqHeaders[k] = v
13989	}
13990	reqHeaders.Set("User-Agent", c.s.userAgent())
13991	if c.ifNoneMatch_ != "" {
13992		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13993	}
13994	var body io.Reader = nil
13995	c.urlParams_.Set("alt", alt)
13996	c.urlParams_.Set("prettyPrint", "false")
13997	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics")
13998	urls += "?" + c.urlParams_.Encode()
13999	req, err := http.NewRequest("GET", urls, body)
14000	if err != nil {
14001		return nil, err
14002	}
14003	req.Header = reqHeaders
14004	googleapi.Expand(req.URL, map[string]string{
14005		"filterSetName": c.filterSetName,
14006	})
14007	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14008}
14009
14010// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list" call.
14011// Exactly one of *ListImpressionMetricsResponse or error will be
14012// non-nil. Any non-2xx status code is an error. Response headers are in
14013// either *ListImpressionMetricsResponse.ServerResponse.Header or (if a
14014// response was returned at all) in error.(*googleapi.Error).Header. Use
14015// googleapi.IsNotModified to check whether the returned error was
14016// because http.StatusNotModified was returned.
14017func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) {
14018	gensupport.SetOptions(c.urlParams_, opts...)
14019	res, err := c.doRequest("json")
14020	if res != nil && res.StatusCode == http.StatusNotModified {
14021		if res.Body != nil {
14022			res.Body.Close()
14023		}
14024		return nil, &googleapi.Error{
14025			Code:   res.StatusCode,
14026			Header: res.Header,
14027		}
14028	}
14029	if err != nil {
14030		return nil, err
14031	}
14032	defer googleapi.CloseBody(res)
14033	if err := googleapi.CheckResponse(res); err != nil {
14034		return nil, err
14035	}
14036	ret := &ListImpressionMetricsResponse{
14037		ServerResponse: googleapi.ServerResponse{
14038			Header:         res.Header,
14039			HTTPStatusCode: res.StatusCode,
14040		},
14041	}
14042	target := &ret
14043	if err := gensupport.DecodeResponse(target, res); err != nil {
14044		return nil, err
14045	}
14046	return ret, nil
14047	// {
14048	//   "description": "Lists all metrics that are measured in terms of number of impressions.",
14049	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/impressionMetrics",
14050	//   "httpMethod": "GET",
14051	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.impressionMetrics.list",
14052	//   "parameterOrder": [
14053	//     "filterSetName"
14054	//   ],
14055	//   "parameters": {
14056	//     "filterSetName": {
14057	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14058	//       "location": "path",
14059	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14060	//       "required": true,
14061	//       "type": "string"
14062	//     },
14063	//     "pageSize": {
14064	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
14065	//       "format": "int32",
14066	//       "location": "query",
14067	//       "type": "integer"
14068	//     },
14069	//     "pageToken": {
14070	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListImpressionMetricsResponse.nextPageToken\nreturned from the previous call to the impressionMetrics.list\nmethod.",
14071	//       "location": "query",
14072	//       "type": "string"
14073	//     }
14074	//   },
14075	//   "path": "v2beta1/{+filterSetName}/impressionMetrics",
14076	//   "response": {
14077	//     "$ref": "ListImpressionMetricsResponse"
14078	//   },
14079	//   "scopes": [
14080	//     "https://www.googleapis.com/auth/adexchange.buyer"
14081	//   ]
14082	// }
14083
14084}
14085
14086// Pages invokes f for each page of results.
14087// A non-nil error returned from f will halt the iteration.
14088// The provided context supersedes any context provided to the Context method.
14089func (c *BiddersAccountsFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error {
14090	c.ctx_ = ctx
14091	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14092	for {
14093		x, err := c.Do()
14094		if err != nil {
14095			return err
14096		}
14097		if err := f(x); err != nil {
14098			return err
14099		}
14100		if x.NextPageToken == "" {
14101			return nil
14102		}
14103		c.PageToken(x.NextPageToken)
14104	}
14105}
14106
14107// method id "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list":
14108
14109type BiddersAccountsFilterSetsLosingBidsListCall struct {
14110	s             *Service
14111	filterSetName string
14112	urlParams_    gensupport.URLParams
14113	ifNoneMatch_  string
14114	ctx_          context.Context
14115	header_       http.Header
14116}
14117
14118// List: List all reasons for which bids lost in the auction, with the
14119// number of
14120// bids that lost for each reason.
14121func (r *BiddersAccountsFilterSetsLosingBidsService) List(filterSetName string) *BiddersAccountsFilterSetsLosingBidsListCall {
14122	c := &BiddersAccountsFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14123	c.filterSetName = filterSetName
14124	return c
14125}
14126
14127// PageSize sets the optional parameter "pageSize": Requested page size.
14128// The server may return fewer results than requested.
14129// If unspecified, the server will pick an appropriate default.
14130func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsLosingBidsListCall {
14131	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14132	return c
14133}
14134
14135// PageToken sets the optional parameter "pageToken": A token
14136// identifying a page of results the server should return.
14137// Typically, this is the value
14138// of
14139// ListLosingBidsResponse.nextPageToken
14140// returned from the previous call to the losingBids.list
14141// method.
14142func (c *BiddersAccountsFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsLosingBidsListCall {
14143	c.urlParams_.Set("pageToken", pageToken)
14144	return c
14145}
14146
14147// Fields allows partial responses to be retrieved. See
14148// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14149// for more information.
14150func (c *BiddersAccountsFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsLosingBidsListCall {
14151	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14152	return c
14153}
14154
14155// IfNoneMatch sets the optional parameter which makes the operation
14156// fail if the object's ETag matches the given value. This is useful for
14157// getting updates only after the object has changed since the last
14158// request. Use googleapi.IsNotModified to check whether the response
14159// error from Do is the result of In-None-Match.
14160func (c *BiddersAccountsFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsLosingBidsListCall {
14161	c.ifNoneMatch_ = entityTag
14162	return c
14163}
14164
14165// Context sets the context to be used in this call's Do method. Any
14166// pending HTTP request will be aborted if the provided context is
14167// canceled.
14168func (c *BiddersAccountsFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsLosingBidsListCall {
14169	c.ctx_ = ctx
14170	return c
14171}
14172
14173// Header returns an http.Header that can be modified by the caller to
14174// add HTTP headers to the request.
14175func (c *BiddersAccountsFilterSetsLosingBidsListCall) Header() http.Header {
14176	if c.header_ == nil {
14177		c.header_ = make(http.Header)
14178	}
14179	return c.header_
14180}
14181
14182func (c *BiddersAccountsFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) {
14183	reqHeaders := make(http.Header)
14184	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
14185	for k, v := range c.header_ {
14186		reqHeaders[k] = v
14187	}
14188	reqHeaders.Set("User-Agent", c.s.userAgent())
14189	if c.ifNoneMatch_ != "" {
14190		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14191	}
14192	var body io.Reader = nil
14193	c.urlParams_.Set("alt", alt)
14194	c.urlParams_.Set("prettyPrint", "false")
14195	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids")
14196	urls += "?" + c.urlParams_.Encode()
14197	req, err := http.NewRequest("GET", urls, body)
14198	if err != nil {
14199		return nil, err
14200	}
14201	req.Header = reqHeaders
14202	googleapi.Expand(req.URL, map[string]string{
14203		"filterSetName": c.filterSetName,
14204	})
14205	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14206}
14207
14208// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list" call.
14209// Exactly one of *ListLosingBidsResponse or error will be non-nil. Any
14210// non-2xx status code is an error. Response headers are in either
14211// *ListLosingBidsResponse.ServerResponse.Header or (if a response was
14212// returned at all) in error.(*googleapi.Error).Header. Use
14213// googleapi.IsNotModified to check whether the returned error was
14214// because http.StatusNotModified was returned.
14215func (c *BiddersAccountsFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) {
14216	gensupport.SetOptions(c.urlParams_, opts...)
14217	res, err := c.doRequest("json")
14218	if res != nil && res.StatusCode == http.StatusNotModified {
14219		if res.Body != nil {
14220			res.Body.Close()
14221		}
14222		return nil, &googleapi.Error{
14223			Code:   res.StatusCode,
14224			Header: res.Header,
14225		}
14226	}
14227	if err != nil {
14228		return nil, err
14229	}
14230	defer googleapi.CloseBody(res)
14231	if err := googleapi.CheckResponse(res); err != nil {
14232		return nil, err
14233	}
14234	ret := &ListLosingBidsResponse{
14235		ServerResponse: googleapi.ServerResponse{
14236			Header:         res.Header,
14237			HTTPStatusCode: res.StatusCode,
14238		},
14239	}
14240	target := &ret
14241	if err := gensupport.DecodeResponse(target, res); err != nil {
14242		return nil, err
14243	}
14244	return ret, nil
14245	// {
14246	//   "description": "List all reasons for which bids lost in the auction, with the number of\nbids that lost for each reason.",
14247	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/losingBids",
14248	//   "httpMethod": "GET",
14249	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.losingBids.list",
14250	//   "parameterOrder": [
14251	//     "filterSetName"
14252	//   ],
14253	//   "parameters": {
14254	//     "filterSetName": {
14255	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14256	//       "location": "path",
14257	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14258	//       "required": true,
14259	//       "type": "string"
14260	//     },
14261	//     "pageSize": {
14262	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
14263	//       "format": "int32",
14264	//       "location": "query",
14265	//       "type": "integer"
14266	//     },
14267	//     "pageToken": {
14268	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListLosingBidsResponse.nextPageToken\nreturned from the previous call to the losingBids.list\nmethod.",
14269	//       "location": "query",
14270	//       "type": "string"
14271	//     }
14272	//   },
14273	//   "path": "v2beta1/{+filterSetName}/losingBids",
14274	//   "response": {
14275	//     "$ref": "ListLosingBidsResponse"
14276	//   },
14277	//   "scopes": [
14278	//     "https://www.googleapis.com/auth/adexchange.buyer"
14279	//   ]
14280	// }
14281
14282}
14283
14284// Pages invokes f for each page of results.
14285// A non-nil error returned from f will halt the iteration.
14286// The provided context supersedes any context provided to the Context method.
14287func (c *BiddersAccountsFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error {
14288	c.ctx_ = ctx
14289	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14290	for {
14291		x, err := c.Do()
14292		if err != nil {
14293			return err
14294		}
14295		if err := f(x); err != nil {
14296			return err
14297		}
14298		if x.NextPageToken == "" {
14299			return nil
14300		}
14301		c.PageToken(x.NextPageToken)
14302	}
14303}
14304
14305// method id "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list":
14306
14307type BiddersAccountsFilterSetsNonBillableWinningBidsListCall struct {
14308	s             *Service
14309	filterSetName string
14310	urlParams_    gensupport.URLParams
14311	ifNoneMatch_  string
14312	ctx_          context.Context
14313	header_       http.Header
14314}
14315
14316// List: List all reasons for which winning bids were not billable, with
14317// the number
14318// of bids not billed for each reason.
14319func (r *BiddersAccountsFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14320	c := &BiddersAccountsFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14321	c.filterSetName = filterSetName
14322	return c
14323}
14324
14325// PageSize sets the optional parameter "pageSize": Requested page size.
14326// The server may return fewer results than requested.
14327// If unspecified, the server will pick an appropriate default.
14328func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14329	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14330	return c
14331}
14332
14333// PageToken sets the optional parameter "pageToken": A token
14334// identifying a page of results the server should return.
14335// Typically, this is the value
14336// of
14337// ListNonBillableWinningBidsResponse.nextPageToken
14338// returned from the previous call to the
14339// nonBillableWinningBids.list
14340// method.
14341func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14342	c.urlParams_.Set("pageToken", pageToken)
14343	return c
14344}
14345
14346// Fields allows partial responses to be retrieved. See
14347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14348// for more information.
14349func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14351	return c
14352}
14353
14354// IfNoneMatch sets the optional parameter which makes the operation
14355// fail if the object's ETag matches the given value. This is useful for
14356// getting updates only after the object has changed since the last
14357// request. Use googleapi.IsNotModified to check whether the response
14358// error from Do is the result of In-None-Match.
14359func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14360	c.ifNoneMatch_ = entityTag
14361	return c
14362}
14363
14364// Context sets the context to be used in this call's Do method. Any
14365// pending HTTP request will be aborted if the provided context is
14366// canceled.
14367func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersAccountsFilterSetsNonBillableWinningBidsListCall {
14368	c.ctx_ = ctx
14369	return c
14370}
14371
14372// Header returns an http.Header that can be modified by the caller to
14373// add HTTP headers to the request.
14374func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Header() http.Header {
14375	if c.header_ == nil {
14376		c.header_ = make(http.Header)
14377	}
14378	return c.header_
14379}
14380
14381func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) {
14382	reqHeaders := make(http.Header)
14383	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
14384	for k, v := range c.header_ {
14385		reqHeaders[k] = v
14386	}
14387	reqHeaders.Set("User-Agent", c.s.userAgent())
14388	if c.ifNoneMatch_ != "" {
14389		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14390	}
14391	var body io.Reader = nil
14392	c.urlParams_.Set("alt", alt)
14393	c.urlParams_.Set("prettyPrint", "false")
14394	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids")
14395	urls += "?" + c.urlParams_.Encode()
14396	req, err := http.NewRequest("GET", urls, body)
14397	if err != nil {
14398		return nil, err
14399	}
14400	req.Header = reqHeaders
14401	googleapi.Expand(req.URL, map[string]string{
14402		"filterSetName": c.filterSetName,
14403	})
14404	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14405}
14406
14407// Do executes the "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list" call.
14408// Exactly one of *ListNonBillableWinningBidsResponse or error will be
14409// non-nil. Any non-2xx status code is an error. Response headers are in
14410// either *ListNonBillableWinningBidsResponse.ServerResponse.Header or
14411// (if a response was returned at all) in
14412// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
14413// whether the returned error was because http.StatusNotModified was
14414// returned.
14415func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) {
14416	gensupport.SetOptions(c.urlParams_, opts...)
14417	res, err := c.doRequest("json")
14418	if res != nil && res.StatusCode == http.StatusNotModified {
14419		if res.Body != nil {
14420			res.Body.Close()
14421		}
14422		return nil, &googleapi.Error{
14423			Code:   res.StatusCode,
14424			Header: res.Header,
14425		}
14426	}
14427	if err != nil {
14428		return nil, err
14429	}
14430	defer googleapi.CloseBody(res)
14431	if err := googleapi.CheckResponse(res); err != nil {
14432		return nil, err
14433	}
14434	ret := &ListNonBillableWinningBidsResponse{
14435		ServerResponse: googleapi.ServerResponse{
14436			Header:         res.Header,
14437			HTTPStatusCode: res.StatusCode,
14438		},
14439	}
14440	target := &ret
14441	if err := gensupport.DecodeResponse(target, res); err != nil {
14442		return nil, err
14443	}
14444	return ret, nil
14445	// {
14446	//   "description": "List all reasons for which winning bids were not billable, with the number\nof bids not billed for each reason.",
14447	//   "flatPath": "v2beta1/bidders/{biddersId}/accounts/{accountsId}/filterSets/{filterSetsId}/nonBillableWinningBids",
14448	//   "httpMethod": "GET",
14449	//   "id": "adexchangebuyer2.bidders.accounts.filterSets.nonBillableWinningBids.list",
14450	//   "parameterOrder": [
14451	//     "filterSetName"
14452	//   ],
14453	//   "parameters": {
14454	//     "filterSetName": {
14455	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14456	//       "location": "path",
14457	//       "pattern": "^bidders/[^/]+/accounts/[^/]+/filterSets/[^/]+$",
14458	//       "required": true,
14459	//       "type": "string"
14460	//     },
14461	//     "pageSize": {
14462	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
14463	//       "format": "int32",
14464	//       "location": "query",
14465	//       "type": "integer"
14466	//     },
14467	//     "pageToken": {
14468	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListNonBillableWinningBidsResponse.nextPageToken\nreturned from the previous call to the nonBillableWinningBids.list\nmethod.",
14469	//       "location": "query",
14470	//       "type": "string"
14471	//     }
14472	//   },
14473	//   "path": "v2beta1/{+filterSetName}/nonBillableWinningBids",
14474	//   "response": {
14475	//     "$ref": "ListNonBillableWinningBidsResponse"
14476	//   },
14477	//   "scopes": [
14478	//     "https://www.googleapis.com/auth/adexchange.buyer"
14479	//   ]
14480	// }
14481
14482}
14483
14484// Pages invokes f for each page of results.
14485// A non-nil error returned from f will halt the iteration.
14486// The provided context supersedes any context provided to the Context method.
14487func (c *BiddersAccountsFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error {
14488	c.ctx_ = ctx
14489	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14490	for {
14491		x, err := c.Do()
14492		if err != nil {
14493			return err
14494		}
14495		if err := f(x); err != nil {
14496			return err
14497		}
14498		if x.NextPageToken == "" {
14499			return nil
14500		}
14501		c.PageToken(x.NextPageToken)
14502	}
14503}
14504
14505// method id "adexchangebuyer2.bidders.filterSets.create":
14506
14507type BiddersFilterSetsCreateCall struct {
14508	s          *Service
14509	ownerName  string
14510	filterset  *FilterSet
14511	urlParams_ gensupport.URLParams
14512	ctx_       context.Context
14513	header_    http.Header
14514}
14515
14516// Create: Creates the specified filter set for the account with the
14517// given account ID.
14518func (r *BiddersFilterSetsService) Create(ownerName string, filterset *FilterSet) *BiddersFilterSetsCreateCall {
14519	c := &BiddersFilterSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14520	c.ownerName = ownerName
14521	c.filterset = filterset
14522	return c
14523}
14524
14525// IsTransient sets the optional parameter "isTransient": Whether the
14526// filter set is transient, or should be persisted indefinitely.
14527// By default, filter sets are not transient.
14528// If transient, it will be available for at least 1 hour after
14529// creation.
14530func (c *BiddersFilterSetsCreateCall) IsTransient(isTransient bool) *BiddersFilterSetsCreateCall {
14531	c.urlParams_.Set("isTransient", fmt.Sprint(isTransient))
14532	return c
14533}
14534
14535// Fields allows partial responses to be retrieved. See
14536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14537// for more information.
14538func (c *BiddersFilterSetsCreateCall) Fields(s ...googleapi.Field) *BiddersFilterSetsCreateCall {
14539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14540	return c
14541}
14542
14543// Context sets the context to be used in this call's Do method. Any
14544// pending HTTP request will be aborted if the provided context is
14545// canceled.
14546func (c *BiddersFilterSetsCreateCall) Context(ctx context.Context) *BiddersFilterSetsCreateCall {
14547	c.ctx_ = ctx
14548	return c
14549}
14550
14551// Header returns an http.Header that can be modified by the caller to
14552// add HTTP headers to the request.
14553func (c *BiddersFilterSetsCreateCall) Header() http.Header {
14554	if c.header_ == nil {
14555		c.header_ = make(http.Header)
14556	}
14557	return c.header_
14558}
14559
14560func (c *BiddersFilterSetsCreateCall) doRequest(alt string) (*http.Response, error) {
14561	reqHeaders := make(http.Header)
14562	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
14563	for k, v := range c.header_ {
14564		reqHeaders[k] = v
14565	}
14566	reqHeaders.Set("User-Agent", c.s.userAgent())
14567	var body io.Reader = nil
14568	body, err := googleapi.WithoutDataWrapper.JSONReader(c.filterset)
14569	if err != nil {
14570		return nil, err
14571	}
14572	reqHeaders.Set("Content-Type", "application/json")
14573	c.urlParams_.Set("alt", alt)
14574	c.urlParams_.Set("prettyPrint", "false")
14575	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
14576	urls += "?" + c.urlParams_.Encode()
14577	req, err := http.NewRequest("POST", urls, body)
14578	if err != nil {
14579		return nil, err
14580	}
14581	req.Header = reqHeaders
14582	googleapi.Expand(req.URL, map[string]string{
14583		"ownerName": c.ownerName,
14584	})
14585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14586}
14587
14588// Do executes the "adexchangebuyer2.bidders.filterSets.create" call.
14589// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
14590// status code is an error. Response headers are in either
14591// *FilterSet.ServerResponse.Header or (if a response was returned at
14592// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14593// to check whether the returned error was because
14594// http.StatusNotModified was returned.
14595func (c *BiddersFilterSetsCreateCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
14596	gensupport.SetOptions(c.urlParams_, opts...)
14597	res, err := c.doRequest("json")
14598	if res != nil && res.StatusCode == http.StatusNotModified {
14599		if res.Body != nil {
14600			res.Body.Close()
14601		}
14602		return nil, &googleapi.Error{
14603			Code:   res.StatusCode,
14604			Header: res.Header,
14605		}
14606	}
14607	if err != nil {
14608		return nil, err
14609	}
14610	defer googleapi.CloseBody(res)
14611	if err := googleapi.CheckResponse(res); err != nil {
14612		return nil, err
14613	}
14614	ret := &FilterSet{
14615		ServerResponse: googleapi.ServerResponse{
14616			Header:         res.Header,
14617			HTTPStatusCode: res.StatusCode,
14618		},
14619	}
14620	target := &ret
14621	if err := gensupport.DecodeResponse(target, res); err != nil {
14622		return nil, err
14623	}
14624	return ret, nil
14625	// {
14626	//   "description": "Creates the specified filter set for the account with the given account ID.",
14627	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets",
14628	//   "httpMethod": "POST",
14629	//   "id": "adexchangebuyer2.bidders.filterSets.create",
14630	//   "parameterOrder": [
14631	//     "ownerName"
14632	//   ],
14633	//   "parameters": {
14634	//     "isTransient": {
14635	//       "description": "Whether the filter set is transient, or should be persisted indefinitely.\nBy default, filter sets are not transient.\nIf transient, it will be available for at least 1 hour after creation.",
14636	//       "location": "query",
14637	//       "type": "boolean"
14638	//     },
14639	//     "ownerName": {
14640	//       "description": "Name of the owner (bidder or account) of the filter set to be created.\nFor example:\n\n- For a bidder-level filter set for bidder 123: `bidders/123`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456`",
14641	//       "location": "path",
14642	//       "pattern": "^bidders/[^/]+$",
14643	//       "required": true,
14644	//       "type": "string"
14645	//     }
14646	//   },
14647	//   "path": "v2beta1/{+ownerName}/filterSets",
14648	//   "request": {
14649	//     "$ref": "FilterSet"
14650	//   },
14651	//   "response": {
14652	//     "$ref": "FilterSet"
14653	//   },
14654	//   "scopes": [
14655	//     "https://www.googleapis.com/auth/adexchange.buyer"
14656	//   ]
14657	// }
14658
14659}
14660
14661// method id "adexchangebuyer2.bidders.filterSets.delete":
14662
14663type BiddersFilterSetsDeleteCall struct {
14664	s          *Service
14665	name       string
14666	urlParams_ gensupport.URLParams
14667	ctx_       context.Context
14668	header_    http.Header
14669}
14670
14671// Delete: Deletes the requested filter set from the account with the
14672// given account
14673// ID.
14674func (r *BiddersFilterSetsService) Delete(name string) *BiddersFilterSetsDeleteCall {
14675	c := &BiddersFilterSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14676	c.name = name
14677	return c
14678}
14679
14680// Fields allows partial responses to be retrieved. See
14681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14682// for more information.
14683func (c *BiddersFilterSetsDeleteCall) Fields(s ...googleapi.Field) *BiddersFilterSetsDeleteCall {
14684	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14685	return c
14686}
14687
14688// Context sets the context to be used in this call's Do method. Any
14689// pending HTTP request will be aborted if the provided context is
14690// canceled.
14691func (c *BiddersFilterSetsDeleteCall) Context(ctx context.Context) *BiddersFilterSetsDeleteCall {
14692	c.ctx_ = ctx
14693	return c
14694}
14695
14696// Header returns an http.Header that can be modified by the caller to
14697// add HTTP headers to the request.
14698func (c *BiddersFilterSetsDeleteCall) Header() http.Header {
14699	if c.header_ == nil {
14700		c.header_ = make(http.Header)
14701	}
14702	return c.header_
14703}
14704
14705func (c *BiddersFilterSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
14706	reqHeaders := make(http.Header)
14707	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
14708	for k, v := range c.header_ {
14709		reqHeaders[k] = v
14710	}
14711	reqHeaders.Set("User-Agent", c.s.userAgent())
14712	var body io.Reader = nil
14713	c.urlParams_.Set("alt", alt)
14714	c.urlParams_.Set("prettyPrint", "false")
14715	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14716	urls += "?" + c.urlParams_.Encode()
14717	req, err := http.NewRequest("DELETE", urls, body)
14718	if err != nil {
14719		return nil, err
14720	}
14721	req.Header = reqHeaders
14722	googleapi.Expand(req.URL, map[string]string{
14723		"name": c.name,
14724	})
14725	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14726}
14727
14728// Do executes the "adexchangebuyer2.bidders.filterSets.delete" call.
14729// Exactly one of *Empty or error will be non-nil. Any non-2xx status
14730// code is an error. Response headers are in either
14731// *Empty.ServerResponse.Header or (if a response was returned at all)
14732// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14733// check whether the returned error was because http.StatusNotModified
14734// was returned.
14735func (c *BiddersFilterSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14736	gensupport.SetOptions(c.urlParams_, opts...)
14737	res, err := c.doRequest("json")
14738	if res != nil && res.StatusCode == http.StatusNotModified {
14739		if res.Body != nil {
14740			res.Body.Close()
14741		}
14742		return nil, &googleapi.Error{
14743			Code:   res.StatusCode,
14744			Header: res.Header,
14745		}
14746	}
14747	if err != nil {
14748		return nil, err
14749	}
14750	defer googleapi.CloseBody(res)
14751	if err := googleapi.CheckResponse(res); err != nil {
14752		return nil, err
14753	}
14754	ret := &Empty{
14755		ServerResponse: googleapi.ServerResponse{
14756			Header:         res.Header,
14757			HTTPStatusCode: res.StatusCode,
14758		},
14759	}
14760	target := &ret
14761	if err := gensupport.DecodeResponse(target, res); err != nil {
14762		return nil, err
14763	}
14764	return ret, nil
14765	// {
14766	//   "description": "Deletes the requested filter set from the account with the given account\nID.",
14767	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}",
14768	//   "httpMethod": "DELETE",
14769	//   "id": "adexchangebuyer2.bidders.filterSets.delete",
14770	//   "parameterOrder": [
14771	//     "name"
14772	//   ],
14773	//   "parameters": {
14774	//     "name": {
14775	//       "description": "Full name of the resource to delete.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14776	//       "location": "path",
14777	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
14778	//       "required": true,
14779	//       "type": "string"
14780	//     }
14781	//   },
14782	//   "path": "v2beta1/{+name}",
14783	//   "response": {
14784	//     "$ref": "Empty"
14785	//   },
14786	//   "scopes": [
14787	//     "https://www.googleapis.com/auth/adexchange.buyer"
14788	//   ]
14789	// }
14790
14791}
14792
14793// method id "adexchangebuyer2.bidders.filterSets.get":
14794
14795type BiddersFilterSetsGetCall struct {
14796	s            *Service
14797	name         string
14798	urlParams_   gensupport.URLParams
14799	ifNoneMatch_ string
14800	ctx_         context.Context
14801	header_      http.Header
14802}
14803
14804// Get: Retrieves the requested filter set for the account with the
14805// given account
14806// ID.
14807func (r *BiddersFilterSetsService) Get(name string) *BiddersFilterSetsGetCall {
14808	c := &BiddersFilterSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14809	c.name = name
14810	return c
14811}
14812
14813// Fields allows partial responses to be retrieved. See
14814// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14815// for more information.
14816func (c *BiddersFilterSetsGetCall) Fields(s ...googleapi.Field) *BiddersFilterSetsGetCall {
14817	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14818	return c
14819}
14820
14821// IfNoneMatch sets the optional parameter which makes the operation
14822// fail if the object's ETag matches the given value. This is useful for
14823// getting updates only after the object has changed since the last
14824// request. Use googleapi.IsNotModified to check whether the response
14825// error from Do is the result of In-None-Match.
14826func (c *BiddersFilterSetsGetCall) IfNoneMatch(entityTag string) *BiddersFilterSetsGetCall {
14827	c.ifNoneMatch_ = entityTag
14828	return c
14829}
14830
14831// Context sets the context to be used in this call's Do method. Any
14832// pending HTTP request will be aborted if the provided context is
14833// canceled.
14834func (c *BiddersFilterSetsGetCall) Context(ctx context.Context) *BiddersFilterSetsGetCall {
14835	c.ctx_ = ctx
14836	return c
14837}
14838
14839// Header returns an http.Header that can be modified by the caller to
14840// add HTTP headers to the request.
14841func (c *BiddersFilterSetsGetCall) Header() http.Header {
14842	if c.header_ == nil {
14843		c.header_ = make(http.Header)
14844	}
14845	return c.header_
14846}
14847
14848func (c *BiddersFilterSetsGetCall) doRequest(alt string) (*http.Response, error) {
14849	reqHeaders := make(http.Header)
14850	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
14851	for k, v := range c.header_ {
14852		reqHeaders[k] = v
14853	}
14854	reqHeaders.Set("User-Agent", c.s.userAgent())
14855	if c.ifNoneMatch_ != "" {
14856		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14857	}
14858	var body io.Reader = nil
14859	c.urlParams_.Set("alt", alt)
14860	c.urlParams_.Set("prettyPrint", "false")
14861	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+name}")
14862	urls += "?" + c.urlParams_.Encode()
14863	req, err := http.NewRequest("GET", urls, body)
14864	if err != nil {
14865		return nil, err
14866	}
14867	req.Header = reqHeaders
14868	googleapi.Expand(req.URL, map[string]string{
14869		"name": c.name,
14870	})
14871	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14872}
14873
14874// Do executes the "adexchangebuyer2.bidders.filterSets.get" call.
14875// Exactly one of *FilterSet or error will be non-nil. Any non-2xx
14876// status code is an error. Response headers are in either
14877// *FilterSet.ServerResponse.Header or (if a response was returned at
14878// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14879// to check whether the returned error was because
14880// http.StatusNotModified was returned.
14881func (c *BiddersFilterSetsGetCall) Do(opts ...googleapi.CallOption) (*FilterSet, error) {
14882	gensupport.SetOptions(c.urlParams_, opts...)
14883	res, err := c.doRequest("json")
14884	if res != nil && res.StatusCode == http.StatusNotModified {
14885		if res.Body != nil {
14886			res.Body.Close()
14887		}
14888		return nil, &googleapi.Error{
14889			Code:   res.StatusCode,
14890			Header: res.Header,
14891		}
14892	}
14893	if err != nil {
14894		return nil, err
14895	}
14896	defer googleapi.CloseBody(res)
14897	if err := googleapi.CheckResponse(res); err != nil {
14898		return nil, err
14899	}
14900	ret := &FilterSet{
14901		ServerResponse: googleapi.ServerResponse{
14902			Header:         res.Header,
14903			HTTPStatusCode: res.StatusCode,
14904		},
14905	}
14906	target := &ret
14907	if err := gensupport.DecodeResponse(target, res); err != nil {
14908		return nil, err
14909	}
14910	return ret, nil
14911	// {
14912	//   "description": "Retrieves the requested filter set for the account with the given account\nID.",
14913	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}",
14914	//   "httpMethod": "GET",
14915	//   "id": "adexchangebuyer2.bidders.filterSets.get",
14916	//   "parameterOrder": [
14917	//     "name"
14918	//   ],
14919	//   "parameters": {
14920	//     "name": {
14921	//       "description": "Full name of the resource being requested.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
14922	//       "location": "path",
14923	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
14924	//       "required": true,
14925	//       "type": "string"
14926	//     }
14927	//   },
14928	//   "path": "v2beta1/{+name}",
14929	//   "response": {
14930	//     "$ref": "FilterSet"
14931	//   },
14932	//   "scopes": [
14933	//     "https://www.googleapis.com/auth/adexchange.buyer"
14934	//   ]
14935	// }
14936
14937}
14938
14939// method id "adexchangebuyer2.bidders.filterSets.list":
14940
14941type BiddersFilterSetsListCall struct {
14942	s            *Service
14943	ownerName    string
14944	urlParams_   gensupport.URLParams
14945	ifNoneMatch_ string
14946	ctx_         context.Context
14947	header_      http.Header
14948}
14949
14950// List: Lists all filter sets for the account with the given account
14951// ID.
14952func (r *BiddersFilterSetsService) List(ownerName string) *BiddersFilterSetsListCall {
14953	c := &BiddersFilterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14954	c.ownerName = ownerName
14955	return c
14956}
14957
14958// PageSize sets the optional parameter "pageSize": Requested page size.
14959// The server may return fewer results than requested.
14960// If unspecified, the server will pick an appropriate default.
14961func (c *BiddersFilterSetsListCall) PageSize(pageSize int64) *BiddersFilterSetsListCall {
14962	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14963	return c
14964}
14965
14966// PageToken sets the optional parameter "pageToken": A token
14967// identifying a page of results the server should return.
14968// Typically, this is the value
14969// of
14970// ListFilterSetsResponse.nextPageToken
14971// returned from the previous call to
14972// the
14973// accounts.filterSets.list
14974// method.
14975func (c *BiddersFilterSetsListCall) PageToken(pageToken string) *BiddersFilterSetsListCall {
14976	c.urlParams_.Set("pageToken", pageToken)
14977	return c
14978}
14979
14980// Fields allows partial responses to be retrieved. See
14981// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14982// for more information.
14983func (c *BiddersFilterSetsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsListCall {
14984	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14985	return c
14986}
14987
14988// IfNoneMatch sets the optional parameter which makes the operation
14989// fail if the object's ETag matches the given value. This is useful for
14990// getting updates only after the object has changed since the last
14991// request. Use googleapi.IsNotModified to check whether the response
14992// error from Do is the result of In-None-Match.
14993func (c *BiddersFilterSetsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsListCall {
14994	c.ifNoneMatch_ = entityTag
14995	return c
14996}
14997
14998// Context sets the context to be used in this call's Do method. Any
14999// pending HTTP request will be aborted if the provided context is
15000// canceled.
15001func (c *BiddersFilterSetsListCall) Context(ctx context.Context) *BiddersFilterSetsListCall {
15002	c.ctx_ = ctx
15003	return c
15004}
15005
15006// Header returns an http.Header that can be modified by the caller to
15007// add HTTP headers to the request.
15008func (c *BiddersFilterSetsListCall) Header() http.Header {
15009	if c.header_ == nil {
15010		c.header_ = make(http.Header)
15011	}
15012	return c.header_
15013}
15014
15015func (c *BiddersFilterSetsListCall) doRequest(alt string) (*http.Response, error) {
15016	reqHeaders := make(http.Header)
15017	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
15018	for k, v := range c.header_ {
15019		reqHeaders[k] = v
15020	}
15021	reqHeaders.Set("User-Agent", c.s.userAgent())
15022	if c.ifNoneMatch_ != "" {
15023		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15024	}
15025	var body io.Reader = nil
15026	c.urlParams_.Set("alt", alt)
15027	c.urlParams_.Set("prettyPrint", "false")
15028	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+ownerName}/filterSets")
15029	urls += "?" + c.urlParams_.Encode()
15030	req, err := http.NewRequest("GET", urls, body)
15031	if err != nil {
15032		return nil, err
15033	}
15034	req.Header = reqHeaders
15035	googleapi.Expand(req.URL, map[string]string{
15036		"ownerName": c.ownerName,
15037	})
15038	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15039}
15040
15041// Do executes the "adexchangebuyer2.bidders.filterSets.list" call.
15042// Exactly one of *ListFilterSetsResponse or error will be non-nil. Any
15043// non-2xx status code is an error. Response headers are in either
15044// *ListFilterSetsResponse.ServerResponse.Header or (if a response was
15045// returned at all) in error.(*googleapi.Error).Header. Use
15046// googleapi.IsNotModified to check whether the returned error was
15047// because http.StatusNotModified was returned.
15048func (c *BiddersFilterSetsListCall) Do(opts ...googleapi.CallOption) (*ListFilterSetsResponse, error) {
15049	gensupport.SetOptions(c.urlParams_, opts...)
15050	res, err := c.doRequest("json")
15051	if res != nil && res.StatusCode == http.StatusNotModified {
15052		if res.Body != nil {
15053			res.Body.Close()
15054		}
15055		return nil, &googleapi.Error{
15056			Code:   res.StatusCode,
15057			Header: res.Header,
15058		}
15059	}
15060	if err != nil {
15061		return nil, err
15062	}
15063	defer googleapi.CloseBody(res)
15064	if err := googleapi.CheckResponse(res); err != nil {
15065		return nil, err
15066	}
15067	ret := &ListFilterSetsResponse{
15068		ServerResponse: googleapi.ServerResponse{
15069			Header:         res.Header,
15070			HTTPStatusCode: res.StatusCode,
15071		},
15072	}
15073	target := &ret
15074	if err := gensupport.DecodeResponse(target, res); err != nil {
15075		return nil, err
15076	}
15077	return ret, nil
15078	// {
15079	//   "description": "Lists all filter sets for the account with the given account ID.",
15080	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets",
15081	//   "httpMethod": "GET",
15082	//   "id": "adexchangebuyer2.bidders.filterSets.list",
15083	//   "parameterOrder": [
15084	//     "ownerName"
15085	//   ],
15086	//   "parameters": {
15087	//     "ownerName": {
15088	//       "description": "Name of the owner (bidder or account) of the filter sets to be listed.\nFor example:\n\n- For a bidder-level filter set for bidder 123: `bidders/123`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456`",
15089	//       "location": "path",
15090	//       "pattern": "^bidders/[^/]+$",
15091	//       "required": true,
15092	//       "type": "string"
15093	//     },
15094	//     "pageSize": {
15095	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
15096	//       "format": "int32",
15097	//       "location": "query",
15098	//       "type": "integer"
15099	//     },
15100	//     "pageToken": {
15101	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilterSetsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.list\nmethod.",
15102	//       "location": "query",
15103	//       "type": "string"
15104	//     }
15105	//   },
15106	//   "path": "v2beta1/{+ownerName}/filterSets",
15107	//   "response": {
15108	//     "$ref": "ListFilterSetsResponse"
15109	//   },
15110	//   "scopes": [
15111	//     "https://www.googleapis.com/auth/adexchange.buyer"
15112	//   ]
15113	// }
15114
15115}
15116
15117// Pages invokes f for each page of results.
15118// A non-nil error returned from f will halt the iteration.
15119// The provided context supersedes any context provided to the Context method.
15120func (c *BiddersFilterSetsListCall) Pages(ctx context.Context, f func(*ListFilterSetsResponse) error) error {
15121	c.ctx_ = ctx
15122	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15123	for {
15124		x, err := c.Do()
15125		if err != nil {
15126			return err
15127		}
15128		if err := f(x); err != nil {
15129			return err
15130		}
15131		if x.NextPageToken == "" {
15132			return nil
15133		}
15134		c.PageToken(x.NextPageToken)
15135	}
15136}
15137
15138// method id "adexchangebuyer2.bidders.filterSets.bidMetrics.list":
15139
15140type BiddersFilterSetsBidMetricsListCall struct {
15141	s             *Service
15142	filterSetName string
15143	urlParams_    gensupport.URLParams
15144	ifNoneMatch_  string
15145	ctx_          context.Context
15146	header_       http.Header
15147}
15148
15149// List: Lists all metrics that are measured in terms of number of bids.
15150func (r *BiddersFilterSetsBidMetricsService) List(filterSetName string) *BiddersFilterSetsBidMetricsListCall {
15151	c := &BiddersFilterSetsBidMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15152	c.filterSetName = filterSetName
15153	return c
15154}
15155
15156// PageSize sets the optional parameter "pageSize": Requested page size.
15157// The server may return fewer results than requested.
15158// If unspecified, the server will pick an appropriate default.
15159func (c *BiddersFilterSetsBidMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidMetricsListCall {
15160	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15161	return c
15162}
15163
15164// PageToken sets the optional parameter "pageToken": A token
15165// identifying a page of results the server should return.
15166// Typically, this is the value
15167// of
15168// ListBidMetricsResponse.nextPageToken
15169// returned from the previous call to the bidMetrics.list
15170// method.
15171func (c *BiddersFilterSetsBidMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsBidMetricsListCall {
15172	c.urlParams_.Set("pageToken", pageToken)
15173	return c
15174}
15175
15176// Fields allows partial responses to be retrieved. See
15177// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15178// for more information.
15179func (c *BiddersFilterSetsBidMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidMetricsListCall {
15180	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15181	return c
15182}
15183
15184// IfNoneMatch sets the optional parameter which makes the operation
15185// fail if the object's ETag matches the given value. This is useful for
15186// getting updates only after the object has changed since the last
15187// request. Use googleapi.IsNotModified to check whether the response
15188// error from Do is the result of In-None-Match.
15189func (c *BiddersFilterSetsBidMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidMetricsListCall {
15190	c.ifNoneMatch_ = entityTag
15191	return c
15192}
15193
15194// Context sets the context to be used in this call's Do method. Any
15195// pending HTTP request will be aborted if the provided context is
15196// canceled.
15197func (c *BiddersFilterSetsBidMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsBidMetricsListCall {
15198	c.ctx_ = ctx
15199	return c
15200}
15201
15202// Header returns an http.Header that can be modified by the caller to
15203// add HTTP headers to the request.
15204func (c *BiddersFilterSetsBidMetricsListCall) Header() http.Header {
15205	if c.header_ == nil {
15206		c.header_ = make(http.Header)
15207	}
15208	return c.header_
15209}
15210
15211func (c *BiddersFilterSetsBidMetricsListCall) doRequest(alt string) (*http.Response, error) {
15212	reqHeaders := make(http.Header)
15213	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
15214	for k, v := range c.header_ {
15215		reqHeaders[k] = v
15216	}
15217	reqHeaders.Set("User-Agent", c.s.userAgent())
15218	if c.ifNoneMatch_ != "" {
15219		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15220	}
15221	var body io.Reader = nil
15222	c.urlParams_.Set("alt", alt)
15223	c.urlParams_.Set("prettyPrint", "false")
15224	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidMetrics")
15225	urls += "?" + c.urlParams_.Encode()
15226	req, err := http.NewRequest("GET", urls, body)
15227	if err != nil {
15228		return nil, err
15229	}
15230	req.Header = reqHeaders
15231	googleapi.Expand(req.URL, map[string]string{
15232		"filterSetName": c.filterSetName,
15233	})
15234	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15235}
15236
15237// Do executes the "adexchangebuyer2.bidders.filterSets.bidMetrics.list" call.
15238// Exactly one of *ListBidMetricsResponse or error will be non-nil. Any
15239// non-2xx status code is an error. Response headers are in either
15240// *ListBidMetricsResponse.ServerResponse.Header or (if a response was
15241// returned at all) in error.(*googleapi.Error).Header. Use
15242// googleapi.IsNotModified to check whether the returned error was
15243// because http.StatusNotModified was returned.
15244func (c *BiddersFilterSetsBidMetricsListCall) Do(opts ...googleapi.CallOption) (*ListBidMetricsResponse, error) {
15245	gensupport.SetOptions(c.urlParams_, opts...)
15246	res, err := c.doRequest("json")
15247	if res != nil && res.StatusCode == http.StatusNotModified {
15248		if res.Body != nil {
15249			res.Body.Close()
15250		}
15251		return nil, &googleapi.Error{
15252			Code:   res.StatusCode,
15253			Header: res.Header,
15254		}
15255	}
15256	if err != nil {
15257		return nil, err
15258	}
15259	defer googleapi.CloseBody(res)
15260	if err := googleapi.CheckResponse(res); err != nil {
15261		return nil, err
15262	}
15263	ret := &ListBidMetricsResponse{
15264		ServerResponse: googleapi.ServerResponse{
15265			Header:         res.Header,
15266			HTTPStatusCode: res.StatusCode,
15267		},
15268	}
15269	target := &ret
15270	if err := gensupport.DecodeResponse(target, res); err != nil {
15271		return nil, err
15272	}
15273	return ret, nil
15274	// {
15275	//   "description": "Lists all metrics that are measured in terms of number of bids.",
15276	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidMetrics",
15277	//   "httpMethod": "GET",
15278	//   "id": "adexchangebuyer2.bidders.filterSets.bidMetrics.list",
15279	//   "parameterOrder": [
15280	//     "filterSetName"
15281	//   ],
15282	//   "parameters": {
15283	//     "filterSetName": {
15284	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15285	//       "location": "path",
15286	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15287	//       "required": true,
15288	//       "type": "string"
15289	//     },
15290	//     "pageSize": {
15291	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
15292	//       "format": "int32",
15293	//       "location": "query",
15294	//       "type": "integer"
15295	//     },
15296	//     "pageToken": {
15297	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidMetricsResponse.nextPageToken\nreturned from the previous call to the bidMetrics.list\nmethod.",
15298	//       "location": "query",
15299	//       "type": "string"
15300	//     }
15301	//   },
15302	//   "path": "v2beta1/{+filterSetName}/bidMetrics",
15303	//   "response": {
15304	//     "$ref": "ListBidMetricsResponse"
15305	//   },
15306	//   "scopes": [
15307	//     "https://www.googleapis.com/auth/adexchange.buyer"
15308	//   ]
15309	// }
15310
15311}
15312
15313// Pages invokes f for each page of results.
15314// A non-nil error returned from f will halt the iteration.
15315// The provided context supersedes any context provided to the Context method.
15316func (c *BiddersFilterSetsBidMetricsListCall) Pages(ctx context.Context, f func(*ListBidMetricsResponse) error) error {
15317	c.ctx_ = ctx
15318	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15319	for {
15320		x, err := c.Do()
15321		if err != nil {
15322			return err
15323		}
15324		if err := f(x); err != nil {
15325			return err
15326		}
15327		if x.NextPageToken == "" {
15328			return nil
15329		}
15330		c.PageToken(x.NextPageToken)
15331	}
15332}
15333
15334// method id "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list":
15335
15336type BiddersFilterSetsBidResponseErrorsListCall struct {
15337	s             *Service
15338	filterSetName string
15339	urlParams_    gensupport.URLParams
15340	ifNoneMatch_  string
15341	ctx_          context.Context
15342	header_       http.Header
15343}
15344
15345// List: List all errors that occurred in bid responses, with the number
15346// of bid
15347// responses affected for each reason.
15348func (r *BiddersFilterSetsBidResponseErrorsService) List(filterSetName string) *BiddersFilterSetsBidResponseErrorsListCall {
15349	c := &BiddersFilterSetsBidResponseErrorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15350	c.filterSetName = filterSetName
15351	return c
15352}
15353
15354// PageSize sets the optional parameter "pageSize": Requested page size.
15355// The server may return fewer results than requested.
15356// If unspecified, the server will pick an appropriate default.
15357func (c *BiddersFilterSetsBidResponseErrorsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponseErrorsListCall {
15358	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15359	return c
15360}
15361
15362// PageToken sets the optional parameter "pageToken": A token
15363// identifying a page of results the server should return.
15364// Typically, this is the value
15365// of
15366// ListBidResponseErrorsResponse.nextPageToken
15367// returned from the previous call to the bidResponseErrors.list
15368// method.
15369func (c *BiddersFilterSetsBidResponseErrorsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponseErrorsListCall {
15370	c.urlParams_.Set("pageToken", pageToken)
15371	return c
15372}
15373
15374// Fields allows partial responses to be retrieved. See
15375// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15376// for more information.
15377func (c *BiddersFilterSetsBidResponseErrorsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponseErrorsListCall {
15378	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15379	return c
15380}
15381
15382// IfNoneMatch sets the optional parameter which makes the operation
15383// fail if the object's ETag matches the given value. This is useful for
15384// getting updates only after the object has changed since the last
15385// request. Use googleapi.IsNotModified to check whether the response
15386// error from Do is the result of In-None-Match.
15387func (c *BiddersFilterSetsBidResponseErrorsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponseErrorsListCall {
15388	c.ifNoneMatch_ = entityTag
15389	return c
15390}
15391
15392// Context sets the context to be used in this call's Do method. Any
15393// pending HTTP request will be aborted if the provided context is
15394// canceled.
15395func (c *BiddersFilterSetsBidResponseErrorsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponseErrorsListCall {
15396	c.ctx_ = ctx
15397	return c
15398}
15399
15400// Header returns an http.Header that can be modified by the caller to
15401// add HTTP headers to the request.
15402func (c *BiddersFilterSetsBidResponseErrorsListCall) Header() http.Header {
15403	if c.header_ == nil {
15404		c.header_ = make(http.Header)
15405	}
15406	return c.header_
15407}
15408
15409func (c *BiddersFilterSetsBidResponseErrorsListCall) doRequest(alt string) (*http.Response, error) {
15410	reqHeaders := make(http.Header)
15411	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
15412	for k, v := range c.header_ {
15413		reqHeaders[k] = v
15414	}
15415	reqHeaders.Set("User-Agent", c.s.userAgent())
15416	if c.ifNoneMatch_ != "" {
15417		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15418	}
15419	var body io.Reader = nil
15420	c.urlParams_.Set("alt", alt)
15421	c.urlParams_.Set("prettyPrint", "false")
15422	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponseErrors")
15423	urls += "?" + c.urlParams_.Encode()
15424	req, err := http.NewRequest("GET", urls, body)
15425	if err != nil {
15426		return nil, err
15427	}
15428	req.Header = reqHeaders
15429	googleapi.Expand(req.URL, map[string]string{
15430		"filterSetName": c.filterSetName,
15431	})
15432	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15433}
15434
15435// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list" call.
15436// Exactly one of *ListBidResponseErrorsResponse or error will be
15437// non-nil. Any non-2xx status code is an error. Response headers are in
15438// either *ListBidResponseErrorsResponse.ServerResponse.Header or (if a
15439// response was returned at all) in error.(*googleapi.Error).Header. Use
15440// googleapi.IsNotModified to check whether the returned error was
15441// because http.StatusNotModified was returned.
15442func (c *BiddersFilterSetsBidResponseErrorsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponseErrorsResponse, error) {
15443	gensupport.SetOptions(c.urlParams_, opts...)
15444	res, err := c.doRequest("json")
15445	if res != nil && res.StatusCode == http.StatusNotModified {
15446		if res.Body != nil {
15447			res.Body.Close()
15448		}
15449		return nil, &googleapi.Error{
15450			Code:   res.StatusCode,
15451			Header: res.Header,
15452		}
15453	}
15454	if err != nil {
15455		return nil, err
15456	}
15457	defer googleapi.CloseBody(res)
15458	if err := googleapi.CheckResponse(res); err != nil {
15459		return nil, err
15460	}
15461	ret := &ListBidResponseErrorsResponse{
15462		ServerResponse: googleapi.ServerResponse{
15463			Header:         res.Header,
15464			HTTPStatusCode: res.StatusCode,
15465		},
15466	}
15467	target := &ret
15468	if err := gensupport.DecodeResponse(target, res); err != nil {
15469		return nil, err
15470	}
15471	return ret, nil
15472	// {
15473	//   "description": "List all errors that occurred in bid responses, with the number of bid\nresponses affected for each reason.",
15474	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidResponseErrors",
15475	//   "httpMethod": "GET",
15476	//   "id": "adexchangebuyer2.bidders.filterSets.bidResponseErrors.list",
15477	//   "parameterOrder": [
15478	//     "filterSetName"
15479	//   ],
15480	//   "parameters": {
15481	//     "filterSetName": {
15482	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15483	//       "location": "path",
15484	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15485	//       "required": true,
15486	//       "type": "string"
15487	//     },
15488	//     "pageSize": {
15489	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
15490	//       "format": "int32",
15491	//       "location": "query",
15492	//       "type": "integer"
15493	//     },
15494	//     "pageToken": {
15495	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponseErrorsResponse.nextPageToken\nreturned from the previous call to the bidResponseErrors.list\nmethod.",
15496	//       "location": "query",
15497	//       "type": "string"
15498	//     }
15499	//   },
15500	//   "path": "v2beta1/{+filterSetName}/bidResponseErrors",
15501	//   "response": {
15502	//     "$ref": "ListBidResponseErrorsResponse"
15503	//   },
15504	//   "scopes": [
15505	//     "https://www.googleapis.com/auth/adexchange.buyer"
15506	//   ]
15507	// }
15508
15509}
15510
15511// Pages invokes f for each page of results.
15512// A non-nil error returned from f will halt the iteration.
15513// The provided context supersedes any context provided to the Context method.
15514func (c *BiddersFilterSetsBidResponseErrorsListCall) Pages(ctx context.Context, f func(*ListBidResponseErrorsResponse) error) error {
15515	c.ctx_ = ctx
15516	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15517	for {
15518		x, err := c.Do()
15519		if err != nil {
15520			return err
15521		}
15522		if err := f(x); err != nil {
15523			return err
15524		}
15525		if x.NextPageToken == "" {
15526			return nil
15527		}
15528		c.PageToken(x.NextPageToken)
15529	}
15530}
15531
15532// method id "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list":
15533
15534type BiddersFilterSetsBidResponsesWithoutBidsListCall struct {
15535	s             *Service
15536	filterSetName string
15537	urlParams_    gensupport.URLParams
15538	ifNoneMatch_  string
15539	ctx_          context.Context
15540	header_       http.Header
15541}
15542
15543// List: List all reasons for which bid responses were considered to
15544// have no
15545// applicable bids, with the number of bid responses affected for each
15546// reason.
15547func (r *BiddersFilterSetsBidResponsesWithoutBidsService) List(filterSetName string) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15548	c := &BiddersFilterSetsBidResponsesWithoutBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15549	c.filterSetName = filterSetName
15550	return c
15551}
15552
15553// PageSize sets the optional parameter "pageSize": Requested page size.
15554// The server may return fewer results than requested.
15555// If unspecified, the server will pick an appropriate default.
15556func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15557	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15558	return c
15559}
15560
15561// PageToken sets the optional parameter "pageToken": A token
15562// identifying a page of results the server should return.
15563// Typically, this is the value
15564// of
15565// ListBidResponsesWithoutBidsResponse.nextPageToken
15566// returned from the previous call to the
15567// bidResponsesWithoutBids.list
15568// method.
15569func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) PageToken(pageToken string) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15570	c.urlParams_.Set("pageToken", pageToken)
15571	return c
15572}
15573
15574// Fields allows partial responses to be retrieved. See
15575// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15576// for more information.
15577func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15578	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15579	return c
15580}
15581
15582// IfNoneMatch sets the optional parameter which makes the operation
15583// fail if the object's ETag matches the given value. This is useful for
15584// getting updates only after the object has changed since the last
15585// request. Use googleapi.IsNotModified to check whether the response
15586// error from Do is the result of In-None-Match.
15587func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15588	c.ifNoneMatch_ = entityTag
15589	return c
15590}
15591
15592// Context sets the context to be used in this call's Do method. Any
15593// pending HTTP request will be aborted if the provided context is
15594// canceled.
15595func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Context(ctx context.Context) *BiddersFilterSetsBidResponsesWithoutBidsListCall {
15596	c.ctx_ = ctx
15597	return c
15598}
15599
15600// Header returns an http.Header that can be modified by the caller to
15601// add HTTP headers to the request.
15602func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Header() http.Header {
15603	if c.header_ == nil {
15604		c.header_ = make(http.Header)
15605	}
15606	return c.header_
15607}
15608
15609func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) doRequest(alt string) (*http.Response, error) {
15610	reqHeaders := make(http.Header)
15611	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
15612	for k, v := range c.header_ {
15613		reqHeaders[k] = v
15614	}
15615	reqHeaders.Set("User-Agent", c.s.userAgent())
15616	if c.ifNoneMatch_ != "" {
15617		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15618	}
15619	var body io.Reader = nil
15620	c.urlParams_.Set("alt", alt)
15621	c.urlParams_.Set("prettyPrint", "false")
15622	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/bidResponsesWithoutBids")
15623	urls += "?" + c.urlParams_.Encode()
15624	req, err := http.NewRequest("GET", urls, body)
15625	if err != nil {
15626		return nil, err
15627	}
15628	req.Header = reqHeaders
15629	googleapi.Expand(req.URL, map[string]string{
15630		"filterSetName": c.filterSetName,
15631	})
15632	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15633}
15634
15635// Do executes the "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list" call.
15636// Exactly one of *ListBidResponsesWithoutBidsResponse or error will be
15637// non-nil. Any non-2xx status code is an error. Response headers are in
15638// either *ListBidResponsesWithoutBidsResponse.ServerResponse.Header or
15639// (if a response was returned at all) in
15640// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
15641// whether the returned error was because http.StatusNotModified was
15642// returned.
15643func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Do(opts ...googleapi.CallOption) (*ListBidResponsesWithoutBidsResponse, error) {
15644	gensupport.SetOptions(c.urlParams_, opts...)
15645	res, err := c.doRequest("json")
15646	if res != nil && res.StatusCode == http.StatusNotModified {
15647		if res.Body != nil {
15648			res.Body.Close()
15649		}
15650		return nil, &googleapi.Error{
15651			Code:   res.StatusCode,
15652			Header: res.Header,
15653		}
15654	}
15655	if err != nil {
15656		return nil, err
15657	}
15658	defer googleapi.CloseBody(res)
15659	if err := googleapi.CheckResponse(res); err != nil {
15660		return nil, err
15661	}
15662	ret := &ListBidResponsesWithoutBidsResponse{
15663		ServerResponse: googleapi.ServerResponse{
15664			Header:         res.Header,
15665			HTTPStatusCode: res.StatusCode,
15666		},
15667	}
15668	target := &ret
15669	if err := gensupport.DecodeResponse(target, res); err != nil {
15670		return nil, err
15671	}
15672	return ret, nil
15673	// {
15674	//   "description": "List all reasons for which bid responses were considered to have no\napplicable bids, with the number of bid responses affected for each reason.",
15675	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/bidResponsesWithoutBids",
15676	//   "httpMethod": "GET",
15677	//   "id": "adexchangebuyer2.bidders.filterSets.bidResponsesWithoutBids.list",
15678	//   "parameterOrder": [
15679	//     "filterSetName"
15680	//   ],
15681	//   "parameters": {
15682	//     "filterSetName": {
15683	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15684	//       "location": "path",
15685	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15686	//       "required": true,
15687	//       "type": "string"
15688	//     },
15689	//     "pageSize": {
15690	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
15691	//       "format": "int32",
15692	//       "location": "query",
15693	//       "type": "integer"
15694	//     },
15695	//     "pageToken": {
15696	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponsesWithoutBidsResponse.nextPageToken\nreturned from the previous call to the bidResponsesWithoutBids.list\nmethod.",
15697	//       "location": "query",
15698	//       "type": "string"
15699	//     }
15700	//   },
15701	//   "path": "v2beta1/{+filterSetName}/bidResponsesWithoutBids",
15702	//   "response": {
15703	//     "$ref": "ListBidResponsesWithoutBidsResponse"
15704	//   },
15705	//   "scopes": [
15706	//     "https://www.googleapis.com/auth/adexchange.buyer"
15707	//   ]
15708	// }
15709
15710}
15711
15712// Pages invokes f for each page of results.
15713// A non-nil error returned from f will halt the iteration.
15714// The provided context supersedes any context provided to the Context method.
15715func (c *BiddersFilterSetsBidResponsesWithoutBidsListCall) Pages(ctx context.Context, f func(*ListBidResponsesWithoutBidsResponse) error) error {
15716	c.ctx_ = ctx
15717	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15718	for {
15719		x, err := c.Do()
15720		if err != nil {
15721			return err
15722		}
15723		if err := f(x); err != nil {
15724			return err
15725		}
15726		if x.NextPageToken == "" {
15727			return nil
15728		}
15729		c.PageToken(x.NextPageToken)
15730	}
15731}
15732
15733// method id "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list":
15734
15735type BiddersFilterSetsFilteredBidRequestsListCall struct {
15736	s             *Service
15737	filterSetName string
15738	urlParams_    gensupport.URLParams
15739	ifNoneMatch_  string
15740	ctx_          context.Context
15741	header_       http.Header
15742}
15743
15744// List: List all reasons that caused a bid request not to be sent for
15745// an
15746// impression, with the number of bid requests not sent for each reason.
15747func (r *BiddersFilterSetsFilteredBidRequestsService) List(filterSetName string) *BiddersFilterSetsFilteredBidRequestsListCall {
15748	c := &BiddersFilterSetsFilteredBidRequestsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15749	c.filterSetName = filterSetName
15750	return c
15751}
15752
15753// PageSize sets the optional parameter "pageSize": Requested page size.
15754// The server may return fewer results than requested.
15755// If unspecified, the server will pick an appropriate default.
15756func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidRequestsListCall {
15757	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15758	return c
15759}
15760
15761// PageToken sets the optional parameter "pageToken": A token
15762// identifying a page of results the server should return.
15763// Typically, this is the value
15764// of
15765// ListFilteredBidRequestsResponse.nextPageToken
15766// returned from the previous call to the
15767// filteredBidRequests.list
15768// method.
15769func (c *BiddersFilterSetsFilteredBidRequestsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidRequestsListCall {
15770	c.urlParams_.Set("pageToken", pageToken)
15771	return c
15772}
15773
15774// Fields allows partial responses to be retrieved. See
15775// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15776// for more information.
15777func (c *BiddersFilterSetsFilteredBidRequestsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidRequestsListCall {
15778	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15779	return c
15780}
15781
15782// IfNoneMatch sets the optional parameter which makes the operation
15783// fail if the object's ETag matches the given value. This is useful for
15784// getting updates only after the object has changed since the last
15785// request. Use googleapi.IsNotModified to check whether the response
15786// error from Do is the result of In-None-Match.
15787func (c *BiddersFilterSetsFilteredBidRequestsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidRequestsListCall {
15788	c.ifNoneMatch_ = entityTag
15789	return c
15790}
15791
15792// Context sets the context to be used in this call's Do method. Any
15793// pending HTTP request will be aborted if the provided context is
15794// canceled.
15795func (c *BiddersFilterSetsFilteredBidRequestsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidRequestsListCall {
15796	c.ctx_ = ctx
15797	return c
15798}
15799
15800// Header returns an http.Header that can be modified by the caller to
15801// add HTTP headers to the request.
15802func (c *BiddersFilterSetsFilteredBidRequestsListCall) Header() http.Header {
15803	if c.header_ == nil {
15804		c.header_ = make(http.Header)
15805	}
15806	return c.header_
15807}
15808
15809func (c *BiddersFilterSetsFilteredBidRequestsListCall) doRequest(alt string) (*http.Response, error) {
15810	reqHeaders := make(http.Header)
15811	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
15812	for k, v := range c.header_ {
15813		reqHeaders[k] = v
15814	}
15815	reqHeaders.Set("User-Agent", c.s.userAgent())
15816	if c.ifNoneMatch_ != "" {
15817		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15818	}
15819	var body io.Reader = nil
15820	c.urlParams_.Set("alt", alt)
15821	c.urlParams_.Set("prettyPrint", "false")
15822	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBidRequests")
15823	urls += "?" + c.urlParams_.Encode()
15824	req, err := http.NewRequest("GET", urls, body)
15825	if err != nil {
15826		return nil, err
15827	}
15828	req.Header = reqHeaders
15829	googleapi.Expand(req.URL, map[string]string{
15830		"filterSetName": c.filterSetName,
15831	})
15832	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15833}
15834
15835// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list" call.
15836// Exactly one of *ListFilteredBidRequestsResponse or error will be
15837// non-nil. Any non-2xx status code is an error. Response headers are in
15838// either *ListFilteredBidRequestsResponse.ServerResponse.Header or (if
15839// a response was returned at all) in error.(*googleapi.Error).Header.
15840// Use googleapi.IsNotModified to check whether the returned error was
15841// because http.StatusNotModified was returned.
15842func (c *BiddersFilterSetsFilteredBidRequestsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidRequestsResponse, error) {
15843	gensupport.SetOptions(c.urlParams_, opts...)
15844	res, err := c.doRequest("json")
15845	if res != nil && res.StatusCode == http.StatusNotModified {
15846		if res.Body != nil {
15847			res.Body.Close()
15848		}
15849		return nil, &googleapi.Error{
15850			Code:   res.StatusCode,
15851			Header: res.Header,
15852		}
15853	}
15854	if err != nil {
15855		return nil, err
15856	}
15857	defer googleapi.CloseBody(res)
15858	if err := googleapi.CheckResponse(res); err != nil {
15859		return nil, err
15860	}
15861	ret := &ListFilteredBidRequestsResponse{
15862		ServerResponse: googleapi.ServerResponse{
15863			Header:         res.Header,
15864			HTTPStatusCode: res.StatusCode,
15865		},
15866	}
15867	target := &ret
15868	if err := gensupport.DecodeResponse(target, res); err != nil {
15869		return nil, err
15870	}
15871	return ret, nil
15872	// {
15873	//   "description": "List all reasons that caused a bid request not to be sent for an\nimpression, with the number of bid requests not sent for each reason.",
15874	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBidRequests",
15875	//   "httpMethod": "GET",
15876	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBidRequests.list",
15877	//   "parameterOrder": [
15878	//     "filterSetName"
15879	//   ],
15880	//   "parameters": {
15881	//     "filterSetName": {
15882	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
15883	//       "location": "path",
15884	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
15885	//       "required": true,
15886	//       "type": "string"
15887	//     },
15888	//     "pageSize": {
15889	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
15890	//       "format": "int32",
15891	//       "location": "query",
15892	//       "type": "integer"
15893	//     },
15894	//     "pageToken": {
15895	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidRequestsResponse.nextPageToken\nreturned from the previous call to the filteredBidRequests.list\nmethod.",
15896	//       "location": "query",
15897	//       "type": "string"
15898	//     }
15899	//   },
15900	//   "path": "v2beta1/{+filterSetName}/filteredBidRequests",
15901	//   "response": {
15902	//     "$ref": "ListFilteredBidRequestsResponse"
15903	//   },
15904	//   "scopes": [
15905	//     "https://www.googleapis.com/auth/adexchange.buyer"
15906	//   ]
15907	// }
15908
15909}
15910
15911// Pages invokes f for each page of results.
15912// A non-nil error returned from f will halt the iteration.
15913// The provided context supersedes any context provided to the Context method.
15914func (c *BiddersFilterSetsFilteredBidRequestsListCall) Pages(ctx context.Context, f func(*ListFilteredBidRequestsResponse) error) error {
15915	c.ctx_ = ctx
15916	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15917	for {
15918		x, err := c.Do()
15919		if err != nil {
15920			return err
15921		}
15922		if err := f(x); err != nil {
15923			return err
15924		}
15925		if x.NextPageToken == "" {
15926			return nil
15927		}
15928		c.PageToken(x.NextPageToken)
15929	}
15930}
15931
15932// method id "adexchangebuyer2.bidders.filterSets.filteredBids.list":
15933
15934type BiddersFilterSetsFilteredBidsListCall struct {
15935	s             *Service
15936	filterSetName string
15937	urlParams_    gensupport.URLParams
15938	ifNoneMatch_  string
15939	ctx_          context.Context
15940	header_       http.Header
15941}
15942
15943// List: List all reasons for which bids were filtered, with the number
15944// of bids
15945// filtered for each reason.
15946func (r *BiddersFilterSetsFilteredBidsService) List(filterSetName string) *BiddersFilterSetsFilteredBidsListCall {
15947	c := &BiddersFilterSetsFilteredBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15948	c.filterSetName = filterSetName
15949	return c
15950}
15951
15952// PageSize sets the optional parameter "pageSize": Requested page size.
15953// The server may return fewer results than requested.
15954// If unspecified, the server will pick an appropriate default.
15955func (c *BiddersFilterSetsFilteredBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsListCall {
15956	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15957	return c
15958}
15959
15960// PageToken sets the optional parameter "pageToken": A token
15961// identifying a page of results the server should return.
15962// Typically, this is the value
15963// of
15964// ListFilteredBidsResponse.nextPageToken
15965// returned from the previous call to the filteredBids.list
15966// method.
15967func (c *BiddersFilterSetsFilteredBidsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsListCall {
15968	c.urlParams_.Set("pageToken", pageToken)
15969	return c
15970}
15971
15972// Fields allows partial responses to be retrieved. See
15973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15974// for more information.
15975func (c *BiddersFilterSetsFilteredBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsListCall {
15976	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15977	return c
15978}
15979
15980// IfNoneMatch sets the optional parameter which makes the operation
15981// fail if the object's ETag matches the given value. This is useful for
15982// getting updates only after the object has changed since the last
15983// request. Use googleapi.IsNotModified to check whether the response
15984// error from Do is the result of In-None-Match.
15985func (c *BiddersFilterSetsFilteredBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsListCall {
15986	c.ifNoneMatch_ = entityTag
15987	return c
15988}
15989
15990// Context sets the context to be used in this call's Do method. Any
15991// pending HTTP request will be aborted if the provided context is
15992// canceled.
15993func (c *BiddersFilterSetsFilteredBidsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsListCall {
15994	c.ctx_ = ctx
15995	return c
15996}
15997
15998// Header returns an http.Header that can be modified by the caller to
15999// add HTTP headers to the request.
16000func (c *BiddersFilterSetsFilteredBidsListCall) Header() http.Header {
16001	if c.header_ == nil {
16002		c.header_ = make(http.Header)
16003	}
16004	return c.header_
16005}
16006
16007func (c *BiddersFilterSetsFilteredBidsListCall) doRequest(alt string) (*http.Response, error) {
16008	reqHeaders := make(http.Header)
16009	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
16010	for k, v := range c.header_ {
16011		reqHeaders[k] = v
16012	}
16013	reqHeaders.Set("User-Agent", c.s.userAgent())
16014	if c.ifNoneMatch_ != "" {
16015		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16016	}
16017	var body io.Reader = nil
16018	c.urlParams_.Set("alt", alt)
16019	c.urlParams_.Set("prettyPrint", "false")
16020	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids")
16021	urls += "?" + c.urlParams_.Encode()
16022	req, err := http.NewRequest("GET", urls, body)
16023	if err != nil {
16024		return nil, err
16025	}
16026	req.Header = reqHeaders
16027	googleapi.Expand(req.URL, map[string]string{
16028		"filterSetName": c.filterSetName,
16029	})
16030	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16031}
16032
16033// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.list" call.
16034// Exactly one of *ListFilteredBidsResponse or error will be non-nil.
16035// Any non-2xx status code is an error. Response headers are in either
16036// *ListFilteredBidsResponse.ServerResponse.Header or (if a response was
16037// returned at all) in error.(*googleapi.Error).Header. Use
16038// googleapi.IsNotModified to check whether the returned error was
16039// because http.StatusNotModified was returned.
16040func (c *BiddersFilterSetsFilteredBidsListCall) Do(opts ...googleapi.CallOption) (*ListFilteredBidsResponse, error) {
16041	gensupport.SetOptions(c.urlParams_, opts...)
16042	res, err := c.doRequest("json")
16043	if res != nil && res.StatusCode == http.StatusNotModified {
16044		if res.Body != nil {
16045			res.Body.Close()
16046		}
16047		return nil, &googleapi.Error{
16048			Code:   res.StatusCode,
16049			Header: res.Header,
16050		}
16051	}
16052	if err != nil {
16053		return nil, err
16054	}
16055	defer googleapi.CloseBody(res)
16056	if err := googleapi.CheckResponse(res); err != nil {
16057		return nil, err
16058	}
16059	ret := &ListFilteredBidsResponse{
16060		ServerResponse: googleapi.ServerResponse{
16061			Header:         res.Header,
16062			HTTPStatusCode: res.StatusCode,
16063		},
16064	}
16065	target := &ret
16066	if err := gensupport.DecodeResponse(target, res); err != nil {
16067		return nil, err
16068	}
16069	return ret, nil
16070	// {
16071	//   "description": "List all reasons for which bids were filtered, with the number of bids\nfiltered for each reason.",
16072	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids",
16073	//   "httpMethod": "GET",
16074	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBids.list",
16075	//   "parameterOrder": [
16076	//     "filterSetName"
16077	//   ],
16078	//   "parameters": {
16079	//     "filterSetName": {
16080	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16081	//       "location": "path",
16082	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16083	//       "required": true,
16084	//       "type": "string"
16085	//     },
16086	//     "pageSize": {
16087	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
16088	//       "format": "int32",
16089	//       "location": "query",
16090	//       "type": "integer"
16091	//     },
16092	//     "pageToken": {
16093	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidsResponse.nextPageToken\nreturned from the previous call to the filteredBids.list\nmethod.",
16094	//       "location": "query",
16095	//       "type": "string"
16096	//     }
16097	//   },
16098	//   "path": "v2beta1/{+filterSetName}/filteredBids",
16099	//   "response": {
16100	//     "$ref": "ListFilteredBidsResponse"
16101	//   },
16102	//   "scopes": [
16103	//     "https://www.googleapis.com/auth/adexchange.buyer"
16104	//   ]
16105	// }
16106
16107}
16108
16109// Pages invokes f for each page of results.
16110// A non-nil error returned from f will halt the iteration.
16111// The provided context supersedes any context provided to the Context method.
16112func (c *BiddersFilterSetsFilteredBidsListCall) Pages(ctx context.Context, f func(*ListFilteredBidsResponse) error) error {
16113	c.ctx_ = ctx
16114	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16115	for {
16116		x, err := c.Do()
16117		if err != nil {
16118			return err
16119		}
16120		if err := f(x); err != nil {
16121			return err
16122		}
16123		if x.NextPageToken == "" {
16124			return nil
16125		}
16126		c.PageToken(x.NextPageToken)
16127	}
16128}
16129
16130// method id "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list":
16131
16132type BiddersFilterSetsFilteredBidsCreativesListCall struct {
16133	s                *Service
16134	filterSetName    string
16135	creativeStatusId int64
16136	urlParams_       gensupport.URLParams
16137	ifNoneMatch_     string
16138	ctx_             context.Context
16139	header_          http.Header
16140}
16141
16142// List: List all creatives associated with a specific reason for which
16143// bids were
16144// filtered, with the number of bids filtered for each creative.
16145func (r *BiddersFilterSetsFilteredBidsCreativesService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsCreativesListCall {
16146	c := &BiddersFilterSetsFilteredBidsCreativesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16147	c.filterSetName = filterSetName
16148	c.creativeStatusId = creativeStatusId
16149	return c
16150}
16151
16152// PageSize sets the optional parameter "pageSize": Requested page size.
16153// The server may return fewer results than requested.
16154// If unspecified, the server will pick an appropriate default.
16155func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsCreativesListCall {
16156	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16157	return c
16158}
16159
16160// PageToken sets the optional parameter "pageToken": A token
16161// identifying a page of results the server should return.
16162// Typically, this is the value
16163// of
16164// ListCreativeStatusBreakdownByCreativeResponse.nextPageToken
16165// returne
16166// d from the previous call to the filteredBids.creatives.list
16167// method.
16168func (c *BiddersFilterSetsFilteredBidsCreativesListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsCreativesListCall {
16169	c.urlParams_.Set("pageToken", pageToken)
16170	return c
16171}
16172
16173// Fields allows partial responses to be retrieved. See
16174// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16175// for more information.
16176func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsCreativesListCall {
16177	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16178	return c
16179}
16180
16181// IfNoneMatch sets the optional parameter which makes the operation
16182// fail if the object's ETag matches the given value. This is useful for
16183// getting updates only after the object has changed since the last
16184// request. Use googleapi.IsNotModified to check whether the response
16185// error from Do is the result of In-None-Match.
16186func (c *BiddersFilterSetsFilteredBidsCreativesListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsCreativesListCall {
16187	c.ifNoneMatch_ = entityTag
16188	return c
16189}
16190
16191// Context sets the context to be used in this call's Do method. Any
16192// pending HTTP request will be aborted if the provided context is
16193// canceled.
16194func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsCreativesListCall {
16195	c.ctx_ = ctx
16196	return c
16197}
16198
16199// Header returns an http.Header that can be modified by the caller to
16200// add HTTP headers to the request.
16201func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Header() http.Header {
16202	if c.header_ == nil {
16203		c.header_ = make(http.Header)
16204	}
16205	return c.header_
16206}
16207
16208func (c *BiddersFilterSetsFilteredBidsCreativesListCall) doRequest(alt string) (*http.Response, error) {
16209	reqHeaders := make(http.Header)
16210	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
16211	for k, v := range c.header_ {
16212		reqHeaders[k] = v
16213	}
16214	reqHeaders.Set("User-Agent", c.s.userAgent())
16215	if c.ifNoneMatch_ != "" {
16216		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16217	}
16218	var body io.Reader = nil
16219	c.urlParams_.Set("alt", alt)
16220	c.urlParams_.Set("prettyPrint", "false")
16221	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives")
16222	urls += "?" + c.urlParams_.Encode()
16223	req, err := http.NewRequest("GET", urls, body)
16224	if err != nil {
16225		return nil, err
16226	}
16227	req.Header = reqHeaders
16228	googleapi.Expand(req.URL, map[string]string{
16229		"filterSetName":    c.filterSetName,
16230		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
16231	})
16232	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16233}
16234
16235// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list" call.
16236// Exactly one of *ListCreativeStatusBreakdownByCreativeResponse or
16237// error will be non-nil. Any non-2xx status code is an error. Response
16238// headers are in either
16239// *ListCreativeStatusBreakdownByCreativeResponse.ServerResponse.Header
16240// or (if a response was returned at all) in
16241// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16242// whether the returned error was because http.StatusNotModified was
16243// returned.
16244func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByCreativeResponse, error) {
16245	gensupport.SetOptions(c.urlParams_, opts...)
16246	res, err := c.doRequest("json")
16247	if res != nil && res.StatusCode == http.StatusNotModified {
16248		if res.Body != nil {
16249			res.Body.Close()
16250		}
16251		return nil, &googleapi.Error{
16252			Code:   res.StatusCode,
16253			Header: res.Header,
16254		}
16255	}
16256	if err != nil {
16257		return nil, err
16258	}
16259	defer googleapi.CloseBody(res)
16260	if err := googleapi.CheckResponse(res); err != nil {
16261		return nil, err
16262	}
16263	ret := &ListCreativeStatusBreakdownByCreativeResponse{
16264		ServerResponse: googleapi.ServerResponse{
16265			Header:         res.Header,
16266			HTTPStatusCode: res.StatusCode,
16267		},
16268	}
16269	target := &ret
16270	if err := gensupport.DecodeResponse(target, res); err != nil {
16271		return nil, err
16272	}
16273	return ret, nil
16274	// {
16275	//   "description": "List all creatives associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each creative.",
16276	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/creatives",
16277	//   "httpMethod": "GET",
16278	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBids.creatives.list",
16279	//   "parameterOrder": [
16280	//     "filterSetName",
16281	//     "creativeStatusId"
16282	//   ],
16283	//   "parameters": {
16284	//     "creativeStatusId": {
16285	//       "description": "The ID of the creative status for which to retrieve a breakdown by\ncreative.\nSee\n[creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).",
16286	//       "format": "int32",
16287	//       "location": "path",
16288	//       "required": true,
16289	//       "type": "integer"
16290	//     },
16291	//     "filterSetName": {
16292	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16293	//       "location": "path",
16294	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16295	//       "required": true,
16296	//       "type": "string"
16297	//     },
16298	//     "pageSize": {
16299	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
16300	//       "format": "int32",
16301	//       "location": "query",
16302	//       "type": "integer"
16303	//     },
16304	//     "pageToken": {
16305	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByCreativeResponse.nextPageToken\nreturned from the previous call to the filteredBids.creatives.list\nmethod.",
16306	//       "location": "query",
16307	//       "type": "string"
16308	//     }
16309	//   },
16310	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/creatives",
16311	//   "response": {
16312	//     "$ref": "ListCreativeStatusBreakdownByCreativeResponse"
16313	//   },
16314	//   "scopes": [
16315	//     "https://www.googleapis.com/auth/adexchange.buyer"
16316	//   ]
16317	// }
16318
16319}
16320
16321// Pages invokes f for each page of results.
16322// A non-nil error returned from f will halt the iteration.
16323// The provided context supersedes any context provided to the Context method.
16324func (c *BiddersFilterSetsFilteredBidsCreativesListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByCreativeResponse) error) error {
16325	c.ctx_ = ctx
16326	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16327	for {
16328		x, err := c.Do()
16329		if err != nil {
16330			return err
16331		}
16332		if err := f(x); err != nil {
16333			return err
16334		}
16335		if x.NextPageToken == "" {
16336			return nil
16337		}
16338		c.PageToken(x.NextPageToken)
16339	}
16340}
16341
16342// method id "adexchangebuyer2.bidders.filterSets.filteredBids.details.list":
16343
16344type BiddersFilterSetsFilteredBidsDetailsListCall struct {
16345	s                *Service
16346	filterSetName    string
16347	creativeStatusId int64
16348	urlParams_       gensupport.URLParams
16349	ifNoneMatch_     string
16350	ctx_             context.Context
16351	header_          http.Header
16352}
16353
16354// List: List all details associated with a specific reason for which
16355// bids were
16356// filtered, with the number of bids filtered for each detail.
16357func (r *BiddersFilterSetsFilteredBidsDetailsService) List(filterSetName string, creativeStatusId int64) *BiddersFilterSetsFilteredBidsDetailsListCall {
16358	c := &BiddersFilterSetsFilteredBidsDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16359	c.filterSetName = filterSetName
16360	c.creativeStatusId = creativeStatusId
16361	return c
16362}
16363
16364// PageSize sets the optional parameter "pageSize": Requested page size.
16365// The server may return fewer results than requested.
16366// If unspecified, the server will pick an appropriate default.
16367func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageSize(pageSize int64) *BiddersFilterSetsFilteredBidsDetailsListCall {
16368	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16369	return c
16370}
16371
16372// PageToken sets the optional parameter "pageToken": A token
16373// identifying a page of results the server should return.
16374// Typically, this is the value
16375// of
16376// ListCreativeStatusBreakdownByDetailResponse.nextPageToken
16377// returned from the previous call to the
16378// filteredBids.details.list
16379// method.
16380func (c *BiddersFilterSetsFilteredBidsDetailsListCall) PageToken(pageToken string) *BiddersFilterSetsFilteredBidsDetailsListCall {
16381	c.urlParams_.Set("pageToken", pageToken)
16382	return c
16383}
16384
16385// Fields allows partial responses to be retrieved. See
16386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16387// for more information.
16388func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsFilteredBidsDetailsListCall {
16389	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16390	return c
16391}
16392
16393// IfNoneMatch sets the optional parameter which makes the operation
16394// fail if the object's ETag matches the given value. This is useful for
16395// getting updates only after the object has changed since the last
16396// request. Use googleapi.IsNotModified to check whether the response
16397// error from Do is the result of In-None-Match.
16398func (c *BiddersFilterSetsFilteredBidsDetailsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsFilteredBidsDetailsListCall {
16399	c.ifNoneMatch_ = entityTag
16400	return c
16401}
16402
16403// Context sets the context to be used in this call's Do method. Any
16404// pending HTTP request will be aborted if the provided context is
16405// canceled.
16406func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Context(ctx context.Context) *BiddersFilterSetsFilteredBidsDetailsListCall {
16407	c.ctx_ = ctx
16408	return c
16409}
16410
16411// Header returns an http.Header that can be modified by the caller to
16412// add HTTP headers to the request.
16413func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Header() http.Header {
16414	if c.header_ == nil {
16415		c.header_ = make(http.Header)
16416	}
16417	return c.header_
16418}
16419
16420func (c *BiddersFilterSetsFilteredBidsDetailsListCall) doRequest(alt string) (*http.Response, error) {
16421	reqHeaders := make(http.Header)
16422	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
16423	for k, v := range c.header_ {
16424		reqHeaders[k] = v
16425	}
16426	reqHeaders.Set("User-Agent", c.s.userAgent())
16427	if c.ifNoneMatch_ != "" {
16428		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16429	}
16430	var body io.Reader = nil
16431	c.urlParams_.Set("alt", alt)
16432	c.urlParams_.Set("prettyPrint", "false")
16433	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details")
16434	urls += "?" + c.urlParams_.Encode()
16435	req, err := http.NewRequest("GET", urls, body)
16436	if err != nil {
16437		return nil, err
16438	}
16439	req.Header = reqHeaders
16440	googleapi.Expand(req.URL, map[string]string{
16441		"filterSetName":    c.filterSetName,
16442		"creativeStatusId": strconv.FormatInt(c.creativeStatusId, 10),
16443	})
16444	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16445}
16446
16447// Do executes the "adexchangebuyer2.bidders.filterSets.filteredBids.details.list" call.
16448// Exactly one of *ListCreativeStatusBreakdownByDetailResponse or error
16449// will be non-nil. Any non-2xx status code is an error. Response
16450// headers are in either
16451// *ListCreativeStatusBreakdownByDetailResponse.ServerResponse.Header or
16452// (if a response was returned at all) in
16453// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
16454// whether the returned error was because http.StatusNotModified was
16455// returned.
16456func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Do(opts ...googleapi.CallOption) (*ListCreativeStatusBreakdownByDetailResponse, error) {
16457	gensupport.SetOptions(c.urlParams_, opts...)
16458	res, err := c.doRequest("json")
16459	if res != nil && res.StatusCode == http.StatusNotModified {
16460		if res.Body != nil {
16461			res.Body.Close()
16462		}
16463		return nil, &googleapi.Error{
16464			Code:   res.StatusCode,
16465			Header: res.Header,
16466		}
16467	}
16468	if err != nil {
16469		return nil, err
16470	}
16471	defer googleapi.CloseBody(res)
16472	if err := googleapi.CheckResponse(res); err != nil {
16473		return nil, err
16474	}
16475	ret := &ListCreativeStatusBreakdownByDetailResponse{
16476		ServerResponse: googleapi.ServerResponse{
16477			Header:         res.Header,
16478			HTTPStatusCode: res.StatusCode,
16479		},
16480	}
16481	target := &ret
16482	if err := gensupport.DecodeResponse(target, res); err != nil {
16483		return nil, err
16484	}
16485	return ret, nil
16486	// {
16487	//   "description": "List all details associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each detail.",
16488	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/filteredBids/{creativeStatusId}/details",
16489	//   "httpMethod": "GET",
16490	//   "id": "adexchangebuyer2.bidders.filterSets.filteredBids.details.list",
16491	//   "parameterOrder": [
16492	//     "filterSetName",
16493	//     "creativeStatusId"
16494	//   ],
16495	//   "parameters": {
16496	//     "creativeStatusId": {
16497	//       "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/authorized-buyers/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.",
16498	//       "format": "int32",
16499	//       "location": "path",
16500	//       "required": true,
16501	//       "type": "integer"
16502	//     },
16503	//     "filterSetName": {
16504	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16505	//       "location": "path",
16506	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16507	//       "required": true,
16508	//       "type": "string"
16509	//     },
16510	//     "pageSize": {
16511	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
16512	//       "format": "int32",
16513	//       "location": "query",
16514	//       "type": "integer"
16515	//     },
16516	//     "pageToken": {
16517	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByDetailResponse.nextPageToken\nreturned from the previous call to the filteredBids.details.list\nmethod.",
16518	//       "location": "query",
16519	//       "type": "string"
16520	//     }
16521	//   },
16522	//   "path": "v2beta1/{+filterSetName}/filteredBids/{creativeStatusId}/details",
16523	//   "response": {
16524	//     "$ref": "ListCreativeStatusBreakdownByDetailResponse"
16525	//   },
16526	//   "scopes": [
16527	//     "https://www.googleapis.com/auth/adexchange.buyer"
16528	//   ]
16529	// }
16530
16531}
16532
16533// Pages invokes f for each page of results.
16534// A non-nil error returned from f will halt the iteration.
16535// The provided context supersedes any context provided to the Context method.
16536func (c *BiddersFilterSetsFilteredBidsDetailsListCall) Pages(ctx context.Context, f func(*ListCreativeStatusBreakdownByDetailResponse) error) error {
16537	c.ctx_ = ctx
16538	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16539	for {
16540		x, err := c.Do()
16541		if err != nil {
16542			return err
16543		}
16544		if err := f(x); err != nil {
16545			return err
16546		}
16547		if x.NextPageToken == "" {
16548			return nil
16549		}
16550		c.PageToken(x.NextPageToken)
16551	}
16552}
16553
16554// method id "adexchangebuyer2.bidders.filterSets.impressionMetrics.list":
16555
16556type BiddersFilterSetsImpressionMetricsListCall struct {
16557	s             *Service
16558	filterSetName string
16559	urlParams_    gensupport.URLParams
16560	ifNoneMatch_  string
16561	ctx_          context.Context
16562	header_       http.Header
16563}
16564
16565// List: Lists all metrics that are measured in terms of number of
16566// impressions.
16567func (r *BiddersFilterSetsImpressionMetricsService) List(filterSetName string) *BiddersFilterSetsImpressionMetricsListCall {
16568	c := &BiddersFilterSetsImpressionMetricsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16569	c.filterSetName = filterSetName
16570	return c
16571}
16572
16573// PageSize sets the optional parameter "pageSize": Requested page size.
16574// The server may return fewer results than requested.
16575// If unspecified, the server will pick an appropriate default.
16576func (c *BiddersFilterSetsImpressionMetricsListCall) PageSize(pageSize int64) *BiddersFilterSetsImpressionMetricsListCall {
16577	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16578	return c
16579}
16580
16581// PageToken sets the optional parameter "pageToken": A token
16582// identifying a page of results the server should return.
16583// Typically, this is the value
16584// of
16585// ListImpressionMetricsResponse.nextPageToken
16586// returned from the previous call to the impressionMetrics.list
16587// method.
16588func (c *BiddersFilterSetsImpressionMetricsListCall) PageToken(pageToken string) *BiddersFilterSetsImpressionMetricsListCall {
16589	c.urlParams_.Set("pageToken", pageToken)
16590	return c
16591}
16592
16593// Fields allows partial responses to be retrieved. See
16594// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16595// for more information.
16596func (c *BiddersFilterSetsImpressionMetricsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsImpressionMetricsListCall {
16597	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16598	return c
16599}
16600
16601// IfNoneMatch sets the optional parameter which makes the operation
16602// fail if the object's ETag matches the given value. This is useful for
16603// getting updates only after the object has changed since the last
16604// request. Use googleapi.IsNotModified to check whether the response
16605// error from Do is the result of In-None-Match.
16606func (c *BiddersFilterSetsImpressionMetricsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsImpressionMetricsListCall {
16607	c.ifNoneMatch_ = entityTag
16608	return c
16609}
16610
16611// Context sets the context to be used in this call's Do method. Any
16612// pending HTTP request will be aborted if the provided context is
16613// canceled.
16614func (c *BiddersFilterSetsImpressionMetricsListCall) Context(ctx context.Context) *BiddersFilterSetsImpressionMetricsListCall {
16615	c.ctx_ = ctx
16616	return c
16617}
16618
16619// Header returns an http.Header that can be modified by the caller to
16620// add HTTP headers to the request.
16621func (c *BiddersFilterSetsImpressionMetricsListCall) Header() http.Header {
16622	if c.header_ == nil {
16623		c.header_ = make(http.Header)
16624	}
16625	return c.header_
16626}
16627
16628func (c *BiddersFilterSetsImpressionMetricsListCall) doRequest(alt string) (*http.Response, error) {
16629	reqHeaders := make(http.Header)
16630	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
16631	for k, v := range c.header_ {
16632		reqHeaders[k] = v
16633	}
16634	reqHeaders.Set("User-Agent", c.s.userAgent())
16635	if c.ifNoneMatch_ != "" {
16636		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16637	}
16638	var body io.Reader = nil
16639	c.urlParams_.Set("alt", alt)
16640	c.urlParams_.Set("prettyPrint", "false")
16641	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/impressionMetrics")
16642	urls += "?" + c.urlParams_.Encode()
16643	req, err := http.NewRequest("GET", urls, body)
16644	if err != nil {
16645		return nil, err
16646	}
16647	req.Header = reqHeaders
16648	googleapi.Expand(req.URL, map[string]string{
16649		"filterSetName": c.filterSetName,
16650	})
16651	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16652}
16653
16654// Do executes the "adexchangebuyer2.bidders.filterSets.impressionMetrics.list" call.
16655// Exactly one of *ListImpressionMetricsResponse or error will be
16656// non-nil. Any non-2xx status code is an error. Response headers are in
16657// either *ListImpressionMetricsResponse.ServerResponse.Header or (if a
16658// response was returned at all) in error.(*googleapi.Error).Header. Use
16659// googleapi.IsNotModified to check whether the returned error was
16660// because http.StatusNotModified was returned.
16661func (c *BiddersFilterSetsImpressionMetricsListCall) Do(opts ...googleapi.CallOption) (*ListImpressionMetricsResponse, error) {
16662	gensupport.SetOptions(c.urlParams_, opts...)
16663	res, err := c.doRequest("json")
16664	if res != nil && res.StatusCode == http.StatusNotModified {
16665		if res.Body != nil {
16666			res.Body.Close()
16667		}
16668		return nil, &googleapi.Error{
16669			Code:   res.StatusCode,
16670			Header: res.Header,
16671		}
16672	}
16673	if err != nil {
16674		return nil, err
16675	}
16676	defer googleapi.CloseBody(res)
16677	if err := googleapi.CheckResponse(res); err != nil {
16678		return nil, err
16679	}
16680	ret := &ListImpressionMetricsResponse{
16681		ServerResponse: googleapi.ServerResponse{
16682			Header:         res.Header,
16683			HTTPStatusCode: res.StatusCode,
16684		},
16685	}
16686	target := &ret
16687	if err := gensupport.DecodeResponse(target, res); err != nil {
16688		return nil, err
16689	}
16690	return ret, nil
16691	// {
16692	//   "description": "Lists all metrics that are measured in terms of number of impressions.",
16693	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/impressionMetrics",
16694	//   "httpMethod": "GET",
16695	//   "id": "adexchangebuyer2.bidders.filterSets.impressionMetrics.list",
16696	//   "parameterOrder": [
16697	//     "filterSetName"
16698	//   ],
16699	//   "parameters": {
16700	//     "filterSetName": {
16701	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16702	//       "location": "path",
16703	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16704	//       "required": true,
16705	//       "type": "string"
16706	//     },
16707	//     "pageSize": {
16708	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
16709	//       "format": "int32",
16710	//       "location": "query",
16711	//       "type": "integer"
16712	//     },
16713	//     "pageToken": {
16714	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListImpressionMetricsResponse.nextPageToken\nreturned from the previous call to the impressionMetrics.list\nmethod.",
16715	//       "location": "query",
16716	//       "type": "string"
16717	//     }
16718	//   },
16719	//   "path": "v2beta1/{+filterSetName}/impressionMetrics",
16720	//   "response": {
16721	//     "$ref": "ListImpressionMetricsResponse"
16722	//   },
16723	//   "scopes": [
16724	//     "https://www.googleapis.com/auth/adexchange.buyer"
16725	//   ]
16726	// }
16727
16728}
16729
16730// Pages invokes f for each page of results.
16731// A non-nil error returned from f will halt the iteration.
16732// The provided context supersedes any context provided to the Context method.
16733func (c *BiddersFilterSetsImpressionMetricsListCall) Pages(ctx context.Context, f func(*ListImpressionMetricsResponse) error) error {
16734	c.ctx_ = ctx
16735	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16736	for {
16737		x, err := c.Do()
16738		if err != nil {
16739			return err
16740		}
16741		if err := f(x); err != nil {
16742			return err
16743		}
16744		if x.NextPageToken == "" {
16745			return nil
16746		}
16747		c.PageToken(x.NextPageToken)
16748	}
16749}
16750
16751// method id "adexchangebuyer2.bidders.filterSets.losingBids.list":
16752
16753type BiddersFilterSetsLosingBidsListCall struct {
16754	s             *Service
16755	filterSetName string
16756	urlParams_    gensupport.URLParams
16757	ifNoneMatch_  string
16758	ctx_          context.Context
16759	header_       http.Header
16760}
16761
16762// List: List all reasons for which bids lost in the auction, with the
16763// number of
16764// bids that lost for each reason.
16765func (r *BiddersFilterSetsLosingBidsService) List(filterSetName string) *BiddersFilterSetsLosingBidsListCall {
16766	c := &BiddersFilterSetsLosingBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16767	c.filterSetName = filterSetName
16768	return c
16769}
16770
16771// PageSize sets the optional parameter "pageSize": Requested page size.
16772// The server may return fewer results than requested.
16773// If unspecified, the server will pick an appropriate default.
16774func (c *BiddersFilterSetsLosingBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsLosingBidsListCall {
16775	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16776	return c
16777}
16778
16779// PageToken sets the optional parameter "pageToken": A token
16780// identifying a page of results the server should return.
16781// Typically, this is the value
16782// of
16783// ListLosingBidsResponse.nextPageToken
16784// returned from the previous call to the losingBids.list
16785// method.
16786func (c *BiddersFilterSetsLosingBidsListCall) PageToken(pageToken string) *BiddersFilterSetsLosingBidsListCall {
16787	c.urlParams_.Set("pageToken", pageToken)
16788	return c
16789}
16790
16791// Fields allows partial responses to be retrieved. See
16792// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16793// for more information.
16794func (c *BiddersFilterSetsLosingBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsLosingBidsListCall {
16795	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16796	return c
16797}
16798
16799// IfNoneMatch sets the optional parameter which makes the operation
16800// fail if the object's ETag matches the given value. This is useful for
16801// getting updates only after the object has changed since the last
16802// request. Use googleapi.IsNotModified to check whether the response
16803// error from Do is the result of In-None-Match.
16804func (c *BiddersFilterSetsLosingBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsLosingBidsListCall {
16805	c.ifNoneMatch_ = entityTag
16806	return c
16807}
16808
16809// Context sets the context to be used in this call's Do method. Any
16810// pending HTTP request will be aborted if the provided context is
16811// canceled.
16812func (c *BiddersFilterSetsLosingBidsListCall) Context(ctx context.Context) *BiddersFilterSetsLosingBidsListCall {
16813	c.ctx_ = ctx
16814	return c
16815}
16816
16817// Header returns an http.Header that can be modified by the caller to
16818// add HTTP headers to the request.
16819func (c *BiddersFilterSetsLosingBidsListCall) Header() http.Header {
16820	if c.header_ == nil {
16821		c.header_ = make(http.Header)
16822	}
16823	return c.header_
16824}
16825
16826func (c *BiddersFilterSetsLosingBidsListCall) doRequest(alt string) (*http.Response, error) {
16827	reqHeaders := make(http.Header)
16828	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
16829	for k, v := range c.header_ {
16830		reqHeaders[k] = v
16831	}
16832	reqHeaders.Set("User-Agent", c.s.userAgent())
16833	if c.ifNoneMatch_ != "" {
16834		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16835	}
16836	var body io.Reader = nil
16837	c.urlParams_.Set("alt", alt)
16838	c.urlParams_.Set("prettyPrint", "false")
16839	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/losingBids")
16840	urls += "?" + c.urlParams_.Encode()
16841	req, err := http.NewRequest("GET", urls, body)
16842	if err != nil {
16843		return nil, err
16844	}
16845	req.Header = reqHeaders
16846	googleapi.Expand(req.URL, map[string]string{
16847		"filterSetName": c.filterSetName,
16848	})
16849	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16850}
16851
16852// Do executes the "adexchangebuyer2.bidders.filterSets.losingBids.list" call.
16853// Exactly one of *ListLosingBidsResponse or error will be non-nil. Any
16854// non-2xx status code is an error. Response headers are in either
16855// *ListLosingBidsResponse.ServerResponse.Header or (if a response was
16856// returned at all) in error.(*googleapi.Error).Header. Use
16857// googleapi.IsNotModified to check whether the returned error was
16858// because http.StatusNotModified was returned.
16859func (c *BiddersFilterSetsLosingBidsListCall) Do(opts ...googleapi.CallOption) (*ListLosingBidsResponse, error) {
16860	gensupport.SetOptions(c.urlParams_, opts...)
16861	res, err := c.doRequest("json")
16862	if res != nil && res.StatusCode == http.StatusNotModified {
16863		if res.Body != nil {
16864			res.Body.Close()
16865		}
16866		return nil, &googleapi.Error{
16867			Code:   res.StatusCode,
16868			Header: res.Header,
16869		}
16870	}
16871	if err != nil {
16872		return nil, err
16873	}
16874	defer googleapi.CloseBody(res)
16875	if err := googleapi.CheckResponse(res); err != nil {
16876		return nil, err
16877	}
16878	ret := &ListLosingBidsResponse{
16879		ServerResponse: googleapi.ServerResponse{
16880			Header:         res.Header,
16881			HTTPStatusCode: res.StatusCode,
16882		},
16883	}
16884	target := &ret
16885	if err := gensupport.DecodeResponse(target, res); err != nil {
16886		return nil, err
16887	}
16888	return ret, nil
16889	// {
16890	//   "description": "List all reasons for which bids lost in the auction, with the number of\nbids that lost for each reason.",
16891	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/losingBids",
16892	//   "httpMethod": "GET",
16893	//   "id": "adexchangebuyer2.bidders.filterSets.losingBids.list",
16894	//   "parameterOrder": [
16895	//     "filterSetName"
16896	//   ],
16897	//   "parameters": {
16898	//     "filterSetName": {
16899	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
16900	//       "location": "path",
16901	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
16902	//       "required": true,
16903	//       "type": "string"
16904	//     },
16905	//     "pageSize": {
16906	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
16907	//       "format": "int32",
16908	//       "location": "query",
16909	//       "type": "integer"
16910	//     },
16911	//     "pageToken": {
16912	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListLosingBidsResponse.nextPageToken\nreturned from the previous call to the losingBids.list\nmethod.",
16913	//       "location": "query",
16914	//       "type": "string"
16915	//     }
16916	//   },
16917	//   "path": "v2beta1/{+filterSetName}/losingBids",
16918	//   "response": {
16919	//     "$ref": "ListLosingBidsResponse"
16920	//   },
16921	//   "scopes": [
16922	//     "https://www.googleapis.com/auth/adexchange.buyer"
16923	//   ]
16924	// }
16925
16926}
16927
16928// Pages invokes f for each page of results.
16929// A non-nil error returned from f will halt the iteration.
16930// The provided context supersedes any context provided to the Context method.
16931func (c *BiddersFilterSetsLosingBidsListCall) Pages(ctx context.Context, f func(*ListLosingBidsResponse) error) error {
16932	c.ctx_ = ctx
16933	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
16934	for {
16935		x, err := c.Do()
16936		if err != nil {
16937			return err
16938		}
16939		if err := f(x); err != nil {
16940			return err
16941		}
16942		if x.NextPageToken == "" {
16943			return nil
16944		}
16945		c.PageToken(x.NextPageToken)
16946	}
16947}
16948
16949// method id "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list":
16950
16951type BiddersFilterSetsNonBillableWinningBidsListCall struct {
16952	s             *Service
16953	filterSetName string
16954	urlParams_    gensupport.URLParams
16955	ifNoneMatch_  string
16956	ctx_          context.Context
16957	header_       http.Header
16958}
16959
16960// List: List all reasons for which winning bids were not billable, with
16961// the number
16962// of bids not billed for each reason.
16963func (r *BiddersFilterSetsNonBillableWinningBidsService) List(filterSetName string) *BiddersFilterSetsNonBillableWinningBidsListCall {
16964	c := &BiddersFilterSetsNonBillableWinningBidsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16965	c.filterSetName = filterSetName
16966	return c
16967}
16968
16969// PageSize sets the optional parameter "pageSize": Requested page size.
16970// The server may return fewer results than requested.
16971// If unspecified, the server will pick an appropriate default.
16972func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageSize(pageSize int64) *BiddersFilterSetsNonBillableWinningBidsListCall {
16973	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
16974	return c
16975}
16976
16977// PageToken sets the optional parameter "pageToken": A token
16978// identifying a page of results the server should return.
16979// Typically, this is the value
16980// of
16981// ListNonBillableWinningBidsResponse.nextPageToken
16982// returned from the previous call to the
16983// nonBillableWinningBids.list
16984// method.
16985func (c *BiddersFilterSetsNonBillableWinningBidsListCall) PageToken(pageToken string) *BiddersFilterSetsNonBillableWinningBidsListCall {
16986	c.urlParams_.Set("pageToken", pageToken)
16987	return c
16988}
16989
16990// Fields allows partial responses to be retrieved. See
16991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16992// for more information.
16993func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Fields(s ...googleapi.Field) *BiddersFilterSetsNonBillableWinningBidsListCall {
16994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16995	return c
16996}
16997
16998// IfNoneMatch sets the optional parameter which makes the operation
16999// fail if the object's ETag matches the given value. This is useful for
17000// getting updates only after the object has changed since the last
17001// request. Use googleapi.IsNotModified to check whether the response
17002// error from Do is the result of In-None-Match.
17003func (c *BiddersFilterSetsNonBillableWinningBidsListCall) IfNoneMatch(entityTag string) *BiddersFilterSetsNonBillableWinningBidsListCall {
17004	c.ifNoneMatch_ = entityTag
17005	return c
17006}
17007
17008// Context sets the context to be used in this call's Do method. Any
17009// pending HTTP request will be aborted if the provided context is
17010// canceled.
17011func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Context(ctx context.Context) *BiddersFilterSetsNonBillableWinningBidsListCall {
17012	c.ctx_ = ctx
17013	return c
17014}
17015
17016// Header returns an http.Header that can be modified by the caller to
17017// add HTTP headers to the request.
17018func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Header() http.Header {
17019	if c.header_ == nil {
17020		c.header_ = make(http.Header)
17021	}
17022	return c.header_
17023}
17024
17025func (c *BiddersFilterSetsNonBillableWinningBidsListCall) doRequest(alt string) (*http.Response, error) {
17026	reqHeaders := make(http.Header)
17027	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200707")
17028	for k, v := range c.header_ {
17029		reqHeaders[k] = v
17030	}
17031	reqHeaders.Set("User-Agent", c.s.userAgent())
17032	if c.ifNoneMatch_ != "" {
17033		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17034	}
17035	var body io.Reader = nil
17036	c.urlParams_.Set("alt", alt)
17037	c.urlParams_.Set("prettyPrint", "false")
17038	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta1/{+filterSetName}/nonBillableWinningBids")
17039	urls += "?" + c.urlParams_.Encode()
17040	req, err := http.NewRequest("GET", urls, body)
17041	if err != nil {
17042		return nil, err
17043	}
17044	req.Header = reqHeaders
17045	googleapi.Expand(req.URL, map[string]string{
17046		"filterSetName": c.filterSetName,
17047	})
17048	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17049}
17050
17051// Do executes the "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list" call.
17052// Exactly one of *ListNonBillableWinningBidsResponse or error will be
17053// non-nil. Any non-2xx status code is an error. Response headers are in
17054// either *ListNonBillableWinningBidsResponse.ServerResponse.Header or
17055// (if a response was returned at all) in
17056// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
17057// whether the returned error was because http.StatusNotModified was
17058// returned.
17059func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Do(opts ...googleapi.CallOption) (*ListNonBillableWinningBidsResponse, error) {
17060	gensupport.SetOptions(c.urlParams_, opts...)
17061	res, err := c.doRequest("json")
17062	if res != nil && res.StatusCode == http.StatusNotModified {
17063		if res.Body != nil {
17064			res.Body.Close()
17065		}
17066		return nil, &googleapi.Error{
17067			Code:   res.StatusCode,
17068			Header: res.Header,
17069		}
17070	}
17071	if err != nil {
17072		return nil, err
17073	}
17074	defer googleapi.CloseBody(res)
17075	if err := googleapi.CheckResponse(res); err != nil {
17076		return nil, err
17077	}
17078	ret := &ListNonBillableWinningBidsResponse{
17079		ServerResponse: googleapi.ServerResponse{
17080			Header:         res.Header,
17081			HTTPStatusCode: res.StatusCode,
17082		},
17083	}
17084	target := &ret
17085	if err := gensupport.DecodeResponse(target, res); err != nil {
17086		return nil, err
17087	}
17088	return ret, nil
17089	// {
17090	//   "description": "List all reasons for which winning bids were not billable, with the number\nof bids not billed for each reason.",
17091	//   "flatPath": "v2beta1/bidders/{biddersId}/filterSets/{filterSetsId}/nonBillableWinningBids",
17092	//   "httpMethod": "GET",
17093	//   "id": "adexchangebuyer2.bidders.filterSets.nonBillableWinningBids.list",
17094	//   "parameterOrder": [
17095	//     "filterSetName"
17096	//   ],
17097	//   "parameters": {
17098	//     "filterSetName": {
17099	//       "description": "Name of the filter set that should be applied to the requested metrics.\nFor example:\n\n- For a bidder-level filter set for bidder 123:\n  `bidders/123/filterSets/abc`\n\n- For an account-level filter set for the buyer account representing bidder\n  123: `bidders/123/accounts/123/filterSets/abc`\n\n- For an account-level filter set for the child seat buyer account 456\n  whose bidder is 123: `bidders/123/accounts/456/filterSets/abc`",
17100	//       "location": "path",
17101	//       "pattern": "^bidders/[^/]+/filterSets/[^/]+$",
17102	//       "required": true,
17103	//       "type": "string"
17104	//     },
17105	//     "pageSize": {
17106	//       "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.",
17107	//       "format": "int32",
17108	//       "location": "query",
17109	//       "type": "integer"
17110	//     },
17111	//     "pageToken": {
17112	//       "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListNonBillableWinningBidsResponse.nextPageToken\nreturned from the previous call to the nonBillableWinningBids.list\nmethod.",
17113	//       "location": "query",
17114	//       "type": "string"
17115	//     }
17116	//   },
17117	//   "path": "v2beta1/{+filterSetName}/nonBillableWinningBids",
17118	//   "response": {
17119	//     "$ref": "ListNonBillableWinningBidsResponse"
17120	//   },
17121	//   "scopes": [
17122	//     "https://www.googleapis.com/auth/adexchange.buyer"
17123	//   ]
17124	// }
17125
17126}
17127
17128// Pages invokes f for each page of results.
17129// A non-nil error returned from f will halt the iteration.
17130// The provided context supersedes any context provided to the Context method.
17131func (c *BiddersFilterSetsNonBillableWinningBidsListCall) Pages(ctx context.Context, f func(*ListNonBillableWinningBidsResponse) error) error {
17132	c.ctx_ = ctx
17133	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17134	for {
17135		x, err := c.Do()
17136		if err != nil {
17137			return err
17138		}
17139		if err := f(x); err != nil {
17140			return err
17141		}
17142		if x.NextPageToken == "" {
17143			return nil
17144		}
17145		c.PageToken(x.NextPageToken)
17146	}
17147}
17148