Skip to content

Commit

Permalink
Regenerate spanner client (#6109)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-code-bot authored Jan 20, 2025
1 parent 3ff42fe commit 911ebf7
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Spanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,17 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
'databases',
[
'methods' => [
'changequorum' => [
'addSplitPoints' => [
'path' => 'v1/{+database}:addSplitPoints',
'httpMethod' => 'POST',
'parameters' => [
'database' => [
'location' => 'path',
'type' => 'string',
'required' => true,
],
],
],'changequorum' => [
'path' => 'v1/{+name}:changequorum',
'httpMethod' => 'POST',
'parameters' => [
Expand Down
61 changes: 61 additions & 0 deletions src/Spanner/AddSplitPointsRequest.php
Original file line number Diff line number Diff line change
@@ -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\Service\Spanner;

class AddSplitPointsRequest extends \Google\Collection
{
protected $collection_key = 'splitPoints';
/**
* @var string
*/
public $initiator;
protected $splitPointsType = SplitPoints::class;
protected $splitPointsDataType = 'array';

/**
* @param string
*/
public function setInitiator($initiator)
{
$this->initiator = $initiator;
}
/**
* @return string
*/
public function getInitiator()
{
return $this->initiator;
}
/**
* @param SplitPoints[]
*/
public function setSplitPoints($splitPoints)
{
$this->splitPoints = $splitPoints;
}
/**
* @return SplitPoints[]
*/
public function getSplitPoints()
{
return $this->splitPoints;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddSplitPointsRequest::class, 'Google_Service_Spanner_AddSplitPointsRequest');
25 changes: 25 additions & 0 deletions src/Spanner/AddSplitPointsResponse.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\Spanner;

class AddSplitPointsResponse extends \Google\Model
{
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AddSplitPointsResponse::class, 'Google_Service_Spanner_AddSplitPointsResponse');
45 changes: 45 additions & 0 deletions src/Spanner/Key.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\Spanner;

class Key extends \Google\Collection
{
protected $collection_key = 'keyParts';
/**
* @var array[]
*/
public $keyParts;

/**
* @param array[]
*/
public function setKeyParts($keyParts)
{
$this->keyParts = $keyParts;
}
/**
* @return array[]
*/
public function getKeyParts()
{
return $this->keyParts;
}
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Key::class, 'Google_Service_Spanner_Key');
20 changes: 20 additions & 0 deletions src/Spanner/Resource/ProjectsInstancesDatabases.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

namespace Google\Service\Spanner\Resource;

use Google\Service\Spanner\AddSplitPointsRequest;
use Google\Service\Spanner\AddSplitPointsResponse;
use Google\Service\Spanner\ChangeQuorumRequest;
use Google\Service\Spanner\CreateDatabaseRequest;
use Google\Service\Spanner\Database;
Expand All @@ -43,6 +45,24 @@
*/
class ProjectsInstancesDatabases extends \Google\Service\Resource
{
/**
* Adds split points to specified tables, indexes of a database.
* (databases.addSplitPoints)
*
* @param string $database Required. The database on whose tables/indexes split
* points are to be added. Values are of the form
* `projects//instances//databases/`.
* @param AddSplitPointsRequest $postBody
* @param array $optParams Optional parameters.
* @return AddSplitPointsResponse
* @throws \Google\Service\Exception
*/
public function addSplitPoints($database, AddSplitPointsRequest $postBody, $optParams = [])
{
$params = ['database' => $database, 'postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('addSplitPoints', [$params], AddSplitPointsResponse::class);
}
/**
* `ChangeQuorum` is strictly restricted to databases that use dual-region
* instance configurations. Initiates a background operation to change the
Expand Down
97 changes: 97 additions & 0 deletions src/Spanner/SplitPoints.php
Original file line number Diff line number Diff line change
@@ -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\Service\Spanner;

class SplitPoints extends \Google\Collection
{
protected $collection_key = 'keys';
/**
* @var string
*/
public $expireTime;
/**
* @var string
*/
public $index;
protected $keysType = Key::class;
protected $keysDataType = 'array';
/**
* @var string
*/
public $table;

/**
* @param string
*/
public function setExpireTime($expireTime)
{
$this->expireTime = $expireTime;
}
/**
* @return string
*/
public function getExpireTime()
{
return $this->expireTime;
}
/**
* @param string
*/
public function setIndex($index)
{
$this->index = $index;
}
/**
* @return string
*/
public function getIndex()
{
return $this->index;
}
/**
* @param Key[]
*/
public function setKeys($keys)
{
$this->keys = $keys;
}
/**
* @return Key[]
*/
public function getKeys()
{
return $this->keys;
}
/**
* @param string
*/
public function setTable($table)
{
$this->table = $table;
}
/**
* @return string
*/
public function getTable()
{
return $this->table;
}
}

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

0 comments on commit 911ebf7

Please sign in to comment.