Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit c92d273

Browse files
docs: Add documentation for enums (#165)
* docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: googleapis/googleapis@a391fd1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ffdd99a commit c92d273

File tree

3 files changed

+218
-11
lines changed

3 files changed

+218
-11
lines changed

google/cloud/clouddms_v1/services/data_migration_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ def sample_delete_connection_profile():
24052405
# Done; return the response.
24062406
return response
24072407

2408-
def __enter__(self):
2408+
def __enter__(self) -> "DataMigrationServiceClient":
24092409
return self
24102410

24112411
def __exit__(self, type, value, traceback):

google/cloud/clouddms_v1/types/clouddms_resources.py

Lines changed: 216 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,33 @@
4545

4646

4747
class DatabaseEngine(proto.Enum):
48-
r"""The database engine types."""
48+
r"""The database engine types.
49+
50+
Values:
51+
DATABASE_ENGINE_UNSPECIFIED (0):
52+
The source database engine of the migration
53+
job is unknown.
54+
MYSQL (1):
55+
The source engine is MySQL.
56+
POSTGRESQL (2):
57+
The source engine is PostgreSQL.
58+
"""
4959
DATABASE_ENGINE_UNSPECIFIED = 0
5060
MYSQL = 1
5161
POSTGRESQL = 2
5262

5363

5464
class DatabaseProvider(proto.Enum):
55-
r"""The database providers."""
65+
r"""The database providers.
66+
67+
Values:
68+
DATABASE_PROVIDER_UNSPECIFIED (0):
69+
The database provider is unknown.
70+
CLOUDSQL (1):
71+
CloudSQL runs the database.
72+
RDS (2):
73+
RDS runs the database.
74+
"""
5675
DATABASE_PROVIDER_UNSPECIFIED = 0
5776
CLOUDSQL = 1
5877
RDS = 2
@@ -84,7 +103,17 @@ class SslConfig(proto.Message):
84103
"""
85104

86105
class SslType(proto.Enum):
87-
r"""Specifies The kind of ssl configuration used."""
106+
r"""Specifies The kind of ssl configuration used.
107+
108+
Values:
109+
SSL_TYPE_UNSPECIFIED (0):
110+
Unspecified.
111+
SERVER_ONLY (1):
112+
Only 'ca_certificate' specified.
113+
SERVER_CLIENT (2):
114+
Both server ('ca_certificate'), and client ('client_key',
115+
'client_certificate') specified.
116+
"""
88117
SSL_TYPE_UNSPECIFIED = 0
89118
SERVER_ONLY = 1
90119
SERVER_CLIENT = 2
@@ -450,19 +479,58 @@ class CloudSqlSettings(proto.Message):
450479
"""
451480

452481
class SqlActivationPolicy(proto.Enum):
453-
r"""Specifies when the instance should be activated."""
482+
r"""Specifies when the instance should be activated.
483+
484+
Values:
485+
SQL_ACTIVATION_POLICY_UNSPECIFIED (0):
486+
unspecified policy.
487+
ALWAYS (1):
488+
The instance is always up and running.
489+
NEVER (2):
490+
The instance should never spin up.
491+
"""
454492
SQL_ACTIVATION_POLICY_UNSPECIFIED = 0
455493
ALWAYS = 1
456494
NEVER = 2
457495

458496
class SqlDataDiskType(proto.Enum):
459-
r"""The storage options for Cloud SQL databases."""
497+
r"""The storage options for Cloud SQL databases.
498+
499+
Values:
500+
SQL_DATA_DISK_TYPE_UNSPECIFIED (0):
501+
Unspecified.
502+
PD_SSD (1):
503+
SSD disk.
504+
PD_HDD (2):
505+
HDD disk.
506+
"""
460507
SQL_DATA_DISK_TYPE_UNSPECIFIED = 0
461508
PD_SSD = 1
462509
PD_HDD = 2
463510

464511
class SqlDatabaseVersion(proto.Enum):
465-
r"""The database engine type and version."""
512+
r"""The database engine type and version.
513+
514+
Values:
515+
SQL_DATABASE_VERSION_UNSPECIFIED (0):
516+
Unspecified version.
517+
MYSQL_5_6 (1):
518+
MySQL 5.6.
519+
MYSQL_5_7 (2):
520+
MySQL 5.7.
521+
POSTGRES_9_6 (3):
522+
PostgreSQL 9.6.
523+
POSTGRES_11 (4):
524+
PostgreSQL 11.
525+
POSTGRES_10 (5):
526+
PostgreSQL 10.
527+
MYSQL_8_0 (6):
528+
MySQL 8.0.
529+
POSTGRES_12 (7):
530+
PostgreSQL 12.
531+
POSTGRES_13 (8):
532+
PostgreSQL 13.
533+
"""
466534
SQL_DATABASE_VERSION_UNSPECIFIED = 0
467535
MYSQL_5_6 = 1
468536
MYSQL_5_7 = 2
@@ -722,7 +790,43 @@ class MigrationJob(proto.Message):
722790
"""
723791

724792
class State(proto.Enum):
725-
r"""The current migration job states."""
793+
r"""The current migration job states.
794+
795+
Values:
796+
STATE_UNSPECIFIED (0):
797+
The state of the migration job is unknown.
798+
MAINTENANCE (1):
799+
The migration job is down for maintenance.
800+
DRAFT (2):
801+
The migration job is in draft mode and no
802+
resources are created.
803+
CREATING (3):
804+
The migration job is being created.
805+
NOT_STARTED (4):
806+
The migration job is created and not started.
807+
RUNNING (5):
808+
The migration job is running.
809+
FAILED (6):
810+
The migration job failed.
811+
COMPLETED (7):
812+
The migration job has been completed.
813+
DELETING (8):
814+
The migration job is being deleted.
815+
STOPPING (9):
816+
The migration job is being stopped.
817+
STOPPED (10):
818+
The migration job is currently stopped.
819+
DELETED (11):
820+
The migration job has been deleted.
821+
UPDATING (12):
822+
The migration job is being updated.
823+
STARTING (13):
824+
The migration job is starting.
825+
RESTARTING (14):
826+
The migration job is restarting.
827+
RESUMING (15):
828+
The migration job is resuming.
829+
"""
726830
STATE_UNSPECIFIED = 0
727831
MAINTENANCE = 1
728832
DRAFT = 2
@@ -741,7 +845,25 @@ class State(proto.Enum):
741845
RESUMING = 15
742846

743847
class Phase(proto.Enum):
744-
r"""The current migration job phase."""
848+
r"""The current migration job phase.
849+
850+
Values:
851+
PHASE_UNSPECIFIED (0):
852+
The phase of the migration job is unknown.
853+
FULL_DUMP (1):
854+
The migration job is in the full dump phase.
855+
CDC (2):
856+
The migration job is CDC phase.
857+
PROMOTE_IN_PROGRESS (3):
858+
The migration job is running the promote
859+
phase.
860+
WAITING_FOR_SOURCE_WRITES_TO_STOP (4):
861+
Only RDS flow - waiting for source writes to
862+
stop
863+
PREPARING_THE_DUMP (5):
864+
Only RDS flow - the sources writes stopped,
865+
waiting for dump to begin
866+
"""
745867
PHASE_UNSPECIFIED = 0
746868
FULL_DUMP = 1
747869
CDC = 2
@@ -750,7 +872,16 @@ class Phase(proto.Enum):
750872
PREPARING_THE_DUMP = 5
751873

752874
class Type(proto.Enum):
753-
r"""The type of migration job (one-time or continuous)."""
875+
r"""The type of migration job (one-time or continuous).
876+
877+
Values:
878+
TYPE_UNSPECIFIED (0):
879+
The type of the migration job is unknown.
880+
ONE_TIME (1):
881+
The migration job is a one time migration.
882+
CONTINUOUS (2):
883+
The migration job is a continuous migration.
884+
"""
754885
TYPE_UNSPECIFIED = 0
755886
ONE_TIME = 1
756887
CONTINUOUS = 2
@@ -910,6 +1041,27 @@ class ConnectionProfile(proto.Message):
9101041
class State(proto.Enum):
9111042
r"""The current connection profile state (e.g. DRAFT, READY, or
9121043
FAILED).
1044+
1045+
Values:
1046+
STATE_UNSPECIFIED (0):
1047+
The state of the connection profile is
1048+
unknown.
1049+
DRAFT (1):
1050+
The connection profile is in draft mode and
1051+
fully editable.
1052+
CREATING (2):
1053+
The connection profile is being created.
1054+
READY (3):
1055+
The connection profile is ready.
1056+
UPDATING (4):
1057+
The connection profile is being updated.
1058+
DELETING (5):
1059+
The connection profile is being deleted.
1060+
DELETED (6):
1061+
The connection profile has been deleted.
1062+
FAILED (7):
1063+
The last action on the connection profile
1064+
failed.
9131065
"""
9141066
STATE_UNSPECIFIED = 0
9151067
DRAFT = 1
@@ -996,6 +1148,61 @@ class MigrationJobVerificationError(proto.Message):
9961148
class ErrorCode(proto.Enum):
9971149
r"""A general error code describing the type of error that
9981150
occurred.
1151+
1152+
Values:
1153+
ERROR_CODE_UNSPECIFIED (0):
1154+
An unknown error occurred
1155+
CONNECTION_FAILURE (1):
1156+
We failed to connect to one of the connection
1157+
profile.
1158+
AUTHENTICATION_FAILURE (2):
1159+
We failed to authenticate to one of the
1160+
connection profile.
1161+
INVALID_CONNECTION_PROFILE_CONFIG (3):
1162+
One of the involved connection profiles has
1163+
an invalid configuration.
1164+
VERSION_INCOMPATIBILITY (4):
1165+
The versions of the source and the
1166+
destination are incompatible.
1167+
CONNECTION_PROFILE_TYPES_INCOMPATIBILITY (5):
1168+
The types of the source and the destination
1169+
are incompatible.
1170+
NO_PGLOGICAL_INSTALLED (7):
1171+
No pglogical extension installed on
1172+
databases, applicable for postgres.
1173+
PGLOGICAL_NODE_ALREADY_EXISTS (8):
1174+
pglogical node already exists on databases,
1175+
applicable for postgres.
1176+
INVALID_WAL_LEVEL (9):
1177+
The value of parameter wal_level is not set to logical.
1178+
INVALID_SHARED_PRELOAD_LIBRARY (10):
1179+
The value of parameter shared_preload_libraries does not
1180+
include pglogical.
1181+
INSUFFICIENT_MAX_REPLICATION_SLOTS (11):
1182+
The value of parameter max_replication_slots is not
1183+
sufficient.
1184+
INSUFFICIENT_MAX_WAL_SENDERS (12):
1185+
The value of parameter max_wal_senders is not sufficient.
1186+
INSUFFICIENT_MAX_WORKER_PROCESSES (13):
1187+
The value of parameter max_worker_processes is not
1188+
sufficient.
1189+
UNSUPPORTED_EXTENSIONS (14):
1190+
Extensions installed are either not supported
1191+
or having unsupported versions.
1192+
UNSUPPORTED_MIGRATION_TYPE (15):
1193+
Unsupported migration type.
1194+
INVALID_RDS_LOGICAL_REPLICATION (16):
1195+
Invalid RDS logical replication.
1196+
UNSUPPORTED_GTID_MODE (17):
1197+
The gtid_mode is not supported, applicable for MySQL.
1198+
UNSUPPORTED_TABLE_DEFINITION (18):
1199+
The table definition is not support due to
1200+
missing primary key or replica identity.
1201+
UNSUPPORTED_DEFINER (19):
1202+
The definer is not supported.
1203+
CANT_RESTART_RUNNING_MIGRATION (21):
1204+
Migration is already running at the time of
1205+
restart request.
9991206
"""
10001207
ERROR_CODE_UNSPECIFIED = 0
10011208
CONNECTION_FAILURE = 1

samples/generated_samples/snippet_metadata_google.cloud.clouddms.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-dms",
11-
"version": "1.6.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)