Skip to content

feat: Added enum value for PG15 #11666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ class DatabaseVersion(proto.Enum):
13.
POSTGRES_14 (2):
The database version is Postgres 14.
POSTGRES_15 (3):
The database version is Postgres 15.
"""
DATABASE_VERSION_UNSPECIFIED = 0
POSTGRES_13 = 1
POSTGRES_14 = 2
POSTGRES_15 = 3


class UserPassword(proto.Message):
Expand Down Expand Up @@ -689,9 +692,9 @@ class Cluster(proto.Message):
cluster resources are created and from which they are
accessible via Private IP. The network must belong to the
same project as the cluster. It is specified in the form:
"projects/{project_number}/global/networks/{network_id}".
This is required to create a cluster. It can be updated, but
it cannot be removed.
"projects/{project}/global/networks/{network_id}". This is
required to create a cluster. Deprecated, use
network_config.network instead.
etag (str):
For Resource freshness validation
(https://google.aip.dev/154)
Expand Down Expand Up @@ -827,11 +830,10 @@ class NetworkConfig(proto.Message):
accessible via Private IP. The network must belong to the
same project as the cluster. It is specified in the form:
"projects/{project_number}/global/networks/{network_id}".
This is required to create a cluster. It can be updated, but
it cannot be removed.
This is required to create a cluster.
allocated_ip_range (str):
Optional. The name of the allocated IP range for the private
IP AlloyDB cluster. For example:
Optional. Name of the allocated IP range for the private IP
AlloyDB cluster, for example:
"google-managed-services-default". If set, the instance IPs
for this cluster will be created in the allocated range. The
range name must comply with RFC 1035. Specifically, the name
Expand Down Expand Up @@ -1128,6 +1130,9 @@ class Instance(proto.Message):
non-default update policy, you must
specify explicitly specify the value in each
update request.
client_connection_config (google.cloud.alloydb_v1alpha.types.Instance.ClientConnectionConfig):
Optional. Client connection specific
configurations
satisfies_pzs (bool):
Reserved for future use.
"""
Expand Down Expand Up @@ -1369,6 +1374,29 @@ class Mode(proto.Enum):
enum="Instance.UpdatePolicy.Mode",
)

class ClientConnectionConfig(proto.Message):
r"""Client connection configuration

Attributes:
require_connectors (bool):
Optional. Configuration to enforce connectors
only (ex: AuthProxy) connections to the
database.
ssl_config (google.cloud.alloydb_v1alpha.types.SslConfig):
Optional. SSL config option for this
instance.
"""

require_connectors: bool = proto.Field(
proto.BOOL,
number=1,
)
ssl_config: "SslConfig" = proto.Field(
proto.MESSAGE,
number=2,
message="SslConfig",
)

