PageRenderTime 61ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/webui/google-api/contrib/apiAdsenseService.php

https://bitbucket.org/sailsdigital/piler-remi
PHP | 1178 lines | 736 code | 65 blank | 377 comment | 40 complexity | 0b4534ca3fc79d145b082014d70f637c MD5 | raw file
Possible License(s): GPL-3.0

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. * Copyright (c) 2010 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. require_once 'service/apiModel.php';
  18. require_once 'service/apiService.php';
  19. require_once 'service/apiServiceRequest.php';
  20. /**
  21. * The "urlchannels" collection of methods.
  22. * Typical usage is:
  23. * <code>
  24. * $adsenseService = new apiAdsenseService(...);
  25. * $urlchannels = $adsenseService->urlchannels;
  26. * </code>
  27. */
  28. class UrlchannelsServiceResource extends apiServiceResource {
  29. /**
  30. * List all URL channels in the specified ad client for this AdSense account. (urlchannels.list)
  31. *
  32. * @param string $adClientId Ad client for which to list URL channels.
  33. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  34. *
  35. * @opt_param string pageToken A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  36. * @opt_param int maxResults The maximum number of URL channels to include in the response, used for paging.
  37. * @return UrlChannels
  38. */
  39. public function listUrlchannels($adClientId, $optParams = array()) {
  40. $params = array('adClientId' => $adClientId);
  41. $params = array_merge($params, $optParams);
  42. $data = $this->__call('list', array($params));
  43. if ($this->useObjects()) {
  44. return new UrlChannels($data);
  45. } else {
  46. return $data;
  47. }
  48. }
  49. }
  50. /**
  51. * The "adunits" collection of methods.
  52. * Typical usage is:
  53. * <code>
  54. * $adsenseService = new apiAdsenseService(...);
  55. * $adunits = $adsenseService->adunits;
  56. * </code>
  57. */
  58. class AdunitsServiceResource extends apiServiceResource {
  59. /**
  60. * List all ad units in the specified ad client for this AdSense account. (adunits.list)
  61. *
  62. * @param string $adClientId Ad client for which to list ad units.
  63. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  64. *
  65. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true.
  66. * @opt_param string pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  67. * @opt_param int maxResults The maximum number of ad units to include in the response, used for paging.
  68. * @return AdUnits
  69. */
  70. public function listAdunits($adClientId, $optParams = array()) {
  71. $params = array('adClientId' => $adClientId);
  72. $params = array_merge($params, $optParams);
  73. $data = $this->__call('list', array($params));
  74. if ($this->useObjects()) {
  75. return new AdUnits($data);
  76. } else {
  77. return $data;
  78. }
  79. }
  80. /**
  81. * Gets the specified ad unit in the specified ad client. (adunits.get)
  82. *
  83. * @param string $adClientId Ad client for which to get the ad unit.
  84. * @param string $adUnitId Ad unit to retrieve.
  85. * @return AdUnit
  86. */
  87. public function get($adClientId, $adUnitId, $optParams = array()) {
  88. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId);
  89. $params = array_merge($params, $optParams);
  90. $data = $this->__call('get', array($params));
  91. if ($this->useObjects()) {
  92. return new AdUnit($data);
  93. } else {
  94. return $data;
  95. }
  96. }
  97. }
  98. /**
  99. * The "customchannels" collection of methods.
  100. * Typical usage is:
  101. * <code>
  102. * $adsenseService = new apiAdsenseService(...);
  103. * $customchannels = $adsenseService->customchannels;
  104. * </code>
  105. */
  106. class AdunitsCustomchannelsServiceResource extends apiServiceResource {
  107. /**
  108. * List all custom channels which the specified ad unit belongs to. (customchannels.list)
  109. *
  110. * @param string $adClientId Ad client which contains the ad unit.
  111. * @param string $adUnitId Ad unit for which to list custom channels.
  112. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  113. *
  114. * @opt_param string pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  115. * @opt_param int maxResults The maximum number of custom channels to include in the response, used for paging.
  116. * @return CustomChannels
  117. */
  118. public function listAdunitsCustomchannels($adClientId, $adUnitId, $optParams = array()) {
  119. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId);
  120. $params = array_merge($params, $optParams);
  121. $data = $this->__call('list', array($params));
  122. if ($this->useObjects()) {
  123. return new CustomChannels($data);
  124. } else {
  125. return $data;
  126. }
  127. }
  128. }
  129. /**
  130. * The "adclients" collection of methods.
  131. * Typical usage is:
  132. * <code>
  133. * $adsenseService = new apiAdsenseService(...);
  134. * $adclients = $adsenseService->adclients;
  135. * </code>
  136. */
  137. class AdclientsServiceResource extends apiServiceResource {
  138. /**
  139. * List all ad clients in this AdSense account. (adclients.list)
  140. *
  141. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  142. *
  143. * @opt_param string pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  144. * @opt_param int maxResults The maximum number of ad clients to include in the response, used for paging.
  145. * @return AdClients
  146. */
  147. public function listAdclients($optParams = array()) {
  148. $params = array();
  149. $params = array_merge($params, $optParams);
  150. $data = $this->__call('list', array($params));
  151. if ($this->useObjects()) {
  152. return new AdClients($data);
  153. } else {
  154. return $data;
  155. }
  156. }
  157. }
  158. /**
  159. * The "reports" collection of methods.
  160. * Typical usage is:
  161. * <code>
  162. * $adsenseService = new apiAdsenseService(...);
  163. * $reports = $adsenseService->reports;
  164. * </code>
  165. */
  166. class ReportsServiceResource extends apiServiceResource {
  167. /**
  168. * Generate an AdSense report based on the report request sent in the query parameters. Returns the
  169. * result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
  170. * (reports.generate)
  171. *
  172. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
  173. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive.
  174. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  175. *
  176. * @opt_param string sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
  177. * @opt_param string locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
  178. * @opt_param string metric Numeric columns to include in the report.
  179. * @opt_param int maxResults The maximum number of rows of report data to return.
  180. * @opt_param string filter Filters to be run on the report.
  181. * @opt_param string currency Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set.
  182. * @opt_param int startIndex Index of the first row of report data to return.
  183. * @opt_param string dimension Dimensions to base the report on.
  184. * @opt_param string accountId Accounts upon which to report.
  185. * @return AdsenseReportsGenerateResponse
  186. */
  187. public function generate($startDate, $endDate, $optParams = array()) {
  188. $params = array('startDate' => $startDate, 'endDate' => $endDate);
  189. $params = array_merge($params, $optParams);
  190. $data = $this->__call('generate', array($params));
  191. if ($this->useObjects()) {
  192. return new AdsenseReportsGenerateResponse($data);
  193. } else {
  194. return $data;
  195. }
  196. }
  197. }
  198. /**
  199. * The "accounts" collection of methods.
  200. * Typical usage is:
  201. * <code>
  202. * $adsenseService = new apiAdsenseService(...);
  203. * $accounts = $adsenseService->accounts;
  204. * </code>
  205. */
  206. class AccountsServiceResource extends apiServiceResource {
  207. /**
  208. * List all accounts available to this AdSense account. (accounts.list)
  209. *
  210. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  211. *
  212. * @opt_param string pageToken A continuation token, used to page through accounts. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  213. * @opt_param int maxResults The maximum number of accounts to include in the response, used for paging.
  214. * @return Accounts
  215. */
  216. public function listAccounts($optParams = array()) {
  217. $params = array();
  218. $params = array_merge($params, $optParams);
  219. $data = $this->__call('list', array($params));
  220. if ($this->useObjects()) {
  221. return new Accounts($data);
  222. } else {
  223. return $data;
  224. }
  225. }
  226. /**
  227. * Get information about the selected AdSense account. (accounts.get)
  228. *
  229. * @param string $accountId Account to get information about.
  230. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  231. *
  232. * @opt_param bool tree Whether the tree of sub accounts should be returned.
  233. * @return Account
  234. */
  235. public function get($accountId, $optParams = array()) {
  236. $params = array('accountId' => $accountId);
  237. $params = array_merge($params, $optParams);
  238. $data = $this->__call('get', array($params));
  239. if ($this->useObjects()) {
  240. return new Account($data);
  241. } else {
  242. return $data;
  243. }
  244. }
  245. }
  246. /**
  247. * The "urlchannels" collection of methods.
  248. * Typical usage is:
  249. * <code>
  250. * $adsenseService = new apiAdsenseService(...);
  251. * $urlchannels = $adsenseService->urlchannels;
  252. * </code>
  253. */
  254. class AccountsUrlchannelsServiceResource extends apiServiceResource {
  255. /**
  256. * List all URL channels in the specified ad client for the specified account. (urlchannels.list)
  257. *
  258. * @param string $accountId Account to which the ad client belongs.
  259. * @param string $adClientId Ad client for which to list URL channels.
  260. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  261. *
  262. * @opt_param string pageToken A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  263. * @opt_param int maxResults The maximum number of URL channels to include in the response, used for paging.
  264. * @return UrlChannels
  265. */
  266. public function listAccountsUrlchannels($accountId, $adClientId, $optParams = array()) {
  267. $params = array('accountId' => $accountId, 'adClientId' => $adClientId);
  268. $params = array_merge($params, $optParams);
  269. $data = $this->__call('list', array($params));
  270. if ($this->useObjects()) {
  271. return new UrlChannels($data);
  272. } else {
  273. return $data;
  274. }
  275. }
  276. }
  277. /**
  278. * The "adunits" collection of methods.
  279. * Typical usage is:
  280. * <code>
  281. * $adsenseService = new apiAdsenseService(...);
  282. * $adunits = $adsenseService->adunits;
  283. * </code>
  284. */
  285. class AccountsAdunitsServiceResource extends apiServiceResource {
  286. /**
  287. * List all ad units in the specified ad client for the specified account. (adunits.list)
  288. *
  289. * @param string $accountId Account to which the ad client belongs.
  290. * @param string $adClientId Ad client for which to list ad units.
  291. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  292. *
  293. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true.
  294. * @opt_param string pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  295. * @opt_param int maxResults The maximum number of ad units to include in the response, used for paging.
  296. * @return AdUnits
  297. */
  298. public function listAccountsAdunits($accountId, $adClientId, $optParams = array()) {
  299. $params = array('accountId' => $accountId, 'adClientId' => $adClientId);
  300. $params = array_merge($params, $optParams);
  301. $data = $this->__call('list', array($params));
  302. if ($this->useObjects()) {
  303. return new AdUnits($data);
  304. } else {
  305. return $data;
  306. }
  307. }
  308. /**
  309. * Gets the specified ad unit in the specified ad client for the specified account. (adunits.get)
  310. *
  311. * @param string $accountId Account to which the ad client belongs.
  312. * @param string $adClientId Ad client for which to get the ad unit.
  313. * @param string $adUnitId Ad unit to retrieve.
  314. * @return AdUnit
  315. */
  316. public function get($accountId, $adClientId, $adUnitId, $optParams = array()) {
  317. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId);
  318. $params = array_merge($params, $optParams);
  319. $data = $this->__call('get', array($params));
  320. if ($this->useObjects()) {
  321. return new AdUnit($data);
  322. } else {
  323. return $data;
  324. }
  325. }
  326. }
  327. /**
  328. * The "customchannels" collection of methods.
  329. * Typical usage is:
  330. * <code>
  331. * $adsenseService = new apiAdsenseService(...);
  332. * $customchannels = $adsenseService->customchannels;
  333. * </code>
  334. */
  335. class AccountsAdunitsCustomchannelsServiceResource extends apiServiceResource {
  336. /**
  337. * List all custom channels which the specified ad unit belongs to. (customchannels.list)
  338. *
  339. * @param string $accountId Account to which the ad client belongs.
  340. * @param string $adClientId Ad client which contains the ad unit.
  341. * @param string $adUnitId Ad unit for which to list custom channels.
  342. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  343. *
  344. * @opt_param string pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  345. * @opt_param int maxResults The maximum number of custom channels to include in the response, used for paging.
  346. * @return CustomChannels
  347. */
  348. public function listAccountsAdunitsCustomchannels($accountId, $adClientId, $adUnitId, $optParams = array()) {
  349. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId);
  350. $params = array_merge($params, $optParams);
  351. $data = $this->__call('list', array($params));
  352. if ($this->useObjects()) {
  353. return new CustomChannels($data);
  354. } else {
  355. return $data;
  356. }
  357. }
  358. }
  359. /**
  360. * The "adclients" collection of methods.
  361. * Typical usage is:
  362. * <code>
  363. * $adsenseService = new apiAdsenseService(...);
  364. * $adclients = $adsenseService->adclients;
  365. * </code>
  366. */
  367. class AccountsAdclientsServiceResource extends apiServiceResource {
  368. /**
  369. * List all ad clients in the specified account. (adclients.list)
  370. *
  371. * @param string $accountId Account for which to list ad clients.
  372. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  373. *
  374. * @opt_param string pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  375. * @opt_param int maxResults The maximum number of ad clients to include in the response, used for paging.
  376. * @return AdClients
  377. */
  378. public function listAccountsAdclients($accountId, $optParams = array()) {
  379. $params = array('accountId' => $accountId);
  380. $params = array_merge($params, $optParams);
  381. $data = $this->__call('list', array($params));
  382. if ($this->useObjects()) {
  383. return new AdClients($data);
  384. } else {
  385. return $data;
  386. }
  387. }
  388. }
  389. /**
  390. * The "reports" collection of methods.
  391. * Typical usage is:
  392. * <code>
  393. * $adsenseService = new apiAdsenseService(...);
  394. * $reports = $adsenseService->reports;
  395. * </code>
  396. */
  397. class AccountsReportsServiceResource extends apiServiceResource {
  398. /**
  399. * Generate an AdSense report based on the report request sent in the query parameters. Returns the
  400. * result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
  401. * (reports.generate)
  402. *
  403. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
  404. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive.
  405. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  406. *
  407. * @opt_param string accountId Account upon which to report.
  408. * @opt_param string sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
  409. * @opt_param string locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
  410. * @opt_param string metric Numeric columns to include in the report.
  411. * @opt_param int maxResults The maximum number of rows of report data to return.
  412. * @opt_param string filter Filters to be run on the report.
  413. * @opt_param string currency Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set.
  414. * @opt_param int startIndex Index of the first row of report data to return.
  415. * @opt_param string dimension Dimensions to base the report on.
  416. * @return AdsenseReportsGenerateResponse
  417. */
  418. public function generate($startDate, $endDate, $optParams = array()) {
  419. $params = array('startDate' => $startDate, 'endDate' => $endDate);
  420. $params = array_merge($params, $optParams);
  421. $data = $this->__call('generate', array($params));
  422. if ($this->useObjects()) {
  423. return new AdsenseReportsGenerateResponse($data);
  424. } else {
  425. return $data;
  426. }
  427. }
  428. }
  429. /**
  430. * The "customchannels" collection of methods.
  431. * Typical usage is:
  432. * <code>
  433. * $adsenseService = new apiAdsenseService(...);
  434. * $customchannels = $adsenseService->customchannels;
  435. * </code>
  436. */
  437. class AccountsCustomchannelsServiceResource extends apiServiceResource {
  438. /**
  439. * List all custom channels in the specified ad client for the specified account.
  440. * (customchannels.list)
  441. *
  442. * @param string $accountId Account to which the ad client belongs.
  443. * @param string $adClientId Ad client for which to list custom channels.
  444. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  445. *
  446. * @opt_param string pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  447. * @opt_param int maxResults The maximum number of custom channels to include in the response, used for paging.
  448. * @return CustomChannels
  449. */
  450. public function listAccountsCustomchannels($accountId, $adClientId, $optParams = array()) {
  451. $params = array('accountId' => $accountId, 'adClientId' => $adClientId);
  452. $params = array_merge($params, $optParams);
  453. $data = $this->__call('list', array($params));
  454. if ($this->useObjects()) {
  455. return new CustomChannels($data);
  456. } else {
  457. return $data;
  458. }
  459. }
  460. /**
  461. * Get the specified custom channel from the specified ad client for the specified account.
  462. * (customchannels.get)
  463. *
  464. * @param string $accountId Account to which the ad client belongs.
  465. * @param string $adClientId Ad client which contains the custom channel.
  466. * @param string $customChannelId Custom channel to retrieve.
  467. * @return CustomChannel
  468. */
  469. public function get($accountId, $adClientId, $customChannelId, $optParams = array()) {
  470. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'customChannelId' => $customChannelId);
  471. $params = array_merge($params, $optParams);
  472. $data = $this->__call('get', array($params));
  473. if ($this->useObjects()) {
  474. return new CustomChannel($data);
  475. } else {
  476. return $data;
  477. }
  478. }
  479. }
  480. /**
  481. * The "adunits" collection of methods.
  482. * Typical usage is:
  483. * <code>
  484. * $adsenseService = new apiAdsenseService(...);
  485. * $adunits = $adsenseService->adunits;
  486. * </code>
  487. */
  488. class AccountsCustomchannelsAdunitsServiceResource extends apiServiceResource {
  489. /**
  490. * List all ad units in the specified custom channel. (adunits.list)
  491. *
  492. * @param string $accountId Account to which the ad client belongs.
  493. * @param string $adClientId Ad client which contains the custom channel.
  494. * @param string $customChannelId Custom channel for which to list ad units.
  495. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  496. *
  497. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true.
  498. * @opt_param int maxResults The maximum number of ad units to include in the response, used for paging.
  499. * @opt_param string pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  500. * @return AdUnits
  501. */
  502. public function listAccountsCustomchannelsAdunits($accountId, $adClientId, $customChannelId, $optParams = array()) {
  503. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'customChannelId' => $customChannelId);
  504. $params = array_merge($params, $optParams);
  505. $data = $this->__call('list', array($params));
  506. if ($this->useObjects()) {
  507. return new AdUnits($data);
  508. } else {
  509. return $data;
  510. }
  511. }
  512. }
  513. /**
  514. * The "customchannels" collection of methods.
  515. * Typical usage is:
  516. * <code>
  517. * $adsenseService = new apiAdsenseService(...);
  518. * $customchannels = $adsenseService->customchannels;
  519. * </code>
  520. */
  521. class CustomchannelsServiceResource extends apiServiceResource {
  522. /**
  523. * List all custom channels in the specified ad client for this AdSense account.
  524. * (customchannels.list)
  525. *
  526. * @param string $adClientId Ad client for which to list custom channels.
  527. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  528. *
  529. * @opt_param string pageToken A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  530. * @opt_param int maxResults The maximum number of custom channels to include in the response, used for paging.
  531. * @return CustomChannels
  532. */
  533. public function listCustomchannels($adClientId, $optParams = array()) {
  534. $params = array('adClientId' => $adClientId);
  535. $params = array_merge($params, $optParams);
  536. $data = $this->__call('list', array($params));
  537. if ($this->useObjects()) {
  538. return new CustomChannels($data);
  539. } else {
  540. return $data;
  541. }
  542. }
  543. /**
  544. * Get the specified custom channel from the specified ad client. (customchannels.get)
  545. *
  546. * @param string $adClientId Ad client which contains the custom channel.
  547. * @param string $customChannelId Custom channel to retrieve.
  548. * @return CustomChannel
  549. */
  550. public function get($adClientId, $customChannelId, $optParams = array()) {
  551. $params = array('adClientId' => $adClientId, 'customChannelId' => $customChannelId);
  552. $params = array_merge($params, $optParams);
  553. $data = $this->__call('get', array($params));
  554. if ($this->useObjects()) {
  555. return new CustomChannel($data);
  556. } else {
  557. return $data;
  558. }
  559. }
  560. }
  561. /**
  562. * The "adunits" collection of methods.
  563. * Typical usage is:
  564. * <code>
  565. * $adsenseService = new apiAdsenseService(...);
  566. * $adunits = $adsenseService->adunits;
  567. * </code>
  568. */
  569. class CustomchannelsAdunitsServiceResource extends apiServiceResource {
  570. /**
  571. * List all ad units in the specified custom channel. (adunits.list)
  572. *
  573. * @param string $adClientId Ad client which contains the custom channel.
  574. * @param string $customChannelId Custom channel for which to list ad units.
  575. * @param array $optParams Optional parameters. Valid optional parameters are listed below.
  576. *
  577. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true.
  578. * @opt_param string pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.
  579. * @opt_param int maxResults The maximum number of ad units to include in the response, used for paging.
  580. * @return AdUnits
  581. */
  582. public function listCustomchannelsAdunits($adClientId, $customChannelId, $optParams = array()) {
  583. $params = array('adClientId' => $adClientId, 'customChannelId' => $customChannelId);
  584. $params = array_merge($params, $optParams);
  585. $data = $this->__call('list', array($params));
  586. if ($this->useObjects()) {
  587. return new AdUnits($data);
  588. } else {
  589. return $data;
  590. }
  591. }
  592. }
  593. /**
  594. * Service definition for Adsense (v1.1).
  595. *
  596. * <p>
  597. * Gives AdSense publishers access to their inventory and the ability to generate reports
  598. * </p>
  599. *
  600. * <p>
  601. * For more information about this service, see the
  602. * <a href="https://code.google.com/apis/adsense/management/" target="_blank">API Documentation</a>
  603. * </p>
  604. *
  605. * @author Google, Inc.
  606. */
  607. class apiAdsenseService extends apiService {
  608. public $urlchannels;
  609. public $adunits;
  610. public $adunits_customchannels;
  611. public $adunits_customchannels_customchannels;
  612. public $adclients;
  613. public $reports;
  614. public $accounts;
  615. public $accounts_urlchannels;
  616. public $accounts_urlchannels_urlchannels;
  617. public $accounts_urlchannels_adunits;
  618. public $accounts_urlchannels_adclients;
  619. public $accounts_urlchannels_reports;
  620. public $accounts_urlchannels_customchannels;
  621. public $accounts_adunits;
  622. public $accounts_adunits_urlchannels;
  623. public $accounts_adunits_adunits;
  624. public $accounts_adunits_adclients;
  625. public $accounts_adunits_reports;
  626. public $accounts_adunits_customchannels;
  627. public $accounts_adclients;
  628. public $accounts_adclients_urlchannels;
  629. public $accounts_adclients_adunits;
  630. public $accounts_adclients_adclients;
  631. public $accounts_adclients_reports;
  632. public $accounts_adclients_customchannels;
  633. public $accounts_reports;
  634. public $accounts_reports_urlchannels;
  635. public $accounts_reports_adunits;
  636. public $accounts_reports_adclients;
  637. public $accounts_reports_reports;
  638. public $accounts_reports_customchannels;
  639. public $accounts_customchannels;
  640. public $accounts_customchannels_urlchannels;
  641. public $accounts_customchannels_adunits;
  642. public $accounts_customchannels_adclients;
  643. public $accounts_customchannels_reports;
  644. public $accounts_customchannels_customchannels;
  645. public $customchannels;
  646. public $customchannels_adunits;
  647. public $customchannels_adunits_adunits;
  648. /**
  649. * Constructs the internal representation of the Adsense service.
  650. *
  651. * @param apiClient apiClient
  652. */
  653. public function __construct(apiClient $apiClient) {
  654. $this->rpcPath = '/rpc';
  655. $this->restBasePath = '/adsense/v1.1/';
  656. $this->version = 'v1.1';
  657. $this->serviceName = 'adsense';
  658. $apiClient->addService($this->serviceName, $this->version);
  659. $this->urlchannels = new UrlchannelsServiceResource($this, $this->serviceName, 'urlchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.urlchannels.list", "httpMethod": "GET", "path": "adclients/{adClientId}/urlchannels", "response": {"$ref": "UrlChannels"}}}}', true));
  660. $this->adunits = new AdunitsServiceResource($this, $this->serviceName, 'adunits', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"includeInactive": {"type": "boolean", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.adunits.list", "httpMethod": "GET", "path": "adclients/{adClientId}/adunits", "response": {"$ref": "AdUnits"}}, "get": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"adClientId": {"required": true, "type": "string", "location": "path"}, "adUnitId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.adunits.get", "httpMethod": "GET", "path": "adclients/{adClientId}/adunits/{adUnitId}", "response": {"$ref": "AdUnit"}}}}', true));
  661. $this->adunits_customchannels = new AdunitsCustomchannelsServiceResource($this, $this->serviceName, 'customchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "adUnitId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.adunits.customchannels.list", "httpMethod": "GET", "path": "adclients/{adClientId}/adunits/{adUnitId}/customchannels", "response": {"$ref": "CustomChannels"}}}}', true));
  662. $this->adclients = new AdclientsServiceResource($this, $this->serviceName, 'adclients', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "response": {"$ref": "AdClients"}, "httpMethod": "GET", "path": "adclients", "id": "adsense.adclients.list"}}}', true));
  663. $this->reports = new ReportsServiceResource($this, $this->serviceName, 'reports', json_decode('{"methods": {"generate": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"sort": {"repeated": true, "type": "string", "location": "query"}, "startDate": {"required": true, "type": "string", "location": "query"}, "endDate": {"required": true, "type": "string", "location": "query"}, "locale": {"type": "string", "location": "query"}, "metric": {"repeated": true, "type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "50000", "minimum": "0", "location": "query", "type": "integer"}, "filter": {"repeated": true, "type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "int32", "maximum": "5000", "minimum": "0", "location": "query", "type": "integer"}, "dimension": {"repeated": true, "type": "string", "location": "query"}, "accountId": {"repeated": true, "type": "string", "location": "query"}}, "id": "adsense.reports.generate", "httpMethod": "GET", "path": "reports", "response": {"$ref": "AdsenseReportsGenerateResponse"}}}}', true));
  664. $this->accounts = new AccountsServiceResource($this, $this->serviceName, 'accounts', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "response": {"$ref": "Accounts"}, "httpMethod": "GET", "path": "accounts", "id": "adsense.accounts.list"}, "get": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"tree": {"type": "boolean", "location": "query"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.get", "httpMethod": "GET", "path": "accounts/{accountId}", "response": {"$ref": "Account"}}}}', true));
  665. $this->accounts_urlchannels = new AccountsUrlchannelsServiceResource($this, $this->serviceName, 'urlchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.urlchannels.list", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/urlchannels", "response": {"$ref": "UrlChannels"}}}}', true));
  666. $this->accounts_adunits = new AccountsAdunitsServiceResource($this, $this->serviceName, 'adunits', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"includeInactive": {"type": "boolean", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.adunits.list", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/adunits", "response": {"$ref": "AdUnits"}}, "get": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"adClientId": {"required": true, "type": "string", "location": "path"}, "adUnitId": {"required": true, "type": "string", "location": "path"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.adunits.get", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}", "response": {"$ref": "AdUnit"}}}}', true));
  667. $this->accounts_adunits_customchannels = new AccountsAdunitsCustomchannelsServiceResource($this, $this->serviceName, 'customchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "adUnitId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.adunits.customchannels.list", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels", "response": {"$ref": "CustomChannels"}}}}', true));
  668. $this->accounts_adclients = new AccountsAdclientsServiceResource($this, $this->serviceName, 'adclients', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.adclients.list", "httpMethod": "GET", "path": "accounts/{accountId}/adclients", "response": {"$ref": "AdClients"}}}}', true));
  669. $this->accounts_reports = new AccountsReportsServiceResource($this, $this->serviceName, 'reports', json_decode('{"methods": {"generate": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"sort": {"repeated": true, "type": "string", "location": "query"}, "startDate": {"required": true, "type": "string", "location": "query"}, "endDate": {"required": true, "type": "string", "location": "query"}, "locale": {"type": "string", "location": "query"}, "metric": {"repeated": true, "type": "string", "location": "query"}, "maxResults": {"format": "int32", "maximum": "50000", "minimum": "0", "location": "query", "type": "integer"}, "filter": {"repeated": true, "type": "string", "location": "query"}, "currency": {"type": "string", "location": "query"}, "startIndex": {"format": "int32", "maximum": "5000", "minimum": "0", "location": "query", "type": "integer"}, "dimension": {"repeated": true, "type": "string", "location": "query"}, "accountId": {"type": "string", "location": "path"}}, "id": "adsense.accounts.reports.generate", "httpMethod": "GET", "path": "accounts/{accountId}/reports", "response": {"$ref": "AdsenseReportsGenerateResponse"}}}}', true));
  670. $this->accounts_customchannels = new AccountsCustomchannelsServiceResource($this, $this->serviceName, 'customchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.customchannels.list", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/customchannels", "response": {"$ref": "CustomChannels"}}, "get": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"customChannelId": {"required": true, "type": "string", "location": "path"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.customchannels.get", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}", "response": {"$ref": "CustomChannel"}}}}', true));
  671. $this->accounts_customchannels_adunits = new AccountsCustomchannelsAdunitsServiceResource($this, $this->serviceName, 'adunits', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"includeInactive": {"type": "boolean", "location": "query"}, "customChannelId": {"required": true, "type": "string", "location": "path"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}, "pageToken": {"type": "string", "location": "query"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.accounts.customchannels.adunits.list", "httpMethod": "GET", "path": "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits", "response": {"$ref": "AdUnits"}}}}', true));
  672. $this->customchannels = new CustomchannelsServiceResource($this, $this->serviceName, 'customchannels', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"pageToken": {"type": "string", "location": "query"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.customchannels.list", "httpMethod": "GET", "path": "adclients/{adClientId}/customchannels", "response": {"$ref": "CustomChannels"}}, "get": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"customChannelId": {"required": true, "type": "string", "location": "path"}, "adClientId": {"required": true, "type": "string", "location": "path"}}, "id": "adsense.customchannels.get", "httpMethod": "GET", "path": "adclients/{adClientId}/customchannels/{customChannelId}", "response": {"$ref": "CustomChannel"}}}}', true));
  673. $this->customchannels_adunits = new CustomchannelsAdunitsServiceResource($this, $this->serviceName, 'adunits', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/adsense", "https://www.googleapis.com/auth/adsense.readonly"], "parameters": {"includeInactive": {"type": "boolean", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "customChannelId": {"required": true, "type": "string", "location": "path"}, "adClientId": {"required": true, "type": "string", "location": "path"}, "maxResults": {"format": "int32", "maximum": "10000", "minimum": "0", "location": "query", "type": "integer"}}, "id": "adsense.customchannels.adunits.list", "httpMethod": "GET", "path": "adclients/{adClientId}/customchannels/{customChannelId}/adunits", "response": {"$ref": "AdUnits"}}}}', true));
  674. }
  675. }
  676. class Account extends apiModel {
  677. public $kind;
  678. public $id;
  679. protected $__subAccountsType = 'Account';
  680. protected $__subAccountsDataType = 'array';
  681. public $subAccounts;
  682. public $name;
  683. public function setKind($kind) {
  684. $this->kind = $kind;
  685. }
  686. public function getKind() {
  687. return $this->kind;
  688. }
  689. public function setId($id) {
  690. $this->id = $id;
  691. }
  692. public function getId() {
  693. return $this->id;
  694. }
  695. public function setSubAccounts(/* array(Account) */ $subAccounts) {
  696. $this->assertIsArray($subAccounts, 'Account', __METHOD__);
  697. $this->subAccounts = $subAccounts;
  698. }
  699. public function getSubAccounts() {
  700. return $this->subAccounts;
  701. }
  702. public function setName($name) {
  703. $this->name = $name;
  704. }
  705. public function getName() {
  706. return $this->name;
  707. }
  708. }
  709. class Accounts extends apiModel {
  710. public $nextPageToken;
  711. protected $__itemsType = 'Account';
  712. protected $__itemsDataType = 'array';
  713. public $items;
  714. public $kind;
  715. public $etag;
  716. public function setNextPageToken($nextPageToken) {
  717. $this->nextPageToken = $nextPageToken;
  718. }
  719. public function getNextPageToken() {
  720. return $this->nextPageToken;
  721. }
  722. public function setItems(/* array(Account) */ $items) {
  723. $this->assertIsArray($items, 'Account', __METHOD__);
  724. $this->items = $items;
  725. }
  726. public function getItems() {
  727. return $this->items;
  728. }
  729. public function setKind($kind) {
  730. $this->kind = $kind;
  731. }
  732. public function getKind() {
  733. return $this->kind;
  734. }
  735. public function setEtag($etag) {
  736. $this->etag = $etag;
  737. }
  738. public function getEtag() {
  739. return $this->etag;
  740. }
  741. }
  742. class AdClient extends apiModel {
  743. public $productCode;
  744. public $kind;
  745. public $id;
  746. public $supportsReporting;
  747. public function setProductCode($productCode) {
  748. $this->productCode = $productCode;
  749. }
  750. public function getProductCode() {
  751. return $this->productCode;
  752. }
  753. public function setKind($kind) {
  754. $this->kind = $kind;
  755. }
  756. public function getKind() {
  757. return $this->kind;
  758. }
  759. public function setId($id) {
  760. $this->id = $id;
  761. }
  762. public function getId() {
  763. return $this->id;
  764. }
  765. public function setSupportsReporting($supportsReporting) {
  766. $this->supportsReporting = $supportsReporting;
  767. }
  768. public function getSupportsReporting() {
  769. return $this->supportsReporting;
  770. }
  771. }
  772. class AdClients extends apiModel {
  773. public $nextPageToken;
  774. protected $__itemsType = 'AdClient';
  775. protected $__itemsDataType = 'array';
  776. public $items;
  777. public $kind;
  778. public $etag;
  779. public function setNextPageToken($nextPageToken) {
  780. $this->nextPageToken = $nextPageToken;
  781. }
  782. public function getNextPageToken() {
  783. return $this->nextPageToken;
  784. }
  785. public function setItems(/* array(AdClient) */ $items) {
  786. $this->assertIsArray($items, 'AdClient', __METHOD__);
  787. $this->items = $items;
  788. }
  789. public function getItems() {
  790. return $this->items;
  791. }
  792. public function setKind($kind) {
  793. $this->kind = $kind;
  794. }
  795. public function getKind() {
  796. return $this->kind;
  797. }
  798. public function setEtag($etag) {
  799. $this->etag = $etag;
  800. }
  801. public function getEtag() {
  802. return $this->etag;
  803. }
  804. }
  805. class AdUnit extends apiModel {
  806. public $status;
  807. public $kind;
  808. public $code;
  809. public $id;
  810. public $name;
  811. public function setStatus($status) {
  812. $this->status = $status;
  813. }
  814. public function getStatus() {
  815. return $this->status;
  816. }
  817. public function setKind($kind) {
  818. $this->kind = $kind;
  819. }
  820. public function getKind() {
  821. return $this->kind;
  822. }
  823. public function setCode($code) {
  824. $this->code = $code;
  825. }
  826. public function getCode() {
  827. return $this->code;
  828. }
  829. public function setId($id) {
  830. $this->id = $id;
  831. }
  832. public function getId() {
  833. return $this->id;
  834. }
  835. public function setName($name) {
  836. $this->name = $name;
  837. }
  838. public function getName() {
  839. return $this->name;
  840. }
  841. }
  842. class AdUnits extends apiModel {
  843. public $nextPageToken;
  844. protected $__itemsType = 'AdUnit';
  845. protected $__itemsDataType = 'array';
  846. public $items;
  847. public $kind;
  848. public $etag;
  849. public function setNextPageToken($nextPageToken) {
  850. $this->nextPageToken = $nextPageToken;
  851. }
  852. public function getNextPageToken() {
  853. return $this->nextPageToken;
  854. }
  855. public function setItems(/* array(AdUnit) */ $items) {
  856. $this->assertIsArray($items, 'AdUnit', __METHOD__);
  857. $this->items = $items;
  858. }
  859. public function getItems() {
  860. return $this->items;
  861. }
  862. public function setKind($kind) {
  863. $this->kind = $kind;
  864. }
  865. public function getKind() {
  866. return $this->kind;
  867. }
  868. public function setEtag($etag) {
  869. $this->etag = $etag;
  870. }
  871. public function getEtag() {
  872. return $this->etag;
  873. }
  874. }
  875. class AdsenseReportsGenerateResponse extends apiModel {
  876. public $kind;
  877. public $rows;
  878. public $warnings;
  879. public $totals;
  880. protected $__headersType = 'AdsenseReportsGenerateResponseHeaders';
  881. protected $__headersDataType = 'array';
  882. public $headers;
  883. public $totalMatchedRows;
  884. public $averages;
  885. public function setKind($kind) {
  886. $this->kind = $kind;
  887. }
  888. public function getKind() {
  889. return $this->kind;
  890. }
  891. public function setRows(/* array(string) */ $rows) {
  892. $this->assertIsArray($rows, 'string', __METHOD__);
  893. $this->rows = $rows;
  894. }
  895. public function getRows() {
  896. return $this->rows;
  897. }
  898. public function setWarnings(/* array(string) */ $warnings) {
  899. $this->assertIsArray($warnings, 'string', __METHOD__);
  900. $this->warnings = $warnings;
  901. }
  902. public function getWarnings() {
  903. return $this->warnings;
  904. }
  905. public function setTotals(/* array(string) */ $totals) {
  906. $this->assertIsArray($totals, 'string', __METHOD__);
  907. $this->totals = $totals;
  908. }
  909. public function getTotals() {
  910. return $this->totals;
  911. }
  912. public function setHeaders(/* array(AdsenseReportsGenerateResponseHeaders) */ $headers) {
  913. $this->assertIsArray($headers, 'AdsenseReportsGenerateResponseHeaders', __METHOD__);
  914. $this->headers = $headers;
  915. }
  916. public function getHeaders() {
  917. return $this->headers;
  918. }
  919. public function setTotalMatchedRows($totalMatchedRows) {
  920. $this->totalMatchedRows = $totalMatchedRows;
  921. }
  922. public function getTotalMatchedRows() {
  923. return $this->totalMatchedRows;
  924. }
  925. public function setAverages(/* array(string) */ $averages) {
  926. $this->assertIsArray($averages, 'string', __METHOD__);
  927. $this->averages = $averages;
  928. }
  929. public function getAverages() {
  930. return $this->averages;
  931. }
  932. }
  933. class AdsenseReportsGenerateResponseHeaders extends apiModel {
  934. public $currency;
  935. public $type;
  936. public $name;
  937. public function setCurrency($currency) {
  938. $this->currency = $currency;
  939. }
  940. public function getCurrency() {
  941. return $this->currency;
  942. }
  943. public function setType($type) {
  944. $this->type = $type;
  945. }
  946. public function getType() {
  947. return $this->type;
  948. }
  949. public function setName($name) {
  950. $this->name = $name;
  951. }
  952. public function getName() {
  953. return $this->name;
  954. }
  955. }
  956. class CustomChannel extends apiModel {
  957. public $kind;
  958. public $code;
  959. protected $__targetingInfoType = 'CustomChannelTargetingInfo';

Large files files are truncated, but you can click here to view the full file