Skip to content

Commit 899c388

Browse files
feat: Added enum value for PG15 (#11666)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat(v1alpha): Added enum value for PG15 feat(v1alpha): Deprecate network field in favor of network_config.network feat(v1alpha): Added ClientConnectionConfig feat(v1alpha): Added DatabaseVersion END_COMMIT_OVERRIDE PiperOrigin-RevId: 566668162 Source-Link: googleapis/googleapis@90d552e Source-Link: googleapis/googleapis-gen@c72f454 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFsbG95ZGIvLk93bEJvdC55YW1sIiwiaCI6ImM3MmY0NTQ4NDJiMWFmNDU5YjRlMmQ3MGU4NTEwMDgwNDYxNzJiMmYifQ== --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 5429db5 commit 899c388

File tree

9 files changed

+103
-17
lines changed

9 files changed

+103
-17
lines changed

packages/google-cloud-alloydb/google/cloud/alloydb/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.3.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.3.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.3.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/google/cloud/alloydb_v1alpha/types/resources.py

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,13 @@ class DatabaseVersion(proto.Enum):
108108
13.
109109
POSTGRES_14 (2):
110110
The database version is Postgres 14.
111+
POSTGRES_15 (3):
112+
The database version is Postgres 15.
111113
"""
112114
DATABASE_VERSION_UNSPECIFIED = 0
113115
POSTGRES_13 = 1
114116
POSTGRES_14 = 2
117+
POSTGRES_15 = 3
115118

116119

117120
class UserPassword(proto.Message):
@@ -689,9 +692,9 @@ class Cluster(proto.Message):
689692
cluster resources are created and from which they are
690693
accessible via Private IP. The network must belong to the
691694
same project as the cluster. It is specified in the form:
692-
"projects/{project_number}/global/networks/{network_id}".
693-
This is required to create a cluster. It can be updated, but
694-
it cannot be removed.
695+
"projects/{project}/global/networks/{network_id}". This is
696+
required to create a cluster. Deprecated, use
697+
network_config.network instead.
695698
etag (str):
696699
For Resource freshness validation
697700
(https://google.aip.dev/154)
@@ -827,11 +830,10 @@ class NetworkConfig(proto.Message):
827830
accessible via Private IP. The network must belong to the
828831
same project as the cluster. It is specified in the form:
829832
"projects/{project_number}/global/networks/{network_id}".
830-
This is required to create a cluster. It can be updated, but
831-
it cannot be removed.
833+
This is required to create a cluster.
832834
allocated_ip_range (str):
833-
Optional. The name of the allocated IP range for the private
834-
IP AlloyDB cluster. For example:
835+
Optional. Name of the allocated IP range for the private IP
836+
AlloyDB cluster, for example:
835837
"google-managed-services-default". If set, the instance IPs
836838
for this cluster will be created in the allocated range. The
837839
range name must comply with RFC 1035. Specifically, the name
@@ -1128,6 +1130,9 @@ class Instance(proto.Message):
11281130
non-default update policy, you must
11291131
specify explicitly specify the value in each
11301132
update request.
1133+
client_connection_config (google.cloud.alloydb_v1alpha.types.Instance.ClientConnectionConfig):
1134+
Optional. Client connection specific
1135+
configurations
11311136
satisfies_pzs (bool):
11321137
Reserved for future use.
11331138
"""
@@ -1369,6 +1374,29 @@ class Mode(proto.Enum):
13691374
enum="Instance.UpdatePolicy.Mode",
13701375
)
13711376

