...

Source file src/google.golang.org/api/authorizedbuyersmarketplace/v1/authorizedbuyersmarketplace-gen.go

Documentation: google.golang.org/api/authorizedbuyersmarketplace/v1

     1  // Copyright 2024 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 authorizedbuyersmarketplace provides access to the Authorized Buyers Marketplace API.
     8  //
     9  // For product documentation, see: https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/authorizedbuyersmarketplace/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package authorizedbuyersmarketplace // import "google.golang.org/api/authorizedbuyersmarketplace/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "authorizedbuyersmarketplace:v1"
    90  const apiName = "authorizedbuyersmarketplace"
    91  const apiVersion = "v1"
    92  const basePath = "https://authorizedbuyersmarketplace.googleapis.com/"
    93  const basePathTemplate = "https://authorizedbuyersmarketplace.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://authorizedbuyersmarketplace.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, create, edit, and delete your Authorized Buyers Marketplace entities.
    99  	AuthorizedBuyersMarketplaceScope = "https://www.googleapis.com/auth/authorized-buyers-marketplace"
   100  )
   101  
   102  // NewService creates a new Service.
   103  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   104  	scopesOption := internaloption.WithDefaultScopes(
   105  		"https://www.googleapis.com/auth/authorized-buyers-marketplace",
   106  	)
   107  	// NOTE: prepend, so we don't override user-specified scopes.
   108  	opts = append([]option.ClientOption{scopesOption}, opts...)
   109  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   110  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   111  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   112  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   113  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   114  	if err != nil {
   115  		return nil, err
   116  	}
   117  	s, err := New(client)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	if endpoint != "" {
   122  		s.BasePath = endpoint
   123  	}
   124  	return s, nil
   125  }
   126  
   127  // New creates a new Service. It uses the provided http.Client for requests.
   128  //
   129  // Deprecated: please use NewService instead.
   130  // To provide a custom HTTP client, use option.WithHTTPClient.
   131  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   132  func New(client *http.Client) (*Service, error) {
   133  	if client == nil {
   134  		return nil, errors.New("client is nil")
   135  	}
   136  	s := &Service{client: client, BasePath: basePath}
   137  	s.Bidders = NewBiddersService(s)
   138  	s.Buyers = NewBuyersService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Bidders *BiddersService
   148  
   149  	Buyers *BuyersService
   150  }
   151  
   152  func (s *Service) userAgent() string {
   153  	if s.UserAgent == "" {
   154  		return googleapi.UserAgent
   155  	}
   156  	return googleapi.UserAgent + " " + s.UserAgent
   157  }
   158  
   159  func NewBiddersService(s *Service) *BiddersService {
   160  	rs := &BiddersService{s: s}
   161  	rs.AuctionPackages = NewBiddersAuctionPackagesService(s)
   162  	rs.FinalizedDeals = NewBiddersFinalizedDealsService(s)
   163  	return rs
   164  }
   165  
   166  type BiddersService struct {
   167  	s *Service
   168  
   169  	AuctionPackages *BiddersAuctionPackagesService
   170  
   171  	FinalizedDeals *BiddersFinalizedDealsService
   172  }
   173  
   174  func NewBiddersAuctionPackagesService(s *Service) *BiddersAuctionPackagesService {
   175  	rs := &BiddersAuctionPackagesService{s: s}
   176  	return rs
   177  }
   178  
   179  type BiddersAuctionPackagesService struct {
   180  	s *Service
   181  }
   182  
   183  func NewBiddersFinalizedDealsService(s *Service) *BiddersFinalizedDealsService {
   184  	rs := &BiddersFinalizedDealsService{s: s}
   185  	return rs
   186  }
   187  
   188  type BiddersFinalizedDealsService struct {
   189  	s *Service
   190  }
   191  
   192  func NewBuyersService(s *Service) *BuyersService {
   193  	rs := &BuyersService{s: s}
   194  	rs.AuctionPackages = NewBuyersAuctionPackagesService(s)
   195  	rs.Clients = NewBuyersClientsService(s)
   196  	rs.FinalizedDeals = NewBuyersFinalizedDealsService(s)
   197  	rs.Proposals = NewBuyersProposalsService(s)
   198  	rs.PublisherProfiles = NewBuyersPublisherProfilesService(s)
   199  	return rs
   200  }
   201  
   202  type BuyersService struct {
   203  	s *Service
   204  
   205  	AuctionPackages *BuyersAuctionPackagesService
   206  
   207  	Clients *BuyersClientsService
   208  
   209  	FinalizedDeals *BuyersFinalizedDealsService
   210  
   211  	Proposals *BuyersProposalsService
   212  
   213  	PublisherProfiles *BuyersPublisherProfilesService
   214  }
   215  
   216  func NewBuyersAuctionPackagesService(s *Service) *BuyersAuctionPackagesService {
   217  	rs := &BuyersAuctionPackagesService{s: s}
   218  	return rs
   219  }
   220  
   221  type BuyersAuctionPackagesService struct {
   222  	s *Service
   223  }
   224  
   225  func NewBuyersClientsService(s *Service) *BuyersClientsService {
   226  	rs := &BuyersClientsService{s: s}
   227  	rs.Users = NewBuyersClientsUsersService(s)
   228  	return rs
   229  }
   230  
   231  type BuyersClientsService struct {
   232  	s *Service
   233  
   234  	Users *BuyersClientsUsersService
   235  }
   236  
   237  func NewBuyersClientsUsersService(s *Service) *BuyersClientsUsersService {
   238  	rs := &BuyersClientsUsersService{s: s}
   239  	return rs
   240  }
   241  
   242  type BuyersClientsUsersService struct {
   243  	s *Service
   244  }
   245  
   246  func NewBuyersFinalizedDealsService(s *Service) *BuyersFinalizedDealsService {
   247  	rs := &BuyersFinalizedDealsService{s: s}
   248  	return rs
   249  }
   250  
   251  type BuyersFinalizedDealsService struct {
   252  	s *Service
   253  }
   254  
   255  func NewBuyersProposalsService(s *Service) *BuyersProposalsService {
   256  	rs := &BuyersProposalsService{s: s}
   257  	rs.Deals = NewBuyersProposalsDealsService(s)
   258  	return rs
   259  }
   260  
   261  type BuyersProposalsService struct {
   262  	s *Service
   263  
   264  	Deals *BuyersProposalsDealsService
   265  }
   266  
   267  func NewBuyersProposalsDealsService(s *Service) *BuyersProposalsDealsService {
   268  	rs := &BuyersProposalsDealsService{s: s}
   269  	return rs
   270  }
   271  
   272  type BuyersProposalsDealsService struct {
   273  	s *Service
   274  }
   275  
   276  func NewBuyersPublisherProfilesService(s *Service) *BuyersPublisherProfilesService {
   277  	rs := &BuyersPublisherProfilesService{s: s}
   278  	return rs
   279  }
   280  
   281  type BuyersPublisherProfilesService struct {
   282  	s *Service
   283  }
   284  
   285  // AcceptProposalRequest: Request to accept a proposal. Accepting a proposal
   286  // implies acceptance of the publisher terms_and_conditions, if any.
   287  type AcceptProposalRequest struct {
   288  	// ProposalRevision: The last known client revision number of the proposal.
   289  	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
   290  	// ForceSendFields is a list of field names (e.g. "ProposalRevision") to
   291  	// unconditionally include in API requests. By default, fields with empty or
   292  	// default values are omitted from API requests. See
   293  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   294  	// details.
   295  	ForceSendFields []string `json:"-"`
   296  	// NullFields is a list of field names (e.g. "ProposalRevision") to include in
   297  	// API requests with the JSON null value. By default, fields with empty values
   298  	// are omitted from API requests. See
   299  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   300  	NullFields []string `json:"-"`
   301  }
   302  
   303  func (s *AcceptProposalRequest) MarshalJSON() ([]byte, error) {
   304  	type NoMethod AcceptProposalRequest
   305  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   306  }
   307  
   308  // ActivateClientRequest: Request message for activating a client.
   309  type ActivateClientRequest struct {
   310  }
   311  
   312  // ActivateClientUserRequest: Request message for activating a client user.
   313  type ActivateClientUserRequest struct {
   314  }
   315  
   316  // AdSize: Represents size of a single ad slot, or a creative.
   317  type AdSize struct {
   318  	// Height: The height of the ad slot in pixels. This field will be present only
   319  	// when size type is `PIXEL`.
   320  	Height int64 `json:"height,omitempty,string"`
   321  	// Type: The type of the ad slot size.
   322  	//
   323  	// Possible values:
   324  	//   "TYPE_UNSPECIFIED" - A placeholder for an undefined size type.
   325  	//   "PIXEL" - Ad slot with size specified by height and width in pixels.
   326  	//   "INTERSTITIAL" - Special size to describe an interstitial ad slot.
   327  	//   "NATIVE" - Native (mobile) ads rendered by the publisher.
   328  	//   "FLUID" - Fluid size (responsive size) can be resized automatically with
   329  	// the change of outside environment.
   330  	Type string `json:"type,omitempty"`
   331  	// Width: The width of the ad slot in pixels. This field will be present only
   332  	// when size type is `PIXEL`.
   333  	Width int64 `json:"width,omitempty,string"`
   334  	// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
   335  	// include in API requests. By default, fields with empty or default values are
   336  	// omitted from API requests. See
   337  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   338  	// details.
   339  	ForceSendFields []string `json:"-"`
   340  	// NullFields is a list of field names (e.g. "Height") to include in API
   341  	// requests with the JSON null value. By default, fields with empty values are
   342  	// omitted from API requests. See
   343  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   344  	NullFields []string `json:"-"`
   345  }
   346  
   347  func (s *AdSize) MarshalJSON() ([]byte, error) {
   348  	type NoMethod AdSize
   349  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   350  }
   351  
   352  // AddCreativeRequest: Request message for adding creative to be used in the
   353  // bidding process for the finalized deal.
   354  type AddCreativeRequest struct {
   355  	// Creative: Name of the creative to add to the finalized deal, in the format
   356  	// `buyers/{buyerAccountId}/creatives/{creativeId}`. See creative.name.
   357  	Creative string `json:"creative,omitempty"`
   358  	// ForceSendFields is a list of field names (e.g. "Creative") to
   359  	// unconditionally include in API requests. By default, fields with empty or
   360  	// default values are omitted from API requests. See
   361  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   362  	// details.
   363  	ForceSendFields []string `json:"-"`
   364  	// NullFields is a list of field names (e.g. "Creative") to include in API
   365  	// requests with the JSON null value. By default, fields with empty values are
   366  	// omitted from API requests. See
   367  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   368  	NullFields []string `json:"-"`
   369  }
   370  
   371  func (s *AddCreativeRequest) MarshalJSON() ([]byte, error) {
   372  	type NoMethod AddCreativeRequest
   373  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   374  }
   375  
   376  // AddNoteRequest: Request to add a note.
   377  type AddNoteRequest struct {
   378  	// Note: The note to add.
   379  	Note *Note `json:"note,omitempty"`
   380  	// ForceSendFields is a list of field names (e.g. "Note") to unconditionally
   381  	// include in API requests. By default, fields with empty or default values are
   382  	// omitted from API requests. See
   383  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   384  	// details.
   385  	ForceSendFields []string `json:"-"`
   386  	// NullFields is a list of field names (e.g. "Note") to include in API requests
   387  	// with the JSON null value. By default, fields with empty values are omitted
   388  	// from API requests. See
   389  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   390  	NullFields []string `json:"-"`
   391  }
   392  
   393  func (s *AddNoteRequest) MarshalJSON() ([]byte, error) {
   394  	type NoMethod AddNoteRequest
   395  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   396  }
   397  
   398  // AuctionPackage: Defines a segment of inventory that buyer wants to buy. It's
   399  // created by buyer and could be shared with multiple buyers.
   400  type AuctionPackage struct {
   401  	// CreateTime: Output only. Time the auction package was created.
   402  	CreateTime string `json:"createTime,omitempty"`
   403  	// Creator: Output only. The buyer that created this auction package. Format:
   404  	// `buyers/{buyerAccountId}`
   405  	Creator string `json:"creator,omitempty"`
   406  	// Description: Output only. A description of the auction package.
   407  	Description string `json:"description,omitempty"`
   408  	// DisplayName: The display_name assigned to the auction package.
   409  	DisplayName string `json:"displayName,omitempty"`
   410  	// EligibleSeatIds: Output only. If set, this field contains the list of DSP
   411  	// specific seat ids set by media planners that are eligible to transact on
   412  	// this deal. The seat ID is in the calling DSP's namespace.
   413  	EligibleSeatIds []string `json:"eligibleSeatIds,omitempty"`
   414  	// Name: Immutable. The unique identifier for the auction package. Format:
   415  	// `buyers/{accountId}/auctionPackages/{auctionPackageId}` The
   416  	// auction_package_id part of name is sent in the BidRequest to all RTB bidders
   417  	// and is returned as deal_id by the bidder in the BidResponse.
   418  	Name string `json:"name,omitempty"`
   419  	// SubscribedBuyers: Output only. The list of buyers that are subscribed to the
   420  	// AuctionPackage. This field is only populated when calling as a bidder.
   421  	// Format: `buyers/{buyerAccountId}`
   422  	SubscribedBuyers []string `json:"subscribedBuyers,omitempty"`
   423  	// SubscribedClients: Output only. When calling as a buyer, the list of clients
   424  	// of the current buyer that are subscribed to the AuctionPackage. When calling
   425  	// as a bidder, the list of clients that are subscribed to the AuctionPackage
   426  	// owned by the bidder or its buyers. Format:
   427  	// `buyers/{buyerAccountId}/clients/{clientAccountId}`
   428  	SubscribedClients []string `json:"subscribedClients,omitempty"`
   429  	// SubscribedMediaPlanners: Output only. The list of media planners that are
   430  	// subscribed to the AuctionPackage. This field is only populated when calling
   431  	// as a bidder.
   432  	SubscribedMediaPlanners []*MediaPlanner `json:"subscribedMediaPlanners,omitempty"`
   433  	// UpdateTime: Output only. Time the auction package was last updated. This
   434  	// value is only increased when this auction package is updated but never when
   435  	// a buyer subscribed.
   436  	UpdateTime string `json:"updateTime,omitempty"`
   437  
   438  	// ServerResponse contains the HTTP response code and headers from the server.
   439  	googleapi.ServerResponse `json:"-"`
   440  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   441  	// unconditionally include in API requests. By default, fields with empty or
   442  	// default values are omitted from API requests. See
   443  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   444  	// details.
   445  	ForceSendFields []string `json:"-"`
   446  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   447  	// requests with the JSON null value. By default, fields with empty values are
   448  	// omitted from API requests. See
   449  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   450  	NullFields []string `json:"-"`
   451  }
   452  
   453  func (s *AuctionPackage) MarshalJSON() ([]byte, error) {
   454  	type NoMethod AuctionPackage
   455  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   456  }
   457  
   458  // BatchUpdateDealsRequest: Request message for batch updating deals.
   459  type BatchUpdateDealsRequest struct {
   460  	// Requests: Required. List of request messages to update deals.
   461  	Requests []*UpdateDealRequest `json:"requests,omitempty"`
   462  	// ForceSendFields is a list of field names (e.g. "Requests") to
   463  	// unconditionally include in API requests. By default, fields with empty or
   464  	// default values are omitted from API requests. See
   465  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   466  	// details.
   467  	ForceSendFields []string `json:"-"`
   468  	// NullFields is a list of field names (e.g. "Requests") to include in API
   469  	// requests with the JSON null value. By default, fields with empty values are
   470  	// omitted from API requests. See
   471  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   472  	NullFields []string `json:"-"`
   473  }
   474  
   475  func (s *BatchUpdateDealsRequest) MarshalJSON() ([]byte, error) {
   476  	type NoMethod BatchUpdateDealsRequest
   477  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   478  }
   479  
   480  // BatchUpdateDealsResponse: Response message for batch updating deals.
   481  type BatchUpdateDealsResponse struct {
   482  	// Deals: Deals updated.
   483  	Deals []*Deal `json:"deals,omitempty"`
   484  
   485  	// ServerResponse contains the HTTP response code and headers from the server.
   486  	googleapi.ServerResponse `json:"-"`
   487  	// ForceSendFields is a list of field names (e.g. "Deals") to unconditionally
   488  	// include in API requests. By default, fields with empty or default values are
   489  	// omitted from API requests. See
   490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   491  	// details.
   492  	ForceSendFields []string `json:"-"`
   493  	// NullFields is a list of field names (e.g. "Deals") to include in API
   494  	// requests with the JSON null value. By default, fields with empty values are
   495  	// omitted from API requests. See
   496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   497  	NullFields []string `json:"-"`
   498  }
   499  
   500  func (s *BatchUpdateDealsResponse) MarshalJSON() ([]byte, error) {
   501  	type NoMethod BatchUpdateDealsResponse
   502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   503  }
   504  
   505  // CancelNegotiationRequest: Request to cancel an ongoing negotiation.
   506  type CancelNegotiationRequest struct {
   507  }
   508  
   509  // Client: A client represents an agency, a brand, or an advertiser customer of
   510  // the buyer. Based on the client's role, its client users will have varying
   511  // levels of restricted access to the Marketplace and certain other sections of
   512  // the Authorized Buyers UI.
   513  type Client struct {
   514  	// DisplayName: Required. Display name shown to publishers. Must be unique for
   515  	// clients without partnerClientId specified. Maximum length of 255 characters
   516  	// is allowed.
   517  	DisplayName string `json:"displayName,omitempty"`
   518  	// Name: Output only. The resource name of the client. Format:
   519  	// `buyers/{accountId}/clients/{clientAccountId}`
   520  	Name string `json:"name,omitempty"`
   521  	// PartnerClientId: Arbitrary unique identifier provided by the buyer. This
   522  	// field can be used to associate a client with an identifier in the namespace
   523  	// of the buyer, lookup clients by that identifier and verify whether an
   524  	// Authorized Buyers account of the client already exists. If present, must be
   525  	// unique across all the clients.
   526  	PartnerClientId string `json:"partnerClientId,omitempty"`
   527  	// Role: Required. The role assigned to the client. Each role implies a set of
   528  	// permissions granted to the client.
   529  	//
   530  	// Possible values:
   531  	//   "CLIENT_ROLE_UNSPECIFIED" - A placeholder for an undefined client role.
   532  	// This value should never be specified in user input for create or update
   533  	// method, otherwise an error will be returned.
   534  	//   "CLIENT_DEAL_VIEWER" - Users associated with this client role can only
   535  	// view proposals and deals in the Marketplace UI. They cannot negotiate or
   536  	// approve proposals and deals sent from publishers or send RFP to publishers.
   537  	//   "CLIENT_DEAL_NEGOTIATOR" - Users associated with this client role can view
   538  	// and negotiate on the proposals and deals in the Marketplace UI sent from
   539  	// publishers and send RFP to publishers, but cannot approve the proposals and
   540  	// deals by themselves. The buyer can approve the proposals and deals on behalf
   541  	// of the client.
   542  	//   "CLIENT_DEAL_APPROVER" - Users associated with this client role can view,
   543  	// negotiate and approve proposals and deals in the Marketplace UI and send RFP
   544  	// to publishers.
   545  	Role string `json:"role,omitempty"`
   546  	// SellerVisible: Whether the client will be visible to sellers.
   547  	SellerVisible bool `json:"sellerVisible,omitempty"`
   548  	// State: Output only. The state of the client.
   549  	//
   550  	// Possible values:
   551  	//   "STATE_UNSPECIFIED" - A placeholder for an undefined client state. Should
   552  	// not be used.
   553  	//   "ACTIVE" - A client that is currently active and allowed to access the
   554  	// Authorized Buyers UI.
   555  	//   "INACTIVE" - A client that is currently inactive and not allowed to access
   556  	// the Authorized Buyers UI.
   557  	State string `json:"state,omitempty"`
   558  
   559  	// ServerResponse contains the HTTP response code and headers from the server.
   560  	googleapi.ServerResponse `json:"-"`
   561  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   562  	// unconditionally include in API requests. By default, fields with empty or
   563  	// default values are omitted from API requests. See
   564  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   565  	// details.
   566  	ForceSendFields []string `json:"-"`
   567  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   568  	// requests with the JSON null value. By default, fields with empty values are
   569  	// omitted from API requests. See
   570  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   571  	NullFields []string `json:"-"`
   572  }
   573  
   574  func (s *Client) MarshalJSON() ([]byte, error) {
   575  	type NoMethod Client
   576  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   577  }
   578  
   579  // ClientUser: A user of a client who has restricted access to the Marketplace
   580  // and certain other sections of the Authorized Buyers UI based on the role
   581  // granted to the associated client.
   582  type ClientUser struct {
   583  	// Email: Required. The client user's email address that has to be unique
   584  	// across all users for the same client.
   585  	Email string `json:"email,omitempty"`
   586  	// Name: Output only. The resource name of the client user. Format:
   587  	// `buyers/{accountId}/clients/{clientAccountId}/users/{userId}`
   588  	Name string `json:"name,omitempty"`
   589  	// State: Output only. The state of the client user.
   590  	//
   591  	// Possible values:
   592  	//   "STATE_UNSPECIFIED" - A placeholder for an undefined user state.
   593  	//   "INVITED" - A user who was created but hasn't accepted the invitation yet,
   594  	// not allowed to access the Authorized Buyers UI.
   595  	//   "ACTIVE" - A user that is currently active and allowed to access the
   596  	// Authorized Buyers UI.
   597  	//   "INACTIVE" - A user that is currently inactive and not allowed to access
   598  	// the Authorized Buyers UI.
   599  	State string `json:"state,omitempty"`
   600  
   601  	// ServerResponse contains the HTTP response code and headers from the server.
   602  	googleapi.ServerResponse `json:"-"`
   603  	// ForceSendFields is a list of field names (e.g. "Email") to unconditionally
   604  	// include in API requests. By default, fields with empty or default values are
   605  	// omitted from API requests. See
   606  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   607  	// details.
   608  	ForceSendFields []string `json:"-"`
   609  	// NullFields is a list of field names (e.g. "Email") to include in API
   610  	// requests with the JSON null value. By default, fields with empty values are
   611  	// omitted from API requests. See
   612  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   613  	NullFields []string `json:"-"`
   614  }
   615  
   616  func (s *ClientUser) MarshalJSON() ([]byte, error) {
   617  	type NoMethod ClientUser
   618  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   619  }
   620  
   621  // Contact: Contains information on how a buyer or seller can be reached.
   622  type Contact struct {
   623  	// DisplayName: The display_name of the contact.
   624  	DisplayName string `json:"displayName,omitempty"`
   625  	// Email: Email address for the contact.
   626  	Email string `json:"email,omitempty"`
   627  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   628  	// unconditionally include in API requests. By default, fields with empty or
   629  	// default values are omitted from API requests. See
   630  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   631  	// details.
   632  	ForceSendFields []string `json:"-"`
   633  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   634  	// requests with the JSON null value. By default, fields with empty values are
   635  	// omitted from API requests. See
   636  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   637  	NullFields []string `json:"-"`
   638  }
   639  
   640  func (s *Contact) MarshalJSON() ([]byte, error) {
   641  	type NoMethod Contact
   642  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   643  }
   644  
   645  // CreativeRequirements: Message captures data about the creatives in the deal.
   646  type CreativeRequirements struct {
   647  	// CreativeFormat: Output only. The format of the creative, only applicable for
   648  	// programmatic guaranteed and preferred deals.
   649  	//
   650  	// Possible values:
   651  	//   "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an unspecified creative
   652  	// format.
   653  	//   "DISPLAY" - Banner creatives such as image or HTML5 assets.
   654  	//   "VIDEO" - Video creatives that can be played in a video player.
   655  	//   "AUDIO" - Audio creatives that can play during audio content or point to a
   656  	// third party ad server.
   657  	CreativeFormat string `json:"creativeFormat,omitempty"`
   658  	// CreativePreApprovalPolicy: Output only. Specifies the creative pre-approval
   659  	// policy.
   660  	//
   661  	// Possible values:
   662  	//   "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" - A placeholder for an
   663  	// undefined creative pre-approval policy.
   664  	//   "SELLER_PRE_APPROVAL_REQUIRED" - The seller needs to approve each creative
   665  	// before it can serve.
   666  	//   "SELLER_PRE_APPROVAL_NOT_REQUIRED" - The seller does not need to approve
   667  	// each creative before it can serve.
   668  	CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"`
   669  	// CreativeSafeFrameCompatibility: Output only. Specifies whether the creative
   670  	// is safeFrame compatible.
   671  	//
   672  	// Possible values:
   673  	//   "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" - A placeholder for an
   674  	// undefined creative safe-frame compatibility.
   675  	//   "COMPATIBLE" - The creatives need to be compatible with the safe frame
   676  	// option.
   677  	//   "INCOMPATIBLE" - The creatives can be incompatible with the safe frame
   678  	// option.
   679  	CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"`
   680  	// MaxAdDurationMs: Output only. The max duration of the video creative in
   681  	// milliseconds. only applicable for deals with video creatives.
   682  	MaxAdDurationMs int64 `json:"maxAdDurationMs,omitempty,string"`
   683  	// ProgrammaticCreativeSource: Output only. Specifies the creative source for
   684  	// programmatic deals. PUBLISHER means creative is provided by seller and
   685  	// ADVERTISER means creative is provided by the buyer.
   686  	//
   687  	// Possible values:
   688  	//   "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" - A placeholder for an
   689  	// undefined programmatic creative source.
   690  	//   "ADVERTISER" - The advertiser provides the creatives.
   691  	//   "PUBLISHER" - The publisher provides the creatives to be served.
   692  	ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"`
   693  	// SkippableAdType: Output only. Skippable video ads allow viewers to skip ads
   694  	// after 5 seconds. Only applicable for deals with video creatives.
   695  	//
   696  	// Possible values:
   697  	//   "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an unspecified
   698  	// skippable ad type.
   699  	//   "SKIPPABLE" - Video ad that can be skipped after 5 seconds. This value
   700  	// will appear in RTB bid requests as
   701  	// SkippableBidRequestType::REQUIRE_SKIPPABLE.
   702  	//   "INSTREAM_SELECT" - Video ad that can be skipped after 5 seconds, and is
   703  	// counted as engaged view after 30 seconds. The creative is hosted on YouTube
   704  	// only, and viewcount of the YouTube video increments after the engaged view.
   705  	// This value will appear in RTB bid requests as
   706  	// SkippableBidRequestType::REQUIRE_SKIPPABLE.
   707  	//   "NOT_SKIPPABLE" - This video ad is not skippable. This value will appear
   708  	// in RTB bid requests as SkippableBidRequestType::BLOCK_SKIPPABLE.
   709  	//   "ANY" - This video ad can be skipped after 5 seconds or not-skippable.
   710  	// This value will appear in RTB bid requests as
   711  	// SkippableBidRequestType::ALLOW_SKIPPABLE.
   712  	SkippableAdType string `json:"skippableAdType,omitempty"`
   713  	// ForceSendFields is a list of field names (e.g. "CreativeFormat") to
   714  	// unconditionally include in API requests. By default, fields with empty or
   715  	// default values are omitted from API requests. See
   716  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   717  	// details.
   718  	ForceSendFields []string `json:"-"`
   719  	// NullFields is a list of field names (e.g. "CreativeFormat") to include in
   720  	// API requests with the JSON null value. By default, fields with empty values
   721  	// are omitted from API requests. See
   722  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   723  	NullFields []string `json:"-"`
   724  }
   725  
   726  func (s *CreativeRequirements) MarshalJSON() ([]byte, error) {
   727  	type NoMethod CreativeRequirements
   728  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   729  }
   730  
   731  // CriteriaTargeting: Generic targeting used for targeting dimensions that
   732  // contains a list of included and excluded numeric IDs. This cannot be
   733  // filtered using list filter syntax.
   734  type CriteriaTargeting struct {
   735  	// ExcludedCriteriaIds: A list of numeric IDs to be excluded.
   736  	ExcludedCriteriaIds googleapi.Int64s `json:"excludedCriteriaIds,omitempty"`
   737  	// TargetedCriteriaIds: A list of numeric IDs to be included.
   738  	TargetedCriteriaIds googleapi.Int64s `json:"targetedCriteriaIds,omitempty"`
   739  	// ForceSendFields is a list of field names (e.g. "ExcludedCriteriaIds") to
   740  	// unconditionally include in API requests. By default, fields with empty or
   741  	// default values are omitted from API requests. See
   742  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   743  	// details.
   744  	ForceSendFields []string `json:"-"`
   745  	// NullFields is a list of field names (e.g. "ExcludedCriteriaIds") to include
   746  	// in API requests with the JSON null value. By default, fields with empty
   747  	// values are omitted from API requests. See
   748  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   749  	NullFields []string `json:"-"`
   750  }
   751  
   752  func (s *CriteriaTargeting) MarshalJSON() ([]byte, error) {
   753  	type NoMethod CriteriaTargeting
   754  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   755  }
   756  
   757  // DayPart: Defines targeting for a period of time on a specific week day.
   758  type DayPart struct {
   759  	// DayOfWeek: Day of week for the period.
   760  	//
   761  	// Possible values:
   762  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
   763  	//   "MONDAY" - Monday
   764  	//   "TUESDAY" - Tuesday
   765  	//   "WEDNESDAY" - Wednesday
   766  	//   "THURSDAY" - Thursday
   767  	//   "FRIDAY" - Friday
   768  	//   "SATURDAY" - Saturday
   769  	//   "SUNDAY" - Sunday
   770  	DayOfWeek string `json:"dayOfWeek,omitempty"`
   771  	// EndTime: Hours in 24 hour time between 0 and 24, inclusive. Note: 24 is
   772  	// logically equivalent to 0, but is supported since in some cases there may
   773  	// need to be differentiation made between midnight on one day and midnight on
   774  	// the next day. Accepted values for minutes are [0, 15, 30, 45]. 0 is the only
   775  	// acceptable minute value for hour 24. Seconds and nanos are ignored.
   776  	EndTime *TimeOfDay `json:"endTime,omitempty"`
   777  	// StartTime: Hours in 24 hour time between 0 and 24, inclusive. Note: 24 is
   778  	// logically equivalent to 0, but is supported since in some cases there may
   779  	// need to be differentiation made between midnight on one day and midnight on
   780  	// the next day. Accepted values for minutes are [0, 15, 30, 45]. 0 is the only
   781  	// acceptable minute value for hour 24. Seconds and nanos are ignored.
   782  	StartTime *TimeOfDay `json:"startTime,omitempty"`
   783  	// ForceSendFields is a list of field names (e.g. "DayOfWeek") to
   784  	// unconditionally include in API requests. By default, fields with empty or
   785  	// default values are omitted from API requests. See
   786  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   787  	// details.
   788  	ForceSendFields []string `json:"-"`
   789  	// NullFields is a list of field names (e.g. "DayOfWeek") to include in API
   790  	// requests with the JSON null value. By default, fields with empty values are
   791  	// omitted from API requests. See
   792  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   793  	NullFields []string `json:"-"`
   794  }
   795  
   796  func (s *DayPart) MarshalJSON() ([]byte, error) {
   797  	type NoMethod DayPart
   798  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   799  }
   800  
   801  // DayPartTargeting: Represents Daypart targeting.
   802  type DayPartTargeting struct {
   803  	// DayParts: The targeted weekdays and times
   804  	DayParts []*DayPart `json:"dayParts,omitempty"`
   805  	// TimeZoneType: The time zone type of the day parts
   806  	//
   807  	// Possible values:
   808  	//   "TIME_ZONE_TYPE_UNSPECIFIED" - Default value. This field is unused.
   809  	//   "SELLER" - The publisher's time zone
   810  	//   "USER" - The user's time zone
   811  	TimeZoneType string `json:"timeZoneType,omitempty"`
   812  	// ForceSendFields is a list of field names (e.g. "DayParts") to
   813  	// unconditionally include in API requests. By default, fields with empty or
   814  	// default values are omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   816  	// details.
   817  	ForceSendFields []string `json:"-"`
   818  	// NullFields is a list of field names (e.g. "DayParts") to include in API
   819  	// requests with the JSON null value. By default, fields with empty values are
   820  	// omitted from API requests. See
   821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   822  	NullFields []string `json:"-"`
   823  }
   824  
   825  func (s *DayPartTargeting) MarshalJSON() ([]byte, error) {
   826  	type NoMethod DayPartTargeting
   827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   828  }
   829  
   830  // DeactivateClientRequest: Request message for disabling a client.
   831  type DeactivateClientRequest struct {
   832  }
   833  
   834  // DeactivateClientUserRequest: Request message for deactivating a client user.
   835  type DeactivateClientUserRequest struct {
   836  }
   837  
   838  // Deal: A deal represents a segment of inventory for displaying ads that
   839  // contains the terms and targeting information that is used for serving as
   840  // well as the deal stats and status. Note: A proposal may contain multiple
   841  // deals.
   842  type Deal struct {
   843  	// BilledBuyer: Output only. When the client field is populated, this field
   844  	// refers to the buyer who creates and manages the client buyer and gets billed
   845  	// on behalf of the client buyer; when the buyer field is populated, this field
   846  	// is the same value as buyer; when the deal belongs to a media planner
   847  	// account, this field will be empty. Format : `buyers/{buyerAccountId}`
   848  	BilledBuyer string `json:"billedBuyer,omitempty"`
   849  	// Buyer: Output only. Refers to a buyer in Real-time Bidding API's Buyer
   850  	// resource. Format: `buyers/{buyerAccountId}`
   851  	Buyer string `json:"buyer,omitempty"`
   852  	// Client: Output only. Refers to a Client. Format:
   853  	// `buyers/{buyerAccountId}/clients/{clientAccountid}`
   854  	Client string `json:"client,omitempty"`
   855  	// CreateTime: Output only. The time of the deal creation.
   856  	CreateTime string `json:"createTime,omitempty"`
   857  	// CreativeRequirements: Output only. Metadata about the creatives of this
   858  	// deal.
   859  	CreativeRequirements *CreativeRequirements `json:"creativeRequirements,omitempty"`
   860  	// DealType: Output only. Type of deal.
   861  	//
   862  	// Possible values:
   863  	//   "DEAL_TYPE_UNSPECIFIED" - Default, unspecified deal type.
   864  	//   "PREFERRED_DEAL" - Preferred deals.
   865  	//   "PRIVATE_AUCTION" - Private auction deals.
   866  	//   "PROGRAMMATIC_GUARANTEED" - Programmatic guaranteed deals.
   867  	DealType string `json:"dealType,omitempty"`
   868  	// DeliveryControl: Output only. Specifies the pacing set by the publisher.
   869  	DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"`
   870  	// Description: Output only. Free text description for the deal terms.
   871  	Description string `json:"description,omitempty"`
   872  	// DisplayName: Output only. The name of the deal. Maximum length of 255
   873  	// unicode characters is allowed. Control characters are not allowed. Buyers
   874  	// cannot update this field. Note: Not to be confused with name, which is a
   875  	// unique identifier of the deal.
   876  	DisplayName string `json:"displayName,omitempty"`
   877  	// EligibleSeatIds: Output only. If set, this field contains the list of DSP
   878  	// specific seat ids set by media planners that are eligible to transact on
   879  	// this deal. The seat ID is in the calling DSP's namespace.
   880  	EligibleSeatIds []string `json:"eligibleSeatIds,omitempty"`
   881  	// EstimatedGrossSpend: Specified by buyers in request for proposal (RFP) to
   882  	// notify publisher the total estimated spend for the proposal. Publishers will
   883  	// receive this information and send back proposed deals accordingly.
   884  	EstimatedGrossSpend *Money `json:"estimatedGrossSpend,omitempty"`
   885  	// FlightEndTime: Proposed flight end time of the deal. This will generally be
   886  	// stored in a granularity of a second. A value is not necessary for Private
   887  	// Auction deals.
   888  	FlightEndTime string `json:"flightEndTime,omitempty"`
   889  	// FlightStartTime: Proposed flight start time of the deal. This will generally
   890  	// be stored in the granularity of one second since deal serving starts at
   891  	// seconds boundary. Any time specified with more granularity (for example, in
   892  	// milliseconds) will be truncated towards the start of time in seconds.
   893  	FlightStartTime string `json:"flightStartTime,omitempty"`
   894  	// MediaPlanner: Output only. Refers to a buyer in Real-time Bidding API's
   895  	// Buyer resource. This field represents a media planner (For example, agency
   896  	// or big advertiser).
   897  	MediaPlanner *MediaPlanner `json:"mediaPlanner,omitempty"`
   898  	// Name: Immutable. The unique identifier of the deal. Auto-generated by the
   899  	// server when a deal is created. Format:
   900  	// buyers/{accountId}/proposals/{proposalId}/deals/{dealId}
   901  	Name string `json:"name,omitempty"`
   902  	// PreferredDealTerms: The terms for preferred deals.
   903  	PreferredDealTerms *PreferredDealTerms `json:"preferredDealTerms,omitempty"`
   904  	// PrivateAuctionTerms: The terms for private auction deals.
   905  	PrivateAuctionTerms *PrivateAuctionTerms `json:"privateAuctionTerms,omitempty"`
   906  	// ProgrammaticGuaranteedTerms: The terms for programmatic guaranteed deals.
   907  	ProgrammaticGuaranteedTerms *ProgrammaticGuaranteedTerms `json:"programmaticGuaranteedTerms,omitempty"`
   908  	// ProposalRevision: Output only. The revision number for the proposal and is
   909  	// the same value as proposal.proposal_revision. Each update to deal causes the
   910  	// proposal revision number to auto-increment. The buyer keeps track of the
   911  	// last revision number they know of and pass it in when making an update. If
   912  	// the head revision number on the server has since incremented, then an
   913  	// ABORTED error is returned during the update operation to let the buyer know
   914  	// that a subsequent update was made.
   915  	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
   916  	// PublisherProfile: Immutable. Reference to the seller on the deal. Format:
   917  	// `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}`
   918  	PublisherProfile string `json:"publisherProfile,omitempty"`
   919  	// SellerTimeZone: Output only. Time zone of the seller used to mark the
   920  	// boundaries of a day for daypart targeting and CPD billing.
   921  	SellerTimeZone *TimeZone `json:"sellerTimeZone,omitempty"`
   922  	// Targeting: Specifies the subset of inventory targeted by the deal. Can be
   923  	// updated by the buyer before the deal is finalized.
   924  	Targeting *MarketplaceTargeting `json:"targeting,omitempty"`
   925  	// UpdateTime: Output only. The time when the deal was last updated.
   926  	UpdateTime string `json:"updateTime,omitempty"`
   927  
   928  	// ServerResponse contains the HTTP response code and headers from the server.
   929  	googleapi.ServerResponse `json:"-"`
   930  	// ForceSendFields is a list of field names (e.g. "BilledBuyer") to
   931  	// unconditionally include in API requests. By default, fields with empty or
   932  	// default values are omitted from API requests. See
   933  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   934  	// details.
   935  	ForceSendFields []string `json:"-"`
   936  	// NullFields is a list of field names (e.g. "BilledBuyer") to include in API
   937  	// requests with the JSON null value. By default, fields with empty values are
   938  	// omitted from API requests. See
   939  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   940  	NullFields []string `json:"-"`
   941  }
   942  
   943  func (s *Deal) MarshalJSON() ([]byte, error) {
   944  	type NoMethod Deal
   945  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   946  }
   947  
   948  // DealPausingInfo: Information related to deal pausing.
   949  type DealPausingInfo struct {
   950  	// PauseReason: The reason for the pausing of the deal; empty for active deals.
   951  	PauseReason string `json:"pauseReason,omitempty"`
   952  	// PauseRole: The party that first paused the deal; unspecified for active
   953  	// deals.
   954  	//
   955  	// Possible values:
   956  	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
   957  	// buyer/seller role.
   958  	//   "BUYER" - Specifies the role as buyer.
   959  	//   "SELLER" - Specifies the role as seller.
   960  	PauseRole string `json:"pauseRole,omitempty"`
   961  	// PausingConsented: Whether pausing is consented between buyer and seller for
   962  	// the deal.
   963  	PausingConsented bool `json:"pausingConsented,omitempty"`
   964  	// ForceSendFields is a list of field names (e.g. "PauseReason") to
   965  	// unconditionally include in API requests. By default, fields with empty or
   966  	// default values are omitted from API requests. See
   967  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   968  	// details.
   969  	ForceSendFields []string `json:"-"`
   970  	// NullFields is a list of field names (e.g. "PauseReason") to include in API
   971  	// requests with the JSON null value. By default, fields with empty values are
   972  	// omitted from API requests. See
   973  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   974  	NullFields []string `json:"-"`
   975  }
   976  
   977  func (s *DealPausingInfo) MarshalJSON() ([]byte, error) {
   978  	type NoMethod DealPausingInfo
   979  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   980  }
   981  
   982  // DeliveryControl: Message contains details about how the deal will be paced.
   983  type DeliveryControl struct {
   984  	// CompanionDeliveryType: Output only. Specifies roadblocking in a main
   985  	// companion lineitem.
   986  	//
   987  	// Possible values:
   988  	//   "COMPANION_DELIVERY_TYPE_UNSPECIFIED" - A placeholder for an unspecified
   989  	// companion delivery type.
   990  	//   "DELIVERY_OPTIONAL" - Companions are not required to serve a creative set.
   991  	// The creative set can serve an inventory that has zero or more matching
   992  	// companions.
   993  	//   "DELIVERY_AT_LEAST_ONE" - At least one companion must be served in order
   994  	// for the creative set to be used.
   995  	//   "DELIVERY_ALL" - All companions in the set must be served in order for the
   996  	// creative set to be used. This can still serve to inventory that has more
   997  	// companions than can be filled.
   998  	CompanionDeliveryType string `json:"companionDeliveryType,omitempty"`
   999  	// CreativeRotationType: Output only. Specifies strategy to use for selecting a
  1000  	// creative when multiple creatives of the same size are available.
  1001  	//
  1002  	// Possible values:
  1003  	//   "CREATIVE_ROTATION_TYPE_UNSPECIFIED" - Creatives are displayed roughly the
  1004  	// same number of times over the duration of the deal.
  1005  	//   "ROTATION_EVEN" - Creatives are displayed roughly the same number of times
  1006  	// over the duration of the deal.
  1007  	//   "ROTATION_OPTIMIZED" - Creatives are served roughly proportionally to
  1008  	// their performance.
  1009  	//   "ROTATION_MANUAL" - Creatives are served roughly proportionally to their
  1010  	// weights.
  1011  	//   "ROTATION_SEQUENTIAL" - Creatives are served exactly in sequential order,
  1012  	// also known as Storyboarding.
  1013  	CreativeRotationType string `json:"creativeRotationType,omitempty"`
  1014  	// DeliveryRateType: Output only. Specifies how the impression delivery will be
  1015  	// paced.
  1016  	//
  1017  	// Possible values:
  1018  	//   "DELIVERY_RATE_TYPE_UNSPECIFIED" - A placeholder for an undefined delivery
  1019  	// rate type.
  1020  	//   "EVENLY" - Impressions are served uniformly over the life of the deal.
  1021  	//   "FRONT_LOADED" - Impressions are served front-loaded.
  1022  	//   "AS_FAST_AS_POSSIBLE" - Impressions are served as fast as possible.
  1023  	DeliveryRateType string `json:"deliveryRateType,omitempty"`
  1024  	// FrequencyCap: Output only. Specifies any frequency caps. Cannot be filtered
  1025  	// within ListDealsRequest.
  1026  	FrequencyCap []*FrequencyCap `json:"frequencyCap,omitempty"`
  1027  	// RoadblockingType: Output only. Specifies the roadblocking type in display
  1028  	// creatives.
  1029  	//
  1030  	// Possible values:
  1031  	//   "ROADBLOCKING_TYPE_UNSPECIFIED" - A placeholder for an unspecified
  1032  	// roadblocking type.
  1033  	//   "ONLY_ONE" - Only one creative from a deal can serve per ad request.
  1034  	// https://support.google.com/admanager/answer/177277.
  1035  	//   "ONE_OR_MORE" - Any number of creatives from a deal can serve together per
  1036  	// ad request.
  1037  	//   "AS_MANY_AS_POSSIBLE" - As many creatives from a deal as can fit on a page
  1038  	// will serve. This could mean anywhere from one to all of a deal's creatives
  1039  	// given the size constraints of ad slots on a page.
  1040  	//   "ALL_ROADBLOCK" - All or none of the creatives from a deal will serve.
  1041  	//   "CREATIVE_SET" - A main/companion creative set roadblocking type.
  1042  	RoadblockingType string `json:"roadblockingType,omitempty"`
  1043  	// ForceSendFields is a list of field names (e.g. "CompanionDeliveryType") to
  1044  	// unconditionally include in API requests. By default, fields with empty or
  1045  	// default values are omitted from API requests. See
  1046  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1047  	// details.
  1048  	ForceSendFields []string `json:"-"`
  1049  	// NullFields is a list of field names (e.g. "CompanionDeliveryType") to
  1050  	// include in API requests with the JSON null value. By default, fields with
  1051  	// empty values are omitted from API requests. See
  1052  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1053  	NullFields []string `json:"-"`
  1054  }
  1055  
  1056  func (s *DeliveryControl) MarshalJSON() ([]byte, error) {
  1057  	type NoMethod DeliveryControl
  1058  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1059  }
  1060  
  1061  // Empty: A generic empty message that you can re-use to avoid defining
  1062  // duplicated empty messages in your APIs. A typical example is to use it as
  1063  // the request or the response type of an API method. For instance: service Foo
  1064  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1065  type Empty struct {
  1066  	// ServerResponse contains the HTTP response code and headers from the server.
  1067  	googleapi.ServerResponse `json:"-"`
  1068  }
  1069  
  1070  // FinalizedDeal: A finalized deal is a snapshot of the deal when both buyer
  1071  // and seller accept the deal. The buyer or seller can update the deal after
  1072  // it's been finalized and renegotiate on the deal targeting, terms and other
  1073  // fields, while at the same time the finalized snapshot of the deal can still
  1074  // be retrieved using this API. The finalized deal contains a copy of the deal
  1075  // as it existed when most recently finalized, as well as fields related to
  1076  // deal serving such as pause/resume status, RTB metrics, and more.
  1077  type FinalizedDeal struct {
  1078  	// Deal: A copy of the Deal made upon finalization. During renegotiation, this
  1079  	// will reflect the last finalized deal before renegotiation was initiated.
  1080  	Deal *Deal `json:"deal,omitempty"`
  1081  	// DealPausingInfo: Information related to deal pausing for the deal.
  1082  	DealPausingInfo *DealPausingInfo `json:"dealPausingInfo,omitempty"`
  1083  	// DealServingStatus: Serving status of the deal.
  1084  	//
  1085  	// Possible values:
  1086  	//   "DEAL_SERVING_STATUS_UNSPECIFIED" - Unspecified.
  1087  	//   "ACTIVE" - The deal is actively serving or ready to serve when the start
  1088  	// date is reached.
  1089  	//   "ENDED" - The deal serving has ended.
  1090  	//   "PAUSED_BY_BUYER" - The deal serving is paused by buyer.
  1091  	//   "PAUSED_BY_SELLER" - The deal serving is paused by seller.
  1092  	DealServingStatus string `json:"dealServingStatus,omitempty"`
  1093  	// Name: The resource name of the finalized deal. Format:
  1094  	// `buyers/{accountId}/finalizedDeals/{finalizedDealId}`
  1095  	Name string `json:"name,omitempty"`
  1096  	// ReadyToServe: Whether the Programmatic Guaranteed deal is ready for serving.
  1097  	ReadyToServe bool `json:"readyToServe,omitempty"`
  1098  	// RtbMetrics: Real-time bidding metrics for this deal.
  1099  	RtbMetrics *RtbMetrics `json:"rtbMetrics,omitempty"`
  1100  
  1101  	// ServerResponse contains the HTTP response code and headers from the server.
  1102  	googleapi.ServerResponse `json:"-"`
  1103  	// ForceSendFields is a list of field names (e.g. "Deal") to unconditionally
  1104  	// include in API requests. By default, fields with empty or default values are
  1105  	// omitted from API requests. See
  1106  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1107  	// details.
  1108  	ForceSendFields []string `json:"-"`
  1109  	// NullFields is a list of field names (e.g. "Deal") to include in API requests
  1110  	// with the JSON null value. By default, fields with empty values are omitted
  1111  	// from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1113  	NullFields []string `json:"-"`
  1114  }
  1115  
  1116  func (s *FinalizedDeal) MarshalJSON() ([]byte, error) {
  1117  	type NoMethod FinalizedDeal
  1118  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1119  }
  1120  
  1121  // FirstPartyMobileApplicationTargeting: Represents a list of targeted and
  1122  // excluded mobile application IDs that publishers own. Android App ID, for
  1123  // example, com.google.android.apps.maps, can be found in Google Play Store
  1124  // URL. iOS App ID (which is a number) can be found at the end of iTunes store
  1125  // URL. First party mobile applications is either included or excluded.
  1126  type FirstPartyMobileApplicationTargeting struct {
  1127  	// ExcludedAppIds: A list of application IDs to be excluded.
  1128  	ExcludedAppIds []string `json:"excludedAppIds,omitempty"`
  1129  	// TargetedAppIds: A list of application IDs to be included.
  1130  	TargetedAppIds []string `json:"targetedAppIds,omitempty"`
  1131  	// ForceSendFields is a list of field names (e.g. "ExcludedAppIds") to
  1132  	// unconditionally include in API requests. By default, fields with empty or
  1133  	// default values are omitted from API requests. See
  1134  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1135  	// details.
  1136  	ForceSendFields []string `json:"-"`
  1137  	// NullFields is a list of field names (e.g. "ExcludedAppIds") to include in
  1138  	// API requests with the JSON null value. By default, fields with empty values
  1139  	// are omitted from API requests. See
  1140  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1141  	NullFields []string `json:"-"`
  1142  }
  1143  
  1144  func (s *FirstPartyMobileApplicationTargeting) MarshalJSON() ([]byte, error) {
  1145  	type NoMethod FirstPartyMobileApplicationTargeting
  1146  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1147  }
  1148  
  1149  // FrequencyCap: Message contains details about publisher-set frequency caps of
  1150  // the delivery.
  1151  type FrequencyCap struct {
  1152  	// MaxImpressions: The maximum number of impressions that can be served to a
  1153  	// user within the specified time period.
  1154  	MaxImpressions int64 `json:"maxImpressions,omitempty"`
  1155  	// TimeUnitType: The time unit. Along with num_time_units defines the amount of
  1156  	// time over which impressions per user are counted and capped.
  1157  	//
  1158  	// Possible values:
  1159  	//   "TIME_UNIT_TYPE_UNSPECIFIED" - A placeholder for an undefined time unit
  1160  	// type. This just indicates the variable with this value hasn't been
  1161  	// initialized.
  1162  	//   "MINUTE" - Minute unit.
  1163  	//   "HOUR" - Hour unit.
  1164  	//   "DAY" - Day unit.
  1165  	//   "WEEK" - Week unit.
  1166  	//   "MONTH" - Month unit.
  1167  	//   "LIFETIME" - Lifecycle/Lifetime unit.
  1168  	//   "POD" - Pod unit.
  1169  	//   "STREAM" - Stream unit.
  1170  	TimeUnitType string `json:"timeUnitType,omitempty"`
  1171  	// TimeUnitsCount: The amount of time, in the units specified by
  1172  	// time_unit_type. Defines the amount of time over which impressions per user
  1173  	// are counted and capped.
  1174  	TimeUnitsCount int64 `json:"timeUnitsCount,omitempty"`
  1175  	// ForceSendFields is a list of field names (e.g. "MaxImpressions") to
  1176  	// unconditionally include in API requests. By default, fields with empty or
  1177  	// default values are omitted from API requests. See
  1178  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1179  	// details.
  1180  	ForceSendFields []string `json:"-"`
  1181  	// NullFields is a list of field names (e.g. "MaxImpressions") to include in
  1182  	// API requests with the JSON null value. By default, fields with empty values
  1183  	// are omitted from API requests. See
  1184  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1185  	NullFields []string `json:"-"`
  1186  }
  1187  
  1188  func (s *FrequencyCap) MarshalJSON() ([]byte, error) {
  1189  	type NoMethod FrequencyCap
  1190  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1191  }
  1192  
  1193  // InventorySizeTargeting: Represents the size of an ad unit that can be
  1194  // targeted on a bid request.
  1195  type InventorySizeTargeting struct {
  1196  	// ExcludedInventorySizes: A list of inventory sizes to be excluded.
  1197  	ExcludedInventorySizes []*AdSize `json:"excludedInventorySizes,omitempty"`
  1198  	// TargetedInventorySizes: A list of inventory sizes to be included.
  1199  	TargetedInventorySizes []*AdSize `json:"targetedInventorySizes,omitempty"`
  1200  	// ForceSendFields is a list of field names (e.g. "ExcludedInventorySizes") to
  1201  	// unconditionally include in API requests. By default, fields with empty or
  1202  	// default values are omitted from API requests. See
  1203  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1204  	// details.
  1205  	ForceSendFields []string `json:"-"`
  1206  	// NullFields is a list of field names (e.g. "ExcludedInventorySizes") to
  1207  	// include in API requests with the JSON null value. By default, fields with
  1208  	// empty values are omitted from API requests. See
  1209  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1210  	NullFields []string `json:"-"`
  1211  }
  1212  
  1213  func (s *InventorySizeTargeting) MarshalJSON() ([]byte, error) {
  1214  	type NoMethod InventorySizeTargeting
  1215  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1216  }
  1217  
  1218  // InventoryTypeTargeting: Targeting of the inventory types a bid request can
  1219  // originate from.
  1220  type InventoryTypeTargeting struct {
  1221  	// InventoryTypes: The list of targeted inventory types for the bid request.
  1222  	//
  1223  	// Possible values:
  1224  	//   "INVENTORY_TYPE_UNSPECIFIED" - Unspecified inventory type
  1225  	//   "BROWSER" - Desktop or mobile web browser excluding ads inside a video
  1226  	// player
  1227  	//   "MOBILE_APP" - Mobile apps other than video players and web browsers
  1228  	//   "VIDEO_PLAYER" - Instream video and audio
  1229  	InventoryTypes []string `json:"inventoryTypes,omitempty"`
  1230  	// ForceSendFields is a list of field names (e.g. "InventoryTypes") to
  1231  	// unconditionally include in API requests. By default, fields with empty or
  1232  	// default values are omitted from API requests. See
  1233  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1234  	// details.
  1235  	ForceSendFields []string `json:"-"`
  1236  	// NullFields is a list of field names (e.g. "InventoryTypes") to include in
  1237  	// API requests with the JSON null value. By default, fields with empty values
  1238  	// are omitted from API requests. See
  1239  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1240  	NullFields []string `json:"-"`
  1241  }
  1242  
  1243  func (s *InventoryTypeTargeting) MarshalJSON() ([]byte, error) {
  1244  	type NoMethod InventoryTypeTargeting
  1245  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1246  }
  1247  
  1248  // ListAuctionPackagesResponse: Response message for listing auction packages.
  1249  type ListAuctionPackagesResponse struct {
  1250  	// AuctionPackages: The list of auction packages.
  1251  	AuctionPackages []*AuctionPackage `json:"auctionPackages,omitempty"`
  1252  	// NextPageToken: Continuation token for fetching the next page of results.
  1253  	// Pass this value in the ListAuctionPackagesRequest.pageToken field in the
  1254  	// subsequent call to the `ListAuctionPackages` method to retrieve the next
  1255  	// page of results.
  1256  	NextPageToken string `json:"nextPageToken,omitempty"`
  1257  
  1258  	// ServerResponse contains the HTTP response code and headers from the server.
  1259  	googleapi.ServerResponse `json:"-"`
  1260  	// ForceSendFields is a list of field names (e.g. "AuctionPackages") to
  1261  	// unconditionally include in API requests. By default, fields with empty or
  1262  	// default values are omitted from API requests. See
  1263  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1264  	// details.
  1265  	ForceSendFields []string `json:"-"`
  1266  	// NullFields is a list of field names (e.g. "AuctionPackages") to include in
  1267  	// API requests with the JSON null value. By default, fields with empty values
  1268  	// are omitted from API requests. See
  1269  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1270  	NullFields []string `json:"-"`
  1271  }
  1272  
  1273  func (s *ListAuctionPackagesResponse) MarshalJSON() ([]byte, error) {
  1274  	type NoMethod ListAuctionPackagesResponse
  1275  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1276  }
  1277  
  1278  // ListClientUsersResponse: Response message for the list method.
  1279  type ListClientUsersResponse struct {
  1280  	// ClientUsers: The returned list of client users.
  1281  	ClientUsers []*ClientUser `json:"clientUsers,omitempty"`
  1282  	// NextPageToken: A token to retrieve the next page of results. Pass this value
  1283  	// in the ListClientUsersRequest.pageToken field in the subsequent call to the
  1284  	// list method to retrieve the next page of results.
  1285  	NextPageToken string `json:"nextPageToken,omitempty"`
  1286  
  1287  	// ServerResponse contains the HTTP response code and headers from the server.
  1288  	googleapi.ServerResponse `json:"-"`
  1289  	// ForceSendFields is a list of field names (e.g. "ClientUsers") to
  1290  	// unconditionally include in API requests. By default, fields with empty or
  1291  	// default values are omitted from API requests. See
  1292  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1293  	// details.
  1294  	ForceSendFields []string `json:"-"`
  1295  	// NullFields is a list of field names (e.g. "ClientUsers") to include in API
  1296  	// requests with the JSON null value. By default, fields with empty values are
  1297  	// omitted from API requests. See
  1298  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1299  	NullFields []string `json:"-"`
  1300  }
  1301  
  1302  func (s *ListClientUsersResponse) MarshalJSON() ([]byte, error) {
  1303  	type NoMethod ListClientUsersResponse
  1304  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1305  }
  1306  
  1307  // ListClientsResponse: Response message for the list method.
  1308  type ListClientsResponse struct {
  1309  	// Clients: The returned list of clients.
  1310  	Clients []*Client `json:"clients,omitempty"`
  1311  	// NextPageToken: A token to retrieve the next page of results. Pass this value
  1312  	// in the ListClientsRequest.pageToken field in the subsequent call to the list
  1313  	// method to retrieve the next page of results.
  1314  	NextPageToken string `json:"nextPageToken,omitempty"`
  1315  
  1316  	// ServerResponse contains the HTTP response code and headers from the server.
  1317  	googleapi.ServerResponse `json:"-"`
  1318  	// ForceSendFields is a list of field names (e.g. "Clients") to unconditionally
  1319  	// include in API requests. By default, fields with empty or default values are
  1320  	// omitted from API requests. See
  1321  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1322  	// details.
  1323  	ForceSendFields []string `json:"-"`
  1324  	// NullFields is a list of field names (e.g. "Clients") to include in API
  1325  	// requests with the JSON null value. By default, fields with empty values are
  1326  	// omitted from API requests. See
  1327  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1328  	NullFields []string `json:"-"`
  1329  }
  1330  
  1331  func (s *ListClientsResponse) MarshalJSON() ([]byte, error) {
  1332  	type NoMethod ListClientsResponse
  1333  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1334  }
  1335  
  1336  // ListDealsResponse: Response message for listing deals in a proposal.
  1337  type ListDealsResponse struct {
  1338  	// Deals: The list of deals.
  1339  	Deals []*Deal `json:"deals,omitempty"`
  1340  	// NextPageToken: Token to fetch the next page of results.
  1341  	NextPageToken string `json:"nextPageToken,omitempty"`
  1342  
  1343  	// ServerResponse contains the HTTP response code and headers from the server.
  1344  	googleapi.ServerResponse `json:"-"`
  1345  	// ForceSendFields is a list of field names (e.g. "Deals") to unconditionally
  1346  	// include in API requests. By default, fields with empty or default values are
  1347  	// omitted from API requests. See
  1348  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1349  	// details.
  1350  	ForceSendFields []string `json:"-"`
  1351  	// NullFields is a list of field names (e.g. "Deals") to include in API
  1352  	// requests with the JSON null value. By default, fields with empty values are
  1353  	// omitted from API requests. See
  1354  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1355  	NullFields []string `json:"-"`
  1356  }
  1357  
  1358  func (s *ListDealsResponse) MarshalJSON() ([]byte, error) {
  1359  	type NoMethod ListDealsResponse
  1360  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1361  }
  1362  
  1363  // ListFinalizedDealsResponse: Response message for listing finalized deals.
  1364  type ListFinalizedDealsResponse struct {
  1365  	// FinalizedDeals: The list of finalized deals.
  1366  	FinalizedDeals []*FinalizedDeal `json:"finalizedDeals,omitempty"`
  1367  	// NextPageToken: Token to fetch the next page of results.
  1368  	NextPageToken string `json:"nextPageToken,omitempty"`
  1369  
  1370  	// ServerResponse contains the HTTP response code and headers from the server.
  1371  	googleapi.ServerResponse `json:"-"`
  1372  	// ForceSendFields is a list of field names (e.g. "FinalizedDeals") to
  1373  	// unconditionally include in API requests. By default, fields with empty or
  1374  	// default values are omitted from API requests. See
  1375  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1376  	// details.
  1377  	ForceSendFields []string `json:"-"`
  1378  	// NullFields is a list of field names (e.g. "FinalizedDeals") to include in
  1379  	// API requests with the JSON null value. By default, fields with empty values
  1380  	// are omitted from API requests. See
  1381  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1382  	NullFields []string `json:"-"`
  1383  }
  1384  
  1385  func (s *ListFinalizedDealsResponse) MarshalJSON() ([]byte, error) {
  1386  	type NoMethod ListFinalizedDealsResponse
  1387  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1388  }
  1389  
  1390  // ListProposalsResponse: Response message for listing proposals.
  1391  type ListProposalsResponse struct {
  1392  	// NextPageToken: Continuation token for fetching the next page of results.
  1393  	NextPageToken string `json:"nextPageToken,omitempty"`
  1394  	// Proposals: The list of proposals.
  1395  	Proposals []*Proposal `json:"proposals,omitempty"`
  1396  
  1397  	// ServerResponse contains the HTTP response code and headers from the server.
  1398  	googleapi.ServerResponse `json:"-"`
  1399  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1400  	// unconditionally include in API requests. By default, fields with empty or
  1401  	// default values are omitted from API requests. See
  1402  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1403  	// details.
  1404  	ForceSendFields []string `json:"-"`
  1405  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1406  	// requests with the JSON null value. By default, fields with empty values are
  1407  	// omitted from API requests. See
  1408  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1409  	NullFields []string `json:"-"`
  1410  }
  1411  
  1412  func (s *ListProposalsResponse) MarshalJSON() ([]byte, error) {
  1413  	type NoMethod ListProposalsResponse
  1414  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1415  }
  1416  
  1417  // ListPublisherProfilesResponse: Response message for profiles visible to the
  1418  // buyer.
  1419  type ListPublisherProfilesResponse struct {
  1420  	// NextPageToken: Token to fetch the next page of results.
  1421  	NextPageToken string `json:"nextPageToken,omitempty"`
  1422  	// PublisherProfiles: The list of matching publisher profiles.
  1423  	PublisherProfiles []*PublisherProfile `json:"publisherProfiles,omitempty"`
  1424  
  1425  	// ServerResponse contains the HTTP response code and headers from the server.
  1426  	googleapi.ServerResponse `json:"-"`
  1427  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1428  	// unconditionally include in API requests. By default, fields with empty or
  1429  	// default values are omitted from API requests. See
  1430  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1431  	// details.
  1432  	ForceSendFields []string `json:"-"`
  1433  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1434  	// requests with the JSON null value. By default, fields with empty values are
  1435  	// omitted from API requests. See
  1436  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1437  	NullFields []string `json:"-"`
  1438  }
  1439  
  1440  func (s *ListPublisherProfilesResponse) MarshalJSON() ([]byte, error) {
  1441  	type NoMethod ListPublisherProfilesResponse
  1442  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1443  }
  1444  
  1445  // MarketplaceTargeting: Targeting represents different criteria that can be
  1446  // used to target deals or auction packages. For example, they can choose to
  1447  // target inventory only if the user is in the US. Multiple types of targeting
  1448  // are always applied as a logical AND, unless noted otherwise.
  1449  type MarketplaceTargeting struct {
  1450  	// DaypartTargeting: Daypart targeting information.
  1451  	DaypartTargeting *DayPartTargeting `json:"daypartTargeting,omitempty"`
  1452  	// ExcludedSensitiveCategoryIds: Output only. The sensitive content category
  1453  	// label IDs excluded. Refer to this file
  1454  	// https://storage.googleapis.com/adx-rtb-dictionaries/content-labels.txt for
  1455  	// category IDs.
  1456  	ExcludedSensitiveCategoryIds googleapi.Int64s `json:"excludedSensitiveCategoryIds,omitempty"`
  1457  	// GeoTargeting: Output only. Geo criteria IDs to be included/excluded.
  1458  	GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"`
  1459  	// InventorySizeTargeting: Output only. Inventory sizes to be
  1460  	// included/excluded.
  1461  	InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"`
  1462  	// InventoryTypeTargeting: Output only. Inventory type targeting information.
  1463  	InventoryTypeTargeting *InventoryTypeTargeting `json:"inventoryTypeTargeting,omitempty"`
  1464  	// PlacementTargeting: Output only. Placement targeting information, for
  1465  	// example, URL, mobile applications.
  1466  	PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"`
  1467  	// TechnologyTargeting: Output only. Technology targeting information, for
  1468  	// example, operating system, device category.
  1469  	TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"`
  1470  	// UserListTargeting: Buyer user list targeting information. User lists can be
  1471  	// uploaded using
  1472  	// https://developers.google.com/authorized-buyers/rtb/bulk-uploader.
  1473  	UserListTargeting *CriteriaTargeting `json:"userListTargeting,omitempty"`
  1474  	// VerticalTargeting: Output only. The verticals included or excluded as
  1475  	// defined in
  1476  	// https://developers.google.com/authorized-buyers/rtb/downloads/publisher-verticals
  1477  	VerticalTargeting *CriteriaTargeting `json:"verticalTargeting,omitempty"`
  1478  	// VideoTargeting: Output only. Video targeting information.
  1479  	VideoTargeting *VideoTargeting `json:"videoTargeting,omitempty"`
  1480  	// ForceSendFields is a list of field names (e.g. "DaypartTargeting") to
  1481  	// unconditionally include in API requests. By default, fields with empty or
  1482  	// default values are omitted from API requests. See
  1483  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1484  	// details.
  1485  	ForceSendFields []string `json:"-"`
  1486  	// NullFields is a list of field names (e.g. "DaypartTargeting") to include in
  1487  	// API requests with the JSON null value. By default, fields with empty values
  1488  	// are omitted from API requests. See
  1489  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1490  	NullFields []string `json:"-"`
  1491  }
  1492  
  1493  func (s *MarketplaceTargeting) MarshalJSON() ([]byte, error) {
  1494  	type NoMethod MarketplaceTargeting
  1495  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1496  }
  1497  
  1498  // MediaPlanner: Describes a single Media Planner account.
  1499  type MediaPlanner struct {
  1500  	// AccountId: Output only. Account ID of the media planner.
  1501  	AccountId string `json:"accountId,omitempty"`
  1502  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1503  	// unconditionally include in API requests. By default, fields with empty or
  1504  	// default values are omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1506  	// details.
  1507  	ForceSendFields []string `json:"-"`
  1508  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1509  	// requests with the JSON null value. By default, fields with empty values are
  1510  	// omitted from API requests. See
  1511  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1512  	NullFields []string `json:"-"`
  1513  }
  1514  
  1515  func (s *MediaPlanner) MarshalJSON() ([]byte, error) {
  1516  	type NoMethod MediaPlanner
  1517  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1518  }
  1519  
  1520  // MobileApplicationTargeting: Mobile application targeting settings.
  1521  type MobileApplicationTargeting struct {
  1522  	// FirstPartyTargeting: Publisher owned apps to be targeted or excluded by the
  1523  	// publisher to display the ads in.
  1524  	FirstPartyTargeting *FirstPartyMobileApplicationTargeting `json:"firstPartyTargeting,omitempty"`
  1525  	// ForceSendFields is a list of field names (e.g. "FirstPartyTargeting") to
  1526  	// unconditionally include in API requests. By default, fields with empty or
  1527  	// default values are omitted from API requests. See
  1528  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1529  	// details.
  1530  	ForceSendFields []string `json:"-"`
  1531  	// NullFields is a list of field names (e.g. "FirstPartyTargeting") to include
  1532  	// in API requests with the JSON null value. By default, fields with empty
  1533  	// values are omitted from API requests. See
  1534  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1535  	NullFields []string `json:"-"`
  1536  }
  1537  
  1538  func (s *MobileApplicationTargeting) MarshalJSON() ([]byte, error) {
  1539  	type NoMethod MobileApplicationTargeting
  1540  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1541  }
  1542  
  1543  // Money: Represents an amount of money with its currency type.
  1544  type Money struct {
  1545  	// CurrencyCode: The three-letter currency code defined in ISO 4217.
  1546  	CurrencyCode string `json:"currencyCode,omitempty"`
  1547  	// Nanos: Number of nano (10^-9) units of the amount. The value must be between
  1548  	// -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos`
  1549  	// must be positive or zero. If `units` is zero, `nanos` can be positive, zero,
  1550  	// or negative. If `units` is negative, `nanos` must be negative or zero. For
  1551  	// example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
  1552  	Nanos int64 `json:"nanos,omitempty"`
  1553  	// Units: The whole units of the amount. For example if `currencyCode` is
  1554  	// "USD", then 1 unit is one US dollar.
  1555  	Units int64 `json:"units,omitempty,string"`
  1556  	// ForceSendFields is a list of field names (e.g. "CurrencyCode") to
  1557  	// unconditionally include in API requests. By default, fields with empty or
  1558  	// default values are omitted from API requests. See
  1559  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1560  	// details.
  1561  	ForceSendFields []string `json:"-"`
  1562  	// NullFields is a list of field names (e.g. "CurrencyCode") to include in API
  1563  	// requests with the JSON null value. By default, fields with empty values are
  1564  	// omitted from API requests. See
  1565  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1566  	NullFields []string `json:"-"`
  1567  }
  1568  
  1569  func (s *Money) MarshalJSON() ([]byte, error) {
  1570  	type NoMethod Money
  1571  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1572  }
  1573  
  1574  // Note: A text note attached to the proposal to facilitate the communication
  1575  // between buyers and sellers.
  1576  type Note struct {
  1577  	// CreateTime: Output only. When this note was created.
  1578  	CreateTime string `json:"createTime,omitempty"`
  1579  	// CreatorRole: Output only. The role who created the note.
  1580  	//
  1581  	// Possible values:
  1582  	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
  1583  	// buyer/seller role.
  1584  	//   "BUYER" - Specifies the role as buyer.
  1585  	//   "SELLER" - Specifies the role as seller.
  1586  	CreatorRole string `json:"creatorRole,omitempty"`
  1587  	// Note: The text of the note. Maximum length is 1024 characters.
  1588  	Note string `json:"note,omitempty"`
  1589  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1590  	// unconditionally include in API requests. By default, fields with empty or
  1591  	// default values are omitted from API requests. See
  1592  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1593  	// details.
  1594  	ForceSendFields []string `json:"-"`
  1595  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1596  	// requests with the JSON null value. By default, fields with empty values are
  1597  	// omitted from API requests. See
  1598  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1599  	NullFields []string `json:"-"`
  1600  }
  1601  
  1602  func (s *Note) MarshalJSON() ([]byte, error) {
  1603  	type NoMethod Note
  1604  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1605  }
  1606  
  1607  // OperatingSystemTargeting: Represents targeting information for operating
  1608  // systems.
  1609  type OperatingSystemTargeting struct {
  1610  	// OperatingSystemCriteria: IDs of operating systems to be included/excluded.
  1611  	OperatingSystemCriteria *CriteriaTargeting `json:"operatingSystemCriteria,omitempty"`
  1612  	// OperatingSystemVersionCriteria: IDs of operating system versions to be
  1613  	// included/excluded.
  1614  	OperatingSystemVersionCriteria *CriteriaTargeting `json:"operatingSystemVersionCriteria,omitempty"`
  1615  	// ForceSendFields is a list of field names (e.g. "OperatingSystemCriteria") to
  1616  	// unconditionally include in API requests. By default, fields with empty or
  1617  	// default values are omitted from API requests. See
  1618  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1619  	// details.
  1620  	ForceSendFields []string `json:"-"`
  1621  	// NullFields is a list of field names (e.g. "OperatingSystemCriteria") to
  1622  	// include in API requests with the JSON null value. By default, fields with
  1623  	// empty values are omitted from API requests. See
  1624  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1625  	NullFields []string `json:"-"`
  1626  }
  1627  
  1628  func (s *OperatingSystemTargeting) MarshalJSON() ([]byte, error) {
  1629  	type NoMethod OperatingSystemTargeting
  1630  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1631  }
  1632  
  1633  // PauseFinalizedDealRequest: Request message for pausing a finalized deal.
  1634  type PauseFinalizedDealRequest struct {
  1635  	// Reason: The reason to pause the finalized deal, will be displayed to the
  1636  	// seller. Maximum length is 1000 characters.
  1637  	Reason string `json:"reason,omitempty"`
  1638  	// ForceSendFields is a list of field names (e.g. "Reason") to unconditionally
  1639  	// include in API requests. By default, fields with empty or default values are
  1640  	// omitted from API requests. See
  1641  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1642  	// details.
  1643  	ForceSendFields []string `json:"-"`
  1644  	// NullFields is a list of field names (e.g. "Reason") to include in API
  1645  	// requests with the JSON null value. By default, fields with empty values are
  1646  	// omitted from API requests. See
  1647  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1648  	NullFields []string `json:"-"`
  1649  }
  1650  
  1651  func (s *PauseFinalizedDealRequest) MarshalJSON() ([]byte, error) {
  1652  	type NoMethod PauseFinalizedDealRequest
  1653  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1654  }
  1655  
  1656  // PlacementTargeting: Represents targeting about where the ads can appear, for
  1657  // example, certain sites or mobile applications. Different placement targeting
  1658  // types will be logically OR'ed.
  1659  type PlacementTargeting struct {
  1660  	// MobileApplicationTargeting: Mobile application targeting information in a
  1661  	// deal. This doesn't apply to Auction Packages.
  1662  	MobileApplicationTargeting *MobileApplicationTargeting `json:"mobileApplicationTargeting,omitempty"`
  1663  	// UriTargeting: URLs to be included/excluded.
  1664  	UriTargeting *UriTargeting `json:"uriTargeting,omitempty"`
  1665  	// ForceSendFields is a list of field names (e.g. "MobileApplicationTargeting")
  1666  	// to unconditionally include in API requests. By default, fields with empty or
  1667  	// default values are omitted from API requests. See
  1668  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1669  	// details.
  1670  	ForceSendFields []string `json:"-"`
  1671  	// NullFields is a list of field names (e.g. "MobileApplicationTargeting") to
  1672  	// include in API requests with the JSON null value. By default, fields with
  1673  	// empty values are omitted from API requests. See
  1674  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1675  	NullFields []string `json:"-"`
  1676  }
  1677  
  1678  func (s *PlacementTargeting) MarshalJSON() ([]byte, error) {
  1679  	type NoMethod PlacementTargeting
  1680  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1681  }
  1682  
  1683  // PreferredDealTerms: Pricing terms for Preferred Deals.
  1684  type PreferredDealTerms struct {
  1685  	// FixedPrice: Fixed price for the deal.
  1686  	FixedPrice *Price `json:"fixedPrice,omitempty"`
  1687  	// ForceSendFields is a list of field names (e.g. "FixedPrice") to
  1688  	// unconditionally include in API requests. By default, fields with empty or
  1689  	// default values are omitted from API requests. See
  1690  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1691  	// details.
  1692  	ForceSendFields []string `json:"-"`
  1693  	// NullFields is a list of field names (e.g. "FixedPrice") to include in API
  1694  	// requests with the JSON null value. By default, fields with empty values are
  1695  	// omitted from API requests. See
  1696  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1697  	NullFields []string `json:"-"`
  1698  }
  1699  
  1700  func (s *PreferredDealTerms) MarshalJSON() ([]byte, error) {
  1701  	type NoMethod PreferredDealTerms
  1702  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1703  }
  1704  
  1705  // Price: Represents a price and a pricing type for a deal.
  1706  type Price struct {
  1707  	// Amount: The actual price with currency specified.
  1708  	Amount *Money `json:"amount,omitempty"`
  1709  	// Type: The pricing type for the deal.
  1710  	//
  1711  	// Possible values:
  1712  	//   "TYPE_UNSPECIFIED" - A placeholder for an undefined pricing type. If the
  1713  	// pricing type is unspecified, CPM will be used instead.
  1714  	//   "CPM" - Cost per thousand impressions.
  1715  	//   "CPD" - Cost per day.
  1716  	Type string `json:"type,omitempty"`
  1717  	// ForceSendFields is a list of field names (e.g. "Amount") to unconditionally
  1718  	// include in API requests. By default, fields with empty or default values are
  1719  	// omitted from API requests. See
  1720  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1721  	// details.
  1722  	ForceSendFields []string `json:"-"`
  1723  	// NullFields is a list of field names (e.g. "Amount") to include in API
  1724  	// requests with the JSON null value. By default, fields with empty values are
  1725  	// omitted from API requests. See
  1726  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1727  	NullFields []string `json:"-"`
  1728  }
  1729  
  1730  func (s *Price) MarshalJSON() ([]byte, error) {
  1731  	type NoMethod Price
  1732  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1733  }
  1734  
  1735  // PrivateAuctionTerms: Pricing terms for Private Auctions.
  1736  type PrivateAuctionTerms struct {
  1737  	// FloorPrice: The minimum price buyer has to bid to compete in the private
  1738  	// auction.
  1739  	FloorPrice *Price `json:"floorPrice,omitempty"`
  1740  	// OpenAuctionAllowed: Output only. True if open auction buyers are allowed to
  1741  	// compete with invited buyers in this private auction.
  1742  	OpenAuctionAllowed bool `json:"openAuctionAllowed,omitempty"`
  1743  	// ForceSendFields is a list of field names (e.g. "FloorPrice") to
  1744  	// unconditionally include in API requests. By default, fields with empty or
  1745  	// default values are omitted from API requests. See
  1746  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1747  	// details.
  1748  	ForceSendFields []string `json:"-"`
  1749  	// NullFields is a list of field names (e.g. "FloorPrice") to include in API
  1750  	// requests with the JSON null value. By default, fields with empty values are
  1751  	// omitted from API requests. See
  1752  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1753  	NullFields []string `json:"-"`
  1754  }
  1755  
  1756  func (s *PrivateAuctionTerms) MarshalJSON() ([]byte, error) {
  1757  	type NoMethod PrivateAuctionTerms
  1758  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1759  }
  1760  
  1761  // PrivateData: Buyers are allowed to store certain types of private data in a
  1762  // proposal or deal.
  1763  type PrivateData struct {
  1764  	// ReferenceId: A buyer specified reference ID. This can be queried in the list
  1765  	// operations (max-length: 1024 unicode code units).
  1766  	ReferenceId string `json:"referenceId,omitempty"`
  1767  	// ForceSendFields is a list of field names (e.g. "ReferenceId") to
  1768  	// unconditionally include in API requests. By default, fields with empty or
  1769  	// default values are omitted from API requests. See
  1770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1771  	// details.
  1772  	ForceSendFields []string `json:"-"`
  1773  	// NullFields is a list of field names (e.g. "ReferenceId") to include in API
  1774  	// requests with the JSON null value. By default, fields with empty values are
  1775  	// omitted from API requests. See
  1776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1777  	NullFields []string `json:"-"`
  1778  }
  1779  
  1780  func (s *PrivateData) MarshalJSON() ([]byte, error) {
  1781  	type NoMethod PrivateData
  1782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1783  }
  1784  
  1785  // ProgrammaticGuaranteedTerms: Pricing terms for Programmatic Guaranteed
  1786  // Deals.
  1787  type ProgrammaticGuaranteedTerms struct {
  1788  	// FixedPrice: Fixed price for the deal.
  1789  	FixedPrice *Price `json:"fixedPrice,omitempty"`
  1790  	// GuaranteedLooks: Count of guaranteed looks. For CPD deals, buyer changes to
  1791  	// guaranteed_looks will be ignored.
  1792  	GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"`
  1793  	// ImpressionCap: The lifetime impression cap for CPM Sponsorship deals. Deal
  1794  	// will stop serving when cap is reached.
  1795  	ImpressionCap int64 `json:"impressionCap,omitempty,string"`
  1796  	// MinimumDailyLooks: Daily minimum looks for CPD deal types. For CPD deals,
  1797  	// buyer should negotiate on this field instead of guaranteed_looks.
  1798  	MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"`
  1799  	// PercentShareOfVoice: For sponsorship deals, this is the percentage of the
  1800  	// seller's eligible impressions that the deal will serve until the cap is
  1801  	// reached. Valid value is within range 0~100.
  1802  	PercentShareOfVoice int64 `json:"percentShareOfVoice,omitempty,string"`
  1803  	// ReservationType: The reservation type for a Programmatic Guaranteed deal.
  1804  	// This indicates whether the number of impressions is fixed, or a percent of
  1805  	// available impressions. If not specified, the default reservation type is
  1806  	// STANDARD.
  1807  	//
  1808  	// Possible values:
  1809  	//   "RESERVATION_TYPE_UNSPECIFIED" - An unspecified reservation type.
  1810  	//   "STANDARD" - Non-sponsorship deal.
  1811  	//   "SPONSORSHIP" - Sponsorship deals don't have impression goal
  1812  	// (guaranteed_looks) and they are served based on the flight dates. For CPM
  1813  	// Sponsorship deals, impression_cap is the lifetime impression limit.
  1814  	ReservationType string `json:"reservationType,omitempty"`
  1815  	// ForceSendFields is a list of field names (e.g. "FixedPrice") to
  1816  	// unconditionally include in API requests. By default, fields with empty or
  1817  	// default values are omitted from API requests. See
  1818  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1819  	// details.
  1820  	ForceSendFields []string `json:"-"`
  1821  	// NullFields is a list of field names (e.g. "FixedPrice") to include in API
  1822  	// requests with the JSON null value. By default, fields with empty values are
  1823  	// omitted from API requests. See
  1824  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1825  	NullFields []string `json:"-"`
  1826  }
  1827  
  1828  func (s *ProgrammaticGuaranteedTerms) MarshalJSON() ([]byte, error) {
  1829  	type NoMethod ProgrammaticGuaranteedTerms
  1830  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1831  }
  1832  
  1833  // Proposal: Represents a proposal in the Marketplace. A proposal is the unit
  1834  // of negotiation between a seller and a buyer.
  1835  type Proposal struct {
  1836  	// BilledBuyer: Output only. When the client field is populated, this field
  1837  	// refers to the buyer who creates and manages the client buyer and gets billed
  1838  	// on behalf of the client buyer; when the buyer field is populated, this field
  1839  	// is the same value as buyer. Format : `buyers/{buyerAccountId}`
  1840  	BilledBuyer string `json:"billedBuyer,omitempty"`
  1841  	// Buyer: Output only. Refers to a buyer in The Realtime-bidding API. Format:
  1842  	// `buyers/{buyerAccountId}`
  1843  	Buyer string `json:"buyer,omitempty"`
  1844  	// BuyerContacts: Contact information for the buyer.
  1845  	BuyerContacts []*Contact `json:"buyerContacts,omitempty"`
  1846  	// BuyerPrivateData: Buyer private data (hidden from seller).
  1847  	BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"`
  1848  	// Client: Output only. Refers to a Client. Format:
  1849  	// `buyers/{buyerAccountId}/clients/{clientAccountid}`
  1850  	Client string `json:"client,omitempty"`
  1851  	// DealType: Output only. Type of deal the proposal contains.
  1852  	//
  1853  	// Possible values:
  1854  	//   "DEAL_TYPE_UNSPECIFIED" - Default, unspecified deal type.
  1855  	//   "PREFERRED_DEAL" - Preferred deals.
  1856  	//   "PRIVATE_AUCTION" - Private auction deals.
  1857  	//   "PROGRAMMATIC_GUARANTEED" - Programmatic guaranteed deals.
  1858  	DealType string `json:"dealType,omitempty"`
  1859  	// DisplayName: Output only. The descriptive name for the proposal. Maximum
  1860  	// length of 255 unicode characters is allowed. Control characters are not
  1861  	// allowed. Buyers cannot update this field. Note: Not to be confused with
  1862  	// name, which is a unique identifier of the proposal.
  1863  	DisplayName string `json:"displayName,omitempty"`
  1864  	// IsRenegotiating: Output only. True if the proposal was previously finalized
  1865  	// and is now being renegotiated.
  1866  	IsRenegotiating bool `json:"isRenegotiating,omitempty"`
  1867  	// LastUpdaterOrCommentorRole: Output only. The role of the last user that
  1868  	// either updated the proposal or left a comment.
  1869  	//
  1870  	// Possible values:
  1871  	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
  1872  	// buyer/seller role.
  1873  	//   "BUYER" - Specifies the role as buyer.
  1874  	//   "SELLER" - Specifies the role as seller.
  1875  	LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"`
  1876  	// Name: Immutable. The name of the proposal serving as a unique identifier.
  1877  	// Format: buyers/{accountId}/proposals/{proposalId}
  1878  	Name string `json:"name,omitempty"`
  1879  	// Notes: A list of notes from the buyer and the seller attached to this
  1880  	// proposal.
  1881  	Notes []*Note `json:"notes,omitempty"`
  1882  	// OriginatorRole: Output only. Indicates whether the buyer/seller created the
  1883  	// proposal.
  1884  	//
  1885  	// Possible values:
  1886  	//   "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined
  1887  	// buyer/seller role.
  1888  	//   "BUYER" - Specifies the role as buyer.
  1889  	//   "SELLER" - Specifies the role as seller.
  1890  	OriginatorRole string `json:"originatorRole,omitempty"`
  1891  	// PausingConsented: Whether pausing is allowed for the proposal. This is a
  1892  	// negotiable term between buyers and publishers.
  1893  	PausingConsented bool `json:"pausingConsented,omitempty"`
  1894  	// ProposalRevision: Output only. The revision number for the proposal. Each
  1895  	// update to the proposal or deal causes the proposal revision number to
  1896  	// auto-increment. The buyer keeps track of the last revision number they know
  1897  	// of and pass it in when making an update. If the head revision number on the
  1898  	// server has since incremented, then an ABORTED error is returned during the
  1899  	// update operation to let the buyer know that a subsequent update was made.
  1900  	ProposalRevision int64 `json:"proposalRevision,omitempty,string"`
  1901  	// PublisherProfile: Immutable. Reference to the seller on the proposal.
  1902  	// Format: `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}`
  1903  	// Note: This field may be set only when creating the resource. Modifying this
  1904  	// field while updating the resource will result in an error.
  1905  	PublisherProfile string `json:"publisherProfile,omitempty"`
  1906  	// SellerContacts: Output only. Contact information for the seller.
  1907  	SellerContacts []*Contact `json:"sellerContacts,omitempty"`
  1908  	// State: Output only. Indicates the state of the proposal.
  1909  	//
  1910  	// Possible values:
  1911  	//   "STATE_UNSPECIFIED" - Unspecified proposal state
  1912  	//   "BUYER_REVIEW_REQUESTED" - When a proposal is waiting for buyer to review.
  1913  	//   "SELLER_REVIEW_REQUESTED" - When the proposal is waiting for the seller to
  1914  	// review.
  1915  	//   "BUYER_ACCEPTANCE_REQUESTED" - When the seller accepted the proposal and
  1916  	// sent it to the buyer for review.
  1917  	//   "FINALIZED" - When both buyer and seller has accepted the proposal
  1918  	//   "TERMINATED" - When either buyer or seller has cancelled the proposal
  1919  	State string `json:"state,omitempty"`
  1920  	// TermsAndConditions: Output only. The terms and conditions associated with
  1921  	// this proposal. Accepting a proposal implies acceptance of this field. This
  1922  	// is created by the seller, the buyer can only view it.
  1923  	TermsAndConditions string `json:"termsAndConditions,omitempty"`
  1924  	// UpdateTime: Output only. The time when the proposal was last revised.
  1925  	UpdateTime string `json:"updateTime,omitempty"`
  1926  
  1927  	// ServerResponse contains the HTTP response code and headers from the server.
  1928  	googleapi.ServerResponse `json:"-"`
  1929  	// ForceSendFields is a list of field names (e.g. "BilledBuyer") to
  1930  	// unconditionally include in API requests. By default, fields with empty or
  1931  	// default values are omitted from API requests. See
  1932  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1933  	// details.
  1934  	ForceSendFields []string `json:"-"`
  1935  	// NullFields is a list of field names (e.g. "BilledBuyer") to include in API
  1936  	// requests with the JSON null value. By default, fields with empty values are
  1937  	// omitted from API requests. See
  1938  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1939  	NullFields []string `json:"-"`
  1940  }
  1941  
  1942  func (s *Proposal) MarshalJSON() ([]byte, error) {
  1943  	type NoMethod Proposal
  1944  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1945  }
  1946  
  1947  // PublisherProfile: The values in the publisher profile are supplied by the
  1948  // publisher. All fields are not filterable unless stated otherwise.
  1949  type PublisherProfile struct {
  1950  	// AudienceDescription: Description on the publisher's audience.
  1951  	AudienceDescription string `json:"audienceDescription,omitempty"`
  1952  	// DirectDealsContact: Contact information for direct reservation deals. This
  1953  	// is free text entered by the publisher and may include information like
  1954  	// names, phone numbers and email addresses.
  1955  	DirectDealsContact string `json:"directDealsContact,omitempty"`
  1956  	// DisplayName: Display name of the publisher profile. Can be used to filter
  1957  	// the response of the publisherProfiles.list method.
  1958  	DisplayName string `json:"displayName,omitempty"`
  1959  	// Domains: The list of domains represented in this publisher profile. Empty if
  1960  	// this is a parent profile. These are top private domains, meaning that these
  1961  	// will not contain a string like "photos.google.co.uk/123", but will instead
  1962  	// contain "google.co.uk". Can be used to filter the response of the
  1963  	// publisherProfiles.list method.
  1964  	Domains []string `json:"domains,omitempty"`
  1965  	// IsParent: Indicates if this profile is the parent profile of the seller. A
  1966  	// parent profile represents all the inventory from the seller, as opposed to
  1967  	// child profile that is created to brand a portion of inventory. One seller
  1968  	// has only one parent publisher profile, and can have multiple child profiles.
  1969  	// See https://support.google.com/admanager/answer/6035806 for details. Can be
  1970  	// used to filter the response of the publisherProfiles.list method by setting
  1971  	// the filter to "is_parent: true".
  1972  	IsParent bool `json:"isParent,omitempty"`
  1973  	// LogoUrl: A Google public URL to the logo for this publisher profile. The
  1974  	// logo is stored as a PNG, JPG, or GIF image.
  1975  	LogoUrl string `json:"logoUrl,omitempty"`
  1976  	// MediaKitUrl: URL to additional marketing and sales materials.
  1977  	MediaKitUrl string `json:"mediaKitUrl,omitempty"`
  1978  	// MobileApps: The list of apps represented in this publisher profile. Empty if
  1979  	// this is a parent profile.
  1980  	MobileApps []*PublisherProfileMobileApplication `json:"mobileApps,omitempty"`
  1981  	// Name: Name of the publisher profile. Format:
  1982  	// `buyers/{buyer}/publisherProfiles/{publisher_profile}`
  1983  	Name string `json:"name,omitempty"`
  1984  	// Overview: Overview of the publisher.
  1985  	Overview string `json:"overview,omitempty"`
  1986  	// PitchStatement: Statement explaining what's unique about publisher's
  1987  	// business, and why buyers should partner with the publisher.
  1988  	PitchStatement string `json:"pitchStatement,omitempty"`
  1989  	// ProgrammaticDealsContact: Contact information for programmatic deals. This
  1990  	// is free text entered by the publisher and may include information like
  1991  	// names, phone numbers and email addresses.
  1992  	ProgrammaticDealsContact string `json:"programmaticDealsContact,omitempty"`
  1993  	// PublisherCode: A unique identifying code for the seller. This value is the
  1994  	// same for all of the seller's parent and child publisher profiles. Can be
  1995  	// used to filter the response of the publisherProfiles.list method.
  1996  	PublisherCode string `json:"publisherCode,omitempty"`
  1997  	// SamplePageUrl: URL to a sample content page.
  1998  	SamplePageUrl string `json:"samplePageUrl,omitempty"`
  1999  	// TopHeadlines: Up to three key metrics and rankings. For example, "#1 Mobile
  2000  	// News Site for 20 Straight Months".
  2001  	TopHeadlines []string `json:"topHeadlines,omitempty"`
  2002  
  2003  	// ServerResponse contains the HTTP response code and headers from the server.
  2004  	googleapi.ServerResponse `json:"-"`
  2005  	// ForceSendFields is a list of field names (e.g. "AudienceDescription") to
  2006  	// unconditionally include in API requests. By default, fields with empty or
  2007  	// default values are omitted from API requests. See
  2008  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2009  	// details.
  2010  	ForceSendFields []string `json:"-"`
  2011  	// NullFields is a list of field names (e.g. "AudienceDescription") to include
  2012  	// in API requests with the JSON null value. By default, fields with empty
  2013  	// values are omitted from API requests. See
  2014  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2015  	NullFields []string `json:"-"`
  2016  }
  2017  
  2018  func (s *PublisherProfile) MarshalJSON() ([]byte, error) {
  2019  	type NoMethod PublisherProfile
  2020  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2021  }
  2022  
  2023  // PublisherProfileMobileApplication: A mobile application that contains a
  2024  // external app ID, name, and app store.
  2025  type PublisherProfileMobileApplication struct {
  2026  	// AppStore: The app store the app belongs to. Can be used to filter the
  2027  	// response of the publisherProfiles.list method.
  2028  	//
  2029  	// Possible values:
  2030  	//   "APP_STORE_TYPE_UNSPECIFIED" - A placeholder for an unknown app store.
  2031  	//   "APPLE_ITUNES" - Apple iTunes
  2032  	//   "GOOGLE_PLAY" - Google Play
  2033  	//   "ROKU" - Roku
  2034  	//   "AMAZON_FIRE_TV" - Amazon Fire TV
  2035  	//   "PLAYSTATION" - PlayStation
  2036  	//   "XBOX" - Xbox
  2037  	//   "SAMSUNG_TV" - Samsung TV
  2038  	//   "AMAZON" - Amazon Appstore
  2039  	//   "OPPO" - OPPO App Market
  2040  	//   "SAMSUNG" - Samsung Galaxy Store
  2041  	//   "VIVO" - VIVO App Store
  2042  	//   "XIAOMI" - Xiaomi GetApps
  2043  	//   "LG_TV" - LG TV
  2044  	AppStore string `json:"appStore,omitempty"`
  2045  	// ExternalAppId: The external ID for the app from its app store. Can be used
  2046  	// to filter the response of the publisherProfiles.list method.
  2047  	ExternalAppId string `json:"externalAppId,omitempty"`
  2048  	// Name: The name of the app.
  2049  	Name string `json:"name,omitempty"`
  2050  	// ForceSendFields is a list of field names (e.g. "AppStore") to
  2051  	// unconditionally include in API requests. By default, fields with empty or
  2052  	// default values are omitted from API requests. See
  2053  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2054  	// details.
  2055  	ForceSendFields []string `json:"-"`
  2056  	// NullFields is a list of field names (e.g. "AppStore") to include in API
  2057  	// requests with the JSON null value. By default, fields with empty values are
  2058  	// omitted from API requests. See
  2059  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2060  	NullFields []string `json:"-"`
  2061  }
  2062  
  2063  func (s *PublisherProfileMobileApplication) MarshalJSON() ([]byte, error) {
  2064  	type NoMethod PublisherProfileMobileApplication
  2065  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2066  }
  2067  
  2068  // ResumeFinalizedDealRequest: Request message for resuming a finalized deal.
  2069  type ResumeFinalizedDealRequest struct {
  2070  }
  2071  
  2072  // RtbMetrics: Real-time bidding metrics. For what each metric means refer to
  2073  // Report metrics
  2074  // (https://support.google.com/adxbuyer/answer/6115195#report-metrics)
  2075  type RtbMetrics struct {
  2076  	// AdImpressions7Days: Ad impressions in last 7 days.
  2077  	AdImpressions7Days int64 `json:"adImpressions7Days,omitempty,string"`
  2078  	// BidRate7Days: Bid rate in last 7 days, calculated by (bids / bid requests).
  2079  	BidRate7Days float64 `json:"bidRate7Days,omitempty"`
  2080  	// BidRequests7Days: Bid requests in last 7 days.
  2081  	BidRequests7Days int64 `json:"bidRequests7Days,omitempty,string"`
  2082  	// Bids7Days: Bids in last 7 days.
  2083  	Bids7Days int64 `json:"bids7Days,omitempty,string"`
  2084  	// FilteredBidRate7Days: Filtered bid rate in last 7 days, calculated by
  2085  	// (filtered bids / bids).
  2086  	FilteredBidRate7Days float64 `json:"filteredBidRate7Days,omitempty"`
  2087  	// MustBidRateCurrentMonth: Must bid rate for current month.
  2088  	MustBidRateCurrentMonth float64 `json:"mustBidRateCurrentMonth,omitempty"`
  2089  	// ForceSendFields is a list of field names (e.g. "AdImpressions7Days") to
  2090  	// unconditionally include in API requests. By default, fields with empty or
  2091  	// default values are omitted from API requests. See
  2092  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2093  	// details.
  2094  	ForceSendFields []string `json:"-"`
  2095  	// NullFields is a list of field names (e.g. "AdImpressions7Days") to include
  2096  	// in API requests with the JSON null value. By default, fields with empty
  2097  	// values are omitted from API requests. See
  2098  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2099  	NullFields []string `json:"-"`
  2100  }
  2101  
  2102  func (s *RtbMetrics) MarshalJSON() ([]byte, error) {
  2103  	type NoMethod RtbMetrics
  2104  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2105  }
  2106  
  2107  func (s *RtbMetrics) UnmarshalJSON(data []byte) error {
  2108  	type NoMethod RtbMetrics
  2109  	var s1 struct {
  2110  		BidRate7Days            gensupport.JSONFloat64 `json:"bidRate7Days"`
  2111  		FilteredBidRate7Days    gensupport.JSONFloat64 `json:"filteredBidRate7Days"`
  2112  		MustBidRateCurrentMonth gensupport.JSONFloat64 `json:"mustBidRateCurrentMonth"`
  2113  		*NoMethod
  2114  	}
  2115  	s1.NoMethod = (*NoMethod)(s)
  2116  	if err := json.Unmarshal(data, &s1); err != nil {
  2117  		return err
  2118  	}
  2119  	s.BidRate7Days = float64(s1.BidRate7Days)
  2120  	s.FilteredBidRate7Days = float64(s1.FilteredBidRate7Days)
  2121  	s.MustBidRateCurrentMonth = float64(s1.MustBidRateCurrentMonth)
  2122  	return nil
  2123  }
  2124  
  2125  // SendRfpRequest: Request to send an RFP. All fields in this request are
  2126  // proposed to publisher and subject to changes by publisher during later
  2127  // negotiation.
  2128  type SendRfpRequest struct {
  2129  	// BuyerContacts: Contact information for the buyer.
  2130  	BuyerContacts []*Contact `json:"buyerContacts,omitempty"`
  2131  	// Client: If the current buyer is sending the RFP on behalf of its client, use
  2132  	// this field to specify the name of the client in the format:
  2133  	// `buyers/{accountId}/clients/{clientAccountid}`.
  2134  	Client string `json:"client,omitempty"`
  2135  	// DisplayName: Required. The display name of the proposal being created by
  2136  	// this RFP.
  2137  	DisplayName string `json:"displayName,omitempty"`
  2138  	// EstimatedGrossSpend: Specified by buyers in request for proposal (RFP) to
  2139  	// notify publisher the total estimated spend for the proposal. Publishers will
  2140  	// receive this information and send back proposed deals accordingly.
  2141  	EstimatedGrossSpend *Money `json:"estimatedGrossSpend,omitempty"`
  2142  	// FlightEndTime: Required. Proposed flight end time of the RFP. A timestamp in
  2143  	// RFC3339 UTC "Zulu" format. Note that the specified value will be truncated
  2144  	// to a granularity of one second.
  2145  	FlightEndTime string `json:"flightEndTime,omitempty"`
  2146  	// FlightStartTime: Required. Proposed flight start time of the RFP. A
  2147  	// timestamp in RFC3339 UTC "Zulu" format. Note that the specified value will
  2148  	// be truncated to a granularity of one second.
  2149  	FlightStartTime string `json:"flightStartTime,omitempty"`
  2150  	// GeoTargeting: Geo criteria IDs to be targeted. Refer to Geo tables.
  2151  	GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"`
  2152  	// InventorySizeTargeting: Inventory sizes to be targeted.
  2153  	InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"`
  2154  	// Note: A message that is sent to the publisher. Maximum length is 1024
  2155  	// characters.
  2156  	Note string `json:"note,omitempty"`
  2157  	// PreferredDealTerms: The terms for preferred deals.
  2158  	PreferredDealTerms *PreferredDealTerms `json:"preferredDealTerms,omitempty"`
  2159  	// ProgrammaticGuaranteedTerms: The terms for programmatic guaranteed deals.
  2160  	ProgrammaticGuaranteedTerms *ProgrammaticGuaranteedTerms `json:"programmaticGuaranteedTerms,omitempty"`
  2161  	// PublisherProfile: Required. The profile of the publisher who will receive
  2162  	// this RFP in the format:
  2163  	// `buyers/{accountId}/publisherProfiles/{publisherProfileId}`.
  2164  	PublisherProfile string `json:"publisherProfile,omitempty"`
  2165  	// ForceSendFields is a list of field names (e.g. "BuyerContacts") to
  2166  	// unconditionally include in API requests. By default, fields with empty or
  2167  	// default values are omitted from API requests. See
  2168  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2169  	// details.
  2170  	ForceSendFields []string `json:"-"`
  2171  	// NullFields is a list of field names (e.g. "BuyerContacts") to include in API
  2172  	// requests with the JSON null value. By default, fields with empty values are
  2173  	// omitted from API requests. See
  2174  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2175  	NullFields []string `json:"-"`
  2176  }
  2177  
  2178  func (s *SendRfpRequest) MarshalJSON() ([]byte, error) {
  2179  	type NoMethod SendRfpRequest
  2180  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2181  }
  2182  
  2183  // SetReadyToServeRequest: Request message for setting ready to serve for a
  2184  // finalized deal.
  2185  type SetReadyToServeRequest struct {
  2186  }
  2187  
  2188  // SubscribeAuctionPackageRequest: Request message for SubscribeAuctionPackage.
  2189  type SubscribeAuctionPackageRequest struct {
  2190  }
  2191  
  2192  // SubscribeClientsRequest: Request message for SubscribeAuctionPackageClients.
  2193  type SubscribeClientsRequest struct {
  2194  	// Clients: Optional. A list of client buyers to subscribe to the auction
  2195  	// package, with client buyer in the format
  2196  	// `buyers/{accountId}/clients/{clientAccountId}`. The current buyer will be
  2197  	// subscribed to the auction package regardless of the list contents if not
  2198  	// already.
  2199  	Clients []string `json:"clients,omitempty"`
  2200  	// ForceSendFields is a list of field names (e.g. "Clients") to unconditionally
  2201  	// include in API requests. By default, fields with empty or default values are
  2202  	// omitted from API requests. See
  2203  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2204  	// details.
  2205  	ForceSendFields []string `json:"-"`
  2206  	// NullFields is a list of field names (e.g. "Clients") to include in API
  2207  	// requests with the JSON null value. By default, fields with empty values are
  2208  	// omitted from API requests. See
  2209  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2210  	NullFields []string `json:"-"`
  2211  }
  2212  
  2213  func (s *SubscribeClientsRequest) MarshalJSON() ([]byte, error) {
  2214  	type NoMethod SubscribeClientsRequest
  2215  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2216  }
  2217  
  2218  // TechnologyTargeting: Represents targeting about various types of technology.
  2219  type TechnologyTargeting struct {
  2220  	// DeviceCapabilityTargeting: IDs of device capabilities to be
  2221  	// included/excluded.
  2222  	DeviceCapabilityTargeting *CriteriaTargeting `json:"deviceCapabilityTargeting,omitempty"`
  2223  	// DeviceCategoryTargeting: IDs of device categories to be included/excluded.
  2224  	DeviceCategoryTargeting *CriteriaTargeting `json:"deviceCategoryTargeting,omitempty"`
  2225  	// OperatingSystemTargeting: Operating system related targeting information.
  2226  	OperatingSystemTargeting *OperatingSystemTargeting `json:"operatingSystemTargeting,omitempty"`
  2227  	// ForceSendFields is a list of field names (e.g. "DeviceCapabilityTargeting")
  2228  	// to unconditionally include in API requests. By default, fields with empty or
  2229  	// default values are omitted from API requests. See
  2230  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2231  	// details.
  2232  	ForceSendFields []string `json:"-"`
  2233  	// NullFields is a list of field names (e.g. "DeviceCapabilityTargeting") to
  2234  	// include in API requests with the JSON null value. By default, fields with
  2235  	// empty values are omitted from API requests. See
  2236  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2237  	NullFields []string `json:"-"`
  2238  }
  2239  
  2240  func (s *TechnologyTargeting) MarshalJSON() ([]byte, error) {
  2241  	type NoMethod TechnologyTargeting
  2242  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2243  }
  2244  
  2245  // TimeOfDay: Represents a time of day. The date and time zone are either not
  2246  // significant or are specified elsewhere. An API may choose to allow leap
  2247  // seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.
  2248  type TimeOfDay struct {
  2249  	// Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may
  2250  	// choose to allow the value "24:00:00" for scenarios like business closing
  2251  	// time.
  2252  	Hours int64 `json:"hours,omitempty"`
  2253  	// Minutes: Minutes of hour of day. Must be from 0 to 59.
  2254  	Minutes int64 `json:"minutes,omitempty"`
  2255  	// Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
  2256  	Nanos int64 `json:"nanos,omitempty"`
  2257  	// Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An
  2258  	// API may allow the value 60 if it allows leap-seconds.
  2259  	Seconds int64 `json:"seconds,omitempty"`
  2260  	// ForceSendFields is a list of field names (e.g. "Hours") to unconditionally
  2261  	// include in API requests. By default, fields with empty or default values are
  2262  	// omitted from API requests. See
  2263  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2264  	// details.
  2265  	ForceSendFields []string `json:"-"`
  2266  	// NullFields is a list of field names (e.g. "Hours") to include in API
  2267  	// requests with the JSON null value. By default, fields with empty values are
  2268  	// omitted from API requests. See
  2269  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2270  	NullFields []string `json:"-"`
  2271  }
  2272  
  2273  func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
  2274  	type NoMethod TimeOfDay
  2275  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2276  }
  2277  
  2278  // TimeZone: Represents a time zone from the IANA Time Zone Database
  2279  // (https://www.iana.org/time-zones).
  2280  type TimeZone struct {
  2281  	// Id: IANA Time Zone Database time zone, e.g. "America/New_York".
  2282  	Id string `json:"id,omitempty"`
  2283  	// Version: Optional. IANA Time Zone Database version number, e.g. "2019a".
  2284  	Version string `json:"version,omitempty"`
  2285  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
  2286  	// include in API requests. By default, fields with empty or default values are
  2287  	// omitted from API requests. See
  2288  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2289  	// details.
  2290  	ForceSendFields []string `json:"-"`
  2291  	// NullFields is a list of field names (e.g. "Id") to include in API requests
  2292  	// with the JSON null value. By default, fields with empty values are omitted
  2293  	// from API requests. See
  2294  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2295  	NullFields []string `json:"-"`
  2296  }
  2297  
  2298  func (s *TimeZone) MarshalJSON() ([]byte, error) {
  2299  	type NoMethod TimeZone
  2300  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2301  }
  2302  
  2303  // UnsubscribeAuctionPackageRequest: Request message for
  2304  // UnsubscribeAuctionPackage.
  2305  type UnsubscribeAuctionPackageRequest struct {
  2306  }
  2307  
  2308  // UnsubscribeClientsRequest: Request message for UnsubscribeAuctionPackage.
  2309  type UnsubscribeClientsRequest struct {
  2310  	// Clients: Optional. A list of client buyers to unsubscribe from the auction
  2311  	// package, with client buyer in the format
  2312  	// `buyers/{accountId}/clients/{clientAccountId}`.
  2313  	Clients []string `json:"clients,omitempty"`
  2314  	// ForceSendFields is a list of field names (e.g. "Clients") to unconditionally
  2315  	// include in API requests. By default, fields with empty or default values are
  2316  	// omitted from API requests. See
  2317  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2318  	// details.
  2319  	ForceSendFields []string `json:"-"`
  2320  	// NullFields is a list of field names (e.g. "Clients") to include in API
  2321  	// requests with the JSON null value. By default, fields with empty values are
  2322  	// omitted from API requests. See
  2323  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2324  	NullFields []string `json:"-"`
  2325  }
  2326  
  2327  func (s *UnsubscribeClientsRequest) MarshalJSON() ([]byte, error) {
  2328  	type NoMethod UnsubscribeClientsRequest
  2329  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2330  }
  2331  
  2332  // UpdateDealRequest: Request message for updating the deal at the given
  2333  // revision number.
  2334  type UpdateDealRequest struct {
  2335  	// Deal: Required. The deal to update. The deal's `name` field is used to
  2336  	// identify the deal to be updated. Note: proposal_revision will have to be
  2337  	// provided within the resource or else an error will be thrown. Format:
  2338  	// buyers/{accountId}/proposals/{proposalId}/deals/{dealId}
  2339  	Deal *Deal `json:"deal,omitempty"`
  2340  	// UpdateMask: List of fields to be updated. If empty or unspecified, the
  2341  	// service will update all fields populated in the update request excluding the
  2342  	// output only fields and primitive fields with default value. Note that
  2343  	// explicit field mask is required in order to reset a primitive field back to
  2344  	// its default value, for example, false for boolean fields, 0 for integer
  2345  	// fields. A special field mask consisting of a single path "*" can be used to
  2346  	// indicate full replacement(the equivalent of PUT method), updatable fields
  2347  	// unset or unspecified in the input will be cleared or set to default value.
  2348  	// Output only fields will be ignored regardless of the value of updateMask.
  2349  	UpdateMask string `json:"updateMask,omitempty"`
  2350  	// ForceSendFields is a list of field names (e.g. "Deal") to unconditionally
  2351  	// include in API requests. By default, fields with empty or default values are
  2352  	// omitted from API requests. See
  2353  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2354  	// details.
  2355  	ForceSendFields []string `json:"-"`
  2356  	// NullFields is a list of field names (e.g. "Deal") to include in API requests
  2357  	// with the JSON null value. By default, fields with empty values are omitted
  2358  	// from API requests. See
  2359  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2360  	NullFields []string `json:"-"`
  2361  }
  2362  
  2363  func (s *UpdateDealRequest) MarshalJSON() ([]byte, error) {
  2364  	type NoMethod UpdateDealRequest
  2365  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2366  }
  2367  
  2368  // UriTargeting: Represents a list of targeted and excluded URLs (for example,
  2369  // google.com). For Private Auction Deals, URLs are either included or
  2370  // excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't
  2371  // apply.
  2372  type UriTargeting struct {
  2373  	// ExcludedUris: A list of URLs to be excluded.
  2374  	ExcludedUris []string `json:"excludedUris,omitempty"`
  2375  	// TargetedUris: A list of URLs to be included.
  2376  	TargetedUris []string `json:"targetedUris,omitempty"`
  2377  	// ForceSendFields is a list of field names (e.g. "ExcludedUris") to
  2378  	// unconditionally include in API requests. By default, fields with empty or
  2379  	// default values are omitted from API requests. See
  2380  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2381  	// details.
  2382  	ForceSendFields []string `json:"-"`
  2383  	// NullFields is a list of field names (e.g. "ExcludedUris") to include in API
  2384  	// requests with the JSON null value. By default, fields with empty values are
  2385  	// omitted from API requests. See
  2386  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2387  	NullFields []string `json:"-"`
  2388  }
  2389  
  2390  func (s *UriTargeting) MarshalJSON() ([]byte, error) {
  2391  	type NoMethod UriTargeting
  2392  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2393  }
  2394  
  2395  // VideoTargeting: Represents targeting information about video.
  2396  type VideoTargeting struct {
  2397  	// ExcludedPositionTypes: A list of video positions to be excluded. When this
  2398  	// field is populated, the targeted_position_types field must be empty.
  2399  	//
  2400  	// Possible values:
  2401  	//   "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video
  2402  	// position.
  2403  	//   "PREROLL" - Ad is played before the video.
  2404  	//   "MIDROLL" - Ad is played during the video.
  2405  	//   "POSTROLL" - Ad is played after the video.
  2406  	ExcludedPositionTypes []string `json:"excludedPositionTypes,omitempty"`
  2407  	// TargetedPositionTypes: A list of video positions to be included. When this
  2408  	// field is populated, the excluded_position_types field must be empty.
  2409  	//
  2410  	// Possible values:
  2411  	//   "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video
  2412  	// position.
  2413  	//   "PREROLL" - Ad is played before the video.
  2414  	//   "MIDROLL" - Ad is played during the video.
  2415  	//   "POSTROLL" - Ad is played after the video.
  2416  	TargetedPositionTypes []string `json:"targetedPositionTypes,omitempty"`
  2417  	// ForceSendFields is a list of field names (e.g. "ExcludedPositionTypes") to
  2418  	// unconditionally include in API requests. By default, fields with empty or
  2419  	// default values are omitted from API requests. See
  2420  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2421  	// details.
  2422  	ForceSendFields []string `json:"-"`
  2423  	// NullFields is a list of field names (e.g. "ExcludedPositionTypes") to
  2424  	// include in API requests with the JSON null value. By default, fields with
  2425  	// empty values are omitted from API requests. See
  2426  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2427  	NullFields []string `json:"-"`
  2428  }
  2429  
  2430  func (s *VideoTargeting) MarshalJSON() ([]byte, error) {
  2431  	type NoMethod VideoTargeting
  2432  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2433  }
  2434  
  2435  type BiddersAuctionPackagesListCall struct {
  2436  	s            *Service
  2437  	parent       string
  2438  	urlParams_   gensupport.URLParams
  2439  	ifNoneMatch_ string
  2440  	ctx_         context.Context
  2441  	header_      http.Header
  2442  }
  2443  
  2444  // List: List the auction packages. Buyers can use the URL path
  2445  // "/v1/buyers/{accountId}/auctionPackages" to list auction packages for the
  2446  // current buyer and its clients. Bidders can use the URL path
  2447  // "/v1/bidders/{accountId}/auctionPackages" to list auction packages for the
  2448  // bidder, its media planners, its buyers, and all their clients.
  2449  //
  2450  //   - parent: Name of the parent buyer that can access the auction package.
  2451  //     Format: `buyers/{accountId}`. When used with a bidder account, the auction
  2452  //     packages that the bidder, its media planners, its buyers and clients are
  2453  //     subscribed to will be listed, in the format `bidders/{accountId}`.
  2454  func (r *BiddersAuctionPackagesService) List(parent string) *BiddersAuctionPackagesListCall {
  2455  	c := &BiddersAuctionPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2456  	c.parent = parent
  2457  	return c
  2458  }
  2459  
  2460  // Filter sets the optional parameter "filter": Optional query string using the
  2461  // Cloud API list filtering syntax
  2462  // (/authorized-buyers/apis/guides/list-filters). Only supported when parent is
  2463  // bidder. Supported columns for filtering are: * displayName * createTime *
  2464  // updateTime * eligibleSeatIds
  2465  func (c *BiddersAuctionPackagesListCall) Filter(filter string) *BiddersAuctionPackagesListCall {
  2466  	c.urlParams_.Set("filter", filter)
  2467  	return c
  2468  }
  2469  
  2470  // OrderBy sets the optional parameter "orderBy": An optional query string to
  2471  // sort auction packages using the Cloud API sorting syntax
  2472  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no
  2473  // sort order is specified, results will be returned in an arbitrary order.
  2474  // Only supported when parent is bidder. Supported columns for sorting are: *
  2475  // displayName * createTime * updateTime
  2476  func (c *BiddersAuctionPackagesListCall) OrderBy(orderBy string) *BiddersAuctionPackagesListCall {
  2477  	c.urlParams_.Set("orderBy", orderBy)
  2478  	return c
  2479  }
  2480  
  2481  // PageSize sets the optional parameter "pageSize": Requested page size. The
  2482  // server may return fewer results than requested. Max allowed page size is
  2483  // 500.
  2484  func (c *BiddersAuctionPackagesListCall) PageSize(pageSize int64) *BiddersAuctionPackagesListCall {
  2485  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2486  	return c
  2487  }
  2488  
  2489  // PageToken sets the optional parameter "pageToken": The page token as
  2490  // returned. ListAuctionPackagesResponse.nextPageToken
  2491  func (c *BiddersAuctionPackagesListCall) PageToken(pageToken string) *BiddersAuctionPackagesListCall {
  2492  	c.urlParams_.Set("pageToken", pageToken)
  2493  	return c
  2494  }
  2495  
  2496  // Fields allows partial responses to be retrieved. See
  2497  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2498  // details.
  2499  func (c *BiddersAuctionPackagesListCall) Fields(s ...googleapi.Field) *BiddersAuctionPackagesListCall {
  2500  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2501  	return c
  2502  }
  2503  
  2504  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2505  // object's ETag matches the given value. This is useful for getting updates
  2506  // only after the object has changed since the last request.
  2507  func (c *BiddersAuctionPackagesListCall) IfNoneMatch(entityTag string) *BiddersAuctionPackagesListCall {
  2508  	c.ifNoneMatch_ = entityTag
  2509  	return c
  2510  }
  2511  
  2512  // Context sets the context to be used in this call's Do method.
  2513  func (c *BiddersAuctionPackagesListCall) Context(ctx context.Context) *BiddersAuctionPackagesListCall {
  2514  	c.ctx_ = ctx
  2515  	return c
  2516  }
  2517  
  2518  // Header returns a http.Header that can be modified by the caller to add
  2519  // headers to the request.
  2520  func (c *BiddersAuctionPackagesListCall) Header() http.Header {
  2521  	if c.header_ == nil {
  2522  		c.header_ = make(http.Header)
  2523  	}
  2524  	return c.header_
  2525  }
  2526  
  2527  func (c *BiddersAuctionPackagesListCall) doRequest(alt string) (*http.Response, error) {
  2528  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2529  	if c.ifNoneMatch_ != "" {
  2530  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2531  	}
  2532  	var body io.Reader = nil
  2533  	c.urlParams_.Set("alt", alt)
  2534  	c.urlParams_.Set("prettyPrint", "false")
  2535  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/auctionPackages")
  2536  	urls += "?" + c.urlParams_.Encode()
  2537  	req, err := http.NewRequest("GET", urls, body)
  2538  	if err != nil {
  2539  		return nil, err
  2540  	}
  2541  	req.Header = reqHeaders
  2542  	googleapi.Expand(req.URL, map[string]string{
  2543  		"parent": c.parent,
  2544  	})
  2545  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2546  }
  2547  
  2548  // Do executes the "authorizedbuyersmarketplace.bidders.auctionPackages.list" call.
  2549  // Any non-2xx status code is an error. Response headers are in either
  2550  // *ListAuctionPackagesResponse.ServerResponse.Header or (if a response was
  2551  // returned at all) in error.(*googleapi.Error).Header. Use
  2552  // googleapi.IsNotModified to check whether the returned error was because
  2553  // http.StatusNotModified was returned.
  2554  func (c *BiddersAuctionPackagesListCall) Do(opts ...googleapi.CallOption) (*ListAuctionPackagesResponse, error) {
  2555  	gensupport.SetOptions(c.urlParams_, opts...)
  2556  	res, err := c.doRequest("json")
  2557  	if res != nil && res.StatusCode == http.StatusNotModified {
  2558  		if res.Body != nil {
  2559  			res.Body.Close()
  2560  		}
  2561  		return nil, gensupport.WrapError(&googleapi.Error{
  2562  			Code:   res.StatusCode,
  2563  			Header: res.Header,
  2564  		})
  2565  	}
  2566  	if err != nil {
  2567  		return nil, err
  2568  	}
  2569  	defer googleapi.CloseBody(res)
  2570  	if err := googleapi.CheckResponse(res); err != nil {
  2571  		return nil, gensupport.WrapError(err)
  2572  	}
  2573  	ret := &ListAuctionPackagesResponse{
  2574  		ServerResponse: googleapi.ServerResponse{
  2575  			Header:         res.Header,
  2576  			HTTPStatusCode: res.StatusCode,
  2577  		},
  2578  	}
  2579  	target := &ret
  2580  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2581  		return nil, err
  2582  	}
  2583  	return ret, nil
  2584  }
  2585  
  2586  // Pages invokes f for each page of results.
  2587  // A non-nil error returned from f will halt the iteration.
  2588  // The provided context supersedes any context provided to the Context method.
  2589  func (c *BiddersAuctionPackagesListCall) Pages(ctx context.Context, f func(*ListAuctionPackagesResponse) error) error {
  2590  	c.ctx_ = ctx
  2591  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2592  	for {
  2593  		x, err := c.Do()
  2594  		if err != nil {
  2595  			return err
  2596  		}
  2597  		if err := f(x); err != nil {
  2598  			return err
  2599  		}
  2600  		if x.NextPageToken == "" {
  2601  			return nil
  2602  		}
  2603  		c.PageToken(x.NextPageToken)
  2604  	}
  2605  }
  2606  
  2607  type BiddersFinalizedDealsListCall struct {
  2608  	s            *Service
  2609  	parent       string
  2610  	urlParams_   gensupport.URLParams
  2611  	ifNoneMatch_ string
  2612  	ctx_         context.Context
  2613  	header_      http.Header
  2614  }
  2615  
  2616  // List: Lists finalized deals. Use the URL path
  2617  // "/v1/buyers/{accountId}/finalizedDeals" to list finalized deals for the
  2618  // current buyer and its clients. Bidders can use the URL path
  2619  // "/v1/bidders/{accountId}/finalizedDeals" to list finalized deals for the
  2620  // bidder, its buyers and all their clients.
  2621  //
  2622  //   - parent: The buyer to list the finalized deals for, in the format:
  2623  //     `buyers/{accountId}`. When used to list finalized deals for a bidder, its
  2624  //     buyers and clients, in the format `bidders/{accountId}`.
  2625  func (r *BiddersFinalizedDealsService) List(parent string) *BiddersFinalizedDealsListCall {
  2626  	c := &BiddersFinalizedDealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2627  	c.parent = parent
  2628  	return c
  2629  }
  2630  
  2631  // Filter sets the optional parameter "filter": Optional query string using the
  2632  // Cloud API list filtering syntax
  2633  // (https://developers.google.com/authorized-buyers/apis/guides/list-filters)
  2634  // Supported columns for filtering are: * deal.displayName * deal.dealType *
  2635  // deal.createTime * deal.updateTime * deal.flightStartTime *
  2636  // deal.flightEndTime * deal.eligibleSeatIds * dealServingStatus
  2637  func (c *BiddersFinalizedDealsListCall) Filter(filter string) *BiddersFinalizedDealsListCall {
  2638  	c.urlParams_.Set("filter", filter)
  2639  	return c
  2640  }
  2641  
  2642  // OrderBy sets the optional parameter "orderBy": An optional query string to
  2643  // sort finalized deals using the Cloud API sorting syntax
  2644  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no
  2645  // sort order is specified, results will be returned in an arbitrary order.
  2646  // Supported columns for sorting are: * deal.displayName * deal.createTime *
  2647  // deal.updateTime * deal.flightStartTime * deal.flightEndTime *
  2648  // rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days *
  2649  // rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days *
  2650  // rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth
  2651  func (c *BiddersFinalizedDealsListCall) OrderBy(orderBy string) *BiddersFinalizedDealsListCall {
  2652  	c.urlParams_.Set("orderBy", orderBy)
  2653  	return c
  2654  }
  2655  
  2656  // PageSize sets the optional parameter "pageSize": Requested page size. The
  2657  // server may return fewer results than requested. If requested more than 500,
  2658  // the server will return 500 results per page. If unspecified, the server will
  2659  // pick a default page size of 100.
  2660  func (c *BiddersFinalizedDealsListCall) PageSize(pageSize int64) *BiddersFinalizedDealsListCall {
  2661  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2662  	return c
  2663  }
  2664  
  2665  // PageToken sets the optional parameter "pageToken": The page token as
  2666  // returned from ListFinalizedDealsResponse.
  2667  func (c *BiddersFinalizedDealsListCall) PageToken(pageToken string) *BiddersFinalizedDealsListCall {
  2668  	c.urlParams_.Set("pageToken", pageToken)
  2669  	return c
  2670  }
  2671  
  2672  // Fields allows partial responses to be retrieved. See
  2673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2674  // details.
  2675  func (c *BiddersFinalizedDealsListCall) Fields(s ...googleapi.Field) *BiddersFinalizedDealsListCall {
  2676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2677  	return c
  2678  }
  2679  
  2680  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2681  // object's ETag matches the given value. This is useful for getting updates
  2682  // only after the object has changed since the last request.
  2683  func (c *BiddersFinalizedDealsListCall) IfNoneMatch(entityTag string) *BiddersFinalizedDealsListCall {
  2684  	c.ifNoneMatch_ = entityTag
  2685  	return c
  2686  }
  2687  
  2688  // Context sets the context to be used in this call's Do method.
  2689  func (c *BiddersFinalizedDealsListCall) Context(ctx context.Context) *BiddersFinalizedDealsListCall {
  2690  	c.ctx_ = ctx
  2691  	return c
  2692  }
  2693  
  2694  // Header returns a http.Header that can be modified by the caller to add
  2695  // headers to the request.
  2696  func (c *BiddersFinalizedDealsListCall) Header() http.Header {
  2697  	if c.header_ == nil {
  2698  		c.header_ = make(http.Header)
  2699  	}
  2700  	return c.header_
  2701  }
  2702  
  2703  func (c *BiddersFinalizedDealsListCall) doRequest(alt string) (*http.Response, error) {
  2704  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2705  	if c.ifNoneMatch_ != "" {
  2706  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2707  	}
  2708  	var body io.Reader = nil
  2709  	c.urlParams_.Set("alt", alt)
  2710  	c.urlParams_.Set("prettyPrint", "false")
  2711  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/finalizedDeals")
  2712  	urls += "?" + c.urlParams_.Encode()
  2713  	req, err := http.NewRequest("GET", urls, body)
  2714  	if err != nil {
  2715  		return nil, err
  2716  	}
  2717  	req.Header = reqHeaders
  2718  	googleapi.Expand(req.URL, map[string]string{
  2719  		"parent": c.parent,
  2720  	})
  2721  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2722  }
  2723  
  2724  // Do executes the "authorizedbuyersmarketplace.bidders.finalizedDeals.list" call.
  2725  // Any non-2xx status code is an error. Response headers are in either
  2726  // *ListFinalizedDealsResponse.ServerResponse.Header or (if a response was
  2727  // returned at all) in error.(*googleapi.Error).Header. Use
  2728  // googleapi.IsNotModified to check whether the returned error was because
  2729  // http.StatusNotModified was returned.
  2730  func (c *BiddersFinalizedDealsListCall) Do(opts ...googleapi.CallOption) (*ListFinalizedDealsResponse, error) {
  2731  	gensupport.SetOptions(c.urlParams_, opts...)
  2732  	res, err := c.doRequest("json")
  2733  	if res != nil && res.StatusCode == http.StatusNotModified {
  2734  		if res.Body != nil {
  2735  			res.Body.Close()
  2736  		}
  2737  		return nil, gensupport.WrapError(&googleapi.Error{
  2738  			Code:   res.StatusCode,
  2739  			Header: res.Header,
  2740  		})
  2741  	}
  2742  	if err != nil {
  2743  		return nil, err
  2744  	}
  2745  	defer googleapi.CloseBody(res)
  2746  	if err := googleapi.CheckResponse(res); err != nil {
  2747  		return nil, gensupport.WrapError(err)
  2748  	}
  2749  	ret := &ListFinalizedDealsResponse{
  2750  		ServerResponse: googleapi.ServerResponse{
  2751  			Header:         res.Header,
  2752  			HTTPStatusCode: res.StatusCode,
  2753  		},
  2754  	}
  2755  	target := &ret
  2756  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2757  		return nil, err
  2758  	}
  2759  	return ret, nil
  2760  }
  2761  
  2762  // Pages invokes f for each page of results.
  2763  // A non-nil error returned from f will halt the iteration.
  2764  // The provided context supersedes any context provided to the Context method.
  2765  func (c *BiddersFinalizedDealsListCall) Pages(ctx context.Context, f func(*ListFinalizedDealsResponse) error) error {
  2766  	c.ctx_ = ctx
  2767  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2768  	for {
  2769  		x, err := c.Do()
  2770  		if err != nil {
  2771  			return err
  2772  		}
  2773  		if err := f(x); err != nil {
  2774  			return err
  2775  		}
  2776  		if x.NextPageToken == "" {
  2777  			return nil
  2778  		}
  2779  		c.PageToken(x.NextPageToken)
  2780  	}
  2781  }
  2782  
  2783  type BuyersAuctionPackagesGetCall struct {
  2784  	s            *Service
  2785  	name         string
  2786  	urlParams_   gensupport.URLParams
  2787  	ifNoneMatch_ string
  2788  	ctx_         context.Context
  2789  	header_      http.Header
  2790  }
  2791  
  2792  // Get: Gets an auction package given its name.
  2793  //
  2794  //   - name: Name of auction package to get. Format:
  2795  //     `buyers/{accountId}/auctionPackages/{auctionPackageId}`.
  2796  func (r *BuyersAuctionPackagesService) Get(name string) *BuyersAuctionPackagesGetCall {
  2797  	c := &BuyersAuctionPackagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2798  	c.name = name
  2799  	return c
  2800  }
  2801  
  2802  // Fields allows partial responses to be retrieved. See
  2803  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2804  // details.
  2805  func (c *BuyersAuctionPackagesGetCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesGetCall {
  2806  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2807  	return c
  2808  }
  2809  
  2810  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2811  // object's ETag matches the given value. This is useful for getting updates
  2812  // only after the object has changed since the last request.
  2813  func (c *BuyersAuctionPackagesGetCall) IfNoneMatch(entityTag string) *BuyersAuctionPackagesGetCall {
  2814  	c.ifNoneMatch_ = entityTag
  2815  	return c
  2816  }
  2817  
  2818  // Context sets the context to be used in this call's Do method.
  2819  func (c *BuyersAuctionPackagesGetCall) Context(ctx context.Context) *BuyersAuctionPackagesGetCall {
  2820  	c.ctx_ = ctx
  2821  	return c
  2822  }
  2823  
  2824  // Header returns a http.Header that can be modified by the caller to add
  2825  // headers to the request.
  2826  func (c *BuyersAuctionPackagesGetCall) Header() http.Header {
  2827  	if c.header_ == nil {
  2828  		c.header_ = make(http.Header)
  2829  	}
  2830  	return c.header_
  2831  }
  2832  
  2833  func (c *BuyersAuctionPackagesGetCall) doRequest(alt string) (*http.Response, error) {
  2834  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2835  	if c.ifNoneMatch_ != "" {
  2836  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2837  	}
  2838  	var body io.Reader = nil
  2839  	c.urlParams_.Set("alt", alt)
  2840  	c.urlParams_.Set("prettyPrint", "false")
  2841  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2842  	urls += "?" + c.urlParams_.Encode()
  2843  	req, err := http.NewRequest("GET", urls, body)
  2844  	if err != nil {
  2845  		return nil, err
  2846  	}
  2847  	req.Header = reqHeaders
  2848  	googleapi.Expand(req.URL, map[string]string{
  2849  		"name": c.name,
  2850  	})
  2851  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2852  }
  2853  
  2854  // Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.get" call.
  2855  // Any non-2xx status code is an error. Response headers are in either
  2856  // *AuctionPackage.ServerResponse.Header or (if a response was returned at all)
  2857  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2858  // whether the returned error was because http.StatusNotModified was returned.
  2859  func (c *BuyersAuctionPackagesGetCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, error) {
  2860  	gensupport.SetOptions(c.urlParams_, opts...)
  2861  	res, err := c.doRequest("json")
  2862  	if res != nil && res.StatusCode == http.StatusNotModified {
  2863  		if res.Body != nil {
  2864  			res.Body.Close()
  2865  		}
  2866  		return nil, gensupport.WrapError(&googleapi.Error{
  2867  			Code:   res.StatusCode,
  2868  			Header: res.Header,
  2869  		})
  2870  	}
  2871  	if err != nil {
  2872  		return nil, err
  2873  	}
  2874  	defer googleapi.CloseBody(res)
  2875  	if err := googleapi.CheckResponse(res); err != nil {
  2876  		return nil, gensupport.WrapError(err)
  2877  	}
  2878  	ret := &AuctionPackage{
  2879  		ServerResponse: googleapi.ServerResponse{
  2880  			Header:         res.Header,
  2881  			HTTPStatusCode: res.StatusCode,
  2882  		},
  2883  	}
  2884  	target := &ret
  2885  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2886  		return nil, err
  2887  	}
  2888  	return ret, nil
  2889  }
  2890  
  2891  type BuyersAuctionPackagesListCall struct {
  2892  	s            *Service
  2893  	parent       string
  2894  	urlParams_   gensupport.URLParams
  2895  	ifNoneMatch_ string
  2896  	ctx_         context.Context
  2897  	header_      http.Header
  2898  }
  2899  
  2900  // List: List the auction packages. Buyers can use the URL path
  2901  // "/v1/buyers/{accountId}/auctionPackages" to list auction packages for the
  2902  // current buyer and its clients. Bidders can use the URL path
  2903  // "/v1/bidders/{accountId}/auctionPackages" to list auction packages for the
  2904  // bidder, its media planners, its buyers, and all their clients.
  2905  //
  2906  //   - parent: Name of the parent buyer that can access the auction package.
  2907  //     Format: `buyers/{accountId}`. When used with a bidder account, the auction
  2908  //     packages that the bidder, its media planners, its buyers and clients are
  2909  //     subscribed to will be listed, in the format `bidders/{accountId}`.
  2910  func (r *BuyersAuctionPackagesService) List(parent string) *BuyersAuctionPackagesListCall {
  2911  	c := &BuyersAuctionPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2912  	c.parent = parent
  2913  	return c
  2914  }
  2915  
  2916  // Filter sets the optional parameter "filter": Optional query string using the
  2917  // Cloud API list filtering syntax
  2918  // (/authorized-buyers/apis/guides/list-filters). Only supported when parent is
  2919  // bidder. Supported columns for filtering are: * displayName * createTime *
  2920  // updateTime * eligibleSeatIds
  2921  func (c *BuyersAuctionPackagesListCall) Filter(filter string) *BuyersAuctionPackagesListCall {
  2922  	c.urlParams_.Set("filter", filter)
  2923  	return c
  2924  }
  2925  
  2926  // OrderBy sets the optional parameter "orderBy": An optional query string to
  2927  // sort auction packages using the Cloud API sorting syntax
  2928  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no
  2929  // sort order is specified, results will be returned in an arbitrary order.
  2930  // Only supported when parent is bidder. Supported columns for sorting are: *
  2931  // displayName * createTime * updateTime
  2932  func (c *BuyersAuctionPackagesListCall) OrderBy(orderBy string) *BuyersAuctionPackagesListCall {
  2933  	c.urlParams_.Set("orderBy", orderBy)
  2934  	return c
  2935  }
  2936  
  2937  // PageSize sets the optional parameter "pageSize": Requested page size. The
  2938  // server may return fewer results than requested. Max allowed page size is
  2939  // 500.
  2940  func (c *BuyersAuctionPackagesListCall) PageSize(pageSize int64) *BuyersAuctionPackagesListCall {
  2941  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2942  	return c
  2943  }
  2944  
  2945  // PageToken sets the optional parameter "pageToken": The page token as
  2946  // returned. ListAuctionPackagesResponse.nextPageToken
  2947  func (c *BuyersAuctionPackagesListCall) PageToken(pageToken string) *BuyersAuctionPackagesListCall {
  2948  	c.urlParams_.Set("pageToken", pageToken)
  2949  	return c
  2950  }
  2951  
  2952  // Fields allows partial responses to be retrieved. See
  2953  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2954  // details.
  2955  func (c *BuyersAuctionPackagesListCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesListCall {
  2956  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2957  	return c
  2958  }
  2959  
  2960  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2961  // object's ETag matches the given value. This is useful for getting updates
  2962  // only after the object has changed since the last request.
  2963  func (c *BuyersAuctionPackagesListCall) IfNoneMatch(entityTag string) *BuyersAuctionPackagesListCall {
  2964  	c.ifNoneMatch_ = entityTag
  2965  	return c
  2966  }
  2967  
  2968  // Context sets the context to be used in this call's Do method.
  2969  func (c *BuyersAuctionPackagesListCall) Context(ctx context.Context) *BuyersAuctionPackagesListCall {
  2970  	c.ctx_ = ctx
  2971  	return c
  2972  }
  2973  
  2974  // Header returns a http.Header that can be modified by the caller to add
  2975  // headers to the request.
  2976  func (c *BuyersAuctionPackagesListCall) Header() http.Header {
  2977  	if c.header_ == nil {
  2978  		c.header_ = make(http.Header)
  2979  	}
  2980  	return c.header_
  2981  }
  2982  
  2983  func (c *BuyersAuctionPackagesListCall) doRequest(alt string) (*http.Response, error) {
  2984  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2985  	if c.ifNoneMatch_ != "" {
  2986  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2987  	}
  2988  	var body io.Reader = nil
  2989  	c.urlParams_.Set("alt", alt)
  2990  	c.urlParams_.Set("prettyPrint", "false")
  2991  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/auctionPackages")
  2992  	urls += "?" + c.urlParams_.Encode()
  2993  	req, err := http.NewRequest("GET", urls, body)
  2994  	if err != nil {
  2995  		return nil, err
  2996  	}
  2997  	req.Header = reqHeaders
  2998  	googleapi.Expand(req.URL, map[string]string{
  2999  		"parent": c.parent,
  3000  	})
  3001  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3002  }
  3003  
  3004  // Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.list" call.
  3005  // Any non-2xx status code is an error. Response headers are in either
  3006  // *ListAuctionPackagesResponse.ServerResponse.Header or (if a response was
  3007  // returned at all) in error.(*googleapi.Error).Header. Use
  3008  // googleapi.IsNotModified to check whether the returned error was because
  3009  // http.StatusNotModified was returned.
  3010  func (c *BuyersAuctionPackagesListCall) Do(opts ...googleapi.CallOption) (*ListAuctionPackagesResponse, error) {
  3011  	gensupport.SetOptions(c.urlParams_, opts...)
  3012  	res, err := c.doRequest("json")
  3013  	if res != nil && res.StatusCode == http.StatusNotModified {
  3014  		if res.Body != nil {
  3015  			res.Body.Close()
  3016  		}
  3017  		return nil, gensupport.WrapError(&googleapi.Error{
  3018  			Code:   res.StatusCode,
  3019  			Header: res.Header,
  3020  		})
  3021  	}
  3022  	if err != nil {
  3023  		return nil, err
  3024  	}
  3025  	defer googleapi.CloseBody(res)
  3026  	if err := googleapi.CheckResponse(res); err != nil {
  3027  		return nil, gensupport.WrapError(err)
  3028  	}
  3029  	ret := &ListAuctionPackagesResponse{
  3030  		ServerResponse: googleapi.ServerResponse{
  3031  			Header:         res.Header,
  3032  			HTTPStatusCode: res.StatusCode,
  3033  		},
  3034  	}
  3035  	target := &ret
  3036  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3037  		return nil, err
  3038  	}
  3039  	return ret, nil
  3040  }
  3041  
  3042  // Pages invokes f for each page of results.
  3043  // A non-nil error returned from f will halt the iteration.
  3044  // The provided context supersedes any context provided to the Context method.
  3045  func (c *BuyersAuctionPackagesListCall) Pages(ctx context.Context, f func(*ListAuctionPackagesResponse) error) error {
  3046  	c.ctx_ = ctx
  3047  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3048  	for {
  3049  		x, err := c.Do()
  3050  		if err != nil {
  3051  			return err
  3052  		}
  3053  		if err := f(x); err != nil {
  3054  			return err
  3055  		}
  3056  		if x.NextPageToken == "" {
  3057  			return nil
  3058  		}
  3059  		c.PageToken(x.NextPageToken)
  3060  	}
  3061  }
  3062  
  3063  type BuyersAuctionPackagesSubscribeCall struct {
  3064  	s                              *Service
  3065  	name                           string
  3066  	subscribeauctionpackagerequest *SubscribeAuctionPackageRequest
  3067  	urlParams_                     gensupport.URLParams
  3068  	ctx_                           context.Context
  3069  	header_                        http.Header
  3070  }
  3071  
  3072  // Subscribe: Subscribe to the auction package for the specified buyer. Once
  3073  // subscribed, the bidder will receive a call out for inventory matching the
  3074  // auction package targeting criteria with the auction package deal ID and the
  3075  // specified buyer.
  3076  //
  3077  //   - name: Name of the auction package. Format:
  3078  //     `buyers/{accountId}/auctionPackages/{auctionPackageId}`.
  3079  func (r *BuyersAuctionPackagesService) Subscribe(name string, subscribeauctionpackagerequest *SubscribeAuctionPackageRequest) *BuyersAuctionPackagesSubscribeCall {
  3080  	c := &BuyersAuctionPackagesSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3081  	c.name = name
  3082  	c.subscribeauctionpackagerequest = subscribeauctionpackagerequest
  3083  	return c
  3084  }
  3085  
  3086  // Fields allows partial responses to be retrieved. See
  3087  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3088  // details.
  3089  func (c *BuyersAuctionPackagesSubscribeCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesSubscribeCall {
  3090  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3091  	return c
  3092  }
  3093  
  3094  // Context sets the context to be used in this call's Do method.
  3095  func (c *BuyersAuctionPackagesSubscribeCall) Context(ctx context.Context) *BuyersAuctionPackagesSubscribeCall {
  3096  	c.ctx_ = ctx
  3097  	return c
  3098  }
  3099  
  3100  // Header returns a http.Header that can be modified by the caller to add
  3101  // headers to the request.
  3102  func (c *BuyersAuctionPackagesSubscribeCall) Header() http.Header {
  3103  	if c.header_ == nil {
  3104  		c.header_ = make(http.Header)
  3105  	}
  3106  	return c.header_
  3107  }
  3108  
  3109  func (c *BuyersAuctionPackagesSubscribeCall) doRequest(alt string) (*http.Response, error) {
  3110  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3111  	var body io.Reader = nil
  3112  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribeauctionpackagerequest)
  3113  	if err != nil {
  3114  		return nil, err
  3115  	}
  3116  	c.urlParams_.Set("alt", alt)
  3117  	c.urlParams_.Set("prettyPrint", "false")
  3118  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:subscribe")
  3119  	urls += "?" + c.urlParams_.Encode()
  3120  	req, err := http.NewRequest("POST", urls, body)
  3121  	if err != nil {
  3122  		return nil, err
  3123  	}
  3124  	req.Header = reqHeaders
  3125  	googleapi.Expand(req.URL, map[string]string{
  3126  		"name": c.name,
  3127  	})
  3128  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3129  }
  3130  
  3131  // Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.subscribe" call.
  3132  // Any non-2xx status code is an error. Response headers are in either
  3133  // *AuctionPackage.ServerResponse.Header or (if a response was returned at all)
  3134  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3135  // whether the returned error was because http.StatusNotModified was returned.
  3136  func (c *BuyersAuctionPackagesSubscribeCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, error) {
  3137  	gensupport.SetOptions(c.urlParams_, opts...)
  3138  	res, err := c.doRequest("json")
  3139  	if res != nil && res.StatusCode == http.StatusNotModified {
  3140  		if res.Body != nil {
  3141  			res.Body.Close()
  3142  		}
  3143  		return nil, gensupport.WrapError(&googleapi.Error{
  3144  			Code:   res.StatusCode,
  3145  			Header: res.Header,
  3146  		})
  3147  	}
  3148  	if err != nil {
  3149  		return nil, err
  3150  	}
  3151  	defer googleapi.CloseBody(res)
  3152  	if err := googleapi.CheckResponse(res); err != nil {
  3153  		return nil, gensupport.WrapError(err)
  3154  	}
  3155  	ret := &AuctionPackage{
  3156  		ServerResponse: googleapi.ServerResponse{
  3157  			Header:         res.Header,
  3158  			HTTPStatusCode: res.StatusCode,
  3159  		},
  3160  	}
  3161  	target := &ret
  3162  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3163  		return nil, err
  3164  	}
  3165  	return ret, nil
  3166  }
  3167  
  3168  type BuyersAuctionPackagesSubscribeClientsCall struct {
  3169  	s                       *Service
  3170  	auctionPackage          string
  3171  	subscribeclientsrequest *SubscribeClientsRequest
  3172  	urlParams_              gensupport.URLParams
  3173  	ctx_                    context.Context
  3174  	header_                 http.Header
  3175  }
  3176  
  3177  // SubscribeClients: Subscribe the specified clients of the buyer to the
  3178  // auction package. If a client in the list does not belong to the buyer, an
  3179  // error response will be returned, and all of the following clients in the
  3180  // list will not be subscribed. Subscribing an already subscribed client will
  3181  // have no effect.
  3182  //
  3183  //   - auctionPackage: Name of the auction package. Format:
  3184  //     `buyers/{accountId}/auctionPackages/{auctionPackageId}`.
  3185  func (r *BuyersAuctionPackagesService) SubscribeClients(auctionPackage string, subscribeclientsrequest *SubscribeClientsRequest) *BuyersAuctionPackagesSubscribeClientsCall {
  3186  	c := &BuyersAuctionPackagesSubscribeClientsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3187  	c.auctionPackage = auctionPackage
  3188  	c.subscribeclientsrequest = subscribeclientsrequest
  3189  	return c
  3190  }
  3191  
  3192  // Fields allows partial responses to be retrieved. See
  3193  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3194  // details.
  3195  func (c *BuyersAuctionPackagesSubscribeClientsCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesSubscribeClientsCall {
  3196  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3197  	return c
  3198  }
  3199  
  3200  // Context sets the context to be used in this call's Do method.
  3201  func (c *BuyersAuctionPackagesSubscribeClientsCall) Context(ctx context.Context) *BuyersAuctionPackagesSubscribeClientsCall {
  3202  	c.ctx_ = ctx
  3203  	return c
  3204  }
  3205  
  3206  // Header returns a http.Header that can be modified by the caller to add
  3207  // headers to the request.
  3208  func (c *BuyersAuctionPackagesSubscribeClientsCall) Header() http.Header {
  3209  	if c.header_ == nil {
  3210  		c.header_ = make(http.Header)
  3211  	}
  3212  	return c.header_
  3213  }
  3214  
  3215  func (c *BuyersAuctionPackagesSubscribeClientsCall) doRequest(alt string) (*http.Response, error) {
  3216  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3217  	var body io.Reader = nil
  3218  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscribeclientsrequest)
  3219  	if err != nil {
  3220  		return nil, err
  3221  	}
  3222  	c.urlParams_.Set("alt", alt)
  3223  	c.urlParams_.Set("prettyPrint", "false")
  3224  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+auctionPackage}:subscribeClients")
  3225  	urls += "?" + c.urlParams_.Encode()
  3226  	req, err := http.NewRequest("POST", urls, body)
  3227  	if err != nil {
  3228  		return nil, err
  3229  	}
  3230  	req.Header = reqHeaders
  3231  	googleapi.Expand(req.URL, map[string]string{
  3232  		"auctionPackage": c.auctionPackage,
  3233  	})
  3234  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3235  }
  3236  
  3237  // Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.subscribeClients" call.
  3238  // Any non-2xx status code is an error. Response headers are in either
  3239  // *AuctionPackage.ServerResponse.Header or (if a response was returned at all)
  3240  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3241  // whether the returned error was because http.StatusNotModified was returned.
  3242  func (c *BuyersAuctionPackagesSubscribeClientsCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, error) {
  3243  	gensupport.SetOptions(c.urlParams_, opts...)
  3244  	res, err := c.doRequest("json")
  3245  	if res != nil && res.StatusCode == http.StatusNotModified {
  3246  		if res.Body != nil {
  3247  			res.Body.Close()
  3248  		}
  3249  		return nil, gensupport.WrapError(&googleapi.Error{
  3250  			Code:   res.StatusCode,
  3251  			Header: res.Header,
  3252  		})
  3253  	}
  3254  	if err != nil {
  3255  		return nil, err
  3256  	}
  3257  	defer googleapi.CloseBody(res)
  3258  	if err := googleapi.CheckResponse(res); err != nil {
  3259  		return nil, gensupport.WrapError(err)
  3260  	}
  3261  	ret := &AuctionPackage{
  3262  		ServerResponse: googleapi.ServerResponse{
  3263  			Header:         res.Header,
  3264  			HTTPStatusCode: res.StatusCode,
  3265  		},
  3266  	}
  3267  	target := &ret
  3268  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3269  		return nil, err
  3270  	}
  3271  	return ret, nil
  3272  }
  3273  
  3274  type BuyersAuctionPackagesUnsubscribeCall struct {
  3275  	s                                *Service
  3276  	name                             string
  3277  	unsubscribeauctionpackagerequest *UnsubscribeAuctionPackageRequest
  3278  	urlParams_                       gensupport.URLParams
  3279  	ctx_                             context.Context
  3280  	header_                          http.Header
  3281  }
  3282  
  3283  // Unsubscribe: Unsubscribe from the auction package for the specified buyer.
  3284  // Once unsubscribed, the bidder will no longer receive a call out for the
  3285  // auction package deal ID and the specified buyer.
  3286  //
  3287  //   - name: Name of the auction package. Format:
  3288  //     `buyers/{accountId}/auctionPackages/{auctionPackageId}`.
  3289  func (r *BuyersAuctionPackagesService) Unsubscribe(name string, unsubscribeauctionpackagerequest *UnsubscribeAuctionPackageRequest) *BuyersAuctionPackagesUnsubscribeCall {
  3290  	c := &BuyersAuctionPackagesUnsubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3291  	c.name = name
  3292  	c.unsubscribeauctionpackagerequest = unsubscribeauctionpackagerequest
  3293  	return c
  3294  }
  3295  
  3296  // Fields allows partial responses to be retrieved. See
  3297  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3298  // details.
  3299  func (c *BuyersAuctionPackagesUnsubscribeCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesUnsubscribeCall {
  3300  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3301  	return c
  3302  }
  3303  
  3304  // Context sets the context to be used in this call's Do method.
  3305  func (c *BuyersAuctionPackagesUnsubscribeCall) Context(ctx context.Context) *BuyersAuctionPackagesUnsubscribeCall {
  3306  	c.ctx_ = ctx
  3307  	return c
  3308  }
  3309  
  3310  // Header returns a http.Header that can be modified by the caller to add
  3311  // headers to the request.
  3312  func (c *BuyersAuctionPackagesUnsubscribeCall) Header() http.Header {
  3313  	if c.header_ == nil {
  3314  		c.header_ = make(http.Header)
  3315  	}
  3316  	return c.header_
  3317  }
  3318  
  3319  func (c *BuyersAuctionPackagesUnsubscribeCall) doRequest(alt string) (*http.Response, error) {
  3320  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3321  	var body io.Reader = nil
  3322  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsubscribeauctionpackagerequest)
  3323  	if err != nil {
  3324  		return nil, err
  3325  	}
  3326  	c.urlParams_.Set("alt", alt)
  3327  	c.urlParams_.Set("prettyPrint", "false")
  3328  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:unsubscribe")
  3329  	urls += "?" + c.urlParams_.Encode()
  3330  	req, err := http.NewRequest("POST", urls, body)
  3331  	if err != nil {
  3332  		return nil, err
  3333  	}
  3334  	req.Header = reqHeaders
  3335  	googleapi.Expand(req.URL, map[string]string{
  3336  		"name": c.name,
  3337  	})
  3338  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3339  }
  3340  
  3341  // Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribe" call.
  3342  // Any non-2xx status code is an error. Response headers are in either
  3343  // *AuctionPackage.ServerResponse.Header or (if a response was returned at all)
  3344  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3345  // whether the returned error was because http.StatusNotModified was returned.
  3346  func (c *BuyersAuctionPackagesUnsubscribeCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, error) {
  3347  	gensupport.SetOptions(c.urlParams_, opts...)
  3348  	res, err := c.doRequest("json")
  3349  	if res != nil && res.StatusCode == http.StatusNotModified {
  3350  		if res.Body != nil {
  3351  			res.Body.Close()
  3352  		}
  3353  		return nil, gensupport.WrapError(&googleapi.Error{
  3354  			Code:   res.StatusCode,
  3355  			Header: res.Header,
  3356  		})
  3357  	}
  3358  	if err != nil {
  3359  		return nil, err
  3360  	}
  3361  	defer googleapi.CloseBody(res)
  3362  	if err := googleapi.CheckResponse(res); err != nil {
  3363  		return nil, gensupport.WrapError(err)
  3364  	}
  3365  	ret := &AuctionPackage{
  3366  		ServerResponse: googleapi.ServerResponse{
  3367  			Header:         res.Header,
  3368  			HTTPStatusCode: res.StatusCode,
  3369  		},
  3370  	}
  3371  	target := &ret
  3372  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3373  		return nil, err
  3374  	}
  3375  	return ret, nil
  3376  }
  3377  
  3378  type BuyersAuctionPackagesUnsubscribeClientsCall struct {
  3379  	s                         *Service
  3380  	auctionPackage            string
  3381  	unsubscribeclientsrequest *UnsubscribeClientsRequest
  3382  	urlParams_                gensupport.URLParams
  3383  	ctx_                      context.Context
  3384  	header_                   http.Header
  3385  }
  3386  
  3387  // UnsubscribeClients: Unsubscribe from the auction package for the specified
  3388  // clients of the buyer. Unsubscribing a client that is not subscribed will
  3389  // have no effect.
  3390  //
  3391  //   - auctionPackage: Name of the auction package. Format:
  3392  //     `buyers/{accountId}/auctionPackages/{auctionPackageId}`.
  3393  func (r *BuyersAuctionPackagesService) UnsubscribeClients(auctionPackage string, unsubscribeclientsrequest *UnsubscribeClientsRequest) *BuyersAuctionPackagesUnsubscribeClientsCall {
  3394  	c := &BuyersAuctionPackagesUnsubscribeClientsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3395  	c.auctionPackage = auctionPackage
  3396  	c.unsubscribeclientsrequest = unsubscribeclientsrequest
  3397  	return c
  3398  }
  3399  
  3400  // Fields allows partial responses to be retrieved. See
  3401  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3402  // details.
  3403  func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesUnsubscribeClientsCall {
  3404  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3405  	return c
  3406  }
  3407  
  3408  // Context sets the context to be used in this call's Do method.
  3409  func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Context(ctx context.Context) *BuyersAuctionPackagesUnsubscribeClientsCall {
  3410  	c.ctx_ = ctx
  3411  	return c
  3412  }
  3413  
  3414  // Header returns a http.Header that can be modified by the caller to add
  3415  // headers to the request.
  3416  func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Header() http.Header {
  3417  	if c.header_ == nil {
  3418  		c.header_ = make(http.Header)
  3419  	}
  3420  	return c.header_
  3421  }
  3422  
  3423  func (c *BuyersAuctionPackagesUnsubscribeClientsCall) doRequest(alt string) (*http.Response, error) {
  3424  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3425  	var body io.Reader = nil
  3426  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsubscribeclientsrequest)
  3427  	if err != nil {
  3428  		return nil, err
  3429  	}
  3430  	c.urlParams_.Set("alt", alt)
  3431  	c.urlParams_.Set("prettyPrint", "false")
  3432  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+auctionPackage}:unsubscribeClients")
  3433  	urls += "?" + c.urlParams_.Encode()
  3434  	req, err := http.NewRequest("POST", urls, body)
  3435  	if err != nil {
  3436  		return nil, err
  3437  	}
  3438  	req.Header = reqHeaders
  3439  	googleapi.Expand(req.URL, map[string]string{
  3440  		"auctionPackage": c.auctionPackage,
  3441  	})
  3442  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3443  }
  3444  
  3445  // Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribeClients" call.
  3446  // Any non-2xx status code is an error. Response headers are in either
  3447  // *AuctionPackage.ServerResponse.Header or (if a response was returned at all)
  3448  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3449  // whether the returned error was because http.StatusNotModified was returned.
  3450  func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, error) {
  3451  	gensupport.SetOptions(c.urlParams_, opts...)
  3452  	res, err := c.doRequest("json")
  3453  	if res != nil && res.StatusCode == http.StatusNotModified {
  3454  		if res.Body != nil {
  3455  			res.Body.Close()
  3456  		}
  3457  		return nil, gensupport.WrapError(&googleapi.Error{
  3458  			Code:   res.StatusCode,
  3459  			Header: res.Header,
  3460  		})
  3461  	}
  3462  	if err != nil {
  3463  		return nil, err
  3464  	}
  3465  	defer googleapi.CloseBody(res)
  3466  	if err := googleapi.CheckResponse(res); err != nil {
  3467  		return nil, gensupport.WrapError(err)
  3468  	}
  3469  	ret := &AuctionPackage{
  3470  		ServerResponse: googleapi.ServerResponse{
  3471  			Header:         res.Header,
  3472  			HTTPStatusCode: res.StatusCode,
  3473  		},
  3474  	}
  3475  	target := &ret
  3476  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3477  		return nil, err
  3478  	}
  3479  	return ret, nil
  3480  }
  3481  
  3482  type BuyersClientsActivateCall struct {
  3483  	s                     *Service
  3484  	name                  string
  3485  	activateclientrequest *ActivateClientRequest
  3486  	urlParams_            gensupport.URLParams
  3487  	ctx_                  context.Context
  3488  	header_               http.Header
  3489  }
  3490  
  3491  // Activate: Activates an existing client. The state of the client will be
  3492  // updated to "ACTIVE". This method has no effect if the client is already in
  3493  // "ACTIVE" state.
  3494  //
  3495  // - name: Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`.
  3496  func (r *BuyersClientsService) Activate(name string, activateclientrequest *ActivateClientRequest) *BuyersClientsActivateCall {
  3497  	c := &BuyersClientsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3498  	c.name = name
  3499  	c.activateclientrequest = activateclientrequest
  3500  	return c
  3501  }
  3502  
  3503  // Fields allows partial responses to be retrieved. See
  3504  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3505  // details.
  3506  func (c *BuyersClientsActivateCall) Fields(s ...googleapi.Field) *BuyersClientsActivateCall {
  3507  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3508  	return c
  3509  }
  3510  
  3511  // Context sets the context to be used in this call's Do method.
  3512  func (c *BuyersClientsActivateCall) Context(ctx context.Context) *BuyersClientsActivateCall {
  3513  	c.ctx_ = ctx
  3514  	return c
  3515  }
  3516  
  3517  // Header returns a http.Header that can be modified by the caller to add
  3518  // headers to the request.
  3519  func (c *BuyersClientsActivateCall) Header() http.Header {
  3520  	if c.header_ == nil {
  3521  		c.header_ = make(http.Header)
  3522  	}
  3523  	return c.header_
  3524  }
  3525  
  3526  func (c *BuyersClientsActivateCall) doRequest(alt string) (*http.Response, error) {
  3527  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3528  	var body io.Reader = nil
  3529  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.activateclientrequest)
  3530  	if err != nil {
  3531  		return nil, err
  3532  	}
  3533  	c.urlParams_.Set("alt", alt)
  3534  	c.urlParams_.Set("prettyPrint", "false")
  3535  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate")
  3536  	urls += "?" + c.urlParams_.Encode()
  3537  	req, err := http.NewRequest("POST", urls, body)
  3538  	if err != nil {
  3539  		return nil, err
  3540  	}
  3541  	req.Header = reqHeaders
  3542  	googleapi.Expand(req.URL, map[string]string{
  3543  		"name": c.name,
  3544  	})
  3545  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3546  }
  3547  
  3548  // Do executes the "authorizedbuyersmarketplace.buyers.clients.activate" call.
  3549  // Any non-2xx status code is an error. Response headers are in either
  3550  // *Client.ServerResponse.Header or (if a response was returned at all) in
  3551  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3552  // whether the returned error was because http.StatusNotModified was returned.
  3553  func (c *BuyersClientsActivateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
  3554  	gensupport.SetOptions(c.urlParams_, opts...)
  3555  	res, err := c.doRequest("json")
  3556  	if res != nil && res.StatusCode == http.StatusNotModified {
  3557  		if res.Body != nil {
  3558  			res.Body.Close()
  3559  		}
  3560  		return nil, gensupport.WrapError(&googleapi.Error{
  3561  			Code:   res.StatusCode,
  3562  			Header: res.Header,
  3563  		})
  3564  	}
  3565  	if err != nil {
  3566  		return nil, err
  3567  	}
  3568  	defer googleapi.CloseBody(res)
  3569  	if err := googleapi.CheckResponse(res); err != nil {
  3570  		return nil, gensupport.WrapError(err)
  3571  	}
  3572  	ret := &Client{
  3573  		ServerResponse: googleapi.ServerResponse{
  3574  			Header:         res.Header,
  3575  			HTTPStatusCode: res.StatusCode,
  3576  		},
  3577  	}
  3578  	target := &ret
  3579  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3580  		return nil, err
  3581  	}
  3582  	return ret, nil
  3583  }
  3584  
  3585  type BuyersClientsCreateCall struct {
  3586  	s          *Service
  3587  	parent     string
  3588  	client     *Client
  3589  	urlParams_ gensupport.URLParams
  3590  	ctx_       context.Context
  3591  	header_    http.Header
  3592  }
  3593  
  3594  // Create: Creates a new client.
  3595  //
  3596  // - parent: The name of the buyer. Format: `buyers/{accountId}`.
  3597  func (r *BuyersClientsService) Create(parent string, client *Client) *BuyersClientsCreateCall {
  3598  	c := &BuyersClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3599  	c.parent = parent
  3600  	c.client = client
  3601  	return c
  3602  }
  3603  
  3604  // Fields allows partial responses to be retrieved. See
  3605  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3606  // details.
  3607  func (c *BuyersClientsCreateCall) Fields(s ...googleapi.Field) *BuyersClientsCreateCall {
  3608  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3609  	return c
  3610  }
  3611  
  3612  // Context sets the context to be used in this call's Do method.
  3613  func (c *BuyersClientsCreateCall) Context(ctx context.Context) *BuyersClientsCreateCall {
  3614  	c.ctx_ = ctx
  3615  	return c
  3616  }
  3617  
  3618  // Header returns a http.Header that can be modified by the caller to add
  3619  // headers to the request.
  3620  func (c *BuyersClientsCreateCall) Header() http.Header {
  3621  	if c.header_ == nil {
  3622  		c.header_ = make(http.Header)
  3623  	}
  3624  	return c.header_
  3625  }
  3626  
  3627  func (c *BuyersClientsCreateCall) doRequest(alt string) (*http.Response, error) {
  3628  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3629  	var body io.Reader = nil
  3630  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.client)
  3631  	if err != nil {
  3632  		return nil, err
  3633  	}
  3634  	c.urlParams_.Set("alt", alt)
  3635  	c.urlParams_.Set("prettyPrint", "false")
  3636  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clients")
  3637  	urls += "?" + c.urlParams_.Encode()
  3638  	req, err := http.NewRequest("POST", urls, body)
  3639  	if err != nil {
  3640  		return nil, err
  3641  	}
  3642  	req.Header = reqHeaders
  3643  	googleapi.Expand(req.URL, map[string]string{
  3644  		"parent": c.parent,
  3645  	})
  3646  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3647  }
  3648  
  3649  // Do executes the "authorizedbuyersmarketplace.buyers.clients.create" call.
  3650  // Any non-2xx status code is an error. Response headers are in either
  3651  // *Client.ServerResponse.Header or (if a response was returned at all) in
  3652  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3653  // whether the returned error was because http.StatusNotModified was returned.
  3654  func (c *BuyersClientsCreateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
  3655  	gensupport.SetOptions(c.urlParams_, opts...)
  3656  	res, err := c.doRequest("json")
  3657  	if res != nil && res.StatusCode == http.StatusNotModified {
  3658  		if res.Body != nil {
  3659  			res.Body.Close()
  3660  		}
  3661  		return nil, gensupport.WrapError(&googleapi.Error{
  3662  			Code:   res.StatusCode,
  3663  			Header: res.Header,
  3664  		})
  3665  	}
  3666  	if err != nil {
  3667  		return nil, err
  3668  	}
  3669  	defer googleapi.CloseBody(res)
  3670  	if err := googleapi.CheckResponse(res); err != nil {
  3671  		return nil, gensupport.WrapError(err)
  3672  	}
  3673  	ret := &Client{
  3674  		ServerResponse: googleapi.ServerResponse{
  3675  			Header:         res.Header,
  3676  			HTTPStatusCode: res.StatusCode,
  3677  		},
  3678  	}
  3679  	target := &ret
  3680  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3681  		return nil, err
  3682  	}
  3683  	return ret, nil
  3684  }
  3685  
  3686  type BuyersClientsDeactivateCall struct {
  3687  	s                       *Service
  3688  	name                    string
  3689  	deactivateclientrequest *DeactivateClientRequest
  3690  	urlParams_              gensupport.URLParams
  3691  	ctx_                    context.Context
  3692  	header_                 http.Header
  3693  }
  3694  
  3695  // Deactivate: Deactivates an existing client. The state of the client will be
  3696  // updated to "INACTIVE". This method has no effect if the client is already in
  3697  // "INACTIVE" state.
  3698  //
  3699  // - name: Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`.
  3700  func (r *BuyersClientsService) Deactivate(name string, deactivateclientrequest *DeactivateClientRequest) *BuyersClientsDeactivateCall {
  3701  	c := &BuyersClientsDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3702  	c.name = name
  3703  	c.deactivateclientrequest = deactivateclientrequest
  3704  	return c
  3705  }
  3706  
  3707  // Fields allows partial responses to be retrieved. See
  3708  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3709  // details.
  3710  func (c *BuyersClientsDeactivateCall) Fields(s ...googleapi.Field) *BuyersClientsDeactivateCall {
  3711  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3712  	return c
  3713  }
  3714  
  3715  // Context sets the context to be used in this call's Do method.
  3716  func (c *BuyersClientsDeactivateCall) Context(ctx context.Context) *BuyersClientsDeactivateCall {
  3717  	c.ctx_ = ctx
  3718  	return c
  3719  }
  3720  
  3721  // Header returns a http.Header that can be modified by the caller to add
  3722  // headers to the request.
  3723  func (c *BuyersClientsDeactivateCall) Header() http.Header {
  3724  	if c.header_ == nil {
  3725  		c.header_ = make(http.Header)
  3726  	}
  3727  	return c.header_
  3728  }
  3729  
  3730  func (c *BuyersClientsDeactivateCall) doRequest(alt string) (*http.Response, error) {
  3731  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3732  	var body io.Reader = nil
  3733  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deactivateclientrequest)
  3734  	if err != nil {
  3735  		return nil, err
  3736  	}
  3737  	c.urlParams_.Set("alt", alt)
  3738  	c.urlParams_.Set("prettyPrint", "false")
  3739  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deactivate")
  3740  	urls += "?" + c.urlParams_.Encode()
  3741  	req, err := http.NewRequest("POST", urls, body)
  3742  	if err != nil {
  3743  		return nil, err
  3744  	}
  3745  	req.Header = reqHeaders
  3746  	googleapi.Expand(req.URL, map[string]string{
  3747  		"name": c.name,
  3748  	})
  3749  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3750  }
  3751  
  3752  // Do executes the "authorizedbuyersmarketplace.buyers.clients.deactivate" call.
  3753  // Any non-2xx status code is an error. Response headers are in either
  3754  // *Client.ServerResponse.Header or (if a response was returned at all) in
  3755  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3756  // whether the returned error was because http.StatusNotModified was returned.
  3757  func (c *BuyersClientsDeactivateCall) Do(opts ...googleapi.CallOption) (*Client, error) {
  3758  	gensupport.SetOptions(c.urlParams_, opts...)
  3759  	res, err := c.doRequest("json")
  3760  	if res != nil && res.StatusCode == http.StatusNotModified {
  3761  		if res.Body != nil {
  3762  			res.Body.Close()
  3763  		}
  3764  		return nil, gensupport.WrapError(&googleapi.Error{
  3765  			Code:   res.StatusCode,
  3766  			Header: res.Header,
  3767  		})
  3768  	}
  3769  	if err != nil {
  3770  		return nil, err
  3771  	}
  3772  	defer googleapi.CloseBody(res)
  3773  	if err := googleapi.CheckResponse(res); err != nil {
  3774  		return nil, gensupport.WrapError(err)
  3775  	}
  3776  	ret := &Client{
  3777  		ServerResponse: googleapi.ServerResponse{
  3778  			Header:         res.Header,
  3779  			HTTPStatusCode: res.StatusCode,
  3780  		},
  3781  	}
  3782  	target := &ret
  3783  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3784  		return nil, err
  3785  	}
  3786  	return ret, nil
  3787  }
  3788  
  3789  type BuyersClientsGetCall struct {
  3790  	s            *Service
  3791  	name         string
  3792  	urlParams_   gensupport.URLParams
  3793  	ifNoneMatch_ string
  3794  	ctx_         context.Context
  3795  	header_      http.Header
  3796  }
  3797  
  3798  // Get: Gets a client with a given resource name.
  3799  //
  3800  // - name: Format: `buyers/{accountId}/clients/{clientAccountId}`.
  3801  func (r *BuyersClientsService) Get(name string) *BuyersClientsGetCall {
  3802  	c := &BuyersClientsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3803  	c.name = name
  3804  	return c
  3805  }
  3806  
  3807  // Fields allows partial responses to be retrieved. See
  3808  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3809  // details.
  3810  func (c *BuyersClientsGetCall) Fields(s ...googleapi.Field) *BuyersClientsGetCall {
  3811  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3812  	return c
  3813  }
  3814  
  3815  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3816  // object's ETag matches the given value. This is useful for getting updates
  3817  // only after the object has changed since the last request.
  3818  func (c *BuyersClientsGetCall) IfNoneMatch(entityTag string) *BuyersClientsGetCall {
  3819  	c.ifNoneMatch_ = entityTag
  3820  	return c
  3821  }
  3822  
  3823  // Context sets the context to be used in this call's Do method.
  3824  func (c *BuyersClientsGetCall) Context(ctx context.Context) *BuyersClientsGetCall {
  3825  	c.ctx_ = ctx
  3826  	return c
  3827  }
  3828  
  3829  // Header returns a http.Header that can be modified by the caller to add
  3830  // headers to the request.
  3831  func (c *BuyersClientsGetCall) Header() http.Header {
  3832  	if c.header_ == nil {
  3833  		c.header_ = make(http.Header)
  3834  	}
  3835  	return c.header_
  3836  }
  3837  
  3838  func (c *BuyersClientsGetCall) doRequest(alt string) (*http.Response, error) {
  3839  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3840  	if c.ifNoneMatch_ != "" {
  3841  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3842  	}
  3843  	var body io.Reader = nil
  3844  	c.urlParams_.Set("alt", alt)
  3845  	c.urlParams_.Set("prettyPrint", "false")
  3846  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3847  	urls += "?" + c.urlParams_.Encode()
  3848  	req, err := http.NewRequest("GET", urls, body)
  3849  	if err != nil {
  3850  		return nil, err
  3851  	}
  3852  	req.Header = reqHeaders
  3853  	googleapi.Expand(req.URL, map[string]string{
  3854  		"name": c.name,
  3855  	})
  3856  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3857  }
  3858  
  3859  // Do executes the "authorizedbuyersmarketplace.buyers.clients.get" call.
  3860  // Any non-2xx status code is an error. Response headers are in either
  3861  // *Client.ServerResponse.Header or (if a response was returned at all) in
  3862  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3863  // whether the returned error was because http.StatusNotModified was returned.
  3864  func (c *BuyersClientsGetCall) Do(opts ...googleapi.CallOption) (*Client, error) {
  3865  	gensupport.SetOptions(c.urlParams_, opts...)
  3866  	res, err := c.doRequest("json")
  3867  	if res != nil && res.StatusCode == http.StatusNotModified {
  3868  		if res.Body != nil {
  3869  			res.Body.Close()
  3870  		}
  3871  		return nil, gensupport.WrapError(&googleapi.Error{
  3872  			Code:   res.StatusCode,
  3873  			Header: res.Header,
  3874  		})
  3875  	}
  3876  	if err != nil {
  3877  		return nil, err
  3878  	}
  3879  	defer googleapi.CloseBody(res)
  3880  	if err := googleapi.CheckResponse(res); err != nil {
  3881  		return nil, gensupport.WrapError(err)
  3882  	}
  3883  	ret := &Client{
  3884  		ServerResponse: googleapi.ServerResponse{
  3885  			Header:         res.Header,
  3886  			HTTPStatusCode: res.StatusCode,
  3887  		},
  3888  	}
  3889  	target := &ret
  3890  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3891  		return nil, err
  3892  	}
  3893  	return ret, nil
  3894  }
  3895  
  3896  type BuyersClientsListCall struct {
  3897  	s            *Service
  3898  	parent       string
  3899  	urlParams_   gensupport.URLParams
  3900  	ifNoneMatch_ string
  3901  	ctx_         context.Context
  3902  	header_      http.Header
  3903  }
  3904  
  3905  // List: Lists all the clients for the current buyer.
  3906  //
  3907  // - parent: The name of the buyer. Format: `buyers/{accountId}`.
  3908  func (r *BuyersClientsService) List(parent string) *BuyersClientsListCall {
  3909  	c := &BuyersClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3910  	c.parent = parent
  3911  	return c
  3912  }
  3913  
  3914  // Filter sets the optional parameter "filter": Query string using the
  3915  // Filtering Syntax
  3916  // (https://developers.google.com/authorized-buyers/apis/guides/list-filters)
  3917  // Supported fields for filtering are: * partnerClientId Use this field to
  3918  // filter the clients by the partnerClientId. For example, if the
  3919  // partnerClientId of the client is "1234", the value of this field should be
  3920  // `partnerClientId = "1234", in order to get only the client whose
  3921  // partnerClientId is "1234" in the response.
  3922  func (c *BuyersClientsListCall) Filter(filter string) *BuyersClientsListCall {
  3923  	c.urlParams_.Set("filter", filter)
  3924  	return c
  3925  }
  3926  
  3927  // PageSize sets the optional parameter "pageSize": Requested page size. If
  3928  // left blank, a default page size of 500 will be applied.
  3929  func (c *BuyersClientsListCall) PageSize(pageSize int64) *BuyersClientsListCall {
  3930  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3931  	return c
  3932  }
  3933  
  3934  // PageToken sets the optional parameter "pageToken": A token identifying a
  3935  // page of results the server should return. Typically, this is the value of
  3936  // ListClientsResponse.nextPageToken returned from the previous call to the
  3937  // list method.
  3938  func (c *BuyersClientsListCall) PageToken(pageToken string) *BuyersClientsListCall {
  3939  	c.urlParams_.Set("pageToken", pageToken)
  3940  	return c
  3941  }
  3942  
  3943  // Fields allows partial responses to be retrieved. See
  3944  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3945  // details.
  3946  func (c *BuyersClientsListCall) Fields(s ...googleapi.Field) *BuyersClientsListCall {
  3947  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3948  	return c
  3949  }
  3950  
  3951  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3952  // object's ETag matches the given value. This is useful for getting updates
  3953  // only after the object has changed since the last request.
  3954  func (c *BuyersClientsListCall) IfNoneMatch(entityTag string) *BuyersClientsListCall {
  3955  	c.ifNoneMatch_ = entityTag
  3956  	return c
  3957  }
  3958  
  3959  // Context sets the context to be used in this call's Do method.
  3960  func (c *BuyersClientsListCall) Context(ctx context.Context) *BuyersClientsListCall {
  3961  	c.ctx_ = ctx
  3962  	return c
  3963  }
  3964  
  3965  // Header returns a http.Header that can be modified by the caller to add
  3966  // headers to the request.
  3967  func (c *BuyersClientsListCall) Header() http.Header {
  3968  	if c.header_ == nil {
  3969  		c.header_ = make(http.Header)
  3970  	}
  3971  	return c.header_
  3972  }
  3973  
  3974  func (c *BuyersClientsListCall) doRequest(alt string) (*http.Response, error) {
  3975  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3976  	if c.ifNoneMatch_ != "" {
  3977  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3978  	}
  3979  	var body io.Reader = nil
  3980  	c.urlParams_.Set("alt", alt)
  3981  	c.urlParams_.Set("prettyPrint", "false")
  3982  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/clients")
  3983  	urls += "?" + c.urlParams_.Encode()
  3984  	req, err := http.NewRequest("GET", urls, body)
  3985  	if err != nil {
  3986  		return nil, err
  3987  	}
  3988  	req.Header = reqHeaders
  3989  	googleapi.Expand(req.URL, map[string]string{
  3990  		"parent": c.parent,
  3991  	})
  3992  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3993  }
  3994  
  3995  // Do executes the "authorizedbuyersmarketplace.buyers.clients.list" call.
  3996  // Any non-2xx status code is an error. Response headers are in either
  3997  // *ListClientsResponse.ServerResponse.Header or (if a response was returned at
  3998  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3999  // check whether the returned error was because http.StatusNotModified was
  4000  // returned.
  4001  func (c *BuyersClientsListCall) Do(opts ...googleapi.CallOption) (*ListClientsResponse, error) {
  4002  	gensupport.SetOptions(c.urlParams_, opts...)
  4003  	res, err := c.doRequest("json")
  4004  	if res != nil && res.StatusCode == http.StatusNotModified {
  4005  		if res.Body != nil {
  4006  			res.Body.Close()
  4007  		}
  4008  		return nil, gensupport.WrapError(&googleapi.Error{
  4009  			Code:   res.StatusCode,
  4010  			Header: res.Header,
  4011  		})
  4012  	}
  4013  	if err != nil {
  4014  		return nil, err
  4015  	}
  4016  	defer googleapi.CloseBody(res)
  4017  	if err := googleapi.CheckResponse(res); err != nil {
  4018  		return nil, gensupport.WrapError(err)
  4019  	}
  4020  	ret := &ListClientsResponse{
  4021  		ServerResponse: googleapi.ServerResponse{
  4022  			Header:         res.Header,
  4023  			HTTPStatusCode: res.StatusCode,
  4024  		},
  4025  	}
  4026  	target := &ret
  4027  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4028  		return nil, err
  4029  	}
  4030  	return ret, nil
  4031  }
  4032  
  4033  // Pages invokes f for each page of results.
  4034  // A non-nil error returned from f will halt the iteration.
  4035  // The provided context supersedes any context provided to the Context method.
  4036  func (c *BuyersClientsListCall) Pages(ctx context.Context, f func(*ListClientsResponse) error) error {
  4037  	c.ctx_ = ctx
  4038  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4039  	for {
  4040  		x, err := c.Do()
  4041  		if err != nil {
  4042  			return err
  4043  		}
  4044  		if err := f(x); err != nil {
  4045  			return err
  4046  		}
  4047  		if x.NextPageToken == "" {
  4048  			return nil
  4049  		}
  4050  		c.PageToken(x.NextPageToken)
  4051  	}
  4052  }
  4053  
  4054  type BuyersClientsPatchCall struct {
  4055  	s          *Service
  4056  	name       string
  4057  	client     *Client
  4058  	urlParams_ gensupport.URLParams
  4059  	ctx_       context.Context
  4060  	header_    http.Header
  4061  }
  4062  
  4063  // Patch: Updates an existing client.
  4064  //
  4065  //   - name: Output only. The resource name of the client. Format:
  4066  //     `buyers/{accountId}/clients/{clientAccountId}`.
  4067  func (r *BuyersClientsService) Patch(name string, client *Client) *BuyersClientsPatchCall {
  4068  	c := &BuyersClientsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4069  	c.name = name
  4070  	c.client = client
  4071  	return c
  4072  }
  4073  
  4074  // UpdateMask sets the optional parameter "updateMask": List of fields to be
  4075  // updated. If empty or unspecified, the service will update all fields
  4076  // populated in the update request excluding the output only fields and
  4077  // primitive fields with default value. Note that explicit field mask is
  4078  // required in order to reset a primitive field back to its default value, for
  4079  // example, false for boolean fields, 0 for integer fields. A special field
  4080  // mask consisting of a single path "*" can be used to indicate full
  4081  // replacement(the equivalent of PUT method), updatable fields unset or
  4082  // unspecified in the input will be cleared or set to default value. Output
  4083  // only fields will be ignored regardless of the value of updateMask.
  4084  func (c *BuyersClientsPatchCall) UpdateMask(updateMask string) *BuyersClientsPatchCall {
  4085  	c.urlParams_.Set("updateMask", updateMask)
  4086  	return c
  4087  }
  4088  
  4089  // Fields allows partial responses to be retrieved. See
  4090  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4091  // details.
  4092  func (c *BuyersClientsPatchCall) Fields(s ...googleapi.Field) *BuyersClientsPatchCall {
  4093  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4094  	return c
  4095  }
  4096  
  4097  // Context sets the context to be used in this call's Do method.
  4098  func (c *BuyersClientsPatchCall) Context(ctx context.Context) *BuyersClientsPatchCall {
  4099  	c.ctx_ = ctx
  4100  	return c
  4101  }
  4102  
  4103  // Header returns a http.Header that can be modified by the caller to add
  4104  // headers to the request.
  4105  func (c *BuyersClientsPatchCall) Header() http.Header {
  4106  	if c.header_ == nil {
  4107  		c.header_ = make(http.Header)
  4108  	}
  4109  	return c.header_
  4110  }
  4111  
  4112  func (c *BuyersClientsPatchCall) doRequest(alt string) (*http.Response, error) {
  4113  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4114  	var body io.Reader = nil
  4115  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.client)
  4116  	if err != nil {
  4117  		return nil, err
  4118  	}
  4119  	c.urlParams_.Set("alt", alt)
  4120  	c.urlParams_.Set("prettyPrint", "false")
  4121  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4122  	urls += "?" + c.urlParams_.Encode()
  4123  	req, err := http.NewRequest("PATCH", urls, body)
  4124  	if err != nil {
  4125  		return nil, err
  4126  	}
  4127  	req.Header = reqHeaders
  4128  	googleapi.Expand(req.URL, map[string]string{
  4129  		"name": c.name,
  4130  	})
  4131  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4132  }
  4133  
  4134  // Do executes the "authorizedbuyersmarketplace.buyers.clients.patch" call.
  4135  // Any non-2xx status code is an error. Response headers are in either
  4136  // *Client.ServerResponse.Header or (if a response was returned at all) in
  4137  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4138  // whether the returned error was because http.StatusNotModified was returned.
  4139  func (c *BuyersClientsPatchCall) Do(opts ...googleapi.CallOption) (*Client, error) {
  4140  	gensupport.SetOptions(c.urlParams_, opts...)
  4141  	res, err := c.doRequest("json")
  4142  	if res != nil && res.StatusCode == http.StatusNotModified {
  4143  		if res.Body != nil {
  4144  			res.Body.Close()
  4145  		}
  4146  		return nil, gensupport.WrapError(&googleapi.Error{
  4147  			Code:   res.StatusCode,
  4148  			Header: res.Header,
  4149  		})
  4150  	}
  4151  	if err != nil {
  4152  		return nil, err
  4153  	}
  4154  	defer googleapi.CloseBody(res)
  4155  	if err := googleapi.CheckResponse(res); err != nil {
  4156  		return nil, gensupport.WrapError(err)
  4157  	}
  4158  	ret := &Client{
  4159  		ServerResponse: googleapi.ServerResponse{
  4160  			Header:         res.Header,
  4161  			HTTPStatusCode: res.StatusCode,
  4162  		},
  4163  	}
  4164  	target := &ret
  4165  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4166  		return nil, err
  4167  	}
  4168  	return ret, nil
  4169  }
  4170  
  4171  type BuyersClientsUsersActivateCall struct {
  4172  	s                         *Service
  4173  	name                      string
  4174  	activateclientuserrequest *ActivateClientUserRequest
  4175  	urlParams_                gensupport.URLParams
  4176  	ctx_                      context.Context
  4177  	header_                   http.Header
  4178  }
  4179  
  4180  // Activate: Activates an existing client user. The state of the client user
  4181  // will be updated from "INACTIVE" to "ACTIVE". This method has no effect if
  4182  // the client user is already in "ACTIVE" state. An error will be returned if
  4183  // the client user to activate is still in "INVITED" state.
  4184  //
  4185  //   - name: Format:
  4186  //     `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`.
  4187  func (r *BuyersClientsUsersService) Activate(name string, activateclientuserrequest *ActivateClientUserRequest) *BuyersClientsUsersActivateCall {
  4188  	c := &BuyersClientsUsersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4189  	c.name = name
  4190  	c.activateclientuserrequest = activateclientuserrequest
  4191  	return c
  4192  }
  4193  
  4194  // Fields allows partial responses to be retrieved. See
  4195  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4196  // details.
  4197  func (c *BuyersClientsUsersActivateCall) Fields(s ...googleapi.Field) *BuyersClientsUsersActivateCall {
  4198  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4199  	return c
  4200  }
  4201  
  4202  // Context sets the context to be used in this call's Do method.
  4203  func (c *BuyersClientsUsersActivateCall) Context(ctx context.Context) *BuyersClientsUsersActivateCall {
  4204  	c.ctx_ = ctx
  4205  	return c
  4206  }
  4207  
  4208  // Header returns a http.Header that can be modified by the caller to add
  4209  // headers to the request.
  4210  func (c *BuyersClientsUsersActivateCall) Header() http.Header {
  4211  	if c.header_ == nil {
  4212  		c.header_ = make(http.Header)
  4213  	}
  4214  	return c.header_
  4215  }
  4216  
  4217  func (c *BuyersClientsUsersActivateCall) doRequest(alt string) (*http.Response, error) {
  4218  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4219  	var body io.Reader = nil
  4220  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.activateclientuserrequest)
  4221  	if err != nil {
  4222  		return nil, err
  4223  	}
  4224  	c.urlParams_.Set("alt", alt)
  4225  	c.urlParams_.Set("prettyPrint", "false")
  4226  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:activate")
  4227  	urls += "?" + c.urlParams_.Encode()
  4228  	req, err := http.NewRequest("POST", urls, body)
  4229  	if err != nil {
  4230  		return nil, err
  4231  	}
  4232  	req.Header = reqHeaders
  4233  	googleapi.Expand(req.URL, map[string]string{
  4234  		"name": c.name,
  4235  	})
  4236  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4237  }
  4238  
  4239  // Do executes the "authorizedbuyersmarketplace.buyers.clients.users.activate" call.
  4240  // Any non-2xx status code is an error. Response headers are in either
  4241  // *ClientUser.ServerResponse.Header or (if a response was returned at all) in
  4242  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4243  // whether the returned error was because http.StatusNotModified was returned.
  4244  func (c *BuyersClientsUsersActivateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
  4245  	gensupport.SetOptions(c.urlParams_, opts...)
  4246  	res, err := c.doRequest("json")
  4247  	if res != nil && res.StatusCode == http.StatusNotModified {
  4248  		if res.Body != nil {
  4249  			res.Body.Close()
  4250  		}
  4251  		return nil, gensupport.WrapError(&googleapi.Error{
  4252  			Code:   res.StatusCode,
  4253  			Header: res.Header,
  4254  		})
  4255  	}
  4256  	if err != nil {
  4257  		return nil, err
  4258  	}
  4259  	defer googleapi.CloseBody(res)
  4260  	if err := googleapi.CheckResponse(res); err != nil {
  4261  		return nil, gensupport.WrapError(err)
  4262  	}
  4263  	ret := &ClientUser{
  4264  		ServerResponse: googleapi.ServerResponse{
  4265  			Header:         res.Header,
  4266  			HTTPStatusCode: res.StatusCode,
  4267  		},
  4268  	}
  4269  	target := &ret
  4270  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4271  		return nil, err
  4272  	}
  4273  	return ret, nil
  4274  }
  4275  
  4276  type BuyersClientsUsersCreateCall struct {
  4277  	s          *Service
  4278  	parent     string
  4279  	clientuser *ClientUser
  4280  	urlParams_ gensupport.URLParams
  4281  	ctx_       context.Context
  4282  	header_    http.Header
  4283  }
  4284  
  4285  // Create: Creates a new client user in "INVITED" state. An email invitation
  4286  // will be sent to the new user, once accepted the user will become active.
  4287  //
  4288  //   - parent: The name of the client. Format:
  4289  //     `buyers/{accountId}/clients/{clientAccountId}`.
  4290  func (r *BuyersClientsUsersService) Create(parent string, clientuser *ClientUser) *BuyersClientsUsersCreateCall {
  4291  	c := &BuyersClientsUsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4292  	c.parent = parent
  4293  	c.clientuser = clientuser
  4294  	return c
  4295  }
  4296  
  4297  // Fields allows partial responses to be retrieved. See
  4298  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4299  // details.
  4300  func (c *BuyersClientsUsersCreateCall) Fields(s ...googleapi.Field) *BuyersClientsUsersCreateCall {
  4301  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4302  	return c
  4303  }
  4304  
  4305  // Context sets the context to be used in this call's Do method.
  4306  func (c *BuyersClientsUsersCreateCall) Context(ctx context.Context) *BuyersClientsUsersCreateCall {
  4307  	c.ctx_ = ctx
  4308  	return c
  4309  }
  4310  
  4311  // Header returns a http.Header that can be modified by the caller to add
  4312  // headers to the request.
  4313  func (c *BuyersClientsUsersCreateCall) Header() http.Header {
  4314  	if c.header_ == nil {
  4315  		c.header_ = make(http.Header)
  4316  	}
  4317  	return c.header_
  4318  }
  4319  
  4320  func (c *BuyersClientsUsersCreateCall) doRequest(alt string) (*http.Response, error) {
  4321  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4322  	var body io.Reader = nil
  4323  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientuser)
  4324  	if err != nil {
  4325  		return nil, err
  4326  	}
  4327  	c.urlParams_.Set("alt", alt)
  4328  	c.urlParams_.Set("prettyPrint", "false")
  4329  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/users")
  4330  	urls += "?" + c.urlParams_.Encode()
  4331  	req, err := http.NewRequest("POST", urls, body)
  4332  	if err != nil {
  4333  		return nil, err
  4334  	}
  4335  	req.Header = reqHeaders
  4336  	googleapi.Expand(req.URL, map[string]string{
  4337  		"parent": c.parent,
  4338  	})
  4339  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4340  }
  4341  
  4342  // Do executes the "authorizedbuyersmarketplace.buyers.clients.users.create" call.
  4343  // Any non-2xx status code is an error. Response headers are in either
  4344  // *ClientUser.ServerResponse.Header or (if a response was returned at all) in
  4345  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4346  // whether the returned error was because http.StatusNotModified was returned.
  4347  func (c *BuyersClientsUsersCreateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
  4348  	gensupport.SetOptions(c.urlParams_, opts...)
  4349  	res, err := c.doRequest("json")
  4350  	if res != nil && res.StatusCode == http.StatusNotModified {
  4351  		if res.Body != nil {
  4352  			res.Body.Close()
  4353  		}
  4354  		return nil, gensupport.WrapError(&googleapi.Error{
  4355  			Code:   res.StatusCode,
  4356  			Header: res.Header,
  4357  		})
  4358  	}
  4359  	if err != nil {
  4360  		return nil, err
  4361  	}
  4362  	defer googleapi.CloseBody(res)
  4363  	if err := googleapi.CheckResponse(res); err != nil {
  4364  		return nil, gensupport.WrapError(err)
  4365  	}
  4366  	ret := &ClientUser{
  4367  		ServerResponse: googleapi.ServerResponse{
  4368  			Header:         res.Header,
  4369  			HTTPStatusCode: res.StatusCode,
  4370  		},
  4371  	}
  4372  	target := &ret
  4373  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4374  		return nil, err
  4375  	}
  4376  	return ret, nil
  4377  }
  4378  
  4379  type BuyersClientsUsersDeactivateCall struct {
  4380  	s                           *Service
  4381  	name                        string
  4382  	deactivateclientuserrequest *DeactivateClientUserRequest
  4383  	urlParams_                  gensupport.URLParams
  4384  	ctx_                        context.Context
  4385  	header_                     http.Header
  4386  }
  4387  
  4388  // Deactivate: Deactivates an existing client user. The state of the client
  4389  // user will be updated from "ACTIVE" to "INACTIVE". This method has no effect
  4390  // if the client user is already in "INACTIVE" state. An error will be returned
  4391  // if the client user to deactivate is still in "INVITED" state.
  4392  //
  4393  //   - name: Format:
  4394  //     `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`.
  4395  func (r *BuyersClientsUsersService) Deactivate(name string, deactivateclientuserrequest *DeactivateClientUserRequest) *BuyersClientsUsersDeactivateCall {
  4396  	c := &BuyersClientsUsersDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4397  	c.name = name
  4398  	c.deactivateclientuserrequest = deactivateclientuserrequest
  4399  	return c
  4400  }
  4401  
  4402  // Fields allows partial responses to be retrieved. See
  4403  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4404  // details.
  4405  func (c *BuyersClientsUsersDeactivateCall) Fields(s ...googleapi.Field) *BuyersClientsUsersDeactivateCall {
  4406  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4407  	return c
  4408  }
  4409  
  4410  // Context sets the context to be used in this call's Do method.
  4411  func (c *BuyersClientsUsersDeactivateCall) Context(ctx context.Context) *BuyersClientsUsersDeactivateCall {
  4412  	c.ctx_ = ctx
  4413  	return c
  4414  }
  4415  
  4416  // Header returns a http.Header that can be modified by the caller to add
  4417  // headers to the request.
  4418  func (c *BuyersClientsUsersDeactivateCall) Header() http.Header {
  4419  	if c.header_ == nil {
  4420  		c.header_ = make(http.Header)
  4421  	}
  4422  	return c.header_
  4423  }
  4424  
  4425  func (c *BuyersClientsUsersDeactivateCall) doRequest(alt string) (*http.Response, error) {
  4426  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4427  	var body io.Reader = nil
  4428  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deactivateclientuserrequest)
  4429  	if err != nil {
  4430  		return nil, err
  4431  	}
  4432  	c.urlParams_.Set("alt", alt)
  4433  	c.urlParams_.Set("prettyPrint", "false")
  4434  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deactivate")
  4435  	urls += "?" + c.urlParams_.Encode()
  4436  	req, err := http.NewRequest("POST", urls, body)
  4437  	if err != nil {
  4438  		return nil, err
  4439  	}
  4440  	req.Header = reqHeaders
  4441  	googleapi.Expand(req.URL, map[string]string{
  4442  		"name": c.name,
  4443  	})
  4444  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4445  }
  4446  
  4447  // Do executes the "authorizedbuyersmarketplace.buyers.clients.users.deactivate" call.
  4448  // Any non-2xx status code is an error. Response headers are in either
  4449  // *ClientUser.ServerResponse.Header or (if a response was returned at all) in
  4450  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4451  // whether the returned error was because http.StatusNotModified was returned.
  4452  func (c *BuyersClientsUsersDeactivateCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
  4453  	gensupport.SetOptions(c.urlParams_, opts...)
  4454  	res, err := c.doRequest("json")
  4455  	if res != nil && res.StatusCode == http.StatusNotModified {
  4456  		if res.Body != nil {
  4457  			res.Body.Close()
  4458  		}
  4459  		return nil, gensupport.WrapError(&googleapi.Error{
  4460  			Code:   res.StatusCode,
  4461  			Header: res.Header,
  4462  		})
  4463  	}
  4464  	if err != nil {
  4465  		return nil, err
  4466  	}
  4467  	defer googleapi.CloseBody(res)
  4468  	if err := googleapi.CheckResponse(res); err != nil {
  4469  		return nil, gensupport.WrapError(err)
  4470  	}
  4471  	ret := &ClientUser{
  4472  		ServerResponse: googleapi.ServerResponse{
  4473  			Header:         res.Header,
  4474  			HTTPStatusCode: res.StatusCode,
  4475  		},
  4476  	}
  4477  	target := &ret
  4478  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4479  		return nil, err
  4480  	}
  4481  	return ret, nil
  4482  }
  4483  
  4484  type BuyersClientsUsersDeleteCall struct {
  4485  	s          *Service
  4486  	name       string
  4487  	urlParams_ gensupport.URLParams
  4488  	ctx_       context.Context
  4489  	header_    http.Header
  4490  }
  4491  
  4492  // Delete: Deletes an existing client user. The client user will lose access to
  4493  // the Authorized Buyers UI. Note that if a client user is deleted, the user's
  4494  // access to the UI can't be restored unless a new client user is created and
  4495  // activated.
  4496  //
  4497  //   - name: Format:
  4498  //     `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`.
  4499  func (r *BuyersClientsUsersService) Delete(name string) *BuyersClientsUsersDeleteCall {
  4500  	c := &BuyersClientsUsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4501  	c.name = name
  4502  	return c
  4503  }
  4504  
  4505  // Fields allows partial responses to be retrieved. See
  4506  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4507  // details.
  4508  func (c *BuyersClientsUsersDeleteCall) Fields(s ...googleapi.Field) *BuyersClientsUsersDeleteCall {
  4509  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4510  	return c
  4511  }
  4512  
  4513  // Context sets the context to be used in this call's Do method.
  4514  func (c *BuyersClientsUsersDeleteCall) Context(ctx context.Context) *BuyersClientsUsersDeleteCall {
  4515  	c.ctx_ = ctx
  4516  	return c
  4517  }
  4518  
  4519  // Header returns a http.Header that can be modified by the caller to add
  4520  // headers to the request.
  4521  func (c *BuyersClientsUsersDeleteCall) Header() http.Header {
  4522  	if c.header_ == nil {
  4523  		c.header_ = make(http.Header)
  4524  	}
  4525  	return c.header_
  4526  }
  4527  
  4528  func (c *BuyersClientsUsersDeleteCall) doRequest(alt string) (*http.Response, error) {
  4529  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4530  	var body io.Reader = nil
  4531  	c.urlParams_.Set("alt", alt)
  4532  	c.urlParams_.Set("prettyPrint", "false")
  4533  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4534  	urls += "?" + c.urlParams_.Encode()
  4535  	req, err := http.NewRequest("DELETE", urls, body)
  4536  	if err != nil {
  4537  		return nil, err
  4538  	}
  4539  	req.Header = reqHeaders
  4540  	googleapi.Expand(req.URL, map[string]string{
  4541  		"name": c.name,
  4542  	})
  4543  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4544  }
  4545  
  4546  // Do executes the "authorizedbuyersmarketplace.buyers.clients.users.delete" call.
  4547  // Any non-2xx status code is an error. Response headers are in either
  4548  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4549  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4550  // whether the returned error was because http.StatusNotModified was returned.
  4551  func (c *BuyersClientsUsersDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4552  	gensupport.SetOptions(c.urlParams_, opts...)
  4553  	res, err := c.doRequest("json")
  4554  	if res != nil && res.StatusCode == http.StatusNotModified {
  4555  		if res.Body != nil {
  4556  			res.Body.Close()
  4557  		}
  4558  		return nil, gensupport.WrapError(&googleapi.Error{
  4559  			Code:   res.StatusCode,
  4560  			Header: res.Header,
  4561  		})
  4562  	}
  4563  	if err != nil {
  4564  		return nil, err
  4565  	}
  4566  	defer googleapi.CloseBody(res)
  4567  	if err := googleapi.CheckResponse(res); err != nil {
  4568  		return nil, gensupport.WrapError(err)
  4569  	}
  4570  	ret := &Empty{
  4571  		ServerResponse: googleapi.ServerResponse{
  4572  			Header:         res.Header,
  4573  			HTTPStatusCode: res.StatusCode,
  4574  		},
  4575  	}
  4576  	target := &ret
  4577  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4578  		return nil, err
  4579  	}
  4580  	return ret, nil
  4581  }
  4582  
  4583  type BuyersClientsUsersGetCall struct {
  4584  	s            *Service
  4585  	name         string
  4586  	urlParams_   gensupport.URLParams
  4587  	ifNoneMatch_ string
  4588  	ctx_         context.Context
  4589  	header_      http.Header
  4590  }
  4591  
  4592  // Get: Retrieves an existing client user.
  4593  //
  4594  //   - name: Format:
  4595  //     `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`.
  4596  func (r *BuyersClientsUsersService) Get(name string) *BuyersClientsUsersGetCall {
  4597  	c := &BuyersClientsUsersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4598  	c.name = name
  4599  	return c
  4600  }
  4601  
  4602  // Fields allows partial responses to be retrieved. See
  4603  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4604  // details.
  4605  func (c *BuyersClientsUsersGetCall) Fields(s ...googleapi.Field) *BuyersClientsUsersGetCall {
  4606  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4607  	return c
  4608  }
  4609  
  4610  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4611  // object's ETag matches the given value. This is useful for getting updates
  4612  // only after the object has changed since the last request.
  4613  func (c *BuyersClientsUsersGetCall) IfNoneMatch(entityTag string) *BuyersClientsUsersGetCall {
  4614  	c.ifNoneMatch_ = entityTag
  4615  	return c
  4616  }
  4617  
  4618  // Context sets the context to be used in this call's Do method.
  4619  func (c *BuyersClientsUsersGetCall) Context(ctx context.Context) *BuyersClientsUsersGetCall {
  4620  	c.ctx_ = ctx
  4621  	return c
  4622  }
  4623  
  4624  // Header returns a http.Header that can be modified by the caller to add
  4625  // headers to the request.
  4626  func (c *BuyersClientsUsersGetCall) Header() http.Header {
  4627  	if c.header_ == nil {
  4628  		c.header_ = make(http.Header)
  4629  	}
  4630  	return c.header_
  4631  }
  4632  
  4633  func (c *BuyersClientsUsersGetCall) doRequest(alt string) (*http.Response, error) {
  4634  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4635  	if c.ifNoneMatch_ != "" {
  4636  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4637  	}
  4638  	var body io.Reader = nil
  4639  	c.urlParams_.Set("alt", alt)
  4640  	c.urlParams_.Set("prettyPrint", "false")
  4641  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4642  	urls += "?" + c.urlParams_.Encode()
  4643  	req, err := http.NewRequest("GET", urls, body)
  4644  	if err != nil {
  4645  		return nil, err
  4646  	}
  4647  	req.Header = reqHeaders
  4648  	googleapi.Expand(req.URL, map[string]string{
  4649  		"name": c.name,
  4650  	})
  4651  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4652  }
  4653  
  4654  // Do executes the "authorizedbuyersmarketplace.buyers.clients.users.get" call.
  4655  // Any non-2xx status code is an error. Response headers are in either
  4656  // *ClientUser.ServerResponse.Header or (if a response was returned at all) in
  4657  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4658  // whether the returned error was because http.StatusNotModified was returned.
  4659  func (c *BuyersClientsUsersGetCall) Do(opts ...googleapi.CallOption) (*ClientUser, error) {
  4660  	gensupport.SetOptions(c.urlParams_, opts...)
  4661  	res, err := c.doRequest("json")
  4662  	if res != nil && res.StatusCode == http.StatusNotModified {
  4663  		if res.Body != nil {
  4664  			res.Body.Close()
  4665  		}
  4666  		return nil, gensupport.WrapError(&googleapi.Error{
  4667  			Code:   res.StatusCode,
  4668  			Header: res.Header,
  4669  		})
  4670  	}
  4671  	if err != nil {
  4672  		return nil, err
  4673  	}
  4674  	defer googleapi.CloseBody(res)
  4675  	if err := googleapi.CheckResponse(res); err != nil {
  4676  		return nil, gensupport.WrapError(err)
  4677  	}
  4678  	ret := &ClientUser{
  4679  		ServerResponse: googleapi.ServerResponse{
  4680  			Header:         res.Header,
  4681  			HTTPStatusCode: res.StatusCode,
  4682  		},
  4683  	}
  4684  	target := &ret
  4685  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4686  		return nil, err
  4687  	}
  4688  	return ret, nil
  4689  }
  4690  
  4691  type BuyersClientsUsersListCall struct {
  4692  	s            *Service
  4693  	parent       string
  4694  	urlParams_   gensupport.URLParams
  4695  	ifNoneMatch_ string
  4696  	ctx_         context.Context
  4697  	header_      http.Header
  4698  }
  4699  
  4700  // List: Lists all client users for a specified client.
  4701  //
  4702  //   - parent: The name of the client. Format:
  4703  //     `buyers/{buyerAccountId}/clients/{clientAccountId}`.
  4704  func (r *BuyersClientsUsersService) List(parent string) *BuyersClientsUsersListCall {
  4705  	c := &BuyersClientsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4706  	c.parent = parent
  4707  	return c
  4708  }
  4709  
  4710  // PageSize sets the optional parameter "pageSize": Requested page size. If
  4711  // left blank, a default page size of 500 will be applied.
  4712  func (c *BuyersClientsUsersListCall) PageSize(pageSize int64) *BuyersClientsUsersListCall {
  4713  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4714  	return c
  4715  }
  4716  
  4717  // PageToken sets the optional parameter "pageToken": A token identifying a
  4718  // page of results the server should return. Typically, this is the value of
  4719  // ListClientUsersResponse.nextPageToken returned from the previous call to the
  4720  // list method.
  4721  func (c *BuyersClientsUsersListCall) PageToken(pageToken string) *BuyersClientsUsersListCall {
  4722  	c.urlParams_.Set("pageToken", pageToken)
  4723  	return c
  4724  }
  4725  
  4726  // Fields allows partial responses to be retrieved. See
  4727  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4728  // details.
  4729  func (c *BuyersClientsUsersListCall) Fields(s ...googleapi.Field) *BuyersClientsUsersListCall {
  4730  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4731  	return c
  4732  }
  4733  
  4734  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4735  // object's ETag matches the given value. This is useful for getting updates
  4736  // only after the object has changed since the last request.
  4737  func (c *BuyersClientsUsersListCall) IfNoneMatch(entityTag string) *BuyersClientsUsersListCall {
  4738  	c.ifNoneMatch_ = entityTag
  4739  	return c
  4740  }
  4741  
  4742  // Context sets the context to be used in this call's Do method.
  4743  func (c *BuyersClientsUsersListCall) Context(ctx context.Context) *BuyersClientsUsersListCall {
  4744  	c.ctx_ = ctx
  4745  	return c
  4746  }
  4747  
  4748  // Header returns a http.Header that can be modified by the caller to add
  4749  // headers to the request.
  4750  func (c *BuyersClientsUsersListCall) Header() http.Header {
  4751  	if c.header_ == nil {
  4752  		c.header_ = make(http.Header)
  4753  	}
  4754  	return c.header_
  4755  }
  4756  
  4757  func (c *BuyersClientsUsersListCall) doRequest(alt string) (*http.Response, error) {
  4758  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4759  	if c.ifNoneMatch_ != "" {
  4760  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4761  	}
  4762  	var body io.Reader = nil
  4763  	c.urlParams_.Set("alt", alt)
  4764  	c.urlParams_.Set("prettyPrint", "false")
  4765  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/users")
  4766  	urls += "?" + c.urlParams_.Encode()
  4767  	req, err := http.NewRequest("GET", urls, body)
  4768  	if err != nil {
  4769  		return nil, err
  4770  	}
  4771  	req.Header = reqHeaders
  4772  	googleapi.Expand(req.URL, map[string]string{
  4773  		"parent": c.parent,
  4774  	})
  4775  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4776  }
  4777  
  4778  // Do executes the "authorizedbuyersmarketplace.buyers.clients.users.list" call.
  4779  // Any non-2xx status code is an error. Response headers are in either
  4780  // *ListClientUsersResponse.ServerResponse.Header or (if a response was
  4781  // returned at all) in error.(*googleapi.Error).Header. Use
  4782  // googleapi.IsNotModified to check whether the returned error was because
  4783  // http.StatusNotModified was returned.
  4784  func (c *BuyersClientsUsersListCall) Do(opts ...googleapi.CallOption) (*ListClientUsersResponse, error) {
  4785  	gensupport.SetOptions(c.urlParams_, opts...)
  4786  	res, err := c.doRequest("json")
  4787  	if res != nil && res.StatusCode == http.StatusNotModified {
  4788  		if res.Body != nil {
  4789  			res.Body.Close()
  4790  		}
  4791  		return nil, gensupport.WrapError(&googleapi.Error{
  4792  			Code:   res.StatusCode,
  4793  			Header: res.Header,
  4794  		})
  4795  	}
  4796  	if err != nil {
  4797  		return nil, err
  4798  	}
  4799  	defer googleapi.CloseBody(res)
  4800  	if err := googleapi.CheckResponse(res); err != nil {
  4801  		return nil, gensupport.WrapError(err)
  4802  	}
  4803  	ret := &ListClientUsersResponse{
  4804  		ServerResponse: googleapi.ServerResponse{
  4805  			Header:         res.Header,
  4806  			HTTPStatusCode: res.StatusCode,
  4807  		},
  4808  	}
  4809  	target := &ret
  4810  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4811  		return nil, err
  4812  	}
  4813  	return ret, nil
  4814  }
  4815  
  4816  // Pages invokes f for each page of results.
  4817  // A non-nil error returned from f will halt the iteration.
  4818  // The provided context supersedes any context provided to the Context method.
  4819  func (c *BuyersClientsUsersListCall) Pages(ctx context.Context, f func(*ListClientUsersResponse) error) error {
  4820  	c.ctx_ = ctx
  4821  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4822  	for {
  4823  		x, err := c.Do()
  4824  		if err != nil {
  4825  			return err
  4826  		}
  4827  		if err := f(x); err != nil {
  4828  			return err
  4829  		}
  4830  		if x.NextPageToken == "" {
  4831  			return nil
  4832  		}
  4833  		c.PageToken(x.NextPageToken)
  4834  	}
  4835  }
  4836  
  4837  type BuyersFinalizedDealsAddCreativeCall struct {
  4838  	s                  *Service
  4839  	deal               string
  4840  	addcreativerequest *AddCreativeRequest
  4841  	urlParams_         gensupport.URLParams
  4842  	ctx_               context.Context
  4843  	header_            http.Header
  4844  }
  4845  
  4846  // AddCreative: Add creative to be used in the bidding process for a finalized
  4847  // deal. For programmatic guaranteed deals, it's recommended that you associate
  4848  // at least one approved creative with the deal before calling SetReadyToServe,
  4849  // to help reduce the number of bid responses filtered because they don't
  4850  // contain approved creatives. Creatives successfully added to a deal can be
  4851  // found in the Realtime-bidding Creatives API creative.deal_ids. This method
  4852  // only applies to programmatic guaranteed deals. Maximum number of 1000
  4853  // creatives can be added to a finalized deal.
  4854  //
  4855  //   - deal: Name of the finalized deal in the format of:
  4856  //     `buyers/{accountId}/finalizedDeals/{dealId}`.
  4857  func (r *BuyersFinalizedDealsService) AddCreative(deal string, addcreativerequest *AddCreativeRequest) *BuyersFinalizedDealsAddCreativeCall {
  4858  	c := &BuyersFinalizedDealsAddCreativeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4859  	c.deal = deal
  4860  	c.addcreativerequest = addcreativerequest
  4861  	return c
  4862  }
  4863  
  4864  // Fields allows partial responses to be retrieved. See
  4865  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4866  // details.
  4867  func (c *BuyersFinalizedDealsAddCreativeCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsAddCreativeCall {
  4868  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4869  	return c
  4870  }
  4871  
  4872  // Context sets the context to be used in this call's Do method.
  4873  func (c *BuyersFinalizedDealsAddCreativeCall) Context(ctx context.Context) *BuyersFinalizedDealsAddCreativeCall {
  4874  	c.ctx_ = ctx
  4875  	return c
  4876  }
  4877  
  4878  // Header returns a http.Header that can be modified by the caller to add
  4879  // headers to the request.
  4880  func (c *BuyersFinalizedDealsAddCreativeCall) Header() http.Header {
  4881  	if c.header_ == nil {
  4882  		c.header_ = make(http.Header)
  4883  	}
  4884  	return c.header_
  4885  }
  4886  
  4887  func (c *BuyersFinalizedDealsAddCreativeCall) doRequest(alt string) (*http.Response, error) {
  4888  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4889  	var body io.Reader = nil
  4890  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addcreativerequest)
  4891  	if err != nil {
  4892  		return nil, err
  4893  	}
  4894  	c.urlParams_.Set("alt", alt)
  4895  	c.urlParams_.Set("prettyPrint", "false")
  4896  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+deal}:addCreative")
  4897  	urls += "?" + c.urlParams_.Encode()
  4898  	req, err := http.NewRequest("POST", urls, body)
  4899  	if err != nil {
  4900  		return nil, err
  4901  	}
  4902  	req.Header = reqHeaders
  4903  	googleapi.Expand(req.URL, map[string]string{
  4904  		"deal": c.deal,
  4905  	})
  4906  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4907  }
  4908  
  4909  // Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.addCreative" call.
  4910  // Any non-2xx status code is an error. Response headers are in either
  4911  // *FinalizedDeal.ServerResponse.Header or (if a response was returned at all)
  4912  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4913  // whether the returned error was because http.StatusNotModified was returned.
  4914  func (c *BuyersFinalizedDealsAddCreativeCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, error) {
  4915  	gensupport.SetOptions(c.urlParams_, opts...)
  4916  	res, err := c.doRequest("json")
  4917  	if res != nil && res.StatusCode == http.StatusNotModified {
  4918  		if res.Body != nil {
  4919  			res.Body.Close()
  4920  		}
  4921  		return nil, gensupport.WrapError(&googleapi.Error{
  4922  			Code:   res.StatusCode,
  4923  			Header: res.Header,
  4924  		})
  4925  	}
  4926  	if err != nil {
  4927  		return nil, err
  4928  	}
  4929  	defer googleapi.CloseBody(res)
  4930  	if err := googleapi.CheckResponse(res); err != nil {
  4931  		return nil, gensupport.WrapError(err)
  4932  	}
  4933  	ret := &FinalizedDeal{
  4934  		ServerResponse: googleapi.ServerResponse{
  4935  			Header:         res.Header,
  4936  			HTTPStatusCode: res.StatusCode,
  4937  		},
  4938  	}
  4939  	target := &ret
  4940  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4941  		return nil, err
  4942  	}
  4943  	return ret, nil
  4944  }
  4945  
  4946  type BuyersFinalizedDealsGetCall struct {
  4947  	s            *Service
  4948  	name         string
  4949  	urlParams_   gensupport.URLParams
  4950  	ifNoneMatch_ string
  4951  	ctx_         context.Context
  4952  	header_      http.Header
  4953  }
  4954  
  4955  // Get: Gets a finalized deal given its name.
  4956  //
  4957  // - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`.
  4958  func (r *BuyersFinalizedDealsService) Get(name string) *BuyersFinalizedDealsGetCall {
  4959  	c := &BuyersFinalizedDealsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4960  	c.name = name
  4961  	return c
  4962  }
  4963  
  4964  // Fields allows partial responses to be retrieved. See
  4965  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4966  // details.
  4967  func (c *BuyersFinalizedDealsGetCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsGetCall {
  4968  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4969  	return c
  4970  }
  4971  
  4972  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4973  // object's ETag matches the given value. This is useful for getting updates
  4974  // only after the object has changed since the last request.
  4975  func (c *BuyersFinalizedDealsGetCall) IfNoneMatch(entityTag string) *BuyersFinalizedDealsGetCall {
  4976  	c.ifNoneMatch_ = entityTag
  4977  	return c
  4978  }
  4979  
  4980  // Context sets the context to be used in this call's Do method.
  4981  func (c *BuyersFinalizedDealsGetCall) Context(ctx context.Context) *BuyersFinalizedDealsGetCall {
  4982  	c.ctx_ = ctx
  4983  	return c
  4984  }
  4985  
  4986  // Header returns a http.Header that can be modified by the caller to add
  4987  // headers to the request.
  4988  func (c *BuyersFinalizedDealsGetCall) Header() http.Header {
  4989  	if c.header_ == nil {
  4990  		c.header_ = make(http.Header)
  4991  	}
  4992  	return c.header_
  4993  }
  4994  
  4995  func (c *BuyersFinalizedDealsGetCall) doRequest(alt string) (*http.Response, error) {
  4996  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4997  	if c.ifNoneMatch_ != "" {
  4998  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4999  	}
  5000  	var body io.Reader = nil
  5001  	c.urlParams_.Set("alt", alt)
  5002  	c.urlParams_.Set("prettyPrint", "false")
  5003  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5004  	urls += "?" + c.urlParams_.Encode()
  5005  	req, err := http.NewRequest("GET", urls, body)
  5006  	if err != nil {
  5007  		return nil, err
  5008  	}
  5009  	req.Header = reqHeaders
  5010  	googleapi.Expand(req.URL, map[string]string{
  5011  		"name": c.name,
  5012  	})
  5013  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5014  }
  5015  
  5016  // Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.get" call.
  5017  // Any non-2xx status code is an error. Response headers are in either
  5018  // *FinalizedDeal.ServerResponse.Header or (if a response was returned at all)
  5019  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5020  // whether the returned error was because http.StatusNotModified was returned.
  5021  func (c *BuyersFinalizedDealsGetCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, error) {
  5022  	gensupport.SetOptions(c.urlParams_, opts...)
  5023  	res, err := c.doRequest("json")
  5024  	if res != nil && res.StatusCode == http.StatusNotModified {
  5025  		if res.Body != nil {
  5026  			res.Body.Close()
  5027  		}
  5028  		return nil, gensupport.WrapError(&googleapi.Error{
  5029  			Code:   res.StatusCode,
  5030  			Header: res.Header,
  5031  		})
  5032  	}
  5033  	if err != nil {
  5034  		return nil, err
  5035  	}
  5036  	defer googleapi.CloseBody(res)
  5037  	if err := googleapi.CheckResponse(res); err != nil {
  5038  		return nil, gensupport.WrapError(err)
  5039  	}
  5040  	ret := &FinalizedDeal{
  5041  		ServerResponse: googleapi.ServerResponse{
  5042  			Header:         res.Header,
  5043  			HTTPStatusCode: res.StatusCode,
  5044  		},
  5045  	}
  5046  	target := &ret
  5047  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5048  		return nil, err
  5049  	}
  5050  	return ret, nil
  5051  }
  5052  
  5053  type BuyersFinalizedDealsListCall struct {
  5054  	s            *Service
  5055  	parent       string
  5056  	urlParams_   gensupport.URLParams
  5057  	ifNoneMatch_ string
  5058  	ctx_         context.Context
  5059  	header_      http.Header
  5060  }
  5061  
  5062  // List: Lists finalized deals. Use the URL path
  5063  // "/v1/buyers/{accountId}/finalizedDeals" to list finalized deals for the
  5064  // current buyer and its clients. Bidders can use the URL path
  5065  // "/v1/bidders/{accountId}/finalizedDeals" to list finalized deals for the
  5066  // bidder, its buyers and all their clients.
  5067  //
  5068  //   - parent: The buyer to list the finalized deals for, in the format:
  5069  //     `buyers/{accountId}`. When used to list finalized deals for a bidder, its
  5070  //     buyers and clients, in the format `bidders/{accountId}`.
  5071  func (r *BuyersFinalizedDealsService) List(parent string) *BuyersFinalizedDealsListCall {
  5072  	c := &BuyersFinalizedDealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5073  	c.parent = parent
  5074  	return c
  5075  }
  5076  
  5077  // Filter sets the optional parameter "filter": Optional query string using the
  5078  // Cloud API list filtering syntax
  5079  // (https://developers.google.com/authorized-buyers/apis/guides/list-filters)
  5080  // Supported columns for filtering are: * deal.displayName * deal.dealType *
  5081  // deal.createTime * deal.updateTime * deal.flightStartTime *
  5082  // deal.flightEndTime * deal.eligibleSeatIds * dealServingStatus
  5083  func (c *BuyersFinalizedDealsListCall) Filter(filter string) *BuyersFinalizedDealsListCall {
  5084  	c.urlParams_.Set("filter", filter)
  5085  	return c
  5086  }
  5087  
  5088  // OrderBy sets the optional parameter "orderBy": An optional query string to
  5089  // sort finalized deals using the Cloud API sorting syntax
  5090  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no
  5091  // sort order is specified, results will be returned in an arbitrary order.
  5092  // Supported columns for sorting are: * deal.displayName * deal.createTime *
  5093  // deal.updateTime * deal.flightStartTime * deal.flightEndTime *
  5094  // rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days *
  5095  // rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days *
  5096  // rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth
  5097  func (c *BuyersFinalizedDealsListCall) OrderBy(orderBy string) *BuyersFinalizedDealsListCall {
  5098  	c.urlParams_.Set("orderBy", orderBy)
  5099  	return c
  5100  }
  5101  
  5102  // PageSize sets the optional parameter "pageSize": Requested page size. The
  5103  // server may return fewer results than requested. If requested more than 500,
  5104  // the server will return 500 results per page. If unspecified, the server will
  5105  // pick a default page size of 100.
  5106  func (c *BuyersFinalizedDealsListCall) PageSize(pageSize int64) *BuyersFinalizedDealsListCall {
  5107  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5108  	return c
  5109  }
  5110  
  5111  // PageToken sets the optional parameter "pageToken": The page token as
  5112  // returned from ListFinalizedDealsResponse.
  5113  func (c *BuyersFinalizedDealsListCall) PageToken(pageToken string) *BuyersFinalizedDealsListCall {
  5114  	c.urlParams_.Set("pageToken", pageToken)
  5115  	return c
  5116  }
  5117  
  5118  // Fields allows partial responses to be retrieved. See
  5119  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5120  // details.
  5121  func (c *BuyersFinalizedDealsListCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsListCall {
  5122  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5123  	return c
  5124  }
  5125  
  5126  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5127  // object's ETag matches the given value. This is useful for getting updates
  5128  // only after the object has changed since the last request.
  5129  func (c *BuyersFinalizedDealsListCall) IfNoneMatch(entityTag string) *BuyersFinalizedDealsListCall {
  5130  	c.ifNoneMatch_ = entityTag
  5131  	return c
  5132  }
  5133  
  5134  // Context sets the context to be used in this call's Do method.
  5135  func (c *BuyersFinalizedDealsListCall) Context(ctx context.Context) *BuyersFinalizedDealsListCall {
  5136  	c.ctx_ = ctx
  5137  	return c
  5138  }
  5139  
  5140  // Header returns a http.Header that can be modified by the caller to add
  5141  // headers to the request.
  5142  func (c *BuyersFinalizedDealsListCall) Header() http.Header {
  5143  	if c.header_ == nil {
  5144  		c.header_ = make(http.Header)
  5145  	}
  5146  	return c.header_
  5147  }
  5148  
  5149  func (c *BuyersFinalizedDealsListCall) doRequest(alt string) (*http.Response, error) {
  5150  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5151  	if c.ifNoneMatch_ != "" {
  5152  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5153  	}
  5154  	var body io.Reader = nil
  5155  	c.urlParams_.Set("alt", alt)
  5156  	c.urlParams_.Set("prettyPrint", "false")
  5157  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/finalizedDeals")
  5158  	urls += "?" + c.urlParams_.Encode()
  5159  	req, err := http.NewRequest("GET", urls, body)
  5160  	if err != nil {
  5161  		return nil, err
  5162  	}
  5163  	req.Header = reqHeaders
  5164  	googleapi.Expand(req.URL, map[string]string{
  5165  		"parent": c.parent,
  5166  	})
  5167  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5168  }
  5169  
  5170  // Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.list" call.
  5171  // Any non-2xx status code is an error. Response headers are in either
  5172  // *ListFinalizedDealsResponse.ServerResponse.Header or (if a response was
  5173  // returned at all) in error.(*googleapi.Error).Header. Use
  5174  // googleapi.IsNotModified to check whether the returned error was because
  5175  // http.StatusNotModified was returned.
  5176  func (c *BuyersFinalizedDealsListCall) Do(opts ...googleapi.CallOption) (*ListFinalizedDealsResponse, error) {
  5177  	gensupport.SetOptions(c.urlParams_, opts...)
  5178  	res, err := c.doRequest("json")
  5179  	if res != nil && res.StatusCode == http.StatusNotModified {
  5180  		if res.Body != nil {
  5181  			res.Body.Close()
  5182  		}
  5183  		return nil, gensupport.WrapError(&googleapi.Error{
  5184  			Code:   res.StatusCode,
  5185  			Header: res.Header,
  5186  		})
  5187  	}
  5188  	if err != nil {
  5189  		return nil, err
  5190  	}
  5191  	defer googleapi.CloseBody(res)
  5192  	if err := googleapi.CheckResponse(res); err != nil {
  5193  		return nil, gensupport.WrapError(err)
  5194  	}
  5195  	ret := &ListFinalizedDealsResponse{
  5196  		ServerResponse: googleapi.ServerResponse{
  5197  			Header:         res.Header,
  5198  			HTTPStatusCode: res.StatusCode,
  5199  		},
  5200  	}
  5201  	target := &ret
  5202  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5203  		return nil, err
  5204  	}
  5205  	return ret, nil
  5206  }
  5207  
  5208  // Pages invokes f for each page of results.
  5209  // A non-nil error returned from f will halt the iteration.
  5210  // The provided context supersedes any context provided to the Context method.
  5211  func (c *BuyersFinalizedDealsListCall) Pages(ctx context.Context, f func(*ListFinalizedDealsResponse) error) error {
  5212  	c.ctx_ = ctx
  5213  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5214  	for {
  5215  		x, err := c.Do()
  5216  		if err != nil {
  5217  			return err
  5218  		}
  5219  		if err := f(x); err != nil {
  5220  			return err
  5221  		}
  5222  		if x.NextPageToken == "" {
  5223  			return nil
  5224  		}
  5225  		c.PageToken(x.NextPageToken)
  5226  	}
  5227  }
  5228  
  5229  type BuyersFinalizedDealsPauseCall struct {
  5230  	s                         *Service
  5231  	name                      string
  5232  	pausefinalizeddealrequest *PauseFinalizedDealRequest
  5233  	urlParams_                gensupport.URLParams
  5234  	ctx_                      context.Context
  5235  	header_                   http.Header
  5236  }
  5237  
  5238  // Pause: Pauses serving of the given finalized deal. This call only pauses the
  5239  // serving status, and does not affect other fields of the finalized deal.
  5240  // Calling this method for an already paused deal has no effect. This method
  5241  // only applies to programmatic guaranteed deals.
  5242  //
  5243  // - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`.
  5244  func (r *BuyersFinalizedDealsService) Pause(name string, pausefinalizeddealrequest *PauseFinalizedDealRequest) *BuyersFinalizedDealsPauseCall {
  5245  	c := &BuyersFinalizedDealsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5246  	c.name = name
  5247  	c.pausefinalizeddealrequest = pausefinalizeddealrequest
  5248  	return c
  5249  }
  5250  
  5251  // Fields allows partial responses to be retrieved. See
  5252  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5253  // details.
  5254  func (c *BuyersFinalizedDealsPauseCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsPauseCall {
  5255  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5256  	return c
  5257  }
  5258  
  5259  // Context sets the context to be used in this call's Do method.
  5260  func (c *BuyersFinalizedDealsPauseCall) Context(ctx context.Context) *BuyersFinalizedDealsPauseCall {
  5261  	c.ctx_ = ctx
  5262  	return c
  5263  }
  5264  
  5265  // Header returns a http.Header that can be modified by the caller to add
  5266  // headers to the request.
  5267  func (c *BuyersFinalizedDealsPauseCall) Header() http.Header {
  5268  	if c.header_ == nil {
  5269  		c.header_ = make(http.Header)
  5270  	}
  5271  	return c.header_
  5272  }
  5273  
  5274  func (c *BuyersFinalizedDealsPauseCall) doRequest(alt string) (*http.Response, error) {
  5275  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5276  	var body io.Reader = nil
  5277  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausefinalizeddealrequest)
  5278  	if err != nil {
  5279  		return nil, err
  5280  	}
  5281  	c.urlParams_.Set("alt", alt)
  5282  	c.urlParams_.Set("prettyPrint", "false")
  5283  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause")
  5284  	urls += "?" + c.urlParams_.Encode()
  5285  	req, err := http.NewRequest("POST", urls, body)
  5286  	if err != nil {
  5287  		return nil, err
  5288  	}
  5289  	req.Header = reqHeaders
  5290  	googleapi.Expand(req.URL, map[string]string{
  5291  		"name": c.name,
  5292  	})
  5293  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5294  }
  5295  
  5296  // Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.pause" call.
  5297  // Any non-2xx status code is an error. Response headers are in either
  5298  // *FinalizedDeal.ServerResponse.Header or (if a response was returned at all)
  5299  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5300  // whether the returned error was because http.StatusNotModified was returned.
  5301  func (c *BuyersFinalizedDealsPauseCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, error) {
  5302  	gensupport.SetOptions(c.urlParams_, opts...)
  5303  	res, err := c.doRequest("json")
  5304  	if res != nil && res.StatusCode == http.StatusNotModified {
  5305  		if res.Body != nil {
  5306  			res.Body.Close()
  5307  		}
  5308  		return nil, gensupport.WrapError(&googleapi.Error{
  5309  			Code:   res.StatusCode,
  5310  			Header: res.Header,
  5311  		})
  5312  	}
  5313  	if err != nil {
  5314  		return nil, err
  5315  	}
  5316  	defer googleapi.CloseBody(res)
  5317  	if err := googleapi.CheckResponse(res); err != nil {
  5318  		return nil, gensupport.WrapError(err)
  5319  	}
  5320  	ret := &FinalizedDeal{
  5321  		ServerResponse: googleapi.ServerResponse{
  5322  			Header:         res.Header,
  5323  			HTTPStatusCode: res.StatusCode,
  5324  		},
  5325  	}
  5326  	target := &ret
  5327  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5328  		return nil, err
  5329  	}
  5330  	return ret, nil
  5331  }
  5332  
  5333  type BuyersFinalizedDealsResumeCall struct {
  5334  	s                          *Service
  5335  	name                       string
  5336  	resumefinalizeddealrequest *ResumeFinalizedDealRequest
  5337  	urlParams_                 gensupport.URLParams
  5338  	ctx_                       context.Context
  5339  	header_                    http.Header
  5340  }
  5341  
  5342  // Resume: Resumes serving of the given finalized deal. Calling this method for
  5343  // an running deal has no effect. If a deal is initially paused by the seller,
  5344  // calling this method will not resume serving of the deal until the seller
  5345  // also resumes the deal. This method only applies to programmatic guaranteed
  5346  // deals.
  5347  //
  5348  // - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`.
  5349  func (r *BuyersFinalizedDealsService) Resume(name string, resumefinalizeddealrequest *ResumeFinalizedDealRequest) *BuyersFinalizedDealsResumeCall {
  5350  	c := &BuyersFinalizedDealsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5351  	c.name = name
  5352  	c.resumefinalizeddealrequest = resumefinalizeddealrequest
  5353  	return c
  5354  }
  5355  
  5356  // Fields allows partial responses to be retrieved. See
  5357  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5358  // details.
  5359  func (c *BuyersFinalizedDealsResumeCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsResumeCall {
  5360  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5361  	return c
  5362  }
  5363  
  5364  // Context sets the context to be used in this call's Do method.
  5365  func (c *BuyersFinalizedDealsResumeCall) Context(ctx context.Context) *BuyersFinalizedDealsResumeCall {
  5366  	c.ctx_ = ctx
  5367  	return c
  5368  }
  5369  
  5370  // Header returns a http.Header that can be modified by the caller to add
  5371  // headers to the request.
  5372  func (c *BuyersFinalizedDealsResumeCall) Header() http.Header {
  5373  	if c.header_ == nil {
  5374  		c.header_ = make(http.Header)
  5375  	}
  5376  	return c.header_
  5377  }
  5378  
  5379  func (c *BuyersFinalizedDealsResumeCall) doRequest(alt string) (*http.Response, error) {
  5380  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5381  	var body io.Reader = nil
  5382  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumefinalizeddealrequest)
  5383  	if err != nil {
  5384  		return nil, err
  5385  	}
  5386  	c.urlParams_.Set("alt", alt)
  5387  	c.urlParams_.Set("prettyPrint", "false")
  5388  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume")
  5389  	urls += "?" + c.urlParams_.Encode()
  5390  	req, err := http.NewRequest("POST", urls, body)
  5391  	if err != nil {
  5392  		return nil, err
  5393  	}
  5394  	req.Header = reqHeaders
  5395  	googleapi.Expand(req.URL, map[string]string{
  5396  		"name": c.name,
  5397  	})
  5398  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5399  }
  5400  
  5401  // Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.resume" call.
  5402  // Any non-2xx status code is an error. Response headers are in either
  5403  // *FinalizedDeal.ServerResponse.Header or (if a response was returned at all)
  5404  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5405  // whether the returned error was because http.StatusNotModified was returned.
  5406  func (c *BuyersFinalizedDealsResumeCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, error) {
  5407  	gensupport.SetOptions(c.urlParams_, opts...)
  5408  	res, err := c.doRequest("json")
  5409  	if res != nil && res.StatusCode == http.StatusNotModified {
  5410  		if res.Body != nil {
  5411  			res.Body.Close()
  5412  		}
  5413  		return nil, gensupport.WrapError(&googleapi.Error{
  5414  			Code:   res.StatusCode,
  5415  			Header: res.Header,
  5416  		})
  5417  	}
  5418  	if err != nil {
  5419  		return nil, err
  5420  	}
  5421  	defer googleapi.CloseBody(res)
  5422  	if err := googleapi.CheckResponse(res); err != nil {
  5423  		return nil, gensupport.WrapError(err)
  5424  	}
  5425  	ret := &FinalizedDeal{
  5426  		ServerResponse: googleapi.ServerResponse{
  5427  			Header:         res.Header,
  5428  			HTTPStatusCode: res.StatusCode,
  5429  		},
  5430  	}
  5431  	target := &ret
  5432  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5433  		return nil, err
  5434  	}
  5435  	return ret, nil
  5436  }
  5437  
  5438  type BuyersFinalizedDealsSetReadyToServeCall struct {
  5439  	s                      *Service
  5440  	deal                   string
  5441  	setreadytoserverequest *SetReadyToServeRequest
  5442  	urlParams_             gensupport.URLParams
  5443  	ctx_                   context.Context
  5444  	header_                http.Header
  5445  }
  5446  
  5447  // SetReadyToServe: Sets the given finalized deal as ready to serve. By
  5448  // default, deals are set as ready to serve as soon as they're finalized. If
  5449  // you want to opt out of the default behavior, and manually indicate that
  5450  // deals are ready to serve, ask your Technical Account Manager to add you to
  5451  // the allowlist. If you choose to use this method, finalized deals belonging
  5452  // to the bidder and its child seats don't start serving until after you call
  5453  // `setReadyToServe`, and after the deals become active. For example, you can
  5454  // use this method to delay receiving bid requests until your creative is
  5455  // ready. This method only applies to programmatic guaranteed deals.
  5456  //
  5457  // - deal: Format: `buyers/{accountId}/finalizedDeals/{dealId}`.
  5458  func (r *BuyersFinalizedDealsService) SetReadyToServe(deal string, setreadytoserverequest *SetReadyToServeRequest) *BuyersFinalizedDealsSetReadyToServeCall {
  5459  	c := &BuyersFinalizedDealsSetReadyToServeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5460  	c.deal = deal
  5461  	c.setreadytoserverequest = setreadytoserverequest
  5462  	return c
  5463  }
  5464  
  5465  // Fields allows partial responses to be retrieved. See
  5466  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5467  // details.
  5468  func (c *BuyersFinalizedDealsSetReadyToServeCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsSetReadyToServeCall {
  5469  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5470  	return c
  5471  }
  5472  
  5473  // Context sets the context to be used in this call's Do method.
  5474  func (c *BuyersFinalizedDealsSetReadyToServeCall) Context(ctx context.Context) *BuyersFinalizedDealsSetReadyToServeCall {
  5475  	c.ctx_ = ctx
  5476  	return c
  5477  }
  5478  
  5479  // Header returns a http.Header that can be modified by the caller to add
  5480  // headers to the request.
  5481  func (c *BuyersFinalizedDealsSetReadyToServeCall) Header() http.Header {
  5482  	if c.header_ == nil {
  5483  		c.header_ = make(http.Header)
  5484  	}
  5485  	return c.header_
  5486  }
  5487  
  5488  func (c *BuyersFinalizedDealsSetReadyToServeCall) doRequest(alt string) (*http.Response, error) {
  5489  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5490  	var body io.Reader = nil
  5491  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setreadytoserverequest)
  5492  	if err != nil {
  5493  		return nil, err
  5494  	}
  5495  	c.urlParams_.Set("alt", alt)
  5496  	c.urlParams_.Set("prettyPrint", "false")
  5497  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+deal}:setReadyToServe")
  5498  	urls += "?" + c.urlParams_.Encode()
  5499  	req, err := http.NewRequest("POST", urls, body)
  5500  	if err != nil {
  5501  		return nil, err
  5502  	}
  5503  	req.Header = reqHeaders
  5504  	googleapi.Expand(req.URL, map[string]string{
  5505  		"deal": c.deal,
  5506  	})
  5507  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5508  }
  5509  
  5510  // Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.setReadyToServe" call.
  5511  // Any non-2xx status code is an error. Response headers are in either
  5512  // *FinalizedDeal.ServerResponse.Header or (if a response was returned at all)
  5513  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5514  // whether the returned error was because http.StatusNotModified was returned.
  5515  func (c *BuyersFinalizedDealsSetReadyToServeCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, error) {
  5516  	gensupport.SetOptions(c.urlParams_, opts...)
  5517  	res, err := c.doRequest("json")
  5518  	if res != nil && res.StatusCode == http.StatusNotModified {
  5519  		if res.Body != nil {
  5520  			res.Body.Close()
  5521  		}
  5522  		return nil, gensupport.WrapError(&googleapi.Error{
  5523  			Code:   res.StatusCode,
  5524  			Header: res.Header,
  5525  		})
  5526  	}
  5527  	if err != nil {
  5528  		return nil, err
  5529  	}
  5530  	defer googleapi.CloseBody(res)
  5531  	if err := googleapi.CheckResponse(res); err != nil {
  5532  		return nil, gensupport.WrapError(err)
  5533  	}
  5534  	ret := &FinalizedDeal{
  5535  		ServerResponse: googleapi.ServerResponse{
  5536  			Header:         res.Header,
  5537  			HTTPStatusCode: res.StatusCode,
  5538  		},
  5539  	}
  5540  	target := &ret
  5541  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5542  		return nil, err
  5543  	}
  5544  	return ret, nil
  5545  }
  5546  
  5547  type BuyersProposalsAcceptCall struct {
  5548  	s                     *Service
  5549  	name                  string
  5550  	acceptproposalrequest *AcceptProposalRequest
  5551  	urlParams_            gensupport.URLParams
  5552  	ctx_                  context.Context
  5553  	header_               http.Header
  5554  }
  5555  
  5556  // Accept: Accepts the proposal at the given revision number. If the revision
  5557  // number in the request is behind the latest from the server, an error message
  5558  // will be returned. This call updates the Proposal.state from
  5559  // `BUYER_ACCEPTANCE_REQUESTED` to `FINALIZED`; it has no side effect if the
  5560  // Proposal.state is already `FINALIZED` and throws exception if the
  5561  // Proposal.state is not either `BUYER_ACCEPTANCE_REQUESTED` or `FINALIZED`.
  5562  // Accepting a proposal means the buyer understands and accepts the
  5563  // Proposal.terms_and_conditions proposed by the seller.
  5564  //
  5565  //   - name: Name of the proposal. Format:
  5566  //     `buyers/{accountId}/proposals/{proposalId}`.
  5567  func (r *BuyersProposalsService) Accept(name string, acceptproposalrequest *AcceptProposalRequest) *BuyersProposalsAcceptCall {
  5568  	c := &BuyersProposalsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5569  	c.name = name
  5570  	c.acceptproposalrequest = acceptproposalrequest
  5571  	return c
  5572  }
  5573  
  5574  // Fields allows partial responses to be retrieved. See
  5575  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5576  // details.
  5577  func (c *BuyersProposalsAcceptCall) Fields(s ...googleapi.Field) *BuyersProposalsAcceptCall {
  5578  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5579  	return c
  5580  }
  5581  
  5582  // Context sets the context to be used in this call's Do method.
  5583  func (c *BuyersProposalsAcceptCall) Context(ctx context.Context) *BuyersProposalsAcceptCall {
  5584  	c.ctx_ = ctx
  5585  	return c
  5586  }
  5587  
  5588  // Header returns a http.Header that can be modified by the caller to add
  5589  // headers to the request.
  5590  func (c *BuyersProposalsAcceptCall) Header() http.Header {
  5591  	if c.header_ == nil {
  5592  		c.header_ = make(http.Header)
  5593  	}
  5594  	return c.header_
  5595  }
  5596  
  5597  func (c *BuyersProposalsAcceptCall) doRequest(alt string) (*http.Response, error) {
  5598  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5599  	var body io.Reader = nil
  5600  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.acceptproposalrequest)
  5601  	if err != nil {
  5602  		return nil, err
  5603  	}
  5604  	c.urlParams_.Set("alt", alt)
  5605  	c.urlParams_.Set("prettyPrint", "false")
  5606  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:accept")
  5607  	urls += "?" + c.urlParams_.Encode()
  5608  	req, err := http.NewRequest("POST", urls, body)
  5609  	if err != nil {
  5610  		return nil, err
  5611  	}
  5612  	req.Header = reqHeaders
  5613  	googleapi.Expand(req.URL, map[string]string{
  5614  		"name": c.name,
  5615  	})
  5616  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5617  }
  5618  
  5619  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.accept" call.
  5620  // Any non-2xx status code is an error. Response headers are in either
  5621  // *Proposal.ServerResponse.Header or (if a response was returned at all) in
  5622  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5623  // whether the returned error was because http.StatusNotModified was returned.
  5624  func (c *BuyersProposalsAcceptCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
  5625  	gensupport.SetOptions(c.urlParams_, opts...)
  5626  	res, err := c.doRequest("json")
  5627  	if res != nil && res.StatusCode == http.StatusNotModified {
  5628  		if res.Body != nil {
  5629  			res.Body.Close()
  5630  		}
  5631  		return nil, gensupport.WrapError(&googleapi.Error{
  5632  			Code:   res.StatusCode,
  5633  			Header: res.Header,
  5634  		})
  5635  	}
  5636  	if err != nil {
  5637  		return nil, err
  5638  	}
  5639  	defer googleapi.CloseBody(res)
  5640  	if err := googleapi.CheckResponse(res); err != nil {
  5641  		return nil, gensupport.WrapError(err)
  5642  	}
  5643  	ret := &Proposal{
  5644  		ServerResponse: googleapi.ServerResponse{
  5645  			Header:         res.Header,
  5646  			HTTPStatusCode: res.StatusCode,
  5647  		},
  5648  	}
  5649  	target := &ret
  5650  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5651  		return nil, err
  5652  	}
  5653  	return ret, nil
  5654  }
  5655  
  5656  type BuyersProposalsAddNoteCall struct {
  5657  	s              *Service
  5658  	proposal       string
  5659  	addnoterequest *AddNoteRequest
  5660  	urlParams_     gensupport.URLParams
  5661  	ctx_           context.Context
  5662  	header_        http.Header
  5663  }
  5664  
  5665  // AddNote: Creates a note for this proposal and sends to the seller.
  5666  //
  5667  //   - proposal: Name of the proposal. Format:
  5668  //     `buyers/{accountId}/proposals/{proposalId}`.
  5669  func (r *BuyersProposalsService) AddNote(proposal string, addnoterequest *AddNoteRequest) *BuyersProposalsAddNoteCall {
  5670  	c := &BuyersProposalsAddNoteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5671  	c.proposal = proposal
  5672  	c.addnoterequest = addnoterequest
  5673  	return c
  5674  }
  5675  
  5676  // Fields allows partial responses to be retrieved. See
  5677  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5678  // details.
  5679  func (c *BuyersProposalsAddNoteCall) Fields(s ...googleapi.Field) *BuyersProposalsAddNoteCall {
  5680  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5681  	return c
  5682  }
  5683  
  5684  // Context sets the context to be used in this call's Do method.
  5685  func (c *BuyersProposalsAddNoteCall) Context(ctx context.Context) *BuyersProposalsAddNoteCall {
  5686  	c.ctx_ = ctx
  5687  	return c
  5688  }
  5689  
  5690  // Header returns a http.Header that can be modified by the caller to add
  5691  // headers to the request.
  5692  func (c *BuyersProposalsAddNoteCall) Header() http.Header {
  5693  	if c.header_ == nil {
  5694  		c.header_ = make(http.Header)
  5695  	}
  5696  	return c.header_
  5697  }
  5698  
  5699  func (c *BuyersProposalsAddNoteCall) doRequest(alt string) (*http.Response, error) {
  5700  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5701  	var body io.Reader = nil
  5702  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addnoterequest)
  5703  	if err != nil {
  5704  		return nil, err
  5705  	}
  5706  	c.urlParams_.Set("alt", alt)
  5707  	c.urlParams_.Set("prettyPrint", "false")
  5708  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+proposal}:addNote")
  5709  	urls += "?" + c.urlParams_.Encode()
  5710  	req, err := http.NewRequest("POST", urls, body)
  5711  	if err != nil {
  5712  		return nil, err
  5713  	}
  5714  	req.Header = reqHeaders
  5715  	googleapi.Expand(req.URL, map[string]string{
  5716  		"proposal": c.proposal,
  5717  	})
  5718  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5719  }
  5720  
  5721  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.addNote" call.
  5722  // Any non-2xx status code is an error. Response headers are in either
  5723  // *Proposal.ServerResponse.Header or (if a response was returned at all) in
  5724  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5725  // whether the returned error was because http.StatusNotModified was returned.
  5726  func (c *BuyersProposalsAddNoteCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
  5727  	gensupport.SetOptions(c.urlParams_, opts...)
  5728  	res, err := c.doRequest("json")
  5729  	if res != nil && res.StatusCode == http.StatusNotModified {
  5730  		if res.Body != nil {
  5731  			res.Body.Close()
  5732  		}
  5733  		return nil, gensupport.WrapError(&googleapi.Error{
  5734  			Code:   res.StatusCode,
  5735  			Header: res.Header,
  5736  		})
  5737  	}
  5738  	if err != nil {
  5739  		return nil, err
  5740  	}
  5741  	defer googleapi.CloseBody(res)
  5742  	if err := googleapi.CheckResponse(res); err != nil {
  5743  		return nil, gensupport.WrapError(err)
  5744  	}
  5745  	ret := &Proposal{
  5746  		ServerResponse: googleapi.ServerResponse{
  5747  			Header:         res.Header,
  5748  			HTTPStatusCode: res.StatusCode,
  5749  		},
  5750  	}
  5751  	target := &ret
  5752  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5753  		return nil, err
  5754  	}
  5755  	return ret, nil
  5756  }
  5757  
  5758  type BuyersProposalsCancelNegotiationCall struct {
  5759  	s                        *Service
  5760  	proposal                 string
  5761  	cancelnegotiationrequest *CancelNegotiationRequest
  5762  	urlParams_               gensupport.URLParams
  5763  	ctx_                     context.Context
  5764  	header_                  http.Header
  5765  }
  5766  
  5767  // CancelNegotiation: Cancels an ongoing negotiation on a proposal. This does
  5768  // not cancel or end serving for the deals if the proposal has been finalized.
  5769  // If the proposal has not been finalized before, calling this method will set
  5770  // the Proposal.state to `TERMINATED` and increment the
  5771  // Proposal.proposal_revision. If the proposal has been finalized before and is
  5772  // under renegotiation now, calling this method will reset the Proposal.state
  5773  // to `FINALIZED` and increment the Proposal.proposal_revision. This method
  5774  // does not support private auction proposals whose Proposal.deal_type is
  5775  // 'PRIVATE_AUCTION'.
  5776  //
  5777  //   - proposal: Name of the proposal. Format:
  5778  //     `buyers/{accountId}/proposals/{proposalId}`.
  5779  func (r *BuyersProposalsService) CancelNegotiation(proposal string, cancelnegotiationrequest *CancelNegotiationRequest) *BuyersProposalsCancelNegotiationCall {
  5780  	c := &BuyersProposalsCancelNegotiationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5781  	c.proposal = proposal
  5782  	c.cancelnegotiationrequest = cancelnegotiationrequest
  5783  	return c
  5784  }
  5785  
  5786  // Fields allows partial responses to be retrieved. See
  5787  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5788  // details.
  5789  func (c *BuyersProposalsCancelNegotiationCall) Fields(s ...googleapi.Field) *BuyersProposalsCancelNegotiationCall {
  5790  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5791  	return c
  5792  }
  5793  
  5794  // Context sets the context to be used in this call's Do method.
  5795  func (c *BuyersProposalsCancelNegotiationCall) Context(ctx context.Context) *BuyersProposalsCancelNegotiationCall {
  5796  	c.ctx_ = ctx
  5797  	return c
  5798  }
  5799  
  5800  // Header returns a http.Header that can be modified by the caller to add
  5801  // headers to the request.
  5802  func (c *BuyersProposalsCancelNegotiationCall) Header() http.Header {
  5803  	if c.header_ == nil {
  5804  		c.header_ = make(http.Header)
  5805  	}
  5806  	return c.header_
  5807  }
  5808  
  5809  func (c *BuyersProposalsCancelNegotiationCall) doRequest(alt string) (*http.Response, error) {
  5810  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5811  	var body io.Reader = nil
  5812  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelnegotiationrequest)
  5813  	if err != nil {
  5814  		return nil, err
  5815  	}
  5816  	c.urlParams_.Set("alt", alt)
  5817  	c.urlParams_.Set("prettyPrint", "false")
  5818  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+proposal}:cancelNegotiation")
  5819  	urls += "?" + c.urlParams_.Encode()
  5820  	req, err := http.NewRequest("POST", urls, body)
  5821  	if err != nil {
  5822  		return nil, err
  5823  	}
  5824  	req.Header = reqHeaders
  5825  	googleapi.Expand(req.URL, map[string]string{
  5826  		"proposal": c.proposal,
  5827  	})
  5828  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5829  }
  5830  
  5831  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.cancelNegotiation" call.
  5832  // Any non-2xx status code is an error. Response headers are in either
  5833  // *Proposal.ServerResponse.Header or (if a response was returned at all) in
  5834  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5835  // whether the returned error was because http.StatusNotModified was returned.
  5836  func (c *BuyersProposalsCancelNegotiationCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
  5837  	gensupport.SetOptions(c.urlParams_, opts...)
  5838  	res, err := c.doRequest("json")
  5839  	if res != nil && res.StatusCode == http.StatusNotModified {
  5840  		if res.Body != nil {
  5841  			res.Body.Close()
  5842  		}
  5843  		return nil, gensupport.WrapError(&googleapi.Error{
  5844  			Code:   res.StatusCode,
  5845  			Header: res.Header,
  5846  		})
  5847  	}
  5848  	if err != nil {
  5849  		return nil, err
  5850  	}
  5851  	defer googleapi.CloseBody(res)
  5852  	if err := googleapi.CheckResponse(res); err != nil {
  5853  		return nil, gensupport.WrapError(err)
  5854  	}
  5855  	ret := &Proposal{
  5856  		ServerResponse: googleapi.ServerResponse{
  5857  			Header:         res.Header,
  5858  			HTTPStatusCode: res.StatusCode,
  5859  		},
  5860  	}
  5861  	target := &ret
  5862  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5863  		return nil, err
  5864  	}
  5865  	return ret, nil
  5866  }
  5867  
  5868  type BuyersProposalsGetCall struct {
  5869  	s            *Service
  5870  	name         string
  5871  	urlParams_   gensupport.URLParams
  5872  	ifNoneMatch_ string
  5873  	ctx_         context.Context
  5874  	header_      http.Header
  5875  }
  5876  
  5877  // Get: Gets a proposal using its resource name. The proposal is returned at
  5878  // the latest revision.
  5879  //
  5880  //   - name: Name of the proposal. Format:
  5881  //     `buyers/{accountId}/proposals/{proposalId}`.
  5882  func (r *BuyersProposalsService) Get(name string) *BuyersProposalsGetCall {
  5883  	c := &BuyersProposalsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5884  	c.name = name
  5885  	return c
  5886  }
  5887  
  5888  // Fields allows partial responses to be retrieved. See
  5889  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5890  // details.
  5891  func (c *BuyersProposalsGetCall) Fields(s ...googleapi.Field) *BuyersProposalsGetCall {
  5892  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5893  	return c
  5894  }
  5895  
  5896  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5897  // object's ETag matches the given value. This is useful for getting updates
  5898  // only after the object has changed since the last request.
  5899  func (c *BuyersProposalsGetCall) IfNoneMatch(entityTag string) *BuyersProposalsGetCall {
  5900  	c.ifNoneMatch_ = entityTag
  5901  	return c
  5902  }
  5903  
  5904  // Context sets the context to be used in this call's Do method.
  5905  func (c *BuyersProposalsGetCall) Context(ctx context.Context) *BuyersProposalsGetCall {
  5906  	c.ctx_ = ctx
  5907  	return c
  5908  }
  5909  
  5910  // Header returns a http.Header that can be modified by the caller to add
  5911  // headers to the request.
  5912  func (c *BuyersProposalsGetCall) Header() http.Header {
  5913  	if c.header_ == nil {
  5914  		c.header_ = make(http.Header)
  5915  	}
  5916  	return c.header_
  5917  }
  5918  
  5919  func (c *BuyersProposalsGetCall) doRequest(alt string) (*http.Response, error) {
  5920  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5921  	if c.ifNoneMatch_ != "" {
  5922  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5923  	}
  5924  	var body io.Reader = nil
  5925  	c.urlParams_.Set("alt", alt)
  5926  	c.urlParams_.Set("prettyPrint", "false")
  5927  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5928  	urls += "?" + c.urlParams_.Encode()
  5929  	req, err := http.NewRequest("GET", urls, body)
  5930  	if err != nil {
  5931  		return nil, err
  5932  	}
  5933  	req.Header = reqHeaders
  5934  	googleapi.Expand(req.URL, map[string]string{
  5935  		"name": c.name,
  5936  	})
  5937  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5938  }
  5939  
  5940  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.get" call.
  5941  // Any non-2xx status code is an error. Response headers are in either
  5942  // *Proposal.ServerResponse.Header or (if a response was returned at all) in
  5943  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5944  // whether the returned error was because http.StatusNotModified was returned.
  5945  func (c *BuyersProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
  5946  	gensupport.SetOptions(c.urlParams_, opts...)
  5947  	res, err := c.doRequest("json")
  5948  	if res != nil && res.StatusCode == http.StatusNotModified {
  5949  		if res.Body != nil {
  5950  			res.Body.Close()
  5951  		}
  5952  		return nil, gensupport.WrapError(&googleapi.Error{
  5953  			Code:   res.StatusCode,
  5954  			Header: res.Header,
  5955  		})
  5956  	}
  5957  	if err != nil {
  5958  		return nil, err
  5959  	}
  5960  	defer googleapi.CloseBody(res)
  5961  	if err := googleapi.CheckResponse(res); err != nil {
  5962  		return nil, gensupport.WrapError(err)
  5963  	}
  5964  	ret := &Proposal{
  5965  		ServerResponse: googleapi.ServerResponse{
  5966  			Header:         res.Header,
  5967  			HTTPStatusCode: res.StatusCode,
  5968  		},
  5969  	}
  5970  	target := &ret
  5971  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5972  		return nil, err
  5973  	}
  5974  	return ret, nil
  5975  }
  5976  
  5977  type BuyersProposalsListCall struct {
  5978  	s            *Service
  5979  	parent       string
  5980  	urlParams_   gensupport.URLParams
  5981  	ifNoneMatch_ string
  5982  	ctx_         context.Context
  5983  	header_      http.Header
  5984  }
  5985  
  5986  // List: Lists proposals. A filter expression using Cloud API list filtering
  5987  // syntax
  5988  // (https://developers.google.com/authorized-buyers/apis/guides/list-filters)
  5989  // may be specified to filter the results.
  5990  //
  5991  //   - parent: Parent that owns the collection of proposals Format:
  5992  //     `buyers/{accountId}`.
  5993  func (r *BuyersProposalsService) List(parent string) *BuyersProposalsListCall {
  5994  	c := &BuyersProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5995  	c.parent = parent
  5996  	return c
  5997  }
  5998  
  5999  // Filter sets the optional parameter "filter": Optional query string using the
  6000  // Cloud API list filtering syntax
  6001  // (https://developers.google.com/authorized-buyers/apis/guides/list-filters)
  6002  // Supported columns for filtering are: * displayName * dealType * updateTime *
  6003  // state
  6004  func (c *BuyersProposalsListCall) Filter(filter string) *BuyersProposalsListCall {
  6005  	c.urlParams_.Set("filter", filter)
  6006  	return c
  6007  }
  6008  
  6009  // PageSize sets the optional parameter "pageSize": Requested page size. The
  6010  // server may return fewer results than requested. If unspecified, the server
  6011  // will put a size of 500.
  6012  func (c *BuyersProposalsListCall) PageSize(pageSize int64) *BuyersProposalsListCall {
  6013  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6014  	return c
  6015  }
  6016  
  6017  // PageToken sets the optional parameter "pageToken": The page token as
  6018  // returned from ListProposalsResponse.
  6019  func (c *BuyersProposalsListCall) PageToken(pageToken string) *BuyersProposalsListCall {
  6020  	c.urlParams_.Set("pageToken", pageToken)
  6021  	return c
  6022  }
  6023  
  6024  // Fields allows partial responses to be retrieved. See
  6025  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6026  // details.
  6027  func (c *BuyersProposalsListCall) Fields(s ...googleapi.Field) *BuyersProposalsListCall {
  6028  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6029  	return c
  6030  }
  6031  
  6032  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6033  // object's ETag matches the given value. This is useful for getting updates
  6034  // only after the object has changed since the last request.
  6035  func (c *BuyersProposalsListCall) IfNoneMatch(entityTag string) *BuyersProposalsListCall {
  6036  	c.ifNoneMatch_ = entityTag
  6037  	return c
  6038  }
  6039  
  6040  // Context sets the context to be used in this call's Do method.
  6041  func (c *BuyersProposalsListCall) Context(ctx context.Context) *BuyersProposalsListCall {
  6042  	c.ctx_ = ctx
  6043  	return c
  6044  }
  6045  
  6046  // Header returns a http.Header that can be modified by the caller to add
  6047  // headers to the request.
  6048  func (c *BuyersProposalsListCall) Header() http.Header {
  6049  	if c.header_ == nil {
  6050  		c.header_ = make(http.Header)
  6051  	}
  6052  	return c.header_
  6053  }
  6054  
  6055  func (c *BuyersProposalsListCall) doRequest(alt string) (*http.Response, error) {
  6056  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6057  	if c.ifNoneMatch_ != "" {
  6058  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6059  	}
  6060  	var body io.Reader = nil
  6061  	c.urlParams_.Set("alt", alt)
  6062  	c.urlParams_.Set("prettyPrint", "false")
  6063  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/proposals")
  6064  	urls += "?" + c.urlParams_.Encode()
  6065  	req, err := http.NewRequest("GET", urls, body)
  6066  	if err != nil {
  6067  		return nil, err
  6068  	}
  6069  	req.Header = reqHeaders
  6070  	googleapi.Expand(req.URL, map[string]string{
  6071  		"parent": c.parent,
  6072  	})
  6073  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6074  }
  6075  
  6076  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.list" call.
  6077  // Any non-2xx status code is an error. Response headers are in either
  6078  // *ListProposalsResponse.ServerResponse.Header or (if a response was returned
  6079  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6080  // check whether the returned error was because http.StatusNotModified was
  6081  // returned.
  6082  func (c *BuyersProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, error) {
  6083  	gensupport.SetOptions(c.urlParams_, opts...)
  6084  	res, err := c.doRequest("json")
  6085  	if res != nil && res.StatusCode == http.StatusNotModified {
  6086  		if res.Body != nil {
  6087  			res.Body.Close()
  6088  		}
  6089  		return nil, gensupport.WrapError(&googleapi.Error{
  6090  			Code:   res.StatusCode,
  6091  			Header: res.Header,
  6092  		})
  6093  	}
  6094  	if err != nil {
  6095  		return nil, err
  6096  	}
  6097  	defer googleapi.CloseBody(res)
  6098  	if err := googleapi.CheckResponse(res); err != nil {
  6099  		return nil, gensupport.WrapError(err)
  6100  	}
  6101  	ret := &ListProposalsResponse{
  6102  		ServerResponse: googleapi.ServerResponse{
  6103  			Header:         res.Header,
  6104  			HTTPStatusCode: res.StatusCode,
  6105  		},
  6106  	}
  6107  	target := &ret
  6108  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6109  		return nil, err
  6110  	}
  6111  	return ret, nil
  6112  }
  6113  
  6114  // Pages invokes f for each page of results.
  6115  // A non-nil error returned from f will halt the iteration.
  6116  // The provided context supersedes any context provided to the Context method.
  6117  func (c *BuyersProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) error) error {
  6118  	c.ctx_ = ctx
  6119  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6120  	for {
  6121  		x, err := c.Do()
  6122  		if err != nil {
  6123  			return err
  6124  		}
  6125  		if err := f(x); err != nil {
  6126  			return err
  6127  		}
  6128  		if x.NextPageToken == "" {
  6129  			return nil
  6130  		}
  6131  		c.PageToken(x.NextPageToken)
  6132  	}
  6133  }
  6134  
  6135  type BuyersProposalsPatchCall struct {
  6136  	s          *Service
  6137  	nameid     string
  6138  	proposal   *Proposal
  6139  	urlParams_ gensupport.URLParams
  6140  	ctx_       context.Context
  6141  	header_    http.Header
  6142  }
  6143  
  6144  // Patch: Updates the proposal at the given revision number. If the revision
  6145  // number in the request is behind the latest one kept in the server, an error
  6146  // message will be returned. See FieldMask for how to use FieldMask. Only
  6147  // fields specified in the UpdateProposalRequest.update_mask will be updated;
  6148  // Fields noted as 'Immutable' or 'Output only' yet specified in the
  6149  // UpdateProposalRequest.update_mask will be ignored and left unchanged.
  6150  // Updating a private auction proposal is not allowed and will result in an
  6151  // error.
  6152  //
  6153  //   - name: Immutable. The name of the proposal serving as a unique identifier.
  6154  //     Format: buyers/{accountId}/proposals/{proposalId}.
  6155  func (r *BuyersProposalsService) Patch(nameid string, proposal *Proposal) *BuyersProposalsPatchCall {
  6156  	c := &BuyersProposalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6157  	c.nameid = nameid
  6158  	c.proposal = proposal
  6159  	return c
  6160  }
  6161  
  6162  // UpdateMask sets the optional parameter "updateMask": List of fields to be
  6163  // updated. If empty or unspecified, the service will update all fields
  6164  // populated in the update request excluding the output only fields and
  6165  // primitive fields with default value. Note that explicit field mask is
  6166  // required in order to reset a primitive field back to its default value, for
  6167  // example, false for boolean fields, 0 for integer fields. A special field
  6168  // mask consisting of a single path "*" can be used to indicate full
  6169  // replacement(the equivalent of PUT method), updatable fields unset or
  6170  // unspecified in the input will be cleared or set to default value. Output
  6171  // only fields will be ignored regardless of the value of updateMask.
  6172  func (c *BuyersProposalsPatchCall) UpdateMask(updateMask string) *BuyersProposalsPatchCall {
  6173  	c.urlParams_.Set("updateMask", updateMask)
  6174  	return c
  6175  }
  6176  
  6177  // Fields allows partial responses to be retrieved. See
  6178  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6179  // details.
  6180  func (c *BuyersProposalsPatchCall) Fields(s ...googleapi.Field) *BuyersProposalsPatchCall {
  6181  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6182  	return c
  6183  }
  6184  
  6185  // Context sets the context to be used in this call's Do method.
  6186  func (c *BuyersProposalsPatchCall) Context(ctx context.Context) *BuyersProposalsPatchCall {
  6187  	c.ctx_ = ctx
  6188  	return c
  6189  }
  6190  
  6191  // Header returns a http.Header that can be modified by the caller to add
  6192  // headers to the request.
  6193  func (c *BuyersProposalsPatchCall) Header() http.Header {
  6194  	if c.header_ == nil {
  6195  		c.header_ = make(http.Header)
  6196  	}
  6197  	return c.header_
  6198  }
  6199  
  6200  func (c *BuyersProposalsPatchCall) doRequest(alt string) (*http.Response, error) {
  6201  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6202  	var body io.Reader = nil
  6203  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.proposal)
  6204  	if err != nil {
  6205  		return nil, err
  6206  	}
  6207  	c.urlParams_.Set("alt", alt)
  6208  	c.urlParams_.Set("prettyPrint", "false")
  6209  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6210  	urls += "?" + c.urlParams_.Encode()
  6211  	req, err := http.NewRequest("PATCH", urls, body)
  6212  	if err != nil {
  6213  		return nil, err
  6214  	}
  6215  	req.Header = reqHeaders
  6216  	googleapi.Expand(req.URL, map[string]string{
  6217  		"name": c.nameid,
  6218  	})
  6219  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6220  }
  6221  
  6222  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.patch" call.
  6223  // Any non-2xx status code is an error. Response headers are in either
  6224  // *Proposal.ServerResponse.Header or (if a response was returned at all) in
  6225  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6226  // whether the returned error was because http.StatusNotModified was returned.
  6227  func (c *BuyersProposalsPatchCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
  6228  	gensupport.SetOptions(c.urlParams_, opts...)
  6229  	res, err := c.doRequest("json")
  6230  	if res != nil && res.StatusCode == http.StatusNotModified {
  6231  		if res.Body != nil {
  6232  			res.Body.Close()
  6233  		}
  6234  		return nil, gensupport.WrapError(&googleapi.Error{
  6235  			Code:   res.StatusCode,
  6236  			Header: res.Header,
  6237  		})
  6238  	}
  6239  	if err != nil {
  6240  		return nil, err
  6241  	}
  6242  	defer googleapi.CloseBody(res)
  6243  	if err := googleapi.CheckResponse(res); err != nil {
  6244  		return nil, gensupport.WrapError(err)
  6245  	}
  6246  	ret := &Proposal{
  6247  		ServerResponse: googleapi.ServerResponse{
  6248  			Header:         res.Header,
  6249  			HTTPStatusCode: res.StatusCode,
  6250  		},
  6251  	}
  6252  	target := &ret
  6253  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6254  		return nil, err
  6255  	}
  6256  	return ret, nil
  6257  }
  6258  
  6259  type BuyersProposalsSendRfpCall struct {
  6260  	s              *Service
  6261  	buyer          string
  6262  	sendrfprequest *SendRfpRequest
  6263  	urlParams_     gensupport.URLParams
  6264  	ctx_           context.Context
  6265  	header_        http.Header
  6266  }
  6267  
  6268  // SendRfp: Sends a request for proposal (RFP) to a publisher to initiate the
  6269  // negotiation regarding certain inventory. In the RFP, buyers can specify the
  6270  // deal type, deal terms, start and end dates, targeting, and a message to the
  6271  // publisher. Once the RFP is sent, a proposal in `SELLER_REVIEW_REQUESTED`
  6272  // state will be created and returned in the response. The publisher may review
  6273  // your request and respond with detailed deals in the proposal.
  6274  //
  6275  //   - buyer: The current buyer who is sending the RFP in the format:
  6276  //     `buyers/{accountId}`.
  6277  func (r *BuyersProposalsService) SendRfp(buyer string, sendrfprequest *SendRfpRequest) *BuyersProposalsSendRfpCall {
  6278  	c := &BuyersProposalsSendRfpCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6279  	c.buyer = buyer
  6280  	c.sendrfprequest = sendrfprequest
  6281  	return c
  6282  }
  6283  
  6284  // Fields allows partial responses to be retrieved. See
  6285  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6286  // details.
  6287  func (c *BuyersProposalsSendRfpCall) Fields(s ...googleapi.Field) *BuyersProposalsSendRfpCall {
  6288  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6289  	return c
  6290  }
  6291  
  6292  // Context sets the context to be used in this call's Do method.
  6293  func (c *BuyersProposalsSendRfpCall) Context(ctx context.Context) *BuyersProposalsSendRfpCall {
  6294  	c.ctx_ = ctx
  6295  	return c
  6296  }
  6297  
  6298  // Header returns a http.Header that can be modified by the caller to add
  6299  // headers to the request.
  6300  func (c *BuyersProposalsSendRfpCall) Header() http.Header {
  6301  	if c.header_ == nil {
  6302  		c.header_ = make(http.Header)
  6303  	}
  6304  	return c.header_
  6305  }
  6306  
  6307  func (c *BuyersProposalsSendRfpCall) doRequest(alt string) (*http.Response, error) {
  6308  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6309  	var body io.Reader = nil
  6310  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sendrfprequest)
  6311  	if err != nil {
  6312  		return nil, err
  6313  	}
  6314  	c.urlParams_.Set("alt", alt)
  6315  	c.urlParams_.Set("prettyPrint", "false")
  6316  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+buyer}/proposals:sendRfp")
  6317  	urls += "?" + c.urlParams_.Encode()
  6318  	req, err := http.NewRequest("POST", urls, body)
  6319  	if err != nil {
  6320  		return nil, err
  6321  	}
  6322  	req.Header = reqHeaders
  6323  	googleapi.Expand(req.URL, map[string]string{
  6324  		"buyer": c.buyer,
  6325  	})
  6326  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6327  }
  6328  
  6329  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.sendRfp" call.
  6330  // Any non-2xx status code is an error. Response headers are in either
  6331  // *Proposal.ServerResponse.Header or (if a response was returned at all) in
  6332  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6333  // whether the returned error was because http.StatusNotModified was returned.
  6334  func (c *BuyersProposalsSendRfpCall) Do(opts ...googleapi.CallOption) (*Proposal, error) {
  6335  	gensupport.SetOptions(c.urlParams_, opts...)
  6336  	res, err := c.doRequest("json")
  6337  	if res != nil && res.StatusCode == http.StatusNotModified {
  6338  		if res.Body != nil {
  6339  			res.Body.Close()
  6340  		}
  6341  		return nil, gensupport.WrapError(&googleapi.Error{
  6342  			Code:   res.StatusCode,
  6343  			Header: res.Header,
  6344  		})
  6345  	}
  6346  	if err != nil {
  6347  		return nil, err
  6348  	}
  6349  	defer googleapi.CloseBody(res)
  6350  	if err := googleapi.CheckResponse(res); err != nil {
  6351  		return nil, gensupport.WrapError(err)
  6352  	}
  6353  	ret := &Proposal{
  6354  		ServerResponse: googleapi.ServerResponse{
  6355  			Header:         res.Header,
  6356  			HTTPStatusCode: res.StatusCode,
  6357  		},
  6358  	}
  6359  	target := &ret
  6360  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6361  		return nil, err
  6362  	}
  6363  	return ret, nil
  6364  }
  6365  
  6366  type BuyersProposalsDealsBatchUpdateCall struct {
  6367  	s                       *Service
  6368  	parent                  string
  6369  	batchupdatedealsrequest *BatchUpdateDealsRequest
  6370  	urlParams_              gensupport.URLParams
  6371  	ctx_                    context.Context
  6372  	header_                 http.Header
  6373  }
  6374  
  6375  // BatchUpdate: Batch updates multiple deals in the same proposal.
  6376  //
  6377  //   - parent: The name of the proposal containing the deals to batch update.
  6378  //     Format: buyers/{accountId}/proposals/{proposalId}.
  6379  func (r *BuyersProposalsDealsService) BatchUpdate(parent string, batchupdatedealsrequest *BatchUpdateDealsRequest) *BuyersProposalsDealsBatchUpdateCall {
  6380  	c := &BuyersProposalsDealsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6381  	c.parent = parent
  6382  	c.batchupdatedealsrequest = batchupdatedealsrequest
  6383  	return c
  6384  }
  6385  
  6386  // Fields allows partial responses to be retrieved. See
  6387  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6388  // details.
  6389  func (c *BuyersProposalsDealsBatchUpdateCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsBatchUpdateCall {
  6390  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6391  	return c
  6392  }
  6393  
  6394  // Context sets the context to be used in this call's Do method.
  6395  func (c *BuyersProposalsDealsBatchUpdateCall) Context(ctx context.Context) *BuyersProposalsDealsBatchUpdateCall {
  6396  	c.ctx_ = ctx
  6397  	return c
  6398  }
  6399  
  6400  // Header returns a http.Header that can be modified by the caller to add
  6401  // headers to the request.
  6402  func (c *BuyersProposalsDealsBatchUpdateCall) Header() http.Header {
  6403  	if c.header_ == nil {
  6404  		c.header_ = make(http.Header)
  6405  	}
  6406  	return c.header_
  6407  }
  6408  
  6409  func (c *BuyersProposalsDealsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  6410  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6411  	var body io.Reader = nil
  6412  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatedealsrequest)
  6413  	if err != nil {
  6414  		return nil, err
  6415  	}
  6416  	c.urlParams_.Set("alt", alt)
  6417  	c.urlParams_.Set("prettyPrint", "false")
  6418  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deals:batchUpdate")
  6419  	urls += "?" + c.urlParams_.Encode()
  6420  	req, err := http.NewRequest("POST", urls, body)
  6421  	if err != nil {
  6422  		return nil, err
  6423  	}
  6424  	req.Header = reqHeaders
  6425  	googleapi.Expand(req.URL, map[string]string{
  6426  		"parent": c.parent,
  6427  	})
  6428  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6429  }
  6430  
  6431  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.deals.batchUpdate" call.
  6432  // Any non-2xx status code is an error. Response headers are in either
  6433  // *BatchUpdateDealsResponse.ServerResponse.Header or (if a response was
  6434  // returned at all) in error.(*googleapi.Error).Header. Use
  6435  // googleapi.IsNotModified to check whether the returned error was because
  6436  // http.StatusNotModified was returned.
  6437  func (c *BuyersProposalsDealsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateDealsResponse, error) {
  6438  	gensupport.SetOptions(c.urlParams_, opts...)
  6439  	res, err := c.doRequest("json")
  6440  	if res != nil && res.StatusCode == http.StatusNotModified {
  6441  		if res.Body != nil {
  6442  			res.Body.Close()
  6443  		}
  6444  		return nil, gensupport.WrapError(&googleapi.Error{
  6445  			Code:   res.StatusCode,
  6446  			Header: res.Header,
  6447  		})
  6448  	}
  6449  	if err != nil {
  6450  		return nil, err
  6451  	}
  6452  	defer googleapi.CloseBody(res)
  6453  	if err := googleapi.CheckResponse(res); err != nil {
  6454  		return nil, gensupport.WrapError(err)
  6455  	}
  6456  	ret := &BatchUpdateDealsResponse{
  6457  		ServerResponse: googleapi.ServerResponse{
  6458  			Header:         res.Header,
  6459  			HTTPStatusCode: res.StatusCode,
  6460  		},
  6461  	}
  6462  	target := &ret
  6463  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6464  		return nil, err
  6465  	}
  6466  	return ret, nil
  6467  }
  6468  
  6469  type BuyersProposalsDealsGetCall struct {
  6470  	s            *Service
  6471  	name         string
  6472  	urlParams_   gensupport.URLParams
  6473  	ifNoneMatch_ string
  6474  	ctx_         context.Context
  6475  	header_      http.Header
  6476  }
  6477  
  6478  // Get: Gets a deal given its name. The deal is returned at its head revision.
  6479  //
  6480  // - name: Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}.
  6481  func (r *BuyersProposalsDealsService) Get(name string) *BuyersProposalsDealsGetCall {
  6482  	c := &BuyersProposalsDealsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6483  	c.name = name
  6484  	return c
  6485  }
  6486  
  6487  // Fields allows partial responses to be retrieved. See
  6488  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6489  // details.
  6490  func (c *BuyersProposalsDealsGetCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsGetCall {
  6491  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6492  	return c
  6493  }
  6494  
  6495  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6496  // object's ETag matches the given value. This is useful for getting updates
  6497  // only after the object has changed since the last request.
  6498  func (c *BuyersProposalsDealsGetCall) IfNoneMatch(entityTag string) *BuyersProposalsDealsGetCall {
  6499  	c.ifNoneMatch_ = entityTag
  6500  	return c
  6501  }
  6502  
  6503  // Context sets the context to be used in this call's Do method.
  6504  func (c *BuyersProposalsDealsGetCall) Context(ctx context.Context) *BuyersProposalsDealsGetCall {
  6505  	c.ctx_ = ctx
  6506  	return c
  6507  }
  6508  
  6509  // Header returns a http.Header that can be modified by the caller to add
  6510  // headers to the request.
  6511  func (c *BuyersProposalsDealsGetCall) Header() http.Header {
  6512  	if c.header_ == nil {
  6513  		c.header_ = make(http.Header)
  6514  	}
  6515  	return c.header_
  6516  }
  6517  
  6518  func (c *BuyersProposalsDealsGetCall) doRequest(alt string) (*http.Response, error) {
  6519  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6520  	if c.ifNoneMatch_ != "" {
  6521  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6522  	}
  6523  	var body io.Reader = nil
  6524  	c.urlParams_.Set("alt", alt)
  6525  	c.urlParams_.Set("prettyPrint", "false")
  6526  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6527  	urls += "?" + c.urlParams_.Encode()
  6528  	req, err := http.NewRequest("GET", urls, body)
  6529  	if err != nil {
  6530  		return nil, err
  6531  	}
  6532  	req.Header = reqHeaders
  6533  	googleapi.Expand(req.URL, map[string]string{
  6534  		"name": c.name,
  6535  	})
  6536  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6537  }
  6538  
  6539  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.deals.get" call.
  6540  // Any non-2xx status code is an error. Response headers are in either
  6541  // *Deal.ServerResponse.Header or (if a response was returned at all) in
  6542  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6543  // whether the returned error was because http.StatusNotModified was returned.
  6544  func (c *BuyersProposalsDealsGetCall) Do(opts ...googleapi.CallOption) (*Deal, error) {
  6545  	gensupport.SetOptions(c.urlParams_, opts...)
  6546  	res, err := c.doRequest("json")
  6547  	if res != nil && res.StatusCode == http.StatusNotModified {
  6548  		if res.Body != nil {
  6549  			res.Body.Close()
  6550  		}
  6551  		return nil, gensupport.WrapError(&googleapi.Error{
  6552  			Code:   res.StatusCode,
  6553  			Header: res.Header,
  6554  		})
  6555  	}
  6556  	if err != nil {
  6557  		return nil, err
  6558  	}
  6559  	defer googleapi.CloseBody(res)
  6560  	if err := googleapi.CheckResponse(res); err != nil {
  6561  		return nil, gensupport.WrapError(err)
  6562  	}
  6563  	ret := &Deal{
  6564  		ServerResponse: googleapi.ServerResponse{
  6565  			Header:         res.Header,
  6566  			HTTPStatusCode: res.StatusCode,
  6567  		},
  6568  	}
  6569  	target := &ret
  6570  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6571  		return nil, err
  6572  	}
  6573  	return ret, nil
  6574  }
  6575  
  6576  type BuyersProposalsDealsListCall struct {
  6577  	s            *Service
  6578  	parent       string
  6579  	urlParams_   gensupport.URLParams
  6580  	ifNoneMatch_ string
  6581  	ctx_         context.Context
  6582  	header_      http.Header
  6583  }
  6584  
  6585  // List: Lists all deals in a proposal. To retrieve only the finalized revision
  6586  // deals regardless if a deal is being renegotiated, see the FinalizedDeals
  6587  // resource.
  6588  //
  6589  //   - parent: The name of the proposal containing the deals to retrieve. Format:
  6590  //     buyers/{accountId}/proposals/{proposalId}.
  6591  func (r *BuyersProposalsDealsService) List(parent string) *BuyersProposalsDealsListCall {
  6592  	c := &BuyersProposalsDealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6593  	c.parent = parent
  6594  	return c
  6595  }
  6596  
  6597  // PageSize sets the optional parameter "pageSize": Requested page size. The
  6598  // server may return fewer results than requested. If requested more than 500,
  6599  // the server will return 500 results per page. If unspecified, the server will
  6600  // pick a default page size of 100.
  6601  func (c *BuyersProposalsDealsListCall) PageSize(pageSize int64) *BuyersProposalsDealsListCall {
  6602  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6603  	return c
  6604  }
  6605  
  6606  // PageToken sets the optional parameter "pageToken": The page token as
  6607  // returned from ListDealsResponse.
  6608  func (c *BuyersProposalsDealsListCall) PageToken(pageToken string) *BuyersProposalsDealsListCall {
  6609  	c.urlParams_.Set("pageToken", pageToken)
  6610  	return c
  6611  }
  6612  
  6613  // Fields allows partial responses to be retrieved. See
  6614  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6615  // details.
  6616  func (c *BuyersProposalsDealsListCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsListCall {
  6617  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6618  	return c
  6619  }
  6620  
  6621  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6622  // object's ETag matches the given value. This is useful for getting updates
  6623  // only after the object has changed since the last request.
  6624  func (c *BuyersProposalsDealsListCall) IfNoneMatch(entityTag string) *BuyersProposalsDealsListCall {
  6625  	c.ifNoneMatch_ = entityTag
  6626  	return c
  6627  }
  6628  
  6629  // Context sets the context to be used in this call's Do method.
  6630  func (c *BuyersProposalsDealsListCall) Context(ctx context.Context) *BuyersProposalsDealsListCall {
  6631  	c.ctx_ = ctx
  6632  	return c
  6633  }
  6634  
  6635  // Header returns a http.Header that can be modified by the caller to add
  6636  // headers to the request.
  6637  func (c *BuyersProposalsDealsListCall) Header() http.Header {
  6638  	if c.header_ == nil {
  6639  		c.header_ = make(http.Header)
  6640  	}
  6641  	return c.header_
  6642  }
  6643  
  6644  func (c *BuyersProposalsDealsListCall) doRequest(alt string) (*http.Response, error) {
  6645  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6646  	if c.ifNoneMatch_ != "" {
  6647  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6648  	}
  6649  	var body io.Reader = nil
  6650  	c.urlParams_.Set("alt", alt)
  6651  	c.urlParams_.Set("prettyPrint", "false")
  6652  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deals")
  6653  	urls += "?" + c.urlParams_.Encode()
  6654  	req, err := http.NewRequest("GET", urls, body)
  6655  	if err != nil {
  6656  		return nil, err
  6657  	}
  6658  	req.Header = reqHeaders
  6659  	googleapi.Expand(req.URL, map[string]string{
  6660  		"parent": c.parent,
  6661  	})
  6662  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6663  }
  6664  
  6665  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.deals.list" call.
  6666  // Any non-2xx status code is an error. Response headers are in either
  6667  // *ListDealsResponse.ServerResponse.Header or (if a response was returned at
  6668  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6669  // check whether the returned error was because http.StatusNotModified was
  6670  // returned.
  6671  func (c *BuyersProposalsDealsListCall) Do(opts ...googleapi.CallOption) (*ListDealsResponse, error) {
  6672  	gensupport.SetOptions(c.urlParams_, opts...)
  6673  	res, err := c.doRequest("json")
  6674  	if res != nil && res.StatusCode == http.StatusNotModified {
  6675  		if res.Body != nil {
  6676  			res.Body.Close()
  6677  		}
  6678  		return nil, gensupport.WrapError(&googleapi.Error{
  6679  			Code:   res.StatusCode,
  6680  			Header: res.Header,
  6681  		})
  6682  	}
  6683  	if err != nil {
  6684  		return nil, err
  6685  	}
  6686  	defer googleapi.CloseBody(res)
  6687  	if err := googleapi.CheckResponse(res); err != nil {
  6688  		return nil, gensupport.WrapError(err)
  6689  	}
  6690  	ret := &ListDealsResponse{
  6691  		ServerResponse: googleapi.ServerResponse{
  6692  			Header:         res.Header,
  6693  			HTTPStatusCode: res.StatusCode,
  6694  		},
  6695  	}
  6696  	target := &ret
  6697  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6698  		return nil, err
  6699  	}
  6700  	return ret, nil
  6701  }
  6702  
  6703  // Pages invokes f for each page of results.
  6704  // A non-nil error returned from f will halt the iteration.
  6705  // The provided context supersedes any context provided to the Context method.
  6706  func (c *BuyersProposalsDealsListCall) Pages(ctx context.Context, f func(*ListDealsResponse) error) error {
  6707  	c.ctx_ = ctx
  6708  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6709  	for {
  6710  		x, err := c.Do()
  6711  		if err != nil {
  6712  			return err
  6713  		}
  6714  		if err := f(x); err != nil {
  6715  			return err
  6716  		}
  6717  		if x.NextPageToken == "" {
  6718  			return nil
  6719  		}
  6720  		c.PageToken(x.NextPageToken)
  6721  	}
  6722  }
  6723  
  6724  type BuyersProposalsDealsPatchCall struct {
  6725  	s          *Service
  6726  	nameid     string
  6727  	deal       *Deal
  6728  	urlParams_ gensupport.URLParams
  6729  	ctx_       context.Context
  6730  	header_    http.Header
  6731  }
  6732  
  6733  // Patch: Updates the given deal at the buyer known revision number. If the
  6734  // server revision has advanced since the passed-in proposal.proposal_revision
  6735  // an ABORTED error message will be returned. The revision number is
  6736  // incremented by the server whenever the proposal or its constituent deals are
  6737  // updated. Note: The revision number is kept at a proposal level. The buyer of
  6738  // the API is expected to keep track of the revision number after the last
  6739  // update operation and send it in as part of the next update request. This
  6740  // way, if there are further changes on the server (for example, seller making
  6741  // new updates), then the server can detect conflicts and reject the proposed
  6742  // changes.
  6743  //
  6744  //   - name: Immutable. The unique identifier of the deal. Auto-generated by the
  6745  //     server when a deal is created. Format:
  6746  //     buyers/{accountId}/proposals/{proposalId}/deals/{dealId}.
  6747  func (r *BuyersProposalsDealsService) Patch(nameid string, deal *Deal) *BuyersProposalsDealsPatchCall {
  6748  	c := &BuyersProposalsDealsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6749  	c.nameid = nameid
  6750  	c.deal = deal
  6751  	return c
  6752  }
  6753  
  6754  // UpdateMask sets the optional parameter "updateMask": List of fields to be
  6755  // updated. If empty or unspecified, the service will update all fields
  6756  // populated in the update request excluding the output only fields and
  6757  // primitive fields with default value. Note that explicit field mask is
  6758  // required in order to reset a primitive field back to its default value, for
  6759  // example, false for boolean fields, 0 for integer fields. A special field
  6760  // mask consisting of a single path "*" can be used to indicate full
  6761  // replacement(the equivalent of PUT method), updatable fields unset or
  6762  // unspecified in the input will be cleared or set to default value. Output
  6763  // only fields will be ignored regardless of the value of updateMask.
  6764  func (c *BuyersProposalsDealsPatchCall) UpdateMask(updateMask string) *BuyersProposalsDealsPatchCall {
  6765  	c.urlParams_.Set("updateMask", updateMask)
  6766  	return c
  6767  }
  6768  
  6769  // Fields allows partial responses to be retrieved. See
  6770  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6771  // details.
  6772  func (c *BuyersProposalsDealsPatchCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsPatchCall {
  6773  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6774  	return c
  6775  }
  6776  
  6777  // Context sets the context to be used in this call's Do method.
  6778  func (c *BuyersProposalsDealsPatchCall) Context(ctx context.Context) *BuyersProposalsDealsPatchCall {
  6779  	c.ctx_ = ctx
  6780  	return c
  6781  }
  6782  
  6783  // Header returns a http.Header that can be modified by the caller to add
  6784  // headers to the request.
  6785  func (c *BuyersProposalsDealsPatchCall) Header() http.Header {
  6786  	if c.header_ == nil {
  6787  		c.header_ = make(http.Header)
  6788  	}
  6789  	return c.header_
  6790  }
  6791  
  6792  func (c *BuyersProposalsDealsPatchCall) doRequest(alt string) (*http.Response, error) {
  6793  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6794  	var body io.Reader = nil
  6795  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.deal)
  6796  	if err != nil {
  6797  		return nil, err
  6798  	}
  6799  	c.urlParams_.Set("alt", alt)
  6800  	c.urlParams_.Set("prettyPrint", "false")
  6801  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6802  	urls += "?" + c.urlParams_.Encode()
  6803  	req, err := http.NewRequest("PATCH", urls, body)
  6804  	if err != nil {
  6805  		return nil, err
  6806  	}
  6807  	req.Header = reqHeaders
  6808  	googleapi.Expand(req.URL, map[string]string{
  6809  		"name": c.nameid,
  6810  	})
  6811  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6812  }
  6813  
  6814  // Do executes the "authorizedbuyersmarketplace.buyers.proposals.deals.patch" call.
  6815  // Any non-2xx status code is an error. Response headers are in either
  6816  // *Deal.ServerResponse.Header or (if a response was returned at all) in
  6817  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6818  // whether the returned error was because http.StatusNotModified was returned.
  6819  func (c *BuyersProposalsDealsPatchCall) Do(opts ...googleapi.CallOption) (*Deal, error) {
  6820  	gensupport.SetOptions(c.urlParams_, opts...)
  6821  	res, err := c.doRequest("json")
  6822  	if res != nil && res.StatusCode == http.StatusNotModified {
  6823  		if res.Body != nil {
  6824  			res.Body.Close()
  6825  		}
  6826  		return nil, gensupport.WrapError(&googleapi.Error{
  6827  			Code:   res.StatusCode,
  6828  			Header: res.Header,
  6829  		})
  6830  	}
  6831  	if err != nil {
  6832  		return nil, err
  6833  	}
  6834  	defer googleapi.CloseBody(res)
  6835  	if err := googleapi.CheckResponse(res); err != nil {
  6836  		return nil, gensupport.WrapError(err)
  6837  	}
  6838  	ret := &Deal{
  6839  		ServerResponse: googleapi.ServerResponse{
  6840  			Header:         res.Header,
  6841  			HTTPStatusCode: res.StatusCode,
  6842  		},
  6843  	}
  6844  	target := &ret
  6845  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6846  		return nil, err
  6847  	}
  6848  	return ret, nil
  6849  }
  6850  
  6851  type BuyersPublisherProfilesGetCall struct {
  6852  	s            *Service
  6853  	name         string
  6854  	urlParams_   gensupport.URLParams
  6855  	ifNoneMatch_ string
  6856  	ctx_         context.Context
  6857  	header_      http.Header
  6858  }
  6859  
  6860  // Get: Gets the requested publisher profile by name.
  6861  //
  6862  //   - name: Name of the publisher profile. Format:
  6863  //     `buyers/{buyerId}/publisherProfiles/{publisherProfileId}`.
  6864  func (r *BuyersPublisherProfilesService) Get(name string) *BuyersPublisherProfilesGetCall {
  6865  	c := &BuyersPublisherProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6866  	c.name = name
  6867  	return c
  6868  }
  6869  
  6870  // Fields allows partial responses to be retrieved. See
  6871  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6872  // details.
  6873  func (c *BuyersPublisherProfilesGetCall) Fields(s ...googleapi.Field) *BuyersPublisherProfilesGetCall {
  6874  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6875  	return c
  6876  }
  6877  
  6878  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6879  // object's ETag matches the given value. This is useful for getting updates
  6880  // only after the object has changed since the last request.
  6881  func (c *BuyersPublisherProfilesGetCall) IfNoneMatch(entityTag string) *BuyersPublisherProfilesGetCall {
  6882  	c.ifNoneMatch_ = entityTag
  6883  	return c
  6884  }
  6885  
  6886  // Context sets the context to be used in this call's Do method.
  6887  func (c *BuyersPublisherProfilesGetCall) Context(ctx context.Context) *BuyersPublisherProfilesGetCall {
  6888  	c.ctx_ = ctx
  6889  	return c
  6890  }
  6891  
  6892  // Header returns a http.Header that can be modified by the caller to add
  6893  // headers to the request.
  6894  func (c *BuyersPublisherProfilesGetCall) Header() http.Header {
  6895  	if c.header_ == nil {
  6896  		c.header_ = make(http.Header)
  6897  	}
  6898  	return c.header_
  6899  }
  6900  
  6901  func (c *BuyersPublisherProfilesGetCall) doRequest(alt string) (*http.Response, error) {
  6902  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6903  	if c.ifNoneMatch_ != "" {
  6904  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6905  	}
  6906  	var body io.Reader = nil
  6907  	c.urlParams_.Set("alt", alt)
  6908  	c.urlParams_.Set("prettyPrint", "false")
  6909  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6910  	urls += "?" + c.urlParams_.Encode()
  6911  	req, err := http.NewRequest("GET", urls, body)
  6912  	if err != nil {
  6913  		return nil, err
  6914  	}
  6915  	req.Header = reqHeaders
  6916  	googleapi.Expand(req.URL, map[string]string{
  6917  		"name": c.name,
  6918  	})
  6919  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6920  }
  6921  
  6922  // Do executes the "authorizedbuyersmarketplace.buyers.publisherProfiles.get" call.
  6923  // Any non-2xx status code is an error. Response headers are in either
  6924  // *PublisherProfile.ServerResponse.Header or (if a response was returned at
  6925  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6926  // check whether the returned error was because http.StatusNotModified was
  6927  // returned.
  6928  func (c *BuyersPublisherProfilesGetCall) Do(opts ...googleapi.CallOption) (*PublisherProfile, error) {
  6929  	gensupport.SetOptions(c.urlParams_, opts...)
  6930  	res, err := c.doRequest("json")
  6931  	if res != nil && res.StatusCode == http.StatusNotModified {
  6932  		if res.Body != nil {
  6933  			res.Body.Close()
  6934  		}
  6935  		return nil, gensupport.WrapError(&googleapi.Error{
  6936  			Code:   res.StatusCode,
  6937  			Header: res.Header,
  6938  		})
  6939  	}
  6940  	if err != nil {
  6941  		return nil, err
  6942  	}
  6943  	defer googleapi.CloseBody(res)
  6944  	if err := googleapi.CheckResponse(res); err != nil {
  6945  		return nil, gensupport.WrapError(err)
  6946  	}
  6947  	ret := &PublisherProfile{
  6948  		ServerResponse: googleapi.ServerResponse{
  6949  			Header:         res.Header,
  6950  			HTTPStatusCode: res.StatusCode,
  6951  		},
  6952  	}
  6953  	target := &ret
  6954  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6955  		return nil, err
  6956  	}
  6957  	return ret, nil
  6958  }
  6959  
  6960  type BuyersPublisherProfilesListCall struct {
  6961  	s            *Service
  6962  	parent       string
  6963  	urlParams_   gensupport.URLParams
  6964  	ifNoneMatch_ string
  6965  	ctx_         context.Context
  6966  	header_      http.Header
  6967  }
  6968  
  6969  // List: Lists publisher profiles. The returned publisher profiles aren't in
  6970  // any defined order. The order of the results might change. A new publisher
  6971  // profile can appear in any place in the list of returned results.
  6972  //
  6973  //   - parent: Parent that owns the collection of publisher profiles Format:
  6974  //     `buyers/{buyerId}`.
  6975  func (r *BuyersPublisherProfilesService) List(parent string) *BuyersPublisherProfilesListCall {
  6976  	c := &BuyersPublisherProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6977  	c.parent = parent
  6978  	return c
  6979  }
  6980  
  6981  // Filter sets the optional parameter "filter": Optional query string using the
  6982  // [Cloud API list filtering]
  6983  // (https://developers.google.com/authorized-buyers/apis/guides/list-filters)
  6984  // syntax.
  6985  func (c *BuyersPublisherProfilesListCall) Filter(filter string) *BuyersPublisherProfilesListCall {
  6986  	c.urlParams_.Set("filter", filter)
  6987  	return c
  6988  }
  6989  
  6990  // PageSize sets the optional parameter "pageSize": Requested page size. The
  6991  // server may return fewer results than requested. If requested more than 500,
  6992  // the server will return 500 results per page. If unspecified, the server will
  6993  // pick a default page size of 100.
  6994  func (c *BuyersPublisherProfilesListCall) PageSize(pageSize int64) *BuyersPublisherProfilesListCall {
  6995  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6996  	return c
  6997  }
  6998  
  6999  // PageToken sets the optional parameter "pageToken": The page token as
  7000  // returned from a previous ListPublisherProfilesResponse.
  7001  func (c *BuyersPublisherProfilesListCall) PageToken(pageToken string) *BuyersPublisherProfilesListCall {
  7002  	c.urlParams_.Set("pageToken", pageToken)
  7003  	return c
  7004  }
  7005  
  7006  // Fields allows partial responses to be retrieved. See
  7007  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7008  // details.
  7009  func (c *BuyersPublisherProfilesListCall) Fields(s ...googleapi.Field) *BuyersPublisherProfilesListCall {
  7010  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7011  	return c
  7012  }
  7013  
  7014  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7015  // object's ETag matches the given value. This is useful for getting updates
  7016  // only after the object has changed since the last request.
  7017  func (c *BuyersPublisherProfilesListCall) IfNoneMatch(entityTag string) *BuyersPublisherProfilesListCall {
  7018  	c.ifNoneMatch_ = entityTag
  7019  	return c
  7020  }
  7021  
  7022  // Context sets the context to be used in this call's Do method.
  7023  func (c *BuyersPublisherProfilesListCall) Context(ctx context.Context) *BuyersPublisherProfilesListCall {
  7024  	c.ctx_ = ctx
  7025  	return c
  7026  }
  7027  
  7028  // Header returns a http.Header that can be modified by the caller to add
  7029  // headers to the request.
  7030  func (c *BuyersPublisherProfilesListCall) Header() http.Header {
  7031  	if c.header_ == nil {
  7032  		c.header_ = make(http.Header)
  7033  	}
  7034  	return c.header_
  7035  }
  7036  
  7037  func (c *BuyersPublisherProfilesListCall) doRequest(alt string) (*http.Response, error) {
  7038  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7039  	if c.ifNoneMatch_ != "" {
  7040  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7041  	}
  7042  	var body io.Reader = nil
  7043  	c.urlParams_.Set("alt", alt)
  7044  	c.urlParams_.Set("prettyPrint", "false")
  7045  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/publisherProfiles")
  7046  	urls += "?" + c.urlParams_.Encode()
  7047  	req, err := http.NewRequest("GET", urls, body)
  7048  	if err != nil {
  7049  		return nil, err
  7050  	}
  7051  	req.Header = reqHeaders
  7052  	googleapi.Expand(req.URL, map[string]string{
  7053  		"parent": c.parent,
  7054  	})
  7055  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7056  }
  7057  
  7058  // Do executes the "authorizedbuyersmarketplace.buyers.publisherProfiles.list" call.
  7059  // Any non-2xx status code is an error. Response headers are in either
  7060  // *ListPublisherProfilesResponse.ServerResponse.Header or (if a response was
  7061  // returned at all) in error.(*googleapi.Error).Header. Use
  7062  // googleapi.IsNotModified to check whether the returned error was because
  7063  // http.StatusNotModified was returned.
  7064  func (c *BuyersPublisherProfilesListCall) Do(opts ...googleapi.CallOption) (*ListPublisherProfilesResponse, error) {
  7065  	gensupport.SetOptions(c.urlParams_, opts...)
  7066  	res, err := c.doRequest("json")
  7067  	if res != nil && res.StatusCode == http.StatusNotModified {
  7068  		if res.Body != nil {
  7069  			res.Body.Close()
  7070  		}
  7071  		return nil, gensupport.WrapError(&googleapi.Error{
  7072  			Code:   res.StatusCode,
  7073  			Header: res.Header,
  7074  		})
  7075  	}
  7076  	if err != nil {
  7077  		return nil, err
  7078  	}
  7079  	defer googleapi.CloseBody(res)
  7080  	if err := googleapi.CheckResponse(res); err != nil {
  7081  		return nil, gensupport.WrapError(err)
  7082  	}
  7083  	ret := &ListPublisherProfilesResponse{
  7084  		ServerResponse: googleapi.ServerResponse{
  7085  			Header:         res.Header,
  7086  			HTTPStatusCode: res.StatusCode,
  7087  		},
  7088  	}
  7089  	target := &ret
  7090  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7091  		return nil, err
  7092  	}
  7093  	return ret, nil
  7094  }
  7095  
  7096  // Pages invokes f for each page of results.
  7097  // A non-nil error returned from f will halt the iteration.
  7098  // The provided context supersedes any context provided to the Context method.
  7099  func (c *BuyersPublisherProfilesListCall) Pages(ctx context.Context, f func(*ListPublisherProfilesResponse) error) error {
  7100  	c.ctx_ = ctx
  7101  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7102  	for {
  7103  		x, err := c.Do()
  7104  		if err != nil {
  7105  			return err
  7106  		}
  7107  		if err := f(x); err != nil {
  7108  			return err
  7109  		}
  7110  		if x.NextPageToken == "" {
  7111  			return nil
  7112  		}
  7113  		c.PageToken(x.NextPageToken)
  7114  	}
  7115  }
  7116  

View as plain text