Skip to content

Commit 82795d8

Browse files
1 parent b9fb1b5 commit 82795d8

File tree

3 files changed

+192
-0
lines changed

3 files changed

+192
-0
lines changed

src/CloudAlloyDBAdmin/Instance.php

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,21 @@ class Instance extends \Google\Collection
4343
* Regional (or Highly) available instance.
4444
*/
4545
public const AVAILABILITY_TYPE_REGIONAL = 'REGIONAL';
46+
/**
47+
* DEFAULT_DATA_API_ENABLED_FOR_GOOGLE_CLOUD_SERVICES is a default value that
48+
* allows Google internal services like AlloyDB Studio to access the instance.
49+
*/
50+
public const DATA_API_ACCESS_DEFAULT_DATA_API_ENABLED_FOR_GOOGLE_CLOUD_SERVICES = 'DEFAULT_DATA_API_ENABLED_FOR_GOOGLE_CLOUD_SERVICES';
51+
/**
52+
* Data API access is disabled for this instance.
53+
*/
54+
public const DATA_API_ACCESS_DISABLED = 'DISABLED';
55+
/**
56+
* Data API access is enabled for this instance. For private IP instances,
57+
* this allows authorized users to access the instance from the public
58+
* internet using the ExecuteSql API.
59+
*/
60+
public const DATA_API_ACCESS_ENABLED = 'ENABLED';
4661
/**
4762
* The type of the instance is unknown.
4863
*/
@@ -155,6 +170,17 @@ class Instance extends \Google\Collection
155170
* @var string
156171
*/
157172
public $createTime;
173+
/**
174+
* Optional. Controls whether the Data API is enabled for this instance. When
175+
* enabled, this allows authorized users to connect to the instance from the
176+
* public internet using the `executeSql` API, even for private IP instances.
177+
* If this is not specified, the data API is enabled by default for Google
178+
* internal services like AlloyDB Studio. Disable it explicitly to disallow
179+
* Google internal services as well.
180+
*
181+
* @var string
182+
*/
183+
public $dataApiAccess;
158184
/**
159185
* Database flags. Set at the instance level. They are copied from the primary
160186
* instance on secondary instance creation. Flags that have restrictions
@@ -417,6 +443,30 @@ public function getCreateTime()
417443
{
418444
return $this->createTime;
419445
}
446+
/**
447+
* Optional. Controls whether the Data API is enabled for this instance. When
448+
* enabled, this allows authorized users to connect to the instance from the
449+
* public internet using the `executeSql` API, even for private IP instances.
450+
* If this is not specified, the data API is enabled by default for Google
451+
* internal services like AlloyDB Studio. Disable it explicitly to disallow
452+
* Google internal services as well.
453+
*
454+
* Accepted values: DEFAULT_DATA_API_ENABLED_FOR_GOOGLE_CLOUD_SERVICES,
455+
* DISABLED, ENABLED
456+
*
457+
* @param self::DATA_API_ACCESS_* $dataApiAccess
458+
*/
459+
public function setDataApiAccess($dataApiAccess)
460+
{
461+
$this->dataApiAccess = $dataApiAccess;
462+
}
463+
/**
464+
* @return self::DATA_API_ACCESS_*
465+
*/
466+
public function getDataApiAccess()
467+
{
468+
return $this->dataApiAccess;
469+
}
420470
/**
421471
* Database flags. Set at the instance level. They are copied from the primary
422472
* instance on secondary instance creation. Flags that have restrictions

src/CloudAlloyDBAdmin/StorageDatabasecenterPartnerapiV1mainResourceMaintenanceInfo.php

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

2020
class StorageDatabasecenterPartnerapiV1mainResourceMaintenanceInfo 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 = StorageDatabasecenterPartnerapiV1mainResourceMaintenanceDenySchedule::class;
2452
protected $denyMaintenanceSchedulesDataType = 'array';
2553
protected $maintenanceScheduleType = StorageDatabasecenterPartnerapiV1mainResourceMaintenanceSchedule::class;
2654
protected $maintenanceScheduleDataType = '';
55+
/**
56+
* Output only. Current state of maintenance on the database resource.
57+
*
58+
* @var string
59+
*/
60+
public $maintenanceState;
2761
/**
2862
* Optional. Current Maintenance version of the database resource. Example:
2963
* "MYSQL_8_0_41.R20250531.01_15"
3064
*
3165
* @var string
3266
*/
3367
public $maintenanceVersion;
68+
protected $upcomingMaintenanceType = StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance::class;
69+
protected $upcomingMaintenanceDataType = '';
3470

3571
/**
3672
* Optional. List of Deny maintenance period for the database resource.
@@ -64,6 +100,25 @@ public function getMaintenanceSchedule()
64100
{
65101
return $this->maintenanceSchedule;
66102
}
103+
/**
104+
* Output only. Current state of maintenance on the database resource.
105+
*
106+
* Accepted values: MAINTENANCE_STATE_UNSPECIFIED, CREATING, READY, UPDATING,
107+
* REPAIRING, DELETING, ERROR
108+
*
109+
* @param self::MAINTENANCE_STATE_* $maintenanceState
110+
*/
111+
public function setMaintenanceState($maintenanceState)
112+
{
113+
$this->maintenanceState = $maintenanceState;
114+
}
115+
/**
116+
* @return self::MAINTENANCE_STATE_*
117+
*/
118+
public function getMaintenanceState()
119+
{
120+
return $this->maintenanceState;
121+
}
67122
/**
68123
* Optional. Current Maintenance version of the database resource. Example:
69124
* "MYSQL_8_0_41.R20250531.01_15"
@@ -81,6 +136,23 @@ public function getMaintenanceVersion()
81136
{
82137
return $this->maintenanceVersion;
83138
}
139+
/**
140+
* Optional. Upcoming maintenance for the database resource. This field is
141+
* populated once SLM generates and publishes upcoming maintenance window.
142+
*
143+
* @param StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance $upcomingMaintenance
144+
*/
145+
public function setUpcomingMaintenance(StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance $upcomingMaintenance)
146+
{
147+
$this->upcomingMaintenance = $upcomingMaintenance;
148+
}
149+
/**
150+
* @return StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance
151+
*/
152+
public function getUpcomingMaintenance()
153+
{
154+
return $this->upcomingMaintenance;
155+
}
84156
}
85157

86158
// 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\CloudAlloyDBAdmin;
19+
20+
class StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance 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(StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance::class, 'Google_Service_CloudAlloyDBAdmin_StorageDatabasecenterPartnerapiV1mainUpcomingMaintenance');

0 commit comments

Comments
 (0)