Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
<?php
/**
* @file
* Dispatch events when patches are applied.
*/
namespace Google\Site_Kit_Dependencies\cweagans\Composer;
use Google\Site_Kit_Dependencies\Composer\EventDispatcher\Event;
use Google\Site_Kit_Dependencies\Composer\Package\PackageInterface;
class PatchEvent extends \Google\Site_Kit_Dependencies\Composer\EventDispatcher\Event
{
/**
* @var PackageInterface $package
*/
protected $package;
/**
* @var string $url
*/
protected $url;
/**
* @var string $description
*/
protected $description;
/**
* Constructs a PatchEvent object.
*
* @param string $eventName
* @param PackageInterface $package
* @param string $url
* @param string $description
*/
public function __construct($eventName, \Google\Site_Kit_Dependencies\Composer\Package\PackageInterface $package, $url, $description)
{
parent::__construct($eventName);
$this->package = $package;
$this->url = $url;
$this->description = $description;
}
/**
* Returns the package that is patched.
*
* @return PackageInterface
*/
public function getPackage()
{
return $this->package;
}
/**
* Returns the url of the patch.
*
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* Returns the description of the patch.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* @file
* Dispatch events when patches are applied.
*/
namespace Google\Site_Kit_Dependencies\cweagans\Composer;
class PatchEvents
{
/**
* The PRE_PATCH_APPLY event occurs before a patch is applied.
*
* The event listener method receives a cweagans\Composer\PatchEvent instance.
*
* @var string
*/
const PRE_PATCH_APPLY = 'pre-patch-apply';
/**
* The POST_PATCH_APPLY event occurs after a patch is applied.
*
* The event listener method receives a cweagans\Composer\PatchEvent instance.
*
* @var string
*/
const POST_PATCH_APPLY = 'post-patch-apply';
}

View File

@@ -0,0 +1,542 @@
<?php
/**
* @file
* Provides a way to patch Composer packages after installation.
*/
namespace Google\Site_Kit_Dependencies\cweagans\Composer;
use Google\Site_Kit_Dependencies\Composer\Composer;
use Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\InstallOperation;
use Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\UninstallOperation;
use Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\UpdateOperation;
use Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\OperationInterface;
use Google\Site_Kit_Dependencies\Composer\EventDispatcher\EventSubscriberInterface;
use Google\Site_Kit_Dependencies\Composer\IO\IOInterface;
use Google\Site_Kit_Dependencies\Composer\Package\AliasPackage;
use Google\Site_Kit_Dependencies\Composer\Package\PackageInterface;
use Google\Site_Kit_Dependencies\Composer\Plugin\PluginInterface;
use Google\Site_Kit_Dependencies\Composer\Installer\PackageEvents;
use Google\Site_Kit_Dependencies\Composer\Script\Event;
use Google\Site_Kit_Dependencies\Composer\Script\ScriptEvents;
use Google\Site_Kit_Dependencies\Composer\Installer\PackageEvent;
use Google\Site_Kit_Dependencies\Composer\Util\ProcessExecutor;
use Google\Site_Kit_Dependencies\Composer\Util\RemoteFilesystem;
use Google\Site_Kit_Dependencies\Symfony\Component\Process\Process;
class Patches implements \Google\Site_Kit_Dependencies\Composer\Plugin\PluginInterface, \Google\Site_Kit_Dependencies\Composer\EventDispatcher\EventSubscriberInterface
{
/**
* @var Composer $composer
*/
protected $composer;
/**
* @var IOInterface $io
*/
protected $io;
/**
* @var EventDispatcher $eventDispatcher
*/
protected $eventDispatcher;
/**
* @var ProcessExecutor $executor
*/
protected $executor;
/**
* @var array $patches
*/
protected $patches;
/**
* @var array $installedPatches
*/
protected $installedPatches;
/**
* Apply plugin modifications to composer
*
* @param Composer $composer
* @param IOInterface $io
*/
public function activate(\Google\Site_Kit_Dependencies\Composer\Composer $composer, \Google\Site_Kit_Dependencies\Composer\IO\IOInterface $io)
{
$this->composer = $composer;
$this->io = $io;
$this->eventDispatcher = $composer->getEventDispatcher();
$this->executor = new \Google\Site_Kit_Dependencies\Composer\Util\ProcessExecutor($this->io);
$this->patches = array();
$this->installedPatches = array();
}
/**
* Returns an array of event names this subscriber wants to listen to.
*/
public static function getSubscribedEvents()
{
return array(
\Google\Site_Kit_Dependencies\Composer\Script\ScriptEvents::PRE_INSTALL_CMD => array('checkPatches'),
\Google\Site_Kit_Dependencies\Composer\Script\ScriptEvents::PRE_UPDATE_CMD => array('checkPatches'),
\Google\Site_Kit_Dependencies\Composer\Installer\PackageEvents::PRE_PACKAGE_INSTALL => array('gatherPatches'),
\Google\Site_Kit_Dependencies\Composer\Installer\PackageEvents::PRE_PACKAGE_UPDATE => array('gatherPatches'),
// The following is a higher weight for compatibility with
// https://github.com/AydinHassan/magento-core-composer-installer and more generally for compatibility with
// every Composer plugin which deploys downloaded packages to other locations.
// In such cases you want that those plugins deploy patched files so they have to run after
// the "composer-patches" plugin.
// @see: https://github.com/cweagans/composer-patches/pull/153
\Google\Site_Kit_Dependencies\Composer\Installer\PackageEvents::POST_PACKAGE_INSTALL => array('postInstall', 10),
\Google\Site_Kit_Dependencies\Composer\Installer\PackageEvents::POST_PACKAGE_UPDATE => array('postInstall', 10),
);
}
/**
* Before running composer install,
* @param Event $event
*/
public function checkPatches(\Google\Site_Kit_Dependencies\Composer\Script\Event $event)
{
if (!$this->isPatchingEnabled()) {
return;
}
try {
$repositoryManager = $this->composer->getRepositoryManager();
$localRepository = $repositoryManager->getLocalRepository();
$installationManager = $this->composer->getInstallationManager();
$packages = $localRepository->getPackages();
$extra = $this->composer->getPackage()->getExtra();
$patches_ignore = isset($extra['patches-ignore']) ? $extra['patches-ignore'] : array();
$tmp_patches = $this->grabPatches();
foreach ($packages as $package) {
$extra = $package->getExtra();
if (isset($extra['patches'])) {
if (isset($patches_ignore[$package->getName()])) {
foreach ($patches_ignore[$package->getName()] as $package_name => $patches) {
if (isset($extra['patches'][$package_name])) {
$extra['patches'][$package_name] = \array_diff($extra['patches'][$package_name], $patches);
}
}
}
$this->installedPatches[$package->getName()] = $extra['patches'];
}
$patches = isset($extra['patches']) ? $extra['patches'] : array();
$tmp_patches = $this->arrayMergeRecursiveDistinct($tmp_patches, $patches);
}
if ($tmp_patches == FALSE) {
$this->io->write('<info>No patches supplied.</info>');
return;
}
// Remove packages for which the patch set has changed.
$promises = array();
foreach ($packages as $package) {
if (!$package instanceof \Google\Site_Kit_Dependencies\Composer\Package\AliasPackage) {
$package_name = $package->getName();
$extra = $package->getExtra();
$has_patches = isset($tmp_patches[$package_name]);
$has_applied_patches = isset($extra['patches_applied']) && \count($extra['patches_applied']) > 0;
if ($has_patches && !$has_applied_patches || !$has_patches && $has_applied_patches || $has_patches && $has_applied_patches && $tmp_patches[$package_name] !== $extra['patches_applied']) {
$uninstallOperation = new \Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\UninstallOperation($package, 'Removing package so it can be re-installed and re-patched.');
$this->io->write('<info>Removing package ' . $package_name . ' so that it can be re-installed and re-patched.</info>');
$promises[] = $installationManager->uninstall($localRepository, $uninstallOperation);
}
}
}
$promises = \array_filter($promises);
if ($promises) {
$this->composer->getLoop()->wait($promises);
}
} catch (\LogicException $e) {
return;
}
}
/**
* Gather patches from dependencies and store them for later use.
*
* @param PackageEvent $event
*/
public function gatherPatches(\Google\Site_Kit_Dependencies\Composer\Installer\PackageEvent $event)
{
// If we've already done this, then don't do it again.
if (isset($this->patches['_patchesGathered'])) {
$this->io->write('<info>Patches already gathered. Skipping</info>', TRUE, \Google\Site_Kit_Dependencies\Composer\IO\IOInterface::VERBOSE);
return;
} elseif (!$this->isPatchingEnabled()) {
$this->io->write('<info>Patching is disabled. Skipping.</info>', TRUE, \Google\Site_Kit_Dependencies\Composer\IO\IOInterface::VERBOSE);
return;
}
$this->patches = $this->grabPatches();
if (empty($this->patches)) {
$this->io->write('<info>No patches supplied.</info>');
}
$extra = $this->composer->getPackage()->getExtra();
$patches_ignore = isset($extra['patches-ignore']) ? $extra['patches-ignore'] : array();
// Now add all the patches from dependencies that will be installed.
$operations = $event->getOperations();
$this->io->write('<info>Gathering patches for dependencies. This might take a minute.</info>');
foreach ($operations as $operation) {
if ($operation instanceof \Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\InstallOperation || $operation instanceof \Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\UpdateOperation) {
$package = $this->getPackageFromOperation($operation);
$extra = $package->getExtra();
if (isset($extra['patches'])) {
if (isset($patches_ignore[$package->getName()])) {
foreach ($patches_ignore[$package->getName()] as $package_name => $patches) {
if (isset($extra['patches'][$package_name])) {
$extra['patches'][$package_name] = \array_diff($extra['patches'][$package_name], $patches);
}
}
}
$this->patches = $this->arrayMergeRecursiveDistinct($this->patches, $extra['patches']);
}
// Unset installed patches for this package
if (isset($this->installedPatches[$package->getName()])) {
unset($this->installedPatches[$package->getName()]);
}
}
}
// Merge installed patches from dependencies that did not receive an update.
foreach ($this->installedPatches as $patches) {
$this->patches = $this->arrayMergeRecursiveDistinct($this->patches, $patches);
}
// If we're in verbose mode, list the projects we're going to patch.
if ($this->io->isVerbose()) {
foreach ($this->patches as $package => $patches) {
$number = \count($patches);
$this->io->write('<info>Found ' . $number . ' patches for ' . $package . '.</info>');
}
}
// Make sure we don't gather patches again. Extra keys in $this->patches
// won't hurt anything, so we'll just stash it there.
$this->patches['_patchesGathered'] = TRUE;
}
/**
* Get the patches from root composer or external file
* @return Patches
* @throws \Exception
*/
public function grabPatches()
{
// First, try to get the patches from the root composer.json.
$extra = $this->composer->getPackage()->getExtra();
if (isset($extra['patches'])) {
$this->io->write('<info>Gathering patches for root package.</info>');
$patches = $extra['patches'];
return $patches;
} elseif (isset($extra['patches-file'])) {
$this->io->write('<info>Gathering patches from patch file.</info>');
$patches = \file_get_contents($extra['patches-file']);
$patches = \json_decode($patches, TRUE);
$error = \json_last_error();
if ($error != 0) {
switch ($error) {
case \JSON_ERROR_DEPTH:
$msg = ' - Maximum stack depth exceeded';
break;
case \JSON_ERROR_STATE_MISMATCH:
$msg = ' - Underflow or the modes mismatch';
break;
case \JSON_ERROR_CTRL_CHAR:
$msg = ' - Unexpected control character found';
break;
case \JSON_ERROR_SYNTAX:
$msg = ' - Syntax error, malformed JSON';
break;
case \JSON_ERROR_UTF8:
$msg = ' - Malformed UTF-8 characters, possibly incorrectly encoded';
break;
default:
$msg = ' - Unknown error';
break;
}
throw new \Exception('There was an error in the supplied patches file:' . $msg);
}
if (isset($patches['patches'])) {
$patches = $patches['patches'];
return $patches;
} elseif (!$patches) {
throw new \Exception('There was an error in the supplied patch file');
}
} else {
return array();
}
}
/**
* @param PackageEvent $event
* @throws \Exception
*/
public function postInstall(\Google\Site_Kit_Dependencies\Composer\Installer\PackageEvent $event)
{
// Check if we should exit in failure.
$extra = $this->composer->getPackage()->getExtra();
$exitOnFailure = \getenv('COMPOSER_EXIT_ON_PATCH_FAILURE') || !empty($extra['composer-exit-on-patch-failure']);
$skipReporting = \getenv('COMPOSER_PATCHES_SKIP_REPORTING') || !empty($extra['composer-patches-skip-reporting']);
// Get the package object for the current operation.
$operation = $event->getOperation();
/** @var PackageInterface $package */
$package = $this->getPackageFromOperation($operation);
$package_name = $package->getName();
if (!isset($this->patches[$package_name])) {
if ($this->io->isVerbose()) {
$this->io->write('<info>No patches found for ' . $package_name . '.</info>');
}
return;
}
$this->io->write(' - Applying patches for <info>' . $package_name . '</info>');
// Get the install path from the package object.
$manager = $event->getComposer()->getInstallationManager();
$install_path = $manager->getInstaller($package->getType())->getInstallPath($package);
// Set up a downloader.
$downloader = new \Google\Site_Kit_Dependencies\Composer\Util\RemoteFilesystem($this->io, $this->composer->getConfig());
// Track applied patches in the package info in installed.json
$localRepository = $this->composer->getRepositoryManager()->getLocalRepository();
$localPackage = $localRepository->findPackage($package_name, $package->getVersion());
$extra = $localPackage->getExtra();
$extra['patches_applied'] = array();
foreach ($this->patches[$package_name] as $description => $url) {
$this->io->write(' <info>' . $url . '</info> (<comment>' . $description . '</comment>)');
try {
$this->eventDispatcher->dispatch(NULL, new \Google\Site_Kit_Dependencies\cweagans\Composer\PatchEvent(\Google\Site_Kit_Dependencies\cweagans\Composer\PatchEvents::PRE_PATCH_APPLY, $package, $url, $description));
$this->getAndApplyPatch($downloader, $install_path, $url, $package);
$this->eventDispatcher->dispatch(NULL, new \Google\Site_Kit_Dependencies\cweagans\Composer\PatchEvent(\Google\Site_Kit_Dependencies\cweagans\Composer\PatchEvents::POST_PATCH_APPLY, $package, $url, $description));
$extra['patches_applied'][$description] = $url;
} catch (\Exception $e) {
$this->io->write(' <error>Could not apply patch! Skipping. The error was: ' . $e->getMessage() . '</error>');
if ($exitOnFailure) {
throw new \Exception("Cannot apply patch {$description} ({$url})!");
}
}
}
$localPackage->setExtra($extra);
$this->io->write('');
if (\true !== $skipReporting) {
$this->writePatchReport($this->patches[$package_name], $install_path);
}
}
/**
* Get a Package object from an OperationInterface object.
*
* @param OperationInterface $operation
* @return PackageInterface
* @throws \Exception
*/
protected function getPackageFromOperation(\Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\OperationInterface $operation)
{
if ($operation instanceof \Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\InstallOperation) {
$package = $operation->getPackage();
} elseif ($operation instanceof \Google\Site_Kit_Dependencies\Composer\DependencyResolver\Operation\UpdateOperation) {
$package = $operation->getTargetPackage();
} else {
throw new \Exception('Unknown operation: ' . \get_class($operation));
}
return $package;
}
/**
* Apply a patch on code in the specified directory.
*
* @param RemoteFilesystem $downloader
* @param $install_path
* @param $patch_url
* @param PackageInterface $package
* @throws \Exception
*/
protected function getAndApplyPatch(\Google\Site_Kit_Dependencies\Composer\Util\RemoteFilesystem $downloader, $install_path, $patch_url, \Google\Site_Kit_Dependencies\Composer\Package\PackageInterface $package)
{
// Local patch file.
if (\file_exists($patch_url)) {
$filename = \realpath($patch_url);
} else {
// Generate random (but not cryptographically so) filename.
$filename = \uniqid(\sys_get_temp_dir() . '/') . ".patch";
// Download file from remote filesystem to this location.
$hostname = \parse_url($patch_url, \PHP_URL_HOST);
try {
$downloader->copy($hostname, $patch_url, $filename, \false);
} catch (\Exception $e) {
// In case of an exception, retry once as the download might
// have failed due to intermittent network issues.
$downloader->copy($hostname, $patch_url, $filename, \false);
}
}
// The order here is intentional. p1 is most likely to apply with git apply.
// p0 is next likely. p2 is extremely unlikely, but for some special cases,
// it might be useful. p4 is useful for Magento 2 patches
$patch_levels = array('-p1', '-p0', '-p2', '-p4');
// Check for specified patch level for this package.
$extra = $this->composer->getPackage()->getExtra();
if (!empty($extra['patchLevel'][$package->getName()])) {
$patch_levels = array($extra['patchLevel'][$package->getName()]);
}
// Attempt to apply with git apply.
$patched = $this->applyPatchWithGit($install_path, $patch_levels, $filename);
// In some rare cases, git will fail to apply a patch, fallback to using
// the 'patch' command.
if (!$patched) {
foreach ($patch_levels as $patch_level) {
// --no-backup-if-mismatch here is a hack that fixes some
// differences between how patch works on windows and unix.
if ($patched = $this->executeCommand("patch %s --no-backup-if-mismatch -d %s < %s", $patch_level, $install_path, $filename)) {
break;
}
}
}
// Clean up the temporary patch file.
if (isset($hostname)) {
\unlink($filename);
}
// If the patch *still* isn't applied, then give up and throw an Exception.
// Otherwise, let the user know it worked.
if (!$patched) {
throw new \Exception("Cannot apply patch {$patch_url}");
}
}
/**
* Checks if the root package enables patching.
*
* @return bool
* Whether patching is enabled. Defaults to TRUE.
*/
protected function isPatchingEnabled()
{
$extra = $this->composer->getPackage()->getExtra();
if (empty($extra['patches']) && empty($extra['patches-ignore']) && !isset($extra['patches-file'])) {
// The root package has no patches of its own, so only allow patching if
// it has specifically opted in.
return isset($extra['enable-patching']) ? $extra['enable-patching'] : FALSE;
} else {
return TRUE;
}
}
/**
* Writes a patch report to the target directory.
*
* @param array $patches
* @param string $directory
*/
protected function writePatchReport($patches, $directory)
{
$output = "This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)\n";
$output .= "Patches applied to this directory:\n\n";
foreach ($patches as $description => $url) {
$output .= $description . "\n";
$output .= 'Source: ' . $url . "\n\n\n";
}
\file_put_contents($directory . "/PATCHES.txt", $output);
}
/**
* Executes a shell command with escaping.
*
* @param string $cmd
* @return bool
*/
protected function executeCommand($cmd)
{
// Shell-escape all arguments except the command.
$args = \func_get_args();
foreach ($args as $index => $arg) {
if ($index !== 0) {
$args[$index] = \escapeshellarg($arg);
}
}
// And replace the arguments.
$command = \call_user_func_array('sprintf', $args);
$output = '';
if ($this->io->isVerbose()) {
$this->io->write('<comment>' . $command . '</comment>');
$io = $this->io;
$output = function ($type, $data) use($io) {
if ($type == \Google\Site_Kit_Dependencies\Symfony\Component\Process\Process::ERR) {
$io->write('<error>' . $data . '</error>');
} else {
$io->write('<comment>' . $data . '</comment>');
}
};
}
return $this->executor->execute($command, $output) == 0;
}
/**
* Recursively merge arrays without changing data types of values.
*
* Does not change the data types of the values in the arrays. Matching keys'
* values in the second array overwrite those in the first array, as is the
* case with array_merge.
*
* @param array $array1
* The first array.
* @param array $array2
* The second array.
* @return array
* The merged array.
*
* @see http://php.net/manual/en/function.array-merge-recursive.php#92195
*/
protected function arrayMergeRecursiveDistinct(array $array1, array $array2)
{
$merged = $array1;
foreach ($array2 as $key => &$value) {
if (\is_array($value) && isset($merged[$key]) && \is_array($merged[$key])) {
$merged[$key] = $this->arrayMergeRecursiveDistinct($merged[$key], $value);
} else {
$merged[$key] = $value;
}
}
return $merged;
}
/**
* Attempts to apply a patch with git apply.
*
* @param $install_path
* @param $patch_levels
* @param $filename
*
* @return bool
* TRUE if patch was applied, FALSE otherwise.
*/
protected function applyPatchWithGit($install_path, $patch_levels, $filename)
{
// Do not use git apply unless the install path is itself a git repo
// @see https://stackoverflow.com/a/27283285
if (!\is_dir($install_path . '/.git')) {
return FALSE;
}
$patched = FALSE;
foreach ($patch_levels as $patch_level) {
if ($this->io->isVerbose()) {
$comment = 'Testing ability to patch with git apply.';
$comment .= ' This command may produce errors that can be safely ignored.';
$this->io->write('<comment>' . $comment . '</comment>');
}
$checked = $this->executeCommand('git -C %s apply --check -v %s %s', $install_path, $patch_level, $filename);
$output = $this->executor->getErrorOutput();
if (\substr($output, 0, 7) == 'Skipped') {
// Git will indicate success but silently skip patches in some scenarios.
//
// @see https://github.com/cweagans/composer-patches/pull/165
$checked = FALSE;
}
if ($checked) {
// Apply the first successful style.
$patched = $this->executeCommand('git -C %s apply %s %s', $install_path, $patch_level, $filename);
break;
}
}
return $patched;
}
/**
* Indicates if a package has been patched.
*
* @param \Composer\Package\PackageInterface $package
* The package to check.
*
* @return bool
* TRUE if the package has been patched.
*/
public static function isPackagePatched(\Google\Site_Kit_Dependencies\Composer\Package\PackageInterface $package)
{
return \array_key_exists('patches_applied', $package->getExtra());
}
/**
* {@inheritDoc}
*/
public function deactivate(\Google\Site_Kit_Dependencies\Composer\Composer $composer, \Google\Site_Kit_Dependencies\Composer\IO\IOInterface $io)
{
}
/**
* {@inheritDoc}
*/
public function uninstall(\Google\Site_Kit_Dependencies\Composer\Composer $composer, \Google\Site_Kit_Dependencies\Composer\IO\IOInterface $io)
{
}
}

View File

@@ -0,0 +1,16 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
class BeforeValidException extends \UnexpectedValueException implements \Google\Site_Kit_Dependencies\Firebase\JWT\JWTExceptionWithPayloadInterface
{
private object $payload;
public function setPayload(object $payload) : void
{
$this->payload = $payload;
}
public function getPayload() : object
{
return $this->payload;
}
}

View File

@@ -0,0 +1,226 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
use ArrayAccess;
use InvalidArgumentException;
use LogicException;
use OutOfBoundsException;
use Google\Site_Kit_Dependencies\Psr\Cache\CacheItemInterface;
use Google\Site_Kit_Dependencies\Psr\Cache\CacheItemPoolInterface;
use Google\Site_Kit_Dependencies\Psr\Http\Client\ClientInterface;
use Google\Site_Kit_Dependencies\Psr\Http\Message\RequestFactoryInterface;
use RuntimeException;
use UnexpectedValueException;
/**
* @implements ArrayAccess<string, Key>
*/
class CachedKeySet implements \ArrayAccess
{
/**
* @var string
*/
private $jwksUri;
/**
* @var ClientInterface
*/
private $httpClient;
/**
* @var RequestFactoryInterface
*/
private $httpFactory;
/**
* @var CacheItemPoolInterface
*/
private $cache;
/**
* @var ?int
*/
private $expiresAfter;
/**
* @var ?CacheItemInterface
*/
private $cacheItem;
/**
* @var array<string, array<mixed>>
*/
private $keySet;
/**
* @var string
*/
private $cacheKey;
/**
* @var string
*/
private $cacheKeyPrefix = 'jwks';
/**
* @var int
*/
private $maxKeyLength = 64;
/**
* @var bool
*/
private $rateLimit;
/**
* @var string
*/
private $rateLimitCacheKey;
/**
* @var int
*/
private $maxCallsPerMinute = 10;
/**
* @var string|null
*/
private $defaultAlg;
public function __construct(string $jwksUri, \Google\Site_Kit_Dependencies\Psr\Http\Client\ClientInterface $httpClient, \Google\Site_Kit_Dependencies\Psr\Http\Message\RequestFactoryInterface $httpFactory, \Google\Site_Kit_Dependencies\Psr\Cache\CacheItemPoolInterface $cache, int $expiresAfter = null, bool $rateLimit = \false, string $defaultAlg = null)
{
$this->jwksUri = $jwksUri;
$this->httpClient = $httpClient;
$this->httpFactory = $httpFactory;
$this->cache = $cache;
$this->expiresAfter = $expiresAfter;
$this->rateLimit = $rateLimit;
$this->defaultAlg = $defaultAlg;
$this->setCacheKeys();
}
/**
* @param string $keyId
* @return Key
*/
public function offsetGet($keyId) : \Google\Site_Kit_Dependencies\Firebase\JWT\Key
{
if (!$this->keyIdExists($keyId)) {
throw new \OutOfBoundsException('Key ID not found');
}
return \Google\Site_Kit_Dependencies\Firebase\JWT\JWK::parseKey($this->keySet[$keyId], $this->defaultAlg);
}
/**
* @param string $keyId
* @return bool
*/
public function offsetExists($keyId) : bool
{
return $this->keyIdExists($keyId);
}
/**
* @param string $offset
* @param Key $value
*/
public function offsetSet($offset, $value) : void
{
throw new \LogicException('Method not implemented');
}
/**
* @param string $offset
*/
public function offsetUnset($offset) : void
{
throw new \LogicException('Method not implemented');
}
/**
* @return array<mixed>
*/
private function formatJwksForCache(string $jwks) : array
{
$jwks = \json_decode($jwks, \true);
if (!isset($jwks['keys'])) {
throw new \UnexpectedValueException('"keys" member must exist in the JWK Set');
}
if (empty($jwks['keys'])) {
throw new \InvalidArgumentException('JWK Set did not contain any keys');
}
$keys = [];
foreach ($jwks['keys'] as $k => $v) {
$kid = isset($v['kid']) ? $v['kid'] : $k;
$keys[(string) $kid] = $v;
}
return $keys;
}
private function keyIdExists(string $keyId) : bool
{
if (null === $this->keySet) {
$item = $this->getCacheItem();
// Try to load keys from cache
if ($item->isHit()) {
// item found! retrieve it
$this->keySet = $item->get();
// If the cached item is a string, the JWKS response was cached (previous behavior).
// Parse this into expected format array<kid, jwk> instead.
if (\is_string($this->keySet)) {
$this->keySet = $this->formatJwksForCache($this->keySet);
}
}
}
if (!isset($this->keySet[$keyId])) {
if ($this->rateLimitExceeded()) {
return \false;
}
$request = $this->httpFactory->createRequest('GET', $this->jwksUri);
$jwksResponse = $this->httpClient->sendRequest($request);
if ($jwksResponse->getStatusCode() !== 200) {
throw new \UnexpectedValueException(\sprintf('HTTP Error: %d %s for URI "%s"', $jwksResponse->getStatusCode(), $jwksResponse->getReasonPhrase(), $this->jwksUri), $jwksResponse->getStatusCode());
}
$this->keySet = $this->formatJwksForCache((string) $jwksResponse->getBody());
if (!isset($this->keySet[$keyId])) {
return \false;
}
$item = $this->getCacheItem();
$item->set($this->keySet);
if ($this->expiresAfter) {
$item->expiresAfter($this->expiresAfter);
}
$this->cache->save($item);
}
return \true;
}
private function rateLimitExceeded() : bool
{
if (!$this->rateLimit) {
return \false;
}
$cacheItem = $this->cache->getItem($this->rateLimitCacheKey);
if (!$cacheItem->isHit()) {
$cacheItem->expiresAfter(1);
// # of calls are cached each minute
}
$callsPerMinute = (int) $cacheItem->get();
if (++$callsPerMinute > $this->maxCallsPerMinute) {
return \true;
}
$cacheItem->set($callsPerMinute);
$this->cache->save($cacheItem);
return \false;
}
private function getCacheItem() : \Google\Site_Kit_Dependencies\Psr\Cache\CacheItemInterface
{
if (\is_null($this->cacheItem)) {
$this->cacheItem = $this->cache->getItem($this->cacheKey);
}
return $this->cacheItem;
}
private function setCacheKeys() : void
{
if (empty($this->jwksUri)) {
throw new \RuntimeException('JWKS URI is empty');
}
// ensure we do not have illegal characters
$key = \preg_replace('|[^a-zA-Z0-9_\\.!]|', '', $this->jwksUri);
// add prefix
$key = $this->cacheKeyPrefix . $key;
// Hash keys if they exceed $maxKeyLength of 64
if (\strlen($key) > $this->maxKeyLength) {
$key = \substr(\hash('sha256', $key), 0, $this->maxKeyLength);
}
$this->cacheKey = $key;
if ($this->rateLimit) {
// add prefix
$rateLimitKey = $this->cacheKeyPrefix . 'ratelimit' . $key;
// Hash keys if they exceed $maxKeyLength of 64
if (\strlen($rateLimitKey) > $this->maxKeyLength) {
$rateLimitKey = \substr(\hash('sha256', $rateLimitKey), 0, $this->maxKeyLength);
}
$this->rateLimitCacheKey = $rateLimitKey;
}
}
}

View File

@@ -0,0 +1,16 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
class ExpiredException extends \UnexpectedValueException implements \Google\Site_Kit_Dependencies\Firebase\JWT\JWTExceptionWithPayloadInterface
{
private object $payload;
public function setPayload(object $payload) : void
{
$this->payload = $payload;
}
public function getPayload() : object
{
return $this->payload;
}
}

View File

@@ -0,0 +1,267 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
use DomainException;
use InvalidArgumentException;
use UnexpectedValueException;
/**
* JSON Web Key implementation, based on this spec:
* https://tools.ietf.org/html/draft-ietf-jose-json-web-key-41
*
* PHP version 5
*
* @category Authentication
* @package Authentication_JWT
* @author Bui Sy Nguyen <nguyenbs@gmail.com>
* @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
* @link https://github.com/firebase/php-jwt
*/
class JWK
{
private const OID = '1.2.840.10045.2.1';
private const ASN1_OBJECT_IDENTIFIER = 0x6;
private const ASN1_SEQUENCE = 0x10;
// also defined in JWT
private const ASN1_BIT_STRING = 0x3;
private const EC_CURVES = [
'P-256' => '1.2.840.10045.3.1.7',
// Len: 64
'secp256k1' => '1.3.132.0.10',
// Len: 64
'P-384' => '1.3.132.0.34',
];
// For keys with "kty" equal to "OKP" (Octet Key Pair), the "crv" parameter must contain the key subtype.
// This library supports the following subtypes:
private const OKP_SUBTYPES = ['Ed25519' => \true];
/**
* Parse a set of JWK keys
*
* @param array<mixed> $jwks The JSON Web Key Set as an associative array
* @param string $defaultAlg The algorithm for the Key object if "alg" is not set in the
* JSON Web Key Set
*
* @return array<string, Key> An associative array of key IDs (kid) to Key objects
*
* @throws InvalidArgumentException Provided JWK Set is empty
* @throws UnexpectedValueException Provided JWK Set was invalid
* @throws DomainException OpenSSL failure
*
* @uses parseKey
*/
public static function parseKeySet(array $jwks, string $defaultAlg = null) : array
{
$keys = [];
if (!isset($jwks['keys'])) {
throw new \UnexpectedValueException('"keys" member must exist in the JWK Set');
}
if (empty($jwks['keys'])) {
throw new \InvalidArgumentException('JWK Set did not contain any keys');
}
foreach ($jwks['keys'] as $k => $v) {
$kid = isset($v['kid']) ? $v['kid'] : $k;
if ($key = self::parseKey($v, $defaultAlg)) {
$keys[(string) $kid] = $key;
}
}
if (0 === \count($keys)) {
throw new \UnexpectedValueException('No supported algorithms found in JWK Set');
}
return $keys;
}
/**
* Parse a JWK key
*
* @param array<mixed> $jwk An individual JWK
* @param string $defaultAlg The algorithm for the Key object if "alg" is not set in the
* JSON Web Key Set
*
* @return Key The key object for the JWK
*
* @throws InvalidArgumentException Provided JWK is empty
* @throws UnexpectedValueException Provided JWK was invalid
* @throws DomainException OpenSSL failure
*
* @uses createPemFromModulusAndExponent
*/
public static function parseKey(array $jwk, string $defaultAlg = null) : ?\Google\Site_Kit_Dependencies\Firebase\JWT\Key
{
if (empty($jwk)) {
throw new \InvalidArgumentException('JWK must not be empty');
}
if (!isset($jwk['kty'])) {
throw new \UnexpectedValueException('JWK must contain a "kty" parameter');
}
if (!isset($jwk['alg'])) {
if (\is_null($defaultAlg)) {
// The "alg" parameter is optional in a KTY, but an algorithm is required
// for parsing in this library. Use the $defaultAlg parameter when parsing the
// key set in order to prevent this error.
// @see https://datatracker.ietf.org/doc/html/rfc7517#section-4.4
throw new \UnexpectedValueException('JWK must contain an "alg" parameter');
}
$jwk['alg'] = $defaultAlg;
}
switch ($jwk['kty']) {
case 'RSA':
if (!empty($jwk['d'])) {
throw new \UnexpectedValueException('RSA private keys are not supported');
}
if (!isset($jwk['n']) || !isset($jwk['e'])) {
throw new \UnexpectedValueException('RSA keys must contain values for both "n" and "e"');
}
$pem = self::createPemFromModulusAndExponent($jwk['n'], $jwk['e']);
$publicKey = \openssl_pkey_get_public($pem);
if (\false === $publicKey) {
throw new \DomainException('OpenSSL error: ' . \openssl_error_string());
}
return new \Google\Site_Kit_Dependencies\Firebase\JWT\Key($publicKey, $jwk['alg']);
case 'EC':
if (isset($jwk['d'])) {
// The key is actually a private key
throw new \UnexpectedValueException('Key data must be for a public key');
}
if (empty($jwk['crv'])) {
throw new \UnexpectedValueException('crv not set');
}
if (!isset(self::EC_CURVES[$jwk['crv']])) {
throw new \DomainException('Unrecognised or unsupported EC curve');
}
if (empty($jwk['x']) || empty($jwk['y'])) {
throw new \UnexpectedValueException('x and y not set');
}
$publicKey = self::createPemFromCrvAndXYCoordinates($jwk['crv'], $jwk['x'], $jwk['y']);
return new \Google\Site_Kit_Dependencies\Firebase\JWT\Key($publicKey, $jwk['alg']);
case 'OKP':
if (isset($jwk['d'])) {
// The key is actually a private key
throw new \UnexpectedValueException('Key data must be for a public key');
}
if (!isset($jwk['crv'])) {
throw new \UnexpectedValueException('crv not set');
}
if (empty(self::OKP_SUBTYPES[$jwk['crv']])) {
throw new \DomainException('Unrecognised or unsupported OKP key subtype');
}
if (empty($jwk['x'])) {
throw new \UnexpectedValueException('x not set');
}
// This library works internally with EdDSA keys (Ed25519) encoded in standard base64.
$publicKey = \Google\Site_Kit_Dependencies\Firebase\JWT\JWT::convertBase64urlToBase64($jwk['x']);
return new \Google\Site_Kit_Dependencies\Firebase\JWT\Key($publicKey, $jwk['alg']);
default:
break;
}
return null;
}
/**
* Converts the EC JWK values to pem format.
*
* @param string $crv The EC curve (only P-256 & P-384 is supported)
* @param string $x The EC x-coordinate
* @param string $y The EC y-coordinate
*
* @return string
*/
private static function createPemFromCrvAndXYCoordinates(string $crv, string $x, string $y) : string
{
$pem = self::encodeDER(self::ASN1_SEQUENCE, self::encodeDER(self::ASN1_SEQUENCE, self::encodeDER(self::ASN1_OBJECT_IDENTIFIER, self::encodeOID(self::OID)) . self::encodeDER(self::ASN1_OBJECT_IDENTIFIER, self::encodeOID(self::EC_CURVES[$crv]))) . self::encodeDER(self::ASN1_BIT_STRING, \chr(0x0) . \chr(0x4) . \Google\Site_Kit_Dependencies\Firebase\JWT\JWT::urlsafeB64Decode($x) . \Google\Site_Kit_Dependencies\Firebase\JWT\JWT::urlsafeB64Decode($y)));
return \sprintf("-----BEGIN PUBLIC KEY-----\n%s\n-----END PUBLIC KEY-----\n", \wordwrap(\base64_encode($pem), 64, "\n", \true));
}
/**
* Create a public key represented in PEM format from RSA modulus and exponent information
*
* @param string $n The RSA modulus encoded in Base64
* @param string $e The RSA exponent encoded in Base64
*
* @return string The RSA public key represented in PEM format
*
* @uses encodeLength
*/
private static function createPemFromModulusAndExponent(string $n, string $e) : string
{
$mod = \Google\Site_Kit_Dependencies\Firebase\JWT\JWT::urlsafeB64Decode($n);
$exp = \Google\Site_Kit_Dependencies\Firebase\JWT\JWT::urlsafeB64Decode($e);
$modulus = \pack('Ca*a*', 2, self::encodeLength(\strlen($mod)), $mod);
$publicExponent = \pack('Ca*a*', 2, self::encodeLength(\strlen($exp)), $exp);
$rsaPublicKey = \pack('Ca*a*a*', 48, self::encodeLength(\strlen($modulus) + \strlen($publicExponent)), $modulus, $publicExponent);
// sequence(oid(1.2.840.113549.1.1.1), null)) = rsaEncryption.
$rsaOID = \pack('H*', '300d06092a864886f70d0101010500');
// hex version of MA0GCSqGSIb3DQEBAQUA
$rsaPublicKey = \chr(0) . $rsaPublicKey;
$rsaPublicKey = \chr(3) . self::encodeLength(\strlen($rsaPublicKey)) . $rsaPublicKey;
$rsaPublicKey = \pack('Ca*a*', 48, self::encodeLength(\strlen($rsaOID . $rsaPublicKey)), $rsaOID . $rsaPublicKey);
return "-----BEGIN PUBLIC KEY-----\r\n" . \chunk_split(\base64_encode($rsaPublicKey), 64) . '-----END PUBLIC KEY-----';
}
/**
* DER-encode the length
*
* DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See
* {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information.
*
* @param int $length
* @return string
*/
private static function encodeLength(int $length) : string
{
if ($length <= 0x7f) {
return \chr($length);
}
$temp = \ltrim(\pack('N', $length), \chr(0));
return \pack('Ca*', 0x80 | \strlen($temp), $temp);
}
/**
* Encodes a value into a DER object.
* Also defined in Firebase\JWT\JWT
*
* @param int $type DER tag
* @param string $value the value to encode
* @return string the encoded object
*/
private static function encodeDER(int $type, string $value) : string
{
$tag_header = 0;
if ($type === self::ASN1_SEQUENCE) {
$tag_header |= 0x20;
}
// Type
$der = \chr($tag_header | $type);
// Length
$der .= \chr(\strlen($value));
return $der . $value;
}
/**
* Encodes a string into a DER-encoded OID.
*
* @param string $oid the OID string
* @return string the binary DER-encoded OID
*/
private static function encodeOID(string $oid) : string
{
$octets = \explode('.', $oid);
// Get the first octet
$first = (int) \array_shift($octets);
$second = (int) \array_shift($octets);
$oid = \chr($first * 40 + $second);
// Iterate over subsequent octets
foreach ($octets as $octet) {
if ($octet == 0) {
$oid .= \chr(0x0);
continue;
}
$bin = '';
while ($octet) {
$bin .= \chr(0x80 | $octet & 0x7f);
$octet >>= 7;
}
$bin[0] = $bin[0] & \chr(0x7f);
// Convert to big endian if necessary
if (\pack('V', 65534) == \pack('L', 65534)) {
$oid .= \strrev($bin);
} else {
$oid .= $bin;
}
}
return $oid;
}
}

View File

@@ -0,0 +1,572 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
use ArrayAccess;
use DateTime;
use DomainException;
use Exception;
use InvalidArgumentException;
use OpenSSLAsymmetricKey;
use OpenSSLCertificate;
use stdClass;
use UnexpectedValueException;
/**
* JSON Web Token implementation, based on this spec:
* https://tools.ietf.org/html/rfc7519
*
* PHP version 5
*
* @category Authentication
* @package Authentication_JWT
* @author Neuman Vong <neuman@twilio.com>
* @author Anant Narayanan <anant@php.net>
* @license http://opensource.org/licenses/BSD-3-Clause 3-clause BSD
* @link https://github.com/firebase/php-jwt
*/
class JWT
{
private const ASN1_INTEGER = 0x2;
private const ASN1_SEQUENCE = 0x10;
private const ASN1_BIT_STRING = 0x3;
/**
* When checking nbf, iat or expiration times,
* we want to provide some extra leeway time to
* account for clock skew.
*
* @var int
*/
public static $leeway = 0;
/**
* Allow the current timestamp to be specified.
* Useful for fixing a value within unit testing.
* Will default to PHP time() value if null.
*
* @var ?int
*/
public static $timestamp = null;
/**
* @var array<string, string[]>
*/
public static $supported_algs = ['ES384' => ['openssl', 'SHA384'], 'ES256' => ['openssl', 'SHA256'], 'ES256K' => ['openssl', 'SHA256'], 'HS256' => ['hash_hmac', 'SHA256'], 'HS384' => ['hash_hmac', 'SHA384'], 'HS512' => ['hash_hmac', 'SHA512'], 'RS256' => ['openssl', 'SHA256'], 'RS384' => ['openssl', 'SHA384'], 'RS512' => ['openssl', 'SHA512'], 'EdDSA' => ['sodium_crypto', 'EdDSA']];
/**
* Decodes a JWT string into a PHP object.
*
* @param string $jwt The JWT
* @param Key|ArrayAccess<string,Key>|array<string,Key> $keyOrKeyArray The Key or associative array of key IDs
* (kid) to Key objects.
* If the algorithm used is asymmetric, this is
* the public key.
* Each Key object contains an algorithm and
* matching key.
* Supported algorithms are 'ES384','ES256',
* 'HS256', 'HS384', 'HS512', 'RS256', 'RS384'
* and 'RS512'.
* @param stdClass $headers Optional. Populates stdClass with headers.
*
* @return stdClass The JWT's payload as a PHP object
*
* @throws InvalidArgumentException Provided key/key-array was empty or malformed
* @throws DomainException Provided JWT is malformed
* @throws UnexpectedValueException Provided JWT was invalid
* @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
* @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
* @throws BeforeValidException Provided JWT is trying to be used before it's been created as defined by 'iat'
* @throws ExpiredException Provided JWT has since expired, as defined by the 'exp' claim
*
* @uses jsonDecode
* @uses urlsafeB64Decode
*/
public static function decode(string $jwt, $keyOrKeyArray, \stdClass &$headers = null) : \stdClass
{
// Validate JWT
$timestamp = \is_null(static::$timestamp) ? \time() : static::$timestamp;
if (empty($keyOrKeyArray)) {
throw new \InvalidArgumentException('Key may not be empty');
}
$tks = \explode('.', $jwt);
if (\count($tks) !== 3) {
throw new \UnexpectedValueException('Wrong number of segments');
}
list($headb64, $bodyb64, $cryptob64) = $tks;
$headerRaw = static::urlsafeB64Decode($headb64);
if (null === ($header = static::jsonDecode($headerRaw))) {
throw new \UnexpectedValueException('Invalid header encoding');
}
if ($headers !== null) {
$headers = $header;
}
$payloadRaw = static::urlsafeB64Decode($bodyb64);
if (null === ($payload = static::jsonDecode($payloadRaw))) {
throw new \UnexpectedValueException('Invalid claims encoding');
}
if (\is_array($payload)) {
// prevent PHP Fatal Error in edge-cases when payload is empty array
$payload = (object) $payload;
}
if (!$payload instanceof \stdClass) {
throw new \UnexpectedValueException('Payload must be a JSON object');
}
$sig = static::urlsafeB64Decode($cryptob64);
if (empty($header->alg)) {
throw new \UnexpectedValueException('Empty algorithm');
}
if (empty(static::$supported_algs[$header->alg])) {
throw new \UnexpectedValueException('Algorithm not supported');
}
$key = self::getKey($keyOrKeyArray, \property_exists($header, 'kid') ? $header->kid : null);
// Check the algorithm
if (!self::constantTimeEquals($key->getAlgorithm(), $header->alg)) {
// See issue #351
throw new \UnexpectedValueException('Incorrect key for this algorithm');
}
if (\in_array($header->alg, ['ES256', 'ES256K', 'ES384'], \true)) {
// OpenSSL expects an ASN.1 DER sequence for ES256/ES256K/ES384 signatures
$sig = self::signatureToDER($sig);
}
if (!self::verify("{$headb64}.{$bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) {
throw new \Google\Site_Kit_Dependencies\Firebase\JWT\SignatureInvalidException('Signature verification failed');
}
// Check the nbf if it is defined. This is the time that the
// token can actually be used. If it's not yet that time, abort.
if (isset($payload->nbf) && \floor($payload->nbf) > $timestamp + static::$leeway) {
$ex = new \Google\Site_Kit_Dependencies\Firebase\JWT\BeforeValidException('Cannot handle token with nbf prior to ' . \date(\DateTime::ISO8601, (int) $payload->nbf));
$ex->setPayload($payload);
throw $ex;
}
// Check that this token has been created before 'now'. This prevents
// using tokens that have been created for later use (and haven't
// correctly used the nbf claim).
if (!isset($payload->nbf) && isset($payload->iat) && \floor($payload->iat) > $timestamp + static::$leeway) {
$ex = new \Google\Site_Kit_Dependencies\Firebase\JWT\BeforeValidException('Cannot handle token with iat prior to ' . \date(\DateTime::ISO8601, (int) $payload->iat));
$ex->setPayload($payload);
throw $ex;
}
// Check if this token has expired.
if (isset($payload->exp) && $timestamp - static::$leeway >= $payload->exp) {
$ex = new \Google\Site_Kit_Dependencies\Firebase\JWT\ExpiredException('Expired token');
$ex->setPayload($payload);
throw $ex;
}
return $payload;
}
/**
* Converts and signs a PHP array into a JWT string.
*
* @param array<mixed> $payload PHP array
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key.
* @param string $alg Supported algorithms are 'ES384','ES256', 'ES256K', 'HS256',
* 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
* @param string $keyId
* @param array<string, string> $head An array with header elements to attach
*
* @return string A signed JWT
*
* @uses jsonEncode
* @uses urlsafeB64Encode
*/
public static function encode(array $payload, $key, string $alg, string $keyId = null, array $head = null) : string
{
$header = ['typ' => 'JWT'];
if (isset($head) && \is_array($head)) {
$header = \array_merge($header, $head);
}
$header['alg'] = $alg;
if ($keyId !== null) {
$header['kid'] = $keyId;
}
$segments = [];
$segments[] = static::urlsafeB64Encode((string) static::jsonEncode($header));
$segments[] = static::urlsafeB64Encode((string) static::jsonEncode($payload));
$signing_input = \implode('.', $segments);
$signature = static::sign($signing_input, $key, $alg);
$segments[] = static::urlsafeB64Encode($signature);
return \implode('.', $segments);
}
/**
* Sign a string with a given key and algorithm.
*
* @param string $msg The message to sign
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $key The secret key.
* @param string $alg Supported algorithms are 'EdDSA', 'ES384', 'ES256', 'ES256K', 'HS256',
* 'HS384', 'HS512', 'RS256', 'RS384', and 'RS512'
*
* @return string An encrypted message
*
* @throws DomainException Unsupported algorithm or bad key was specified
*/
public static function sign(string $msg, $key, string $alg) : string
{
if (empty(static::$supported_algs[$alg])) {
throw new \DomainException('Algorithm not supported');
}
list($function, $algorithm) = static::$supported_algs[$alg];
switch ($function) {
case 'hash_hmac':
if (!\is_string($key)) {
throw new \InvalidArgumentException('key must be a string when using hmac');
}
return \hash_hmac($algorithm, $msg, $key, \true);
case 'openssl':
$signature = '';
$success = \openssl_sign($msg, $signature, $key, $algorithm);
// @phpstan-ignore-line
if (!$success) {
throw new \DomainException('OpenSSL unable to sign data');
}
if ($alg === 'ES256' || $alg === 'ES256K') {
$signature = self::signatureFromDER($signature, 256);
} elseif ($alg === 'ES384') {
$signature = self::signatureFromDER($signature, 384);
}
return $signature;
case 'sodium_crypto':
if (!\function_exists('sodium_crypto_sign_detached')) {
throw new \DomainException('libsodium is not available');
}
if (!\is_string($key)) {
throw new \InvalidArgumentException('key must be a string when using EdDSA');
}
try {
// The last non-empty line is used as the key.
$lines = \array_filter(\explode("\n", $key));
$key = \base64_decode((string) \end($lines));
if (\strlen($key) === 0) {
throw new \DomainException('Key cannot be empty string');
}
return \sodium_crypto_sign_detached($msg, $key);
} catch (\Exception $e) {
throw new \DomainException($e->getMessage(), 0, $e);
}
}
throw new \DomainException('Algorithm not supported');
}
/**
* Verify a signature with the message, key and method. Not all methods
* are symmetric, so we must have a separate verify and sign method.
*
* @param string $msg The original message (header and body)
* @param string $signature The original signature
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial For Ed*, ES*, HS*, a string key works. for RS*, must be an instance of OpenSSLAsymmetricKey
* @param string $alg The algorithm
*
* @return bool
*
* @throws DomainException Invalid Algorithm, bad key, or OpenSSL failure
*/
private static function verify(string $msg, string $signature, $keyMaterial, string $alg) : bool
{
if (empty(static::$supported_algs[$alg])) {
throw new \DomainException('Algorithm not supported');
}
list($function, $algorithm) = static::$supported_algs[$alg];
switch ($function) {
case 'openssl':
$success = \openssl_verify($msg, $signature, $keyMaterial, $algorithm);
// @phpstan-ignore-line
if ($success === 1) {
return \true;
}
if ($success === 0) {
return \false;
}
// returns 1 on success, 0 on failure, -1 on error.
throw new \DomainException('OpenSSL error: ' . \openssl_error_string());
case 'sodium_crypto':
if (!\function_exists('sodium_crypto_sign_verify_detached')) {
throw new \DomainException('libsodium is not available');
}
if (!\is_string($keyMaterial)) {
throw new \InvalidArgumentException('key must be a string when using EdDSA');
}
try {
// The last non-empty line is used as the key.
$lines = \array_filter(\explode("\n", $keyMaterial));
$key = \base64_decode((string) \end($lines));
if (\strlen($key) === 0) {
throw new \DomainException('Key cannot be empty string');
}
if (\strlen($signature) === 0) {
throw new \DomainException('Signature cannot be empty string');
}
return \sodium_crypto_sign_verify_detached($signature, $msg, $key);
} catch (\Exception $e) {
throw new \DomainException($e->getMessage(), 0, $e);
}
case 'hash_hmac':
default:
if (!\is_string($keyMaterial)) {
throw new \InvalidArgumentException('key must be a string when using hmac');
}
$hash = \hash_hmac($algorithm, $msg, $keyMaterial, \true);
return self::constantTimeEquals($hash, $signature);
}
}
/**
* Decode a JSON string into a PHP object.
*
* @param string $input JSON string
*
* @return mixed The decoded JSON string
*
* @throws DomainException Provided string was invalid JSON
*/
public static function jsonDecode(string $input)
{
$obj = \json_decode($input, \false, 512, \JSON_BIGINT_AS_STRING);
if ($errno = \json_last_error()) {
self::handleJsonError($errno);
} elseif ($obj === null && $input !== 'null') {
throw new \DomainException('Null result with non-null input');
}
return $obj;
}
/**
* Encode a PHP array into a JSON string.
*
* @param array<mixed> $input A PHP array
*
* @return string JSON representation of the PHP array
*
* @throws DomainException Provided object could not be encoded to valid JSON
*/
public static function jsonEncode(array $input) : string
{
if (\PHP_VERSION_ID >= 50400) {
$json = \json_encode($input, \JSON_UNESCAPED_SLASHES);
} else {
// PHP 5.3 only
$json = \json_encode($input);
}
if ($errno = \json_last_error()) {
self::handleJsonError($errno);
} elseif ($json === 'null') {
throw new \DomainException('Null result with non-null input');
}
if ($json === \false) {
throw new \DomainException('Provided object could not be encoded to valid JSON');
}
return $json;
}
/**
* Decode a string with URL-safe Base64.
*
* @param string $input A Base64 encoded string
*
* @return string A decoded string
*
* @throws InvalidArgumentException invalid base64 characters
*/
public static function urlsafeB64Decode(string $input) : string
{
return \base64_decode(self::convertBase64UrlToBase64($input));
}
/**
* Convert a string in the base64url (URL-safe Base64) encoding to standard base64.
*
* @param string $input A Base64 encoded string with URL-safe characters (-_ and no padding)
*
* @return string A Base64 encoded string with standard characters (+/) and padding (=), when
* needed.
*
* @see https://www.rfc-editor.org/rfc/rfc4648
*/
public static function convertBase64UrlToBase64(string $input) : string
{
$remainder = \strlen($input) % 4;
if ($remainder) {
$padlen = 4 - $remainder;
$input .= \str_repeat('=', $padlen);
}
return \strtr($input, '-_', '+/');
}
/**
* Encode a string with URL-safe Base64.
*
* @param string $input The string you want encoded
*
* @return string The base64 encode of what you passed in
*/
public static function urlsafeB64Encode(string $input) : string
{
return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_'));
}
/**
* Determine if an algorithm has been provided for each Key
*
* @param Key|ArrayAccess<string,Key>|array<string,Key> $keyOrKeyArray
* @param string|null $kid
*
* @throws UnexpectedValueException
*
* @return Key
*/
private static function getKey($keyOrKeyArray, ?string $kid) : \Google\Site_Kit_Dependencies\Firebase\JWT\Key
{
if ($keyOrKeyArray instanceof \Google\Site_Kit_Dependencies\Firebase\JWT\Key) {
return $keyOrKeyArray;
}
if (empty($kid) && $kid !== '0') {
throw new \UnexpectedValueException('"kid" empty, unable to lookup correct key');
}
if ($keyOrKeyArray instanceof \Google\Site_Kit_Dependencies\Firebase\JWT\CachedKeySet) {
// Skip "isset" check, as this will automatically refresh if not set
return $keyOrKeyArray[$kid];
}
if (!isset($keyOrKeyArray[$kid])) {
throw new \UnexpectedValueException('"kid" invalid, unable to lookup correct key');
}
return $keyOrKeyArray[$kid];
}
/**
* @param string $left The string of known length to compare against
* @param string $right The user-supplied string
* @return bool
*/
public static function constantTimeEquals(string $left, string $right) : bool
{
if (\function_exists('hash_equals')) {
return \hash_equals($left, $right);
}
$len = \min(self::safeStrlen($left), self::safeStrlen($right));
$status = 0;
for ($i = 0; $i < $len; $i++) {
$status |= \ord($left[$i]) ^ \ord($right[$i]);
}
$status |= self::safeStrlen($left) ^ self::safeStrlen($right);
return $status === 0;
}
/**
* Helper method to create a JSON error.
*
* @param int $errno An error number from json_last_error()
*
* @throws DomainException
*
* @return void
*/
private static function handleJsonError(int $errno) : void
{
$messages = [\JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', \JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON', \JSON_ERROR_CTRL_CHAR => 'Unexpected control character found', \JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON', \JSON_ERROR_UTF8 => 'Malformed UTF-8 characters'];
throw new \DomainException(isset($messages[$errno]) ? $messages[$errno] : 'Unknown JSON error: ' . $errno);
}
/**
* Get the number of bytes in cryptographic strings.
*
* @param string $str
*
* @return int
*/
private static function safeStrlen(string $str) : int
{
if (\function_exists('mb_strlen')) {
return \mb_strlen($str, '8bit');
}
return \strlen($str);
}
/**
* Convert an ECDSA signature to an ASN.1 DER sequence
*
* @param string $sig The ECDSA signature to convert
* @return string The encoded DER object
*/
private static function signatureToDER(string $sig) : string
{
// Separate the signature into r-value and s-value
$length = \max(1, (int) (\strlen($sig) / 2));
list($r, $s) = \str_split($sig, $length);
// Trim leading zeros
$r = \ltrim($r, "\x00");
$s = \ltrim($s, "\x00");
// Convert r-value and s-value from unsigned big-endian integers to
// signed two's complement
if (\ord($r[0]) > 0x7f) {
$r = "\x00" . $r;
}
if (\ord($s[0]) > 0x7f) {
$s = "\x00" . $s;
}
return self::encodeDER(self::ASN1_SEQUENCE, self::encodeDER(self::ASN1_INTEGER, $r) . self::encodeDER(self::ASN1_INTEGER, $s));
}
/**
* Encodes a value into a DER object.
*
* @param int $type DER tag
* @param string $value the value to encode
*
* @return string the encoded object
*/
private static function encodeDER(int $type, string $value) : string
{
$tag_header = 0;
if ($type === self::ASN1_SEQUENCE) {
$tag_header |= 0x20;
}
// Type
$der = \chr($tag_header | $type);
// Length
$der .= \chr(\strlen($value));
return $der . $value;
}
/**
* Encodes signature from a DER object.
*
* @param string $der binary signature in DER format
* @param int $keySize the number of bits in the key
*
* @return string the signature
*/
private static function signatureFromDER(string $der, int $keySize) : string
{
// OpenSSL returns the ECDSA signatures as a binary ASN.1 DER SEQUENCE
list($offset, $_) = self::readDER($der);
list($offset, $r) = self::readDER($der, $offset);
list($offset, $s) = self::readDER($der, $offset);
// Convert r-value and s-value from signed two's compliment to unsigned
// big-endian integers
$r = \ltrim($r, "\x00");
$s = \ltrim($s, "\x00");
// Pad out r and s so that they are $keySize bits long
$r = \str_pad($r, $keySize / 8, "\x00", \STR_PAD_LEFT);
$s = \str_pad($s, $keySize / 8, "\x00", \STR_PAD_LEFT);
return $r . $s;
}
/**
* Reads binary DER-encoded data and decodes into a single object
*
* @param string $der the binary data in DER format
* @param int $offset the offset of the data stream containing the object
* to decode
*
* @return array{int, string|null} the new offset and the decoded object
*/
private static function readDER(string $der, int $offset = 0) : array
{
$pos = $offset;
$size = \strlen($der);
$constructed = \ord($der[$pos]) >> 5 & 0x1;
$type = \ord($der[$pos++]) & 0x1f;
// Length
$len = \ord($der[$pos++]);
if ($len & 0x80) {
$n = $len & 0x1f;
$len = 0;
while ($n-- && $pos < $size) {
$len = $len << 8 | \ord($der[$pos++]);
}
}
// Value
if ($type === self::ASN1_BIT_STRING) {
$pos++;
// Skip the first contents octet (padding indicator)
$data = \substr($der, $pos, $len - 1);
$pos += $len - 1;
} elseif (!$constructed) {
$data = \substr($der, $pos, $len);
$pos += $len;
} else {
$data = null;
}
return [$pos, $data];
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
interface JWTExceptionWithPayloadInterface
{
/**
* Get the payload that caused this exception.
*
* @return object
*/
public function getPayload() : object;
/**
* Get the payload that caused this exception.
*
* @param object $payload
* @return void
*/
public function setPayload(object $payload) : void;
}

View File

@@ -0,0 +1,50 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
use InvalidArgumentException;
use OpenSSLAsymmetricKey;
use OpenSSLCertificate;
use TypeError;
class Key
{
/** @var string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate */
private $keyMaterial;
/** @var string */
private $algorithm;
/**
* @param string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate $keyMaterial
* @param string $algorithm
*/
public function __construct($keyMaterial, string $algorithm)
{
if (!\is_string($keyMaterial) && !$keyMaterial instanceof \OpenSSLAsymmetricKey && !$keyMaterial instanceof \OpenSSLCertificate && !\is_resource($keyMaterial)) {
throw new \TypeError('Key material must be a string, resource, or OpenSSLAsymmetricKey');
}
if (empty($keyMaterial)) {
throw new \InvalidArgumentException('Key material must not be empty');
}
if (empty($algorithm)) {
throw new \InvalidArgumentException('Algorithm must not be empty');
}
// TODO: Remove in PHP 8.0 in favor of class constructor property promotion
$this->keyMaterial = $keyMaterial;
$this->algorithm = $algorithm;
}
/**
* Return the algorithm valid for this key
*
* @return string
*/
public function getAlgorithm() : string
{
return $this->algorithm;
}
/**
* @return string|resource|OpenSSLAsymmetricKey|OpenSSLCertificate
*/
public function getKeyMaterial()
{
return $this->keyMaterial;
}
}

View File

@@ -0,0 +1,7 @@
<?php
namespace Google\Site_Kit_Dependencies\Firebase\JWT;
class SignatureInvalidException extends \UnexpectedValueException
{
}

View File

@@ -0,0 +1,147 @@
<?php
namespace Google\Site_Kit_Dependencies;
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* The "adSenseLinks" collection of methods.
* Typical usage is:
* <code>
* $analyticsadminService = new Google_Service_GoogleAnalyticsAdmin(...);
* $adSenseLinks = $analyticsadminService->adSenseLinks;
* </code>
*/
class Google_Service_GoogleAnalyticsAdmin_PropertiesAdSenseLinks_Resource extends \Google\Site_Kit_Dependencies\Google_Service_Resource
{
/**
* Creates an AdSenseLink. (adSenseLinks.create)
*
* @param string $parent Required. The property for which to create an AdSense
* Link. Format: properties/{propertyId} Example: properties/1234
* @param Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink $postBody
* @param array $optParams Optional parameters.
* @return Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink
*/
public function create($parent, \Google\Site_Kit_Dependencies\Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink $postBody, $optParams = array())
{
$params = array('parent' => $parent, 'postBody' => $postBody);
$params = \array_merge($params, $optParams);
return $this->call('create', array($params), Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink::class);
}
/**
* Deletes an AdSenseLink. (adSenseLinks.delete)
*
* @param string $name Required. Unique identifier for the AdSense Link to be
* deleted. Format: properties/{propertyId}/adSenseLinks/{linkId} Example:
* properties/1234/adSenseLinks/5678
* @param array $optParams Optional parameters.
* @return Google_Service_GoogleAnalyticsAdmin_GoogleProtobufEmpty
*/
public function delete($name, $optParams = array())
{
$params = array('name' => $name);
$params = \array_merge($params, $optParams);
return $this->call('delete', array($params), Google_Service_GoogleAnalyticsAdmin_GoogleProtobufEmpty::class);
}
/**
* Looks up a single AdSenseLink. (adSenseLinks.get)
*
* @param string $name Required. Unique identifier for the AdSense Link
* requested. Format: properties/{propertyId}/adSenseLinks/{linkId} Example:
* properties/1234/adSenseLinks/5678
* @param array $optParams Optional parameters.
* @return Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink
*/
public function get($name, $optParams = array())
{
$params = array('name' => $name);
$params = \array_merge($params, $optParams);
return $this->call('get', array($params), Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink::class);
}
/**
* Lists AdSenseLinks on a property. (adSenseLinks.listPropertiesAdSenseLinks)
*
* @param string $parent Required. Resource name of the parent property. Format:
* properties/{propertyId} Example: properties/1234
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of resources to return. If
* unspecified, at most 50 resources will be returned. The maximum value is 200
* (higher values will be coerced to the maximum).
* @opt_param string pageToken A page token received from a previous
* `ListAdSenseLinks` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListAdSenseLinks` must match
* the call that provided the page token.
* @return Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse
*/
public function listPropertiesAdSenseLinks($parent, $optParams = array())
{
$params = array('parent' => $parent);
$params = \array_merge($params, $optParams);
return $this->call('list', array($params), Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse::class);
}
}
class Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink extends \Google\Site_Kit_Dependencies\Google_Model
{
protected $internal_gapi_mappings = array();
public $adClientCode;
public $name;
public function setAdClientCode($adClientCode)
{
$this->adClientCode = $adClientCode;
}
public function getAdClientCode()
{
return $this->adClientCode;
}
public function setName($name)
{
$this->name = $name;
}
public function getName()
{
return $this->name;
}
}
class Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaListAdSenseLinksResponse extends \Google\Site_Kit_Dependencies\Google_Collection
{
protected $collection_key = 'adsenseLinks';
protected $internal_gapi_mappings = array();
protected $adsenseLinksType = 'Google_Service_GoogleAnalyticsAdmin_GoogleAnalyticsAdminV1alphaAdSenseLink';
protected $adsenseLinksDataType = 'array';
public $adsenseLinks;
public $nextPageToken;
public function setAdsenseLinks($adsenseLinks)
{
$this->adsenseLinks = $adsenseLinks;
}
public function getAdsenseLinks()
{
return $this->adsenseLinks;
}
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
class Google_Service_GoogleAnalyticsAdmin_GoogleProtobufEmpty extends \Google\Site_Kit_Dependencies\Google_Model
{
}

View File

@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service;
use Google\Site_Kit_Dependencies\Google\Client;
/**
* Service definition for SubscribewithGoogle (v1).
*
* <p>
* The Subscribe with Google Publication APIs enable a publisher to fetch
* information related to their SwG subscriptions, including the entitlement
* status of users who are requesting publisher content, the publications owned
* by the publisher, the entitlements plans of their SwG readers, the readers'
* profile information and purchase order information.</p>
*
* <p>
* For more information about this service, see the API
* <a href="https://developers.google.com/news/subscribe/guides/overview" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class SubscribewithGoogle extends \Google\Site_Kit_Dependencies\Google\Service
{
/** See and review your subscription information. */
const SUBSCRIBEWITHGOOGLE_PUBLICATIONS_ENTITLEMENTS_READONLY = "https://www.googleapis.com/auth/subscribewithgoogle.publications.entitlements.readonly";
/** See your primary Google Account email address. */
const USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email";
public $publications;
public $publications_entitlements;
public $publications_readers;
public $publications_readers_entitlementsplans;
public $publications_readers_orders;
public $rootUrlTemplate;
/**
* Constructs the internal representation of the SubscribewithGoogle service.
*
* @param Client|array $clientOrConfig The client used to deliver requests, or a
* config array to pass to a new Client instance.
* @param string $rootUrl The root URL used for requests to the service.
*/
public function __construct($clientOrConfig = [], $rootUrl = null)
{
parent::__construct($clientOrConfig);
$this->rootUrl = $rootUrl ?: 'https://subscribewithgoogle.googleapis.com/';
$this->rootUrlTemplate = $rootUrl ?: 'https://subscribewithgoogle.UNIVERSE_DOMAIN/';
$this->servicePath = '';
$this->batchPath = 'batch';
$this->version = 'v1';
$this->serviceName = 'subscribewithgoogle';
$this->publications = new \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\Publications($this, $this->serviceName, 'publications', ['methods' => ['list' => ['path' => 'v1/publications', 'httpMethod' => 'GET', 'parameters' => ['filter' => ['location' => 'query', 'type' => 'string'], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->publications_entitlements = new \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsEntitlements($this, $this->serviceName, 'entitlements', ['methods' => ['list' => ['path' => 'v1/publications/{publicationId}/entitlements', 'httpMethod' => 'GET', 'parameters' => ['publicationId' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->publications_readers = new \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsReaders($this, $this->serviceName, 'readers', ['methods' => ['get' => ['path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]);
$this->publications_readers_entitlementsplans = new \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsReadersEntitlementsplans($this, $this->serviceName, 'entitlementsplans', ['methods' => ['get' => ['path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v1/{+parent}/entitlementsplans', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->publications_readers_orders = new \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsReadersOrders($this, $this->serviceName, 'orders', ['methods' => ['get' => ['path' => 'v1/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class BusinessPredicates extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var bool
*/
public $canSell;
/**
* @var bool
*/
public $supportsSiteKit;
/**
* @param bool
*/
public function setCanSell($canSell)
{
$this->canSell = $canSell;
}
/**
* @return bool
*/
public function getCanSell()
{
return $this->canSell;
}
/**
* @param bool
*/
public function setSupportsSiteKit($supportsSiteKit)
{
$this->supportsSiteKit = $supportsSiteKit;
}
/**
* @return bool
*/
public function getSupportsSiteKit()
{
return $this->supportsSiteKit;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\BusinessPredicates::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_BusinessPredicates');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class CanceledDetails extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $cancelReason;
/**
* @param string
*/
public function setCancelReason($cancelReason)
{
$this->cancelReason = $cancelReason;
}
/**
* @return string
*/
public function getCancelReason()
{
return $this->cancelReason;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\CanceledDetails::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_CanceledDetails');

View File

@@ -0,0 +1,133 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class Entitlement extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'products';
/**
* @var string
*/
public $name;
/**
* @var string[]
*/
public $products;
/**
* @var string
*/
public $readerId;
/**
* @var string
*/
public $source;
/**
* @var string
*/
public $subscriptionToken;
/**
* @var string
*/
public $userId;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string[]
*/
public function setProducts($products)
{
$this->products = $products;
}
/**
* @return string[]
*/
public function getProducts()
{
return $this->products;
}
/**
* @param string
*/
public function setReaderId($readerId)
{
$this->readerId = $readerId;
}
/**
* @return string
*/
public function getReaderId()
{
return $this->readerId;
}
/**
* @param string
*/
public function setSource($source)
{
$this->source = $source;
}
/**
* @return string
*/
public function getSource()
{
return $this->source;
}
/**
* @param string
*/
public function setSubscriptionToken($subscriptionToken)
{
$this->subscriptionToken = $subscriptionToken;
}
/**
* @return string
*/
public function getSubscriptionToken()
{
return $this->subscriptionToken;
}
/**
* @param string
*/
public function setUserId($userId)
{
$this->userId = $userId;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Entitlement::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Entitlement');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class ListEntitlementsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'entitlements';
protected $entitlementsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Entitlement::class;
protected $entitlementsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Entitlement[]
*/
public function setEntitlements($entitlements)
{
$this->entitlements = $entitlements;
}
/**
* @return Entitlement[]
*/
public function getEntitlements()
{
return $this->entitlements;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListEntitlementsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_ListEntitlementsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class ListPublicationsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'publications';
/**
* @var string
*/
public $nextPageToken;
protected $publicationsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Publication::class;
protected $publicationsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Publication[]
*/
public function setPublications($publications)
{
$this->publications = $publications;
}
/**
* @return Publication[]
*/
public function getPublications()
{
return $this->publications;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListPublicationsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_ListPublicationsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class ListUserEntitlementsPlansResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'userEntitlementsPlans';
/**
* @var string
*/
public $nextPageToken;
protected $userEntitlementsPlansType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\UserEntitlementsPlan::class;
protected $userEntitlementsPlansDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param UserEntitlementsPlan[]
*/
public function setUserEntitlementsPlans($userEntitlementsPlans)
{
$this->userEntitlementsPlans = $userEntitlementsPlans;
}
/**
* @return UserEntitlementsPlan[]
*/
public function getUserEntitlementsPlans()
{
return $this->userEntitlementsPlans;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListUserEntitlementsPlansResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_ListUserEntitlementsPlansResponse');

View File

@@ -0,0 +1,78 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class Money extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $currencyCode;
/**
* @var int
*/
public $nanos;
/**
* @var string
*/
public $units;
/**
* @param string
*/
public function setCurrencyCode($currencyCode)
{
$this->currencyCode = $currencyCode;
}
/**
* @return string
*/
public function getCurrencyCode()
{
return $this->currencyCode;
}
/**
* @param int
*/
public function setNanos($nanos)
{
$this->nanos = $nanos;
}
/**
* @return int
*/
public function getNanos()
{
return $this->nanos;
}
/**
* @param string
*/
public function setUnits($units)
{
$this->units = $units;
}
/**
* @return string
*/
public function getUnits()
{
return $this->units;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Money::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Money');

View File

@@ -0,0 +1,77 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class Order extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'stateDetails';
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $orderId;
protected $stateDetailsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\StateDetails::class;
protected $stateDetailsDataType = 'array';
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setOrderId($orderId)
{
$this->orderId = $orderId;
}
/**
* @return string
*/
public function getOrderId()
{
return $this->orderId;
}
/**
* @param StateDetails[]
*/
public function setStateDetails($stateDetails)
{
$this->stateDetails = $stateDetails;
}
/**
* @return StateDetails[]
*/
public function getStateDetails()
{
return $this->stateDetails;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Order::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Order');

View File

@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class PaymentOptions extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var bool
*/
public $contributions;
/**
* @var bool
*/
public $noPayment;
/**
* @var bool
*/
public $subscriptions;
/**
* @var bool
*/
public $thankStickers;
/**
* @param bool
*/
public function setContributions($contributions)
{
$this->contributions = $contributions;
}
/**
* @return bool
*/
public function getContributions()
{
return $this->contributions;
}
/**
* @param bool
*/
public function setNoPayment($noPayment)
{
$this->noPayment = $noPayment;
}
/**
* @return bool
*/
public function getNoPayment()
{
return $this->noPayment;
}
/**
* @param bool
*/
public function setSubscriptions($subscriptions)
{
$this->subscriptions = $subscriptions;
}
/**
* @return bool
*/
public function getSubscriptions()
{
return $this->subscriptions;
}
/**
* @param bool
*/
public function setThankStickers($thankStickers)
{
$this->thankStickers = $thankStickers;
}
/**
* @return bool
*/
public function getThankStickers()
{
return $this->thankStickers;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PaymentOptions::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_PaymentOptions');

View File

@@ -0,0 +1,97 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class PlanEntitlement extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'productIds';
/**
* @var string
*/
public $expireTime;
/**
* @var string[]
*/
public $productIds;
/**
* @var string
*/
public $source;
/**
* @var string
*/
public $subscriptionToken;
/**
* @param string
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
}
/**
* @return string
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* @param string[]
*/
public function setProductIds($productIds)
{
$this->productIds = $productIds;
}
/**
* @return string[]
*/
public function getProductIds()
{
return $this->productIds;
}
/**
* @param string
*/
public function setSource($source)
{
$this->source = $source;
}
/**
* @return string
*/
public function getSource()
{
return $this->source;
}
/**
* @param string
*/
public function setSubscriptionToken($subscriptionToken)
{
$this->subscriptionToken = $subscriptionToken;
}
/**
* @return string
*/
public function getSubscriptionToken()
{
return $this->subscriptionToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PlanEntitlement::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_PlanEntitlement');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class Product extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $name;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Product::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Product');

View File

@@ -0,0 +1,145 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class Publication extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'verifiedDomains';
/**
* @var string
*/
public $displayName;
/**
* @var string
*/
public $onboardingState;
protected $paymentOptionsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PaymentOptions::class;
protected $paymentOptionsDataType = '';
protected $productsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Product::class;
protected $productsDataType = 'array';
/**
* @var string
*/
public $publicationId;
protected $publicationPredicatesType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PublicationPredicates::class;
protected $publicationPredicatesDataType = '';
/**
* @var string[]
*/
public $verifiedDomains;
/**
* @param string
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* @param string
*/
public function setOnboardingState($onboardingState)
{
$this->onboardingState = $onboardingState;
}
/**
* @return string
*/
public function getOnboardingState()
{
return $this->onboardingState;
}
/**
* @param PaymentOptions
*/
public function setPaymentOptions(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PaymentOptions $paymentOptions)
{
$this->paymentOptions = $paymentOptions;
}
/**
* @return PaymentOptions
*/
public function getPaymentOptions()
{
return $this->paymentOptions;
}
/**
* @param Product[]
*/
public function setProducts($products)
{
$this->products = $products;
}
/**
* @return Product[]
*/
public function getProducts()
{
return $this->products;
}
/**
* @param string
*/
public function setPublicationId($publicationId)
{
$this->publicationId = $publicationId;
}
/**
* @return string
*/
public function getPublicationId()
{
return $this->publicationId;
}
/**
* @param PublicationPredicates
*/
public function setPublicationPredicates(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PublicationPredicates $publicationPredicates)
{
$this->publicationPredicates = $publicationPredicates;
}
/**
* @return PublicationPredicates
*/
public function getPublicationPredicates()
{
return $this->publicationPredicates;
}
/**
* @param string[]
*/
public function setVerifiedDomains($verifiedDomains)
{
$this->verifiedDomains = $verifiedDomains;
}
/**
* @return string[]
*/
public function getVerifiedDomains()
{
return $this->verifiedDomains;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Publication::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Publication');

View File

@@ -0,0 +1,40 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class PublicationPredicates extends \Google\Site_Kit_Dependencies\Google\Model
{
protected $businessPredicatesType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\BusinessPredicates::class;
protected $businessPredicatesDataType = '';
/**
* @param BusinessPredicates
*/
public function setBusinessPredicates(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\BusinessPredicates $businessPredicates)
{
$this->businessPredicates = $businessPredicates;
}
/**
* @return BusinessPredicates
*/
public function getBusinessPredicates()
{
return $this->businessPredicates;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PublicationPredicates::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_PublicationPredicates');

View File

@@ -0,0 +1,58 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class PurchaseInfo extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $latestOrderId;
protected $totalAmountType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Money::class;
protected $totalAmountDataType = '';
/**
* @param string
*/
public function setLatestOrderId($latestOrderId)
{
$this->latestOrderId = $latestOrderId;
}
/**
* @return string
*/
public function getLatestOrderId()
{
return $this->latestOrderId;
}
/**
* @param Money
*/
public function setTotalAmount(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Money $totalAmount)
{
$this->totalAmount = $totalAmount;
}
/**
* @return Money
*/
public function getTotalAmount()
{
return $this->totalAmount;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PurchaseInfo::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_PurchaseInfo');

View File

@@ -0,0 +1,150 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class Reader extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $displayName;
/**
* @var string
*/
public $emailAddress;
/**
* @var string
*/
public $familyName;
/**
* @var string
*/
public $givenName;
/**
* @var bool
*/
public $isReaderInfoAvailable;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $readerId;
/**
* @param string
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* @param string
*/
public function setEmailAddress($emailAddress)
{
$this->emailAddress = $emailAddress;
}
/**
* @return string
*/
public function getEmailAddress()
{
return $this->emailAddress;
}
/**
* @param string
*/
public function setFamilyName($familyName)
{
$this->familyName = $familyName;
}
/**
* @return string
*/
public function getFamilyName()
{
return $this->familyName;
}
/**
* @param string
*/
public function setGivenName($givenName)
{
$this->givenName = $givenName;
}
/**
* @return string
*/
public function getGivenName()
{
return $this->givenName;
}
/**
* @param bool
*/
public function setIsReaderInfoAvailable($isReaderInfoAvailable)
{
$this->isReaderInfoAvailable = $isReaderInfoAvailable;
}
/**
* @return bool
*/
public function getIsReaderInfoAvailable()
{
return $this->isReaderInfoAvailable;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setReaderId($readerId)
{
$this->readerId = $readerId;
}
/**
* @return string
*/
public function getReaderId()
{
return $this->readerId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Reader::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Reader');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class RecurrenceDuration extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var int
*/
public $count;
/**
* @var string
*/
public $unit;
/**
* @param int
*/
public function setCount($count)
{
$this->count = $count;
}
/**
* @return int
*/
public function getCount()
{
return $this->count;
}
/**
* @param string
*/
public function setUnit($unit)
{
$this->unit = $unit;
}
/**
* @return string
*/
public function getUnit()
{
return $this->unit;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceDuration::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_RecurrenceDuration');

View File

@@ -0,0 +1,92 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class RecurrenceTerms extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $accountOnHoldMillis;
protected $freeTrialPeriodType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceDuration::class;
protected $freeTrialPeriodDataType = '';
/**
* @var string
*/
public $gracePeriodMillis;
protected $recurrencePeriodType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceDuration::class;
protected $recurrencePeriodDataType = '';
/**
* @param string
*/
public function setAccountOnHoldMillis($accountOnHoldMillis)
{
$this->accountOnHoldMillis = $accountOnHoldMillis;
}
/**
* @return string
*/
public function getAccountOnHoldMillis()
{
return $this->accountOnHoldMillis;
}
/**
* @param RecurrenceDuration
*/
public function setFreeTrialPeriod(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceDuration $freeTrialPeriod)
{
$this->freeTrialPeriod = $freeTrialPeriod;
}
/**
* @return RecurrenceDuration
*/
public function getFreeTrialPeriod()
{
return $this->freeTrialPeriod;
}
/**
* @param string
*/
public function setGracePeriodMillis($gracePeriodMillis)
{
$this->gracePeriodMillis = $gracePeriodMillis;
}
/**
* @return string
*/
public function getGracePeriodMillis()
{
return $this->gracePeriodMillis;
}
/**
* @param RecurrenceDuration
*/
public function setRecurrencePeriod(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceDuration $recurrencePeriod)
{
$this->recurrencePeriod = $recurrencePeriod;
}
/**
* @return RecurrenceDuration
*/
public function getRecurrencePeriod()
{
return $this->recurrencePeriod;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceTerms::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_RecurrenceTerms');

View File

@@ -0,0 +1,124 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class RecurringPlanDetails extends \Google\Site_Kit_Dependencies\Google\Model
{
protected $canceledDetailsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\CanceledDetails::class;
protected $canceledDetailsDataType = '';
protected $recurrenceTermsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceTerms::class;
protected $recurrenceTermsDataType = '';
/**
* @var string
*/
public $recurringPlanState;
protected $suspendedDetailsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\SuspendedDetails::class;
protected $suspendedDetailsDataType = '';
/**
* @var string
*/
public $updateTime;
protected $waitingToRecurDetailsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\WaitingToRecurDetails::class;
protected $waitingToRecurDetailsDataType = '';
/**
* @param CanceledDetails
*/
public function setCanceledDetails(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\CanceledDetails $canceledDetails)
{
$this->canceledDetails = $canceledDetails;
}
/**
* @return CanceledDetails
*/
public function getCanceledDetails()
{
return $this->canceledDetails;
}
/**
* @param RecurrenceTerms
*/
public function setRecurrenceTerms(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurrenceTerms $recurrenceTerms)
{
$this->recurrenceTerms = $recurrenceTerms;
}
/**
* @return RecurrenceTerms
*/
public function getRecurrenceTerms()
{
return $this->recurrenceTerms;
}
/**
* @param string
*/
public function setRecurringPlanState($recurringPlanState)
{
$this->recurringPlanState = $recurringPlanState;
}
/**
* @return string
*/
public function getRecurringPlanState()
{
return $this->recurringPlanState;
}
/**
* @param SuspendedDetails
*/
public function setSuspendedDetails(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\SuspendedDetails $suspendedDetails)
{
$this->suspendedDetails = $suspendedDetails;
}
/**
* @return SuspendedDetails
*/
public function getSuspendedDetails()
{
return $this->suspendedDetails;
}
/**
* @param string
*/
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
}
/**
* @return string
*/
public function getUpdateTime()
{
return $this->updateTime;
}
/**
* @param WaitingToRecurDetails
*/
public function setWaitingToRecurDetails(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\WaitingToRecurDetails $waitingToRecurDetails)
{
$this->waitingToRecurDetails = $waitingToRecurDetails;
}
/**
* @return WaitingToRecurDetails
*/
public function getWaitingToRecurDetails()
{
return $this->waitingToRecurDetails;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurringPlanDetails::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_RecurringPlanDetails');

View File

@@ -0,0 +1,57 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource;
use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListPublicationsResponse;
/**
* The "publications" collection of methods.
* Typical usage is:
* <code>
* $subscribewithgoogleService = new Google\Service\SubscribewithGoogle(...);
* $publications = $subscribewithgoogleService->publications;
* </code>
*/
class Publications extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* List all publications based on the filter, only the publications owned by the
* current user will be returned (publications.listPublications)
*
* @param array $optParams Optional parameters.
*
* @opt_param string filter Filters the publications list. e.g.
* verified_domains: "xyz.com" Grammar defined as https://google.aip.dev/160.
* @opt_param int pageSize LINT.IfChange The maximum number of publications to
* return, the service may return fewer than this value. if unspecified, at most
* 100 publications will be returned. The maximum value is 1000; values above
* 1000 will be coerced to 1000. LINT.ThenChange(//depot/google3/java/com/google
* /subscribewithgoogle/client/opservice/ListPublicationsPromiseGraph.java)
* @opt_param string pageToken A token identifying a page of results the server
* should return.
* @return ListPublicationsResponse
* @throws \Google\Service\Exception
*/
public function listPublications($optParams = [])
{
$params = [];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListPublicationsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\Publications::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Resource_Publications');

View File

@@ -0,0 +1,56 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource;
use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListEntitlementsResponse;
/**
* The "entitlements" collection of methods.
* Typical usage is:
* <code>
* $subscribewithgoogleService = new Google\Service\SubscribewithGoogle(...);
* $entitlements = $subscribewithgoogleService->publications_entitlements;
* </code>
*/
class PublicationsEntitlements extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets a set of entitlements for the user for this publication. The publication
* can fetch entitlements on behalf of a user authenticated via OAuth2.
* (entitlements.listPublicationsEntitlements)
*
* @param string $publicationId Mapped to the URL.
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize Requested page size. If unspecified, server will pick
* an appropriate default.
* @opt_param string pageToken A token identifying a page of results the server
* should return. Typically, this is the value of
* ListEntitlementsResponse.next_page_token returned from the previous call to
* `ListEntitlements` method.
* @return ListEntitlementsResponse
* @throws \Google\Service\Exception
*/
public function listPublicationsEntitlements($publicationId, $optParams = [])
{
$params = ['publicationId' => $publicationId];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListEntitlementsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsEntitlements::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Resource_PublicationsEntitlements');

View File

@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource;
use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Reader;
/**
* The "readers" collection of methods.
* Typical usage is:
* <code>
* $subscribewithgoogleService = new Google\Service\SubscribewithGoogle(...);
* $readers = $subscribewithgoogleService->publications_readers;
* </code>
*/
class PublicationsReaders extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets Reader's Profile information. (readers.get)
*
* @param string $name Required. The resource name of the Reader. Format:
* publications/{publication}/readers/{reader}
* @param array $optParams Optional parameters.
* @return Reader
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Reader::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsReaders::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Resource_PublicationsReaders');

View File

@@ -0,0 +1,75 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource;
use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListUserEntitlementsPlansResponse;
use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\UserEntitlementsPlan;
/**
* The "entitlementsplans" collection of methods.
* Typical usage is:
* <code>
* $subscribewithgoogleService = new Google\Service\SubscribewithGoogle(...);
* $entitlementsplans = $subscribewithgoogleService->publications_readers_entitlementsplans;
* </code>
*/
class PublicationsReadersEntitlementsplans extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets the entitlements plan identitfied by plan id for a given user under the
* given publication. (entitlementsplans.get)
*
* @param string $name Required. The resource name of the UserEntitlementsPlan.
* Format: publications/{publication}/readers/{reader}/entitlementsplans/{plan}
* @param array $optParams Optional parameters.
* @return UserEntitlementsPlan
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\UserEntitlementsPlan::class);
}
/**
* Lists all the entitlements plans for a given user under a given publication.
* (entitlementsplans.listPublicationsReadersEntitlementsplans)
*
* @param string $parent Required. The parent, which owns this collection of
* UserEntitlementsPlans. Format: publications/{publication}/readers/{reader}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of UserEntitlementsPlans to
* return. The service may return fewer than this value. If unspecified, at most
* 100 UserEntitlementsPlans will be returned. The maximum value is 1000; values
* above 1000 will be coerced to 1000.
* @opt_param string pageToken A token identifying a page of results the server
* should return. Typically, this is the value of
* ListUserEntitlementsPlansResponse.next_page_token returned from the previous
* call to `ListUserEntitlementsPlans` method.
* @return ListUserEntitlementsPlansResponse
* @throws \Google\Service\Exception
*/
public function listPublicationsReadersEntitlementsplans($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\ListUserEntitlementsPlansResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsReadersEntitlementsplans::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Resource_PublicationsReadersEntitlementsplans');

View File

@@ -0,0 +1,48 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource;
use Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Order;
/**
* The "orders" collection of methods.
* Typical usage is:
* <code>
* $subscribewithgoogleService = new Google\Service\SubscribewithGoogle(...);
* $orders = $subscribewithgoogleService->publications_readers_orders;
* </code>
*/
class PublicationsReadersOrders extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets order's information. (orders.get)
*
* @param string $name Required. The resource name of the Order. Format:
* publications/{publication}/readers/{reader}/orders/{order}
* @param array $optParams Optional parameters.
* @return Order
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Order::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Resource\PublicationsReadersOrders::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_Resource_PublicationsReadersOrders');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class StateDetails extends \Google\Site_Kit_Dependencies\Google\Model
{
protected $amountType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Money::class;
protected $amountDataType = '';
/**
* @var string
*/
public $orderState;
/**
* @var string
*/
public $time;
/**
* @param Money
*/
public function setAmount(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\Money $amount)
{
$this->amount = $amount;
}
/**
* @return Money
*/
public function getAmount()
{
return $this->amount;
}
/**
* @param string
*/
public function setOrderState($orderState)
{
$this->orderState = $orderState;
}
/**
* @return string
*/
public function getOrderState()
{
return $this->orderState;
}
/**
* @param string
*/
public function setTime($time)
{
$this->time = $time;
}
/**
* @return string
*/
public function getTime()
{
return $this->time;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\StateDetails::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_StateDetails');

View File

@@ -0,0 +1,24 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class SuspendedDetails extends \Google\Site_Kit_Dependencies\Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\SuspendedDetails::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_SuspendedDetails');

View File

@@ -0,0 +1,181 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class UserEntitlementsPlan extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'planEntitlements';
/**
* @var string
*/
public $name;
protected $planEntitlementsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PlanEntitlement::class;
protected $planEntitlementsDataType = 'array';
/**
* @var string
*/
public $planId;
/**
* @var string
*/
public $planType;
/**
* @var string
*/
public $publicationId;
protected $purchaseInfoType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PurchaseInfo::class;
protected $purchaseInfoDataType = '';
/**
* @var string
*/
public $readerId;
protected $recurringPlanDetailsType = \Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurringPlanDetails::class;
protected $recurringPlanDetailsDataType = '';
/**
* @var string
*/
public $userId;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param PlanEntitlement[]
*/
public function setPlanEntitlements($planEntitlements)
{
$this->planEntitlements = $planEntitlements;
}
/**
* @return PlanEntitlement[]
*/
public function getPlanEntitlements()
{
return $this->planEntitlements;
}
/**
* @param string
*/
public function setPlanId($planId)
{
$this->planId = $planId;
}
/**
* @return string
*/
public function getPlanId()
{
return $this->planId;
}
/**
* @param string
*/
public function setPlanType($planType)
{
$this->planType = $planType;
}
/**
* @return string
*/
public function getPlanType()
{
return $this->planType;
}
/**
* @param string
*/
public function setPublicationId($publicationId)
{
$this->publicationId = $publicationId;
}
/**
* @return string
*/
public function getPublicationId()
{
return $this->publicationId;
}
/**
* @param PurchaseInfo
*/
public function setPurchaseInfo(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\PurchaseInfo $purchaseInfo)
{
$this->purchaseInfo = $purchaseInfo;
}
/**
* @return PurchaseInfo
*/
public function getPurchaseInfo()
{
return $this->purchaseInfo;
}
/**
* @param string
*/
public function setReaderId($readerId)
{
$this->readerId = $readerId;
}
/**
* @return string
*/
public function getReaderId()
{
return $this->readerId;
}
/**
* @param RecurringPlanDetails
*/
public function setRecurringPlanDetails(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\RecurringPlanDetails $recurringPlanDetails)
{
$this->recurringPlanDetails = $recurringPlanDetails;
}
/**
* @return RecurringPlanDetails
*/
public function getRecurringPlanDetails()
{
return $this->recurringPlanDetails;
}
/**
* @param string
*/
public function setUserId($userId)
{
$this->userId = $userId;
}
/**
* @return string
*/
public function getUserId()
{
return $this->userId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\UserEntitlementsPlan::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_UserEntitlementsPlan');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle;
class WaitingToRecurDetails extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var bool
*/
public $freeTrial;
/**
* @var string
*/
public $nextRecurrenceTime;
/**
* @param bool
*/
public function setFreeTrial($freeTrial)
{
$this->freeTrial = $freeTrial;
}
/**
* @return bool
*/
public function getFreeTrial()
{
return $this->freeTrial;
}
/**
* @param string
*/
public function setNextRecurrenceTime($nextRecurrenceTime)
{
$this->nextRecurrenceTime = $nextRecurrenceTime;
}
/**
* @return string
*/
public function getNextRecurrenceTime()
{
return $this->nextRecurrenceTime;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\SubscribewithGoogle\WaitingToRecurDetails::class, 'Google\\Site_Kit_Dependencies\\Google_Service_SubscribewithGoogle_WaitingToRecurDetails');

View File

@@ -0,0 +1,7 @@
This file was automatically generated by Composer Patches (https://github.com/cweagans/composer-patches)
Patches applied to this directory:
Fixes for empty filter
Source: patches-composer/google-api-client-services-v0.355.0.patch

View File

@@ -0,0 +1,26 @@
<?php
namespace Google\Site_Kit_Dependencies;
// For older (pre-2.7.2) verions of google/apiclient
if (\file_exists(__DIR__ . '/../apiclient/src/Google/Client.php') && !\class_exists('Google\\Site_Kit_Dependencies\\Google_Client', \false)) {
require_once __DIR__ . '/../apiclient/src/Google/Client.php';
if (\defined('Google_Client::LIBVER') && \version_compare(\Google\Site_Kit_Dependencies\Google_Client::LIBVER, '2.7.2', '<=')) {
$servicesClassMap = ['Google\\Site_Kit_Dependencies\\Google\\Client' => 'Google_Client', 'Google\\Site_Kit_Dependencies\\Google\\Service' => 'Google_Service', 'Google\\Site_Kit_Dependencies\\Google\\Service\\Resource' => 'Google_Service_Resource', 'Google\\Site_Kit_Dependencies\\Google\\Model' => 'Google_Model', 'Google\\Site_Kit_Dependencies\\Google\\Collection' => 'Google_Collection'];
foreach ($servicesClassMap as $alias => $class) {
\class_alias($class, $alias);
}
}
}
\spl_autoload_register(function ($class) {
if (0 === \strpos($class, 'Google_Service_')) {
// Autoload the new class, which will also create an alias for the
// old class by changing underscores to namespaces:
// Google_Service_Speech_Resource_Operations
// => Google\Service\Speech\Resource\Operations
$classExists = \class_exists($newClass = \str_replace('_', '\\', $class));
if ($classExists) {
return \true;
}
}
}, \true, \true);

View File

@@ -0,0 +1,83 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service;
use Google\Site_Kit_Dependencies\Google\Client;
/**
* Service definition for Adsense (v2).
*
* <p>
* The AdSense Management API allows publishers to access their inventory and
* run earnings and performance reports.</p>
*
* <p>
* For more information about this service, see the API
* <a href="https://developers.google.com/adsense/management/" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class Adsense extends \Google\Site_Kit_Dependencies\Google\Service
{
/** View and manage your AdSense data. */
const ADSENSE = "https://www.googleapis.com/auth/adsense";
/** View your AdSense data. */
const ADSENSE_READONLY = "https://www.googleapis.com/auth/adsense.readonly";
public $accounts;
public $accounts_adclients;
public $accounts_adclients_adunits;
public $accounts_adclients_customchannels;
public $accounts_adclients_urlchannels;
public $accounts_alerts;
public $accounts_payments;
public $accounts_policyIssues;
public $accounts_reports;
public $accounts_reports_saved;
public $accounts_sites;
public $rootUrlTemplate;
/**
* Constructs the internal representation of the Adsense service.
*
* @param Client|array $clientOrConfig The client used to deliver requests, or a
* config array to pass to a new Client instance.
* @param string $rootUrl The root URL used for requests to the service.
*/
public function __construct($clientOrConfig = [], $rootUrl = null)
{
parent::__construct($clientOrConfig);
$this->rootUrl = $rootUrl ?: 'https://adsense.googleapis.com/';
$this->rootUrlTemplate = $rootUrl ?: 'https://adsense.UNIVERSE_DOMAIN/';
$this->servicePath = '';
$this->batchPath = 'batch';
$this->version = 'v2';
$this->serviceName = 'adsense';
$this->accounts = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\Accounts($this, $this->serviceName, 'accounts', ['methods' => ['get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getAdBlockingRecoveryTag' => ['path' => 'v2/{+name}/adBlockingRecoveryTag', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/accounts', 'httpMethod' => 'GET', 'parameters' => ['pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'listChildAccounts' => ['path' => 'v2/{+parent}:listChildAccounts', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_adclients = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclients($this, $this->serviceName, 'adclients', ['methods' => ['get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getAdcode' => ['path' => 'v2/{+name}/adcode', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/{+parent}/adclients', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_adclients_adunits = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclientsAdunits($this, $this->serviceName, 'adunits', ['methods' => ['create' => ['path' => 'v2/{+parent}/adunits', 'httpMethod' => 'POST', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getAdcode' => ['path' => 'v2/{+name}/adcode', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/{+parent}/adunits', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'listLinkedCustomChannels' => ['path' => 'v2/{+parent}:listLinkedCustomChannels', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'patch' => ['path' => 'v2/{+name}', 'httpMethod' => 'PATCH', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'updateMask' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_adclients_customchannels = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclientsCustomchannels($this, $this->serviceName, 'customchannels', ['methods' => ['create' => ['path' => 'v2/{+parent}/customchannels', 'httpMethod' => 'POST', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'delete' => ['path' => 'v2/{+name}', 'httpMethod' => 'DELETE', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/{+parent}/customchannels', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'listLinkedAdUnits' => ['path' => 'v2/{+parent}:listLinkedAdUnits', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'patch' => ['path' => 'v2/{+name}', 'httpMethod' => 'PATCH', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'updateMask' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_adclients_urlchannels = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclientsUrlchannels($this, $this->serviceName, 'urlchannels', ['methods' => ['get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/{+parent}/urlchannels', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_alerts = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAlerts($this, $this->serviceName, 'alerts', ['methods' => ['list' => ['path' => 'v2/{+parent}/alerts', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'languageCode' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_payments = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsPayments($this, $this->serviceName, 'payments', ['methods' => ['list' => ['path' => 'v2/{+parent}/payments', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]);
$this->accounts_policyIssues = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsPolicyIssues($this, $this->serviceName, 'policyIssues', ['methods' => ['get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/{+parent}/policyIssues', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_reports = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsReports($this, $this->serviceName, 'reports', ['methods' => ['generate' => ['path' => 'v2/{+account}/reports:generate', 'httpMethod' => 'GET', 'parameters' => ['account' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'currencyCode' => ['location' => 'query', 'type' => 'string'], 'dateRange' => ['location' => 'query', 'type' => 'string'], 'dimensions' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'endDate.day' => ['location' => 'query', 'type' => 'integer'], 'endDate.month' => ['location' => 'query', 'type' => 'integer'], 'endDate.year' => ['location' => 'query', 'type' => 'integer'], 'filters' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'languageCode' => ['location' => 'query', 'type' => 'string'], 'limit' => ['location' => 'query', 'type' => 'integer'], 'metrics' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'orderBy' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'reportingTimeZone' => ['location' => 'query', 'type' => 'string'], 'startDate.day' => ['location' => 'query', 'type' => 'integer'], 'startDate.month' => ['location' => 'query', 'type' => 'integer'], 'startDate.year' => ['location' => 'query', 'type' => 'integer']]], 'generateCsv' => ['path' => 'v2/{+account}/reports:generateCsv', 'httpMethod' => 'GET', 'parameters' => ['account' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'currencyCode' => ['location' => 'query', 'type' => 'string'], 'dateRange' => ['location' => 'query', 'type' => 'string'], 'dimensions' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'endDate.day' => ['location' => 'query', 'type' => 'integer'], 'endDate.month' => ['location' => 'query', 'type' => 'integer'], 'endDate.year' => ['location' => 'query', 'type' => 'integer'], 'filters' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'languageCode' => ['location' => 'query', 'type' => 'string'], 'limit' => ['location' => 'query', 'type' => 'integer'], 'metrics' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'orderBy' => ['location' => 'query', 'type' => 'string', 'repeated' => \true], 'reportingTimeZone' => ['location' => 'query', 'type' => 'string'], 'startDate.day' => ['location' => 'query', 'type' => 'integer'], 'startDate.month' => ['location' => 'query', 'type' => 'integer'], 'startDate.year' => ['location' => 'query', 'type' => 'integer']]], 'getSaved' => ['path' => 'v2/{+name}/saved', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]);
$this->accounts_reports_saved = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsReportsSaved($this, $this->serviceName, 'saved', ['methods' => ['generate' => ['path' => 'v2/{+name}/saved:generate', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'currencyCode' => ['location' => 'query', 'type' => 'string'], 'dateRange' => ['location' => 'query', 'type' => 'string'], 'endDate.day' => ['location' => 'query', 'type' => 'integer'], 'endDate.month' => ['location' => 'query', 'type' => 'integer'], 'endDate.year' => ['location' => 'query', 'type' => 'integer'], 'languageCode' => ['location' => 'query', 'type' => 'string'], 'reportingTimeZone' => ['location' => 'query', 'type' => 'string'], 'startDate.day' => ['location' => 'query', 'type' => 'integer'], 'startDate.month' => ['location' => 'query', 'type' => 'integer'], 'startDate.year' => ['location' => 'query', 'type' => 'integer']]], 'generateCsv' => ['path' => 'v2/{+name}/saved:generateCsv', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'currencyCode' => ['location' => 'query', 'type' => 'string'], 'dateRange' => ['location' => 'query', 'type' => 'string'], 'endDate.day' => ['location' => 'query', 'type' => 'integer'], 'endDate.month' => ['location' => 'query', 'type' => 'integer'], 'endDate.year' => ['location' => 'query', 'type' => 'integer'], 'languageCode' => ['location' => 'query', 'type' => 'string'], 'reportingTimeZone' => ['location' => 'query', 'type' => 'string'], 'startDate.day' => ['location' => 'query', 'type' => 'integer'], 'startDate.month' => ['location' => 'query', 'type' => 'integer'], 'startDate.year' => ['location' => 'query', 'type' => 'integer']]], 'list' => ['path' => 'v2/{+parent}/reports/saved', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
$this->accounts_sites = new \Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsSites($this, $this->serviceName, 'sites', ['methods' => ['get' => ['path' => 'v2/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v2/{+parent}/sites', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]]]]);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense');

View File

@@ -0,0 +1,149 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Account extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'pendingTasks';
/**
* @var string
*/
public $createTime;
/**
* @var string
*/
public $displayName;
/**
* @var string
*/
public $name;
/**
* @var string[]
*/
public $pendingTasks;
/**
* @var bool
*/
public $premium;
/**
* @var string
*/
public $state;
protected $timeZoneType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\TimeZone::class;
protected $timeZoneDataType = '';
/**
* @param string
*/
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
}
/**
* @return string
*/
public function getCreateTime()
{
return $this->createTime;
}
/**
* @param string
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string[]
*/
public function setPendingTasks($pendingTasks)
{
$this->pendingTasks = $pendingTasks;
}
/**
* @return string[]
*/
public function getPendingTasks()
{
return $this->pendingTasks;
}
/**
* @param bool
*/
public function setPremium($premium)
{
$this->premium = $premium;
}
/**
* @return bool
*/
public function getPremium()
{
return $this->premium;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
/**
* @param TimeZone
*/
public function setTimeZone(\Google\Site_Kit_Dependencies\Google\Service\Adsense\TimeZone $timeZone)
{
$this->timeZone = $timeZone;
}
/**
* @return TimeZone
*/
public function getTimeZone()
{
return $this->timeZone;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Account::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Account');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class AdBlockingRecoveryTag extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $errorProtectionCode;
/**
* @var string
*/
public $tag;
/**
* @param string
*/
public function setErrorProtectionCode($errorProtectionCode)
{
$this->errorProtectionCode = $errorProtectionCode;
}
/**
* @return string
*/
public function getErrorProtectionCode()
{
return $this->errorProtectionCode;
}
/**
* @param string
*/
public function setTag($tag)
{
$this->tag = $tag;
}
/**
* @return string
*/
public function getTag()
{
return $this->tag;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\AdBlockingRecoveryTag::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_AdBlockingRecoveryTag');

View File

@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class AdClient extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $productCode;
/**
* @var string
*/
public $reportingDimensionId;
/**
* @var string
*/
public $state;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setProductCode($productCode)
{
$this->productCode = $productCode;
}
/**
* @return string
*/
public function getProductCode()
{
return $this->productCode;
}
/**
* @param string
*/
public function setReportingDimensionId($reportingDimensionId)
{
$this->reportingDimensionId = $reportingDimensionId;
}
/**
* @return string
*/
public function getReportingDimensionId()
{
return $this->reportingDimensionId;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClient::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_AdClient');

View File

@@ -0,0 +1,78 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class AdClientAdCode extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $adCode;
/**
* @var string
*/
public $ampBody;
/**
* @var string
*/
public $ampHead;
/**
* @param string
*/
public function setAdCode($adCode)
{
$this->adCode = $adCode;
}
/**
* @return string
*/
public function getAdCode()
{
return $this->adCode;
}
/**
* @param string
*/
public function setAmpBody($ampBody)
{
$this->ampBody = $ampBody;
}
/**
* @return string
*/
public function getAmpBody()
{
return $this->ampBody;
}
/**
* @param string
*/
public function setAmpHead($ampHead)
{
$this->ampHead = $ampHead;
}
/**
* @return string
*/
public function getAmpHead()
{
return $this->ampHead;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClientAdCode::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_AdClientAdCode');

View File

@@ -0,0 +1,112 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class AdUnit extends \Google\Site_Kit_Dependencies\Google\Model
{
protected $contentAdsSettingsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\ContentAdsSettings::class;
protected $contentAdsSettingsDataType = '';
/**
* @var string
*/
public $displayName;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $reportingDimensionId;
/**
* @var string
*/
public $state;
/**
* @param ContentAdsSettings
*/
public function setContentAdsSettings(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ContentAdsSettings $contentAdsSettings)
{
$this->contentAdsSettings = $contentAdsSettings;
}
/**
* @return ContentAdsSettings
*/
public function getContentAdsSettings()
{
return $this->contentAdsSettings;
}
/**
* @param string
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setReportingDimensionId($reportingDimensionId)
{
$this->reportingDimensionId = $reportingDimensionId;
}
/**
* @return string
*/
public function getReportingDimensionId()
{
return $this->reportingDimensionId;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_AdUnit');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class AdUnitAdCode extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $adCode;
/**
* @param string
*/
public function setAdCode($adCode)
{
$this->adCode = $adCode;
}
/**
* @return string
*/
public function getAdCode()
{
return $this->adCode;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnitAdCode::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_AdUnitAdCode');

View File

@@ -0,0 +1,24 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class AdsenseEmpty extends \Google\Site_Kit_Dependencies\Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\AdsenseEmpty::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_AdsenseEmpty');

View File

@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Alert extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $message;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $severity;
/**
* @var string
*/
public $type;
/**
* @param string
*/
public function setMessage($message)
{
$this->message = $message;
}
/**
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setSeverity($severity)
{
$this->severity = $severity;
}
/**
* @return string
*/
public function getSeverity()
{
return $this->severity;
}
/**
* @param string
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Alert::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Alert');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Cell extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $value;
/**
* @param string
*/
public function setValue($value)
{
$this->value = $value;
}
/**
* @return string
*/
public function getValue()
{
return $this->value;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Cell::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Cell');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ContentAdsSettings extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $size;
/**
* @var string
*/
public $type;
/**
* @param string
*/
public function setSize($size)
{
$this->size = $size;
}
/**
* @return string
*/
public function getSize()
{
return $this->size;
}
/**
* @param string
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ContentAdsSettings::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ContentAdsSettings');

View File

@@ -0,0 +1,96 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class CustomChannel extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var bool
*/
public $active;
/**
* @var string
*/
public $displayName;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $reportingDimensionId;
/**
* @param bool
*/
public function setActive($active)
{
$this->active = $active;
}
/**
* @return bool
*/
public function getActive()
{
return $this->active;
}
/**
* @param string
*/
public function setDisplayName($displayName)
{
$this->displayName = $displayName;
}
/**
* @return string
*/
public function getDisplayName()
{
return $this->displayName;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setReportingDimensionId($reportingDimensionId)
{
$this->reportingDimensionId = $reportingDimensionId;
}
/**
* @return string
*/
public function getReportingDimensionId()
{
return $this->reportingDimensionId;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_CustomChannel');

View File

@@ -0,0 +1,78 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Date extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var int
*/
public $day;
/**
* @var int
*/
public $month;
/**
* @var int
*/
public $year;
/**
* @param int
*/
public function setDay($day)
{
$this->day = $day;
}
/**
* @return int
*/
public function getDay()
{
return $this->day;
}
/**
* @param int
*/
public function setMonth($month)
{
$this->month = $month;
}
/**
* @return int
*/
public function getMonth()
{
return $this->month;
}
/**
* @param int
*/
public function setYear($year)
{
$this->year = $year;
}
/**
* @return int
*/
public function getYear()
{
return $this->year;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Date');

View File

@@ -0,0 +1,78 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Header extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $currencyCode;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $type;
/**
* @param string
*/
public function setCurrencyCode($currencyCode)
{
$this->currencyCode = $currencyCode;
}
/**
* @return string
*/
public function getCurrencyCode()
{
return $this->currencyCode;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Header::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Header');

View File

@@ -0,0 +1,79 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class HttpBody extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'extensions';
/**
* @var string
*/
public $contentType;
/**
* @var string
*/
public $data;
/**
* @var array[]
*/
public $extensions;
/**
* @param string
*/
public function setContentType($contentType)
{
$this->contentType = $contentType;
}
/**
* @return string
*/
public function getContentType()
{
return $this->contentType;
}
/**
* @param string
*/
public function setData($data)
{
$this->data = $data;
}
/**
* @return string
*/
public function getData()
{
return $this->data;
}
/**
* @param array[]
*/
public function setExtensions($extensions)
{
$this->extensions = $extensions;
}
/**
* @return array[]
*/
public function getExtensions()
{
return $this->extensions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\HttpBody::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_HttpBody');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListAccountsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'accounts';
protected $accountsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Account::class;
protected $accountsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Account[]
*/
public function setAccounts($accounts)
{
$this->accounts = $accounts;
}
/**
* @return Account[]
*/
public function getAccounts()
{
return $this->accounts;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAccountsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListAccountsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListAdClientsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'adClients';
protected $adClientsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClient::class;
protected $adClientsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param AdClient[]
*/
public function setAdClients($adClients)
{
$this->adClients = $adClients;
}
/**
* @return AdClient[]
*/
public function getAdClients()
{
return $this->adClients;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAdClientsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListAdClientsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListAdUnitsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'adUnits';
protected $adUnitsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit::class;
protected $adUnitsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param AdUnit[]
*/
public function setAdUnits($adUnits)
{
$this->adUnits = $adUnits;
}
/**
* @return AdUnit[]
*/
public function getAdUnits()
{
return $this->adUnits;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAdUnitsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListAdUnitsResponse');

View File

@@ -0,0 +1,41 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListAlertsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'alerts';
protected $alertsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Alert::class;
protected $alertsDataType = 'array';
/**
* @param Alert[]
*/
public function setAlerts($alerts)
{
$this->alerts = $alerts;
}
/**
* @return Alert[]
*/
public function getAlerts()
{
return $this->alerts;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAlertsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListAlertsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListChildAccountsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'accounts';
protected $accountsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Account::class;
protected $accountsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param Account[]
*/
public function setAccounts($accounts)
{
$this->accounts = $accounts;
}
/**
* @return Account[]
*/
public function getAccounts()
{
return $this->accounts;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListChildAccountsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListChildAccountsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListCustomChannelsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'customChannels';
protected $customChannelsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel::class;
protected $customChannelsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param CustomChannel[]
*/
public function setCustomChannels($customChannels)
{
$this->customChannels = $customChannels;
}
/**
* @return CustomChannel[]
*/
public function getCustomChannels()
{
return $this->customChannels;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListCustomChannelsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListCustomChannelsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListLinkedAdUnitsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'adUnits';
protected $adUnitsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit::class;
protected $adUnitsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param AdUnit[]
*/
public function setAdUnits($adUnits)
{
$this->adUnits = $adUnits;
}
/**
* @return AdUnit[]
*/
public function getAdUnits()
{
return $this->adUnits;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListLinkedAdUnitsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListLinkedAdUnitsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListLinkedCustomChannelsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'customChannels';
protected $customChannelsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel::class;
protected $customChannelsDataType = 'array';
/**
* @var string
*/
public $nextPageToken;
/**
* @param CustomChannel[]
*/
public function setCustomChannels($customChannels)
{
$this->customChannels = $customChannels;
}
/**
* @return CustomChannel[]
*/
public function getCustomChannels()
{
return $this->customChannels;
}
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListLinkedCustomChannelsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListLinkedCustomChannelsResponse');

View File

@@ -0,0 +1,41 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListPaymentsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'payments';
protected $paymentsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Payment::class;
protected $paymentsDataType = 'array';
/**
* @param Payment[]
*/
public function setPayments($payments)
{
$this->payments = $payments;
}
/**
* @return Payment[]
*/
public function getPayments()
{
return $this->payments;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListPaymentsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListPaymentsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListPolicyIssuesResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'policyIssues';
/**
* @var string
*/
public $nextPageToken;
protected $policyIssuesType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\PolicyIssue::class;
protected $policyIssuesDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param PolicyIssue[]
*/
public function setPolicyIssues($policyIssues)
{
$this->policyIssues = $policyIssues;
}
/**
* @return PolicyIssue[]
*/
public function getPolicyIssues()
{
return $this->policyIssues;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListPolicyIssuesResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListPolicyIssuesResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListSavedReportsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'savedReports';
/**
* @var string
*/
public $nextPageToken;
protected $savedReportsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\SavedReport::class;
protected $savedReportsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param SavedReport[]
*/
public function setSavedReports($savedReports)
{
$this->savedReports = $savedReports;
}
/**
* @return SavedReport[]
*/
public function getSavedReports()
{
return $this->savedReports;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListSavedReportsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListSavedReportsResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListSitesResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'sites';
/**
* @var string
*/
public $nextPageToken;
protected $sitesType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Site::class;
protected $sitesDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param Site[]
*/
public function setSites($sites)
{
$this->sites = $sites;
}
/**
* @return Site[]
*/
public function getSites()
{
return $this->sites;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListSitesResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListSitesResponse');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ListUrlChannelsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'urlChannels';
/**
* @var string
*/
public $nextPageToken;
protected $urlChannelsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\UrlChannel::class;
protected $urlChannelsDataType = 'array';
/**
* @param string
*/
public function setNextPageToken($nextPageToken)
{
$this->nextPageToken = $nextPageToken;
}
/**
* @return string
*/
public function getNextPageToken()
{
return $this->nextPageToken;
}
/**
* @param UrlChannel[]
*/
public function setUrlChannels($urlChannels)
{
$this->urlChannels = $urlChannels;
}
/**
* @return UrlChannel[]
*/
public function getUrlChannels()
{
return $this->urlChannels;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ListUrlChannelsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ListUrlChannelsResponse');

View File

@@ -0,0 +1,76 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Payment extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $amount;
protected $dateType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class;
protected $dateDataType = '';
/**
* @var string
*/
public $name;
/**
* @param string
*/
public function setAmount($amount)
{
$this->amount = $amount;
}
/**
* @return string
*/
public function getAmount()
{
return $this->amount;
}
/**
* @param Date
*/
public function setDate(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date $date)
{
$this->date = $date;
}
/**
* @return Date
*/
public function getDate()
{
return $this->date;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Payment::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Payment');

View File

@@ -0,0 +1,233 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class PolicyIssue extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'policyTopics';
/**
* @var string
*/
public $action;
/**
* @var string[]
*/
public $adClients;
/**
* @var string
*/
public $adRequestCount;
/**
* @var string
*/
public $entityType;
protected $firstDetectedDateType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class;
protected $firstDetectedDateDataType = '';
protected $lastDetectedDateType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class;
protected $lastDetectedDateDataType = '';
/**
* @var string
*/
public $name;
protected $policyTopicsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\PolicyTopic::class;
protected $policyTopicsDataType = 'array';
/**
* @var string
*/
public $site;
/**
* @var string
*/
public $siteSection;
/**
* @var string
*/
public $uri;
protected $warningEscalationDateType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class;
protected $warningEscalationDateDataType = '';
/**
* @param string
*/
public function setAction($action)
{
$this->action = $action;
}
/**
* @return string
*/
public function getAction()
{
return $this->action;
}
/**
* @param string[]
*/
public function setAdClients($adClients)
{
$this->adClients = $adClients;
}
/**
* @return string[]
*/
public function getAdClients()
{
return $this->adClients;
}
/**
* @param string
*/
public function setAdRequestCount($adRequestCount)
{
$this->adRequestCount = $adRequestCount;
}
/**
* @return string
*/
public function getAdRequestCount()
{
return $this->adRequestCount;
}
/**
* @param string
*/
public function setEntityType($entityType)
{
$this->entityType = $entityType;
}
/**
* @return string
*/
public function getEntityType()
{
return $this->entityType;
}
/**
* @param Date
*/
public function setFirstDetectedDate(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date $firstDetectedDate)
{
$this->firstDetectedDate = $firstDetectedDate;
}
/**
* @return Date
*/
public function getFirstDetectedDate()
{
return $this->firstDetectedDate;
}
/**
* @param Date
*/
public function setLastDetectedDate(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date $lastDetectedDate)
{
$this->lastDetectedDate = $lastDetectedDate;
}
/**
* @return Date
*/
public function getLastDetectedDate()
{
return $this->lastDetectedDate;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param PolicyTopic[]
*/
public function setPolicyTopics($policyTopics)
{
$this->policyTopics = $policyTopics;
}
/**
* @return PolicyTopic[]
*/
public function getPolicyTopics()
{
return $this->policyTopics;
}
/**
* @param string
*/
public function setSite($site)
{
$this->site = $site;
}
/**
* @return string
*/
public function getSite()
{
return $this->site;
}
/**
* @param string
*/
public function setSiteSection($siteSection)
{
$this->siteSection = $siteSection;
}
/**
* @return string
*/
public function getSiteSection()
{
return $this->siteSection;
}
/**
* @param string
*/
public function setUri($uri)
{
$this->uri = $uri;
}
/**
* @return string
*/
public function getUri()
{
return $this->uri;
}
/**
* @param Date
*/
public function setWarningEscalationDate(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date $warningEscalationDate)
{
$this->warningEscalationDate = $warningEscalationDate;
}
/**
* @return Date
*/
public function getWarningEscalationDate()
{
return $this->warningEscalationDate;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\PolicyIssue::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_PolicyIssue');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class PolicyTopic extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var bool
*/
public $mustFix;
/**
* @var string
*/
public $topic;
/**
* @param bool
*/
public function setMustFix($mustFix)
{
$this->mustFix = $mustFix;
}
/**
* @return bool
*/
public function getMustFix()
{
return $this->mustFix;
}
/**
* @param string
*/
public function setTopic($topic)
{
$this->topic = $topic;
}
/**
* @return string
*/
public function getTopic()
{
return $this->topic;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\PolicyTopic::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_PolicyTopic');

View File

@@ -0,0 +1,157 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class ReportResult extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'warnings';
protected $averagesType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Row::class;
protected $averagesDataType = '';
protected $endDateType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class;
protected $endDateDataType = '';
protected $headersType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Header::class;
protected $headersDataType = 'array';
protected $rowsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Row::class;
protected $rowsDataType = 'array';
protected $startDateType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Date::class;
protected $startDateDataType = '';
/**
* @var string
*/
public $totalMatchedRows;
protected $totalsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Row::class;
protected $totalsDataType = '';
/**
* @var string[]
*/
public $warnings;
/**
* @param Row
*/
public function setAverages(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Row $averages)
{
$this->averages = $averages;
}
/**
* @return Row
*/
public function getAverages()
{
return $this->averages;
}
/**
* @param Date
*/
public function setEndDate(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date $endDate)
{
$this->endDate = $endDate;
}
/**
* @return Date
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* @param Header[]
*/
public function setHeaders($headers)
{
$this->headers = $headers;
}
/**
* @return Header[]
*/
public function getHeaders()
{
return $this->headers;
}
/**
* @param Row[]
*/
public function setRows($rows)
{
$this->rows = $rows;
}
/**
* @return Row[]
*/
public function getRows()
{
return $this->rows;
}
/**
* @param Date
*/
public function setStartDate(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Date $startDate)
{
$this->startDate = $startDate;
}
/**
* @return Date
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* @param string
*/
public function setTotalMatchedRows($totalMatchedRows)
{
$this->totalMatchedRows = $totalMatchedRows;
}
/**
* @return string
*/
public function getTotalMatchedRows()
{
return $this->totalMatchedRows;
}
/**
* @param Row
*/
public function setTotals(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Row $totals)
{
$this->totals = $totals;
}
/**
* @return Row
*/
public function getTotals()
{
return $this->totals;
}
/**
* @param string[]
*/
public function setWarnings($warnings)
{
$this->warnings = $warnings;
}
/**
* @return string[]
*/
public function getWarnings()
{
return $this->warnings;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\ReportResult::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_ReportResult');

View File

@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\Account;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\AdBlockingRecoveryTag;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAccountsResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListChildAccountsResponse;
/**
* The "accounts" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $accounts = $adsenseService->accounts;
* </code>
*/
class Accounts extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets information about the selected AdSense account. (accounts.get)
*
* @param string $name Required. Account to get information about. Format:
* accounts/{account}
* @param array $optParams Optional parameters.
* @return Account
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\Account::class);
}
/**
* Gets the ad blocking recovery tag of an account.
* (accounts.getAdBlockingRecoveryTag)
*
* @param string $name Required. The name of the account to get the tag for.
* Format: accounts/{account}
* @param array $optParams Optional parameters.
* @return AdBlockingRecoveryTag
* @throws \Google\Service\Exception
*/
public function getAdBlockingRecoveryTag($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('getAdBlockingRecoveryTag', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdBlockingRecoveryTag::class);
}
/**
* Lists all accounts available to this user. (accounts.listAccounts)
*
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of accounts to include in the
* response, used for paging. If unspecified, at most 10000 accounts will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListAccounts` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListAccounts` must match the
* call that provided the page token.
* @return ListAccountsResponse
* @throws \Google\Service\Exception
*/
public function listAccounts($optParams = [])
{
$params = [];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAccountsResponse::class);
}
/**
* Lists all accounts directly managed by the given AdSense account.
* (accounts.listChildAccounts)
*
* @param string $parent Required. The parent account, which owns the child
* accounts. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of accounts to include in the
* response, used for paging. If unspecified, at most 10000 accounts will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListChildAccounts` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListChildAccounts` must match
* the call that provided the page token.
* @return ListChildAccountsResponse
* @throws \Google\Service\Exception
*/
public function listChildAccounts($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('listChildAccounts', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListChildAccountsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\Accounts::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_Accounts');

View File

@@ -0,0 +1,94 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClient;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClientAdCode;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAdClientsResponse;
/**
* The "adclients" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $adclients = $adsenseService->accounts_adclients;
* </code>
*/
class AccountsAdclients extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets the ad client from the given resource name. (adclients.get)
*
* @param string $name Required. The name of the ad client to retrieve. Format:
* accounts/{account}/adclients/{adclient}
* @param array $optParams Optional parameters.
* @return AdClient
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClient::class);
}
/**
* Gets the AdSense code for a given ad client. This returns what was previously
* known as the 'auto ad code'. This is only supported for ad clients with a
* product_code of AFC. For more information, see [About the AdSense
* code](https://support.google.com/adsense/answer/9274634).
* (adclients.getAdcode)
*
* @param string $name Required. Name of the ad client for which to get the
* adcode. Format: accounts/{account}/adclients/{adclient}
* @param array $optParams Optional parameters.
* @return AdClientAdCode
* @throws \Google\Service\Exception
*/
public function getAdcode($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('getAdcode', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdClientAdCode::class);
}
/**
* Lists all the ad clients available in an account.
* (adclients.listAccountsAdclients)
*
* @param string $parent Required. The account which owns the collection of ad
* clients. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of ad clients to include in the
* response, used for paging. If unspecified, at most 10000 ad clients will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListAdClients` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListAdClients` must match the
* call that provided the page token.
* @return ListAdClientsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsAdclients($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAdClientsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclients::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsAdclients');

View File

@@ -0,0 +1,168 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnitAdCode;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAdUnitsResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListLinkedCustomChannelsResponse;
/**
* The "adunits" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $adunits = $adsenseService->accounts_adclients_adunits;
* </code>
*/
class AccountsAdclientsAdunits extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Creates an ad unit. This method can be called only by a restricted set of
* projects, which are usually owned by [AdSense for
* Platforms](https://developers.google.com/adsense/platforms/) publishers.
* Contact your account manager if you need to use this method. Note that ad
* units can only be created for ad clients with an "AFC" product code. For more
* info see the [AdClient
* resource](/adsense/management/reference/rest/v2/accounts.adclients). For now,
* this method can only be used to create `DISPLAY` ad units. See:
* https://support.google.com/adsense/answer/9183566 (adunits.create)
*
* @param string $parent Required. Ad client to create an ad unit under. Format:
* accounts/{account}/adclients/{adclient}
* @param AdUnit $postBody
* @param array $optParams Optional parameters.
* @return AdUnit
* @throws \Google\Service\Exception
*/
public function create($parent, \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = \array_merge($params, $optParams);
return $this->call('create', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit::class);
}
/**
* Gets an ad unit from a specified account and ad client. (adunits.get)
*
* @param string $name Required. AdUnit to get information about. Format:
* accounts/{account}/adclients/{adclient}/adunits/{adunit}
* @param array $optParams Optional parameters.
* @return AdUnit
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit::class);
}
/**
* Gets the ad unit code for a given ad unit. For more information, see [About
* the AdSense code](https://support.google.com/adsense/answer/9274634) and
* [Where to place the ad code in your
* HTML](https://support.google.com/adsense/answer/9190028). (adunits.getAdcode)
*
* @param string $name Required. Name of the adunit for which to get the adcode.
* Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
* @param array $optParams Optional parameters.
* @return AdUnitAdCode
* @throws \Google\Service\Exception
*/
public function getAdcode($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('getAdcode', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnitAdCode::class);
}
/**
* Lists all ad units under a specified account and ad client.
* (adunits.listAccountsAdclientsAdunits)
*
* @param string $parent Required. The ad client which owns the collection of ad
* units. Format: accounts/{account}/adclients/{adclient}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of ad units to include in the
* response, used for paging. If unspecified, at most 10000 ad units will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListAdUnits` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListAdUnits` must match the
* call that provided the page token.
* @return ListAdUnitsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsAdclientsAdunits($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAdUnitsResponse::class);
}
/**
* Lists all the custom channels available for an ad unit.
* (adunits.listLinkedCustomChannels)
*
* @param string $parent Required. The ad unit which owns the collection of
* custom channels. Format:
* accounts/{account}/adclients/{adclient}/adunits/{adunit}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of custom channels to include in
* the response, used for paging. If unspecified, at most 10000 custom channels
* will be returned. The maximum value is 10000; values above 10000 will be
* coerced to 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListLinkedCustomChannels` call. Provide this to retrieve the subsequent
* page. When paginating, all other parameters provided to
* `ListLinkedCustomChannels` must match the call that provided the page token.
* @return ListLinkedCustomChannelsResponse
* @throws \Google\Service\Exception
*/
public function listLinkedCustomChannels($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('listLinkedCustomChannels', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListLinkedCustomChannelsResponse::class);
}
/**
* Updates an ad unit. This method can be called only by a restricted set of
* projects, which are usually owned by [AdSense for
* Platforms](https://developers.google.com/adsense/platforms/) publishers.
* Contact your account manager if you need to use this method. For now, this
* method can only be used to update `DISPLAY` ad units. See:
* https://support.google.com/adsense/answer/9183566 (adunits.patch)
*
* @param string $name Output only. Resource name of the ad unit. Format:
* accounts/{account}/adclients/{adclient}/adunits/{adunit}
* @param AdUnit $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to update. If empty, a full
* update is performed.
* @return AdUnit
* @throws \Google\Service\Exception
*/
public function patch($name, \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = \array_merge($params, $optParams);
return $this->call('patch', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdUnit::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclientsAdunits::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsAdclientsAdunits');

View File

@@ -0,0 +1,164 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\AdsenseEmpty;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListCustomChannelsResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListLinkedAdUnitsResponse;
/**
* The "customchannels" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $customchannels = $adsenseService->accounts_adclients_customchannels;
* </code>
*/
class AccountsAdclientsCustomchannels extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Creates a custom channel. This method can be called only by a restricted set
* of projects, which are usually owned by [AdSense for
* Platforms](https://developers.google.com/adsense/platforms/) publishers.
* Contact your account manager if you need to use this method.
* (customchannels.create)
*
* @param string $parent Required. The ad client to create a custom channel
* under. Format: accounts/{account}/adclients/{adclient}
* @param CustomChannel $postBody
* @param array $optParams Optional parameters.
* @return CustomChannel
* @throws \Google\Service\Exception
*/
public function create($parent, \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel $postBody, $optParams = [])
{
$params = ['parent' => $parent, 'postBody' => $postBody];
$params = \array_merge($params, $optParams);
return $this->call('create', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel::class);
}
/**
* Deletes a custom channel. This method can be called only by a restricted set
* of projects, which are usually owned by [AdSense for
* Platforms](https://developers.google.com/adsense/platforms/) publishers.
* Contact your account manager if you need to use this method.
* (customchannels.delete)
*
* @param string $name Required. Name of the custom channel to delete. Format:
* accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
* @param array $optParams Optional parameters.
* @return AdsenseEmpty
* @throws \Google\Service\Exception
*/
public function delete($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('delete', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\AdsenseEmpty::class);
}
/**
* Gets information about the selected custom channel. (customchannels.get)
*
* @param string $name Required. Name of the custom channel. Format:
* accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
* @param array $optParams Optional parameters.
* @return CustomChannel
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel::class);
}
/**
* Lists all the custom channels available in an ad client.
* (customchannels.listAccountsAdclientsCustomchannels)
*
* @param string $parent Required. The ad client which owns the collection of
* custom channels. Format: accounts/{account}/adclients/{adclient}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of custom channels to include in
* the response, used for paging. If unspecified, at most 10000 custom channels
* will be returned. The maximum value is 10000; values above 10000 will be
* coerced to 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListCustomChannels` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListCustomChannels` must match
* the call that provided the page token.
* @return ListCustomChannelsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsAdclientsCustomchannels($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListCustomChannelsResponse::class);
}
/**
* Lists all the ad units available for a custom channel.
* (customchannels.listLinkedAdUnits)
*
* @param string $parent Required. The custom channel which owns the collection
* of ad units. Format:
* accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of ad units to include in the
* response, used for paging. If unspecified, at most 10000 ad units will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListLinkedAdUnits` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListLinkedAdUnits` must match
* the call that provided the page token.
* @return ListLinkedAdUnitsResponse
* @throws \Google\Service\Exception
*/
public function listLinkedAdUnits($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('listLinkedAdUnits', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListLinkedAdUnitsResponse::class);
}
/**
* Updates a custom channel. This method can be called only by a restricted set
* of projects, which are usually owned by [AdSense for
* Platforms](https://developers.google.com/adsense/platforms/) publishers.
* Contact your account manager if you need to use this method.
* (customchannels.patch)
*
* @param string $name Output only. Resource name of the custom channel. Format:
* accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
* @param CustomChannel $postBody
* @param array $optParams Optional parameters.
*
* @opt_param string updateMask The list of fields to update. If empty, a full
* update is performed.
* @return CustomChannel
* @throws \Google\Service\Exception
*/
public function patch($name, \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = \array_merge($params, $optParams);
return $this->call('patch', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\CustomChannel::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclientsCustomchannels::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsAdclientsCustomchannels');

View File

@@ -0,0 +1,73 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListUrlChannelsResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\UrlChannel;
/**
* The "urlchannels" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $urlchannels = $adsenseService->accounts_adclients_urlchannels;
* </code>
*/
class AccountsAdclientsUrlchannels extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets information about the selected url channel. (urlchannels.get)
*
* @param string $name Required. The name of the url channel to retrieve.
* Format: accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}
* @param array $optParams Optional parameters.
* @return UrlChannel
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\UrlChannel::class);
}
/**
* Lists active url channels. (urlchannels.listAccountsAdclientsUrlchannels)
*
* @param string $parent Required. The ad client which owns the collection of
* url channels. Format: accounts/{account}/adclients/{adclient}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of url channels to include in the
* response, used for paging. If unspecified, at most 10000 url channels will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListUrlChannels` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListUrlChannels` must match the
* call that provided the page token.
* @return ListUrlChannelsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsAdclientsUrlchannels($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListUrlChannelsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAdclientsUrlchannels::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsAdclientsUrlchannels');

View File

@@ -0,0 +1,54 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAlertsResponse;
/**
* The "alerts" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $alerts = $adsenseService->accounts_alerts;
* </code>
*/
class AccountsAlerts extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Lists all the alerts available in an account. (alerts.listAccountsAlerts)
*
* @param string $parent Required. The account which owns the collection of
* alerts. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param string languageCode The language to use for translating alert
* messages. If unspecified, this defaults to the user's display language. If
* the given language is not supported, alerts will be returned in English. The
* language is specified as an [IETF BCP-47 language
* code](https://en.wikipedia.org/wiki/IETF_language_tag).
* @return ListAlertsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsAlerts($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListAlertsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsAlerts::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsAlerts');

View File

@@ -0,0 +1,49 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListPaymentsResponse;
/**
* The "payments" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $payments = $adsenseService->accounts_payments;
* </code>
*/
class AccountsPayments extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Lists all the payments available for an account.
* (payments.listAccountsPayments)
*
* @param string $parent Required. The account which owns the collection of
* payments. Format: accounts/{account}
* @param array $optParams Optional parameters.
* @return ListPaymentsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsPayments($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListPaymentsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsPayments::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsPayments');

View File

@@ -0,0 +1,74 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListPolicyIssuesResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\PolicyIssue;
/**
* The "policyIssues" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $policyIssues = $adsenseService->accounts_policyIssues;
* </code>
*/
class AccountsPolicyIssues extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets information about the selected policy issue. (policyIssues.get)
*
* @param string $name Required. Name of the policy issue. Format:
* accounts/{account}/policyIssues/{policy_issue}
* @param array $optParams Optional parameters.
* @return PolicyIssue
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\PolicyIssue::class);
}
/**
* Lists all the policy issues for the specified account.
* (policyIssues.listAccountsPolicyIssues)
*
* @param string $parent Required. The account for which policy issues are being
* retrieved. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of policy issues to include in the
* response, used for paging. If unspecified, at most 10000 policy issues will
* be returned. The maximum value is 10000; values above 10000 will be coerced
* to 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListPolicyIssues` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListPolicyIssues` must match
* the call that provided the page token.
* @return ListPolicyIssuesResponse
* @throws \Google\Service\Exception
*/
public function listAccountsPolicyIssues($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListPolicyIssuesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsPolicyIssues::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsPolicyIssues');

View File

@@ -0,0 +1,170 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\HttpBody;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ReportResult;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\SavedReport;
/**
* The "reports" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $reports = $adsenseService->accounts_reports;
* </code>
*/
class AccountsReports extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Generates an ad hoc report. (reports.generate)
*
* @param string $account Required. The account which owns the collection of
* reports. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param string currencyCode The [ISO-4217 currency
* code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on
* monetary metrics. Defaults to the account's currency if not set.
* @opt_param string dateRange Date range of the report, if unset the range will
* be considered CUSTOM.
* @opt_param string dimensions Dimensions to base the report on.
* @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
* the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
* specify a date without a year.
* @opt_param string filters A list of
* [filters](/adsense/management/reporting/filtering) to apply to the report.
* All provided filters must match in order for the data to be included in the
* report.
* @opt_param string languageCode The language to use for translating report
* output. If unspecified, this defaults to English ("en"). If the given
* language is not supported, report output will be returned in English. The
* language is specified as an [IETF BCP-47 language
* code](https://en.wikipedia.org/wiki/IETF_language_tag).
* @opt_param int limit The maximum number of rows of report data to return.
* Reports producing more rows than the requested limit will be truncated. If
* unset, this defaults to 100,000 rows for `Reports.GenerateReport` and
* 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum
* values permitted here. Report truncation can be identified (for
* `Reports.GenerateReport` only) by comparing the number of rows returned to
* the value returned in `total_matched_rows`.
* @opt_param string metrics Required. Reporting metrics.
* @opt_param string orderBy The name of a dimension or metric to sort the
* resulting report on, can be prefixed with "+" to sort ascending or "-" to
* sort descending. If no prefix is specified, the column is sorted ascending.
* @opt_param string reportingTimeZone Timezone in which to generate the report.
* If unspecified, this defaults to the account timezone. For more information,
* see [changing the time zone of your
* reports](https://support.google.com/adsense/answer/9830725).
* @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
* for the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
* to specify a date without a year.
* @return ReportResult
* @throws \Google\Service\Exception
*/
public function generate($account, $optParams = [])
{
$params = ['account' => $account];
$params = \array_merge($params, $optParams);
return $this->call('generate', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ReportResult::class);
}
/**
* Generates a csv formatted ad hoc report. (reports.generateCsv)
*
* @param string $account Required. The account which owns the collection of
* reports. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param string currencyCode The [ISO-4217 currency
* code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on
* monetary metrics. Defaults to the account's currency if not set.
* @opt_param string dateRange Date range of the report, if unset the range will
* be considered CUSTOM.
* @opt_param string dimensions Dimensions to base the report on.
* @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
* the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
* specify a date without a year.
* @opt_param string filters A list of
* [filters](/adsense/management/reporting/filtering) to apply to the report.
* All provided filters must match in order for the data to be included in the
* report.
* @opt_param string languageCode The language to use for translating report
* output. If unspecified, this defaults to English ("en"). If the given
* language is not supported, report output will be returned in English. The
* language is specified as an [IETF BCP-47 language
* code](https://en.wikipedia.org/wiki/IETF_language_tag).
* @opt_param int limit The maximum number of rows of report data to return.
* Reports producing more rows than the requested limit will be truncated. If
* unset, this defaults to 100,000 rows for `Reports.GenerateReport` and
* 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum
* values permitted here. Report truncation can be identified (for
* `Reports.GenerateReport` only) by comparing the number of rows returned to
* the value returned in `total_matched_rows`.
* @opt_param string metrics Required. Reporting metrics.
* @opt_param string orderBy The name of a dimension or metric to sort the
* resulting report on, can be prefixed with "+" to sort ascending or "-" to
* sort descending. If no prefix is specified, the column is sorted ascending.
* @opt_param string reportingTimeZone Timezone in which to generate the report.
* If unspecified, this defaults to the account timezone. For more information,
* see [changing the time zone of your
* reports](https://support.google.com/adsense/answer/9830725).
* @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
* for the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
* to specify a date without a year.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function generateCsv($account, $optParams = [])
{
$params = ['account' => $account];
$params = \array_merge($params, $optParams);
return $this->call('generateCsv', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\HttpBody::class);
}
/**
* Gets the saved report from the given resource name. (reports.getSaved)
*
* @param string $name Required. The name of the saved report to retrieve.
* Format: accounts/{account}/reports/{report}
* @param array $optParams Optional parameters.
* @return SavedReport
* @throws \Google\Service\Exception
*/
public function getSaved($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('getSaved', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\SavedReport::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsReports::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsReports');

View File

@@ -0,0 +1,147 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\HttpBody;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListSavedReportsResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ReportResult;
/**
* The "saved" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $saved = $adsenseService->accounts_reports_saved;
* </code>
*/
class AccountsReportsSaved extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Generates a saved report. (saved.generate)
*
* @param string $name Required. Name of the saved report. Format:
* accounts/{account}/reports/{report}
* @param array $optParams Optional parameters.
*
* @opt_param string currencyCode The [ISO-4217 currency
* code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on
* monetary metrics. Defaults to the account's currency if not set.
* @opt_param string dateRange Date range of the report, if unset the range will
* be considered CUSTOM.
* @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
* the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
* specify a date without a year.
* @opt_param string languageCode The language to use for translating report
* output. If unspecified, this defaults to English ("en"). If the given
* language is not supported, report output will be returned in English. The
* language is specified as an [IETF BCP-47 language
* code](https://en.wikipedia.org/wiki/IETF_language_tag).
* @opt_param string reportingTimeZone Timezone in which to generate the report.
* If unspecified, this defaults to the account timezone. For more information,
* see [changing the time zone of your
* reports](https://support.google.com/adsense/answer/9830725).
* @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
* for the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
* to specify a date without a year.
* @return ReportResult
* @throws \Google\Service\Exception
*/
public function generate($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('generate', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ReportResult::class);
}
/**
* Generates a csv formatted saved report. (saved.generateCsv)
*
* @param string $name Required. Name of the saved report. Format:
* accounts/{account}/reports/{report}
* @param array $optParams Optional parameters.
*
* @opt_param string currencyCode The [ISO-4217 currency
* code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on
* monetary metrics. Defaults to the account's currency if not set.
* @opt_param string dateRange Date range of the report, if unset the range will
* be considered CUSTOM.
* @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
* the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
* specify a date without a year.
* @opt_param string languageCode The language to use for translating report
* output. If unspecified, this defaults to English ("en"). If the given
* language is not supported, report output will be returned in English. The
* language is specified as an [IETF BCP-47 language
* code](https://en.wikipedia.org/wiki/IETF_language_tag).
* @opt_param string reportingTimeZone Timezone in which to generate the report.
* If unspecified, this defaults to the account timezone. For more information,
* see [changing the time zone of your
* reports](https://support.google.com/adsense/answer/9830725).
* @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
* for the year and month, or 0 to specify a year by itself or a year and month
* where the day isn't significant.
* @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
* specify a year without a month and day.
* @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
* to specify a date without a year.
* @return HttpBody
* @throws \Google\Service\Exception
*/
public function generateCsv($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('generateCsv', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\HttpBody::class);
}
/**
* Lists saved reports. (saved.listAccountsReportsSaved)
*
* @param string $parent Required. The account which owns the collection of
* reports. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of reports to include in the
* response, used for paging. If unspecified, at most 10000 reports will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListSavedReports` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListSavedReports` must match
* the call that provided the page token.
* @return ListSavedReportsResponse
* @throws \Google\Service\Exception
*/
public function listAccountsReportsSaved($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListSavedReportsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsReportsSaved::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsReportsSaved');

View File

@@ -0,0 +1,73 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\ListSitesResponse;
use Google\Site_Kit_Dependencies\Google\Service\Adsense\Site;
/**
* The "sites" collection of methods.
* Typical usage is:
* <code>
* $adsenseService = new Google\Service\Adsense(...);
* $sites = $adsenseService->accounts_sites;
* </code>
*/
class AccountsSites extends \Google\Site_Kit_Dependencies\Google\Service\Resource
{
/**
* Gets information about the selected site. (sites.get)
*
* @param string $name Required. Name of the site. Format:
* accounts/{account}/sites/{site}
* @param array $optParams Optional parameters.
* @return Site
* @throws \Google\Service\Exception
*/
public function get($name, $optParams = [])
{
$params = ['name' => $name];
$params = \array_merge($params, $optParams);
return $this->call('get', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\Site::class);
}
/**
* Lists all the sites available in an account. (sites.listAccountsSites)
*
* @param string $parent Required. The account which owns the collection of
* sites. Format: accounts/{account}
* @param array $optParams Optional parameters.
*
* @opt_param int pageSize The maximum number of sites to include in the
* response, used for paging. If unspecified, at most 10000 sites will be
* returned. The maximum value is 10000; values above 10000 will be coerced to
* 10000.
* @opt_param string pageToken A page token, received from a previous
* `ListSites` call. Provide this to retrieve the subsequent page. When
* paginating, all other parameters provided to `ListSites` must match the call
* that provided the page token.
* @return ListSitesResponse
* @throws \Google\Service\Exception
*/
public function listAccountsSites($parent, $optParams = [])
{
$params = ['parent' => $parent];
$params = \array_merge($params, $optParams);
return $this->call('list', [$params], \Google\Site_Kit_Dependencies\Google\Service\Adsense\ListSitesResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Resource\AccountsSites::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Resource_AccountsSites');

View File

@@ -0,0 +1,41 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Row extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'cells';
protected $cellsType = \Google\Site_Kit_Dependencies\Google\Service\Adsense\Cell::class;
protected $cellsDataType = 'array';
/**
* @param Cell[]
*/
public function setCells($cells)
{
$this->cells = $cells;
}
/**
* @return Cell[]
*/
public function getCells()
{
return $this->cells;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Row::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Row');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class SavedReport extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $title;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\SavedReport::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_SavedReport');

View File

@@ -0,0 +1,114 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class Site extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var bool
*/
public $autoAdsEnabled;
/**
* @var string
*/
public $domain;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $reportingDimensionId;
/**
* @var string
*/
public $state;
/**
* @param bool
*/
public function setAutoAdsEnabled($autoAdsEnabled)
{
$this->autoAdsEnabled = $autoAdsEnabled;
}
/**
* @return bool
*/
public function getAutoAdsEnabled()
{
return $this->autoAdsEnabled;
}
/**
* @param string
*/
public function setDomain($domain)
{
$this->domain = $domain;
}
/**
* @return string
*/
public function getDomain()
{
return $this->domain;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setReportingDimensionId($reportingDimensionId)
{
$this->reportingDimensionId = $reportingDimensionId;
}
/**
* @return string
*/
public function getReportingDimensionId()
{
return $this->reportingDimensionId;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\Site::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_Site');

View File

@@ -0,0 +1,60 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class TimeZone extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $version;
/**
* @param string
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getId()
{
return $this->id;
}
/**
* @param string
*/
public function setVersion($version)
{
$this->version = $version;
}
/**
* @return string
*/
public function getVersion()
{
return $this->version;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\TimeZone::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_TimeZone');

View File

@@ -0,0 +1,78 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\Adsense;
class UrlChannel extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $reportingDimensionId;
/**
* @var string
*/
public $uriPattern;
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string
*/
public function setReportingDimensionId($reportingDimensionId)
{
$this->reportingDimensionId = $reportingDimensionId;
}
/**
* @return string
*/
public function getReportingDimensionId()
{
return $this->reportingDimensionId;
}
/**
* @param string
*/
public function setUriPattern($uriPattern)
{
$this->uriPattern = $uriPattern;
}
/**
* @return string
*/
public function getUriPattern()
{
return $this->uriPattern;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\Adsense\UrlChannel::class, 'Google\\Site_Kit_Dependencies\\Google_Service_Adsense_UrlChannel');

View File

@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service;
use Google\Site_Kit_Dependencies\Google\Client;
/**
* Service definition for AnalyticsData (v1beta).
*
* <p>
* Accesses report data in Google Analytics. Warning: Creating multiple Customer
* Applications, Accounts, or Projects to simulate or act as a single Customer
* Application, Account, or Project (respectively) or to circumvent Service-
* specific usage limits or quotas is a direct violation of Google Cloud
* Platform Terms of Service as well as Google APIs Terms of Service. These
* actions can result in immediate termination of your GCP project(s) without
* any warning.</p>
*
* <p>
* For more information about this service, see the API
* <a href="https://developers.google.com/analytics/devguides/reporting/data/v1/" target="_blank">Documentation</a>
* </p>
*
* @author Google, Inc.
*/
class AnalyticsData extends \Google\Site_Kit_Dependencies\Google\Service
{
/** View and manage your Google Analytics data. */
const ANALYTICS = "https://www.googleapis.com/auth/analytics";
/** See and download your Google Analytics data. */
const ANALYTICS_READONLY = "https://www.googleapis.com/auth/analytics.readonly";
public $properties;
public $properties_audienceExports;
public $rootUrlTemplate;
/**
* Constructs the internal representation of the AnalyticsData service.
*
* @param Client|array $clientOrConfig The client used to deliver requests, or a
* config array to pass to a new Client instance.
* @param string $rootUrl The root URL used for requests to the service.
*/
public function __construct($clientOrConfig = [], $rootUrl = null)
{
parent::__construct($clientOrConfig);
$this->rootUrl = $rootUrl ?: 'https://analyticsdata.googleapis.com/';
$this->rootUrlTemplate = $rootUrl ?: 'https://analyticsdata.UNIVERSE_DOMAIN/';
$this->servicePath = '';
$this->batchPath = 'batch';
$this->version = 'v1beta';
$this->serviceName = 'analyticsdata';
$this->properties = new \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\Resource\Properties($this, $this->serviceName, 'properties', ['methods' => ['batchRunPivotReports' => ['path' => 'v1beta/{+property}:batchRunPivotReports', 'httpMethod' => 'POST', 'parameters' => ['property' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'batchRunReports' => ['path' => 'v1beta/{+property}:batchRunReports', 'httpMethod' => 'POST', 'parameters' => ['property' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'checkCompatibility' => ['path' => 'v1beta/{+property}:checkCompatibility', 'httpMethod' => 'POST', 'parameters' => ['property' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'getMetadata' => ['path' => 'v1beta/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'runPivotReport' => ['path' => 'v1beta/{+property}:runPivotReport', 'httpMethod' => 'POST', 'parameters' => ['property' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'runRealtimeReport' => ['path' => 'v1beta/{+property}:runRealtimeReport', 'httpMethod' => 'POST', 'parameters' => ['property' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'runReport' => ['path' => 'v1beta/{+property}:runReport', 'httpMethod' => 'POST', 'parameters' => ['property' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]);
$this->properties_audienceExports = new \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\Resource\PropertiesAudienceExports($this, $this->serviceName, 'audienceExports', ['methods' => ['create' => ['path' => 'v1beta/{+parent}/audienceExports', 'httpMethod' => 'POST', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'get' => ['path' => 'v1beta/{+name}', 'httpMethod' => 'GET', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]], 'list' => ['path' => 'v1beta/{+parent}/audienceExports', 'httpMethod' => 'GET', 'parameters' => ['parent' => ['location' => 'path', 'type' => 'string', 'required' => \true], 'pageSize' => ['location' => 'query', 'type' => 'integer'], 'pageToken' => ['location' => 'query', 'type' => 'string']]], 'query' => ['path' => 'v1beta/{+name}:query', 'httpMethod' => 'POST', 'parameters' => ['name' => ['location' => 'path', 'type' => 'string', 'required' => \true]]]]]);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData');

View File

@@ -0,0 +1,61 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class ActiveMetricRestriction extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'restrictedMetricTypes';
/**
* @var string
*/
public $metricName;
/**
* @var string[]
*/
public $restrictedMetricTypes;
/**
* @param string
*/
public function setMetricName($metricName)
{
$this->metricName = $metricName;
}
/**
* @return string
*/
public function getMetricName()
{
return $this->metricName;
}
/**
* @param string[]
*/
public function setRestrictedMetricTypes($restrictedMetricTypes)
{
$this->restrictedMetricTypes = $restrictedMetricTypes;
}
/**
* @return string[]
*/
public function getRestrictedMetricTypes()
{
return $this->restrictedMetricTypes;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\ActiveMetricRestriction::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_ActiveMetricRestriction');

View File

@@ -0,0 +1,194 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class AudienceExport extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'dimensions';
/**
* @var string
*/
public $audience;
/**
* @var string
*/
public $audienceDisplayName;
/**
* @var string
*/
public $beginCreatingTime;
/**
* @var int
*/
public $creationQuotaTokensCharged;
protected $dimensionsType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\V1betaAudienceDimension::class;
protected $dimensionsDataType = 'array';
/**
* @var string
*/
public $errorMessage;
/**
* @var string
*/
public $name;
public $percentageCompleted;
/**
* @var int
*/
public $rowCount;
/**
* @var string
*/
public $state;
/**
* @param string
*/
public function setAudience($audience)
{
$this->audience = $audience;
}
/**
* @return string
*/
public function getAudience()
{
return $this->audience;
}
/**
* @param string
*/
public function setAudienceDisplayName($audienceDisplayName)
{
$this->audienceDisplayName = $audienceDisplayName;
}
/**
* @return string
*/
public function getAudienceDisplayName()
{
return $this->audienceDisplayName;
}
/**
* @param string
*/
public function setBeginCreatingTime($beginCreatingTime)
{
$this->beginCreatingTime = $beginCreatingTime;
}
/**
* @return string
*/
public function getBeginCreatingTime()
{
return $this->beginCreatingTime;
}
/**
* @param int
*/
public function setCreationQuotaTokensCharged($creationQuotaTokensCharged)
{
$this->creationQuotaTokensCharged = $creationQuotaTokensCharged;
}
/**
* @return int
*/
public function getCreationQuotaTokensCharged()
{
return $this->creationQuotaTokensCharged;
}
/**
* @param V1betaAudienceDimension[]
*/
public function setDimensions($dimensions)
{
$this->dimensions = $dimensions;
}
/**
* @return V1betaAudienceDimension[]
*/
public function getDimensions()
{
return $this->dimensions;
}
/**
* @param string
*/
public function setErrorMessage($errorMessage)
{
$this->errorMessage = $errorMessage;
}
/**
* @return string
*/
public function getErrorMessage()
{
return $this->errorMessage;
}
/**
* @param string
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
public function setPercentageCompleted($percentageCompleted)
{
$this->percentageCompleted = $percentageCompleted;
}
public function getPercentageCompleted()
{
return $this->percentageCompleted;
}
/**
* @param int
*/
public function setRowCount($rowCount)
{
$this->rowCount = $rowCount;
}
/**
* @return int
*/
public function getRowCount()
{
return $this->rowCount;
}
/**
* @param string
*/
public function setState($state)
{
$this->state = $state;
}
/**
* @return string
*/
public function getState()
{
return $this->state;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\AudienceExport::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_AudienceExport');

View File

@@ -0,0 +1,24 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class AudienceListMetadata extends \Google\Site_Kit_Dependencies\Google\Model
{
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\AudienceListMetadata::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_AudienceListMetadata');

View File

@@ -0,0 +1,41 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class BatchRunPivotReportsRequest extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'requests';
protected $requestsType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\RunPivotReportRequest::class;
protected $requestsDataType = 'array';
/**
* @param RunPivotReportRequest[]
*/
public function setRequests($requests)
{
$this->requests = $requests;
}
/**
* @return RunPivotReportRequest[]
*/
public function getRequests()
{
return $this->requests;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\BatchRunPivotReportsRequest::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_BatchRunPivotReportsRequest');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class BatchRunPivotReportsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'pivotReports';
/**
* @var string
*/
public $kind;
protected $pivotReportsType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\RunPivotReportResponse::class;
protected $pivotReportsDataType = 'array';
/**
* @param string
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* @param RunPivotReportResponse[]
*/
public function setPivotReports($pivotReports)
{
$this->pivotReports = $pivotReports;
}
/**
* @return RunPivotReportResponse[]
*/
public function getPivotReports()
{
return $this->pivotReports;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\BatchRunPivotReportsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_BatchRunPivotReportsResponse');

View File

@@ -0,0 +1,41 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class BatchRunReportsRequest extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'requests';
protected $requestsType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\RunReportRequest::class;
protected $requestsDataType = 'array';
/**
* @param RunReportRequest[]
*/
public function setRequests($requests)
{
$this->requests = $requests;
}
/**
* @return RunReportRequest[]
*/
public function getRequests()
{
return $this->requests;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\BatchRunReportsRequest::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_BatchRunReportsRequest');

View File

@@ -0,0 +1,59 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class BatchRunReportsResponse extends \Google\Site_Kit_Dependencies\Google\Collection
{
protected $collection_key = 'reports';
/**
* @var string
*/
public $kind;
protected $reportsType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\RunReportResponse::class;
protected $reportsDataType = 'array';
/**
* @param string
*/
public function setKind($kind)
{
$this->kind = $kind;
}
/**
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
* @param RunReportResponse[]
*/
public function setReports($reports)
{
$this->reports = $reports;
}
/**
* @return RunReportResponse[]
*/
public function getReports()
{
return $this->reports;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\BatchRunReportsResponse::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_BatchRunReportsResponse');

View File

@@ -0,0 +1,56 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class BetweenFilter extends \Google\Site_Kit_Dependencies\Google\Model
{
protected $fromValueType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\NumericValue::class;
protected $fromValueDataType = '';
protected $toValueType = \Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\NumericValue::class;
protected $toValueDataType = '';
/**
* @param NumericValue
*/
public function setFromValue(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\NumericValue $fromValue)
{
$this->fromValue = $fromValue;
}
/**
* @return NumericValue
*/
public function getFromValue()
{
return $this->fromValue;
}
/**
* @param NumericValue
*/
public function setToValue(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\NumericValue $toValue)
{
$this->toValue = $toValue;
}
/**
* @return NumericValue
*/
public function getToValue()
{
return $this->toValue;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\BetweenFilter::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_BetweenFilter');

View File

@@ -0,0 +1,42 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace Google\Site_Kit_Dependencies\Google\Service\AnalyticsData;
class CaseExpression extends \Google\Site_Kit_Dependencies\Google\Model
{
/**
* @var string
*/
public $dimensionName;
/**
* @param string
*/
public function setDimensionName($dimensionName)
{
$this->dimensionName = $dimensionName;
}
/**
* @return string
*/
public function getDimensionName()
{
return $this->dimensionName;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
\class_alias(\Google\Site_Kit_Dependencies\Google\Service\AnalyticsData\CaseExpression::class, 'Google\\Site_Kit_Dependencies\\Google_Service_AnalyticsData_CaseExpression');

Some files were not shown because too many files have changed in this diff Show More