Skip to content

Commit aea1ec4

Browse files
1 parent 3e33fcb commit aea1ec4

13 files changed

Lines changed: 387 additions & 41 deletions

src/Spanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Spanner extends \Google\Service
4141
/** Administer your Spanner databases. */
4242
const SPANNER_ADMIN =
4343
"https://www.googleapis.com/auth/spanner.admin";
44-
/** View and manage the contents of your Spanner databases. */
44+
/** See, edit, configure, and delete your Google Cloud Spanner data and see the email address for your Google Account. */
4545
const SPANNER_DATA =
4646
"https://www.googleapis.com/auth/spanner.data";
4747

src/Spanner/Ack.php

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\Spanner;
19+
20+
class Ack extends \Google\Collection
21+
{
22+
protected $collection_key = 'key';
23+
/**
24+
* By default, an attempt to ack a message that does not exist will fail with
25+
* a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack will
26+
* succeed even if the message does not exist. This is useful for
27+
* unconditionally acking a message, even if it is missing or has already been
28+
* acked.
29+
*
30+
* @var bool
31+
*/
32+
public $ignoreNotFound;
33+
/**
34+
* Required. The primary key of the message to be acked.
35+
*
36+
* @var array[]
37+
*/
38+
public $key;
39+
/**
40+
* Required. The queue where the message to be acked is stored.
41+
*
42+
* @var string
43+
*/
44+
public $queue;
45+
46+
/**
47+
* By default, an attempt to ack a message that does not exist will fail with
48+
* a `NOT_FOUND` error. With `ignore_not_found` set to true, the ack will
49+
* succeed even if the message does not exist. This is useful for
50+
* unconditionally acking a message, even if it is missing or has already been
51+
* acked.
52+
*
53+
* @param bool $ignoreNotFound
54+
*/
55+
public function setIgnoreNotFound($ignoreNotFound)
56+
{
57+
$this->ignoreNotFound = $ignoreNotFound;
58+
}
59+
/**
60+
* @return bool
61+
*/
62+
public function getIgnoreNotFound()
63+
{
64+
return $this->ignoreNotFound;
65+
}
66+
/**
67+
* Required. The primary key of the message to be acked.
68+
*
69+
* @param array[] $key
70+
*/
71+
public function setKey($key)
72+
{
73+
$this->key = $key;
74+
}
75+
/**
76+
* @return array[]
77+
*/
78+
public function getKey()
79+
{
80+
return $this->key;
81+
}
82+
/**
83+
* Required. The queue where the message to be acked is stored.
84+
*
85+
* @param string $queue
86+
*/
87+
public function setQueue($queue)
88+
{
89+
$this->queue = $queue;
90+
}
91+
/**
92+
* @return string
93+
*/
94+
public function getQueue()
95+
{
96+
return $this->queue;
97+
}
98+
}
99+
100+
// Adding a class alias for backwards compatibility with the previous class name.
101+
class_alias(Ack::class, 'Google_Service_Spanner_Ack');
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?php
2+
/*
3+
* Copyright 2014 Google Inc.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
* use this file except in compliance with the License. You may obtain a copy of
7+
* the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations under
15+
* the License.
16+
*/
17+
18+
namespace Google\Service\Spanner;
19+
20+
class CompactDatabaseMetadata extends \Google\Model
21+
{
22+
/**
23+
* Output only. The time at which cancellation of this operation was received.
24+
* Operations.CancelOperation starts asynchronous cancellation on a long-
25+
* running operation. The server makes a best effort to cancel the operation,
26+
* but success is not guaranteed. Clients can use Operations.GetOperation or
27+
* other methods to check whether the cancellation succeeded or whether the
28+
* operation completed despite cancellation. On successful cancellation, the
29+
* operation is not deleted; instead, it becomes an operation with an
30+
* Operation.error value with a google.rpc.Status.code of 1, corresponding to
31+
* `Code.CANCELLED`.
32+
*
33+
* @var string
34+
*/
35+
public $cancelTime;
36+
/**
37+
* Output only. The database being compacted.
38+
*
39+
* @var string
40+
*/
41+
public $database;
42+
protected $progressType = OperationProgress::class;
43+
protected $progressDataType = '';
44+
45+
/**
46+
* Output only. The time at which cancellation of this operation was received.
47+
* Operations.CancelOperation starts asynchronous cancellation on a long-
48+
* running operation. The server makes a best effort to cancel the operation,
49+
* but success is not guaranteed. Clients can use Operations.GetOperation or
50+
* other methods to check whether the cancellation succeeded or whether the
51+
* operation completed despite cancellation. On successful cancellation, the
52+
* operation is not deleted; instead, it becomes an operation with an
53+
* Operation.error value with a google.rpc.Status.code of 1, corresponding to
54+
* `Code.CANCELLED`.
55+
*
56+
* @param string $cancelTime
57+
*/
58+
public function setCancelTime($cancelTime)
59+
{
60+
$this->cancelTime = $cancelTime;
61+
}
62+
/**
63+
* @return string
64+
*/
65+
public function getCancelTime()
66+
{
67+
return $this->cancelTime;
68+
}
69+
/**
70+
* Output only. The database being compacted.
71+
*
72+
* @param string $database
73+
*/
74+
public function setDatabase($database)
75+
{
76+
$this->database = $database;
77+
}
78+
/**
79+
* @return string
80+
*/
81+
public function getDatabase()
82+
{
83+
return $this->database;
84+
}
85+
/**
86+
* Output only. The progress of the compaction operation.
87+
*
88+
* @param OperationProgress $progress
89+
*/
90+
public function setProgress(OperationProgress $progress)
91+
{
92+
$this->progress = $progress;
93+
}
94+
/**
95+
* @return OperationProgress
96+
*/
97+
public function getProgress()
98+
{
99+
return $this->progress;
100+
}
101+
}
102+
103+
// Adding a class alias for backwards compatibility with the previous class name.
104+
class_alias(CompactDatabaseMetadata::class, 'Google_Service_Spanner_CompactDatabaseMetadata');

