You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2844 rivejä
96 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package doubleclickbidmanager provides access to the DoubleClick Bid Manager API.
  6. //
  7. // For product documentation, see: https://developers.google.com/bid-manager/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/doubleclickbidmanager/v1"
  14. // ...
  15. // ctx := context.Background()
  16. // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  25. //
  26. // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx, option.WithAPIKey("AIza..."))
  27. //
  28. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  29. //
  30. // config := &oauth2.Config{...}
  31. // // ...
  32. // token, err := config.Exchange(ctx, ...)
  33. // doubleclickbidmanagerService, err := doubleclickbidmanager.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  34. //
  35. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  36. package doubleclickbidmanager // import "google.golang.org/api/doubleclickbidmanager/v1"
  37. import (
  38. "bytes"
  39. "context"
  40. "encoding/json"
  41. "errors"
  42. "fmt"
  43. "io"
  44. "net/http"
  45. "net/url"
  46. "strconv"
  47. "strings"
  48. gensupport "google.golang.org/api/gensupport"
  49. googleapi "google.golang.org/api/googleapi"
  50. option "google.golang.org/api/option"
  51. htransport "google.golang.org/api/transport/http"
  52. )
  53. // Always reference these packages, just in case the auto-generated code
  54. // below doesn't.
  55. var _ = bytes.NewBuffer
  56. var _ = strconv.Itoa
  57. var _ = fmt.Sprintf
  58. var _ = json.NewDecoder
  59. var _ = io.Copy
  60. var _ = url.Parse
  61. var _ = gensupport.MarshalJSON
  62. var _ = googleapi.Version
  63. var _ = errors.New
  64. var _ = strings.Replace
  65. var _ = context.Canceled
  66. const apiId = "doubleclickbidmanager:v1"
  67. const apiName = "doubleclickbidmanager"
  68. const apiVersion = "v1"
  69. const basePath = "https://www.googleapis.com/doubleclickbidmanager/v1/"
  70. // OAuth2 scopes used by this API.
  71. const (
  72. // View and manage your reports in DoubleClick Bid Manager
  73. DoubleclickbidmanagerScope = "https://www.googleapis.com/auth/doubleclickbidmanager"
  74. )
  75. // NewService creates a new Service.
  76. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  77. scopesOption := option.WithScopes(
  78. "https://www.googleapis.com/auth/doubleclickbidmanager",
  79. )
  80. // NOTE: prepend, so we don't override user-specified scopes.
  81. opts = append([]option.ClientOption{scopesOption}, opts...)
  82. client, endpoint, err := htransport.NewClient(ctx, opts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. s, err := New(client)
  87. if err != nil {
  88. return nil, err
  89. }
  90. if endpoint != "" {
  91. s.BasePath = endpoint
  92. }
  93. return s, nil
  94. }
  95. // New creates a new Service. It uses the provided http.Client for requests.
  96. //
  97. // Deprecated: please use NewService instead.
  98. // To provide a custom HTTP client, use option.WithHTTPClient.
  99. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  100. func New(client *http.Client) (*Service, error) {
  101. if client == nil {
  102. return nil, errors.New("client is nil")
  103. }
  104. s := &Service{client: client, BasePath: basePath}
  105. s.Lineitems = NewLineitemsService(s)
  106. s.Queries = NewQueriesService(s)
  107. s.Reports = NewReportsService(s)
  108. s.Sdf = NewSdfService(s)
  109. return s, nil
  110. }
  111. type Service struct {
  112. client *http.Client
  113. BasePath string // API endpoint base URL
  114. UserAgent string // optional additional User-Agent fragment
  115. Lineitems *LineitemsService
  116. Queries *QueriesService
  117. Reports *ReportsService
  118. Sdf *SdfService
  119. }
  120. func (s *Service) userAgent() string {
  121. if s.UserAgent == "" {
  122. return googleapi.UserAgent
  123. }
  124. return googleapi.UserAgent + " " + s.UserAgent
  125. }
  126. func NewLineitemsService(s *Service) *LineitemsService {
  127. rs := &LineitemsService{s: s}
  128. return rs
  129. }
  130. type LineitemsService struct {
  131. s *Service
  132. }
  133. func NewQueriesService(s *Service) *QueriesService {
  134. rs := &QueriesService{s: s}
  135. return rs
  136. }
  137. type QueriesService struct {
  138. s *Service
  139. }
  140. func NewReportsService(s *Service) *ReportsService {
  141. rs := &ReportsService{s: s}
  142. return rs
  143. }
  144. type ReportsService struct {
  145. s *Service
  146. }
  147. func NewSdfService(s *Service) *SdfService {
  148. rs := &SdfService{s: s}
  149. return rs
  150. }
  151. type SdfService struct {
  152. s *Service
  153. }
  154. // DownloadLineItemsRequest: Request to fetch stored line items.
  155. type DownloadLineItemsRequest struct {
  156. // FileSpec: File specification (column names, types, order) in which
  157. // the line items will be returned. Default to EWF.
  158. //
  159. // Possible values:
  160. // "EWF"
  161. FileSpec string `json:"fileSpec,omitempty"`
  162. // FilterIds: Ids of the specified filter type used to filter line items
  163. // to fetch. If omitted, all the line items will be returned.
  164. FilterIds googleapi.Int64s `json:"filterIds,omitempty"`
  165. // FilterType: Filter type used to filter line items to fetch.
  166. //
  167. // Possible values:
  168. // "ADVERTISER_ID"
  169. // "INSERTION_ORDER_ID"
  170. // "LINE_ITEM_ID"
  171. FilterType string `json:"filterType,omitempty"`
  172. // Format: Format in which the line items will be returned. Default to
  173. // CSV.
  174. //
  175. // Possible values:
  176. // "CSV"
  177. Format string `json:"format,omitempty"`
  178. // ForceSendFields is a list of field names (e.g. "FileSpec") to
  179. // unconditionally include in API requests. By default, fields with
  180. // empty values are omitted from API requests. However, any non-pointer,
  181. // non-interface field appearing in ForceSendFields will be sent to the
  182. // server regardless of whether the field is empty or not. This may be
  183. // used to include empty fields in Patch requests.
  184. ForceSendFields []string `json:"-"`
  185. // NullFields is a list of field names (e.g. "FileSpec") to include in
  186. // API requests with the JSON null value. By default, fields with empty
  187. // values are omitted from API requests. However, any field with an
  188. // empty value appearing in NullFields will be sent to the server as
  189. // null. It is an error if a field in this list has a non-empty value.
  190. // This may be used to include null fields in Patch requests.
  191. NullFields []string `json:"-"`
  192. }
  193. func (s *DownloadLineItemsRequest) MarshalJSON() ([]byte, error) {
  194. type NoMethod DownloadLineItemsRequest
  195. raw := NoMethod(*s)
  196. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  197. }
  198. // DownloadLineItemsResponse: Download line items response.
  199. type DownloadLineItemsResponse struct {
  200. // LineItems: Retrieved line items in CSV format. For more information
  201. // about file formats, see Entity Write File Format.
  202. LineItems string `json:"lineItems,omitempty"`
  203. // ServerResponse contains the HTTP response code and headers from the
  204. // server.
  205. googleapi.ServerResponse `json:"-"`
  206. // ForceSendFields is a list of field names (e.g. "LineItems") to
  207. // unconditionally include in API requests. By default, fields with
  208. // empty values are omitted from API requests. However, any non-pointer,
  209. // non-interface field appearing in ForceSendFields will be sent to the
  210. // server regardless of whether the field is empty or not. This may be
  211. // used to include empty fields in Patch requests.
  212. ForceSendFields []string `json:"-"`
  213. // NullFields is a list of field names (e.g. "LineItems") to include in
  214. // API requests with the JSON null value. By default, fields with empty
  215. // values are omitted from API requests. However, any field with an
  216. // empty value appearing in NullFields will be sent to the server as
  217. // null. It is an error if a field in this list has a non-empty value.
  218. // This may be used to include null fields in Patch requests.
  219. NullFields []string `json:"-"`
  220. }
  221. func (s *DownloadLineItemsResponse) MarshalJSON() ([]byte, error) {
  222. type NoMethod DownloadLineItemsResponse
  223. raw := NoMethod(*s)
  224. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  225. }
  226. // DownloadRequest: Request to fetch stored inventory sources,
  227. // campaigns, insertion orders, line items, TrueView ad groups and ads.
  228. type DownloadRequest struct {
  229. // FileTypes: File types that will be returned.
  230. //
  231. // Acceptable values are:
  232. // - "AD"
  233. // - "AD_GROUP"
  234. // - "CAMPAIGN"
  235. // - "INSERTION_ORDER"
  236. // - "LINE_ITEM"
  237. // - "INVENTORY_SOURCE"
  238. //
  239. // Possible values:
  240. // "AD"
  241. // "AD_GROUP"
  242. // "CAMPAIGN"
  243. // "INSERTION_ORDER"
  244. // "INVENTORY_SOURCE"
  245. // "LINE_ITEM"
  246. FileTypes []string `json:"fileTypes,omitempty"`
  247. // FilterIds: The IDs of the specified filter type. This is used to
  248. // filter entities to fetch. At least one ID must be specified.
  249. FilterIds googleapi.Int64s `json:"filterIds,omitempty"`
  250. // FilterType: Filter type used to filter entities to fetch.
  251. //
  252. // Possible values:
  253. // "ADVERTISER_ID"
  254. // "CAMPAIGN_ID"
  255. // "INSERTION_ORDER_ID"
  256. // "INVENTORY_SOURCE_ID"
  257. // "LINE_ITEM_ID"
  258. // "PARTNER_ID"
  259. FilterType string `json:"filterType,omitempty"`
  260. // Version: SDF Version (column names, types, order) in which the
  261. // entities will be returned. Default to 3.1.
  262. Version string `json:"version,omitempty"`
  263. // ForceSendFields is a list of field names (e.g. "FileTypes") to
  264. // unconditionally include in API requests. By default, fields with
  265. // empty values are omitted from API requests. However, any non-pointer,
  266. // non-interface field appearing in ForceSendFields will be sent to the
  267. // server regardless of whether the field is empty or not. This may be
  268. // used to include empty fields in Patch requests.
  269. ForceSendFields []string `json:"-"`
  270. // NullFields is a list of field names (e.g. "FileTypes") to include in
  271. // API requests with the JSON null value. By default, fields with empty
  272. // values are omitted from API requests. However, any field with an
  273. // empty value appearing in NullFields will be sent to the server as
  274. // null. It is an error if a field in this list has a non-empty value.
  275. // This may be used to include null fields in Patch requests.
  276. NullFields []string `json:"-"`
  277. }
  278. func (s *DownloadRequest) MarshalJSON() ([]byte, error) {
  279. type NoMethod DownloadRequest
  280. raw := NoMethod(*s)
  281. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  282. }
  283. // DownloadResponse: Download response.
  284. type DownloadResponse struct {
  285. // AdGroups: Retrieved ad groups in SDF format.
  286. AdGroups string `json:"adGroups,omitempty"`
  287. // Ads: Retrieved ads in SDF format.
  288. Ads string `json:"ads,omitempty"`
  289. // Campaigns: Retrieved campaigns in SDF format.
  290. Campaigns string `json:"campaigns,omitempty"`
  291. // InsertionOrders: Retrieved insertion orders in SDF format.
  292. InsertionOrders string `json:"insertionOrders,omitempty"`
  293. InventorySources string `json:"inventorySources,omitempty"`
  294. // LineItems: Retrieved line items in SDF format.
  295. LineItems string `json:"lineItems,omitempty"`
  296. // ServerResponse contains the HTTP response code and headers from the
  297. // server.
  298. googleapi.ServerResponse `json:"-"`
  299. // ForceSendFields is a list of field names (e.g. "AdGroups") to
  300. // unconditionally include in API requests. By default, fields with
  301. // empty values are omitted from API requests. However, any non-pointer,
  302. // non-interface field appearing in ForceSendFields will be sent to the
  303. // server regardless of whether the field is empty or not. This may be
  304. // used to include empty fields in Patch requests.
  305. ForceSendFields []string `json:"-"`
  306. // NullFields is a list of field names (e.g. "AdGroups") to include in
  307. // API requests with the JSON null value. By default, fields with empty
  308. // values are omitted from API requests. However, any field with an
  309. // empty value appearing in NullFields will be sent to the server as
  310. // null. It is an error if a field in this list has a non-empty value.
  311. // This may be used to include null fields in Patch requests.
  312. NullFields []string `json:"-"`
  313. }
  314. func (s *DownloadResponse) MarshalJSON() ([]byte, error) {
  315. type NoMethod DownloadResponse
  316. raw := NoMethod(*s)
  317. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  318. }
  319. // FilterPair: Filter used to match traffic data in your report.
  320. type FilterPair struct {
  321. // Type: Filter type.
  322. //
  323. // Possible values:
  324. // "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY"
  325. // "FILTER_ACTIVITY_ID"
  326. // "FILTER_ADVERTISER"
  327. // "FILTER_ADVERTISER_CURRENCY"
  328. // "FILTER_ADVERTISER_TIMEZONE"
  329. // "FILTER_AD_POSITION"
  330. // "FILTER_AGE"
  331. // "FILTER_AUTHORIZED_SELLER_STATE_ID"
  332. // "FILTER_BRANDSAFE_CHANNEL_ID"
  333. // "FILTER_BROWSER"
  334. // "FILTER_BUDGET_SEGMENT_DESCRIPTION"
  335. // "FILTER_CAMPAIGN_DAILY_FREQUENCY"
  336. // "FILTER_CARRIER"
  337. // "FILTER_CHANNEL_ID"
  338. // "FILTER_CITY"
  339. // "FILTER_COMPANION_CREATIVE_ID"
  340. // "FILTER_CONVERSION_DELAY"
  341. // "FILTER_COUNTRY"
  342. // "FILTER_CREATIVE_ATTRIBUTE"
  343. // "FILTER_CREATIVE_HEIGHT"
  344. // "FILTER_CREATIVE_ID"
  345. // "FILTER_CREATIVE_SIZE"
  346. // "FILTER_CREATIVE_TYPE"
  347. // "FILTER_CREATIVE_WIDTH"
  348. // "FILTER_DATA_PROVIDER"
  349. // "FILTER_DATE"
  350. // "FILTER_DAY_OF_WEEK"
  351. // "FILTER_DEVICE_MAKE"
  352. // "FILTER_DEVICE_MODEL"
  353. // "FILTER_DEVICE_TYPE"
  354. // "FILTER_DFP_ORDER_ID"
  355. // "FILTER_DMA"
  356. // "FILTER_DV360_ACTIVITY_ID"
  357. // "FILTER_EXCHANGE_ID"
  358. // "FILTER_FLOODLIGHT_ACTIVITY_ID"
  359. // "FILTER_FLOODLIGHT_PIXEL_ID"
  360. // "FILTER_GENDER"
  361. // "FILTER_INSERTION_ORDER"
  362. // "FILTER_INVENTORY_COMMITMENT_TYPE"
  363. // "FILTER_INVENTORY_DELIVERY_METHOD"
  364. // "FILTER_INVENTORY_FORMAT"
  365. // "FILTER_INVENTORY_RATE_TYPE"
  366. // "FILTER_INVENTORY_SOURCE"
  367. // "FILTER_INVENTORY_SOURCE_TYPE"
  368. // "FILTER_KEYWORD"
  369. // "FILTER_LINE_ITEM"
  370. // "FILTER_LINE_ITEM_DAILY_FREQUENCY"
  371. // "FILTER_LINE_ITEM_LIFETIME_FREQUENCY"
  372. // "FILTER_LINE_ITEM_TYPE"
  373. // "FILTER_MEDIA_PLAN"
  374. // "FILTER_MOBILE_DEVICE_MAKE"
  375. // "FILTER_MOBILE_DEVICE_MAKE_MODEL"
  376. // "FILTER_MOBILE_DEVICE_TYPE"
  377. // "FILTER_MOBILE_GEO"
  378. // "FILTER_MONTH"
  379. // "FILTER_MRAID_SUPPORT"
  380. // "FILTER_NIELSEN_AGE"
  381. // "FILTER_NIELSEN_COUNTRY_CODE"
  382. // "FILTER_NIELSEN_DEVICE_ID"
  383. // "FILTER_NIELSEN_GENDER"
  384. // "FILTER_NOT_SUPPORTED"
  385. // "FILTER_ORDER_ID"
  386. // "FILTER_OS"
  387. // "FILTER_PAGE_CATEGORY"
  388. // "FILTER_PAGE_LAYOUT"
  389. // "FILTER_PARTNER"
  390. // "FILTER_PARTNER_CURRENCY"
  391. // "FILTER_PUBLIC_INVENTORY"
  392. // "FILTER_QUARTER"
  393. // "FILTER_REGION"
  394. // "FILTER_REGULAR_CHANNEL_ID"
  395. // "FILTER_SITE_ID"
  396. // "FILTER_SITE_LANGUAGE"
  397. // "FILTER_SKIPPABLE_SUPPORT"
  398. // "FILTER_TARGETED_USER_LIST"
  399. // "FILTER_TIME_OF_DAY"
  400. // "FILTER_TRUEVIEW_AD_GROUP_AD_ID"
  401. // "FILTER_TRUEVIEW_AD_GROUP_ID"
  402. // "FILTER_TRUEVIEW_AGE"
  403. // "FILTER_TRUEVIEW_CATEGORY"
  404. // "FILTER_TRUEVIEW_CITY"
  405. // "FILTER_TRUEVIEW_CONVERSION_TYPE"
  406. // "FILTER_TRUEVIEW_COUNTRY"
  407. // "FILTER_TRUEVIEW_CUSTOM_AFFINITY"
  408. // "FILTER_TRUEVIEW_DMA"
  409. // "FILTER_TRUEVIEW_GENDER"
  410. // "FILTER_TRUEVIEW_IAR_AGE"
  411. // "FILTER_TRUEVIEW_IAR_CATEGORY"
  412. // "FILTER_TRUEVIEW_IAR_CITY"
  413. // "FILTER_TRUEVIEW_IAR_COUNTRY"
  414. // "FILTER_TRUEVIEW_IAR_GENDER"
  415. // "FILTER_TRUEVIEW_IAR_INTEREST"
  416. // "FILTER_TRUEVIEW_IAR_LANGUAGE"
  417. // "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS"
  418. // "FILTER_TRUEVIEW_IAR_REGION"
  419. // "FILTER_TRUEVIEW_IAR_REMARKETING_LIST"
  420. // "FILTER_TRUEVIEW_IAR_TIME_OF_DAY"
  421. // "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL"
  422. // "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO"
  423. // "FILTER_TRUEVIEW_IAR_ZIPCODE"
  424. // "FILTER_TRUEVIEW_INTEREST"
  425. // "FILTER_TRUEVIEW_KEYWORD"
  426. // "FILTER_TRUEVIEW_PARENTAL_STATUS"
  427. // "FILTER_TRUEVIEW_PLACEMENT"
  428. // "FILTER_TRUEVIEW_REGION"
  429. // "FILTER_TRUEVIEW_REMARKETING_LIST"
  430. // "FILTER_TRUEVIEW_URL"
  431. // "FILTER_TRUEVIEW_ZIPCODE"
  432. // "FILTER_UNKNOWN"
  433. // "FILTER_USER_LIST"
  434. // "FILTER_USER_LIST_FIRST_PARTY"
  435. // "FILTER_USER_LIST_THIRD_PARTY"
  436. // "FILTER_VIDEO_AD_POSITION_IN_STREAM"
  437. // "FILTER_VIDEO_COMPANION_SIZE"
  438. // "FILTER_VIDEO_COMPANION_TYPE"
  439. // "FILTER_VIDEO_CREATIVE_DURATION"
  440. // "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE"
  441. // "FILTER_VIDEO_DURATION_SECONDS"
  442. // "FILTER_VIDEO_FORMAT_SUPPORT"
  443. // "FILTER_VIDEO_INVENTORY_TYPE"
  444. // "FILTER_VIDEO_PLAYER_SIZE"
  445. // "FILTER_VIDEO_RATING_TIER"
  446. // "FILTER_VIDEO_SKIPPABLE_SUPPORT"
  447. // "FILTER_VIDEO_VPAID_SUPPORT"
  448. // "FILTER_WEEK"
  449. // "FILTER_YEAR"
  450. // "FILTER_YOUTUBE_VERTICAL"
  451. // "FILTER_ZIP_CODE"
  452. Type string `json:"type,omitempty"`
  453. // Value: Filter value.
  454. Value string `json:"value,omitempty"`
  455. // ForceSendFields is a list of field names (e.g. "Type") to
  456. // unconditionally include in API requests. By default, fields with
  457. // empty values are omitted from API requests. However, any non-pointer,
  458. // non-interface field appearing in ForceSendFields will be sent to the
  459. // server regardless of whether the field is empty or not. This may be
  460. // used to include empty fields in Patch requests.
  461. ForceSendFields []string `json:"-"`
  462. // NullFields is a list of field names (e.g. "Type") to include in API
  463. // requests with the JSON null value. By default, fields with empty
  464. // values are omitted from API requests. However, any field with an
  465. // empty value appearing in NullFields will be sent to the server as
  466. // null. It is an error if a field in this list has a non-empty value.
  467. // This may be used to include null fields in Patch requests.
  468. NullFields []string `json:"-"`
  469. }
  470. func (s *FilterPair) MarshalJSON() ([]byte, error) {
  471. type NoMethod FilterPair
  472. raw := NoMethod(*s)
  473. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  474. }
  475. // ListQueriesResponse: List queries response.
  476. type ListQueriesResponse struct {
  477. // Kind: Identifies what kind of resource this is. Value: the fixed
  478. // string "doubleclickbidmanager#listQueriesResponse".
  479. Kind string `json:"kind,omitempty"`
  480. // Queries: Retrieved queries.
  481. Queries []*Query `json:"queries,omitempty"`
  482. // ServerResponse contains the HTTP response code and headers from the
  483. // server.
  484. googleapi.ServerResponse `json:"-"`
  485. // ForceSendFields is a list of field names (e.g. "Kind") to
  486. // unconditionally include in API requests. By default, fields with
  487. // empty values are omitted from API requests. However, any non-pointer,
  488. // non-interface field appearing in ForceSendFields will be sent to the
  489. // server regardless of whether the field is empty or not. This may be
  490. // used to include empty fields in Patch requests.
  491. ForceSendFields []string `json:"-"`
  492. // NullFields is a list of field names (e.g. "Kind") to include in API
  493. // requests with the JSON null value. By default, fields with empty
  494. // values are omitted from API requests. However, any field with an
  495. // empty value appearing in NullFields will be sent to the server as
  496. // null. It is an error if a field in this list has a non-empty value.
  497. // This may be used to include null fields in Patch requests.
  498. NullFields []string `json:"-"`
  499. }
  500. func (s *ListQueriesResponse) MarshalJSON() ([]byte, error) {
  501. type NoMethod ListQueriesResponse
  502. raw := NoMethod(*s)
  503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  504. }
  505. // ListReportsResponse: List reports response.
  506. type ListReportsResponse struct {
  507. // Kind: Identifies what kind of resource this is. Value: the fixed
  508. // string "doubleclickbidmanager#listReportsResponse".
  509. Kind string `json:"kind,omitempty"`
  510. // Reports: Retrieved reports.
  511. Reports []*Report `json:"reports,omitempty"`
  512. // ServerResponse contains the HTTP response code and headers from the
  513. // server.
  514. googleapi.ServerResponse `json:"-"`
  515. // ForceSendFields is a list of field names (e.g. "Kind") to
  516. // unconditionally include in API requests. By default, fields with
  517. // empty values are omitted from API requests. However, any non-pointer,
  518. // non-interface field appearing in ForceSendFields will be sent to the
  519. // server regardless of whether the field is empty or not. This may be
  520. // used to include empty fields in Patch requests.
  521. ForceSendFields []string `json:"-"`
  522. // NullFields is a list of field names (e.g. "Kind") to include in API
  523. // requests with the JSON null value. By default, fields with empty
  524. // values are omitted from API requests. However, any field with an
  525. // empty value appearing in NullFields will be sent to the server as
  526. // null. It is an error if a field in this list has a non-empty value.
  527. // This may be used to include null fields in Patch requests.
  528. NullFields []string `json:"-"`
  529. }
  530. func (s *ListReportsResponse) MarshalJSON() ([]byte, error) {
  531. type NoMethod ListReportsResponse
  532. raw := NoMethod(*s)
  533. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  534. }
  535. // Parameters: Parameters of a query or report.
  536. type Parameters struct {
  537. // Filters: Filters used to match traffic data in your report.
  538. Filters []*FilterPair `json:"filters,omitempty"`
  539. // GroupBys: Data is grouped by the filters listed in this field.
  540. //
  541. // Possible values:
  542. // "FILTER_ACTIVE_VIEW_EXPECTED_VIEWABILITY"
  543. // "FILTER_ACTIVITY_ID"
  544. // "FILTER_ADVERTISER"
  545. // "FILTER_ADVERTISER_CURRENCY"
  546. // "FILTER_ADVERTISER_TIMEZONE"
  547. // "FILTER_AD_POSITION"
  548. // "FILTER_AGE"
  549. // "FILTER_AUTHORIZED_SELLER_STATE_ID"
  550. // "FILTER_BRANDSAFE_CHANNEL_ID"
  551. // "FILTER_BROWSER"
  552. // "FILTER_BUDGET_SEGMENT_DESCRIPTION"
  553. // "FILTER_CAMPAIGN_DAILY_FREQUENCY"
  554. // "FILTER_CARRIER"
  555. // "FILTER_CHANNEL_ID"
  556. // "FILTER_CITY"
  557. // "FILTER_COMPANION_CREATIVE_ID"
  558. // "FILTER_CONVERSION_DELAY"
  559. // "FILTER_COUNTRY"
  560. // "FILTER_CREATIVE_ATTRIBUTE"
  561. // "FILTER_CREATIVE_HEIGHT"
  562. // "FILTER_CREATIVE_ID"
  563. // "FILTER_CREATIVE_SIZE"
  564. // "FILTER_CREATIVE_TYPE"
  565. // "FILTER_CREATIVE_WIDTH"
  566. // "FILTER_DATA_PROVIDER"
  567. // "FILTER_DATE"
  568. // "FILTER_DAY_OF_WEEK"
  569. // "FILTER_DEVICE_MAKE"
  570. // "FILTER_DEVICE_MODEL"
  571. // "FILTER_DEVICE_TYPE"
  572. // "FILTER_DFP_ORDER_ID"
  573. // "FILTER_DMA"
  574. // "FILTER_DV360_ACTIVITY_ID"
  575. // "FILTER_EXCHANGE_ID"
  576. // "FILTER_FLOODLIGHT_ACTIVITY_ID"
  577. // "FILTER_FLOODLIGHT_PIXEL_ID"
  578. // "FILTER_GENDER"
  579. // "FILTER_INSERTION_ORDER"
  580. // "FILTER_INVENTORY_COMMITMENT_TYPE"
  581. // "FILTER_INVENTORY_DELIVERY_METHOD"
  582. // "FILTER_INVENTORY_FORMAT"
  583. // "FILTER_INVENTORY_RATE_TYPE"
  584. // "FILTER_INVENTORY_SOURCE"
  585. // "FILTER_INVENTORY_SOURCE_TYPE"
  586. // "FILTER_KEYWORD"
  587. // "FILTER_LINE_ITEM"
  588. // "FILTER_LINE_ITEM_DAILY_FREQUENCY"
  589. // "FILTER_LINE_ITEM_LIFETIME_FREQUENCY"
  590. // "FILTER_LINE_ITEM_TYPE"
  591. // "FILTER_MEDIA_PLAN"
  592. // "FILTER_MOBILE_DEVICE_MAKE"
  593. // "FILTER_MOBILE_DEVICE_MAKE_MODEL"
  594. // "FILTER_MOBILE_DEVICE_TYPE"
  595. // "FILTER_MOBILE_GEO"
  596. // "FILTER_MONTH"
  597. // "FILTER_MRAID_SUPPORT"
  598. // "FILTER_NIELSEN_AGE"
  599. // "FILTER_NIELSEN_COUNTRY_CODE"
  600. // "FILTER_NIELSEN_DEVICE_ID"
  601. // "FILTER_NIELSEN_GENDER"
  602. // "FILTER_NOT_SUPPORTED"
  603. // "FILTER_ORDER_ID"
  604. // "FILTER_OS"
  605. // "FILTER_PAGE_CATEGORY"
  606. // "FILTER_PAGE_LAYOUT"
  607. // "FILTER_PARTNER"
  608. // "FILTER_PARTNER_CURRENCY"
  609. // "FILTER_PUBLIC_INVENTORY"
  610. // "FILTER_QUARTER"
  611. // "FILTER_REGION"
  612. // "FILTER_REGULAR_CHANNEL_ID"
  613. // "FILTER_SITE_ID"
  614. // "FILTER_SITE_LANGUAGE"
  615. // "FILTER_SKIPPABLE_SUPPORT"
  616. // "FILTER_TARGETED_USER_LIST"
  617. // "FILTER_TIME_OF_DAY"
  618. // "FILTER_TRUEVIEW_AD_GROUP_AD_ID"
  619. // "FILTER_TRUEVIEW_AD_GROUP_ID"
  620. // "FILTER_TRUEVIEW_AGE"
  621. // "FILTER_TRUEVIEW_CATEGORY"
  622. // "FILTER_TRUEVIEW_CITY"
  623. // "FILTER_TRUEVIEW_CONVERSION_TYPE"
  624. // "FILTER_TRUEVIEW_COUNTRY"
  625. // "FILTER_TRUEVIEW_CUSTOM_AFFINITY"
  626. // "FILTER_TRUEVIEW_DMA"
  627. // "FILTER_TRUEVIEW_GENDER"
  628. // "FILTER_TRUEVIEW_IAR_AGE"
  629. // "FILTER_TRUEVIEW_IAR_CATEGORY"
  630. // "FILTER_TRUEVIEW_IAR_CITY"
  631. // "FILTER_TRUEVIEW_IAR_COUNTRY"
  632. // "FILTER_TRUEVIEW_IAR_GENDER"
  633. // "FILTER_TRUEVIEW_IAR_INTEREST"
  634. // "FILTER_TRUEVIEW_IAR_LANGUAGE"
  635. // "FILTER_TRUEVIEW_IAR_PARENTAL_STATUS"
  636. // "FILTER_TRUEVIEW_IAR_REGION"
  637. // "FILTER_TRUEVIEW_IAR_REMARKETING_LIST"
  638. // "FILTER_TRUEVIEW_IAR_TIME_OF_DAY"
  639. // "FILTER_TRUEVIEW_IAR_YOUTUBE_CHANNEL"
  640. // "FILTER_TRUEVIEW_IAR_YOUTUBE_VIDEO"
  641. // "FILTER_TRUEVIEW_IAR_ZIPCODE"
  642. // "FILTER_TRUEVIEW_INTEREST"
  643. // "FILTER_TRUEVIEW_KEYWORD"
  644. // "FILTER_TRUEVIEW_PARENTAL_STATUS"
  645. // "FILTER_TRUEVIEW_PLACEMENT"
  646. // "FILTER_TRUEVIEW_REGION"
  647. // "FILTER_TRUEVIEW_REMARKETING_LIST"
  648. // "FILTER_TRUEVIEW_URL"
  649. // "FILTER_TRUEVIEW_ZIPCODE"
  650. // "FILTER_UNKNOWN"
  651. // "FILTER_USER_LIST"
  652. // "FILTER_USER_LIST_FIRST_PARTY"
  653. // "FILTER_USER_LIST_THIRD_PARTY"
  654. // "FILTER_VIDEO_AD_POSITION_IN_STREAM"
  655. // "FILTER_VIDEO_COMPANION_SIZE"
  656. // "FILTER_VIDEO_COMPANION_TYPE"
  657. // "FILTER_VIDEO_CREATIVE_DURATION"
  658. // "FILTER_VIDEO_CREATIVE_DURATION_SKIPPABLE"
  659. // "FILTER_VIDEO_DURATION_SECONDS"
  660. // "FILTER_VIDEO_FORMAT_SUPPORT"
  661. // "FILTER_VIDEO_INVENTORY_TYPE"
  662. // "FILTER_VIDEO_PLAYER_SIZE"
  663. // "FILTER_VIDEO_RATING_TIER"
  664. // "FILTER_VIDEO_SKIPPABLE_SUPPORT"
  665. // "FILTER_VIDEO_VPAID_SUPPORT"
  666. // "FILTER_WEEK"
  667. // "FILTER_YEAR"
  668. // "FILTER_YOUTUBE_VERTICAL"
  669. // "FILTER_ZIP_CODE"
  670. GroupBys []string `json:"groupBys,omitempty"`
  671. // IncludeInviteData: Whether to include data from Invite Media.
  672. IncludeInviteData bool `json:"includeInviteData,omitempty"`
  673. // Metrics: Metrics to include as columns in your report.
  674. //
  675. // Possible values:
  676. // "METRIC_ACTIVE_VIEW_AUDIBLE_VISIBLE_ON_COMPLETE_IMPRESSIONS"
  677. // "METRIC_ACTIVE_VIEW_AVERAGE_VIEWABLE_TIME"
  678. // "METRIC_ACTIVE_VIEW_DISTRIBUTION_UNMEASURABLE"
  679. // "METRIC_ACTIVE_VIEW_DISTRIBUTION_UNVIEWABLE"
  680. // "METRIC_ACTIVE_VIEW_DISTRIBUTION_VIEWABLE"
  681. // "METRIC_ACTIVE_VIEW_ELIGIBLE_IMPRESSIONS"
  682. // "METRIC_ACTIVE_VIEW_MEASURABLE_IMPRESSIONS"
  683. // "METRIC_ACTIVE_VIEW_PCT_MEASURABLE_IMPRESSIONS"
  684. // "METRIC_ACTIVE_VIEW_PCT_VIEWABLE_IMPRESSIONS"
  685. // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_AT_START"
  686. // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_FIRST_QUAR"
  687. // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_ON_COMPLETE"
  688. // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_SECOND_QUAR"
  689. // "METRIC_ACTIVE_VIEW_PERCENT_AUDIBLE_VISIBLE_THIRD_QUAR"
  690. // "METRIC_ACTIVE_VIEW_PERCENT_VIEWABLE_FOR_TIME_THRESHOLD"
  691. // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_AT_START"
  692. // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_FIRST_QUAR"
  693. // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_ON_COMPLETE"
  694. // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_SECOND_QUAR"
  695. // "METRIC_ACTIVE_VIEW_PERCENT_VISIBLE_THIRD_QUAR"
  696. // "METRIC_ACTIVE_VIEW_UNMEASURABLE_IMPRESSIONS"
  697. // "METRIC_ACTIVE_VIEW_UNVIEWABLE_IMPRESSIONS"
  698. // "METRIC_ACTIVE_VIEW_VIEWABLE_FOR_TIME_THRESHOLD"
  699. // "METRIC_ACTIVE_VIEW_VIEWABLE_IMPRESSIONS"
  700. // "METRIC_BID_REQUESTS"
  701. // "METRIC_BILLABLE_COST_ADVERTISER"
  702. // "METRIC_BILLABLE_COST_PARTNER"
  703. // "METRIC_BILLABLE_COST_USD"
  704. // "METRIC_CLICKS"
  705. // "METRIC_CLICK_TO_POST_CLICK_CONVERSION_RATE"
  706. // "METRIC_CM_POST_CLICK_REVENUE"
  707. // "METRIC_CM_POST_VIEW_REVENUE"
  708. // "METRIC_COMSCORE_VCE_AUDIENCE_AVG_FREQUENCY"
  709. // "METRIC_COMSCORE_VCE_AUDIENCE_IMPRESSIONS"
  710. // "METRIC_COMSCORE_VCE_AUDIENCE_IMPRESSIONS_SHARE"
  711. // "METRIC_COMSCORE_VCE_AUDIENCE_REACH_PCT"
  712. // "METRIC_COMSCORE_VCE_AUDIENCE_SHARE_PCT"
  713. // "METRIC_COMSCORE_VCE_GROSS_RATING_POINTS"
  714. // "METRIC_COMSCORE_VCE_POPULATION"
  715. // "METRIC_COMSCORE_VCE_UNIQUE_AUDIENCE"
  716. // "METRIC_CONVERSIONS_PER_MILLE"
  717. // "METRIC_COOKIE_REACH_AVERAGE_IMPRESSION_FREQUENCY"
  718. // "METRIC_COOKIE_REACH_IMPRESSION_REACH"
  719. // "METRIC_CPM_FEE1_ADVERTISER"
  720. // "METRIC_CPM_FEE1_PARTNER"
  721. // "METRIC_CPM_FEE1_USD"
  722. // "METRIC_CPM_FEE2_ADVERTISER"
  723. // "METRIC_CPM_FEE2_PARTNER"
  724. // "METRIC_CPM_FEE2_USD"
  725. // "METRIC_CPM_FEE3_ADVERTISER"
  726. // "METRIC_CPM_FEE3_PARTNER"
  727. // "METRIC_CPM_FEE3_USD"
  728. // "METRIC_CPM_FEE4_ADVERTISER"
  729. // "METRIC_CPM_FEE4_PARTNER"
  730. // "METRIC_CPM_FEE4_USD"
  731. // "METRIC_CPM_FEE5_ADVERTISER"
  732. // "METRIC_CPM_FEE5_PARTNER"
  733. // "METRIC_CPM_FEE5_USD"
  734. // "METRIC_CTR"
  735. // "METRIC_DATA_COST_ADVERTISER"
  736. // "METRIC_DATA_COST_PARTNER"
  737. // "METRIC_DATA_COST_USD"
  738. // "METRIC_DBM_ENGAGEMENT_RATE"
  739. // "METRIC_FEE10_ADVERTISER"
  740. // "METRIC_FEE10_PARTNER"
  741. // "METRIC_FEE10_USD"
  742. // "METRIC_FEE11_ADVERTISER"
  743. // "METRIC_FEE11_PARTNER"
  744. // "METRIC_FEE11_USD"
  745. // "METRIC_FEE12_ADVERTISER"
  746. // "METRIC_FEE12_PARTNER"
  747. // "METRIC_FEE12_USD"
  748. // "METRIC_FEE13_ADVERTISER"
  749. // "METRIC_FEE13_PARTNER"
  750. // "METRIC_FEE13_USD"
  751. // "METRIC_FEE14_ADVERTISER"
  752. // "METRIC_FEE14_PARTNER"
  753. // "METRIC_FEE14_USD"
  754. // "METRIC_FEE15_ADVERTISER"
  755. // "METRIC_FEE15_PARTNER"
  756. // "METRIC_FEE15_USD"
  757. // "METRIC_FEE16_ADVERTISER"
  758. // "METRIC_FEE16_PARTNER"
  759. // "METRIC_FEE16_USD"
  760. // "METRIC_FEE17_ADVERTISER"
  761. // "METRIC_FEE17_PARTNER"
  762. // "METRIC_FEE17_USD"
  763. // "METRIC_FEE18_ADVERTISER"
  764. // "METRIC_FEE18_PARTNER"
  765. // "METRIC_FEE18_USD"
  766. // "METRIC_FEE19_ADVERTISER"
  767. // "METRIC_FEE19_PARTNER"
  768. // "METRIC_FEE19_USD"
  769. // "METRIC_FEE20_ADVERTISER"
  770. // "METRIC_FEE20_PARTNER"
  771. // "METRIC_FEE20_USD"
  772. // "METRIC_FEE21_ADVERTISER"
  773. // "METRIC_FEE21_PARTNER"
  774. // "METRIC_FEE21_USD"
  775. // "METRIC_FEE22_ADVERTISER"
  776. // "METRIC_FEE22_PARTNER"
  777. // "METRIC_FEE22_USD"
  778. // "METRIC_FEE2_ADVERTISER"
  779. // "METRIC_FEE2_PARTNER"
  780. // "METRIC_FEE2_USD"
  781. // "METRIC_FEE3_ADVERTISER"
  782. // "METRIC_FEE3_PARTNER"
  783. // "METRIC_FEE3_USD"
  784. // "METRIC_FEE4_ADVERTISER"
  785. // "METRIC_FEE4_PARTNER"
  786. // "METRIC_FEE4_USD"
  787. // "METRIC_FEE5_ADVERTISER"
  788. // "METRIC_FEE5_PARTNER"
  789. // "METRIC_FEE5_USD"
  790. // "METRIC_FEE6_ADVERTISER"
  791. // "METRIC_FEE6_PARTNER"
  792. // "METRIC_FEE6_USD"
  793. // "METRIC_FEE7_ADVERTISER"
  794. // "METRIC_FEE7_PARTNER"
  795. // "METRIC_FEE7_USD"
  796. // "METRIC_FEE8_ADVERTISER"
  797. // "METRIC_FEE8_PARTNER"
  798. // "METRIC_FEE8_USD"
  799. // "METRIC_FEE9_ADVERTISER"
  800. // "METRIC_FEE9_PARTNER"
  801. // "METRIC_FEE9_USD"
  802. // "METRIC_FLOODLIGHT_IMPRESSIONS"
  803. // "METRIC_IMPRESSIONS"
  804. // "METRIC_IMPRESSIONS_TO_CONVERSION_RATE"
  805. // "METRIC_LAST_CLICKS"
  806. // "METRIC_LAST_IMPRESSIONS"
  807. // "METRIC_MEDIA_COST_ADVERTISER"
  808. // "METRIC_MEDIA_COST_ECPAPC_ADVERTISER"
  809. // "METRIC_MEDIA_COST_ECPAPC_PARTNER"
  810. // "METRIC_MEDIA_COST_ECPAPC_USD"
  811. // "METRIC_MEDIA_COST_ECPAPV_ADVERTISER"
  812. // "METRIC_MEDIA_COST_ECPAPV_PARTNER"
  813. // "METRIC_MEDIA_COST_ECPAPV_USD"
  814. // "METRIC_MEDIA_COST_ECPA_ADVERTISER"
  815. // "METRIC_MEDIA_COST_ECPA_PARTNER"
  816. // "METRIC_MEDIA_COST_ECPA_USD"
  817. // "METRIC_MEDIA_COST_ECPCV_ADVERTISER"
  818. // "METRIC_MEDIA_COST_ECPCV_PARTNER"
  819. // "METRIC_MEDIA_COST_ECPCV_USD"
  820. // "METRIC_MEDIA_COST_ECPC_ADVERTISER"
  821. // "METRIC_MEDIA_COST_ECPC_PARTNER"
  822. // "METRIC_MEDIA_COST_ECPC_USD"
  823. // "METRIC_MEDIA_COST_ECPM_ADVERTISER"
  824. // "METRIC_MEDIA_COST_ECPM_PARTNER"
  825. // "METRIC_MEDIA_COST_ECPM_USD"
  826. // "METRIC_MEDIA_COST_PARTNER"
  827. // "METRIC_MEDIA_COST_USD"
  828. // "METRIC_MEDIA_COST_VIEWABLE_ECPM_ADVERTISER"
  829. // "METRIC_MEDIA_COST_VIEWABLE_ECPM_PARTNER"
  830. // "METRIC_MEDIA_COST_VIEWABLE_ECPM_USD"
  831. // "METRIC_MEDIA_FEE1_ADVERTISER"
  832. // "METRIC_MEDIA_FEE1_PARTNER"
  833. // "METRIC_MEDIA_FEE1_USD"
  834. // "METRIC_MEDIA_FEE2_ADVERTISER"
  835. // "METRIC_MEDIA_FEE2_PARTNER"
  836. // "METRIC_MEDIA_FEE2_USD"
  837. // "METRIC_MEDIA_FEE3_ADVERTISER"
  838. // "METRIC_MEDIA_FEE3_PARTNER"
  839. // "METRIC_MEDIA_FEE3_USD"
  840. // "METRIC_MEDIA_FEE4_ADVERTISER"
  841. // "METRIC_MEDIA_FEE4_PARTNER"
  842. // "METRIC_MEDIA_FEE4_USD"
  843. // "METRIC_MEDIA_FEE5_ADVERTISER"
  844. // "METRIC_MEDIA_FEE5_PARTNER"
  845. // "METRIC_MEDIA_FEE5_USD"
  846. // "METRIC_PIXEL_LOADS"
  847. // "METRIC_PLATFORM_FEE_ADVERTISER"
  848. // "METRIC_PLATFORM_FEE_PARTNER"
  849. // "METRIC_PLATFORM_FEE_USD"
  850. // "METRIC_POST_CLICK_DFA_REVENUE"
  851. // "METRIC_POST_VIEW_DFA_REVENUE"
  852. // "METRIC_PROFIT_ADVERTISER"
  853. // "METRIC_PROFIT_ECPAPC_ADVERTISER"
  854. // "METRIC_PROFIT_ECPAPC_PARTNER"
  855. // "METRIC_PROFIT_ECPAPC_USD"
  856. // "METRIC_PROFIT_ECPAPV_ADVERTISER"
  857. // "METRIC_PROFIT_ECPAPV_PARTNER"
  858. // "METRIC_PROFIT_ECPAPV_USD"
  859. // "METRIC_PROFIT_ECPA_ADVERTISER"
  860. // "METRIC_PROFIT_ECPA_PARTNER"
  861. // "METRIC_PROFIT_ECPA_USD"
  862. // "METRIC_PROFIT_ECPC_ADVERTISER"
  863. // "METRIC_PROFIT_ECPC_PARTNER"
  864. // "METRIC_PROFIT_ECPC_USD"
  865. // "METRIC_PROFIT_ECPM_ADVERTISER"
  866. // "METRIC_PROFIT_ECPM_PARTNER"
  867. // "METRIC_PROFIT_ECPM_USD"
  868. // "METRIC_PROFIT_MARGIN"
  869. // "METRIC_PROFIT_PARTNER"
  870. // "METRIC_PROFIT_USD"
  871. // "METRIC_PROFIT_VIEWABLE_ECPM_ADVERTISER"
  872. // "METRIC_PROFIT_VIEWABLE_ECPM_PARTNER"
  873. // "METRIC_PROFIT_VIEWABLE_ECPM_USD"
  874. // "METRIC_REACH_COOKIE_FREQUENCY"
  875. // "METRIC_REACH_COOKIE_REACH"
  876. // "METRIC_REVENUE_ADVERTISER"
  877. // "METRIC_REVENUE_ECPAPC_ADVERTISER"
  878. // "METRIC_REVENUE_ECPAPC_PARTNER"
  879. // "METRIC_REVENUE_ECPAPC_USD"
  880. // "METRIC_REVENUE_ECPAPV_ADVERTISER"
  881. // "METRIC_REVENUE_ECPAPV_PARTNER"
  882. // "METRIC_REVENUE_ECPAPV_USD"
  883. // "METRIC_REVENUE_ECPA_ADVERTISER"
  884. // "METRIC_REVENUE_ECPA_PARTNER"
  885. // "METRIC_REVENUE_ECPA_USD"
  886. // "METRIC_REVENUE_ECPCV_ADVERTISER"
  887. // "METRIC_REVENUE_ECPCV_PARTNER"
  888. // "METRIC_REVENUE_ECPCV_USD"
  889. // "METRIC_REVENUE_ECPC_ADVERTISER"
  890. // "METRIC_REVENUE_ECPC_PARTNER"
  891. // "METRIC_REVENUE_ECPC_USD"
  892. // "METRIC_REVENUE_ECPIAVC_ADVERTISER"
  893. // "METRIC_REVENUE_ECPM_ADVERTISER"
  894. // "METRIC_REVENUE_ECPM_PARTNER"
  895. // "METRIC_REVENUE_ECPM_USD"
  896. // "METRIC_REVENUE_PARTNER"
  897. // "METRIC_REVENUE_USD"
  898. // "METRIC_REVENUE_VIEWABLE_ECPM_ADVERTISER"
  899. // "METRIC_REVENUE_VIEWABLE_ECPM_PARTNER"
  900. // "METRIC_REVENUE_VIEWABLE_ECPM_USD"
  901. // "METRIC_RICH_MEDIA_SCROLLS"
  902. // "METRIC_RICH_MEDIA_VIDEO_COMPLETIONS"
  903. // "METRIC_RICH_MEDIA_VIDEO_FIRST_QUARTILE_COMPLETES"
  904. // "METRIC_RICH_MEDIA_VIDEO_FULL_SCREENS"
  905. // "METRIC_RICH_MEDIA_VIDEO_MIDPOINTS"
  906. // "METRIC_RICH_MEDIA_VIDEO_MUTES"
  907. // "METRIC_RICH_MEDIA_VIDEO_PAUSES"
  908. // "METRIC_RICH_MEDIA_VIDEO_PLAYS"
  909. // "METRIC_RICH_MEDIA_VIDEO_SKIPS"
  910. // "METRIC_RICH_MEDIA_VIDEO_THIRD_QUARTILE_COMPLETES"
  911. // "METRIC_TEA_TRUEVIEW_IMPRESSIONS"
  912. // "METRIC_TEA_TRUEVIEW_UNIQUE_COOKIES"
  913. // "METRIC_TEA_TRUEVIEW_UNIQUE_PEOPLE"
  914. // "METRIC_TOTAL_CONVERSIONS"
  915. // "METRIC_TOTAL_MEDIA_COST_ADVERTISER"
  916. // "METRIC_TOTAL_MEDIA_COST_ECPAPC_ADVERTISER"
  917. // "METRIC_TOTAL_MEDIA_COST_ECPAPC_PARTNER"
  918. // "METRIC_TOTAL_MEDIA_COST_ECPAPC_USD"
  919. // "METRIC_TOTAL_MEDIA_COST_ECPAPV_ADVERTISER"
  920. // "METRIC_TOTAL_MEDIA_COST_ECPAPV_PARTNER"
  921. // "METRIC_TOTAL_MEDIA_COST_ECPAPV_USD"
  922. // "METRIC_TOTAL_MEDIA_COST_ECPA_ADVERTISER"
  923. // "METRIC_TOTAL_MEDIA_COST_ECPA_PARTNER"
  924. // "METRIC_TOTAL_MEDIA_COST_ECPA_USD"
  925. // "METRIC_TOTAL_MEDIA_COST_ECPCV_ADVERTISER"
  926. // "METRIC_TOTAL_MEDIA_COST_ECPCV_PARTNER"
  927. // "METRIC_TOTAL_MEDIA_COST_ECPCV_USD"
  928. // "METRIC_TOTAL_MEDIA_COST_ECPC_ADVERTISER"
  929. // "METRIC_TOTAL_MEDIA_COST_ECPC_PARTNER"
  930. // "METRIC_TOTAL_MEDIA_COST_ECPC_USD"
  931. // "METRIC_TOTAL_MEDIA_COST_ECPM_ADVERTISER"
  932. // "METRIC_TOTAL_MEDIA_COST_ECPM_PARTNER"
  933. // "METRIC_TOTAL_MEDIA_COST_ECPM_USD"
  934. // "METRIC_TOTAL_MEDIA_COST_PARTNER"
  935. // "METRIC_TOTAL_MEDIA_COST_USD"
  936. // "METRIC_TOTAL_MEDIA_COST_VIEWABLE_ECPM_ADVERTISER"
  937. // "METRIC_TOTAL_MEDIA_COST_VIEWABLE_ECPM_PARTNER"
  938. // "METRIC_TOTAL_MEDIA_COST_VIEWABLE_ECPM_USD"
  939. // "METRIC_TRUEVIEW_AVERAGE_CPE_ADVERTISER"
  940. // "METRIC_TRUEVIEW_AVERAGE_CPE_PARTNER"
  941. // "METRIC_TRUEVIEW_AVERAGE_CPE_USD"
  942. // "METRIC_TRUEVIEW_CONVERSION_COST_MANY_PER_VIEW_ADVERTISER"
  943. // "METRIC_TRUEVIEW_CONVERSION_COST_MANY_PER_VIEW_PARTNER"
  944. // "METRIC_TRUEVIEW_CONVERSION_COST_MANY_PER_VIEW_USD"
  945. // "METRIC_TRUEVIEW_CONVERSION_COST_ONE_PER_VIEW_ADVERTISER"
  946. // "METRIC_TRUEVIEW_CONVERSION_COST_ONE_PER_VIEW_PARTNER"
  947. // "METRIC_TRUEVIEW_CONVERSION_COST_ONE_PER_VIEW_USD"
  948. // "METRIC_TRUEVIEW_CONVERSION_MANY_PER_VIEW"
  949. // "METRIC_TRUEVIEW_CONVERSION_ONE_PER_VIEW"
  950. // "METRIC_TRUEVIEW_CONVERSION_RATE_ONE_PER_VIEW"
  951. // "METRIC_TRUEVIEW_CONVERSION_VALUE_MANY_PER_VIEW_ADVERTISER"
  952. // "METRIC_TRUEVIEW_CONVERSION_VALUE_MANY_PER_VIEW_PARTNER"
  953. // "METRIC_TRUEVIEW_CONVERSION_VALUE_MANY_PER_VIEW_USD"
  954. // "METRIC_TRUEVIEW_CONVERSION_VALUE_ONE_PER_VIEW_ADVERTISER"
  955. // "METRIC_TRUEVIEW_CONVERSION_VALUE_ONE_PER_VIEW_PARTNER"
  956. // "METRIC_TRUEVIEW_CONVERSION_VALUE_ONE_PER_VIEW_USD"
  957. // "METRIC_TRUEVIEW_COST_CONVERSION_MANY_PER_VIEW_RATIO"
  958. // "METRIC_TRUEVIEW_COST_CONVERSION_ONE_PER_VIEW_RATIO"
  959. // "METRIC_TRUEVIEW_CPV_ADVERTISER"
  960. // "METRIC_TRUEVIEW_CPV_PARTNER"
  961. // "METRIC_TRUEVIEW_CPV_USD"
  962. // "METRIC_TRUEVIEW_EARNED_LIKES"
  963. // "METRIC_TRUEVIEW_EARNED_PLAYLIST_ADDITIONS"
  964. // "METRIC_TRUEVIEW_EARNED_SHARES"
  965. // "METRIC_TRUEVIEW_EARNED_SUBSCRIBERS"
  966. // "METRIC_TRUEVIEW_EARNED_VIEWS"
  967. // "METRIC_TRUEVIEW_ENGAGEMENTS"
  968. // "METRIC_TRUEVIEW_ENGAGEMENT_RATE"
  969. // "METRIC_TRUEVIEW_IMPRESSION_SHARE"
  970. // "METRIC_TRUEVIEW_LOST_IS_BUDGET"
  971. // "METRIC_TRUEVIEW_LOST_IS_RANK"
  972. // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUE"
  973. // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUES_ADVERTISER"
  974. // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUES_PARTNER"
  975. // "METRIC_TRUEVIEW_TOTAL_CONVERSION_VALUES_USD"
  976. // "METRIC_TRUEVIEW_UNIQUE_VIEWERS"
  977. // "METRIC_TRUEVIEW_VALUE_CONVERSION_MANY_PER_VIEW_RATIO"
  978. // "METRIC_TRUEVIEW_VALUE_CONVERSION_ONE_PER_VIEW_RATIO"
  979. // "METRIC_TRUEVIEW_VIEWS"
  980. // "METRIC_TRUEVIEW_VIEW_RATE"
  981. // "METRIC_TRUEVIEW_VIEW_THROUGH_CONVERSION"
  982. // "METRIC_UNIQUE_VISITORS_COOKIES"
  983. // "METRIC_UNKNOWN"
  984. // "METRIC_VIDEO_COMPANION_CLICKS"
  985. // "METRIC_VIDEO_COMPANION_IMPRESSIONS"
  986. // "METRIC_VIDEO_COMPLETION_RATE"
  987. // "METRIC_VIEWABLE_BID_REQUESTS"
  988. Metrics []string `json:"metrics,omitempty"`
  989. // Type: Report type.
  990. //
  991. // Possible values:
  992. // "TYPE_ACTIVE_GRP"
  993. // "TYPE_AUDIENCE_COMPOSITION"
  994. // "TYPE_AUDIENCE_PERFORMANCE"
  995. // "TYPE_CLIENT_SAFE"
  996. // "TYPE_COMSCORE_VCE"
  997. // "TYPE_CROSS_FEE"
  998. // "TYPE_CROSS_PARTNER"
  999. // "TYPE_CROSS_PARTNER_THIRD_PARTY_DATA_PROVIDER"
  1000. // "TYPE_ESTIMATED_CONVERSION"
  1001. // "TYPE_FEE"
  1002. // "TYPE_GENERAL"
  1003. // "TYPE_INVENTORY_AVAILABILITY"
  1004. // "TYPE_KEYWORD"
  1005. // "TYPE_LINEAR_TV_SEARCH_LIFT"
  1006. // "TYPE_NIELSEN_AUDIENCE_PROFILE"
  1007. // "TYPE_NIELSEN_DAILY_REACH_BUILD"
  1008. // "TYPE_NIELSEN_ONLINE_GLOBAL_MARKET"
  1009. // "TYPE_NIELSEN_SITE"
  1010. // "TYPE_NOT_SUPPORTED"
  1011. // "TYPE_ORDER_ID"
  1012. // "TYPE_PAGE_CATEGORY"
  1013. // "TYPE_PETRA_NIELSEN_AUDIENCE_PROFILE"
  1014. // "TYPE_PETRA_NIELSEN_DAILY_REACH_BUILD"
  1015. // "TYPE_PETRA_NIELSEN_ONLINE_GLOBAL_MARKET"
  1016. // "TYPE_PIXEL_LOAD"
  1017. // "TYPE_REACH_AND_FREQUENCY"
  1018. // "TYPE_REACH_AUDIENCE"
  1019. // "TYPE_THIRD_PARTY_DATA_PROVIDER"
  1020. // "TYPE_TRUEVIEW"
  1021. // "TYPE_TRUEVIEW_IAR"
  1022. // "TYPE_VERIFICATION"
  1023. // "TYPE_YOUTUBE_VERTICAL"
  1024. Type string `json:"type,omitempty"`
  1025. // ForceSendFields is a list of field names (e.g. "Filters") to
  1026. // unconditionally include in API requests. By default, fields with
  1027. // empty values are omitted from API requests. However, any non-pointer,
  1028. // non-interface field appearing in ForceSendFields will be sent to the
  1029. // server regardless of whether the field is empty or not. This may be
  1030. // used to include empty fields in Patch requests.
  1031. ForceSendFields []string `json:"-"`
  1032. // NullFields is a list of field names (e.g. "Filters") to include in
  1033. // API requests with the JSON null value. By default, fields with empty
  1034. // values are omitted from API requests. However, any field with an
  1035. // empty value appearing in NullFields will be sent to the server as
  1036. // null. It is an error if a field in this list has a non-empty value.
  1037. // This may be used to include null fields in Patch requests.
  1038. NullFields []string `json:"-"`
  1039. }
  1040. func (s *Parameters) MarshalJSON() ([]byte, error) {
  1041. type NoMethod Parameters
  1042. raw := NoMethod(*s)
  1043. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1044. }
  1045. // Query: Represents a query.
  1046. type Query struct {
  1047. // Kind: Identifies what kind of resource this is. Value: the fixed
  1048. // string "doubleclickbidmanager#query".
  1049. Kind string `json:"kind,omitempty"`
  1050. // Metadata: Query metadata.
  1051. Metadata *QueryMetadata `json:"metadata,omitempty"`
  1052. // Params: Query parameters.
  1053. Params *Parameters `json:"params,omitempty"`
  1054. // QueryId: Query ID.
  1055. QueryId int64 `json:"queryId,omitempty,string"`
  1056. // ReportDataEndTimeMs: The ending time for the data that is shown in
  1057. // the report. Note, reportDataEndTimeMs is required if
  1058. // metadata.dataRange is CUSTOM_DATES and ignored otherwise.
  1059. ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`
  1060. // ReportDataStartTimeMs: The starting time for the data that is shown
  1061. // in the report. Note, reportDataStartTimeMs is required if
  1062. // metadata.dataRange is CUSTOM_DATES and ignored otherwise.
  1063. ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`
  1064. // Schedule: Information on how often and when to run a query.
  1065. Schedule *QuerySchedule `json:"schedule,omitempty"`
  1066. // TimezoneCode: Canonical timezone code for report data time. Defaults
  1067. // to America/New_York.
  1068. TimezoneCode string `json:"timezoneCode,omitempty"`
  1069. // ServerResponse contains the HTTP response code and headers from the
  1070. // server.
  1071. googleapi.ServerResponse `json:"-"`
  1072. // ForceSendFields is a list of field names (e.g. "Kind") to
  1073. // unconditionally include in API requests. By default, fields with
  1074. // empty values are omitted from API requests. However, any non-pointer,
  1075. // non-interface field appearing in ForceSendFields will be sent to the
  1076. // server regardless of whether the field is empty or not. This may be
  1077. // used to include empty fields in Patch requests.
  1078. ForceSendFields []string `json:"-"`
  1079. // NullFields is a list of field names (e.g. "Kind") to include in API
  1080. // requests with the JSON null value. By default, fields with empty
  1081. // values are omitted from API requests. However, any field with an
  1082. // empty value appearing in NullFields will be sent to the server as
  1083. // null. It is an error if a field in this list has a non-empty value.
  1084. // This may be used to include null fields in Patch requests.
  1085. NullFields []string `json:"-"`
  1086. }
  1087. func (s *Query) MarshalJSON() ([]byte, error) {
  1088. type NoMethod Query
  1089. raw := NoMethod(*s)
  1090. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1091. }
  1092. // QueryMetadata: Query metadata.
  1093. type QueryMetadata struct {
  1094. // DataRange: Range of report data.
  1095. //
  1096. // Possible values:
  1097. // "ALL_TIME"
  1098. // "CURRENT_DAY"
  1099. // "CUSTOM_DATES"
  1100. // "LAST_14_DAYS"
  1101. // "LAST_30_DAYS"
  1102. // "LAST_365_DAYS"
  1103. // "LAST_7_DAYS"
  1104. // "LAST_90_DAYS"
  1105. // "MONTH_TO_DATE"
  1106. // "PREVIOUS_DAY"
  1107. // "PREVIOUS_HALF_MONTH"
  1108. // "PREVIOUS_MONTH"
  1109. // "PREVIOUS_QUARTER"
  1110. // "PREVIOUS_WEEK"
  1111. // "PREVIOUS_YEAR"
  1112. // "QUARTER_TO_DATE"
  1113. // "TYPE_NOT_SUPPORTED"
  1114. // "WEEK_TO_DATE"
  1115. // "YEAR_TO_DATE"
  1116. DataRange string `json:"dataRange,omitempty"`
  1117. // Format: Format of the generated report.
  1118. //
  1119. // Possible values:
  1120. // "CSV"
  1121. // "EXCEL_CSV"
  1122. // "XLSX"
  1123. Format string `json:"format,omitempty"`
  1124. // GoogleCloudStoragePathForLatestReport: The path to the location in
  1125. // Google Cloud Storage where the latest report is stored.
  1126. GoogleCloudStoragePathForLatestReport string `json:"googleCloudStoragePathForLatestReport,omitempty"`
  1127. // GoogleDrivePathForLatestReport: The path in Google Drive for the
  1128. // latest report.
  1129. GoogleDrivePathForLatestReport string `json:"googleDrivePathForLatestReport,omitempty"`
  1130. // LatestReportRunTimeMs: The time when the latest report started to
  1131. // run.
  1132. LatestReportRunTimeMs int64 `json:"latestReportRunTimeMs,omitempty,string"`
  1133. // Locale: Locale of the generated reports. Valid values are cs CZECH de
  1134. // GERMAN en ENGLISH es SPANISH fr FRENCH it ITALIAN ja JAPANESE ko
  1135. // KOREAN pl POLISH pt-BR BRAZILIAN_PORTUGUESE ru RUSSIAN tr TURKISH uk
  1136. // UKRAINIAN zh-CN CHINA_CHINESE zh-TW TAIWAN_CHINESE
  1137. //
  1138. // An locale string not in the list above will generate reports in
  1139. // English.
  1140. Locale string `json:"locale,omitempty"`
  1141. // ReportCount: Number of reports that have been generated for the
  1142. // query.
  1143. ReportCount int64 `json:"reportCount,omitempty"`
  1144. // Running: Whether the latest report is currently running.
  1145. Running bool `json:"running,omitempty"`
  1146. // SendNotification: Whether to send an email notification when a report
  1147. // is ready. Default to false.
  1148. SendNotification bool `json:"sendNotification,omitempty"`
  1149. // ShareEmailAddress: List of email addresses which are sent email
  1150. // notifications when the report is finished. Separate from
  1151. // sendNotification.
  1152. ShareEmailAddress []string `json:"shareEmailAddress,omitempty"`
  1153. // Title: Query title. It is used to name the reports generated from
  1154. // this query.
  1155. Title string `json:"title,omitempty"`
  1156. // ForceSendFields is a list of field names (e.g. "DataRange") to
  1157. // unconditionally include in API requests. By default, fields with
  1158. // empty values are omitted from API requests. However, any non-pointer,
  1159. // non-interface field appearing in ForceSendFields will be sent to the
  1160. // server regardless of whether the field is empty or not. This may be
  1161. // used to include empty fields in Patch requests.
  1162. ForceSendFields []string `json:"-"`
  1163. // NullFields is a list of field names (e.g. "DataRange") to include in
  1164. // API requests with the JSON null value. By default, fields with empty
  1165. // values are omitted from API requests. However, any field with an
  1166. // empty value appearing in NullFields will be sent to the server as
  1167. // null. It is an error if a field in this list has a non-empty value.
  1168. // This may be used to include null fields in Patch requests.
  1169. NullFields []string `json:"-"`
  1170. }
  1171. func (s *QueryMetadata) MarshalJSON() ([]byte, error) {
  1172. type NoMethod QueryMetadata
  1173. raw := NoMethod(*s)
  1174. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1175. }
  1176. // QuerySchedule: Information on how frequently and when to run a query.
  1177. type QuerySchedule struct {
  1178. // EndTimeMs: Datetime to periodically run the query until.
  1179. EndTimeMs int64 `json:"endTimeMs,omitempty,string"`
  1180. // Frequency: How often the query is run.
  1181. //
  1182. // Possible values:
  1183. // "DAILY"
  1184. // "MONTHLY"
  1185. // "ONE_TIME"
  1186. // "QUARTERLY"
  1187. // "SEMI_MONTHLY"
  1188. // "WEEKLY"
  1189. Frequency string `json:"frequency,omitempty"`
  1190. // NextRunMinuteOfDay: Time of day at which a new report will be
  1191. // generated, represented as minutes past midnight. Range is 0 to 1439.
  1192. // Only applies to scheduled reports.
  1193. NextRunMinuteOfDay int64 `json:"nextRunMinuteOfDay,omitempty"`
  1194. // NextRunTimezoneCode: Canonical timezone code for report generation
  1195. // time. Defaults to America/New_York.
  1196. NextRunTimezoneCode string `json:"nextRunTimezoneCode,omitempty"`
  1197. // ForceSendFields is a list of field names (e.g. "EndTimeMs") to
  1198. // unconditionally include in API requests. By default, fields with
  1199. // empty values are omitted from API requests. However, any non-pointer,
  1200. // non-interface field appearing in ForceSendFields will be sent to the
  1201. // server regardless of whether the field is empty or not. This may be
  1202. // used to include empty fields in Patch requests.
  1203. ForceSendFields []string `json:"-"`
  1204. // NullFields is a list of field names (e.g. "EndTimeMs") to include in
  1205. // API requests with the JSON null value. By default, fields with empty
  1206. // values are omitted from API requests. However, any field with an
  1207. // empty value appearing in NullFields will be sent to the server as
  1208. // null. It is an error if a field in this list has a non-empty value.
  1209. // This may be used to include null fields in Patch requests.
  1210. NullFields []string `json:"-"`
  1211. }
  1212. func (s *QuerySchedule) MarshalJSON() ([]byte, error) {
  1213. type NoMethod QuerySchedule
  1214. raw := NoMethod(*s)
  1215. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1216. }
  1217. // Report: Represents a report.
  1218. type Report struct {
  1219. // Key: Key used to identify a report.
  1220. Key *ReportKey `json:"key,omitempty"`
  1221. // Metadata: Report metadata.
  1222. Metadata *ReportMetadata `json:"metadata,omitempty"`
  1223. // Params: Report parameters.
  1224. Params *Parameters `json:"params,omitempty"`
  1225. // ForceSendFields is a list of field names (e.g. "Key") to
  1226. // unconditionally include in API requests. By default, fields with
  1227. // empty values are omitted from API requests. However, any non-pointer,
  1228. // non-interface field appearing in ForceSendFields will be sent to the
  1229. // server regardless of whether the field is empty or not. This may be
  1230. // used to include empty fields in Patch requests.
  1231. ForceSendFields []string `json:"-"`
  1232. // NullFields is a list of field names (e.g. "Key") to include in API
  1233. // requests with the JSON null value. By default, fields with empty
  1234. // values are omitted from API requests. However, any field with an
  1235. // empty value appearing in NullFields will be sent to the server as
  1236. // null. It is an error if a field in this list has a non-empty value.
  1237. // This may be used to include null fields in Patch requests.
  1238. NullFields []string `json:"-"`
  1239. }
  1240. func (s *Report) MarshalJSON() ([]byte, error) {
  1241. type NoMethod Report
  1242. raw := NoMethod(*s)
  1243. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1244. }
  1245. // ReportFailure: An explanation of a report failure.
  1246. type ReportFailure struct {
  1247. // ErrorCode: Error code that shows why the report was not created.
  1248. //
  1249. // Possible values:
  1250. // "AUTHENTICATION_ERROR"
  1251. // "DEPRECATED_REPORTING_INVALID_QUERY"
  1252. // "REPORTING_BUCKET_NOT_FOUND"
  1253. // "REPORTING_CREATE_BUCKET_FAILED"
  1254. // "REPORTING_DELETE_BUCKET_FAILED"
  1255. // "REPORTING_FATAL_ERROR"
  1256. // "REPORTING_ILLEGAL_FILENAME"
  1257. // "REPORTING_IMCOMPATIBLE_METRICS"
  1258. // "REPORTING_INVALID_QUERY_MISSING_PARTNER_AND_ADVERTISER_FILTERS"
  1259. // "REPORTING_INVALID_QUERY_TITLE_MISSING"
  1260. // "REPORTING_INVALID_QUERY_TOO_MANY_UNFILTERED_LARGE_GROUP_BYS"
  1261. // "REPORTING_QUERY_NOT_FOUND"
  1262. // "REPORTING_TRANSIENT_ERROR"
  1263. // "REPORTING_UPDATE_BUCKET_PERMISSION_FAILED"
  1264. // "REPORTING_WRITE_BUCKET_OBJECT_FAILED"
  1265. // "SERVER_ERROR"
  1266. // "UNAUTHORIZED_API_ACCESS"
  1267. // "VALIDATION_ERROR"
  1268. ErrorCode string `json:"errorCode,omitempty"`
  1269. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1270. // unconditionally include in API requests. By default, fields with
  1271. // empty values are omitted from API requests. However, any non-pointer,
  1272. // non-interface field appearing in ForceSendFields will be sent to the
  1273. // server regardless of whether the field is empty or not. This may be
  1274. // used to include empty fields in Patch requests.
  1275. ForceSendFields []string `json:"-"`
  1276. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  1277. // API requests with the JSON null value. By default, fields with empty
  1278. // values are omitted from API requests. However, any field with an
  1279. // empty value appearing in NullFields will be sent to the server as
  1280. // null. It is an error if a field in this list has a non-empty value.
  1281. // This may be used to include null fields in Patch requests.
  1282. NullFields []string `json:"-"`
  1283. }
  1284. func (s *ReportFailure) MarshalJSON() ([]byte, error) {
  1285. type NoMethod ReportFailure
  1286. raw := NoMethod(*s)
  1287. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1288. }
  1289. // ReportKey: Key used to identify a report.
  1290. type ReportKey struct {
  1291. // QueryId: Query ID.
  1292. QueryId int64 `json:"queryId,omitempty,string"`
  1293. // ReportId: Report ID.
  1294. ReportId int64 `json:"reportId,omitempty,string"`
  1295. // ForceSendFields is a list of field names (e.g. "QueryId") to
  1296. // unconditionally include in API requests. By default, fields with
  1297. // empty values are omitted from API requests. However, any non-pointer,
  1298. // non-interface field appearing in ForceSendFields will be sent to the
  1299. // server regardless of whether the field is empty or not. This may be
  1300. // used to include empty fields in Patch requests.
  1301. ForceSendFields []string `json:"-"`
  1302. // NullFields is a list of field names (e.g. "QueryId") to include in
  1303. // API requests with the JSON null value. By default, fields with empty
  1304. // values are omitted from API requests. However, any field with an
  1305. // empty value appearing in NullFields will be sent to the server as
  1306. // null. It is an error if a field in this list has a non-empty value.
  1307. // This may be used to include null fields in Patch requests.
  1308. NullFields []string `json:"-"`
  1309. }
  1310. func (s *ReportKey) MarshalJSON() ([]byte, error) {
  1311. type NoMethod ReportKey
  1312. raw := NoMethod(*s)
  1313. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1314. }
  1315. // ReportMetadata: Report metadata.
  1316. type ReportMetadata struct {
  1317. // GoogleCloudStoragePath: The path to the location in Google Cloud
  1318. // Storage where the report is stored.
  1319. GoogleCloudStoragePath string `json:"googleCloudStoragePath,omitempty"`
  1320. // ReportDataEndTimeMs: The ending time for the data that is shown in
  1321. // the report.
  1322. ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`
  1323. // ReportDataStartTimeMs: The starting time for the data that is shown
  1324. // in the report.
  1325. ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`
  1326. // Status: Report status.
  1327. Status *ReportStatus `json:"status,omitempty"`
  1328. // ForceSendFields is a list of field names (e.g.
  1329. // "GoogleCloudStoragePath") to unconditionally include in API requests.
  1330. // By default, fields with empty values are omitted from API requests.
  1331. // However, any non-pointer, non-interface field appearing in
  1332. // ForceSendFields will be sent to the server regardless of whether the
  1333. // field is empty or not. This may be used to include empty fields in
  1334. // Patch requests.
  1335. ForceSendFields []string `json:"-"`
  1336. // NullFields is a list of field names (e.g. "GoogleCloudStoragePath")
  1337. // to include in API requests with the JSON null value. By default,
  1338. // fields with empty values are omitted from API requests. However, any
  1339. // field with an empty value appearing in NullFields will be sent to the
  1340. // server as null. It is an error if a field in this list has a
  1341. // non-empty value. This may be used to include null fields in Patch
  1342. // requests.
  1343. NullFields []string `json:"-"`
  1344. }
  1345. func (s *ReportMetadata) MarshalJSON() ([]byte, error) {
  1346. type NoMethod ReportMetadata
  1347. raw := NoMethod(*s)
  1348. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1349. }
  1350. // ReportStatus: Report status.
  1351. type ReportStatus struct {
  1352. // Failure: If the report failed, this records the cause.
  1353. Failure *ReportFailure `json:"failure,omitempty"`
  1354. // FinishTimeMs: The time when this report either completed successfully
  1355. // or failed.
  1356. FinishTimeMs int64 `json:"finishTimeMs,omitempty,string"`
  1357. // Format: The file type of the report.
  1358. //
  1359. // Possible values:
  1360. // "CSV"
  1361. // "EXCEL_CSV"
  1362. // "XLSX"
  1363. Format string `json:"format,omitempty"`
  1364. // State: The state of the report.
  1365. //
  1366. // Possible values:
  1367. // "DONE"
  1368. // "FAILED"
  1369. // "RUNNING"
  1370. State string `json:"state,omitempty"`
  1371. // ForceSendFields is a list of field names (e.g. "Failure") to
  1372. // unconditionally include in API requests. By default, fields with
  1373. // empty values are omitted from API requests. However, any non-pointer,
  1374. // non-interface field appearing in ForceSendFields will be sent to the
  1375. // server regardless of whether the field is empty or not. This may be
  1376. // used to include empty fields in Patch requests.
  1377. ForceSendFields []string `json:"-"`
  1378. // NullFields is a list of field names (e.g. "Failure") to include in
  1379. // API requests with the JSON null value. By default, fields with empty
  1380. // values are omitted from API requests. However, any field with an
  1381. // empty value appearing in NullFields will be sent to the server as
  1382. // null. It is an error if a field in this list has a non-empty value.
  1383. // This may be used to include null fields in Patch requests.
  1384. NullFields []string `json:"-"`
  1385. }
  1386. func (s *ReportStatus) MarshalJSON() ([]byte, error) {
  1387. type NoMethod ReportStatus
  1388. raw := NoMethod(*s)
  1389. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1390. }
  1391. // RowStatus: Represents the upload status of a row in the request.
  1392. type RowStatus struct {
  1393. // Changed: Whether the stored entity is changed as a result of upload.
  1394. Changed bool `json:"changed,omitempty"`
  1395. // EntityId: Entity Id.
  1396. EntityId int64 `json:"entityId,omitempty,string"`
  1397. // EntityName: Entity name.
  1398. EntityName string `json:"entityName,omitempty"`
  1399. // Errors: Reasons why the entity can't be uploaded.
  1400. Errors []string `json:"errors,omitempty"`
  1401. // Persisted: Whether the entity is persisted.
  1402. Persisted bool `json:"persisted,omitempty"`
  1403. // RowNumber: Row number.
  1404. RowNumber int64 `json:"rowNumber,omitempty"`
  1405. // ForceSendFields is a list of field names (e.g. "Changed") to
  1406. // unconditionally include in API requests. By default, fields with
  1407. // empty values are omitted from API requests. However, any non-pointer,
  1408. // non-interface field appearing in ForceSendFields will be sent to the
  1409. // server regardless of whether the field is empty or not. This may be
  1410. // used to include empty fields in Patch requests.
  1411. ForceSendFields []string `json:"-"`
  1412. // NullFields is a list of field names (e.g. "Changed") to include in
  1413. // API requests with the JSON null value. By default, fields with empty
  1414. // values are omitted from API requests. However, any field with an
  1415. // empty value appearing in NullFields will be sent to the server as
  1416. // null. It is an error if a field in this list has a non-empty value.
  1417. // This may be used to include null fields in Patch requests.
  1418. NullFields []string `json:"-"`
  1419. }
  1420. func (s *RowStatus) MarshalJSON() ([]byte, error) {
  1421. type NoMethod RowStatus
  1422. raw := NoMethod(*s)
  1423. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1424. }
  1425. // RunQueryRequest: Request to run a stored query to generate a report.
  1426. type RunQueryRequest struct {
  1427. // DataRange: Report data range used to generate the report.
  1428. //
  1429. // Possible values:
  1430. // "ALL_TIME"
  1431. // "CURRENT_DAY"
  1432. // "CUSTOM_DATES"
  1433. // "LAST_14_DAYS"
  1434. // "LAST_30_DAYS"
  1435. // "LAST_365_DAYS"
  1436. // "LAST_7_DAYS"
  1437. // "LAST_90_DAYS"
  1438. // "MONTH_TO_DATE"
  1439. // "PREVIOUS_DAY"
  1440. // "PREVIOUS_HALF_MONTH"
  1441. // "PREVIOUS_MONTH"
  1442. // "PREVIOUS_QUARTER"
  1443. // "PREVIOUS_WEEK"
  1444. // "PREVIOUS_YEAR"
  1445. // "QUARTER_TO_DATE"
  1446. // "TYPE_NOT_SUPPORTED"
  1447. // "WEEK_TO_DATE"
  1448. // "YEAR_TO_DATE"
  1449. DataRange string `json:"dataRange,omitempty"`
  1450. // ReportDataEndTimeMs: The ending time for the data that is shown in
  1451. // the report. Note, reportDataEndTimeMs is required if dataRange is
  1452. // CUSTOM_DATES and ignored otherwise.
  1453. ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`
  1454. // ReportDataStartTimeMs: The starting time for the data that is shown
  1455. // in the report. Note, reportDataStartTimeMs is required if dataRange
  1456. // is CUSTOM_DATES and ignored otherwise.
  1457. ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`
  1458. // TimezoneCode: Canonical timezone code for report data time. Defaults
  1459. // to America/New_York.
  1460. TimezoneCode string `json:"timezoneCode,omitempty"`
  1461. // ForceSendFields is a list of field names (e.g. "DataRange") to
  1462. // unconditionally include in API requests. By default, fields with
  1463. // empty values are omitted from API requests. However, any non-pointer,
  1464. // non-interface field appearing in ForceSendFields will be sent to the
  1465. // server regardless of whether the field is empty or not. This may be
  1466. // used to include empty fields in Patch requests.
  1467. ForceSendFields []string `json:"-"`
  1468. // NullFields is a list of field names (e.g. "DataRange") to include in
  1469. // API requests with the JSON null value. By default, fields with empty
  1470. // values are omitted from API requests. However, any field with an
  1471. // empty value appearing in NullFields will be sent to the server as
  1472. // null. It is an error if a field in this list has a non-empty value.
  1473. // This may be used to include null fields in Patch requests.
  1474. NullFields []string `json:"-"`
  1475. }
  1476. func (s *RunQueryRequest) MarshalJSON() ([]byte, error) {
  1477. type NoMethod RunQueryRequest
  1478. raw := NoMethod(*s)
  1479. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1480. }
  1481. // UploadLineItemsRequest: Request to upload line items.
  1482. type UploadLineItemsRequest struct {
  1483. // DryRun: Set to true to get upload status without actually persisting
  1484. // the line items.
  1485. DryRun bool `json:"dryRun,omitempty"`
  1486. // Format: Format the line items are in. Default to CSV.
  1487. //
  1488. // Possible values:
  1489. // "CSV"
  1490. Format string `json:"format,omitempty"`
  1491. // LineItems: Line items in CSV to upload. Refer to Entity Write File
  1492. // Format for more information on file format.
  1493. LineItems string `json:"lineItems,omitempty"`
  1494. // ForceSendFields is a list of field names (e.g. "DryRun") to
  1495. // unconditionally include in API requests. By default, fields with
  1496. // empty values are omitted from API requests. However, any non-pointer,
  1497. // non-interface field appearing in ForceSendFields will be sent to the
  1498. // server regardless of whether the field is empty or not. This may be
  1499. // used to include empty fields in Patch requests.
  1500. ForceSendFields []string `json:"-"`
  1501. // NullFields is a list of field names (e.g. "DryRun") to include in API
  1502. // requests with the JSON null value. By default, fields with empty
  1503. // values are omitted from API requests. However, any field with an
  1504. // empty value appearing in NullFields will be sent to the server as
  1505. // null. It is an error if a field in this list has a non-empty value.
  1506. // This may be used to include null fields in Patch requests.
  1507. NullFields []string `json:"-"`
  1508. }
  1509. func (s *UploadLineItemsRequest) MarshalJSON() ([]byte, error) {
  1510. type NoMethod UploadLineItemsRequest
  1511. raw := NoMethod(*s)
  1512. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1513. }
  1514. // UploadLineItemsResponse: Upload line items response.
  1515. type UploadLineItemsResponse struct {
  1516. // UploadStatus: Status of upload.
  1517. UploadStatus *UploadStatus `json:"uploadStatus,omitempty"`
  1518. // ServerResponse contains the HTTP response code and headers from the
  1519. // server.
  1520. googleapi.ServerResponse `json:"-"`
  1521. // ForceSendFields is a list of field names (e.g. "UploadStatus") to
  1522. // unconditionally include in API requests. By default, fields with
  1523. // empty values are omitted from API requests. However, any non-pointer,
  1524. // non-interface field appearing in ForceSendFields will be sent to the
  1525. // server regardless of whether the field is empty or not. This may be
  1526. // used to include empty fields in Patch requests.
  1527. ForceSendFields []string `json:"-"`
  1528. // NullFields is a list of field names (e.g. "UploadStatus") to include
  1529. // in API requests with the JSON null value. By default, fields with
  1530. // empty values are omitted from API requests. However, any field with
  1531. // an empty value appearing in NullFields will be sent to the server as
  1532. // null. It is an error if a field in this list has a non-empty value.
  1533. // This may be used to include null fields in Patch requests.
  1534. NullFields []string `json:"-"`
  1535. }
  1536. func (s *UploadLineItemsResponse) MarshalJSON() ([]byte, error) {
  1537. type NoMethod UploadLineItemsResponse
  1538. raw := NoMethod(*s)
  1539. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1540. }
  1541. // UploadStatus: Represents the status of upload.
  1542. type UploadStatus struct {
  1543. // Errors: Reasons why upload can't be completed.
  1544. Errors []string `json:"errors,omitempty"`
  1545. // RowStatus: Per-row upload status.
  1546. RowStatus []*RowStatus `json:"rowStatus,omitempty"`
  1547. // ForceSendFields is a list of field names (e.g. "Errors") to
  1548. // unconditionally include in API requests. By default, fields with
  1549. // empty values are omitted from API requests. However, any non-pointer,
  1550. // non-interface field appearing in ForceSendFields will be sent to the
  1551. // server regardless of whether the field is empty or not. This may be
  1552. // used to include empty fields in Patch requests.
  1553. ForceSendFields []string `json:"-"`
  1554. // NullFields is a list of field names (e.g. "Errors") to include in API
  1555. // requests with the JSON null value. By default, fields with empty
  1556. // values are omitted from API requests. However, any field with an
  1557. // empty value appearing in NullFields will be sent to the server as
  1558. // null. It is an error if a field in this list has a non-empty value.
  1559. // This may be used to include null fields in Patch requests.
  1560. NullFields []string `json:"-"`
  1561. }
  1562. func (s *UploadStatus) MarshalJSON() ([]byte, error) {
  1563. type NoMethod UploadStatus
  1564. raw := NoMethod(*s)
  1565. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1566. }
  1567. // method id "doubleclickbidmanager.lineitems.downloadlineitems":
  1568. type LineitemsDownloadlineitemsCall struct {
  1569. s *Service
  1570. downloadlineitemsrequest *DownloadLineItemsRequest
  1571. urlParams_ gensupport.URLParams
  1572. ctx_ context.Context
  1573. header_ http.Header
  1574. }
  1575. // Downloadlineitems: Retrieves line items in CSV format. TrueView line
  1576. // items are not supported.
  1577. func (r *LineitemsService) Downloadlineitems(downloadlineitemsrequest *DownloadLineItemsRequest) *LineitemsDownloadlineitemsCall {
  1578. c := &LineitemsDownloadlineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1579. c.downloadlineitemsrequest = downloadlineitemsrequest
  1580. return c
  1581. }
  1582. // Fields allows partial responses to be retrieved. See
  1583. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1584. // for more information.
  1585. func (c *LineitemsDownloadlineitemsCall) Fields(s ...googleapi.Field) *LineitemsDownloadlineitemsCall {
  1586. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1587. return c
  1588. }
  1589. // Context sets the context to be used in this call's Do method. Any
  1590. // pending HTTP request will be aborted if the provided context is
  1591. // canceled.
  1592. func (c *LineitemsDownloadlineitemsCall) Context(ctx context.Context) *LineitemsDownloadlineitemsCall {
  1593. c.ctx_ = ctx
  1594. return c
  1595. }
  1596. // Header returns an http.Header that can be modified by the caller to
  1597. // add HTTP headers to the request.
  1598. func (c *LineitemsDownloadlineitemsCall) Header() http.Header {
  1599. if c.header_ == nil {
  1600. c.header_ = make(http.Header)
  1601. }
  1602. return c.header_
  1603. }
  1604. func (c *LineitemsDownloadlineitemsCall) doRequest(alt string) (*http.Response, error) {
  1605. reqHeaders := make(http.Header)
  1606. for k, v := range c.header_ {
  1607. reqHeaders[k] = v
  1608. }
  1609. reqHeaders.Set("User-Agent", c.s.userAgent())
  1610. var body io.Reader = nil
  1611. body, err := googleapi.WithoutDataWrapper.JSONReader(c.downloadlineitemsrequest)
  1612. if err != nil {
  1613. return nil, err
  1614. }
  1615. reqHeaders.Set("Content-Type", "application/json")
  1616. c.urlParams_.Set("alt", alt)
  1617. c.urlParams_.Set("prettyPrint", "false")
  1618. urls := googleapi.ResolveRelative(c.s.BasePath, "lineitems/downloadlineitems")
  1619. urls += "?" + c.urlParams_.Encode()
  1620. req, err := http.NewRequest("POST", urls, body)
  1621. if err != nil {
  1622. return nil, err
  1623. }
  1624. req.Header = reqHeaders
  1625. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1626. }
  1627. // Do executes the "doubleclickbidmanager.lineitems.downloadlineitems" call.
  1628. // Exactly one of *DownloadLineItemsResponse or error will be non-nil.
  1629. // Any non-2xx status code is an error. Response headers are in either
  1630. // *DownloadLineItemsResponse.ServerResponse.Header or (if a response
  1631. // was returned at all) in error.(*googleapi.Error).Header. Use
  1632. // googleapi.IsNotModified to check whether the returned error was
  1633. // because http.StatusNotModified was returned.
  1634. func (c *LineitemsDownloadlineitemsCall) Do(opts ...googleapi.CallOption) (*DownloadLineItemsResponse, error) {
  1635. gensupport.SetOptions(c.urlParams_, opts...)
  1636. res, err := c.doRequest("json")
  1637. if res != nil && res.StatusCode == http.StatusNotModified {
  1638. if res.Body != nil {
  1639. res.Body.Close()
  1640. }
  1641. return nil, &googleapi.Error{
  1642. Code: res.StatusCode,
  1643. Header: res.Header,
  1644. }
  1645. }
  1646. if err != nil {
  1647. return nil, err
  1648. }
  1649. defer googleapi.CloseBody(res)
  1650. if err := googleapi.CheckResponse(res); err != nil {
  1651. return nil, err
  1652. }
  1653. ret := &DownloadLineItemsResponse{
  1654. ServerResponse: googleapi.ServerResponse{
  1655. Header: res.Header,
  1656. HTTPStatusCode: res.StatusCode,
  1657. },
  1658. }
  1659. target := &ret
  1660. if err := gensupport.DecodeResponse(target, res); err != nil {
  1661. return nil, err
  1662. }
  1663. return ret, nil
  1664. // {
  1665. // "description": "Retrieves line items in CSV format. TrueView line items are not supported.",
  1666. // "httpMethod": "POST",
  1667. // "id": "doubleclickbidmanager.lineitems.downloadlineitems",
  1668. // "path": "lineitems/downloadlineitems",
  1669. // "request": {
  1670. // "$ref": "DownloadLineItemsRequest"
  1671. // },
  1672. // "response": {
  1673. // "$ref": "DownloadLineItemsResponse"
  1674. // },
  1675. // "scopes": [
  1676. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  1677. // ]
  1678. // }
  1679. }
  1680. // method id "doubleclickbidmanager.lineitems.uploadlineitems":
  1681. type LineitemsUploadlineitemsCall struct {
  1682. s *Service
  1683. uploadlineitemsrequest *UploadLineItemsRequest
  1684. urlParams_ gensupport.URLParams
  1685. ctx_ context.Context
  1686. header_ http.Header
  1687. }
  1688. // Uploadlineitems: Uploads line items in CSV format. TrueView line
  1689. // items are not supported.
  1690. func (r *LineitemsService) Uploadlineitems(uploadlineitemsrequest *UploadLineItemsRequest) *LineitemsUploadlineitemsCall {
  1691. c := &LineitemsUploadlineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1692. c.uploadlineitemsrequest = uploadlineitemsrequest
  1693. return c
  1694. }
  1695. // Fields allows partial responses to be retrieved. See
  1696. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1697. // for more information.
  1698. func (c *LineitemsUploadlineitemsCall) Fields(s ...googleapi.Field) *LineitemsUploadlineitemsCall {
  1699. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1700. return c
  1701. }
  1702. // Context sets the context to be used in this call's Do method. Any
  1703. // pending HTTP request will be aborted if the provided context is
  1704. // canceled.
  1705. func (c *LineitemsUploadlineitemsCall) Context(ctx context.Context) *LineitemsUploadlineitemsCall {
  1706. c.ctx_ = ctx
  1707. return c
  1708. }
  1709. // Header returns an http.Header that can be modified by the caller to
  1710. // add HTTP headers to the request.
  1711. func (c *LineitemsUploadlineitemsCall) Header() http.Header {
  1712. if c.header_ == nil {
  1713. c.header_ = make(http.Header)
  1714. }
  1715. return c.header_
  1716. }
  1717. func (c *LineitemsUploadlineitemsCall) doRequest(alt string) (*http.Response, error) {
  1718. reqHeaders := make(http.Header)
  1719. for k, v := range c.header_ {
  1720. reqHeaders[k] = v
  1721. }
  1722. reqHeaders.Set("User-Agent", c.s.userAgent())
  1723. var body io.Reader = nil
  1724. body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadlineitemsrequest)
  1725. if err != nil {
  1726. return nil, err
  1727. }
  1728. reqHeaders.Set("Content-Type", "application/json")
  1729. c.urlParams_.Set("alt", alt)
  1730. c.urlParams_.Set("prettyPrint", "false")
  1731. urls := googleapi.ResolveRelative(c.s.BasePath, "lineitems/uploadlineitems")
  1732. urls += "?" + c.urlParams_.Encode()
  1733. req, err := http.NewRequest("POST", urls, body)
  1734. if err != nil {
  1735. return nil, err
  1736. }
  1737. req.Header = reqHeaders
  1738. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1739. }
  1740. // Do executes the "doubleclickbidmanager.lineitems.uploadlineitems" call.
  1741. // Exactly one of *UploadLineItemsResponse or error will be non-nil. Any
  1742. // non-2xx status code is an error. Response headers are in either
  1743. // *UploadLineItemsResponse.ServerResponse.Header or (if a response was
  1744. // returned at all) in error.(*googleapi.Error).Header. Use
  1745. // googleapi.IsNotModified to check whether the returned error was
  1746. // because http.StatusNotModified was returned.
  1747. func (c *LineitemsUploadlineitemsCall) Do(opts ...googleapi.CallOption) (*UploadLineItemsResponse, error) {
  1748. gensupport.SetOptions(c.urlParams_, opts...)
  1749. res, err := c.doRequest("json")
  1750. if res != nil && res.StatusCode == http.StatusNotModified {
  1751. if res.Body != nil {
  1752. res.Body.Close()
  1753. }
  1754. return nil, &googleapi.Error{
  1755. Code: res.StatusCode,
  1756. Header: res.Header,
  1757. }
  1758. }
  1759. if err != nil {
  1760. return nil, err
  1761. }
  1762. defer googleapi.CloseBody(res)
  1763. if err := googleapi.CheckResponse(res); err != nil {
  1764. return nil, err
  1765. }
  1766. ret := &UploadLineItemsResponse{
  1767. ServerResponse: googleapi.ServerResponse{
  1768. Header: res.Header,
  1769. HTTPStatusCode: res.StatusCode,
  1770. },
  1771. }
  1772. target := &ret
  1773. if err := gensupport.DecodeResponse(target, res); err != nil {
  1774. return nil, err
  1775. }
  1776. return ret, nil
  1777. // {
  1778. // "description": "Uploads line items in CSV format. TrueView line items are not supported.",
  1779. // "httpMethod": "POST",
  1780. // "id": "doubleclickbidmanager.lineitems.uploadlineitems",
  1781. // "path": "lineitems/uploadlineitems",
  1782. // "request": {
  1783. // "$ref": "UploadLineItemsRequest"
  1784. // },
  1785. // "response": {
  1786. // "$ref": "UploadLineItemsResponse"
  1787. // },
  1788. // "scopes": [
  1789. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  1790. // ]
  1791. // }
  1792. }
  1793. // method id "doubleclickbidmanager.queries.createquery":
  1794. type QueriesCreatequeryCall struct {
  1795. s *Service
  1796. query *Query
  1797. urlParams_ gensupport.URLParams
  1798. ctx_ context.Context
  1799. header_ http.Header
  1800. }
  1801. // Createquery: Creates a query.
  1802. func (r *QueriesService) Createquery(query *Query) *QueriesCreatequeryCall {
  1803. c := &QueriesCreatequeryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1804. c.query = query
  1805. return c
  1806. }
  1807. // Fields allows partial responses to be retrieved. See
  1808. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1809. // for more information.
  1810. func (c *QueriesCreatequeryCall) Fields(s ...googleapi.Field) *QueriesCreatequeryCall {
  1811. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1812. return c
  1813. }
  1814. // Context sets the context to be used in this call's Do method. Any
  1815. // pending HTTP request will be aborted if the provided context is
  1816. // canceled.
  1817. func (c *QueriesCreatequeryCall) Context(ctx context.Context) *QueriesCreatequeryCall {
  1818. c.ctx_ = ctx
  1819. return c
  1820. }
  1821. // Header returns an http.Header that can be modified by the caller to
  1822. // add HTTP headers to the request.
  1823. func (c *QueriesCreatequeryCall) Header() http.Header {
  1824. if c.header_ == nil {
  1825. c.header_ = make(http.Header)
  1826. }
  1827. return c.header_
  1828. }
  1829. func (c *QueriesCreatequeryCall) doRequest(alt string) (*http.Response, error) {
  1830. reqHeaders := make(http.Header)
  1831. for k, v := range c.header_ {
  1832. reqHeaders[k] = v
  1833. }
  1834. reqHeaders.Set("User-Agent", c.s.userAgent())
  1835. var body io.Reader = nil
  1836. body, err := googleapi.WithoutDataWrapper.JSONReader(c.query)
  1837. if err != nil {
  1838. return nil, err
  1839. }
  1840. reqHeaders.Set("Content-Type", "application/json")
  1841. c.urlParams_.Set("alt", alt)
  1842. c.urlParams_.Set("prettyPrint", "false")
  1843. urls := googleapi.ResolveRelative(c.s.BasePath, "query")
  1844. urls += "?" + c.urlParams_.Encode()
  1845. req, err := http.NewRequest("POST", urls, body)
  1846. if err != nil {
  1847. return nil, err
  1848. }
  1849. req.Header = reqHeaders
  1850. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1851. }
  1852. // Do executes the "doubleclickbidmanager.queries.createquery" call.
  1853. // Exactly one of *Query or error will be non-nil. Any non-2xx status
  1854. // code is an error. Response headers are in either
  1855. // *Query.ServerResponse.Header or (if a response was returned at all)
  1856. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1857. // check whether the returned error was because http.StatusNotModified
  1858. // was returned.
  1859. func (c *QueriesCreatequeryCall) Do(opts ...googleapi.CallOption) (*Query, error) {
  1860. gensupport.SetOptions(c.urlParams_, opts...)
  1861. res, err := c.doRequest("json")
  1862. if res != nil && res.StatusCode == http.StatusNotModified {
  1863. if res.Body != nil {
  1864. res.Body.Close()
  1865. }
  1866. return nil, &googleapi.Error{
  1867. Code: res.StatusCode,
  1868. Header: res.Header,
  1869. }
  1870. }
  1871. if err != nil {
  1872. return nil, err
  1873. }
  1874. defer googleapi.CloseBody(res)
  1875. if err := googleapi.CheckResponse(res); err != nil {
  1876. return nil, err
  1877. }
  1878. ret := &Query{
  1879. ServerResponse: googleapi.ServerResponse{
  1880. Header: res.Header,
  1881. HTTPStatusCode: res.StatusCode,
  1882. },
  1883. }
  1884. target := &ret
  1885. if err := gensupport.DecodeResponse(target, res); err != nil {
  1886. return nil, err
  1887. }
  1888. return ret, nil
  1889. // {
  1890. // "description": "Creates a query.",
  1891. // "httpMethod": "POST",
  1892. // "id": "doubleclickbidmanager.queries.createquery",
  1893. // "path": "query",
  1894. // "request": {
  1895. // "$ref": "Query"
  1896. // },
  1897. // "response": {
  1898. // "$ref": "Query"
  1899. // },
  1900. // "scopes": [
  1901. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  1902. // ]
  1903. // }
  1904. }
  1905. // method id "doubleclickbidmanager.queries.deletequery":
  1906. type QueriesDeletequeryCall struct {
  1907. s *Service
  1908. queryId int64
  1909. urlParams_ gensupport.URLParams
  1910. ctx_ context.Context
  1911. header_ http.Header
  1912. }
  1913. // Deletequery: Deletes a stored query as well as the associated stored
  1914. // reports.
  1915. func (r *QueriesService) Deletequery(queryId int64) *QueriesDeletequeryCall {
  1916. c := &QueriesDeletequeryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1917. c.queryId = queryId
  1918. return c
  1919. }
  1920. // Fields allows partial responses to be retrieved. See
  1921. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1922. // for more information.
  1923. func (c *QueriesDeletequeryCall) Fields(s ...googleapi.Field) *QueriesDeletequeryCall {
  1924. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1925. return c
  1926. }
  1927. // Context sets the context to be used in this call's Do method. Any
  1928. // pending HTTP request will be aborted if the provided context is
  1929. // canceled.
  1930. func (c *QueriesDeletequeryCall) Context(ctx context.Context) *QueriesDeletequeryCall {
  1931. c.ctx_ = ctx
  1932. return c
  1933. }
  1934. // Header returns an http.Header that can be modified by the caller to
  1935. // add HTTP headers to the request.
  1936. func (c *QueriesDeletequeryCall) Header() http.Header {
  1937. if c.header_ == nil {
  1938. c.header_ = make(http.Header)
  1939. }
  1940. return c.header_
  1941. }
  1942. func (c *QueriesDeletequeryCall) doRequest(alt string) (*http.Response, error) {
  1943. reqHeaders := make(http.Header)
  1944. for k, v := range c.header_ {
  1945. reqHeaders[k] = v
  1946. }
  1947. reqHeaders.Set("User-Agent", c.s.userAgent())
  1948. var body io.Reader = nil
  1949. c.urlParams_.Set("alt", alt)
  1950. c.urlParams_.Set("prettyPrint", "false")
  1951. urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
  1952. urls += "?" + c.urlParams_.Encode()
  1953. req, err := http.NewRequest("DELETE", urls, body)
  1954. if err != nil {
  1955. return nil, err
  1956. }
  1957. req.Header = reqHeaders
  1958. googleapi.Expand(req.URL, map[string]string{
  1959. "queryId": strconv.FormatInt(c.queryId, 10),
  1960. })
  1961. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1962. }
  1963. // Do executes the "doubleclickbidmanager.queries.deletequery" call.
  1964. func (c *QueriesDeletequeryCall) Do(opts ...googleapi.CallOption) error {
  1965. gensupport.SetOptions(c.urlParams_, opts...)
  1966. res, err := c.doRequest("json")
  1967. if err != nil {
  1968. return err
  1969. }
  1970. defer googleapi.CloseBody(res)
  1971. if err := googleapi.CheckResponse(res); err != nil {
  1972. return err
  1973. }
  1974. return nil
  1975. // {
  1976. // "description": "Deletes a stored query as well as the associated stored reports.",
  1977. // "httpMethod": "DELETE",
  1978. // "id": "doubleclickbidmanager.queries.deletequery",
  1979. // "parameterOrder": [
  1980. // "queryId"
  1981. // ],
  1982. // "parameters": {
  1983. // "queryId": {
  1984. // "description": "Query ID to delete.",
  1985. // "format": "int64",
  1986. // "location": "path",
  1987. // "required": true,
  1988. // "type": "string"
  1989. // }
  1990. // },
  1991. // "path": "query/{queryId}",
  1992. // "scopes": [
  1993. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  1994. // ]
  1995. // }
  1996. }
  1997. // method id "doubleclickbidmanager.queries.getquery":
  1998. type QueriesGetqueryCall struct {
  1999. s *Service
  2000. queryId int64
  2001. urlParams_ gensupport.URLParams
  2002. ifNoneMatch_ string
  2003. ctx_ context.Context
  2004. header_ http.Header
  2005. }
  2006. // Getquery: Retrieves a stored query.
  2007. func (r *QueriesService) Getquery(queryId int64) *QueriesGetqueryCall {
  2008. c := &QueriesGetqueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2009. c.queryId = queryId
  2010. return c
  2011. }
  2012. // Fields allows partial responses to be retrieved. See
  2013. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2014. // for more information.
  2015. func (c *QueriesGetqueryCall) Fields(s ...googleapi.Field) *QueriesGetqueryCall {
  2016. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2017. return c
  2018. }
  2019. // IfNoneMatch sets the optional parameter which makes the operation
  2020. // fail if the object's ETag matches the given value. This is useful for
  2021. // getting updates only after the object has changed since the last
  2022. // request. Use googleapi.IsNotModified to check whether the response
  2023. // error from Do is the result of In-None-Match.
  2024. func (c *QueriesGetqueryCall) IfNoneMatch(entityTag string) *QueriesGetqueryCall {
  2025. c.ifNoneMatch_ = entityTag
  2026. return c
  2027. }
  2028. // Context sets the context to be used in this call's Do method. Any
  2029. // pending HTTP request will be aborted if the provided context is
  2030. // canceled.
  2031. func (c *QueriesGetqueryCall) Context(ctx context.Context) *QueriesGetqueryCall {
  2032. c.ctx_ = ctx
  2033. return c
  2034. }
  2035. // Header returns an http.Header that can be modified by the caller to
  2036. // add HTTP headers to the request.
  2037. func (c *QueriesGetqueryCall) Header() http.Header {
  2038. if c.header_ == nil {
  2039. c.header_ = make(http.Header)
  2040. }
  2041. return c.header_
  2042. }
  2043. func (c *QueriesGetqueryCall) doRequest(alt string) (*http.Response, error) {
  2044. reqHeaders := make(http.Header)
  2045. for k, v := range c.header_ {
  2046. reqHeaders[k] = v
  2047. }
  2048. reqHeaders.Set("User-Agent", c.s.userAgent())
  2049. if c.ifNoneMatch_ != "" {
  2050. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2051. }
  2052. var body io.Reader = nil
  2053. c.urlParams_.Set("alt", alt)
  2054. c.urlParams_.Set("prettyPrint", "false")
  2055. urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
  2056. urls += "?" + c.urlParams_.Encode()
  2057. req, err := http.NewRequest("GET", urls, body)
  2058. if err != nil {
  2059. return nil, err
  2060. }
  2061. req.Header = reqHeaders
  2062. googleapi.Expand(req.URL, map[string]string{
  2063. "queryId": strconv.FormatInt(c.queryId, 10),
  2064. })
  2065. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2066. }
  2067. // Do executes the "doubleclickbidmanager.queries.getquery" call.
  2068. // Exactly one of *Query or error will be non-nil. Any non-2xx status
  2069. // code is an error. Response headers are in either
  2070. // *Query.ServerResponse.Header or (if a response was returned at all)
  2071. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2072. // check whether the returned error was because http.StatusNotModified
  2073. // was returned.
  2074. func (c *QueriesGetqueryCall) Do(opts ...googleapi.CallOption) (*Query, error) {
  2075. gensupport.SetOptions(c.urlParams_, opts...)
  2076. res, err := c.doRequest("json")
  2077. if res != nil && res.StatusCode == http.StatusNotModified {
  2078. if res.Body != nil {
  2079. res.Body.Close()
  2080. }
  2081. return nil, &googleapi.Error{
  2082. Code: res.StatusCode,
  2083. Header: res.Header,
  2084. }
  2085. }
  2086. if err != nil {
  2087. return nil, err
  2088. }
  2089. defer googleapi.CloseBody(res)
  2090. if err := googleapi.CheckResponse(res); err != nil {
  2091. return nil, err
  2092. }
  2093. ret := &Query{
  2094. ServerResponse: googleapi.ServerResponse{
  2095. Header: res.Header,
  2096. HTTPStatusCode: res.StatusCode,
  2097. },
  2098. }
  2099. target := &ret
  2100. if err := gensupport.DecodeResponse(target, res); err != nil {
  2101. return nil, err
  2102. }
  2103. return ret, nil
  2104. // {
  2105. // "description": "Retrieves a stored query.",
  2106. // "httpMethod": "GET",
  2107. // "id": "doubleclickbidmanager.queries.getquery",
  2108. // "parameterOrder": [
  2109. // "queryId"
  2110. // ],
  2111. // "parameters": {
  2112. // "queryId": {
  2113. // "description": "Query ID to retrieve.",
  2114. // "format": "int64",
  2115. // "location": "path",
  2116. // "required": true,
  2117. // "type": "string"
  2118. // }
  2119. // },
  2120. // "path": "query/{queryId}",
  2121. // "response": {
  2122. // "$ref": "Query"
  2123. // },
  2124. // "scopes": [
  2125. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  2126. // ]
  2127. // }
  2128. }
  2129. // method id "doubleclickbidmanager.queries.listqueries":
  2130. type QueriesListqueriesCall struct {
  2131. s *Service
  2132. urlParams_ gensupport.URLParams
  2133. ifNoneMatch_ string
  2134. ctx_ context.Context
  2135. header_ http.Header
  2136. }
  2137. // Listqueries: Retrieves stored queries.
  2138. func (r *QueriesService) Listqueries() *QueriesListqueriesCall {
  2139. c := &QueriesListqueriesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2140. return c
  2141. }
  2142. // Fields allows partial responses to be retrieved. See
  2143. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2144. // for more information.
  2145. func (c *QueriesListqueriesCall) Fields(s ...googleapi.Field) *QueriesListqueriesCall {
  2146. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2147. return c
  2148. }
  2149. // IfNoneMatch sets the optional parameter which makes the operation
  2150. // fail if the object's ETag matches the given value. This is useful for
  2151. // getting updates only after the object has changed since the last
  2152. // request. Use googleapi.IsNotModified to check whether the response
  2153. // error from Do is the result of In-None-Match.
  2154. func (c *QueriesListqueriesCall) IfNoneMatch(entityTag string) *QueriesListqueriesCall {
  2155. c.ifNoneMatch_ = entityTag
  2156. return c
  2157. }
  2158. // Context sets the context to be used in this call's Do method. Any
  2159. // pending HTTP request will be aborted if the provided context is
  2160. // canceled.
  2161. func (c *QueriesListqueriesCall) Context(ctx context.Context) *QueriesListqueriesCall {
  2162. c.ctx_ = ctx
  2163. return c
  2164. }
  2165. // Header returns an http.Header that can be modified by the caller to
  2166. // add HTTP headers to the request.
  2167. func (c *QueriesListqueriesCall) Header() http.Header {
  2168. if c.header_ == nil {
  2169. c.header_ = make(http.Header)
  2170. }
  2171. return c.header_
  2172. }
  2173. func (c *QueriesListqueriesCall) doRequest(alt string) (*http.Response, error) {
  2174. reqHeaders := make(http.Header)
  2175. for k, v := range c.header_ {
  2176. reqHeaders[k] = v
  2177. }
  2178. reqHeaders.Set("User-Agent", c.s.userAgent())
  2179. if c.ifNoneMatch_ != "" {
  2180. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2181. }
  2182. var body io.Reader = nil
  2183. c.urlParams_.Set("alt", alt)
  2184. c.urlParams_.Set("prettyPrint", "false")
  2185. urls := googleapi.ResolveRelative(c.s.BasePath, "queries")
  2186. urls += "?" + c.urlParams_.Encode()
  2187. req, err := http.NewRequest("GET", urls, body)
  2188. if err != nil {
  2189. return nil, err
  2190. }
  2191. req.Header = reqHeaders
  2192. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2193. }
  2194. // Do executes the "doubleclickbidmanager.queries.listqueries" call.
  2195. // Exactly one of *ListQueriesResponse or error will be non-nil. Any
  2196. // non-2xx status code is an error. Response headers are in either
  2197. // *ListQueriesResponse.ServerResponse.Header or (if a response was
  2198. // returned at all) in error.(*googleapi.Error).Header. Use
  2199. // googleapi.IsNotModified to check whether the returned error was
  2200. // because http.StatusNotModified was returned.
  2201. func (c *QueriesListqueriesCall) Do(opts ...googleapi.CallOption) (*ListQueriesResponse, error) {
  2202. gensupport.SetOptions(c.urlParams_, opts...)
  2203. res, err := c.doRequest("json")
  2204. if res != nil && res.StatusCode == http.StatusNotModified {
  2205. if res.Body != nil {
  2206. res.Body.Close()
  2207. }
  2208. return nil, &googleapi.Error{
  2209. Code: res.StatusCode,
  2210. Header: res.Header,
  2211. }
  2212. }
  2213. if err != nil {
  2214. return nil, err
  2215. }
  2216. defer googleapi.CloseBody(res)
  2217. if err := googleapi.CheckResponse(res); err != nil {
  2218. return nil, err
  2219. }
  2220. ret := &ListQueriesResponse{
  2221. ServerResponse: googleapi.ServerResponse{
  2222. Header: res.Header,
  2223. HTTPStatusCode: res.StatusCode,
  2224. },
  2225. }
  2226. target := &ret
  2227. if err := gensupport.DecodeResponse(target, res); err != nil {
  2228. return nil, err
  2229. }
  2230. return ret, nil
  2231. // {
  2232. // "description": "Retrieves stored queries.",
  2233. // "httpMethod": "GET",
  2234. // "id": "doubleclickbidmanager.queries.listqueries",
  2235. // "path": "queries",
  2236. // "response": {
  2237. // "$ref": "ListQueriesResponse"
  2238. // },
  2239. // "scopes": [
  2240. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  2241. // ]
  2242. // }
  2243. }
  2244. // method id "doubleclickbidmanager.queries.runquery":
  2245. type QueriesRunqueryCall struct {
  2246. s *Service
  2247. queryId int64
  2248. runqueryrequest *RunQueryRequest
  2249. urlParams_ gensupport.URLParams
  2250. ctx_ context.Context
  2251. header_ http.Header
  2252. }
  2253. // Runquery: Runs a stored query to generate a report.
  2254. func (r *QueriesService) Runquery(queryId int64, runqueryrequest *RunQueryRequest) *QueriesRunqueryCall {
  2255. c := &QueriesRunqueryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2256. c.queryId = queryId
  2257. c.runqueryrequest = runqueryrequest
  2258. return c
  2259. }
  2260. // Fields allows partial responses to be retrieved. See
  2261. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2262. // for more information.
  2263. func (c *QueriesRunqueryCall) Fields(s ...googleapi.Field) *QueriesRunqueryCall {
  2264. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2265. return c
  2266. }
  2267. // Context sets the context to be used in this call's Do method. Any
  2268. // pending HTTP request will be aborted if the provided context is
  2269. // canceled.
  2270. func (c *QueriesRunqueryCall) Context(ctx context.Context) *QueriesRunqueryCall {
  2271. c.ctx_ = ctx
  2272. return c
  2273. }
  2274. // Header returns an http.Header that can be modified by the caller to
  2275. // add HTTP headers to the request.
  2276. func (c *QueriesRunqueryCall) Header() http.Header {
  2277. if c.header_ == nil {
  2278. c.header_ = make(http.Header)
  2279. }
  2280. return c.header_
  2281. }
  2282. func (c *QueriesRunqueryCall) doRequest(alt string) (*http.Response, error) {
  2283. reqHeaders := make(http.Header)
  2284. for k, v := range c.header_ {
  2285. reqHeaders[k] = v
  2286. }
  2287. reqHeaders.Set("User-Agent", c.s.userAgent())
  2288. var body io.Reader = nil
  2289. body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
  2290. if err != nil {
  2291. return nil, err
  2292. }
  2293. reqHeaders.Set("Content-Type", "application/json")
  2294. c.urlParams_.Set("alt", alt)
  2295. c.urlParams_.Set("prettyPrint", "false")
  2296. urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
  2297. urls += "?" + c.urlParams_.Encode()
  2298. req, err := http.NewRequest("POST", urls, body)
  2299. if err != nil {
  2300. return nil, err
  2301. }
  2302. req.Header = reqHeaders
  2303. googleapi.Expand(req.URL, map[string]string{
  2304. "queryId": strconv.FormatInt(c.queryId, 10),
  2305. })
  2306. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2307. }
  2308. // Do executes the "doubleclickbidmanager.queries.runquery" call.
  2309. func (c *QueriesRunqueryCall) Do(opts ...googleapi.CallOption) error {
  2310. gensupport.SetOptions(c.urlParams_, opts...)
  2311. res, err := c.doRequest("json")
  2312. if err != nil {
  2313. return err
  2314. }
  2315. defer googleapi.CloseBody(res)
  2316. if err := googleapi.CheckResponse(res); err != nil {
  2317. return err
  2318. }
  2319. return nil
  2320. // {
  2321. // "description": "Runs a stored query to generate a report.",
  2322. // "httpMethod": "POST",
  2323. // "id": "doubleclickbidmanager.queries.runquery",
  2324. // "parameterOrder": [
  2325. // "queryId"
  2326. // ],
  2327. // "parameters": {
  2328. // "queryId": {
  2329. // "description": "Query ID to run.",
  2330. // "format": "int64",
  2331. // "location": "path",
  2332. // "required": true,
  2333. // "type": "string"
  2334. // }
  2335. // },
  2336. // "path": "query/{queryId}",
  2337. // "request": {
  2338. // "$ref": "RunQueryRequest"
  2339. // },
  2340. // "scopes": [
  2341. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  2342. // ]
  2343. // }
  2344. }
  2345. // method id "doubleclickbidmanager.reports.listreports":
  2346. type ReportsListreportsCall struct {
  2347. s *Service
  2348. queryId int64
  2349. urlParams_ gensupport.URLParams
  2350. ifNoneMatch_ string
  2351. ctx_ context.Context
  2352. header_ http.Header
  2353. }
  2354. // Listreports: Retrieves stored reports.
  2355. func (r *ReportsService) Listreports(queryId int64) *ReportsListreportsCall {
  2356. c := &ReportsListreportsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2357. c.queryId = queryId
  2358. return c
  2359. }
  2360. // Fields allows partial responses to be retrieved. See
  2361. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2362. // for more information.
  2363. func (c *ReportsListreportsCall) Fields(s ...googleapi.Field) *ReportsListreportsCall {
  2364. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2365. return c
  2366. }
  2367. // IfNoneMatch sets the optional parameter which makes the operation
  2368. // fail if the object's ETag matches the given value. This is useful for
  2369. // getting updates only after the object has changed since the last
  2370. // request. Use googleapi.IsNotModified to check whether the response
  2371. // error from Do is the result of In-None-Match.
  2372. func (c *ReportsListreportsCall) IfNoneMatch(entityTag string) *ReportsListreportsCall {
  2373. c.ifNoneMatch_ = entityTag
  2374. return c
  2375. }
  2376. // Context sets the context to be used in this call's Do method. Any
  2377. // pending HTTP request will be aborted if the provided context is
  2378. // canceled.
  2379. func (c *ReportsListreportsCall) Context(ctx context.Context) *ReportsListreportsCall {
  2380. c.ctx_ = ctx
  2381. return c
  2382. }
  2383. // Header returns an http.Header that can be modified by the caller to
  2384. // add HTTP headers to the request.
  2385. func (c *ReportsListreportsCall) Header() http.Header {
  2386. if c.header_ == nil {
  2387. c.header_ = make(http.Header)
  2388. }
  2389. return c.header_
  2390. }
  2391. func (c *ReportsListreportsCall) doRequest(alt string) (*http.Response, error) {
  2392. reqHeaders := make(http.Header)
  2393. for k, v := range c.header_ {
  2394. reqHeaders[k] = v
  2395. }
  2396. reqHeaders.Set("User-Agent", c.s.userAgent())
  2397. if c.ifNoneMatch_ != "" {
  2398. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2399. }
  2400. var body io.Reader = nil
  2401. c.urlParams_.Set("alt", alt)
  2402. c.urlParams_.Set("prettyPrint", "false")
  2403. urls := googleapi.ResolveRelative(c.s.BasePath, "queries/{queryId}/reports")
  2404. urls += "?" + c.urlParams_.Encode()
  2405. req, err := http.NewRequest("GET", urls, body)
  2406. if err != nil {
  2407. return nil, err
  2408. }
  2409. req.Header = reqHeaders
  2410. googleapi.Expand(req.URL, map[string]string{
  2411. "queryId": strconv.FormatInt(c.queryId, 10),
  2412. })
  2413. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2414. }
  2415. // Do executes the "doubleclickbidmanager.reports.listreports" call.
  2416. // Exactly one of *ListReportsResponse or error will be non-nil. Any
  2417. // non-2xx status code is an error. Response headers are in either
  2418. // *ListReportsResponse.ServerResponse.Header or (if a response was
  2419. // returned at all) in error.(*googleapi.Error).Header. Use
  2420. // googleapi.IsNotModified to check whether the returned error was
  2421. // because http.StatusNotModified was returned.
  2422. func (c *ReportsListreportsCall) Do(opts ...googleapi.CallOption) (*ListReportsResponse, error) {
  2423. gensupport.SetOptions(c.urlParams_, opts...)
  2424. res, err := c.doRequest("json")
  2425. if res != nil && res.StatusCode == http.StatusNotModified {
  2426. if res.Body != nil {
  2427. res.Body.Close()
  2428. }
  2429. return nil, &googleapi.Error{
  2430. Code: res.StatusCode,
  2431. Header: res.Header,
  2432. }
  2433. }
  2434. if err != nil {
  2435. return nil, err
  2436. }
  2437. defer googleapi.CloseBody(res)
  2438. if err := googleapi.CheckResponse(res); err != nil {
  2439. return nil, err
  2440. }
  2441. ret := &ListReportsResponse{
  2442. ServerResponse: googleapi.ServerResponse{
  2443. Header: res.Header,
  2444. HTTPStatusCode: res.StatusCode,
  2445. },
  2446. }
  2447. target := &ret
  2448. if err := gensupport.DecodeResponse(target, res); err != nil {
  2449. return nil, err
  2450. }
  2451. return ret, nil
  2452. // {
  2453. // "description": "Retrieves stored reports.",
  2454. // "httpMethod": "GET",
  2455. // "id": "doubleclickbidmanager.reports.listreports",
  2456. // "parameterOrder": [
  2457. // "queryId"
  2458. // ],
  2459. // "parameters": {
  2460. // "queryId": {
  2461. // "description": "Query ID with which the reports are associated.",
  2462. // "format": "int64",
  2463. // "location": "path",
  2464. // "required": true,
  2465. // "type": "string"
  2466. // }
  2467. // },
  2468. // "path": "queries/{queryId}/reports",
  2469. // "response": {
  2470. // "$ref": "ListReportsResponse"
  2471. // },
  2472. // "scopes": [
  2473. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  2474. // ]
  2475. // }
  2476. }
  2477. // method id "doubleclickbidmanager.sdf.download":
  2478. type SdfDownloadCall struct {
  2479. s *Service
  2480. downloadrequest *DownloadRequest
  2481. urlParams_ gensupport.URLParams
  2482. ctx_ context.Context
  2483. header_ http.Header
  2484. }
  2485. // Download: Retrieves entities in SDF format.
  2486. func (r *SdfService) Download(downloadrequest *DownloadRequest) *SdfDownloadCall {
  2487. c := &SdfDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2488. c.downloadrequest = downloadrequest
  2489. return c
  2490. }
  2491. // Fields allows partial responses to be retrieved. See
  2492. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2493. // for more information.
  2494. func (c *SdfDownloadCall) Fields(s ...googleapi.Field) *SdfDownloadCall {
  2495. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2496. return c
  2497. }
  2498. // Context sets the context to be used in this call's Do method. Any
  2499. // pending HTTP request will be aborted if the provided context is
  2500. // canceled.
  2501. func (c *SdfDownloadCall) Context(ctx context.Context) *SdfDownloadCall {
  2502. c.ctx_ = ctx
  2503. return c
  2504. }
  2505. // Header returns an http.Header that can be modified by the caller to
  2506. // add HTTP headers to the request.
  2507. func (c *SdfDownloadCall) Header() http.Header {
  2508. if c.header_ == nil {
  2509. c.header_ = make(http.Header)
  2510. }
  2511. return c.header_
  2512. }
  2513. func (c *SdfDownloadCall) doRequest(alt string) (*http.Response, error) {
  2514. reqHeaders := make(http.Header)
  2515. for k, v := range c.header_ {
  2516. reqHeaders[k] = v
  2517. }
  2518. reqHeaders.Set("User-Agent", c.s.userAgent())
  2519. var body io.Reader = nil
  2520. body, err := googleapi.WithoutDataWrapper.JSONReader(c.downloadrequest)
  2521. if err != nil {
  2522. return nil, err
  2523. }
  2524. reqHeaders.Set("Content-Type", "application/json")
  2525. c.urlParams_.Set("alt", alt)
  2526. c.urlParams_.Set("prettyPrint", "false")
  2527. urls := googleapi.ResolveRelative(c.s.BasePath, "sdf/download")
  2528. urls += "?" + c.urlParams_.Encode()
  2529. req, err := http.NewRequest("POST", urls, body)
  2530. if err != nil {
  2531. return nil, err
  2532. }
  2533. req.Header = reqHeaders
  2534. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2535. }
  2536. // Do executes the "doubleclickbidmanager.sdf.download" call.
  2537. // Exactly one of *DownloadResponse or error will be non-nil. Any
  2538. // non-2xx status code is an error. Response headers are in either
  2539. // *DownloadResponse.ServerResponse.Header or (if a response was
  2540. // returned at all) in error.(*googleapi.Error).Header. Use
  2541. // googleapi.IsNotModified to check whether the returned error was
  2542. // because http.StatusNotModified was returned.
  2543. func (c *SdfDownloadCall) Do(opts ...googleapi.CallOption) (*DownloadResponse, error) {
  2544. gensupport.SetOptions(c.urlParams_, opts...)
  2545. res, err := c.doRequest("json")
  2546. if res != nil && res.StatusCode == http.StatusNotModified {
  2547. if res.Body != nil {
  2548. res.Body.Close()
  2549. }
  2550. return nil, &googleapi.Error{
  2551. Code: res.StatusCode,
  2552. Header: res.Header,
  2553. }
  2554. }
  2555. if err != nil {
  2556. return nil, err
  2557. }
  2558. defer googleapi.CloseBody(res)
  2559. if err := googleapi.CheckResponse(res); err != nil {
  2560. return nil, err
  2561. }
  2562. ret := &DownloadResponse{
  2563. ServerResponse: googleapi.ServerResponse{
  2564. Header: res.Header,
  2565. HTTPStatusCode: res.StatusCode,
  2566. },
  2567. }
  2568. target := &ret
  2569. if err := gensupport.DecodeResponse(target, res); err != nil {
  2570. return nil, err
  2571. }
  2572. return ret, nil
  2573. // {
  2574. // "description": "Retrieves entities in SDF format.",
  2575. // "httpMethod": "POST",
  2576. // "id": "doubleclickbidmanager.sdf.download",
  2577. // "path": "sdf/download",
  2578. // "request": {
  2579. // "$ref": "DownloadRequest"
  2580. // },
  2581. // "response": {
  2582. // "$ref": "DownloadResponse"
  2583. // },
  2584. // "scopes": [
  2585. // "https://www.googleapis.com/auth/doubleclickbidmanager"
  2586. // ]
  2587. // }
  2588. }