google_cloudevents/google/events/cloud/datastream/v1/mod.rs
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
// This file is @generated by prost-build.
/// Oracle database profile.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleProfile {
/// Required. Hostname for the Oracle connection.
#[prost(string, tag = "1")]
pub hostname: ::prost::alloc::string::String,
/// Port for the Oracle connection, default value is 1521.
#[prost(int32, tag = "2")]
pub port: i32,
/// Required. Username for the Oracle connection.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// Required. Database for the Oracle connection.
#[prost(string, tag = "5")]
pub database_service: ::prost::alloc::string::String,
/// Connection string attributes
#[prost(map = "string, string", tag = "6")]
pub connection_attributes: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// MySQL database profile.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MysqlProfile {
/// Required. Hostname for the MySQL connection.
#[prost(string, tag = "1")]
pub hostname: ::prost::alloc::string::String,
/// Port for the MySQL connection, default value is 3306.
#[prost(int32, tag = "2")]
pub port: i32,
/// Required. Username for the MySQL connection.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// SSL configuration for the MySQL connection.
#[prost(message, optional, tag = "5")]
pub ssl_config: ::core::option::Option<MysqlSslConfig>,
}
/// PostgreSQL database profile.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlProfile {
/// Required. Hostname for the PostgreSQL connection.
#[prost(string, tag = "1")]
pub hostname: ::prost::alloc::string::String,
/// Port for the PostgreSQL connection, default value is 5432.
#[prost(int32, tag = "2")]
pub port: i32,
/// Required. Username for the PostgreSQL connection.
#[prost(string, tag = "3")]
pub username: ::prost::alloc::string::String,
/// Required. Database for the PostgreSQL connection.
#[prost(string, tag = "5")]
pub database: ::prost::alloc::string::String,
}
/// Cloud Storage bucket profile.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsProfile {
/// Required. The Cloud Storage bucket name.
#[prost(string, tag = "1")]
pub bucket: ::prost::alloc::string::String,
/// The root path inside the Cloud Storage bucket.
#[prost(string, tag = "2")]
pub root_path: ::prost::alloc::string::String,
}
/// BigQuery warehouse profile.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BigQueryProfile {}
/// Static IP address connectivity.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StaticServiceIpConnectivity {}
/// Forward SSH Tunnel connectivity.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ForwardSshTunnelConnectivity {
/// Required. Hostname for the SSH tunnel.
#[prost(string, tag = "1")]
pub hostname: ::prost::alloc::string::String,
/// Required. Username for the SSH tunnel.
#[prost(string, tag = "2")]
pub username: ::prost::alloc::string::String,
/// Port for the SSH tunnel, default value is 22.
#[prost(int32, tag = "3")]
pub port: i32,
}
/// The VPC Peering configuration is used to create VPC peering between
/// Datastream and the consumer's VPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VpcPeeringConfig {
/// Required. Fully qualified name of the VPC that Datastream will peer to.
/// Format: `projects/{project}/global/{networks}/{name}`
#[prost(string, tag = "1")]
pub vpc: ::prost::alloc::string::String,
/// Required. A free subnet for peering. (CIDR of /29)
#[prost(string, tag = "2")]
pub subnet: ::prost::alloc::string::String,
}
/// The PrivateConnection resource is used to establish private connectivity
/// between Datastream and a customer's network.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnection {
/// Output only. The resource's name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The create time of the resource.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The update time of the resource.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Required. Display name.
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
/// Output only. The state of the Private Connection.
#[prost(enumeration = "private_connection::State", tag = "6")]
pub state: i32,
/// Output only. In case of error, the details of the error in a user-friendly format.
#[prost(message, optional, tag = "7")]
pub error: ::core::option::Option<Error>,
/// VPC Peering Config.
#[prost(message, optional, tag = "100")]
pub vpc_peering_config: ::core::option::Option<VpcPeeringConfig>,
}
/// Nested message and enum types in `PrivateConnection`.
pub mod private_connection {
/// Private Connection state.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unspecified state.
Unspecified = 0,
/// The private connection is in creation state - creating resources.
Creating = 1,
/// The private connection has been created with all of its resources.
Created = 2,
/// The private connection creation has failed.
Failed = 3,
/// The private connection is being deleted.
Deleting = 4,
/// Delete request has failed, resource is in invalid state.
FailedToDelete = 5,
}
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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::Creating => "CREATING",
Self::Created => "CREATED",
Self::Failed => "FAILED",
Self::Deleting => "DELETING",
Self::FailedToDelete => "FAILED_TO_DELETE",
}
}
/// 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),
"CREATING" => Some(Self::Creating),
"CREATED" => Some(Self::Created),
"FAILED" => Some(Self::Failed),
"DELETING" => Some(Self::Deleting),
"FAILED_TO_DELETE" => Some(Self::FailedToDelete),
_ => None,
}
}
}
}
/// Private Connectivity
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnectivity {
/// Required. A reference to a private connection resource.
/// Format: `projects/{project}/locations/{location}/privateConnections/{name}`
#[prost(string, tag = "1")]
pub private_connection: ::prost::alloc::string::String,
}
/// The route resource is the child of the private connection resource,
/// used for defining a route for a private connection.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Route {
/// Output only. The resource's name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The create time of the resource.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The update time of the resource.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Required. Display name.
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
/// Required. Destination address for connection
#[prost(string, tag = "6")]
pub destination_address: ::prost::alloc::string::String,
/// Destination port for connection
#[prost(int32, tag = "7")]
pub destination_port: i32,
}
/// MySQL SSL configuration information.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MysqlSslConfig {
/// Output only. Indicates whether the client_key field is set.
#[prost(bool, tag = "2")]
pub client_key_set: bool,
/// Output only. Indicates whether the client_certificate field is set.
#[prost(bool, tag = "4")]
pub client_certificate_set: bool,
/// Output only. Indicates whether the ca_certificate field is set.
#[prost(bool, tag = "6")]
pub ca_certificate_set: bool,
}
/// A set of reusable connection configurations to be used as a source or
/// destination for a stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionProfile {
/// Output only. The resource's name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The create time of the resource.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The update time of the resource.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Required. Display name.
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
/// Connection configuration for the ConnectionProfile.
#[prost(oneof = "connection_profile::Profile", tags = "100, 101, 102, 103, 104")]
pub profile: ::core::option::Option<connection_profile::Profile>,
/// Connectivity options used to establish a connection to the profile.
#[prost(oneof = "connection_profile::Connectivity", tags = "200, 201, 202")]
pub connectivity: ::core::option::Option<connection_profile::Connectivity>,
}
/// Nested message and enum types in `ConnectionProfile`.
pub mod connection_profile {
/// Connection configuration for the ConnectionProfile.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Profile {
/// Oracle ConnectionProfile configuration.
#[prost(message, tag = "100")]
OracleProfile(super::OracleProfile),
/// Cloud Storage ConnectionProfile configuration.
#[prost(message, tag = "101")]
GcsProfile(super::GcsProfile),
/// MySQL ConnectionProfile configuration.
#[prost(message, tag = "102")]
MysqlProfile(super::MysqlProfile),
/// BigQuery Connection Profile configuration.
#[prost(message, tag = "103")]
BigqueryProfile(super::BigQueryProfile),
/// PostgreSQL Connection Profile configuration.
#[prost(message, tag = "104")]
PostgresqlProfile(super::PostgresqlProfile),
}
/// Connectivity options used to establish a connection to the profile.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Connectivity {
/// Static Service IP connectivity.
#[prost(message, tag = "200")]
StaticServiceIpConnectivity(super::StaticServiceIpConnectivity),
/// Forward SSH tunnel connectivity.
#[prost(message, tag = "201")]
ForwardSshConnectivity(super::ForwardSshTunnelConnectivity),
/// Private connectivity.
#[prost(message, tag = "202")]
PrivateConnectivity(super::PrivateConnectivity),
}
}
/// Oracle Column.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleColumn {
/// Column name.
#[prost(string, tag = "1")]
pub column: ::prost::alloc::string::String,
/// The Oracle data type.
#[prost(string, tag = "2")]
pub data_type: ::prost::alloc::string::String,
/// Column length.
#[prost(int32, tag = "3")]
pub length: i32,
/// Column precision.
#[prost(int32, tag = "4")]
pub precision: i32,
/// Column scale.
#[prost(int32, tag = "5")]
pub scale: i32,
/// Column encoding.
#[prost(string, tag = "6")]
pub encoding: ::prost::alloc::string::String,
/// Whether or not the column represents a primary key.
#[prost(bool, tag = "7")]
pub primary_key: bool,
/// Whether or not the column can accept a null value.
#[prost(bool, tag = "8")]
pub nullable: bool,
/// The ordinal position of the column in the table.
#[prost(int32, tag = "9")]
pub ordinal_position: i32,
}
/// Oracle table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleTable {
/// Table name.
#[prost(string, tag = "1")]
pub table: ::prost::alloc::string::String,
/// Oracle columns in the schema.
/// When unspecified as part of include/exclude objects, includes/excludes
/// everything.
#[prost(message, repeated, tag = "2")]
pub oracle_columns: ::prost::alloc::vec::Vec<OracleColumn>,
}
/// Oracle schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleSchema {
/// Schema name.
#[prost(string, tag = "1")]
pub schema: ::prost::alloc::string::String,
/// Tables in the schema.
#[prost(message, repeated, tag = "2")]
pub oracle_tables: ::prost::alloc::vec::Vec<OracleTable>,
}
/// Oracle database structure.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleRdbms {
/// Oracle schemas/databases in the database server.
#[prost(message, repeated, tag = "1")]
pub oracle_schemas: ::prost::alloc::vec::Vec<OracleSchema>,
}
/// Oracle data source configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleSourceConfig {
/// Oracle objects to include in the stream.
#[prost(message, optional, tag = "1")]
pub include_objects: ::core::option::Option<OracleRdbms>,
/// Oracle objects to exclude from the stream.
#[prost(message, optional, tag = "2")]
pub exclude_objects: ::core::option::Option<OracleRdbms>,
/// Maximum number of concurrent CDC tasks. The number should be non negative.
/// If not set (or set to 0), the system's default value will be used.
#[prost(int32, tag = "3")]
pub max_concurrent_cdc_tasks: i32,
/// The configuration for handle Oracle large objects.
#[prost(oneof = "oracle_source_config::LargeObjectsHandling", tags = "100, 102")]
pub large_objects_handling: ::core::option::Option<
oracle_source_config::LargeObjectsHandling,
>,
}
/// Nested message and enum types in `OracleSourceConfig`.
pub mod oracle_source_config {
/// Configuration to drop large object values.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DropLargeObjects {}
/// Configuration to stream large object values.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StreamLargeObjects {}
/// The configuration for handle Oracle large objects.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum LargeObjectsHandling {
/// Drop large object values.
#[prost(message, tag = "100")]
DropLargeObjects(DropLargeObjects),
/// Stream large object values. NOTE: This feature is currently experimental.
#[prost(message, tag = "102")]
StreamLargeObjects(StreamLargeObjects),
}
}
/// PostgreSQL Column.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlColumn {
/// Column name.
#[prost(string, tag = "1")]
pub column: ::prost::alloc::string::String,
/// The PostgreSQL data type.
#[prost(string, tag = "2")]
pub data_type: ::prost::alloc::string::String,
/// Column length.
#[prost(int32, tag = "3")]
pub length: i32,
/// Column precision.
#[prost(int32, tag = "4")]
pub precision: i32,
/// Column scale.
#[prost(int32, tag = "5")]
pub scale: i32,
/// Whether or not the column represents a primary key.
#[prost(bool, tag = "7")]
pub primary_key: bool,
/// Whether or not the column can accept a null value.
#[prost(bool, tag = "8")]
pub nullable: bool,
/// The ordinal position of the column in the table.
#[prost(int32, tag = "9")]
pub ordinal_position: i32,
}
/// PostgreSQL table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlTable {
/// Table name.
#[prost(string, tag = "1")]
pub table: ::prost::alloc::string::String,
/// PostgreSQL columns in the schema.
/// When unspecified as part of include/exclude objects,
/// includes/excludes everything.
#[prost(message, repeated, tag = "2")]
pub postgresql_columns: ::prost::alloc::vec::Vec<PostgresqlColumn>,
}
/// PostgreSQL schema.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlSchema {
/// Schema name.
#[prost(string, tag = "1")]
pub schema: ::prost::alloc::string::String,
/// Tables in the schema.
#[prost(message, repeated, tag = "2")]
pub postgresql_tables: ::prost::alloc::vec::Vec<PostgresqlTable>,
}
/// PostgreSQL database structure.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlRdbms {
/// PostgreSQL schemas in the database server.
#[prost(message, repeated, tag = "1")]
pub postgresql_schemas: ::prost::alloc::vec::Vec<PostgresqlSchema>,
}
/// PostgreSQL data source configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlSourceConfig {
/// PostgreSQL objects to include in the stream.
#[prost(message, optional, tag = "1")]
pub include_objects: ::core::option::Option<PostgresqlRdbms>,
/// PostgreSQL objects to exclude from the stream.
#[prost(message, optional, tag = "2")]
pub exclude_objects: ::core::option::Option<PostgresqlRdbms>,
/// Required. Immutable. The name of the logical replication slot that's configured with the
/// pgoutput plugin.
#[prost(string, tag = "3")]
pub replication_slot: ::prost::alloc::string::String,
/// Required. The name of the publication that includes the set of all tables that are
/// defined in the stream's include_objects.
#[prost(string, tag = "4")]
pub publication: ::prost::alloc::string::String,
}
/// MySQL Column.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MysqlColumn {
/// Column name.
#[prost(string, tag = "1")]
pub column: ::prost::alloc::string::String,
/// The MySQL data type. Full data types list can be found here:
/// <https://dev.mysql.com/doc/refman/8.0/en/data-types.html>
#[prost(string, tag = "2")]
pub data_type: ::prost::alloc::string::String,
/// Column length.
#[prost(int32, tag = "3")]
pub length: i32,
/// Column collation.
#[prost(string, tag = "4")]
pub collation: ::prost::alloc::string::String,
/// Whether or not the column represents a primary key.
#[prost(bool, tag = "5")]
pub primary_key: bool,
/// Whether or not the column can accept a null value.
#[prost(bool, tag = "6")]
pub nullable: bool,
/// The ordinal position of the column in the table.
#[prost(int32, tag = "7")]
pub ordinal_position: i32,
}
/// MySQL table.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MysqlTable {
/// Table name.
#[prost(string, tag = "1")]
pub table: ::prost::alloc::string::String,
/// MySQL columns in the database.
/// When unspecified as part of include/exclude objects, includes/excludes
/// everything.
#[prost(message, repeated, tag = "2")]
pub mysql_columns: ::prost::alloc::vec::Vec<MysqlColumn>,
}
/// MySQL database.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MysqlDatabase {
/// Database name.
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
/// Tables in the database.
#[prost(message, repeated, tag = "2")]
pub mysql_tables: ::prost::alloc::vec::Vec<MysqlTable>,
}
/// MySQL database structure
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MysqlRdbms {
/// Mysql databases on the server
#[prost(message, repeated, tag = "1")]
pub mysql_databases: ::prost::alloc::vec::Vec<MysqlDatabase>,
}
/// MySQL source configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MysqlSourceConfig {
/// MySQL objects to retrieve from the source.
#[prost(message, optional, tag = "1")]
pub include_objects: ::core::option::Option<MysqlRdbms>,
/// MySQL objects to exclude from the stream.
#[prost(message, optional, tag = "2")]
pub exclude_objects: ::core::option::Option<MysqlRdbms>,
/// Maximum number of concurrent CDC tasks. The number should be non negative.
/// If not set (or set to 0), the system's default value will be used.
#[prost(int32, tag = "3")]
pub max_concurrent_cdc_tasks: i32,
}
/// The configuration of the stream source.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceConfig {
/// Required. Source connection profile resoource.
/// Format: `projects/{project}/locations/{location}/connectionProfiles/{name}`
#[prost(string, tag = "1")]
pub source_connection_profile: ::prost::alloc::string::String,
/// Stream configuration that is specific to the data source type.
#[prost(oneof = "source_config::SourceStreamConfig", tags = "100, 101, 102")]
pub source_stream_config: ::core::option::Option<source_config::SourceStreamConfig>,
}
/// Nested message and enum types in `SourceConfig`.
pub mod source_config {
/// Stream configuration that is specific to the data source type.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SourceStreamConfig {
/// Oracle data source configuration.
#[prost(message, tag = "100")]
OracleSourceConfig(super::OracleSourceConfig),
/// MySQL data source configuration.
#[prost(message, tag = "101")]
MysqlSourceConfig(super::MysqlSourceConfig),
/// PostgreSQL data source configuration.
#[prost(message, tag = "102")]
PostgresqlSourceConfig(super::PostgresqlSourceConfig),
}
}
/// AVRO file format configuration.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AvroFileFormat {}
/// JSON file format configuration.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct JsonFileFormat {
/// The schema file format along JSON data files.
#[prost(enumeration = "json_file_format::SchemaFileFormat", tag = "1")]
pub schema_file_format: i32,
/// Compression of the loaded JSON file.
#[prost(enumeration = "json_file_format::JsonCompression", tag = "2")]
pub compression: i32,
}
/// Nested message and enum types in `JsonFileFormat`.
pub mod json_file_format {
/// Schema file format.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SchemaFileFormat {
/// Unspecified schema file format.
Unspecified = 0,
/// Do not attach schema file.
NoSchemaFile = 1,
/// Avro schema format.
AvroSchemaFile = 2,
}
impl SchemaFileFormat {
/// 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 {
Self::Unspecified => "SCHEMA_FILE_FORMAT_UNSPECIFIED",
Self::NoSchemaFile => "NO_SCHEMA_FILE",
Self::AvroSchemaFile => "AVRO_SCHEMA_FILE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCHEMA_FILE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"NO_SCHEMA_FILE" => Some(Self::NoSchemaFile),
"AVRO_SCHEMA_FILE" => Some(Self::AvroSchemaFile),
_ => None,
}
}
}
/// Json file compression.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum JsonCompression {
/// Unspecified json file compression.
Unspecified = 0,
/// Do not compress JSON file.
NoCompression = 1,
/// Gzip compression.
Gzip = 2,
}
impl JsonCompression {
/// 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 {
Self::Unspecified => "JSON_COMPRESSION_UNSPECIFIED",
Self::NoCompression => "NO_COMPRESSION",
Self::Gzip => "GZIP",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JSON_COMPRESSION_UNSPECIFIED" => Some(Self::Unspecified),
"NO_COMPRESSION" => Some(Self::NoCompression),
"GZIP" => Some(Self::Gzip),
_ => None,
}
}
}
}
/// Google Cloud Storage destination configuration
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GcsDestinationConfig {
/// Path inside the Cloud Storage bucket to write data to.
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
/// The maximum file size to be saved in the bucket.
#[prost(int32, tag = "2")]
pub file_rotation_mb: i32,
/// The maximum duration for which new events are added before a file is
/// closed and a new file is created.
#[prost(message, optional, tag = "3")]
pub file_rotation_interval: ::core::option::Option<::prost_types::Duration>,
/// File Format that the data should be written in.
#[prost(oneof = "gcs_destination_config::FileFormat", tags = "100, 101")]
pub file_format: ::core::option::Option<gcs_destination_config::FileFormat>,
}
/// Nested message and enum types in `GcsDestinationConfig`.
pub mod gcs_destination_config {
/// File Format that the data should be written in.
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum FileFormat {
/// AVRO file format configuration.
#[prost(message, tag = "100")]
AvroFileFormat(super::AvroFileFormat),
/// JSON file format configuration.
#[prost(message, tag = "101")]
JsonFileFormat(super::JsonFileFormat),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryDestinationConfig {
/// The guaranteed data freshness (in seconds) when querying tables created by
/// the stream. Editing this field will only affect new tables created in the
/// future, but existing tables will not be impacted. Lower values mean that
/// queries will return fresher data, but may result in higher cost.
#[prost(message, optional, tag = "300")]
pub data_freshness: ::core::option::Option<::prost_types::Duration>,
/// Target dataset(s) configuration.
#[prost(oneof = "big_query_destination_config::DatasetConfig", tags = "201, 202")]
pub dataset_config: ::core::option::Option<
big_query_destination_config::DatasetConfig,
>,
}
/// Nested message and enum types in `BigQueryDestinationConfig`.
pub mod big_query_destination_config {
/// A single target dataset to which all data will be streamed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleTargetDataset {
/// The dataset ID of the target dataset.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
/// Destination datasets are created so that hierarchy of the destination data
/// objects matches the source hierarchy.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceHierarchyDatasets {
#[prost(message, optional, tag = "2")]
pub dataset_template: ::core::option::Option<
source_hierarchy_datasets::DatasetTemplate,
>,
}
/// Nested message and enum types in `SourceHierarchyDatasets`.
pub mod source_hierarchy_datasets {
/// Dataset template used for dynamic dataset creation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetTemplate {
/// Required. The geographic location where the dataset should reside. See
/// <https://cloud.google.com/bigquery/docs/locations> for supported
/// locations.
#[prost(string, tag = "1")]
pub location: ::prost::alloc::string::String,
/// If supplied, every created dataset will have its name prefixed by the
/// provided value. The prefix and name will be separated by an underscore.
/// i.e. <prefix>_<dataset_name>.
#[prost(string, tag = "2")]
pub dataset_id_prefix: ::prost::alloc::string::String,
/// Describes the Cloud KMS encryption key that will be used to
/// protect destination BigQuery table. The BigQuery Service Account
/// associated with your project requires access to this encryption key.
/// i.e.
/// projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{cryptoKey}.
/// See <https://cloud.google.com/bigquery/docs/customer-managed-encryption>
/// for more information.
#[prost(string, tag = "3")]
pub kms_key_name: ::prost::alloc::string::String,
}
}
/// Target dataset(s) configuration.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DatasetConfig {
/// Single destination dataset.
#[prost(message, tag = "201")]
SingleTargetDataset(SingleTargetDataset),
/// Source hierarchy datasets.
#[prost(message, tag = "202")]
SourceHierarchyDatasets(SourceHierarchyDatasets),
}
}
/// The configuration of the stream destination.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DestinationConfig {
/// Required. Destination connection profile resource.
/// Format: `projects/{project}/locations/{location}/connectionProfiles/{name}`
#[prost(string, tag = "1")]
pub destination_connection_profile: ::prost::alloc::string::String,
/// Stream configuration that is specific to the data destination type.
#[prost(oneof = "destination_config::DestinationStreamConfig", tags = "100, 101")]
pub destination_stream_config: ::core::option::Option<
destination_config::DestinationStreamConfig,
>,
}
/// Nested message and enum types in `DestinationConfig`.
pub mod destination_config {
/// Stream configuration that is specific to the data destination type.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DestinationStreamConfig {
/// A configuration for how data should be loaded to Cloud Storage.
#[prost(message, tag = "100")]
GcsDestinationConfig(super::GcsDestinationConfig),
/// BigQuery destination configuration.
#[prost(message, tag = "101")]
BigqueryDestinationConfig(super::BigQueryDestinationConfig),
}
}
/// A resource representing streaming data from a source to a destination.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Stream {
/// Output only. The stream's name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Output only. The creation time of the stream.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// Output only. The last update time of the stream.
#[prost(message, optional, tag = "3")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
/// Labels.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Required. Display name.
#[prost(string, tag = "5")]
pub display_name: ::prost::alloc::string::String,
/// Required. Source connection profile configuration.
#[prost(message, optional, tag = "6")]
pub source_config: ::core::option::Option<SourceConfig>,
/// Required. Destination connection profile configuration.
#[prost(message, optional, tag = "7")]
pub destination_config: ::core::option::Option<DestinationConfig>,
/// The state of the stream.
#[prost(enumeration = "stream::State", tag = "8")]
pub state: i32,
/// Output only. Errors on the Stream.
#[prost(message, repeated, tag = "9")]
pub errors: ::prost::alloc::vec::Vec<Error>,
/// Immutable. A reference to a KMS encryption key.
/// If provided, it will be used to encrypt the data.
/// If left blank, data will be encrypted using an internal Stream-specific
/// encryption key provisioned through KMS.
#[prost(string, optional, tag = "10")]
pub customer_managed_encryption_key: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Stream backfill strategy.
#[prost(oneof = "stream::BackfillStrategy", tags = "101, 102")]
pub backfill_strategy: ::core::option::Option<stream::BackfillStrategy>,
}
/// Nested message and enum types in `Stream`.
pub mod stream {
/// Backfill strategy to automatically backfill the Stream's objects.
/// Specific objects can be excluded.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackfillAllStrategy {
/// List of objects to exclude.
#[prost(oneof = "backfill_all_strategy::ExcludedObjects", tags = "1, 2, 3")]
pub excluded_objects: ::core::option::Option<
backfill_all_strategy::ExcludedObjects,
>,
}
/// Nested message and enum types in `BackfillAllStrategy`.
pub mod backfill_all_strategy {
/// List of objects to exclude.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ExcludedObjects {
/// Oracle data source objects to avoid backfilling.
#[prost(message, tag = "1")]
OracleExcludedObjects(super::super::OracleRdbms),
/// MySQL data source objects to avoid backfilling.
#[prost(message, tag = "2")]
MysqlExcludedObjects(super::super::MysqlRdbms),
/// PostgreSQL data source objects to avoid backfilling.
#[prost(message, tag = "3")]
PostgresqlExcludedObjects(super::super::PostgresqlRdbms),
}
}
/// Backfill strategy to disable automatic backfill for the Stream's objects.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BackfillNoneStrategy {}
/// Stream state.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
/// Unspecified stream state.
Unspecified = 0,
/// The stream has been created but has not yet started streaming data.
NotStarted = 1,
/// The stream is running.
Running = 2,
/// The stream is paused.
Paused = 3,
/// The stream is in maintenance mode.
///
/// Updates are rejected on the resource in this state.
Maintenance = 4,
/// The stream is experiencing an error that is preventing data from being
/// streamed.
Failed = 5,
/// The stream has experienced a terminal failure.
FailedPermanently = 6,
/// The stream is starting, but not yet running.
Starting = 7,
/// The Stream is no longer reading new events, but still writing events in
/// the buffer.
Draining = 8,
}
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 {
Self::Unspecified => "STATE_UNSPECIFIED",
Self::NotStarted => "NOT_STARTED",
Self::Running => "RUNNING",
Self::Paused => "PAUSED",
Self::Maintenance => "MAINTENANCE",
Self::Failed => "FAILED",
Self::FailedPermanently => "FAILED_PERMANENTLY",
Self::Starting => "STARTING",
Self::Draining => "DRAINING",
}
}
/// 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),
"NOT_STARTED" => Some(Self::NotStarted),
"RUNNING" => Some(Self::Running),
"PAUSED" => Some(Self::Paused),
"MAINTENANCE" => Some(Self::Maintenance),
"FAILED" => Some(Self::Failed),
"FAILED_PERMANENTLY" => Some(Self::FailedPermanently),
"STARTING" => Some(Self::Starting),
"DRAINING" => Some(Self::Draining),
_ => None,
}
}
}
/// Stream backfill strategy.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum BackfillStrategy {
/// Automatically backfill objects included in the stream source
/// configuration. Specific objects can be excluded.
#[prost(message, tag = "101")]
BackfillAll(BackfillAllStrategy),
/// Do not automatically backfill any objects.
#[prost(message, tag = "102")]
BackfillNone(BackfillNoneStrategy),
}
}
/// Represent a user-facing Error.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
/// A title that explains the reason for the error.
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
/// A unique identifier for this specific error,
/// allowing it to be traced throughout the system in logs and API responses.
#[prost(string, tag = "2")]
pub error_uuid: ::prost::alloc::string::String,
/// A message containing more information about the error that occurred.
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
/// The time when the error occurred.
#[prost(message, optional, tag = "4")]
pub error_time: ::core::option::Option<::prost_types::Timestamp>,
/// Additional information about the error.
#[prost(map = "string, string", tag = "5")]
pub details: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// The data within all ConnectionProfile events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionProfileEventData {
/// Optional. The ConnectionProfile event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<ConnectionProfile>,
}
/// The data within all PrivateConnection events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnectionEventData {
/// Optional. The PrivateConnection event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<PrivateConnection>,
}
/// The data within all Stream events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamEventData {
/// Optional. The Stream event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Stream>,
}
/// The data within all Route events.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteEventData {
/// Optional. The Route event payload. Unset for deletion events.
#[prost(message, optional, tag = "1")]
pub payload: ::core::option::Option<Route>,
}
/// The CloudEvent raised when a ConnectionProfile is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionProfileCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ConnectionProfileEventData>,
}
/// The CloudEvent raised when a ConnectionProfile is updated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionProfileUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ConnectionProfileEventData>,
}
/// The CloudEvent raised when a ConnectionProfile is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionProfileDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<ConnectionProfileEventData>,
}
/// The CloudEvent raised when a Stream is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<StreamEventData>,
}
/// The CloudEvent raised when a Stream is updated.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamUpdatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<StreamEventData>,
}
/// The CloudEvent raised when a Stream is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<StreamEventData>,
}
/// The CloudEvent raised when a PrivateConnection is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnectionCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<PrivateConnectionEventData>,
}
/// The CloudEvent raised when a PrivateConnection is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrivateConnectionDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<PrivateConnectionEventData>,
}
/// The CloudEvent raised when a Route is created.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteCreatedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<RouteEventData>,
}
/// The CloudEvent raised when a Route is deleted.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RouteDeletedEvent {
/// The data associated with the event.
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<RouteEventData>,
}