src/Spanner/ListOperationsResponse.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ class ListOperationsResponse extends \Google\Collection
3030
protected $operationsDataType = 'array';
3131
/**
3232
* Unordered list. Unreachable resources. Populated when the request sets
33-
* `ListOperationsRequest.return_partial_success` and reads across collections
34-
* e.g. when attempting to list all resources across all supported locations.
33+
* `ListOperationsRequest.return_partial_success` and reads across
34+
* collections. For example, when attempting to list all resources across all
35+
* supported locations.
3536
*
3637
* @var string[]
3738
*/
@@ -71,8 +72,9 @@ public function getOperations()
7172
}
7273
/**
7374
* Unordered list. Unreachable resources. Populated when the request sets
74-
* `ListOperationsRequest.return_partial_success` and reads across collections
75-
* e.g. when attempting to list all resources across all supported locations.
75+
* `ListOperationsRequest.return_partial_success` and reads across
76+
* collections. For example, when attempting to list all resources across all
77+
* supported locations.
7678
*
7779
* @param string[] $unreachable
7880
*/

src/Spanner/Mutation.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
class Mutation extends \Google\Model
2121
{
22+
protected $ackType = Ack::class;
23+
protected $ackDataType = '';
2224
protected $deleteType = Delete::class;
2325
protected $deleteDataType = '';
2426
protected $insertType = Write::class;
@@ -27,9 +29,27 @@ class Mutation extends \Google\Model
2729
protected $insertOrUpdateDataType = '';
2830
protected $replaceType = Write::class;
2931
protected $replaceDataType = '';
32+
protected $sendType = Send::class;
33+
protected $sendDataType = '';
3034
protected $updateType = Write::class;
3135
protected $updateDataType = '';
3236

37+
/**
38+
* Ack a message from a queue.
39+
*
40+
* @param Ack $ack
41+
*/
42+
public function setAck(Ack $ack)
43+
{
44+
$this->ack = $ack;
45+
}
46+
/**
47+
* @return Ack
48+
*/
49+
public function getAck()
50+
{
51+
return $this->ack;
52+
}
3353
/**
3454
* Delete rows from a table. Succeeds whether or not the named rows were
3555
* present.
@@ -107,6 +127,22 @@ public function getReplace()
107127
{
108128
return $this->replace;
109129
}
130+
/**
131+
* Send a message to a queue.
132+
*
133+
* @param Send $send
134+
*/
135+
public function setSend(Send $send)
136+
{
137+
$this->send = $send;
138+
}
139+
/**
140+
* @return Send
141+
*/
142+
public function getSend()
143+
{
144+
return $this->send;
145+
}
110146
/**
111147
* Update existing rows in a table. If any of the rows does not already exist,
112148
* the transaction fails with error `NOT_FOUND`.

src/Spanner/RequestOptions.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ class RequestOptions extends \Google\Model
3535
* This specifies that the request is high priority.
3636
*/
3737
public const PRIORITY_PRIORITY_HIGH = 'PRIORITY_HIGH';
38-
protected $clientContextType = ClientContext::class;
39-
protected $clientContextDataType = '';
4038
/**
4139
* Priority for the request.
4240
*
@@ -71,22 +69,6 @@ class RequestOptions extends \Google\Model
7169
*/
7270
public $transactionTag;
7371

74-
/**
75-
* Optional. Optional context that may be needed for some requests.
76-
*
77-
* @param ClientContext $clientContext
78-
*/
79-
public function setClientContext(ClientContext $clientContext)
80-
{
81-
$this->clientContext = $clientContext;
82-
}
83-
/**
84-
* @return ClientContext
85-
*/
86-
public function getClientContext()
87-
{
88-
return $this->clientContext;
89-
}
9072
/**
9173
* Priority for the request.
9274
*

src/Spanner/Resource/ProjectsInstanceConfigsOperations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public function get($name, $optParams = [])
9999
* @opt_param string pageToken The standard list page token.
100100
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
101101
* reachable are returned as normal, and those that are unreachable are returned
102-
* in the [ListOperationsResponse.unreachable] field. This can only be `true`
103-
* when reading across collections e.g. when `parent` is set to
104-
* `"projects/example/locations/-"`. This field is not by default supported and
102+
* in the ListOperationsResponse.unreachable field. This can only be `true` when
103+
* reading across collections. For example, when `parent` is set to
104+
* `"projects/example/locations/-"`. This field is not supported by default and
105105
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
106106
* otherwise in service or product specific documentation.
107107
* @return ListOperationsResponse

src/Spanner/Resource/ProjectsInstanceConfigsSsdCachesOperations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public function get($name, $optParams = [])
9999
* @opt_param string pageToken The standard list page token.
100100
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
101101
* reachable are returned as normal, and those that are unreachable are returned
102-
* in the [ListOperationsResponse.unreachable] field. This can only be `true`
103-
* when reading across collections e.g. when `parent` is set to
104-
* `"projects/example/locations/-"`. This field is not by default supported and
102+
* in the ListOperationsResponse.unreachable field. This can only be `true` when
103+
* reading across collections. For example, when `parent` is set to
104+
* `"projects/example/locations/-"`. This field is not supported by default and
105105
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
106106
* otherwise in service or product specific documentation.
107107
* @return ListOperationsResponse

src/Spanner/Resource/ProjectsInstancesBackupsOperations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public function get($name, $optParams = [])
9999
* @opt_param string pageToken The standard list page token.
100100
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
101101
* reachable are returned as normal, and those that are unreachable are returned
102-
* in the [ListOperationsResponse.unreachable] field. This can only be `true`
103-
* when reading across collections e.g. when `parent` is set to
104-
* `"projects/example/locations/-"`. This field is not by default supported and
102+
* in the ListOperationsResponse.unreachable field. This can only be `true` when
103+
* reading across collections. For example, when `parent` is set to
104+
* `"projects/example/locations/-"`. This field is not supported by default and
105105
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
106106
* otherwise in service or product specific documentation.
107107
* @return ListOperationsResponse

src/Spanner/Resource/ProjectsInstancesDatabasesOperations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ public function get($name, $optParams = [])
9999
* @opt_param string pageToken The standard list page token.
100100
* @opt_param bool returnPartialSuccess When set to `true`, operations that are
101101
* reachable are returned as normal, and those that are unreachable are returned
102-
* in the [ListOperationsResponse.unreachable] field. This can only be `true`
103-
* when reading across collections e.g. when `parent` is set to
104-
* `"projects/example/locations/-"`. This field is not by default supported and
102+
* in the ListOperationsResponse.unreachable field. This can only be `true` when
103+
* reading across collections. For example, when `parent` is set to
104+
* `"projects/example/locations/-"`. This field is not supported by default and
105105
* will result in an `UNIMPLEMENTED` error if set unless explicitly documented
106106
* otherwise in service or product specific documentation.
107107
* @return ListOperationsResponse

0 commit comments

Comments
 (0)