Skip to content

Commit c0f718e

Browse files
1 parent 2f63555 commit c0f718e

5 files changed

Lines changed: 298 additions & 4 deletions

File tree

src/CloudRedis/DatabaseResourceMetadata.php

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class DatabaseResourceMetadata extends \Google\Collection
4040
* For rest of the other category
4141
*/
4242
public const CURRENT_STATE_STATE_OTHER = 'STATE_OTHER';
43+
/**
44+
* Instance is in STOPPED state.
45+
*/
46+
public const CURRENT_STATE_STOPPED = 'STOPPED';
4347
/**
4448
* Default, to make it consistent with instance edition enum.
4549
*/
@@ -77,6 +81,10 @@ class DatabaseResourceMetadata extends \Google\Collection
7781
* For rest of the other category
7882
*/
7983
public const EXPECTED_STATE_STATE_OTHER = 'STATE_OTHER';
84+
/**
85+
* Instance is in STOPPED state.
86+
*/
87+
public const EXPECTED_STATE_STOPPED = 'STOPPED';
8088
/**
8189
* Unspecified.
8290
*
@@ -159,7 +167,7 @@ class DatabaseResourceMetadata extends \Google\Collection
159167
* Replicated cluster encryption key inaccessible.
160168
*/
161169
public const SUSPENSION_REASON_REPLICATED_CLUSTER_ENCRYPTION_KEY_INACCESSIBLE = 'REPLICATED_CLUSTER_ENCRYPTION_KEY_INACCESSIBLE';
162-
protected $collection_key = 'entitlements';
170+
protected $collection_key = 'resourceFlags';
163171
protected $availabilityConfigurationType = AvailabilityConfiguration::class;
164172
protected $availabilityConfigurationDataType = '';
165173
protected $backupConfigurationType = BackupConfiguration::class;
@@ -247,6 +255,8 @@ class DatabaseResourceMetadata extends \Google\Collection
247255
* @var string
248256
*/
249257
public $resourceContainer;
258+
protected $resourceFlagsType = ResourceFlags::class;
259+
protected $resourceFlagsDataType = 'array';
250260
/**
251261
* Required. Different from DatabaseResourceId.unique_id, a resource name can
252262
* be reused over time. That is, after a resource named "ABC" is deleted, the
@@ -366,7 +376,7 @@ public function getCreationTime()
366376
* Current state of the instance.
367377
*
368378
* Accepted values: STATE_UNSPECIFIED, HEALTHY, UNHEALTHY, SUSPENDED, DELETED,
369-
* STATE_OTHER
379+
* STATE_OTHER, STOPPED
370380
*
371381
* @param self::CURRENT_STATE_* $currentState
372382
*/
@@ -440,7 +450,7 @@ public function getEntitlements()
440450
* expected state will remain at the HEALTHY.
441451
*
442452
* Accepted values: STATE_UNSPECIFIED, HEALTHY, UNHEALTHY, SUSPENDED, DELETED,
443-
* STATE_OTHER
453+
* STATE_OTHER, STOPPED
444454
*
445455
* @param self::EXPECTED_STATE_* $expectedState
446456
*/
@@ -645,6 +655,22 @@ public function getResourceContainer()
645655
{
646656
return $this->resourceContainer;
647657
}
658+
/**
659+
* Optional. List of resource flags for the database resource.
660+
*
661+
* @param ResourceFlags[] $resourceFlags
662+
*/
663+
public function setResourceFlags($resourceFlags)
664+
{
665+
$this->resourceFlags = $resourceFlags;
666+
}
667+
/**
668+
* @return ResourceFlags[]
669+
*/
670+
public function getResourceFlags()
671+
{
672+
return $this->resourceFlags;
673+
}
648674
/**
649675
* Required. Different from DatabaseResourceId.unique_id, a resource name can
650676
* be reused over time. That is, after a resource named "ABC" is deleted, the

src/CloudRedis/Resource/ProjectsLocations.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ public function get($name, $optParams = [])
4545
return $this->call('get', [$params], Location::class);
4646
}
4747
/**
48-
* Lists information about the supported locations for this service.
48+
* Lists information about the supported locations for this service. This method
49+
* can be called in two ways: * **List all public locations:** Use the path `GET
50+
* /v1/locations`. * **List project-visible locations:** Use the path `GET
51+
* /v1/projects/{project_id}/locations`. This may include public locations as
52+
* well as private or other locations specifically visible to the project.
4953
* (locations.listProjectsLocations)
5054
*
5155
* @param string $name The resource that owns the locations collection, if

src/CloudRedis/ResourceFlags.php

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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\CloudRedis;
19+
20+
class ResourceFlags extends \Google\Model
21+
{
22+
/**
23+
* Optional. Key of the resource flag.
24+
*
25+
* @var string
26+
*/
27+
public $key;
28+
/**
29+
* Optional. Value of the resource flag.
30+
*
31+
* @var string
32+
*/
33+
public $value;
34+
35+
/**
36+
* Optional. Key of the resource flag.
37+
*
38+
* @param string $key
39+
*/
40+
public function setKey($key)
41+
{
42+
$this->key = $key;
43+
}
44+
/**
45+
* @return string
46+
*/
47+
public function getKey()
48+
{
49+
return $this->key;
50+
}
51+
/**
52+
* Optional. Value of the resource flag.
53+
*
54+
* @param string $value
55+
*/
56+
public function setValue($value)
57+
{
58+
$this->value = $value;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getValue()
64+
{
65+
return $this->value;
66+
}
67+
}
68+
69+
// Adding a class alias for backwards compatibility with the previous class name.
70+
class_alias(ResourceFlags::class, 'Google_Service_CloudRedis_ResourceFlags');

