|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843 |
- // Copyright 2019 Google LLC.
- // Use of this source code is governed by a BSD-style
- // license that can be found in the LICENSE file.
-
- // Code generated file. DO NOT EDIT.
-
- // Package doubleclickbidmanager provides access to the DoubleClick Bid Manager API.
- //
- // For product documentation, see: https://developers.google.com/bid-manager/
- //
- // Creating a client
- //
- // Usage example:
- //
- // import "google.golang.org/api/doubleclickbidmanager/v1"
- // ...
- // ctx := context.Background()
- // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx)
- //
- // In this example, Google Application Default Credentials are used for authentication.
- //
- // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
- //
- // Other authentication options
- //
- // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
- //
- // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx, option.WithAPIKey("AIza..."))
- //
- // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
- //
- // config := &oauth2.Config{...}
- // // ...
- // token, err := config.Exchange(ctx, ...)
- // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
- //
- // See https://godoc.org/google.golang.org/api/option/ for details on options.
- package doubleclickbidmanager // import "google.golang.org/api/doubleclickbidmanager/v1"
-
- import (
- "bytes"
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "strconv"
- "strings"
-
- gensupport "google.golang.org/api/gensupport"
- googleapi "google.golang.org/api/googleapi"
- option "google.golang.org/api/option"
- htransport "google.golang.org/api/transport/http"
- )
-
- // Always reference these packages, just in case the auto-generated code
- // below doesn't.
- var _ = bytes.NewBuffer
- var _ = strconv.Itoa
- var _ = fmt.Sprintf
- var _ = json.NewDecoder
- var _ = io.Copy
- var _ = url.Parse
- var _ = gensupport.MarshalJSON
- var _ = googleapi.Version
- var _ = errors.New
- var _ = strings.Replace
- var _ = context.Canceled
-
- const apiId = "doubleclickbidmanager:v1"
- const apiName = "doubleclickbidmanager"
- const apiVersion = "v1"
- const basePath = "https://www.googleapis.com/doubleclickbidmanager/v1/"
-
- // OAuth2 scopes used by this API.
- const (
- // View and manage your reports in DoubleClick Bid Manager
- DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager"
- )
-
- // NewService creates a new Service.
- func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
- scopesOption := option.WithScopes(
- "https://www.googleapis.com/auth/doubleclickbidmanager",
- )
- // NOTE: prepend, so we don't override user-specified scopes.
- opts = append([]option.ClientOption{scopesOption}, opts...)
- client, endpoint, err := htransport.NewClient(ctx, opts...)
- if err != nil {
- return nil, err
- }
- s, err := New(client)
- if err != nil {
- return nil, err
- }
- if endpoint != "" {
- s.BasePath = endpoint
- }
- return s, nil
- }
-
- // New creates a new Service. It uses the provided http.Client for requests.
- //
- // Deprecated: please use NewService instead.
- // To provide a custom HTTP client, use option.WithHTTPClient.
- // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
- func New(client *http.Client) (*Service, error) {
- if client == nil {
- return nil, errors.New("client is nil")
- }
- s := &Service{client: client, BasePath: basePath}
- s.Lineitems = NewLineitemsService(s)
- s.Queries = NewQueriesService(s)
- s.Reports = NewReportsService(s)
- s.Sdf = NewSdfService(s)
- return s, nil
- }
-
- type Service struct {
- client *http.Client
- BasePath string // API endpoint base URL
- UserAgent string // optional additional User-Agent fragment
-
- Lineitems *LineitemsService
-
- Queries *QueriesService
-
- Reports *ReportsService
-
- Sdf *SdfService
- }
-
- func (s *Service) userAgent() string {
- if s.UserAgent == "" {
- return googleapi.UserAgent
- }
- return googleapi.UserAgent + " " + s.UserAgent
- }
-
- func NewLineitemsService(s *Service) *LineitemsService {
- rs := &LineitemsService{s: s}
- return rs
- }
-
- type LineitemsService struct {
- s *Service
- }
-
- func NewQueriesService(s *Service) *QueriesService {
- rs := &QueriesService{s: s}
- return rs
- }
-
- type QueriesService struct {
- s *Service
- }
-
- func NewReportsService(s *Service) *ReportsService {
- rs := &ReportsService{s: s}
- return rs
- }
-
- type ReportsService struct {
- s *Service
- }
-
- func NewSdfService(s *Service) *SdfService {
- rs := &SdfService{s: s}
- return rs
- }
-
- type SdfService struct {
- s *Service
- }
-
- // DownloadLineItemsRequest: Request to fetch stored line items.
- type DownloadLineItemsRequest struct {
- // FileSpec: File specification (column names, types, order) in which
- // the line items will be returned. Default to EWF.
- //
- // Possible values:
- // "EWF"
- FileSpec string `json:"fileSpec,omitempty"`
-
- // FilterIds: Ids of the specified filter type used to filter line items
- // to fetch. If omitted, all the line items will be returned.
- FilterIds googleapi.Int64s `json:"filterIds,omitempty"`
-
- // FilterType: Filter type used to filter line items to fetch.
- //
- // Possible values:
- // "ADVERTISER_ID"
- // "INSERTION_ORDER_ID"
- // "LINE_ITEM_ID"
- FilterType string `json:"filterType,omitempty"`
-
- // Format: Format in which the line items will be returned. Default to
- // CSV.
- //
- // Possible values:
- // "CSV"
- Format string `json:"format,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "FileSpec") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "FileSpec") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *DownloadLineItemsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod DownloadLineItemsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // DownloadLineItemsResponse: Download line items response.
- type DownloadLineItemsResponse struct {
- // LineItems: Retrieved line items in CSV format. For more information
- // about file formats, see Entity Write File Format.
- LineItems string `json:"lineItems,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "LineItems") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "LineItems") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *DownloadLineItemsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod DownloadLineItemsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // DownloadRequest: Request to fetch stored inventory sources,
- // campaigns, insertion orders, line items, TrueView ad groups and ads.
- type DownloadRequest struct {
- // FileTypes: File types that will be returned.
- //
- // Acceptable values are:
- // - "AD"
- // - "AD_GROUP"
- // - "CAMPAIGN"
- // - "INSERTION_ORDER"
- // - "LINE_ITEM"
- // - "INVENTORY_SOURCE"
- //
- // Possible values:
- // "AD"
- // "AD_GROUP"
- // "CAMPAIGN"
- // "INSERTION_ORDER"
- // "INVENTORY_SOURCE"
- // "LINE_ITEM"
- FileTypes []string `json:"fileTypes,omitempty"`
-
- // FilterIds: The IDs of the specified filter type. This is used to
- // filter entities to fetch. At least one ID must be specified.
- FilterIds googleapi.Int64s `json:"filterIds,omitempty"`
-
- // FilterType: Filter type used to filter entities to fetch.
- //
- // Possible values:
- // "ADVERTISER_ID"
- // "CAMPAIGN_ID"
- // "INSERTION_ORDER_ID"
- // "INVENTORY_SOURCE_ID"
- // "LINE_ITEM_ID"
- // "PARTNER_ID"
- FilterType string `json:"filterType,omitempty"`
-
- // Version: SDF Version (column names, types, order) in which the
- // entities will be returned. Default to 3.1.
- Version string `json:"version,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "FileTypes") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "FileTypes") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *DownloadRequest) MarshalJSON() ([]byte, error) {
- type NoMethod DownloadRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // DownloadResponse: Download response.
- type DownloadResponse struct {
- // AdGroups: Retrieved ad groups in SDF format.
- AdGroups string `json:"adGroups,omitempty"`
-
- // Ads: Retrieved ads in SDF format.
- Ads string `json:"ads,omitempty"`
-
- // Campaigns: Retrieved campaigns in SDF format.
- Campaigns string `json:"campaigns,omitempty"`
-
- // InsertionOrders: Retrieved insertion orders in SDF format.
- InsertionOrders string `json:"insertionOrders,omitempty"`
-
- InventorySources string `json:"inventorySources,omitempty"`
-
- // LineItems: Retrieved line items in SDF format.
- LineItems string `json:"lineItems,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "AdGroups") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "AdGroups") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *DownloadResponse) MarshalJSON() ([]byte, error) {
- type NoMethod DownloadResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // FilterPair: Filter used to match traffic data in your report.
- type FilterPair struct {
- // Type: Filter type.
- //
- // Possible values:
- // "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY"
- // "FILTER_ACTIVITY_ID"
- // "FILTER_ADVERTISER"
- // "FILTER_ADVERTISER_CURRENCY"
- // "FILTER_ADVERTISER_TIMEZONE"
- // "FILTER_AD_POSITION"
- // "FILTER_AGE"
- // "FILTER_AUTHORIZED_SELLER_STATE_ID"
- // "FILTER_BRANDSAFE_CHANNEL_ID"
- // "FILTER_BROWSER"
- // "FILTER_BUDGET_SEGMENT_DESCRIPTION"
- // "FILTER_CAMPAIGN_DAILY_FREQUENCY"
- // "FILTER_CARRIER"
- // "FILTER_CHANNEL_ID"
- // "FILTER_CITY"
- // "FILTER_COMPANION_CREATIVE_ID"
- // "FILTER_CONVERSION_DELAY"
- // "FILTER_COUNTRY"
- // "FILTER_CREATIVE_ATTRIBUTE"
- // "FILTER_CREATIVE_HEIGHT"
- // "FILTER_CREATIVE_ID"
- // "FILTER_CREATIVE_SIZE"
- // "FILTER_CREATIVE_TYPE"
- // "FILTER_CREATIVE_WIDTH"
- // "FILTER_DATA_PROVIDER"
- // "FILTER_DATE"
- // "FILTER_DAY_OF_WEEK"
- // "FILTER_DEVICE_MAKE"
- // "FILTER_DEVICE_MODEL"
- // "FILTER_DEVICE_TYPE"
- // "FILTER_DFP_ORDER_ID"
- // "FILTER_DMA"
- // "FILTER_DV360_ACTIVITY_ID"
- // "FILTER_EXCHANGE_ID"
- // "FILTER_FLOODLIGHT_ACTIVITY_ID"
- // "FILTER_FLOODLIGHT_PIXEL_ID"
- // "FILTER_GENDER"
- // "FILTER_INSERTION_ORDER"
- // "FILTER_INVENTORY_COMMITMENT_TYPE"
- // "FILTER_INVENTORY_DELIVERY_METHOD"
- // "FILTER_INVENTORY_FORMAT"
- // "FILTER_INVENTORY_RATE_TYPE"
- // "FILTER_INVENTORY_SOURCE"
- // "FILTER_INVENTORY_SOURCE_TYPE"
- // "FILTER_KEYWORD"
- // "FILTER_LINE_ITEM"
- // "FILTER_LINE_ITEM_DAILY_FREQUENCY"
- // "FILTER_LINE_ITEM_LIFETIME_FREQUENCY"
- // "FILTER_LINE_ITEM_TYPE"
- // "FILTER_MEDIA_PLAN"
- // "FILTER_MOBILE_DEVICE_MAKE"
- // "FILTER_MOBILE_DEVICE_MAKE_MODEL"
- // "FILTER_MOBILE_DEVICE_TYPE"
- // "FILTER_MOBILE_GEO"
- // "FILTER_MONTH"
- // "FILTER_MRAID_SUPPORT"
- // "FILTER_NIELSEN_AGE"
- // "FILTER_NIELSEN_COUNTRY_CODE"
- // "FILTER_NIELSEN_DEVICE_ID"
- // "FILTER_NIELSEN_GENDER"
- // "FILTER_NOT_SUPPORTED"
- // "FILTER_ORDER_ID"
- // "FILTER_OS"
- // "FILTER_PAGE_CATEGORY"
- // "FILTER_PAGE_LAYOUT"
- // "FILTER_PARTNER"
- // "FILTER_PARTNER_CURRENCY"
- // "FILTER_PUBLIC_INVENTORY"
- // "FILTER_QUARTER"
- // "FILTER_REGION"
- // "FILTER_REGULAR_CHANNEL_ID"
- // "FILTER_SITE_ID"
- // "FILTER_SITE_LANGUAGE"
- // "FILTER_SKIPPABLE_SUPPORT"
- // "FILTER_TARGETED_USER_LIST"
- // "FILTER_TIME_OF_DAY"
- // "FILTER_TRUEVIEW_AD_GROUP_AD_ID"
- // "FILTER_TRUEVIEW_AD_GROUP_ID"
- // "FILTER_TRUEVIEW_AGE"
- // "FILTER_TRUEVIEW_CATEGORY"
- // "FILTER_TRUEVIEW_CITY"
- // "FILTER_TRUEVIEW_CONVERSION_TYPE"
- // "FILTER_TRUEVIEW_COUNTRY"
- // "FILTER_TRUEVIEW_CUSTOM_AFFINITY"
- // "FILTER_TRUEVIEW_DMA"
- // "FILTER_TRUEVIEW_GENDER"
- // "FILTER_TRUEVIEW_IAR_AGE"
- // "FILTER_TRUEVIEW_IAR_CATEGORY"
- // "FILTER_TRUEVIEW_IAR_CITY"
- // "FILTER_TRUEVIEW_IAR_COUNTRY"
- // "FILTER_TRUEVIEW_IAR_GENDER"
- // "FILTER_TRUEVIEW_IAR_INTEREST"
- // "FILTER_TRUEVIEW_IAR_LANGUAGE"
- // "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS"
- // "FILTER_TRUEVIEW_IAR_REGION"
- // "FILTER_TRUEVIEW_IAR_REMARKETING_LIST"
- // "FILTER_TRUEVIEW_IAR_TIME_OF_DAY"
- // "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL"
- // "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO"
- // "FILTER_TRUEVIEW_IAR_ZIPCODE"
- // "FILTER_TRUEVIEW_INTEREST"
- // "FILTER_TRUEVIEW_KEYWORD"
- // "FILTER_TRUEVIEW_PARENTAL_STATUS"
- // "FILTER_TRUEVIEW_PLACEMENT"
- // "FILTER_TRUEVIEW_REGION"
- // "FILTER_TRUEVIEW_REMARKETING_LIST"
- // "FILTER_TRUEVIEW_URL"
- // "FILTER_TRUEVIEW_ZIPCODE"
- // "FILTER_UNKNOWN"
- // "FILTER_USER_LIST"
- // "FILTER_USER_LIST_FIRST_PARTY"
- // "FILTER_USER_LIST_THIRD_PARTY"
- // "FILTER_VIDEO_AD_POSITION_IN_STREAM"
- // "FILTER_VIDEO_COMPANION_SIZE"
- // "FILTER_VIDEO_COMPANION_TYPE"
- // "FILTER_VIDEO_CREATIVE_DURATION"
- // "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE"
- // "FILTER_VIDEO_DURATION_SECONDS"
- // "FILTER_VIDEO_FORMAT_SUPPORT"
- // "FILTER_VIDEO_INVENTORY_TYPE"
- // "FILTER_VIDEO_PLAYER_SIZE"
- // "FILTER_VIDEO_RATING_TIER"
- // "FILTER_VIDEO_SKIPPABLE_SUPPORT"
- // "FILTER_VIDEO_VPAID_SUPPORT"
- // "FILTER_WEEK"
- // "FILTER_YEAR"
- // "FILTER_YOUTUBE_VERTICAL"
- // "FILTER_ZIP_CODE"
- Type string `json:"type,omitempty"`
-
- // Value: Filter value.
- Value string `json:"value,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Type") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Type") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *FilterPair) MarshalJSON() ([]byte, error) {
- type NoMethod FilterPair
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListQueriesResponse: List queries response.
- type ListQueriesResponse struct {
- // Kind: Identifies what kind of resource this is. Value: the fixed
- // string "doubleclickbidmanager#listQueriesResponse".
- Kind string `json:"kind,omitempty"`
-
- // Queries: Retrieved queries.
- Queries []*Query `json:"queries,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Kind") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Kind") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListQueriesResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListQueriesResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ListReportsResponse: List reports response.
- type ListReportsResponse struct {
- // Kind: Identifies what kind of resource this is. Value: the fixed
- // string "doubleclickbidmanager#listReportsResponse".
- Kind string `json:"kind,omitempty"`
-
- // Reports: Retrieved reports.
- Reports []*Report `json:"reports,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Kind") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Kind") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ListReportsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod ListReportsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Parameters: Parameters of a query or report.
- type Parameters struct {
- // Filters: Filters used to match traffic data in your report.
- Filters []*FilterPair `json:"filters,omitempty"`
-
- // GroupBys: Data is grouped by the filters listed in this field.
- //
- // Possible values:
- // "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY"
- // "FILTER_ACTIVITY_ID"
- // "FILTER_ADVERTISER"
- // "FILTER_ADVERTISER_CURRENCY"
- // "FILTER_ADVERTISER_TIMEZONE"
- // "FILTER_AD_POSITION"
- // "FILTER_AGE"
- // "FILTER_AUTHORIZED_SELLER_STATE_ID"
- // "FILTER_BRANDSAFE_CHANNEL_ID"
- // "FILTER_BROWSER"
- // "FILTER_BUDGET_SEGMENT_DESCRIPTION"
- // "FILTER_CAMPAIGN_DAILY_FREQUENCY"
- // "FILTER_CARRIER"
- // "FILTER_CHANNEL_ID"
- // "FILTER_CITY"
- // "FILTER_COMPANION_CREATIVE_ID"
- // "FILTER_CONVERSION_DELAY"
- // "FILTER_COUNTRY"
- // "FILTER_CREATIVE_ATTRIBUTE"
- // "FILTER_CREATIVE_HEIGHT"
- // "FILTER_CREATIVE_ID"
- // "FILTER_CREATIVE_SIZE"
- // "FILTER_CREATIVE_TYPE"
- // "FILTER_CREATIVE_WIDTH"
- // "FILTER_DATA_PROVIDER"
- // "FILTER_DATE"
- // "FILTER_DAY_OF_WEEK"
- // "FILTER_DEVICE_MAKE"
- // "FILTER_DEVICE_MODEL"
- // "FILTER_DEVICE_TYPE"
- // "FILTER_DFP_ORDER_ID"
- // "FILTER_DMA"
- // "FILTER_DV360_ACTIVITY_ID"
- // "FILTER_EXCHANGE_ID"
- // "FILTER_FLOODLIGHT_ACTIVITY_ID"
- // "FILTER_FLOODLIGHT_PIXEL_ID"
- // "FILTER_GENDER"
- // "FILTER_INSERTION_ORDER"
- // "FILTER_INVENTORY_COMMITMENT_TYPE"
- // "FILTER_INVENTORY_DELIVERY_METHOD"
- // "FILTER_INVENTORY_FORMAT"
- // "FILTER_INVENTORY_RATE_TYPE"
- // "FILTER_INVENTORY_SOURCE"
- // "FILTER_INVENTORY_SOURCE_TYPE"
- // "FILTER_KEYWORD"
- // "FILTER_LINE_ITEM"
- // "FILTER_LINE_ITEM_DAILY_FREQUENCY"
- // "FILTER_LINE_ITEM_LIFETIME_FREQUENCY"
- // "FILTER_LINE_ITEM_TYPE"
- // "FILTER_MEDIA_PLAN"
- // "FILTER_MOBILE_DEVICE_MAKE"
- // "FILTER_MOBILE_DEVICE_MAKE_MODEL"
- // "FILTER_MOBILE_DEVICE_TYPE"
- // "FILTER_MOBILE_GEO"
- // "FILTER_MONTH"
- // "FILTER_MRAID_SUPPORT"
- // "FILTER_NIELSEN_AGE"
- // "FILTER_NIELSEN_COUNTRY_CODE"
- // "FILTER_NIELSEN_DEVICE_ID"
- // "FILTER_NIELSEN_GENDER"
- // "FILTER_NOT_SUPPORTED"
- // "FILTER_ORDER_ID"
- // "FILTER_OS"
- // "FILTER_PAGE_CATEGORY"
- // "FILTER_PAGE_LAYOUT"
- // "FILTER_PARTNER"
- // "FILTER_PARTNER_CURRENCY"
- // "FILTER_PUBLIC_INVENTORY"
- // "FILTER_QUARTER"
- // "FILTER_REGION"
- // "FILTER_REGULAR_CHANNEL_ID"
- // "FILTER_SITE_ID"
- // "FILTER_SITE_LANGUAGE"
- // "FILTER_SKIPPABLE_SUPPORT"
- // "FILTER_TARGETED_USER_LIST"
- // "FILTER_TIME_OF_DAY"
- // "FILTER_TRUEVIEW_AD_GROUP_AD_ID"
- // "FILTER_TRUEVIEW_AD_GROUP_ID"
- // "FILTER_TRUEVIEW_AGE"
- // "FILTER_TRUEVIEW_CATEGORY"
- // "FILTER_TRUEVIEW_CITY"
- // "FILTER_TRUEVIEW_CONVERSION_TYPE"
- // "FILTER_TRUEVIEW_COUNTRY"
- // "FILTER_TRUEVIEW_CUSTOM_AFFINITY"
- // "FILTER_TRUEVIEW_DMA"
- // "FILTER_TRUEVIEW_GENDER"
- // "FILTER_TRUEVIEW_IAR_AGE"
- // "FILTER_TRUEVIEW_IAR_CATEGORY"
- // "FILTER_TRUEVIEW_IAR_CITY"
- // "FILTER_TRUEVIEW_IAR_COUNTRY"
- // "FILTER_TRUEVIEW_IAR_GENDER"
- // "FILTER_TRUEVIEW_IAR_INTEREST"
- // "FILTER_TRUEVIEW_IAR_LANGUAGE"
- // "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS"
- // "FILTER_TRUEVIEW_IAR_REGION"
- // "FILTER_TRUEVIEW_IAR_REMARKETING_LIST"
- // "FILTER_TRUEVIEW_IAR_TIME_OF_DAY"
- // "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL"
- // "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO"
- // "FILTER_TRUEVIEW_IAR_ZIPCODE"
- // "FILTER_TRUEVIEW_INTEREST"
- // "FILTER_TRUEVIEW_KEYWORD"
- // "FILTER_TRUEVIEW_PARENTAL_STATUS"
- // "FILTER_TRUEVIEW_PLACEMENT"
- // "FILTER_TRUEVIEW_REGION"
- // "FILTER_TRUEVIEW_REMARKETING_LIST"
- // "FILTER_TRUEVIEW_URL"
- // "FILTER_TRUEVIEW_ZIPCODE"
- // "FILTER_UNKNOWN"
- // "FILTER_USER_LIST"
- // "FILTER_USER_LIST_FIRST_PARTY"
- // "FILTER_USER_LIST_THIRD_PARTY"
- // "FILTER_VIDEO_AD_POSITION_IN_STREAM"
- // "FILTER_VIDEO_COMPANION_SIZE"
- // "FILTER_VIDEO_COMPANION_TYPE"
- // "FILTER_VIDEO_CREATIVE_DURATION"
- // "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE"
- // "FILTER_VIDEO_DURATION_SECONDS"
- // "FILTER_VIDEO_FORMAT_SUPPORT"
- // "FILTER_VIDEO_INVENTORY_TYPE"
- // "FILTER_VIDEO_PLAYER_SIZE"
- // "FILTER_VIDEO_RATING_TIER"
- // "FILTER_VIDEO_SKIPPABLE_SUPPORT"
- // "FILTER_VIDEO_VPAID_SUPPORT"
- // "FILTER_WEEK"
- // "FILTER_YEAR"
- // "FILTER_YOUTUBE_VERTICAL"
- // "FILTER_ZIP_CODE"
- GroupBys []string `json:"groupBys,omitempty"`
-
- // IncludeInviteData: Whether to include data from Invite Media.
- IncludeInviteData bool `json:"includeInviteData,omitempty"`
-
- // Metrics: Metrics to include as columns in your report.
- //
- // Possible values:
- // "METRIC_ACTIVE_VIEW_AUDIBLE_VISIBLE_ON_COMPLETE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"
- // "METRIC_ACTIVE_VIEW_DISTRIBUTION_UNMEASURABLE"
- // "METRIC_ACTIVE_VIEW_DISTRIBUTION_UNVIEWABLE"
- // "METRIC_ACTIVE_VIEW_DISTRIBUTION_VIEWABLE"
- // "METRIC_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_PCT_MEASURABLE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_PCT_VIEWABLE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_AT_START"
- // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_FIRST_QUAR"
- // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_ON_COMPLETE"
- // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_SECOND_QUAR"
- // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_THIRD_QUAR"
- // "METRIC_ACTIVE_VIEW_PERCENT_VIEWABLE_FOR_TIME_THRESHOLD"
- // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_AT_START"
- // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_FIRST_QUAR"
- // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_ON_COMPLETE"
- // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_SECOND_QUAR"
- // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_THIRD_QUAR"
- // "METRIC_ACTIVE_VIEW_UNMEASURABLE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_UNVIEWABLE_IMPRESSIONS"
- // "METRIC_ACTIVE_VIEW_VIEWABLE_FOR_TIME_THRESHOLD"
- // "METRIC_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"
- // "METRIC_BID_REQUESTS"
- // "METRIC_BILLABLE_COST_ADVERTISER"
- // "METRIC_BILLABLE_COST_PARTNER"
- // "METRIC_BILLABLE_COST_USD"
- // "METRIC_CLICKS"
- // "METRIC_CLICK_TO_POST_CLICK_CONVERSION_RATE"
- // "METRIC_CM_POST_CLICK_REVENUE"
- // "METRIC_CM_POST_VIEW_REVENUE"
- // "METRIC_COMSCORE_VCE_AUDIENCE_AVG_FREQUENCY"
- // "METRIC_COMSCORE_VCE_AUDIENCE_IMPRESSIONS"
- // "METRIC_COMSCORE_VCE_AUDIENCE_IMPRESSIONS_SHARE"
- // "METRIC_COMSCORE_VCE_AUDIENCE_REACH_PCT"
- // "METRIC_COMSCORE_VCE_AUDIENCE_SHARE_PCT"
- // "METRIC_COMSCORE_VCE_GROSS_RATING_POINTS"
- // "METRIC_COMSCORE_VCE_POPULATION"
- // "METRIC_COMSCORE_VCE_UNIQUE_AUDIENCE"
- // "METRIC_CONVERSIONS_PER_MILLE"
- // "METRIC_COOKIE_REACH_AVERAGE_IMPRESSION_FREQUENCY"
- // "METRIC_COOKIE_REACH_IMPRESSION_REACH"
- // "METRIC_CPM_FEE1_ADVERTISER"
- // "METRIC_CPM_FEE1_PARTNER"
- // "METRIC_CPM_FEE1_USD"
- // "METRIC_CPM_FEE2_ADVERTISER"
- // "METRIC_CPM_FEE2_PARTNER"
- // "METRIC_CPM_FEE2_USD"
- // "METRIC_CPM_FEE3_ADVERTISER"
- // "METRIC_CPM_FEE3_PARTNER"
- // "METRIC_CPM_FEE3_USD"
- // "METRIC_CPM_FEE4_ADVERTISER"
- // "METRIC_CPM_FEE4_PARTNER"
- // "METRIC_CPM_FEE4_USD"
- // "METRIC_CPM_FEE5_ADVERTISER"
- // "METRIC_CPM_FEE5_PARTNER"
- // "METRIC_CPM_FEE5_USD"
- // "METRIC_CTR"
- // "METRIC_DATA_COST_ADVERTISER"
- // "METRIC_DATA_COST_PARTNER"
- // "METRIC_DATA_COST_USD"
- // "METRIC_DBM_ENGAGEMENT_RATE"
- // "METRIC_FEE10_ADVERTISER"
- // "METRIC_FEE10_PARTNER"
- // "METRIC_FEE10_USD"
- // "METRIC_FEE11_ADVERTISER"
- // "METRIC_FEE11_PARTNER"
- // "METRIC_FEE11_USD"
- // "METRIC_FEE12_ADVERTISER"
- // "METRIC_FEE12_PARTNER"
- // "METRIC_FEE12_USD"
- // "METRIC_FEE13_ADVERTISER"
- // "METRIC_FEE13_PARTNER"
- // "METRIC_FEE13_USD"
- // "METRIC_FEE14_ADVERTISER"
- // "METRIC_FEE14_PARTNER"
- // "METRIC_FEE14_USD"
- // "METRIC_FEE15_ADVERTISER"
- // "METRIC_FEE15_PARTNER"
- // "METRIC_FEE15_USD"
- // "METRIC_FEE16_ADVERTISER"
- // "METRIC_FEE16_PARTNER"
- // "METRIC_FEE16_USD"
- // "METRIC_FEE17_ADVERTISER"
- // "METRIC_FEE17_PARTNER"
- // "METRIC_FEE17_USD"
- // "METRIC_FEE18_ADVERTISER"
- // "METRIC_FEE18_PARTNER"
- // "METRIC_FEE18_USD"
- // "METRIC_FEE19_ADVERTISER"
- // "METRIC_FEE19_PARTNER"
- // "METRIC_FEE19_USD"
- // "METRIC_FEE20_ADVERTISER"
- // "METRIC_FEE20_PARTNER"
- // "METRIC_FEE20_USD"
- // "METRIC_FEE21_ADVERTISER"
- // "METRIC_FEE21_PARTNER"
- // "METRIC_FEE21_USD"
- // "METRIC_FEE22_ADVERTISER"
- // "METRIC_FEE22_PARTNER"
- // "METRIC_FEE22_USD"
- // "METRIC_FEE2_ADVERTISER"
- // "METRIC_FEE2_PARTNER"
- // "METRIC_FEE2_USD"
- // "METRIC_FEE3_ADVERTISER"
- // "METRIC_FEE3_PARTNER"
- // "METRIC_FEE3_USD"
- // "METRIC_FEE4_ADVERTISER"
- // "METRIC_FEE4_PARTNER"
- // "METRIC_FEE4_USD"
- // "METRIC_FEE5_ADVERTISER"
- // "METRIC_FEE5_PARTNER"
- // "METRIC_FEE5_USD"
- // "METRIC_FEE6_ADVERTISER"
- // "METRIC_FEE6_PARTNER"
- // "METRIC_FEE6_USD"
- // "METRIC_FEE7_ADVERTISER"
- // "METRIC_FEE7_PARTNER"
- // "METRIC_FEE7_USD"
- // "METRIC_FEE8_ADVERTISER"
- // "METRIC_FEE8_PARTNER"
- // "METRIC_FEE8_USD"
- // "METRIC_FEE9_ADVERTISER"
- // "METRIC_FEE9_PARTNER"
- // "METRIC_FEE9_USD"
- // "METRIC_FLOODLIGHT_IMPRESSIONS"
- // "METRIC_IMPRESSIONS"
- // "METRIC_IMPRESSIONS_TO_CONVERSION_RATE"
- // "METRIC_LAST_CLICKS"
- // "METRIC_LAST_IMPRESSIONS"
- // "METRIC_MEDIA_COST_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPAPC_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPAPC_PARTNER"
- // "METRIC_MEDIA_COST_ECPAPC_USD"
- // "METRIC_MEDIA_COST_ECPAPV_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPAPV_PARTNER"
- // "METRIC_MEDIA_COST_ECPAPV_USD"
- // "METRIC_MEDIA_COST_ECPA_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPA_PARTNER"
- // "METRIC_MEDIA_COST_ECPA_USD"
- // "METRIC_MEDIA_COST_ECPCV_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPCV_PARTNER"
- // "METRIC_MEDIA_COST_ECPCV_USD"
- // "METRIC_MEDIA_COST_ECPC_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPC_PARTNER"
- // "METRIC_MEDIA_COST_ECPC_USD"
- // "METRIC_MEDIA_COST_ECPM_ADVERTISER"
- // "METRIC_MEDIA_COST_ECPM_PARTNER"
- // "METRIC_MEDIA_COST_ECPM_USD"
- // "METRIC_MEDIA_COST_PARTNER"
- // "METRIC_MEDIA_COST_USD"
- // "METRIC_MEDIA_COST_VIEWABLE_ECPM_ADVERTISER"
- // "METRIC_MEDIA_COST_VIEWABLE_ECPM_PARTNER"
- // "METRIC_MEDIA_COST_VIEWABLE_ECPM_USD"
- // "METRIC_MEDIA_FEE1_ADVERTISER"
- // "METRIC_MEDIA_FEE1_PARTNER"
- // "METRIC_MEDIA_FEE1_USD"
- // "METRIC_MEDIA_FEE2_ADVERTISER"
- // "METRIC_MEDIA_FEE2_PARTNER"
- // "METRIC_MEDIA_FEE2_USD"
- // "METRIC_MEDIA_FEE3_ADVERTISER"
- // "METRIC_MEDIA_FEE3_PARTNER"
- // "METRIC_MEDIA_FEE3_USD"
- // "METRIC_MEDIA_FEE4_ADVERTISER"
- // "METRIC_MEDIA_FEE4_PARTNER"
- // "METRIC_MEDIA_FEE4_USD"
- // "METRIC_MEDIA_FEE5_ADVERTISER"
- // "METRIC_MEDIA_FEE5_PARTNER"
- // "METRIC_MEDIA_FEE5_USD"
- // "METRIC_PIXEL_LOADS"
- // "METRIC_PLATFORM_FEE_ADVERTISER"
- // "METRIC_PLATFORM_FEE_PARTNER"
- // "METRIC_PLATFORM_FEE_USD"
- // "METRIC_POST_CLICK_DFA_REVENUE"
- // "METRIC_POST_VIEW_DFA_REVENUE"
- // "METRIC_PROFIT_ADVERTISER"
- // "METRIC_PROFIT_ECPAPC_ADVERTISER"
- // "METRIC_PROFIT_ECPAPC_PARTNER"
- // "METRIC_PROFIT_ECPAPC_USD"
- // "METRIC_PROFIT_ECPAPV_ADVERTISER"
- // "METRIC_PROFIT_ECPAPV_PARTNER"
- // "METRIC_PROFIT_ECPAPV_USD"
- // "METRIC_PROFIT_ECPA_ADVERTISER"
- // "METRIC_PROFIT_ECPA_PARTNER"
- // "METRIC_PROFIT_ECPA_USD"
- // "METRIC_PROFIT_ECPC_ADVERTISER"
- // "METRIC_PROFIT_ECPC_PARTNER"
- // "METRIC_PROFIT_ECPC_USD"
- // "METRIC_PROFIT_ECPM_ADVERTISER"
- // "METRIC_PROFIT_ECPM_PARTNER"
- // "METRIC_PROFIT_ECPM_USD"
- // "METRIC_PROFIT_MARGIN"
- // "METRIC_PROFIT_PARTNER"
- // "METRIC_PROFIT_USD"
- // "METRIC_PROFIT_VIEWABLE_ECPM_ADVERTISER"
- // "METRIC_PROFIT_VIEWABLE_ECPM_PARTNER"
- // "METRIC_PROFIT_VIEWABLE_ECPM_USD"
- // "METRIC_REACH_COOKIE_FREQUENCY"
- // "METRIC_REACH_COOKIE_REACH"
- // "METRIC_REVENUE_ADVERTISER"
- // "METRIC_REVENUE_ECPAPC_ADVERTISER"
- // "METRIC_REVENUE_ECPAPC_PARTNER"
- // "METRIC_REVENUE_ECPAPC_USD"
- // "METRIC_REVENUE_ECPAPV_ADVERTISER"
- // "METRIC_REVENUE_ECPAPV_PARTNER"
- // "METRIC_REVENUE_ECPAPV_USD"
- // "METRIC_REVENUE_ECPA_ADVERTISER"
- // "METRIC_REVENUE_ECPA_PARTNER"
- // "METRIC_REVENUE_ECPA_USD"
- // "METRIC_REVENUE_ECPCV_ADVERTISER"
- // "METRIC_REVENUE_ECPCV_PARTNER"
- // "METRIC_REVENUE_ECPCV_USD"
- // "METRIC_REVENUE_ECPC_ADVERTISER"
- // "METRIC_REVENUE_ECPC_PARTNER"
- // "METRIC_REVENUE_ECPC_USD"
- // "METRIC_REVENUE_ECPIAVC_ADVERTISER"
- // "METRIC_REVENUE_ECPM_ADVERTISER"
- // "METRIC_REVENUE_ECPM_PARTNER"
- // "METRIC_REVENUE_ECPM_USD"
- // "METRIC_REVENUE_PARTNER"
- // "METRIC_REVENUE_USD"
- // "METRIC_REVENUE_VIEWABLE_ECPM_ADVERTISER"
- // "METRIC_REVENUE_VIEWABLE_ECPM_PARTNER"
- // "METRIC_REVENUE_VIEWABLE_ECPM_USD"
- // "METRIC_RICH_MEDIA_SCROLLS"
- // "METRIC_RICH_MEDIA_VIDEO_COMPLETIONS"
- // "METRIC_RICH_MEDIA_VIDEO_FIRST_QUARTILE_COMPLETES"
- // "METRIC_RICH_MEDIA_VIDEO_FULL_SCREENS"
- // "METRIC_RICH_MEDIA_VIDEO_MIDPOINTS"
- // "METRIC_RICH_MEDIA_VIDEO_MUTES"
- // "METRIC_RICH_MEDIA_VIDEO_PAUSES"
- // "METRIC_RICH_MEDIA_VIDEO_PLAYS"
- // "METRIC_RICH_MEDIA_VIDEO_SKIPS"
- // "METRIC_RICH_MEDIA_VIDEO_THIRD_QUARTILE_COMPLETES"
- // "METRIC_TEA_TRUEVIEW_IMPRESSIONS"
- // "METRIC_TEA_TRUEVIEW_UNIQUE_COOKIES"
- // "METRIC_TEA_TRUEVIEW_UNIQUE_PEOPLE"
- // "METRIC_TOTAL_CONVERSIONS"
- // "METRIC_TOTAL_MEDIA_COST_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPAPC_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPAPC_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_ECPAPC_USD"
- // "METRIC_TOTAL_MEDIA_COST_ECPAPV_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPAPV_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_ECPAPV_USD"
- // "METRIC_TOTAL_MEDIA_COST_ECPA_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPA_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_ECPA_USD"
- // "METRIC_TOTAL_MEDIA_COST_ECPCV_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPCV_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_ECPCV_USD"
- // "METRIC_TOTAL_MEDIA_COST_ECPC_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPC_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_ECPC_USD"
- // "METRIC_TOTAL_MEDIA_COST_ECPM_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_ECPM_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_ECPM_USD"
- // "METRIC_TOTAL_MEDIA_COST_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_USD"
- // "METRIC_TOTAL_MEDIA_COST_VIEWABLE_ECPM_ADVERTISER"
- // "METRIC_TOTAL_MEDIA_COST_VIEWABLE_ECPM_PARTNER"
- // "METRIC_TOTAL_MEDIA_COST_VIEWABLE_ECPM_USD"
- // "METRIC_TRUEVIEW_AVERAGE_CPE_ADVERTISER"
- // "METRIC_TRUEVIEW_AVERAGE_CPE_PARTNER"
- // "METRIC_TRUEVIEW_AVERAGE_CPE_USD"
- // "METRIC_TRUEVIEW_CONVERSION_COST_MANY_PER_VIEW_ADVERTISER"
- // "METRIC_TRUEVIEW_CONVERSION_COST_MANY_PER_VIEW_PARTNER"
- // "METRIC_TRUEVIEW_CONVERSION_COST_MANY_PER_VIEW_USD"
- // "METRIC_TRUEVIEW_CONVERSION_COST_ONE_PER_VIEW_ADVERTISER"
- // "METRIC_TRUEVIEW_CONVERSION_COST_ONE_PER_VIEW_PARTNER"
- // "METRIC_TRUEVIEW_CONVERSION_COST_ONE_PER_VIEW_USD"
- // "METRIC_TRUEVIEW_CONVERSION_MANY_PER_VIEW"
- // "METRIC_TRUEVIEW_CONVERSION_ONE_PER_VIEW"
- // "METRIC_TRUEVIEW_CONVERSION_RATE_ONE_PER_VIEW"
- // "METRIC_TRUEVIEW_CONVERSION_VALUE_MANY_PER_VIEW_ADVERTISER"
- // "METRIC_TRUEVIEW_CONVERSION_VALUE_MANY_PER_VIEW_PARTNER"
- // "METRIC_TRUEVIEW_CONVERSION_VALUE_MANY_PER_VIEW_USD"
- // "METRIC_TRUEVIEW_CONVERSION_VALUE_ONE_PER_VIEW_ADVERTISER"
- // "METRIC_TRUEVIEW_CONVERSION_VALUE_ONE_PER_VIEW_PARTNER"
- // "METRIC_TRUEVIEW_CONVERSION_VALUE_ONE_PER_VIEW_USD"
- // "METRIC_TRUEVIEW_COST_CONVERSION_MANY_PER_VIEW_RATIO"
- // "METRIC_TRUEVIEW_COST_CONVERSION_ONE_PER_VIEW_RATIO"
- // "METRIC_TRUEVIEW_CPV_ADVERTISER"
- // "METRIC_TRUEVIEW_CPV_PARTNER"
- // "METRIC_TRUEVIEW_CPV_USD"
- // "METRIC_TRUEVIEW_EARNED_LIKES"
- // "METRIC_TRUEVIEW_EARNED_PLAYLIST_ADDITIONS"
- // "METRIC_TRUEVIEW_EARNED_SHARES"
- // "METRIC_TRUEVIEW_EARNED_SUBSCRIBERS"
- // "METRIC_TRUEVIEW_EARNED_VIEWS"
- // "METRIC_TRUEVIEW_ENGAGEMENTS"
- // "METRIC_TRUEVIEW_ENGAGEMENT_RATE"
- // "METRIC_TRUEVIEW_IMPRESSION_SHARE"
- // "METRIC_TRUEVIEW_LOST_IS_BUDGET"
- // "METRIC_TRUEVIEW_LOST_IS_RANK"
- // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUE"
- // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUES_ADVERTISER"
- // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUES_PARTNER"
- // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUES_USD"
- // "METRIC_TRUEVIEW_UNIQUE_VIEWERS"
- // "METRIC_TRUEVIEW_VALUE_CONVERSION_MANY_PER_VIEW_RATIO"
- // "METRIC_TRUEVIEW_VALUE_CONVERSION_ONE_PER_VIEW_RATIO"
- // "METRIC_TRUEVIEW_VIEWS"
- // "METRIC_TRUEVIEW_VIEW_RATE"
- // "METRIC_TRUEVIEW_VIEW_THROUGH_CONVERSION"
- // "METRIC_UNIQUE_VISITORS_COOKIES"
- // "METRIC_UNKNOWN"
- // "METRIC_VIDEO_COMPANION_CLICKS"
- // "METRIC_VIDEO_COMPANION_IMPRESSIONS"
- // "METRIC_VIDEO_COMPLETION_RATE"
- // "METRIC_VIEWABLE_BID_REQUESTS"
- Metrics []string `json:"metrics,omitempty"`
-
- // Type: Report type.
- //
- // Possible values:
- // "TYPE_ACTIVE_GRP"
- // "TYPE_AUDIENCE_COMPOSITION"
- // "TYPE_AUDIENCE_PERFORMANCE"
- // "TYPE_CLIENT_SAFE"
- // "TYPE_COMSCORE_VCE"
- // "TYPE_CROSS_FEE"
- // "TYPE_CROSS_PARTNER"
- // "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER"
- // "TYPE_ESTIMATED_CONVERSION"
- // "TYPE_FEE"
- // "TYPE_GENERAL"
- // "TYPE_INVENTORY_AVAILABILITY"
- // "TYPE_KEYWORD"
- // "TYPE_LINEAR_TV_SEARCH_LIFT"
- // "TYPE_NIELSEN_AUDIENCE_PROFILE"
- // "TYPE_NIELSEN_DAILY_REACH_BUILD"
- // "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET"
- // "TYPE_NIELSEN_SITE"
- // "TYPE_NOT_SUPPORTED"
- // "TYPE_ORDER_ID"
- // "TYPE_PAGE_CATEGORY"
- // "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE"
- // "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD"
- // "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET"
- // "TYPE_PIXEL_LOAD"
- // "TYPE_REACH_AND_FREQUENCY"
- // "TYPE_REACH_AUDIENCE"
- // "TYPE_THIRD_PARTY_DATA_PROVIDER"
- // "TYPE_TRUEVIEW"
- // "TYPE_TRUEVIEW_IAR"
- // "TYPE_VERIFICATION"
- // "TYPE_YOUTUBE_VERTICAL"
- Type string `json:"type,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Filters") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Filters") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Parameters) MarshalJSON() ([]byte, error) {
- type NoMethod Parameters
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Query: Represents a query.
- type Query struct {
- // Kind: Identifies what kind of resource this is. Value: the fixed
- // string "doubleclickbidmanager#query".
- Kind string `json:"kind,omitempty"`
-
- // Metadata: Query metadata.
- Metadata *QueryMetadata `json:"metadata,omitempty"`
-
- // Params: Query parameters.
- Params *Parameters `json:"params,omitempty"`
-
- // QueryId: Query ID.
- QueryId int64 `json:"queryId,omitempty,string"`
-
- // ReportDataEndTimeMs: The ending time for the data that is shown in
- // the report. Note, reportDataEndTimeMs is required if
- // metadata.dataRange is CUSTOM_DATES and ignored otherwise.
- ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`
-
- // ReportDataStartTimeMs: The starting time for the data that is shown
- // in the report. Note, reportDataStartTimeMs is required if
- // metadata.dataRange is CUSTOM_DATES and ignored otherwise.
- ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`
-
- // Schedule: Information on how often and when to run a query.
- Schedule *QuerySchedule `json:"schedule,omitempty"`
-
- // TimezoneCode: Canonical timezone code for report data time. Defaults
- // to America/New_York.
- TimezoneCode string `json:"timezoneCode,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "Kind") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Kind") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Query) MarshalJSON() ([]byte, error) {
- type NoMethod Query
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // QueryMetadata: Query metadata.
- type QueryMetadata struct {
- // DataRange: Range of report data.
- //
- // Possible values:
- // "ALL_TIME"
- // "CURRENT_DAY"
- // "CUSTOM_DATES"
- // "LAST_14_DAYS"
- // "LAST_30_DAYS"
- // "LAST_365_DAYS"
- // "LAST_7_DAYS"
- // "LAST_90_DAYS"
- // "MONTH_TO_DATE"
- // "PREVIOUS_DAY"
- // "PREVIOUS_HALF_MONTH"
- // "PREVIOUS_MONTH"
- // "PREVIOUS_QUARTER"
- // "PREVIOUS_WEEK"
- // "PREVIOUS_YEAR"
- // "QUARTER_TO_DATE"
- // "TYPE_NOT_SUPPORTED"
- // "WEEK_TO_DATE"
- // "YEAR_TO_DATE"
- DataRange string `json:"dataRange,omitempty"`
-
- // Format: Format of the generated report.
- //
- // Possible values:
- // "CSV"
- // "EXCEL_CSV"
- // "XLSX"
- Format string `json:"format,omitempty"`
-
- // GoogleCloudStoragePathForLatestReport: The path to the location in
- // Google Cloud Storage where the latest report is stored.
- GoogleCloudStoragePathForLatestReport string `json:"googleCloudStoragePathForLatestReport,omitempty"`
-
- // GoogleDrivePathForLatestReport: The path in Google Drive for the
- // latest report.
- GoogleDrivePathForLatestReport string `json:"googleDrivePathForLatestReport,omitempty"`
-
- // LatestReportRunTimeMs: The time when the latest report started to
- // run.
- LatestReportRunTimeMs int64 `json:"latestReportRunTimeMs,omitempty,string"`
-
- // Locale: Locale of the generated reports. Valid values are cs CZECH de
- // GERMAN en ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko
- // KOREAN pl POLISH pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk
- // UKRAINIAN zh-CN CHINA_CHINESE zh-TW TAIWAN_CHINESE
- //
- // An locale string not in the list above will generate reports in
- // English.
- Locale string `json:"locale,omitempty"`
-
- // ReportCount: Number of reports that have been generated for the
- // query.
- ReportCount int64 `json:"reportCount,omitempty"`
-
- // Running: Whether the latest report is currently running.
- Running bool `json:"running,omitempty"`
-
- // SendNotification: Whether to send an email notification when a report
- // is ready. Default to false.
- SendNotification bool `json:"sendNotification,omitempty"`
-
- // ShareEmailAddress: List of email addresses which are sent email
- // notifications when the report is finished. Separate from
- // sendNotification.
- ShareEmailAddress []string `json:"shareEmailAddress,omitempty"`
-
- // Title: Query title. It is used to name the reports generated from
- // this query.
- Title string `json:"title,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DataRange") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DataRange") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *QueryMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod QueryMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // QuerySchedule: Information on how frequently and when to run a query.
- type QuerySchedule struct {
- // EndTimeMs: Datetime to periodically run the query until.
- EndTimeMs int64 `json:"endTimeMs,omitempty,string"`
-
- // Frequency: How often the query is run.
- //
- // Possible values:
- // "DAILY"
- // "MONTHLY"
- // "ONE_TIME"
- // "QUARTERLY"
- // "SEMI_MONTHLY"
- // "WEEKLY"
- Frequency string `json:"frequency,omitempty"`
-
- // NextRunMinuteOfDay: Time of day at which a new report will be
- // generated, represented as minutes past midnight. Range is 0 to 1439.
- // Only applies to scheduled reports.
- NextRunMinuteOfDay int64 `json:"nextRunMinuteOfDay,omitempty"`
-
- // NextRunTimezoneCode: Canonical timezone code for report generation
- // time. Defaults to America/New_York.
- NextRunTimezoneCode string `json:"nextRunTimezoneCode,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "EndTimeMs") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "EndTimeMs") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *QuerySchedule) MarshalJSON() ([]byte, error) {
- type NoMethod QuerySchedule
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // Report: Represents a report.
- type Report struct {
- // Key: Key used to identify a report.
- Key *ReportKey `json:"key,omitempty"`
-
- // Metadata: Report metadata.
- Metadata *ReportMetadata `json:"metadata,omitempty"`
-
- // Params: Report parameters.
- Params *Parameters `json:"params,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Key") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Key") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *Report) MarshalJSON() ([]byte, error) {
- type NoMethod Report
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReportFailure: An explanation of a report failure.
- type ReportFailure struct {
- // ErrorCode: Error code that shows why the report was not created.
- //
- // Possible values:
- // "AUTHENTICATION_ERROR"
- // "DEPRECATED_REPORTING_INVALID_QUERY"
- // "REPORTING_BUCKET_NOT_FOUND"
- // "REPORTING_CREATE_BUCKET_FAILED"
- // "REPORTING_DELETE_BUCKET_FAILED"
- // "REPORTING_FATAL_ERROR"
- // "REPORTING_ILLEGAL_FILENAME"
- // "REPORTING_IMCOMPATIBLE_METRICS"
- // "REPORTING_INVALID_QUERY_MISSING_PARTNER_AND_ADVERTISER_FILTERS"
- // "REPORTING_INVALID_QUERY_TITLE_MISSING"
- // "REPORTING_INVALID_QUERY_TOO_MANY_UNFILTERED_LARGE_GROUP_BYS"
- // "REPORTING_QUERY_NOT_FOUND"
- // "REPORTING_TRANSIENT_ERROR"
- // "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED"
- // "REPORTING_WRITE_BUCKET_OBJECT_FAILED"
- // "SERVER_ERROR"
- // "UNAUTHORIZED_API_ACCESS"
- // "VALIDATION_ERROR"
- ErrorCode string `json:"errorCode,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "ErrorCode") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "ErrorCode") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReportFailure) MarshalJSON() ([]byte, error) {
- type NoMethod ReportFailure
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReportKey: Key used to identify a report.
- type ReportKey struct {
- // QueryId: Query ID.
- QueryId int64 `json:"queryId,omitempty,string"`
-
- // ReportId: Report ID.
- ReportId int64 `json:"reportId,omitempty,string"`
-
- // ForceSendFields is a list of field names (e.g. "QueryId") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "QueryId") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReportKey) MarshalJSON() ([]byte, error) {
- type NoMethod ReportKey
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReportMetadata: Report metadata.
- type ReportMetadata struct {
- // GoogleCloudStoragePath: The path to the location in Google Cloud
- // Storage where the report is stored.
- GoogleCloudStoragePath string `json:"googleCloudStoragePath,omitempty"`
-
- // ReportDataEndTimeMs: The ending time for the data that is shown in
- // the report.
- ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`
-
- // ReportDataStartTimeMs: The starting time for the data that is shown
- // in the report.
- ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`
-
- // Status: Report status.
- Status *ReportStatus `json:"status,omitempty"`
-
- // ForceSendFields is a list of field names (e.g.
- // "GoogleCloudStoragePath") to unconditionally include in API requests.
- // By default, fields with empty values are omitted from API requests.
- // However, any non-pointer, non-interface field appearing in
- // ForceSendFields will be sent to the server regardless of whether the
- // field is empty or not. This may be used to include empty fields in
- // Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "GoogleCloudStoragePath")
- // to include in API requests with the JSON null value. By default,
- // fields with empty values are omitted from API requests. However, any
- // field with an empty value appearing in NullFields will be sent to the
- // server as null. It is an error if a field in this list has a
- // non-empty value. This may be used to include null fields in Patch
- // requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReportMetadata) MarshalJSON() ([]byte, error) {
- type NoMethod ReportMetadata
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // ReportStatus: Report status.
- type ReportStatus struct {
- // Failure: If the report failed, this records the cause.
- Failure *ReportFailure `json:"failure,omitempty"`
-
- // FinishTimeMs: The time when this report either completed successfully
- // or failed.
- FinishTimeMs int64 `json:"finishTimeMs,omitempty,string"`
-
- // Format: The file type of the report.
- //
- // Possible values:
- // "CSV"
- // "EXCEL_CSV"
- // "XLSX"
- Format string `json:"format,omitempty"`
-
- // State: The state of the report.
- //
- // Possible values:
- // "DONE"
- // "FAILED"
- // "RUNNING"
- State string `json:"state,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Failure") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Failure") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *ReportStatus) MarshalJSON() ([]byte, error) {
- type NoMethod ReportStatus
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RowStatus: Represents the upload status of a row in the request.
- type RowStatus struct {
- // Changed: Whether the stored entity is changed as a result of upload.
- Changed bool `json:"changed,omitempty"`
-
- // EntityId: Entity Id.
- EntityId int64 `json:"entityId,omitempty,string"`
-
- // EntityName: Entity name.
- EntityName string `json:"entityName,omitempty"`
-
- // Errors: Reasons why the entity can't be uploaded.
- Errors []string `json:"errors,omitempty"`
-
- // Persisted: Whether the entity is persisted.
- Persisted bool `json:"persisted,omitempty"`
-
- // RowNumber: Row number.
- RowNumber int64 `json:"rowNumber,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Changed") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Changed") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RowStatus) MarshalJSON() ([]byte, error) {
- type NoMethod RowStatus
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // RunQueryRequest: Request to run a stored query to generate a report.
- type RunQueryRequest struct {
- // DataRange: Report data range used to generate the report.
- //
- // Possible values:
- // "ALL_TIME"
- // "CURRENT_DAY"
- // "CUSTOM_DATES"
- // "LAST_14_DAYS"
- // "LAST_30_DAYS"
- // "LAST_365_DAYS"
- // "LAST_7_DAYS"
- // "LAST_90_DAYS"
- // "MONTH_TO_DATE"
- // "PREVIOUS_DAY"
- // "PREVIOUS_HALF_MONTH"
- // "PREVIOUS_MONTH"
- // "PREVIOUS_QUARTER"
- // "PREVIOUS_WEEK"
- // "PREVIOUS_YEAR"
- // "QUARTER_TO_DATE"
- // "TYPE_NOT_SUPPORTED"
- // "WEEK_TO_DATE"
- // "YEAR_TO_DATE"
- DataRange string `json:"dataRange,omitempty"`
-
- // ReportDataEndTimeMs: The ending time for the data that is shown in
- // the report. Note, reportDataEndTimeMs is required if dataRange is
- // CUSTOM_DATES and ignored otherwise.
- ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`
-
- // ReportDataStartTimeMs: The starting time for the data that is shown
- // in the report. Note, reportDataStartTimeMs is required if dataRange
- // is CUSTOM_DATES and ignored otherwise.
- ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`
-
- // TimezoneCode: Canonical timezone code for report data time. Defaults
- // to America/New_York.
- TimezoneCode string `json:"timezoneCode,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DataRange") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DataRange") to include in
- // API requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
- type NoMethod RunQueryRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // UploadLineItemsRequest: Request to upload line items.
- type UploadLineItemsRequest struct {
- // DryRun: Set to true to get upload status without actually persisting
- // the line items.
- DryRun bool `json:"dryRun,omitempty"`
-
- // Format: Format the line items are in. Default to CSV.
- //
- // Possible values:
- // "CSV"
- Format string `json:"format,omitempty"`
-
- // LineItems: Line items in CSV to upload. Refer to Entity Write File
- // Format for more information on file format.
- LineItems string `json:"lineItems,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "DryRun") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "DryRun") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *UploadLineItemsRequest) MarshalJSON() ([]byte, error) {
- type NoMethod UploadLineItemsRequest
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // UploadLineItemsResponse: Upload line items response.
- type UploadLineItemsResponse struct {
- // UploadStatus: Status of upload.
- UploadStatus *UploadStatus `json:"uploadStatus,omitempty"`
-
- // ServerResponse contains the HTTP response code and headers from the
- // server.
- googleapi.ServerResponse `json:"-"`
-
- // ForceSendFields is a list of field names (e.g. "UploadStatus") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "UploadStatus") to include
- // in API requests with the JSON null value. By default, fields with
- // empty values are omitted from API requests. However, any field with
- // an empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *UploadLineItemsResponse) MarshalJSON() ([]byte, error) {
- type NoMethod UploadLineItemsResponse
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // UploadStatus: Represents the status of upload.
- type UploadStatus struct {
- // Errors: Reasons why upload can't be completed.
- Errors []string `json:"errors,omitempty"`
-
- // RowStatus: Per-row upload status.
- RowStatus []*RowStatus `json:"rowStatus,omitempty"`
-
- // ForceSendFields is a list of field names (e.g. "Errors") to
- // unconditionally include in API requests. By default, fields with
- // empty values are omitted from API requests. However, any non-pointer,
- // non-interface field appearing in ForceSendFields will be sent to the
- // server regardless of whether the field is empty or not. This may be
- // used to include empty fields in Patch requests.
- ForceSendFields []string `json:"-"`
-
- // NullFields is a list of field names (e.g. "Errors") to include in API
- // requests with the JSON null value. By default, fields with empty
- // values are omitted from API requests. However, any field with an
- // empty value appearing in NullFields will be sent to the server as
- // null. It is an error if a field in this list has a non-empty value.
- // This may be used to include null fields in Patch requests.
- NullFields []string `json:"-"`
- }
-
- func (s *UploadStatus) MarshalJSON() ([]byte, error) {
- type NoMethod UploadStatus
- raw := NoMethod(*s)
- return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
- }
-
- // method id "doubleclickbidmanager.lineitems.downloadlineitems":
-
- type LineitemsDownloadlineitemsCall struct {
- s *Service
- downloadlineitemsrequest *DownloadLineItemsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Downloadlineitems: Retrieves line items in CSV format. TrueView line
- // items are not supported.
- func (r *LineitemsService) Downloadlineitems(downloadlineitemsrequest *DownloadLineItemsRequest) *LineitemsDownloadlineitemsCall {
- c := &LineitemsDownloadlineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.downloadlineitemsrequest = downloadlineitemsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *LineitemsDownloadlineitemsCall) Fields(s ...googleapi.Field) *LineitemsDownloadlineitemsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *LineitemsDownloadlineitemsCall) Context(ctx context.Context) *LineitemsDownloadlineitemsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *LineitemsDownloadlineitemsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *LineitemsDownloadlineitemsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.downloadlineitemsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "lineitems/downloadlineitems")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.lineitems.downloadlineitems" call.
- // Exactly one of *DownloadLineItemsResponse or error will be non-nil.
- // Any non-2xx status code is an error. Response headers are in either
- // *DownloadLineItemsResponse.ServerResponse.Header or (if a response
- // was returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *LineitemsDownloadlineitemsCall) Do(opts ...googleapi.CallOption) (*DownloadLineItemsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &DownloadLineItemsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Retrieves line items in CSV format. TrueView line items are not supported.",
- // "httpMethod": "POST",
- // "id": "doubleclickbidmanager.lineitems.downloadlineitems",
- // "path": "lineitems/downloadlineitems",
- // "request": {
- // "$ref": "DownloadLineItemsRequest"
- // },
- // "response": {
- // "$ref": "DownloadLineItemsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.lineitems.uploadlineitems":
-
- type LineitemsUploadlineitemsCall struct {
- s *Service
- uploadlineitemsrequest *UploadLineItemsRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Uploadlineitems: Uploads line items in CSV format. TrueView line
- // items are not supported.
- func (r *LineitemsService) Uploadlineitems(uploadlineitemsrequest *UploadLineItemsRequest) *LineitemsUploadlineitemsCall {
- c := &LineitemsUploadlineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.uploadlineitemsrequest = uploadlineitemsrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *LineitemsUploadlineitemsCall) Fields(s ...googleapi.Field) *LineitemsUploadlineitemsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *LineitemsUploadlineitemsCall) Context(ctx context.Context) *LineitemsUploadlineitemsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *LineitemsUploadlineitemsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *LineitemsUploadlineitemsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadlineitemsrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "lineitems/uploadlineitems")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.lineitems.uploadlineitems" call.
- // Exactly one of *UploadLineItemsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *UploadLineItemsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *LineitemsUploadlineitemsCall) Do(opts ...googleapi.CallOption) (*UploadLineItemsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &UploadLineItemsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Uploads line items in CSV format. TrueView line items are not supported.",
- // "httpMethod": "POST",
- // "id": "doubleclickbidmanager.lineitems.uploadlineitems",
- // "path": "lineitems/uploadlineitems",
- // "request": {
- // "$ref": "UploadLineItemsRequest"
- // },
- // "response": {
- // "$ref": "UploadLineItemsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.queries.createquery":
-
- type QueriesCreatequeryCall struct {
- s *Service
- query *Query
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Createquery: Creates a query.
- func (r *QueriesService) Createquery(query *Query) *QueriesCreatequeryCall {
- c := &QueriesCreatequeryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.query = query
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *QueriesCreatequeryCall) Fields(s ...googleapi.Field) *QueriesCreatequeryCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *QueriesCreatequeryCall) Context(ctx context.Context) *QueriesCreatequeryCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *QueriesCreatequeryCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *QueriesCreatequeryCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.query)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "query")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.queries.createquery" call.
- // Exactly one of *Query or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Query.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *QueriesCreatequeryCall) Do(opts ...googleapi.CallOption) (*Query, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Query{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Creates a query.",
- // "httpMethod": "POST",
- // "id": "doubleclickbidmanager.queries.createquery",
- // "path": "query",
- // "request": {
- // "$ref": "Query"
- // },
- // "response": {
- // "$ref": "Query"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.queries.deletequery":
-
- type QueriesDeletequeryCall struct {
- s *Service
- queryId int64
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Deletequery: Deletes a stored query as well as the associated stored
- // reports.
- func (r *QueriesService) Deletequery(queryId int64) *QueriesDeletequeryCall {
- c := &QueriesDeletequeryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.queryId = queryId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *QueriesDeletequeryCall) Fields(s ...googleapi.Field) *QueriesDeletequeryCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *QueriesDeletequeryCall) Context(ctx context.Context) *QueriesDeletequeryCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *QueriesDeletequeryCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *QueriesDeletequeryCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("DELETE", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "queryId": strconv.FormatInt(c.queryId, 10),
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.queries.deletequery" call.
- func (c *QueriesDeletequeryCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Deletes a stored query as well as the associated stored reports.",
- // "httpMethod": "DELETE",
- // "id": "doubleclickbidmanager.queries.deletequery",
- // "parameterOrder": [
- // "queryId"
- // ],
- // "parameters": {
- // "queryId": {
- // "description": "Query ID to delete.",
- // "format": "int64",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "query/{queryId}",
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.queries.getquery":
-
- type QueriesGetqueryCall struct {
- s *Service
- queryId int64
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Getquery: Retrieves a stored query.
- func (r *QueriesService) Getquery(queryId int64) *QueriesGetqueryCall {
- c := &QueriesGetqueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.queryId = queryId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *QueriesGetqueryCall) Fields(s ...googleapi.Field) *QueriesGetqueryCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *QueriesGetqueryCall) IfNoneMatch(entityTag string) *QueriesGetqueryCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *QueriesGetqueryCall) Context(ctx context.Context) *QueriesGetqueryCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *QueriesGetqueryCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *QueriesGetqueryCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "queryId": strconv.FormatInt(c.queryId, 10),
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.queries.getquery" call.
- // Exactly one of *Query or error will be non-nil. Any non-2xx status
- // code is an error. Response headers are in either
- // *Query.ServerResponse.Header or (if a response was returned at all)
- // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
- // check whether the returned error was because http.StatusNotModified
- // was returned.
- func (c *QueriesGetqueryCall) Do(opts ...googleapi.CallOption) (*Query, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &Query{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Retrieves a stored query.",
- // "httpMethod": "GET",
- // "id": "doubleclickbidmanager.queries.getquery",
- // "parameterOrder": [
- // "queryId"
- // ],
- // "parameters": {
- // "queryId": {
- // "description": "Query ID to retrieve.",
- // "format": "int64",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "query/{queryId}",
- // "response": {
- // "$ref": "Query"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.queries.listqueries":
-
- type QueriesListqueriesCall struct {
- s *Service
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Listqueries: Retrieves stored queries.
- func (r *QueriesService) Listqueries() *QueriesListqueriesCall {
- c := &QueriesListqueriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *QueriesListqueriesCall) Fields(s ...googleapi.Field) *QueriesListqueriesCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *QueriesListqueriesCall) IfNoneMatch(entityTag string) *QueriesListqueriesCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *QueriesListqueriesCall) Context(ctx context.Context) *QueriesListqueriesCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *QueriesListqueriesCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *QueriesListqueriesCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "queries")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.queries.listqueries" call.
- // Exactly one of *ListQueriesResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListQueriesResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *QueriesListqueriesCall) Do(opts ...googleapi.CallOption) (*ListQueriesResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListQueriesResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Retrieves stored queries.",
- // "httpMethod": "GET",
- // "id": "doubleclickbidmanager.queries.listqueries",
- // "path": "queries",
- // "response": {
- // "$ref": "ListQueriesResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.queries.runquery":
-
- type QueriesRunqueryCall struct {
- s *Service
- queryId int64
- runqueryrequest *RunQueryRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Runquery: Runs a stored query to generate a report.
- func (r *QueriesService) Runquery(queryId int64, runqueryrequest *RunQueryRequest) *QueriesRunqueryCall {
- c := &QueriesRunqueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.queryId = queryId
- c.runqueryrequest = runqueryrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *QueriesRunqueryCall) Fields(s ...googleapi.Field) *QueriesRunqueryCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *QueriesRunqueryCall) Context(ctx context.Context) *QueriesRunqueryCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *QueriesRunqueryCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *QueriesRunqueryCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "queryId": strconv.FormatInt(c.queryId, 10),
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.queries.runquery" call.
- func (c *QueriesRunqueryCall) Do(opts ...googleapi.CallOption) error {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if err != nil {
- return err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return err
- }
- return nil
- // {
- // "description": "Runs a stored query to generate a report.",
- // "httpMethod": "POST",
- // "id": "doubleclickbidmanager.queries.runquery",
- // "parameterOrder": [
- // "queryId"
- // ],
- // "parameters": {
- // "queryId": {
- // "description": "Query ID to run.",
- // "format": "int64",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "query/{queryId}",
- // "request": {
- // "$ref": "RunQueryRequest"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.reports.listreports":
-
- type ReportsListreportsCall struct {
- s *Service
- queryId int64
- urlParams_ gensupport.URLParams
- ifNoneMatch_ string
- ctx_ context.Context
- header_ http.Header
- }
-
- // Listreports: Retrieves stored reports.
- func (r *ReportsService) Listreports(queryId int64) *ReportsListreportsCall {
- c := &ReportsListreportsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.queryId = queryId
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *ReportsListreportsCall) Fields(s ...googleapi.Field) *ReportsListreportsCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // IfNoneMatch sets the optional parameter which makes the operation
- // fail if the object's ETag matches the given value. This is useful for
- // getting updates only after the object has changed since the last
- // request. Use googleapi.IsNotModified to check whether the response
- // error from Do is the result of In-None-Match.
- func (c *ReportsListreportsCall) IfNoneMatch(entityTag string) *ReportsListreportsCall {
- c.ifNoneMatch_ = entityTag
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *ReportsListreportsCall) Context(ctx context.Context) *ReportsListreportsCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *ReportsListreportsCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *ReportsListreportsCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- if c.ifNoneMatch_ != "" {
- reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
- }
- var body io.Reader = nil
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "queries/{queryId}/reports")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("GET", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- googleapi.Expand(req.URL, map[string]string{
- "queryId": strconv.FormatInt(c.queryId, 10),
- })
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.reports.listreports" call.
- // Exactly one of *ListReportsResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *ListReportsResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *ReportsListreportsCall) Do(opts ...googleapi.CallOption) (*ListReportsResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &ListReportsResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Retrieves stored reports.",
- // "httpMethod": "GET",
- // "id": "doubleclickbidmanager.reports.listreports",
- // "parameterOrder": [
- // "queryId"
- // ],
- // "parameters": {
- // "queryId": {
- // "description": "Query ID with which the reports are associated.",
- // "format": "int64",
- // "location": "path",
- // "required": true,
- // "type": "string"
- // }
- // },
- // "path": "queries/{queryId}/reports",
- // "response": {
- // "$ref": "ListReportsResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
-
- // method id "doubleclickbidmanager.sdf.download":
-
- type SdfDownloadCall struct {
- s *Service
- downloadrequest *DownloadRequest
- urlParams_ gensupport.URLParams
- ctx_ context.Context
- header_ http.Header
- }
-
- // Download: Retrieves entities in SDF format.
- func (r *SdfService) Download(downloadrequest *DownloadRequest) *SdfDownloadCall {
- c := &SdfDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
- c.downloadrequest = downloadrequest
- return c
- }
-
- // Fields allows partial responses to be retrieved. See
- // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
- // for more information.
- func (c *SdfDownloadCall) Fields(s ...googleapi.Field) *SdfDownloadCall {
- c.urlParams_.Set("fields", googleapi.CombineFields(s))
- return c
- }
-
- // Context sets the context to be used in this call's Do method. Any
- // pending HTTP request will be aborted if the provided context is
- // canceled.
- func (c *SdfDownloadCall) Context(ctx context.Context) *SdfDownloadCall {
- c.ctx_ = ctx
- return c
- }
-
- // Header returns an http.Header that can be modified by the caller to
- // add HTTP headers to the request.
- func (c *SdfDownloadCall) Header() http.Header {
- if c.header_ == nil {
- c.header_ = make(http.Header)
- }
- return c.header_
- }
-
- func (c *SdfDownloadCall) doRequest(alt string) (*http.Response, error) {
- reqHeaders := make(http.Header)
- for k, v := range c.header_ {
- reqHeaders[k] = v
- }
- reqHeaders.Set("User-Agent", c.s.userAgent())
- var body io.Reader = nil
- body, err := googleapi.WithoutDataWrapper.JSONReader(c.downloadrequest)
- if err != nil {
- return nil, err
- }
- reqHeaders.Set("Content-Type", "application/json")
- c.urlParams_.Set("alt", alt)
- c.urlParams_.Set("prettyPrint", "false")
- urls := googleapi.ResolveRelative(c.s.BasePath, "sdf/download")
- urls += "?" + c.urlParams_.Encode()
- req, err := http.NewRequest("POST", urls, body)
- if err != nil {
- return nil, err
- }
- req.Header = reqHeaders
- return gensupport.SendRequest(c.ctx_, c.s.client, req)
- }
-
- // Do executes the "doubleclickbidmanager.sdf.download" call.
- // Exactly one of *DownloadResponse or error will be non-nil. Any
- // non-2xx status code is an error. Response headers are in either
- // *DownloadResponse.ServerResponse.Header or (if a response was
- // returned at all) in error.(*googleapi.Error).Header. Use
- // googleapi.IsNotModified to check whether the returned error was
- // because http.StatusNotModified was returned.
- func (c *SdfDownloadCall) Do(opts ...googleapi.CallOption) (*DownloadResponse, error) {
- gensupport.SetOptions(c.urlParams_, opts...)
- res, err := c.doRequest("json")
- if res != nil && res.StatusCode == http.StatusNotModified {
- if res.Body != nil {
- res.Body.Close()
- }
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- }
- }
- if err != nil {
- return nil, err
- }
- defer googleapi.CloseBody(res)
- if err := googleapi.CheckResponse(res); err != nil {
- return nil, err
- }
- ret := &DownloadResponse{
- ServerResponse: googleapi.ServerResponse{
- Header: res.Header,
- HTTPStatusCode: res.StatusCode,
- },
- }
- target := &ret
- if err := gensupport.DecodeResponse(target, res); err != nil {
- return nil, err
- }
- return ret, nil
- // {
- // "description": "Retrieves entities in SDF format.",
- // "httpMethod": "POST",
- // "id": "doubleclickbidmanager.sdf.download",
- // "path": "sdf/download",
- // "request": {
- // "$ref": "DownloadRequest"
- // },
- // "response": {
- // "$ref": "DownloadResponse"
- // },
- // "scopes": [
- // "https://www.googleapis.com/auth/doubleclickbidmanager"
- // ]
- // }
-
- }
|