1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.clouddms.logging.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/protobuf/duration.proto"; 21import "google/protobuf/timestamp.proto"; 22import "google/rpc/status.proto"; 23 24option csharp_namespace = "Google.Cloud.CloudDms.Logging.V1"; 25option go_package = "cloud.google.com/go/clouddms/logging/apiv1/loggingpb;loggingpb"; 26option java_multiple_files = true; 27option java_outer_classname = "ClouddmsPlatformLogsProto"; 28option java_package = "com.google.cloud.clouddms.logging.v1"; 29option php_namespace = "Google\\Cloud\\CloudDms\\Logging\\V1"; 30option ruby_package = "Google::Cloud::CloudDMS::Logging::V1"; 31 32// The database engines. 33enum DatabaseEngine { 34 // The source database engine of the migration job is unknown. 35 DATABASE_ENGINE_UNSPECIFIED = 0; 36 37 // The source engine is MySQL. 38 MYSQL = 1; 39 40 // The source engine is PostgreSQL. 41 POSTGRESQL = 2; 42 43 // The source engine is SQL Server. 44 SQLSERVER = 3; 45 46 // The source engine is Oracle (for heterogeneous migrations). 47 ORACLE = 4; 48 49 // The engine is Spanner (for heterogeneous migrations). 50 SPANNER = 5; 51} 52 53// The database providers. 54enum DatabaseProvider { 55 // The database provider is unknown. 56 DATABASE_PROVIDER_UNSPECIFIED = 0; 57 58 // CloudSQL runs the database. 59 CLOUDSQL = 1; 60 61 // RDS runs the database. 62 RDS = 2; 63 64 // Amazon Aurora. 65 AURORA = 3; 66 67 // AlloyDB. 68 ALLOYDB = 4; 69} 70 71// A message defining the database engine and provider. 72message DatabaseType { 73 // The database provider. 74 DatabaseProvider provider = 1; 75 76 // The database engine. 77 DatabaseEngine engine = 2; 78} 79 80// Migration job as stored in Cloud Logging logs. 81// NEXT_TAG = 36. 82message LoggedMigrationJob { 83 // The migration job states enum. 84 enum State { 85 // The state of the migration job is unknown. 86 STATE_UNSPECIFIED = 0; 87 88 // The migration job is down for maintenance. 89 MAINTENANCE = 1; 90 91 // The migration job is in draft mode and fully editable. 92 DRAFT = 2; 93 94 // The migration job is being created. 95 CREATING = 3; 96 97 // The migration job is created and not started. 98 NOT_STARTED = 4; 99 100 // The migration job is running 101 RUNNING = 5; 102 103 // The migration job failed. 104 FAILED = 6; 105 106 // The migration job has been completed. 107 COMPLETED = 7; 108 109 // The migration job is being deleted. 110 DELETING = 8; 111 112 // The migration job is being stopped. 113 STOPPING = 9; 114 115 // The migration job is currently stopped. 116 STOPPED = 10; 117 118 // The migration job has been deleted. 119 DELETED = 11; 120 121 // The migration job is being updated. 122 UPDATING = 12; 123 124 // The migration job is starting. 125 STARTING = 13; 126 127 // The migration job is restarting. 128 RESTARTING = 14; 129 130 // The migration job is resuming. 131 RESUMING = 15; 132 } 133 134 // The migration job phases enum. 135 enum Phase { 136 // The phase of the migration job is unknown. 137 PHASE_UNSPECIFIED = 0; 138 139 // The migration job is in the full dump phase. 140 FULL_DUMP = 1; 141 142 // The migration job is CDC phase. 143 CDC = 2; 144 145 // The migration job is running the promote phase. 146 PROMOTE_IN_PROGRESS = 3; 147 148 // Only RDS flow - waiting for source writes to stop 149 WAITING_FOR_SOURCE_WRITES_TO_STOP = 4; 150 151 // Only RDS flow - the sources writes stopped, waiting for dump to begin 152 PREPARING_THE_DUMP = 5; 153 } 154 155 // The migration job types. 156 enum Type { 157 // The type of the migration job is unknown. 158 TYPE_UNSPECIFIED = 0; 159 160 // The migration job is a one time migration. 161 ONE_TIME = 1; 162 163 // The migration job is a continuous migration. 164 CONTINUOUS = 2; 165 } 166 167 // Type of connectivity to source database. 168 enum ConnectivityType { 169 // No data defined. 170 CONNECTIVITY_TYPE_UNSPECIFIED = 0; 171 172 // Connect using static IO 173 STATIC_IP = 1; 174 175 // Use reverse SSH connectivity. 176 REVERSE_SSH = 2; 177 178 // Use VPC Peering connectivity. 179 VPC_PEERING = 3; 180 } 181 182 // Required. The unique identifier for a migration job. 183 string name = 1 [(google.api.field_behavior) = REQUIRED]; 184 185 // Required. Labels. 186 map<string, string> labels = 2 [(google.api.field_behavior) = REQUIRED]; 187 188 // Required. The display name. 189 string display_name = 3 [(google.api.field_behavior) = REQUIRED]; 190 191 // Required. The current migration job state. 192 State state = 4 [(google.api.field_behavior) = REQUIRED]; 193 194 // Required. The current migration job phase. 195 Phase phase = 5 [(google.api.field_behavior) = REQUIRED]; 196 197 // Required. The migration job type. 198 Type type = 6 [(google.api.field_behavior) = REQUIRED]; 199 200 // Optional. An optional dump path (gs://[BUCKET_NAME]/[OBJECT_NAME]). 201 string dump_path = 7 [(google.api.field_behavior) = OPTIONAL]; 202 203 // Required. The migration job source connection profile name. 204 string source = 8 [(google.api.field_behavior) = REQUIRED]; 205 206 // Required. The migration job destination connection profile name. 207 string destination = 9 [(google.api.field_behavior) = REQUIRED]; 208 209 // Required. the migration job duration in seconds. 210 google.protobuf.Duration duration = 10 [(google.api.field_behavior) = REQUIRED]; 211 212 // Required. Type of connectivity to source database. 213 ConnectivityType connectivity_type = 11 [(google.api.field_behavior) = REQUIRED]; 214 215 // Required. The error details in case of state FAILED. 216 google.rpc.Status error = 12 [(google.api.field_behavior) = REQUIRED]; 217 218 // Required. The time when this migration job was completed. Should only be set when the 219 // phase of the migration job is COMPLETED. 220 google.protobuf.Timestamp end_time = 13 [(google.api.field_behavior) = REQUIRED]; 221 222 // Required. The indicative source database. 223 DatabaseType source_database = 14 [(google.api.field_behavior) = REQUIRED]; 224 225 // Required. The indicative destination database. 226 DatabaseType destination_database = 15 [(google.api.field_behavior) = REQUIRED]; 227} 228 229// An MySQL database connection profile. 230message MySqlConnectionProfile { 231 // The MySQL database version. 232 enum Version { 233 // Unspecified version. 234 VERSION_UNSPECIFIED = 0; 235 236 // MySQL 5.5. 237 V5_5 = 1; 238 239 // MySQL 5.6. 240 V5_6 = 2; 241 242 // MySQL 5.7. 243 V5_7 = 3; 244 245 // MySQL 8.0. 246 V8_0 = 4; 247 } 248 249 // The database version. 250 Version version = 1; 251 252 // The Cloud SQL id for a Cloud SQL instance. 253 string cloud_sql_id = 2; 254} 255 256// An PostgreSQL connection profile. 257message PostgreSqlConnectionProfile { 258 // The PostgreSQL database version. 259 enum Version { 260 // Unspecified version. 261 VERSION_UNSPECIFIED = 0; 262 263 // PostgreSQL 9.6. 264 V9_6 = 1; 265 266 // PostgreSQL 11. 267 V11 = 2; 268 269 // PostgreSQL 10. 270 V10 = 3; 271 272 // PostgreSQL 12. 273 V12 = 4; 274 275 // PostgreSQL 13. 276 V13 = 5; 277 } 278 279 // The database version. 280 Version version = 1; 281 282 // The Cloud SQL id for a Cloud SQL instance. 283 string cloud_sql_id = 2; 284} 285 286// A CloudSQL connection profile. 287message CloudSqlConnectionProfile { 288 // The Cloud SQL id. 289 string cloud_sql_id = 1; 290} 291 292// An Oracle connection profile. 293message OracleConnectionProfile { 294 // Connectivity options used to establish a connection to the profile. 295 enum ConnectivityType { 296 // No data defined. 297 CONNECTIVITY_TYPE_UNSPECIFIED = 0; 298 299 // Static Service IP connectivity. 300 STATIC_SERVICE_IP = 1; 301 302 // Forward SSH tunnel connectivity. 303 FORWARD_SSH_TUNNEL = 2; 304 305 // Private connectivity. 306 PRIVATE_CONNECTIVITY = 3; 307 } 308 309 // Required. Type of connectivity to source database. 310 ConnectivityType connectivity_type = 1 [(google.api.field_behavior) = REQUIRED]; 311} 312 313// An producer connection profile definition. 314// NEXT_TAG = 8. 315message LoggedConnectionProfile { 316 // The connection profile states enum. 317 enum State { 318 // The state of the connection profile is unknown. 319 STATE_UNSPECIFIED = 0; 320 321 // The connection profile is in draft mode and fully editable. 322 DRAFT = 1; 323 324 // The connection profile is being created. 325 CREATING = 2; 326 327 // The connection profile is ready. 328 READY = 3; 329 330 // The connection profile is being updated. 331 UPDATING = 4; 332 333 // The connection profile is being deleted. 334 DELETING = 5; 335 336 // The connection profile has been deleted. 337 DELETED = 6; 338 339 // The last action on the connection profile failed. 340 FAILED = 7; 341 } 342 343 // The unique identifier for a connection profile. 344 string name = 1; 345 346 // Labels. 347 map<string, string> labels = 2; 348 349 // The current connection profile state. 350 State state = 3; 351 352 // The display name. 353 string display_name = 4; 354 355 // The connection profile definition 356 oneof connection_profile { 357 // A MySQL database connection profile. 358 MySqlConnectionProfile mysql = 100; 359 360 // A PostgreSQL database connection profile. 361 PostgreSqlConnectionProfile postgresql = 101; 362 363 // A CloudSQL database connection profile. 364 CloudSqlConnectionProfile cloudsql = 102; 365 366 // An Oracle database connection profile. 367 OracleConnectionProfile oracle = 103; 368 } 369 370 // The error details in case of state FAILED. 371 google.rpc.Status error = 5; 372 373 // The database provider. 374 DatabaseProvider provider = 6; 375} 376 377// Log definition for Migration Job event 378message MigrationJobEventLog { 379 // The migration job resource 380 LoggedMigrationJob migration_job = 1; 381 382 // Timestamp of the event 383 google.protobuf.Timestamp occurrence_timestamp = 2; 384 385 // Event code 386 int32 code = 3; 387 388 // Event message 389 string text_message = 4; 390 391 // Original event data 392 oneof original_cause { 393 // Original event code 394 int32 original_code = 200; 395 396 // Original event message 397 string original_message = 201; 398 } 399} 400 401// Log definition for Connection Profile event 402message ConnectionProfileEventLog { 403 // The connection profilr resource 404 LoggedConnectionProfile connection_profile = 1; 405 406 // Timestamp of the event 407 google.protobuf.Timestamp occurrence_timestamp = 2; 408 409 // Event code 410 int32 code = 3; 411 412 // Event message 413 string text_message = 4; 414 415 // Original event data 416 oneof original_cause { 417 // Original event code 418 int32 original_code = 200; 419 420 // Original event message 421 string original_message = 201; 422 } 423} 424 425// The PrivateConnection resource is used to establish private connectivity 426// with the customer's network. 427message LoggedPrivateConnection { 428 // Private Connection state. 429 enum State { 430 // Unspecified state. 431 STATE_UNSPECIFIED = 0; 432 433 // The private connection is in creation state - creating resources. 434 CREATING = 1; 435 436 // The private connection has been created with all of its resources. 437 CREATED = 2; 438 439 // The private connection creation has failed. 440 FAILED = 3; 441 442 // The private connection is being deleted. 443 DELETING = 4; 444 445 // Delete request has failed, resource is in invalid state. 446 FAILED_TO_DELETE = 5; 447 448 // The private connection has been deleted. 449 DELETED = 6; 450 } 451 452 // The resource's name. 453 string name = 1; 454 455 // Labels. 456 map<string, string> labels = 2; 457 458 // Display name. 459 string display_name = 3; 460 461 // The state of the Private Connection. 462 State state = 4; 463 464 // The error details in case of state FAILED. 465 google.rpc.Status error = 5; 466 467 // VPC Peering Config. 468 VpcPeeringConfig vpc_peering_config = 100; 469} 470 471// The VPC Peering configuration is used to create VPC peering between 472// the data plane and the consumer's VPC. 473message VpcPeeringConfig { 474 // Fully qualified name of the VPC DMS will peer to. 475 string vpc_name = 1; 476 477 // The subnet that will be peered to. (CIDR of /29). 478 string subnet = 2; 479} 480 481// Log definition for a Private Connection event. 482message PrivateConnectionEventLog { 483 // The private connection resource. 484 LoggedPrivateConnection private_connection = 1; 485 486 // Timestamp of the event. 487 google.protobuf.Timestamp occurrence_timestamp = 2; 488 489 // Event code. 490 int32 code = 3; 491 492 // Event message. 493 string text_message = 4; 494 495 // Original event data. 496 oneof original_cause { 497 // Original event code. 498 int32 original_code = 200; 499 500 // Original event message. 501 string original_message = 201; 502 } 503} 504