src/CloudRedis/ResourceMaintenanceInfo.php

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,70 @@
1919

2020
class ResourceMaintenanceInfo extends \Google\Collection
2121
{
22+
/**
23+
* Unspecified state.
24+
*/
25+
public const MAINTENANCE_STATE_MAINTENANCE_STATE_UNSPECIFIED = 'MAINTENANCE_STATE_UNSPECIFIED';
26+
/**
27+
* Database resource is being created.
28+
*/
29+
public const MAINTENANCE_STATE_CREATING = 'CREATING';
30+
/**
31+
* Database resource has been created and is ready to use.
32+
*/
33+
public const MAINTENANCE_STATE_READY = 'READY';
34+
/**
35+
* Database resource is being updated.
36+
*/
37+
public const MAINTENANCE_STATE_UPDATING = 'UPDATING';
38+
/**
39+
* Database resource is unheathy and under repair.
40+
*/
41+
public const MAINTENANCE_STATE_REPAIRING = 'REPAIRING';
42+
/**
43+
* Database resource is being deleted.
44+
*/
45+
public const MAINTENANCE_STATE_DELETING = 'DELETING';
46+
/**
47+
* Database resource encountered an error and is in indeterministic state.
48+
*/
49+
public const MAINTENANCE_STATE_ERROR = 'ERROR';
2250
protected $collection_key = 'denyMaintenanceSchedules';
2351
protected $denyMaintenanceSchedulesType = ResourceMaintenanceDenySchedule::class;
2452
protected $denyMaintenanceSchedulesDataType = 'array';
53+
/**
54+
* Optional. Whether the instance is in stopped state. This information is
55+
* temporarily being captured in maintenanceInfo, till STOPPED state is
56+
* supported by DB Center.
57+
*
58+
* @var bool
59+
*/
60+
public $isInstanceStopped;
2561
protected $maintenanceScheduleType = ResourceMaintenanceSchedule::class;
2662
protected $maintenanceScheduleDataType = '';
63+
/**
64+
* Output only. Current state of maintenance on the database resource.
65+
*
66+
* @var string
67+
*/
68+
public $maintenanceState;
2769
/**
2870
* Optional. Current Maintenance version of the database resource. Example:
2971
* "MYSQL_8_0_41.R20250531.01_15"
3072
*
3173
* @var string
3274
*/
3375
public $maintenanceVersion;
76+
protected $upcomingMaintenanceType = UpcomingMaintenance::class;
77+
protected $upcomingMaintenanceDataType = '';
78+
/**
79+
* Optional. This field will contain the date when the last version update was
80+
* applied to the database resource. This will be used to calculate the age of
81+
* the maintenance version.
82+
*
83+
* @var string
84+
*/
85+
public $versionUpdateTime;
3486

3587
/**
3688
* Optional. List of Deny maintenance period for the database resource.
@@ -48,6 +100,24 @@ public function getDenyMaintenanceSchedules()
48100
{
49101
return $this->denyMaintenanceSchedules;
50102
}
103+
/**
104+
* Optional. Whether the instance is in stopped state. This information is
105+
* temporarily being captured in maintenanceInfo, till STOPPED state is
106+
* supported by DB Center.
107+
*
108+
* @param bool $isInstanceStopped
109+
*/
110+
public function setIsInstanceStopped($isInstanceStopped)
111+
{
112+
$this->isInstanceStopped = $isInstanceStopped;
113+
}
114+
/**
115+
* @return bool
116+
*/
117+
public function getIsInstanceStopped()
118+
{
119+
return $this->isInstanceStopped;
120+
}
51121
/**
52122
* Optional. Maintenance window for the database resource.
53123
*
@@ -64,6 +134,25 @@ public function getMaintenanceSchedule()
64134
{
65135
return $this->maintenanceSchedule;
66136
}
137+
/**
138+
* Output only. Current state of maintenance on the database resource.
139+
*
140+
* Accepted values: MAINTENANCE_STATE_UNSPECIFIED, CREATING, READY, UPDATING,
141+
* REPAIRING, DELETING, ERROR
142+
*
143+
* @param self::MAINTENANCE_STATE_* $maintenanceState
144+
*/
145+
public function setMaintenanceState($maintenanceState)
146+
{
147+
$this->maintenanceState = $maintenanceState;
148+
}
149+
/**
150+
* @return self::MAINTENANCE_STATE_*
151+
*/
152+
public function getMaintenanceState()
153+
{
154+
return $this->maintenanceState;
155+
}
67156
/**
68157
* Optional. Current Maintenance version of the database resource. Example:
69158
* "MYSQL_8_0_41.R20250531.01_15"
@@ -81,6 +170,41 @@ public function getMaintenanceVersion()
81170
{
82171
return $this->maintenanceVersion;
83172
}
173+
/**
174+
* Optional. Upcoming maintenance for the database resource. This field is
175+
* populated once SLM generates and publishes upcoming maintenance window.
176+
*
177+
* @param UpcomingMaintenance $upcomingMaintenance
178+
*/
179+
public function setUpcomingMaintenance(UpcomingMaintenance $upcomingMaintenance)
180+
{
181+
$this->upcomingMaintenance = $upcomingMaintenance;
182+
}
183+
/**
184+
* @return UpcomingMaintenance
185+
*/
186+
public function getUpcomingMaintenance()
187+
{
188+
return $this->upcomingMaintenance;
189+
}
190+
/**
191+
* Optional. This field will contain the date when the last version update was
192+
* applied to the database resource. This will be used to calculate the age of
193+
* the maintenance version.
194+
*
195+
* @param string $versionUpdateTime
196+
*/
197+
public function setVersionUpdateTime($versionUpdateTime)
198+
{
199+
$this->versionUpdateTime = $versionUpdateTime;
200+
}
201+
/**
202+
* @return string
203+
*/
204+
public function getVersionUpdateTime()
205+
{
206+
return $this->versionUpdateTime;
207+
}
84208
}
85209

