Skip to content

Commit 58bf973

Browse files
1 parent 82795d8 commit 58bf973

File tree

6 files changed

+248
-13
lines changed

6 files changed

+248
-13
lines changed

src/Spanner/AutoscalingConfigOverrides.php

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,46 @@ class AutoscalingConfigOverrides extends \Google\Model
2929
* @var int
3030
*/
3131
public $autoscalingTargetHighPriorityCpuUtilizationPercent;
32+
/**
33+
* Optional. If specified, overrides the autoscaling target
34+
* `total_cpu_utilization_percent` in the top-level autoscaling configuration
35+
* for the selected replicas.
36+
*
37+
* @var int
38+
*/
39+
public $autoscalingTargetTotalCpuUtilizationPercent;
40+
/**
41+
* Optional. If true, disables high priority CPU autoscaling for the selected
42+
* replicas and ignores high_priority_cpu_utilization_percent in the top-level
43+
* autoscaling configuration. When setting this field to true, setting
44+
* autoscaling_target_high_priority_cpu_utilization_percent field to a non-
45+
* zero value for the same replica is not supported. If false, the
46+
* autoscaling_target_high_priority_cpu_utilization_percent field in the
47+
* replica will be used if set to a non-zero value. Otherwise, the
48+
* high_priority_cpu_utilization_percent field in the top-level autoscaling
49+
* configuration will be used. Setting both
50+
* disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to
51+
* true for the same replica is not supported.
52+
*
53+
* @var bool
54+
*/
55+
public $disableHighPriorityCpuAutoscaling;
56+
/**
57+
* Optional. If true, disables total CPU autoscaling for the selected replicas
58+
* and ignores total_cpu_utilization_percent in the top-level autoscaling
59+
* configuration. When setting this field to true, setting
60+
* autoscaling_target_total_cpu_utilization_percent field to a non-zero value
61+
* for the same replica is not supported. If false, the
62+
* autoscaling_target_total_cpu_utilization_percent field in the replica will
63+
* be used if set to a non-zero value. Otherwise, the
64+
* total_cpu_utilization_percent field in the top-level autoscaling
65+
* configuration will be used. Setting both
66+
* disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to
67+
* true for the same replica is not supported.
68+
*
69+
* @var bool
70+
*/
71+
public $disableTotalCpuAutoscaling;
3272

3373
/**
3474
* Optional. If specified, overrides the min/max limit in the top-level
@@ -65,6 +105,76 @@ public function getAutoscalingTargetHighPriorityCpuUtilizationPercent()
65105
{
66106
return $this->autoscalingTargetHighPriorityCpuUtilizationPercent;
67107
}
108+
/**
109+
* Optional. If specified, overrides the autoscaling target
110+
* `total_cpu_utilization_percent` in the top-level autoscaling configuration
111+
* for the selected replicas.
112+
*
113+
* @param int $autoscalingTargetTotalCpuUtilizationPercent
114+
*/
115+
public function setAutoscalingTargetTotalCpuUtilizationPercent($autoscalingTargetTotalCpuUtilizationPercent)
116+
{
117+
$this->autoscalingTargetTotalCpuUtilizationPercent = $autoscalingTargetTotalCpuUtilizationPercent;
118+
}
119+
/**
120+
* @return int
121+
*/
122+
public function getAutoscalingTargetTotalCpuUtilizationPercent()
123+
{
124+
return $this->autoscalingTargetTotalCpuUtilizationPercent;
125+
}
126+
/**
127+
* Optional. If true, disables high priority CPU autoscaling for the selected
128+
* replicas and ignores high_priority_cpu_utilization_percent in the top-level
129+
* autoscaling configuration. When setting this field to true, setting
130+
* autoscaling_target_high_priority_cpu_utilization_percent field to a non-
131+
* zero value for the same replica is not supported. If false, the
132+
* autoscaling_target_high_priority_cpu_utilization_percent field in the
133+
* replica will be used if set to a non-zero value. Otherwise, the
134+
* high_priority_cpu_utilization_percent field in the top-level autoscaling
135+
* configuration will be used. Setting both
136+
* disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to
137+
* true for the same replica is not supported.
138+
*
139+
* @param bool $disableHighPriorityCpuAutoscaling
140+
*/
141+
public function setDisableHighPriorityCpuAutoscaling($disableHighPriorityCpuAutoscaling)
142+
{
143+
$this->disableHighPriorityCpuAutoscaling = $disableHighPriorityCpuAutoscaling;
144+
}
145+
/**
146+
* @return bool
147+
*/
148+
public function getDisableHighPriorityCpuAutoscaling()
149+
{
150+
return $this->disableHighPriorityCpuAutoscaling;
151+
}
152+
/**
153+
* Optional. If true, disables total CPU autoscaling for the selected replicas
154+
* and ignores total_cpu_utilization_percent in the top-level autoscaling
155+
* configuration. When setting this field to true, setting
156+
* autoscaling_target_total_cpu_utilization_percent field to a non-zero value
157+
* for the same replica is not supported. If false, the
158+
* autoscaling_target_total_cpu_utilization_percent field in the replica will
159+
* be used if set to a non-zero value. Otherwise, the
160+
* total_cpu_utilization_percent field in the top-level autoscaling
161+
* configuration will be used. Setting both
162+
* disable_high_priority_cpu_autoscaling and disable_total_cpu_autoscaling to
163+
* true for the same replica is not supported.
164+
*
165+
* @param bool $disableTotalCpuAutoscaling
166+
*/
167+
public function setDisableTotalCpuAutoscaling($disableTotalCpuAutoscaling)
168+
{
169+
$this->disableTotalCpuAutoscaling = $disableTotalCpuAutoscaling;
170+
}
171+
/**
172+
* @return bool
173+
*/
174+
public function getDisableTotalCpuAutoscaling()
175+
{
176+
return $this->disableTotalCpuAutoscaling;
177+
}
68178
}
69179

