1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516
// This file is @generated by prost-build.
/// Provides details for errors and the corresponding resources.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceErrorDetail {
/// Required. Information about the resource where the error is located.
#[prost(message, optional, tag = "1")]
pub resource_info: ::core::option::Option<
super::super::super::super::rpc::ResourceInfo,
>,
/// Required. The error details for the resource.
#[prost(message, repeated, tag = "2")]
pub error_details: ::prost::alloc::vec::Vec<ErrorDetail>,
/// Required. How many errors there are in total for the resource. Truncation
/// can be indicated by having an `error_count` that is higher than the size of
/// `error_details`.
#[prost(int32, tag = "3")]
pub error_count: i32,
}
/// Provides details for errors, e.g. issues that where encountered when
/// processing a subtask.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorDetail {
/// Optional. The exact location within the resource (if applicable).
#[prost(message, optional, tag = "1")]
pub location: ::core::option::Option<ErrorLocation>,
/// Required. Describes the cause of the error with structured detail.
#[prost(message, optional, tag = "2")]
pub error_info: ::core::option::Option<super::super::super::super::rpc::ErrorInfo>,
}
/// Holds information about where the error is located.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ErrorLocation {
/// Optional. If applicable, denotes the line where the error occurred. A zero
/// value means that there is no line information.
#[prost(int32, tag = "1")]
pub line: i32,
/// Optional. If applicable, denotes the column where the error occurred. A
/// zero value means that there is no columns information.
#[prost(int32, tag = "2")]
pub column: i32,
}
/// The metrics object for a SubTask.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeries {
/// Required. The name of the metric.
///
/// If the metric is not known by the service yet, it will be auto-created.
#[prost(string, tag = "1")]
pub metric: ::prost::alloc::string::String,
/// Required. The value type of the time series.
#[prost(
enumeration = "super::super::super::super::api::metric_descriptor::ValueType",
tag = "2"
)]
pub value_type: i32,
/// Optional. The metric kind of the time series.
///
/// If present, it must be the same as the metric kind of the associated
/// metric. If the associated metric's descriptor must be auto-created, then
/// this field specifies the metric kind of the new descriptor and must be
/// either `GAUGE` (the default) or `CUMULATIVE`.
#[prost(
enumeration = "super::super::super::super::api::metric_descriptor::MetricKind",
tag = "3"
)]
pub metric_kind: i32,
/// Required. The data points of this time series. When listing time series,
/// points are returned in reverse time order.
///
/// When creating a time series, this field must contain exactly one point and
/// the point's type must be the same as the value type of the associated
/// metric. If the associated metric's descriptor must be auto-created, then
/// the value type of the descriptor is determined by the point's type, which
/// must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
#[prost(message, repeated, tag = "4")]
pub points: ::prost::alloc::vec::Vec<Point>,
}
/// A single data point in a time series.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Point {
/// The time interval to which the data point applies. For `GAUGE` metrics,
/// the start time does not need to be supplied, but if it is supplied, it must
/// equal the end time. For `DELTA` metrics, the start and end time should
/// specify a non-zero interval, with subsequent points specifying contiguous
/// and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end
/// time should specify a non-zero interval, with subsequent points specifying
/// the same start time and increasing end times, until an event resets the
/// cumulative value to zero and sets a new start time for the following
/// points.
#[prost(message, optional, tag = "1")]
pub interval: ::core::option::Option<TimeInterval>,
/// The value of the data point.
#[prost(message, optional, tag = "2")]
pub value: ::core::option::Option<TypedValue>,
}
/// A time interval extending just after a start time through an end time.
/// If the start time is the same as the end time, then the interval
/// represents a single point in time.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeInterval {
/// Optional. The beginning of the time interval. The default value
/// for the start time is the end time. The start time must not be
/// later than the end time.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Required. The end of the time interval.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// A single strongly-typed value.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TypedValue {
/// The typed value field.
#[prost(oneof = "typed_value::Value", tags = "1, 2, 3, 4, 5")]
pub value: ::core::option::Option<typed_value::Value>,
}
/// Nested message and enum types in `TypedValue`.
pub mod typed_value {
/// The typed value field.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
/// A Boolean value: `true` or `false`.
#[prost(bool, tag = "1")]
BoolValue(bool),
/// A 64-bit integer. Its range is approximately `+/-9.2x10^18`.
#[prost(int64, tag = "2")]
Int64Value(i64),
/// A 64-bit double-precision floating-point number. Its magnitude
/// is approximately `+/-10^(+/-300)` and it has 16 significant digits of
/// precision.
#[prost(double, tag = "3")]
DoubleValue(f64),
/// A variable-length string value.
#[prost(string, tag = "4")]
StringValue(::prost::alloc::string::String),
/// A distribution value.
#[prost(message, tag = "5")]
DistributionValue(super::super::super::super::super::api::Distribution),
}
}
/// A record in the aggregate CSV report for a migration workflow
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsReportLogMessage {
/// Severity of the translation record.
#[prost(string, tag = "1")]
pub severity: ::prost::alloc::string::String,
/// Category of the error/warning. Example: SyntaxError
#[prost(string, tag = "2")]
pub category: ::prost::alloc::string::String,
/// The file path in which the error occurred
#[prost(string, tag = "3")]
pub file_path: ::prost::alloc::string::String,
/// The file name in which the error occurred
#[prost(string, tag = "4")]
pub filename: ::prost::alloc::string::String,
/// Specifies the row from the source text where the error occurred (0 based,
/// -1 for messages without line location). Example: 2
#[prost(int32, tag = "5")]
pub source_script_line: i32,
/// Specifies the column from the source texts where the error occurred. (0
/// based, -1 for messages without column location) example: 6
#[prost(int32, tag = "6")]
pub source_script_column: i32,
/// Detailed message of the record.
#[prost(string, tag = "7")]
pub message: ::prost::alloc::string::String,
/// The script context (obfuscated) in which the error occurred
#[prost(string, tag = "8")]
pub script_context: ::prost::alloc::string::String,
/// Category of the error/warning. Example: SyntaxError
#[prost(string, tag = "9")]
pub action: ::prost::alloc::string::String,
/// Effect of the error/warning. Example: COMPATIBILITY
#[prost(string, tag = "10")]
pub effect: ::prost::alloc::string::String,
/// Name of the affected object in the log message.
#[prost(string, tag = "11")]
pub object_name: ::prost::alloc::string::String,
}
/// The translation config to capture necessary settings for a translation task
/// and subtask.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranslationConfigDetails {
/// The dialect of the input files.
#[prost(message, optional, tag = "3")]
pub source_dialect: ::core::option::Option<Dialect>,
/// The target dialect for the engine to translate the input to.
#[prost(message, optional, tag = "4")]
pub target_dialect: ::core::option::Option<Dialect>,
/// The default source environment values for the translation.
#[prost(message, optional, tag = "6")]
pub source_env: ::core::option::Option<SourceEnv>,
/// The indicator to show translation request initiator.
#[prost(string, tag = "8")]
pub request_source: ::prost::alloc::string::String,
/// The types of output to generate, e.g. sql, metadata etc. If not specified,
/// a default set of targets will be generated. Some additional target types
/// may be slower to generate. See the documentation for the set of available
/// target types.
#[prost(string, repeated, tag = "9")]
pub target_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The chosen path where the source for input files will be found.
#[prost(oneof = "translation_config_details::SourceLocation", tags = "1")]
pub source_location: ::core::option::Option<
translation_config_details::SourceLocation,
>,
/// The chosen path where the destination for output files will be found.
#[prost(oneof = "translation_config_details::TargetLocation", tags = "2")]
pub target_location: ::core::option::Option<
translation_config_details::TargetLocation,
>,
/// The mapping of full SQL object names from their current state to the
/// desired output.
#[prost(oneof = "translation_config_details::OutputNameMapping", tags = "5")]
pub output_name_mapping: ::core::option::Option<
translation_config_details::OutputNameMapping,
>,
}
/// Nested message and enum types in `TranslationConfigDetails`.
pub mod translation_config_details {
/// The chosen path where the source for input files will be found.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SourceLocation {
/// The Cloud Storage path for a directory of files to translate in a task.
#[prost(string, tag = "1")]
GcsSourcePath(::prost::alloc::string::String),
}
/// The chosen path where the destination for output files will be found.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TargetLocation {
/// The Cloud Storage path to write back the corresponding input files to.
#[prost(string, tag = "2")]
GcsTargetPath(::prost::alloc::string::String),
}
/// The mapping of full SQL object names from their current state to the
/// desired output.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum OutputNameMapping {
/// The mapping of objects to their desired output names in list form.
#[prost(message, tag = "5")]
NameMappingList(super::ObjectNameMappingList),
}
}
/// The possible dialect options for translation.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Dialect {
/// The possible dialect options that this message represents.
#[prost(
oneof = "dialect::DialectValue",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17"
)]
pub dialect_value: ::core::option::Option<dialect::DialectValue>,
}
/// Nested message and enum types in `Dialect`.
pub mod dialect {
/// The possible dialect options that this message represents.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum DialectValue {
/// The BigQuery dialect
#[prost(message, tag = "1")]
BigqueryDialect(super::BigQueryDialect),
/// The HiveQL dialect
#[prost(message, tag = "2")]
HiveqlDialect(super::HiveQlDialect),
/// The Redshift dialect
#[prost(message, tag = "3")]
RedshiftDialect(super::RedshiftDialect),
/// The Teradata dialect
#[prost(message, tag = "4")]
TeradataDialect(super::TeradataDialect),
/// The Oracle dialect
#[prost(message, tag = "5")]
OracleDialect(super::OracleDialect),
/// The SparkSQL dialect
#[prost(message, tag = "6")]
SparksqlDialect(super::SparkSqlDialect),
/// The Snowflake dialect
#[prost(message, tag = "7")]
SnowflakeDialect(super::SnowflakeDialect),
/// The Netezza dialect
#[prost(message, tag = "8")]
NetezzaDialect(super::NetezzaDialect),
/// The Azure Synapse dialect
#[prost(message, tag = "9")]
AzureSynapseDialect(super::AzureSynapseDialect),
/// The Vertica dialect
#[prost(message, tag = "10")]
VerticaDialect(super::VerticaDialect),
/// The SQL Server dialect
#[prost(message, tag = "11")]
SqlServerDialect(super::SqlServerDialect),
/// The Postgresql dialect
#[prost(message, tag = "12")]
PostgresqlDialect(super::PostgresqlDialect),
/// The Presto dialect
#[prost(message, tag = "13")]
PrestoDialect(super::PrestoDialect),
/// The MySQL dialect
#[prost(message, tag = "14")]
MysqlDialect(super::MySqlDialect),
/// DB2 dialect
#[prost(message, tag = "15")]
Db2Dialect(super::Db2Dialect),
/// SQLite dialect
#[prost(message, tag = "16")]
SqliteDialect(super::SqLiteDialect),
/// Greenplum dialect
#[prost(message, tag = "17")]
GreenplumDialect(super::GreenplumDialect),
}
}
/// The dialect definition for BigQuery.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BigQueryDialect {}
/// The dialect definition for HiveQL.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HiveQlDialect {}
/// The dialect definition for Redshift.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RedshiftDialect {}
/// The dialect definition for Teradata.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TeradataDialect {
/// Which Teradata sub-dialect mode the user specifies.
#[prost(enumeration = "teradata_dialect::Mode", tag = "1")]
pub mode: i32,
}
/// Nested message and enum types in `TeradataDialect`.
pub mod teradata_dialect {
/// The sub-dialect options for Teradata.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Mode {
/// Unspecified mode.
Unspecified = 0,
/// Teradata SQL mode.
Sql = 1,
/// BTEQ mode (which includes SQL).
Bteq = 2,
}
impl Mode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Mode::Unspecified => "MODE_UNSPECIFIED",
Mode::Sql => "SQL",
Mode::Bteq => "BTEQ",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODE_UNSPECIFIED" => Some(Self::Unspecified),
"SQL" => Some(Self::Sql),
"BTEQ" => Some(Self::Bteq),
_ => None,
}
}
}
}
/// The dialect definition for Oracle.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OracleDialect {}
/// The dialect definition for SparkSQL.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SparkSqlDialect {}
/// The dialect definition for Snowflake.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SnowflakeDialect {}
/// The dialect definition for Netezza.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NetezzaDialect {}
/// The dialect definition for Azure Synapse.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AzureSynapseDialect {}
/// The dialect definition for Vertica.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct VerticaDialect {}
/// The dialect definition for SQL Server.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqlServerDialect {}
/// The dialect definition for Postgresql.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PostgresqlDialect {}
/// The dialect definition for Presto.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PrestoDialect {}
/// The dialect definition for MySQL.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MySqlDialect {}
/// The dialect definition for DB2.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Db2Dialect {}
/// The dialect definition for SQLite.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SqLiteDialect {}
/// The dialect definition for Greenplum.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GreenplumDialect {}
/// Represents a map of name mappings using a list of key:value proto messages of
/// existing name to desired output name.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectNameMappingList {
/// The elements of the object name map.
#[prost(message, repeated, tag = "1")]
pub name_map: ::prost::alloc::vec::Vec<ObjectNameMapping>,
}
/// Represents a key-value pair of NameMappingKey to NameMappingValue to
/// represent the mapping of SQL names from the input value to desired output.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectNameMapping {
/// The name of the object in source that is being mapped.
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<NameMappingKey>,
/// The desired target name of the object that is being mapped.
#[prost(message, optional, tag = "2")]
pub target: ::core::option::Option<NameMappingValue>,
}
/// The potential components of a full name mapping that will be mapped
/// during translation in the source data warehouse.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameMappingKey {
/// The type of object that is being mapped.
#[prost(enumeration = "name_mapping_key::Type", tag = "1")]
pub r#type: i32,
/// The database name (BigQuery project ID equivalent in the source data
/// warehouse).
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
/// The schema name (BigQuery dataset equivalent in the source data warehouse).
#[prost(string, tag = "3")]
pub schema: ::prost::alloc::string::String,
/// The relation name (BigQuery table or view equivalent in the source data
/// warehouse).
#[prost(string, tag = "4")]
pub relation: ::prost::alloc::string::String,
/// The attribute name (BigQuery column equivalent in the source data
/// warehouse).
#[prost(string, tag = "5")]
pub attribute: ::prost::alloc::string::String,
}
/// Nested message and enum types in `NameMappingKey`.
pub mod name_mapping_key {
/// The type of the object that is being mapped.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Unspecified name mapping type.
Unspecified = 0,
/// The object being mapped is a database.
Database = 1,
/// The object being mapped is a schema.
Schema = 2,
/// The object being mapped is a relation.
Relation = 3,
/// The object being mapped is an attribute.
Attribute = 4,
/// The object being mapped is a relation alias.
RelationAlias = 5,
/// The object being mapped is a an attribute alias.
AttributeAlias = 6,
/// The object being mapped is a function.
Function = 7,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Database => "DATABASE",
Type::Schema => "SCHEMA",
Type::Relation => "RELATION",
Type::Attribute => "ATTRIBUTE",
Type::RelationAlias => "RELATION_ALIAS",
Type::AttributeAlias => "ATTRIBUTE_ALIAS",
Type::Function => "FUNCTION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DATABASE" => Some(Self::Database),
"SCHEMA" => Some(Self::Schema),
"RELATION" => Some(Self::Relation),
"ATTRIBUTE" => Some(Self::Attribute),
"RELATION_ALIAS" => Some(Self::RelationAlias),
"ATTRIBUTE_ALIAS" => Some(Self::AttributeAlias),
"FUNCTION" => Some(Self::Function),
_ => None,
}
}
}
}
/// The potential components of a full name mapping that will be mapped
/// during translation in the target data warehouse.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameMappingValue {
/// The database name (BigQuery project ID equivalent in the target data
/// warehouse).
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// The schema name (BigQuery dataset equivalent in the target data warehouse).
#[prost(string, tag = "2")]
pub schema: ::prost::alloc::string::String,
/// The relation name (BigQuery table or view equivalent in the target data
/// warehouse).
#[prost(string, tag = "3")]
pub relation: ::prost::alloc::string::String,
/// The attribute name (BigQuery column equivalent in the target data
/// warehouse).
#[prost(string, tag = "4")]
pub attribute: ::prost::alloc::string::String,
}
/// Represents the default source environment values for the translation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceEnv {
/// The default database name to fully qualify SQL objects when their database
/// name is missing.
#[prost(string, tag = "1")]
pub default_database: ::prost::alloc::string::String,
/// The schema search path. When SQL objects are missing schema name,
/// translation engine will search through this list to find the value.
#[prost(string, repeated, tag = "2")]
pub schema_search_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Expects a valid BigQuery dataset ID that exists, e.g.,
/// project-123.metadata_store_123. If specified, translation will search and
/// read the required schema information from a metadata store in this dataset.
/// If metadata store doesn't exist, translation will parse the metadata file
/// and upload the schema info to a temp table in the dataset to speed up
/// future translation jobs.
#[prost(string, tag = "3")]
pub metadata_store_dataset: ::prost::alloc::string::String,
}
/// The translation details to capture the necessary settings for a translation
/// job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranslationDetails {
/// The mapping from source to target SQL.
#[prost(message, repeated, tag = "1")]
pub source_target_mapping: ::prost::alloc::vec::Vec<SourceTargetMapping>,
/// The base URI for all writes to persistent storage.
#[prost(string, tag = "2")]
pub target_base_uri: ::prost::alloc::string::String,
/// The default source environment values for the translation.
#[prost(message, optional, tag = "3")]
pub source_environment: ::core::option::Option<SourceEnvironment>,
/// The list of literal targets that will be directly returned to the response.
/// Each entry consists of the constructed path, EXCLUDING the base path. Not
/// providing a target_base_uri will prevent writing to persistent storage.
#[prost(string, repeated, tag = "4")]
pub target_return_literals: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The types of output to generate, e.g. sql, metadata,
/// lineage_from_sql_scripts, etc. If not specified, a default set of
/// targets will be generated. Some additional target types may be slower to
/// generate. See the documentation for the set of available target types.
#[prost(string, repeated, tag = "5")]
pub target_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Represents one mapping from a source SQL to a target SQL.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceTargetMapping {
/// The source SQL or the path to it.
#[prost(message, optional, tag = "1")]
pub source_spec: ::core::option::Option<SourceSpec>,
/// The target SQL or the path for it.
#[prost(message, optional, tag = "2")]
pub target_spec: ::core::option::Option<TargetSpec>,
}
/// Represents one path to the location that holds source data.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceSpec {
/// Optional. The optional field to specify the encoding of the sql bytes.
#[prost(string, tag = "3")]
pub encoding: ::prost::alloc::string::String,
/// The specific source SQL.
#[prost(oneof = "source_spec::Source", tags = "1, 2")]
pub source: ::core::option::Option<source_spec::Source>,
}
/// Nested message and enum types in `SourceSpec`.
pub mod source_spec {
/// The specific source SQL.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
/// The base URI for all files to be read in as sources for translation.
#[prost(string, tag = "1")]
BaseUri(::prost::alloc::string::String),
/// Source literal.
#[prost(message, tag = "2")]
Literal(super::Literal),
}
}
/// Represents one path to the location that holds target data.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetSpec {
/// The relative path for the target data. Given source file
/// `base_uri/input/sql`, the output would be
/// `target_base_uri/sql/relative_path/input.sql`.
#[prost(string, tag = "1")]
pub relative_path: ::prost::alloc::string::String,
}
/// Literal data.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Literal {
/// Required. The identifier of the literal entry.
#[prost(string, tag = "1")]
pub relative_path: ::prost::alloc::string::String,
/// The literal SQL contents.
#[prost(oneof = "literal::LiteralData", tags = "2, 3")]
pub literal_data: ::core::option::Option<literal::LiteralData>,
}
/// Nested message and enum types in `Literal`.
pub mod literal {
/// The literal SQL contents.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum LiteralData {
/// Literal string data.
#[prost(string, tag = "2")]
LiteralString(::prost::alloc::string::String),
/// Literal byte data.
#[prost(bytes, tag = "3")]
LiteralBytes(::prost::bytes::Bytes),
}
}
/// Represents the default source environment values for the translation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceEnvironment {
/// The default database name to fully qualify SQL objects when their database
/// name is missing.
#[prost(string, tag = "1")]
pub default_database: ::prost::alloc::string::String,
/// The schema search path. When SQL objects are missing schema name,
/// translation engine will search through this list to find the value.
#[prost(string, repeated, tag = "2")]
pub schema_search_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Optional. Expects a validQ BigQuery dataset ID that exists, e.g.,
/// project-123.metadata_store_123. If specified, translation will search and
/// read the required schema information from a metadata store in this dataset.
/// If metadata store doesn't exist, translation will parse the metadata file
/// and upload the schema info to a temp table in the dataset to speed up
/// future translation jobs.
#[prost(string, tag = "3")]
pub metadata_store_dataset: ::prost::alloc::string::String,
}
/// A migration workflow which specifies what needs to be done for an EDW
/// migration.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationWorkflow {
/// Output only. Immutable. Identifier. The unique identifier for the migration
/// workflow. The ID is server-generated.
///
/// Example: `projects/123/locations/us/workflows/345`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The display name of the workflow. This can be set to give a workflow
/// a descriptive name. There is no guarantee or enforcement of uniqueness.
#[prost(string, tag = "6")]
pub display_name: ::prost::alloc::string::String,
/// The tasks in a workflow in a named map. The name (i.e. key) has no
/// meaning and is merely a convenient way to address a specific task
/// in a workflow.
#[prost(btree_map = "string, message", tag = "2")]
pub tasks: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
MigrationTask,
>,
/// Output only. That status of the workflow.
#[prost(enumeration = "migration_workflow::State", tag = "3")]
pub state: i32,
/// Time when the workflow was created.
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Time when the workflow was last updated.
#[prost(message, optional, tag = "5")]
pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `MigrationWorkflow`.
pub mod migration_workflow {
/// Possible migration workflow states.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Workflow state is unspecified.
Unspecified = 0,
/// Workflow is in draft status, i.e. tasks are not yet eligible for
/// execution.
Draft = 1,
/// Workflow is running (i.e. tasks are eligible for execution).
Running = 2,
/// Workflow is paused. Tasks currently in progress may continue, but no
/// further tasks will be scheduled.
Paused = 3,
/// Workflow is complete. There should not be any task in a non-terminal
/// state, but if they are (e.g. forced termination), they will not be
/// scheduled.
Completed = 4,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Draft => "DRAFT",
State::Running => "RUNNING",
State::Paused => "PAUSED",
State::Completed => "COMPLETED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DRAFT" => Some(Self::Draft),
"RUNNING" => Some(Self::Running),
"PAUSED" => Some(Self::Paused),
"COMPLETED" => Some(Self::Completed),
_ => None,
}
}
}
}
/// A single task for a migration which has details about the configuration of
/// the task.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationTask {
/// Output only. Immutable. The unique identifier for the migration task. The
/// ID is server-generated.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The type of the task. This must be one of the supported task types:
/// Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ,
/// Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ,
/// Translation_Snowflake2BQ, Translation_Netezza2BQ,
/// Translation_AzureSynapse2BQ, Translation_Vertica2BQ,
/// Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ,
/// Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ.
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
/// Output only. The current state of the task.
#[prost(enumeration = "migration_task::State", tag = "4")]
pub state: i32,
/// Output only. An explanation that may be populated when the task is in
/// FAILED state.
#[prost(message, optional, tag = "5")]
pub processing_error: ::core::option::Option<
super::super::super::super::rpc::ErrorInfo,
>,
/// Time when the task was created.
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Time when the task was last updated.
#[prost(message, optional, tag = "7")]
pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. Provides details to errors and issues encountered while
/// processing the task. Presence of error details does not mean that the task
/// failed.
#[prost(message, repeated, tag = "17")]
pub resource_error_details: ::prost::alloc::vec::Vec<ResourceErrorDetail>,
/// The number or resources with errors. Note: This is not the total
/// number of errors as each resource can have more than one error.
/// This is used to indicate truncation by having a `resource_error_count`
/// that is higher than the size of `resource_error_details`.
#[prost(int32, tag = "18")]
pub resource_error_count: i32,
/// The metrics for the task.
#[prost(message, repeated, tag = "19")]
pub metrics: ::prost::alloc::vec::Vec<TimeSeries>,
/// Output only. The result of the task.
#[prost(message, optional, tag = "20")]
pub task_result: ::core::option::Option<MigrationTaskResult>,
/// Count of all the processing errors in this task and its subtasks.
#[prost(int32, tag = "21")]
pub total_processing_error_count: i32,
/// Count of all the resource errors in this task and its subtasks.
#[prost(int32, tag = "22")]
pub total_resource_error_count: i32,
/// The details of the task.
#[prost(oneof = "migration_task::TaskDetails", tags = "14, 16")]
pub task_details: ::core::option::Option<migration_task::TaskDetails>,
}
/// Nested message and enum types in `MigrationTask`.
pub mod migration_task {
/// Possible states of a migration task.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The state is unspecified.
Unspecified = 0,
/// The task is waiting for orchestration.
Pending = 1,
/// The task is assigned to an orchestrator.
Orchestrating = 2,
/// The task is running, i.e. its subtasks are ready for execution.
Running = 3,
/// Tha task is paused. Assigned subtasks can continue, but no new subtasks
/// will be scheduled.
Paused = 4,
/// The task finished successfully.
Succeeded = 5,
/// The task finished unsuccessfully.
Failed = 6,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Pending => "PENDING",
State::Orchestrating => "ORCHESTRATING",
State::Running => "RUNNING",
State::Paused => "PAUSED",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"ORCHESTRATING" => Some(Self::Orchestrating),
"RUNNING" => Some(Self::Running),
"PAUSED" => Some(Self::Paused),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
/// The details of the task.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TaskDetails {
/// Task configuration for CW Batch/Offline SQL Translation.
#[prost(message, tag = "14")]
TranslationConfigDetails(super::TranslationConfigDetails),
/// Task details for unified SQL Translation.
#[prost(message, tag = "16")]
TranslationDetails(super::TranslationDetails),
}
}
/// A subtask for a migration which carries details about the configuration of
/// the subtask. The content of the details should not matter to the end user,
/// but is a contract between the subtask creator and subtask worker.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationSubtask {
/// Output only. Immutable. The resource name for the migration subtask. The ID
/// is server-generated.
///
/// Example: `projects/123/locations/us/workflows/345/subtasks/678`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The unique ID of the task to which this subtask belongs.
#[prost(string, tag = "2")]
pub task_id: ::prost::alloc::string::String,
/// The type of the Subtask. The migration service does not check whether this
/// is a known type. It is up to the task creator (i.e. orchestrator or worker)
/// to ensure it only creates subtasks for which there are compatible workers
/// polling for Subtasks.
#[prost(string, tag = "3")]
pub r#type: ::prost::alloc::string::String,
/// Output only. The current state of the subtask.
#[prost(enumeration = "migration_subtask::State", tag = "5")]
pub state: i32,
/// Output only. An explanation that may be populated when the task is in
/// FAILED state.
#[prost(message, optional, tag = "6")]
pub processing_error: ::core::option::Option<
super::super::super::super::rpc::ErrorInfo,
>,
/// Output only. Provides details to errors and issues encountered while
/// processing the subtask. Presence of error details does not mean that the
/// subtask failed.
#[prost(message, repeated, tag = "12")]
pub resource_error_details: ::prost::alloc::vec::Vec<ResourceErrorDetail>,
/// The number or resources with errors. Note: This is not the total
/// number of errors as each resource can have more than one error.
/// This is used to indicate truncation by having a `resource_error_count`
/// that is higher than the size of `resource_error_details`.
#[prost(int32, tag = "13")]
pub resource_error_count: i32,
/// Time when the subtask was created.
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Time when the subtask was last updated.
#[prost(message, optional, tag = "8")]
pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
/// The metrics for the subtask.
#[prost(message, repeated, tag = "11")]
pub metrics: ::prost::alloc::vec::Vec<TimeSeries>,
}
/// Nested message and enum types in `MigrationSubtask`.
pub mod migration_subtask {
/// Possible states of a migration subtask.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// The state is unspecified.
Unspecified = 0,
/// The subtask is ready, i.e. it is ready for execution.
Active = 1,
/// The subtask is running, i.e. it is assigned to a worker for execution.
Running = 2,
/// The subtask finished successfully.
Succeeded = 3,
/// The subtask finished unsuccessfully.
Failed = 4,
/// The subtask is paused, i.e., it will not be scheduled. If it was already
/// assigned,it might still finish but no new lease renewals will be granted.
Paused = 5,
/// The subtask is pending a dependency. It will be scheduled once its
/// dependencies are done.
PendingDependency = 6,
}
impl State {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Active => "ACTIVE",
State::Running => "RUNNING",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
State::Paused => "PAUSED",
State::PendingDependency => "PENDING_DEPENDENCY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ACTIVE" => Some(Self::Active),
"RUNNING" => Some(Self::Running),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
"PAUSED" => Some(Self::Paused),
"PENDING_DEPENDENCY" => Some(Self::PendingDependency),
_ => None,
}
}
}
}
/// The migration task result.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationTaskResult {
/// Details specific to the task type.
#[prost(oneof = "migration_task_result::Details", tags = "2")]
pub details: ::core::option::Option<migration_task_result::Details>,
}
/// Nested message and enum types in `MigrationTaskResult`.
pub mod migration_task_result {
/// Details specific to the task type.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
/// Details specific to translation task types.
#[prost(message, tag = "2")]
TranslationTaskResult(super::TranslationTaskResult),
}
}
/// Translation specific result details from the migration task.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranslationTaskResult {
/// The list of the translated literals.
#[prost(message, repeated, tag = "1")]
pub translated_literals: ::prost::alloc::vec::Vec<Literal>,
/// The records from the aggregate CSV report for a migration workflow.
#[prost(message, repeated, tag = "2")]
pub report_log_messages: ::prost::alloc::vec::Vec<GcsReportLogMessage>,
}
/// Request to create a migration workflow resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMigrationWorkflowRequest {
/// Required. The name of the project to which this migration workflow belongs.
/// Example: `projects/foo/locations/bar`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Required. The migration workflow to create.
#[prost(message, optional, tag = "2")]
pub migration_workflow: ::core::option::Option<MigrationWorkflow>,
}
/// A request to get a previously created migration workflow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMigrationWorkflowRequest {
/// Required. The unique identifier for the migration workflow.
/// Example: `projects/123/locations/us/workflows/1234`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// The list of fields to be retrieved.
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// A request to list previously created migration workflows.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationWorkflowsRequest {
/// Required. The project and location of the migration workflows to list.
/// Example: `projects/123/locations/us`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// The list of fields to be retrieved.
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
/// The maximum number of migration workflows to return. The service may return
/// fewer than this number.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// A page token, received from previous `ListMigrationWorkflows` call.
/// Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListMigrationWorkflows`
/// must match the call that provided the page token.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
/// Response object for a `ListMigrationWorkflows` call.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationWorkflowsResponse {
/// The migration workflows for the specified project / location.
#[prost(message, repeated, tag = "1")]
pub migration_workflows: ::prost::alloc::vec::Vec<MigrationWorkflow>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// A request to delete a previously created migration workflow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMigrationWorkflowRequest {
/// Required. The unique identifier for the migration workflow.
/// Example: `projects/123/locations/us/workflows/1234`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// A request to start a previously created migration workflow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMigrationWorkflowRequest {
/// Required. The unique identifier for the migration workflow.
/// Example: `projects/123/locations/us/workflows/1234`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// A request to get a previously created migration subtasks.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMigrationSubtaskRequest {
/// Required. The unique identifier for the migration subtask.
/// Example: `projects/123/locations/us/workflows/1234/subtasks/543`
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Optional. The list of fields to be retrieved.
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// A request to list previously created migration subtasks.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationSubtasksRequest {
/// Required. The migration task of the subtasks to list.
/// Example: `projects/123/locations/us/workflows/1234`
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
/// Optional. The list of fields to be retrieved.
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Optional. The maximum number of migration tasks to return. The service may
/// return fewer than this number.
#[prost(int32, tag = "3")]
pub page_size: i32,
/// Optional. A page token, received from previous `ListMigrationSubtasks`
/// call. Provide this to retrieve the subsequent page.
///
/// When paginating, all other parameters provided to `ListMigrationSubtasks`
/// must match the call that provided the page token.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
/// Optional. The filter to apply. This can be used to get the subtasks of a
/// specific tasks in a workflow, e.g. `migration_task = "ab012"` where
/// `"ab012"` is the task ID (not the name in the named map).
#[prost(string, tag = "5")]
pub filter: ::prost::alloc::string::String,
}
/// Response object for a `ListMigrationSubtasks` call.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationSubtasksResponse {
/// The migration subtasks for the specified task.
#[prost(message, repeated, tag = "1")]
pub migration_subtasks: ::prost::alloc::vec::Vec<MigrationSubtask>,
/// A token, which can be sent as `page_token` to retrieve the next page.
/// If this field is omitted, there are no subsequent pages.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod migration_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// Service to handle EDW migrations.
#[derive(Debug, Clone)]
pub struct MigrationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MigrationServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MigrationServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
MigrationServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Creates a migration workflow.
pub async fn create_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::CreateMigrationWorkflowRequest>,
) -> std::result::Result<
tonic::Response<super::MigrationWorkflow>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/CreateMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"CreateMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a previously created migration workflow.
pub async fn get_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::GetMigrationWorkflowRequest>,
) -> std::result::Result<
tonic::Response<super::MigrationWorkflow>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/GetMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"GetMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists previously created migration workflow.
pub async fn list_migration_workflows(
&mut self,
request: impl tonic::IntoRequest<super::ListMigrationWorkflowsRequest>,
) -> std::result::Result<
tonic::Response<super::ListMigrationWorkflowsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationWorkflows",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"ListMigrationWorkflows",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a migration workflow by name.
pub async fn delete_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::DeleteMigrationWorkflowRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/DeleteMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"DeleteMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
/// Starts a previously created migration workflow. I.e., the state transitions
/// from DRAFT to RUNNING. This is a no-op if the state is already RUNNING.
/// An error will be signaled if the state is anything other than DRAFT or
/// RUNNING.
pub async fn start_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::StartMigrationWorkflowRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/StartMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"StartMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a previously created migration subtask.
pub async fn get_migration_subtask(
&mut self,
request: impl tonic::IntoRequest<super::GetMigrationSubtaskRequest>,
) -> std::result::Result<
tonic::Response<super::MigrationSubtask>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/GetMigrationSubtask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"GetMigrationSubtask",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists previously created migration subtasks.
pub async fn list_migration_subtasks(
&mut self,
request: impl tonic::IntoRequest<super::ListMigrationSubtasksRequest>,
) -> std::result::Result<
tonic::Response<super::ListMigrationSubtasksResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationSubtasks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"ListMigrationSubtasks",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Details about a record.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranslationReportRecord {
/// Severity of the translation record.
#[prost(enumeration = "translation_report_record::Severity", tag = "1")]
pub severity: i32,
/// Specifies the row from the source text where the error occurred (0 based).
/// Example: 2
#[prost(int32, tag = "2")]
pub script_line: i32,
/// Specifies the column from the source texts where the error occurred. (0
/// based) example: 6
#[prost(int32, tag = "3")]
pub script_column: i32,
/// Category of the error/warning. Example: SyntaxError
#[prost(string, tag = "4")]
pub category: ::prost::alloc::string::String,
/// Detailed message of the record.
#[prost(string, tag = "5")]
pub message: ::prost::alloc::string::String,
}
/// Nested message and enum types in `TranslationReportRecord`.
pub mod translation_report_record {
/// The severity type of the record.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Severity {
/// SeverityType not specified.
Unspecified = 0,
/// INFO type.
Info = 1,
/// WARNING type. The translated query may still provide useful information
/// if all the report records are WARNING.
Warning = 2,
/// ERROR type. Translation failed.
Error = 3,
}
impl Severity {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Severity::Unspecified => "SEVERITY_UNSPECIFIED",
Severity::Info => "INFO",
Severity::Warning => "WARNING",
Severity::Error => "ERROR",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"INFO" => Some(Self::Info),
"WARNING" => Some(Self::Warning),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
}