Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/WebContentPublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class WebContentPublisher extends \Google\Service
public $organizations_publications;
public $organizations_publications_ctas;
public $publications;
public $users;
public $rootUrlTemplate;

/**
Expand Down Expand Up @@ -227,6 +228,26 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
]
]
);
$this->users = new WebContentPublisher\Resource\Users(
$this,
$this->serviceName,
'users',
[
'methods' => [
'generatePlatformSiteTokens' => [
'path' => 'v1/{+name}:generatePlatformSiteTokens',
'httpMethod' => 'POST',
'parameters' => [
'name' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],
]
]
);
}
}

Expand Down
25 changes: 25 additions & 0 deletions src/WebContentPublisher/GeneratePlatformSiteTokensRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?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\Service\WebContentPublisher;

class GeneratePlatformSiteTokensRequest extends \Google\Model
{
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GeneratePlatformSiteTokensRequest::class, 'Google_Service_WebContentPublisher_GeneratePlatformSiteTokensRequest');
45 changes: 45 additions & 0 deletions src/WebContentPublisher/GeneratePlatformSiteTokensResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?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\Service\WebContentPublisher;

class GeneratePlatformSiteTokensResponse extends \Google\Collection
{
protected $collection_key = 'siteTokens';
protected $siteTokensType = SiteToken::class;
protected $siteTokensDataType = 'array';

/**
* List of domain-scoped secure token mappings.
*
* @param SiteToken[] $siteTokens
*/
public function setSiteTokens($siteTokens)
{
$this->siteTokens = $siteTokens;
}
/**
* @return SiteToken[]
*/
public function getSiteTokens()
{
return $this->siteTokens;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(GeneratePlatformSiteTokensResponse::class, 'Google_Service_WebContentPublisher_GeneratePlatformSiteTokensResponse');
53 changes: 53 additions & 0 deletions src/WebContentPublisher/Resource/Users.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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\Service\WebContentPublisher\Resource;

use Google\Service\WebContentPublisher\GeneratePlatformSiteTokensRequest;
use Google\Service\WebContentPublisher\GeneratePlatformSiteTokensResponse;

/**
* The "users" collection of methods.
* Typical usage is:
* <code>
* $webcontentpublisherService = new Google\Service\WebContentPublisher(...);
* $users = $webcontentpublisherService->users;
* </code>
*/
class Users extends \Google\Service\Resource
{
/**
* Returns user tokens mapped to their canonical domains for all publications
* the authenticated user is entitled to. (users.generatePlatformSiteTokens)
*
* @param string $name Required. The resource name of the user to generate
* tokens for. Format: users/{user}
* @param GeneratePlatformSiteTokensRequest $postBody
* @param array $optParams Optional parameters.
* @return GeneratePlatformSiteTokensResponse
* @throws \Google\Service\Exception
*/
public function generatePlatformSiteTokens($name, GeneratePlatformSiteTokensRequest $postBody, $optParams = [])
{
$params = ['name' => $name, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('generatePlatformSiteTokens', [$params], GeneratePlatformSiteTokensResponse::class);
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Users::class, 'Google_Service_WebContentPublisher_Resource_Users');
70 changes: 70 additions & 0 deletions src/WebContentPublisher/SiteToken.php
Original file line number Diff line number Diff line change
@@ -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\Service\WebContentPublisher;

class SiteToken extends \Google\Model
{
/**
* The domain scope this token is valid for.
*
* @var string
*/
public $domain;
/**
* The domain-scoped secure token value (ESUT).
*
* @var string
*/
public $token;

/**
* The domain scope this token is valid for.
*
* @param string $domain
*/
public function setDomain($domain)
{
$this->domain = $domain;
}
/**
* @return string
*/
public function getDomain()
{
return $this->domain;
}
/**
* The domain-scoped secure token value (ESUT).
*
* @param string $token
*/
public function setToken($token)
{
$this->token = $token;
}
/**
* @return string
*/
public function getToken()
{
return $this->token;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SiteToken::class, 'Google_Service_WebContentPublisher_SiteToken');
Loading