70180
// Adding a class alias for backwards compatibility with the previous class name.

src/Spanner/AutoscalingTargets.php

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
class AutoscalingTargets extends \Google\Model
2121
{
2222
/**
23-
* Required. The target high priority cpu utilization percentage that the
23+
* Optional. The target high priority cpu utilization percentage that the
2424
* autoscaler should be trying to achieve for the instance. This number is on
2525
* a scale from 0 (no utilization) to 100 (full utilization). The valid range
26-
* is [10, 90] inclusive.
26+
* is [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
27+
* scaling based on high priority CPU utilization.
2728
*
2829
* @var int
2930
*/
@@ -37,12 +38,26 @@ class AutoscalingTargets extends \Google\Model
3738
* @var int
3839
*/
3940
public $storageUtilizationPercent;
41+
/**
42+
* Optional. The target total CPU utilization percentage that the autoscaler
43+
* should be trying to achieve for the instance. This number is on a scale
44+
* from 0 (no utilization) to 100 (full utilization). The valid range is [10,
45+
* 90] inclusive. If not specified or set to 0, the autoscaler skips scaling
46+
* based on total CPU utilization. If both
47+
* `high_priority_cpu_utilization_percent` and `total_cpu_utilization_percent`
48+
* are specified, the autoscaler provisions the larger of the two required
49+
* compute capacities to satisfy both targets.
50+
*
51+
* @var int
52+
*/
53+
public $totalCpuUtilizationPercent;
4054

4155
/**
42-
* Required. The target high priority cpu utilization percentage that the
56+
* Optional. The target high priority cpu utilization percentage that the
4357
* autoscaler should be trying to achieve for the instance. This number is on
4458
* a scale from 0 (no utilization) to 100 (full utilization). The valid range
45-
* is [10, 90] inclusive.
59+
* is [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
60+
* scaling based on high priority CPU utilization.
4661
*
4762
* @param int $highPriorityCpuUtilizationPercent
4863
*/
@@ -76,6 +91,29 @@ public function getStorageUtilizationPercent()
7691
{
7792
return $this->storageUtilizationPercent;
7893
}
94+
/**
95+
* Optional. The target total CPU utilization percentage that the autoscaler
96+
* should be trying to achieve for the instance. This number is on a scale
97+
* from 0 (no utilization) to 100 (full utilization). The valid range is [10,
98+
* 90] inclusive. If not specified or set to 0, the autoscaler skips scaling
99+
* based on total CPU utilization. If both
100+
* `high_priority_cpu_utilization_percent` and `total_cpu_utilization_percent`
101+
* are specified, the autoscaler provisions the larger of the two required
102+
* compute capacities to satisfy both targets.
103+
*
104+
* @param int $totalCpuUtilizationPercent
105+
*/
106+
public function setTotalCpuUtilizationPercent($totalCpuUtilizationPercent)
107+
{
108+
$this->totalCpuUtilizationPercent = $totalCpuUtilizationPercent;
109+
}
110+
/**
111+
* @return int
112+
*/
113+
public function getTotalCpuUtilizationPercent()
114+
{
115+
return $this->totalCpuUtilizationPercent;
116+
}
79117
}
80118

81119
// Adding a class alias for backwards compatibility with the previous class name.