1377+
class ClientConnectionConfig(proto.Message):
1378+
r"""Client connection configuration
1379+
1380+
Attributes:
1381+
require_connectors (bool):
1382+
Optional. Configuration to enforce connectors
1383+
only (ex: AuthProxy) connections to the
1384+
database.
1385+
ssl_config (google.cloud.alloydb_v1alpha.types.SslConfig):
1386+
Optional. SSL config option for this
1387+
instance.
1388+
"""
1389+
1390+
require_connectors: bool = proto.Field(
1391+
proto.BOOL,
1392+
number=1,
1393+
)
1394+
ssl_config: "SslConfig" = proto.Field(
1395+
proto.MESSAGE,
1396+
number=2,
1397+
message="SslConfig",
1398+
)
1399+
13721400
name: str = proto.Field(
13731401
proto.STRING,
13741402
number=1,
@@ -1472,6 +1500,11 @@ class Mode(proto.Enum):
14721500
number=22,
14731501
message=UpdatePolicy,
14741502
)
1503+
client_connection_config: ClientConnectionConfig = proto.Field(
1504+
proto.MESSAGE,
1505+
number=23,
1506+
message=ClientConnectionConfig,
1507+
)
14751508
satisfies_pzs: bool = proto.Field(
14761509
proto.BOOL,
14771510
number=24,
@@ -1488,9 +1521,10 @@ class ConnectionInfo(proto.Message):
14881521
projects/{project}/locations/{location}/clusters/\ */instances/*/connectionInfo
14891522
This field currently has no semantic meaning.
14901523
ip_address (str):
1491-
Output only. The IP address for the Instance.
1492-
This is the connection endpoint for an end-user
1493-
application.
1524+
Output only. The private network IP address for the
1525+
Instance. This is the default IP for the instance and is
1526+
always created (even if enable_public_ip is set). This is
1527+
the connection endpoint for an end-user application.
14941528
pem_certificate_chain (MutableSequence[str]):
14951529
Output only. The pem-encoded chain that may
14961530
be used to verify the X.509 certificate.
@@ -1604,6 +1638,11 @@ class Backup(proto.Message):
16041638
collected.
16051639
satisfies_pzs (bool):
16061640
Reserved for future use.
1641+
database_version (google.cloud.alloydb_v1alpha.types.DatabaseVersion):
1642+
Output only. The database engine major
1643+
version of the cluster this backup was created
1644+
from. Any restored cluster created from this
1645+
backup will have the same database version.
16071646
"""
16081647

16091648
class State(proto.Enum):
@@ -1780,6 +1819,11 @@ class QuantityBasedExpiry(proto.Message):
17801819
proto.BOOL,
17811820
number=21,
17821821
)
1822+
database_version: "DatabaseVersion" = proto.Field(
1823+
proto.ENUM,
1824+
number=22,
1825+
enum="DatabaseVersion",
1826+
)
17831827

17841828

17851829
class SupportedDatabaseFlag(proto.Message):

packages/google-cloud-alloydb/google/cloud/alloydb_v1beta/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.3.1" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-alloydb",
11-
"version": "0.3.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1alpha.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-alloydb",
11-
"version": "0.3.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-alloydb/samples/generated_samples/snippet_metadata_google.cloud.alloydb.v1beta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-alloydb",
11-
"version": "0.3.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-alloydb/tests/unit/gapic/alloydb_v1alpha/test_alloy_db_admin.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5750,6 +5750,7 @@ def test_get_backup(request_type, transport: str = "grpc"):
57505750
etag="etag_value",
57515751
size_bytes=1089,
57525752
satisfies_pzs=True,
5753+
database_version=resources.DatabaseVersion.POSTGRES_13,
57535754
)
57545755
response = client.get_backup(request)
57555756

@@ -5772,6 +5773,7 @@ def test_get_backup(request_type, transport: str = "grpc"):
57725773
assert response.etag == "etag_value"
57735774
assert response.size_bytes == 1089
57745775
assert response.satisfies_pzs is True
5776+
assert response.database_version == resources.DatabaseVersion.POSTGRES_13
57755777

57765778

57775779
def test_get_backup_empty_call():
@@ -5820,6 +5822,7 @@ async def test_get_backup_async(
58205822
etag="etag_value",
58215823
size_bytes=1089,
58225824
satisfies_pzs=True,
5825+
database_version=resources.DatabaseVersion.POSTGRES_13,
58235826
)
58245827
)
58255828
response = await client.get_backup(request)
@@ -5843,6 +5846,7 @@ async def test_get_backup_async(
58435846
assert response.etag == "etag_value"
58445847
assert response.size_bytes == 1089
58455848
assert response.satisfies_pzs is True
5849+
assert response.database_version == resources.DatabaseVersion.POSTGRES_13
58465850

58475851

58485852
@pytest.mark.asyncio
@@ -12445,6 +12449,10 @@ def test_create_instance_rest(request_type):
1244512449
"etag": "etag_value",
1244612450
"annotations": {},
1244712451
"update_policy": {"mode": 1},
12452+
"client_connection_config": {
12453+
"require_connectors": True,
12454+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
12455+
},
1244812456
"satisfies_pzs": True,
1244912457
}
1245012458
request = request_type(**request_init)
@@ -12688,6 +12696,10 @@ def test_create_instance_rest_bad_request(
1268812696
"etag": "etag_value",
1268912697
"annotations": {},
1269012698
"update_policy": {"mode": 1},
12699+
"client_connection_config": {
12700+
"require_connectors": True,
12701+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
12702+
},
1269112703
"satisfies_pzs": True,
1269212704
}
1269312705
request = request_type(**request_init)
@@ -12819,6 +12831,10 @@ def test_create_secondary_instance_rest(request_type):
1281912831
"etag": "etag_value",
1282012832
"annotations": {},
1282112833
"update_policy": {"mode": 1},
12834+
"client_connection_config": {
12835+
"require_connectors": True,
12836+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
12837+
},
1282212838
"satisfies_pzs": True,
1282312839
}
1282412840
request = request_type(**request_init)
@@ -13064,6 +13080,10 @@ def test_create_secondary_instance_rest_bad_request(
1306413080
"etag": "etag_value",
1306513081
"annotations": {},
1306613082
"update_policy": {"mode": 1},
13083+
"client_connection_config": {
13084+
"require_connectors": True,
13085+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
13086+
},
1306713087
"satisfies_pzs": True,
1306813088
}
1306913089
request = request_type(**request_init)
@@ -13200,6 +13220,10 @@ def test_batch_create_instances_rest(request_type):
1320013220
"etag": "etag_value",
1320113221
"annotations": {},
1320213222
"update_policy": {"mode": 1},
13223+
"client_connection_config": {
13224+
"require_connectors": True,
13225+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
13226+
},
1320313227
"satisfies_pzs": True,
1320413228
},
1320513229
"request_id": "request_id_value",
@@ -13429,6 +13453,10 @@ def test_batch_create_instances_rest_bad_request(
1342913453
"etag": "etag_value",
1343013454
"annotations": {},
1343113455
"update_policy": {"mode": 1},
13456+
"client_connection_config": {
13457+
"require_connectors": True,
13458+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
13459+
},
1343213460
"satisfies_pzs": True,
1343313461
},
1343413462
"request_id": "request_id_value",
@@ -13508,6 +13536,10 @@ def test_update_instance_rest(request_type):
1350813536
"etag": "etag_value",
1350913537
"annotations": {},
1351013538
"update_policy": {"mode": 1},
13539+
"client_connection_config": {
13540+
"require_connectors": True,
13541+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
13542+
},
1351113543
"satisfies_pzs": True,
1351213544
}
1351313545
request = request_type(**request_init)
@@ -13733,6 +13765,10 @@ def test_update_instance_rest_bad_request(
1373313765
"etag": "etag_value",
1373413766
"annotations": {},
1373513767
"update_policy": {"mode": 1},
13768+
"client_connection_config": {
13769+
"require_connectors": True,
13770+
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
13771+
},
1373613772
"satisfies_pzs": True,
1373713773
}
1373813774
request = request_type(**request_init)
@@ -15287,6 +15323,7 @@ def test_get_backup_rest(request_type):
1528715323
etag="etag_value",
1528815324
size_bytes=1089,
1528915325
satisfies_pzs=True,
15326+
database_version=resources.DatabaseVersion.POSTGRES_13,
1529015327
)
1529115328

1529215329
# Wrap the value into a proper Response obj
@@ -15313,6 +15350,7 @@ def test_get_backup_rest(request_type):
1531315350
assert response.etag == "etag_value"
1531415351
assert response.size_bytes == 1089
1531515352
assert response.satisfies_pzs is True
15353+
assert response.database_version == resources.DatabaseVersion.POSTGRES_13
1531615354

1531715355

1531815356
def test_get_backup_rest_required_fields(request_type=service.GetBackupRequest):
@@ -15578,6 +15616,7 @@ def test_create_backup_rest(request_type):
1557815616
"expiry_time": {},
1557915617
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
1558015618
"satisfies_pzs": True,
15619+
"database_version": 1,
1558115620
}
1558215621
request = request_type(**request_init)
1558315622

@@ -15810,6 +15849,7 @@ def test_create_backup_rest_bad_request(
1581015849
"expiry_time": {},
1581115850
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
1581215851
"satisfies_pzs": True,
15852+
"database_version": 1,
1581315853
}
1581415854
request = request_type(**request_init)
1581515855

@@ -15932,6 +15972,7 @@ def test_update_backup_rest(request_type):
1593215972
"expiry_time": {},
1593315973
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
1593415974
"satisfies_pzs": True,
15975+
"database_version": 1,
1593515976
}
1593615977
request = request_type(**request_init)
1593715978

@@ -16144,6 +16185,7 @@ def test_update_backup_rest_bad_request(
1614416185
"expiry_time": {},
1614516186
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
1614616187
"satisfies_pzs": True,
16188+
"database_version": 1,
1614716189
}
1614816190
request = request_type(**request_init)
1614916191

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy