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