name: str = proto.Field(
proto.STRING,
number=1,
Expand Down Expand Up @@ -1472,6 +1500,11 @@ class Mode(proto.Enum):
number=22,
message=UpdatePolicy,
)
client_connection_config: ClientConnectionConfig = proto.Field(
proto.MESSAGE,
number=23,
message=ClientConnectionConfig,
)
satisfies_pzs: bool = proto.Field(
proto.BOOL,
number=24,
Expand All @@ -1488,9 +1521,10 @@ class ConnectionInfo(proto.Message):
projects/{project}/locations/{location}/clusters/\ */instances/*/connectionInfo
This field currently has no semantic meaning.
ip_address (str):
Output only. The IP address for the Instance.
This is the connection endpoint for an end-user
application.
Output only. The private network IP address for the
Instance. This is the default IP for the instance and is
always created (even if enable_public_ip is set). This is
the connection endpoint for an end-user application.
pem_certificate_chain (MutableSequence[str]):
Output only. The pem-encoded chain that may
be used to verify the X.509 certificate.
Expand Down Expand Up @@ -1604,6 +1638,11 @@ class Backup(proto.Message):
collected.
satisfies_pzs (bool):
Reserved for future use.
database_version (google.cloud.alloydb_v1alpha.types.DatabaseVersion):
Output only. The database engine major
version of the cluster this backup was created
from. Any restored cluster created from this
backup will have the same database version.
"""

class State(proto.Enum):
Expand Down Expand Up @@ -1780,6 +1819,11 @@ class QuantityBasedExpiry(proto.Message):
proto.BOOL,
number=21,
)
database_version: "DatabaseVersion" = proto.Field(
proto.ENUM,
number=22,
enum="DatabaseVersion",
)


class SupportedDatabaseFlag(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.3.1" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-alloydb",
"version": "0.3.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-alloydb",
"version": "0.3.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-alloydb",
"version": "0.3.1"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5750,6 +5750,7 @@ def test_get_backup(request_type, transport: str = "grpc"):
etag="etag_value",
size_bytes=1089,
satisfies_pzs=True,
database_version=resources.DatabaseVersion.POSTGRES_13,
)
response = client.get_backup(request)

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


def test_get_backup_empty_call():
Expand Down Expand Up @@ -5820,6 +5822,7 @@ async def test_get_backup_async(
etag="etag_value",
size_bytes=1089,
satisfies_pzs=True,
database_version=resources.DatabaseVersion.POSTGRES_13,
)
)
response = await client.get_backup(request)
Expand All @@ -5843,6 +5846,7 @@ async def test_get_backup_async(
assert response.etag == "etag_value"
assert response.size_bytes == 1089
assert response.satisfies_pzs is True
assert response.database_version == resources.DatabaseVersion.POSTGRES_13


@pytest.mark.asyncio
Expand Down Expand Up @@ -12445,6 +12449,10 @@ def test_create_instance_rest(request_type):
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
}
request = request_type(**request_init)
Expand Down Expand Up @@ -12688,6 +12696,10 @@ def test_create_instance_rest_bad_request(
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
}
request = request_type(**request_init)
Expand Down Expand Up @@ -12819,6 +12831,10 @@ def test_create_secondary_instance_rest(request_type):
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
}
request = request_type(**request_init)
Expand Down Expand Up @@ -13064,6 +13080,10 @@ def test_create_secondary_instance_rest_bad_request(
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
}
request = request_type(**request_init)
Expand Down Expand Up @@ -13200,6 +13220,10 @@ def test_batch_create_instances_rest(request_type):
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
},
"request_id": "request_id_value",
Expand Down Expand Up @@ -13429,6 +13453,10 @@ def test_batch_create_instances_rest_bad_request(
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
},
"request_id": "request_id_value",
Expand Down Expand Up @@ -13508,6 +13536,10 @@ def test_update_instance_rest(request_type):
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
}
request = request_type(**request_init)
Expand Down Expand Up @@ -13733,6 +13765,10 @@ def test_update_instance_rest_bad_request(
"etag": "etag_value",
"annotations": {},
"update_policy": {"mode": 1},
"client_connection_config": {
"require_connectors": True,
"ssl_config": {"ssl_mode": 1, "ca_source": 1},
},
"satisfies_pzs": True,
}
request = request_type(**request_init)
Expand Down Expand Up @@ -15287,6 +15323,7 @@ def test_get_backup_rest(request_type):
etag="etag_value",
size_bytes=1089,
satisfies_pzs=True,
database_version=resources.DatabaseVersion.POSTGRES_13,
)

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


def test_get_backup_rest_required_fields(request_type=service.GetBackupRequest):
Expand Down Expand Up @@ -15578,6 +15616,7 @@ def test_create_backup_rest(request_type):
"expiry_time": {},
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
"satisfies_pzs": True,
"database_version": 1,
}
request = request_type(**request_init)

Expand Down Expand Up @@ -15810,6 +15849,7 @@ def test_create_backup_rest_bad_request(
"expiry_time": {},
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
"satisfies_pzs": True,
"database_version": 1,
}
request = request_type(**request_init)

Expand Down Expand Up @@ -15932,6 +15972,7 @@ def test_update_backup_rest(request_type):
"expiry_time": {},
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
"satisfies_pzs": True,
"database_version": 1,
}
request = request_type(**request_init)

Expand Down Expand Up @@ -16144,6 +16185,7 @@ def test_update_backup_rest_bad_request(
"expiry_time": {},
"expiry_quantity": {"retention_count": 1632, "total_retention_count": 2275},
"satisfies_pzs": True,
"database_version": 1,
}
request = request_type(**request_init)

Expand Down
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