src/Spanner/Backup.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ class Backup extends \Google\Collection
3232
* PostgreSQL supported SQL.
3333
*/
3434
public const DATABASE_DIALECT_POSTGRESQL = 'POSTGRESQL';
35+
/**
36+
* Edition not specified.
37+
*/
38+
public const MINIMUM_RESTORABLE_EDITION_EDITION_UNSPECIFIED = 'EDITION_UNSPECIFIED';
39+
/**
40+
* Standard edition.
41+
*/
42+
public const MINIMUM_RESTORABLE_EDITION_STANDARD = 'STANDARD';
43+
/**
44+
* Enterprise edition.
45+
*/
46+
public const MINIMUM_RESTORABLE_EDITION_ENTERPRISE = 'ENTERPRISE';
47+
/**
48+
* Enterprise Plus edition.
49+
*/
50+
public const MINIMUM_RESTORABLE_EDITION_ENTERPRISE_PLUS = 'ENTERPRISE_PLUS';
3551
/**
3652
* Not specified.
3753
*/
@@ -140,6 +156,13 @@ class Backup extends \Google\Collection
140156
* @var string
141157
*/
142158
public $maxExpireTime;
159+
/**
160+
* Output only. The minimum edition required to successfully restore the
161+
* backup. Populated only if the edition is Enterprise or Enterprise Plus.
162+
*
163+
* @var string
164+
*/
165+
public $minimumRestorableEdition;
143166
/**
144167
* Output only for the CreateBackup operation. Required for the UpdateBackup
145168
* operation. A globally unique identifier for the backup which cannot be
@@ -446,6 +469,25 @@ public function getMaxExpireTime()
446469
{
447470
return $this->maxExpireTime;
448471
}
472+
/**
473+
* Output only. The minimum edition required to successfully restore the
474+
* backup. Populated only if the edition is Enterprise or Enterprise Plus.
475+
*
476+
* Accepted values: EDITION_UNSPECIFIED, STANDARD, ENTERPRISE, ENTERPRISE_PLUS
477+
*
478+
* @param self::MINIMUM_RESTORABLE_EDITION_* $minimumRestorableEdition
479+
*/
480+
public function setMinimumRestorableEdition($minimumRestorableEdition)
481+
{
482+
$this->minimumRestorableEdition = $minimumRestorableEdition;
483+
}
484+
/**
485+
* @return self::MINIMUM_RESTORABLE_EDITION_*
486+
*/
487+
public function getMinimumRestorableEdition()
488+
{
489+
return $this->minimumRestorableEdition;
490+
}
449491
/**
450492
* Output only for the CreateBackup operation. Required for the UpdateBackup
451493
* operation. A globally unique identifier for the backup which cannot be

src/Spanner/ClientContext.php

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

2020
class ClientContext extends \Google\Model
2121
{
22+
/**
23+
* Optional. Map of parameter name to value for this request. These values
24+
* will be returned by any SECURE_CONTEXT() calls invoked by this request
25+
* (e.g., by queries against Parameterized Secure Views).
26+
*
27+
* @var array[]
28+
*/
29+
public $secureContext;
30+
31+
/**
32+
* Optional. Map of parameter name to value for this request. These values
33+
* will be returned by any SECURE_CONTEXT() calls invoked by this request
34+
* (e.g., by queries against Parameterized Secure Views).
35+
*
36+
* @param array[] $secureContext
37+
*/
38+
public function setSecureContext($secureContext)
39+
{
40+
$this->secureContext = $secureContext;
41+
}
42+
/**
43+
* @return array[]
44+
*/
45+
public function getSecureContext()
46+
{
47+
return $this->secureContext;
48+
}
2249
}
2350

2451
// Adding a class alias for backwards compatibility with the previous class name.

src/Spanner/PartitionQueryRequest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class PartitionQueryRequest extends \Google\Model
2222
protected $paramTypesType = Type::class;
2323
protected $paramTypesDataType = 'map';
2424
/**
25-
* Parameter names and values that bind to placeholders in the SQL string. A
26-
* parameter placeholder consists of the `@` character followed by the
27-
* parameter name (for example, `@firstName`). Parameter names can contain
25+
* Optional. Parameter names and values that bind to placeholders in the SQL
26+
* string. A parameter placeholder consists of the `@` character followed by
27+
* the parameter name (for example, `@firstName`). Parameter names can contain
2828
* letters, numbers, and underscores. Parameters can appear anywhere that a
2929
* literal value is expected. The same parameter name can be used more than
3030
* once, for example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It's an
@@ -54,9 +54,9 @@ class PartitionQueryRequest extends \Google\Model
5454
protected $transactionDataType = '';
5555

5656
/**
57-
* It isn't always possible for Cloud Spanner to infer the right SQL type from
58-
* a JSON value. For example, values of type `BYTES` and values of type
59-
* `STRING` both appear in params as JSON strings. In these cases,
57+
* Optional. It isn't always possible for Cloud Spanner to infer the right SQL
58+
* type from a JSON value. For example, values of type `BYTES` and values of
59+
* type `STRING` both appear in params as JSON strings. In these cases,
6060
* `param_types` can be used to specify the exact SQL type for some or all of
6161
* the SQL query parameters. See the definition of Type for more information
6262
* about SQL types.
@@ -75,9 +75,9 @@ public function getParamTypes()
7575
return $this->paramTypes;
7676
}
7777
/**
78-
* Parameter names and values that bind to placeholders in the SQL string. A
79-
* parameter placeholder consists of the `@` character followed by the
80-
* parameter name (for example, `@firstName`). Parameter names can contain
78+
* Optional. Parameter names and values that bind to placeholders in the SQL
79+
* string. A parameter placeholder consists of the `@` character followed by
80+
* the parameter name (for example, `@firstName`). Parameter names can contain
8181
* letters, numbers, and underscores. Parameters can appear anywhere that a
8282
* literal value is expected. The same parameter name can be used more than
8383
* once, for example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It's an

src/Spanner/RequestOptions.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ 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 = '';
3840
/**
3941
* Priority for the request.
4042
*
@@ -70,6 +72,22 @@ class RequestOptions extends \Google\Model
7072
*/
7173
public $transactionTag;
7274

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

0 commit comments

Comments
 (0)