86210
// Adding a class alias for backwards compatibility with the previous class name.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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\CloudRedis;
19+
20+
class UpcomingMaintenance extends \Google\Model
21+
{
22+
/**
23+
* Optional. The end time of the upcoming maintenance.
24+
*
25+
* @var string
26+
*/
27+
public $endTime;
28+
/**
29+
* Optional. The start time of the upcoming maintenance.
30+
*
31+
* @var string
32+
*/
33+
public $startTime;
34+
35+
/**
36+
* Optional. The end time of the upcoming maintenance.
37+
*
38+
* @param string $endTime
39+
*/
40+
public function setEndTime($endTime)
41+
{
42+
$this->endTime = $endTime;
43+
}
44+
/**
45+
* @return string
46+
*/
47+
public function getEndTime()
48+
{
49+
return $this->endTime;
50+
}
51+
/**
52+
* Optional. The start time of the upcoming maintenance.
53+
*
54+
* @param string $startTime
55+
*/
56+
public function setStartTime($startTime)
57+
{
58+
$this->startTime = $startTime;
59+
}
60+
/**
61+
* @return string
62+
*/
63+
public function getStartTime()
64+
{
65+
return $this->startTime;
66+
}
67+
}
68+
69+
// Adding a class alias for backwards compatibility with the previous class name.
70+
class_alias(UpcomingMaintenance::class, 'Google_Service_CloudRedis_UpcomingMaintenance');

0 commit comments

Comments
 (0)