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 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum PermissionsMode {
#[allow(missing_docs)] // documentation missing in model
AllowAll,
#[allow(missing_docs)] // documentation missing in model
Standard,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for PermissionsMode {
fn from(s: &str) -> Self {
match s {
"ALLOW_ALL" => PermissionsMode::AllowAll,
"STANDARD" => PermissionsMode::Standard,
other => PermissionsMode::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for PermissionsMode {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(PermissionsMode::from(s))
}
}
impl PermissionsMode {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
PermissionsMode::AllowAll => "ALLOW_ALL",
PermissionsMode::Standard => "STANDARD",
PermissionsMode::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ALLOW_ALL", "STANDARD"]
}
}
impl AsRef<str> for PermissionsMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Information about the encryption of data at rest in an Amazon QLDB ledger. This includes the current status, the key in Key Management Service (KMS), and when the key became inaccessible (in the case of an error).</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/qldb/latest/developerguide/encryption-at-rest.html">Encryption at rest</a> in the <i>Amazon QLDB Developer Guide</i>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LedgerEncryptionDescription {
/// <p>The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.</p>
pub kms_key_arn: std::option::Option<std::string::String>,
/// <p>The current state of encryption at rest for the ledger. This can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>ENABLED</code>: Encryption is fully enabled using the specified key.</p> </li>
/// <li> <p> <code>UPDATING</code>: The ledger is actively processing the specified key change.</p> <p>Key changes in QLDB are asynchronous. The ledger is fully accessible without any performance impact while the key change is being processed. The amount of time it takes to update a key varies depending on the ledger size.</p> </li>
/// <li> <p> <code>KMS_KEY_INACCESSIBLE</code>: The specified customer managed KMS key is not accessible, and the ledger is impaired. Either the key was disabled or deleted, or the grants on the key were revoked. When a ledger is impaired, it is not accessible and does not accept any read or write requests.</p> <p>An impaired ledger automatically returns to an active state after you restore the grants on the key, or re-enable the key that was disabled. However, deleting a customer managed KMS key is irreversible. After a key is deleted, you can no longer access the ledgers that are protected with that key, and the data becomes unrecoverable permanently.</p> </li>
/// </ul>
pub encryption_status: std::option::Option<crate::model::EncryptionStatus>,
/// <p>The date and time, in epoch time format, when the KMS key first became inaccessible, in the case of an error. (Epoch time format is the number of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// <p>This parameter is undefined if the KMS key is accessible.</p>
pub inaccessible_kms_key_date_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl LedgerEncryptionDescription {
/// <p>The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.</p>
pub fn kms_key_arn(&self) -> std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
/// <p>The current state of encryption at rest for the ledger. This can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>ENABLED</code>: Encryption is fully enabled using the specified key.</p> </li>
/// <li> <p> <code>UPDATING</code>: The ledger is actively processing the specified key change.</p> <p>Key changes in QLDB are asynchronous. The ledger is fully accessible without any performance impact while the key change is being processed. The amount of time it takes to update a key varies depending on the ledger size.</p> </li>
/// <li> <p> <code>KMS_KEY_INACCESSIBLE</code>: The specified customer managed KMS key is not accessible, and the ledger is impaired. Either the key was disabled or deleted, or the grants on the key were revoked. When a ledger is impaired, it is not accessible and does not accept any read or write requests.</p> <p>An impaired ledger automatically returns to an active state after you restore the grants on the key, or re-enable the key that was disabled. However, deleting a customer managed KMS key is irreversible. After a key is deleted, you can no longer access the ledgers that are protected with that key, and the data becomes unrecoverable permanently.</p> </li>
/// </ul>
pub fn encryption_status(&self) -> std::option::Option<&crate::model::EncryptionStatus> {
self.encryption_status.as_ref()
}
/// <p>The date and time, in epoch time format, when the KMS key first became inaccessible, in the case of an error. (Epoch time format is the number of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// <p>This parameter is undefined if the KMS key is accessible.</p>
pub fn inaccessible_kms_key_date_time(
&self,
) -> std::option::Option<&aws_smithy_types::DateTime> {
self.inaccessible_kms_key_date_time.as_ref()
}
}
impl std::fmt::Debug for LedgerEncryptionDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LedgerEncryptionDescription");
formatter.field("kms_key_arn", &self.kms_key_arn);
formatter.field("encryption_status", &self.encryption_status);
formatter.field(
"inaccessible_kms_key_date_time",
&self.inaccessible_kms_key_date_time,
);
formatter.finish()
}
}
/// See [`LedgerEncryptionDescription`](crate::model::LedgerEncryptionDescription)
pub mod ledger_encryption_description {
/// A builder for [`LedgerEncryptionDescription`](crate::model::LedgerEncryptionDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) kms_key_arn: std::option::Option<std::string::String>,
pub(crate) encryption_status: std::option::Option<crate::model::EncryptionStatus>,
pub(crate) inaccessible_kms_key_date_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.</p>
pub fn kms_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.</p>
pub fn set_kms_key_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
/// <p>The current state of encryption at rest for the ledger. This can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>ENABLED</code>: Encryption is fully enabled using the specified key.</p> </li>
/// <li> <p> <code>UPDATING</code>: The ledger is actively processing the specified key change.</p> <p>Key changes in QLDB are asynchronous. The ledger is fully accessible without any performance impact while the key change is being processed. The amount of time it takes to update a key varies depending on the ledger size.</p> </li>
/// <li> <p> <code>KMS_KEY_INACCESSIBLE</code>: The specified customer managed KMS key is not accessible, and the ledger is impaired. Either the key was disabled or deleted, or the grants on the key were revoked. When a ledger is impaired, it is not accessible and does not accept any read or write requests.</p> <p>An impaired ledger automatically returns to an active state after you restore the grants on the key, or re-enable the key that was disabled. However, deleting a customer managed KMS key is irreversible. After a key is deleted, you can no longer access the ledgers that are protected with that key, and the data becomes unrecoverable permanently.</p> </li>
/// </ul>
pub fn encryption_status(mut self, input: crate::model::EncryptionStatus) -> Self {
self.encryption_status = Some(input);
self
}
/// <p>The current state of encryption at rest for the ledger. This can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>ENABLED</code>: Encryption is fully enabled using the specified key.</p> </li>
/// <li> <p> <code>UPDATING</code>: The ledger is actively processing the specified key change.</p> <p>Key changes in QLDB are asynchronous. The ledger is fully accessible without any performance impact while the key change is being processed. The amount of time it takes to update a key varies depending on the ledger size.</p> </li>
/// <li> <p> <code>KMS_KEY_INACCESSIBLE</code>: The specified customer managed KMS key is not accessible, and the ledger is impaired. Either the key was disabled or deleted, or the grants on the key were revoked. When a ledger is impaired, it is not accessible and does not accept any read or write requests.</p> <p>An impaired ledger automatically returns to an active state after you restore the grants on the key, or re-enable the key that was disabled. However, deleting a customer managed KMS key is irreversible. After a key is deleted, you can no longer access the ledgers that are protected with that key, and the data becomes unrecoverable permanently.</p> </li>
/// </ul>
pub fn set_encryption_status(
mut self,
input: std::option::Option<crate::model::EncryptionStatus>,
) -> Self {
self.encryption_status = input;
self
}
/// <p>The date and time, in epoch time format, when the KMS key first became inaccessible, in the case of an error. (Epoch time format is the number of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// <p>This parameter is undefined if the KMS key is accessible.</p>
pub fn inaccessible_kms_key_date_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inaccessible_kms_key_date_time = Some(input);
self
}
/// <p>The date and time, in epoch time format, when the KMS key first became inaccessible, in the case of an error. (Epoch time format is the number of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
/// <p>This parameter is undefined if the KMS key is accessible.</p>
pub fn set_inaccessible_kms_key_date_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inaccessible_kms_key_date_time = input;
self
}
/// Consumes the builder and constructs a [`LedgerEncryptionDescription`](crate::model::LedgerEncryptionDescription)
pub fn build(self) -> crate::model::LedgerEncryptionDescription {
crate::model::LedgerEncryptionDescription {
kms_key_arn: self.kms_key_arn,
encryption_status: self.encryption_status,
inaccessible_kms_key_date_time: self.inaccessible_kms_key_date_time,
}
}
}
}
impl LedgerEncryptionDescription {
/// Creates a new builder-style object to manufacture [`LedgerEncryptionDescription`](crate::model::LedgerEncryptionDescription)
pub fn builder() -> crate::model::ledger_encryption_description::Builder {
crate::model::ledger_encryption_description::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum EncryptionStatus {
#[allow(missing_docs)] // documentation missing in model
Enabled,
#[allow(missing_docs)] // documentation missing in model
KmsKeyInaccessible,
#[allow(missing_docs)] // documentation missing in model
Updating,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for EncryptionStatus {
fn from(s: &str) -> Self {
match s {
"ENABLED" => EncryptionStatus::Enabled,
"KMS_KEY_INACCESSIBLE" => EncryptionStatus::KmsKeyInaccessible,
"UPDATING" => EncryptionStatus::Updating,
other => EncryptionStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for EncryptionStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(EncryptionStatus::from(s))
}
}
impl EncryptionStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
EncryptionStatus::Enabled => "ENABLED",
EncryptionStatus::KmsKeyInaccessible => "KMS_KEY_INACCESSIBLE",
EncryptionStatus::Updating => "UPDATING",
EncryptionStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ENABLED", "KMS_KEY_INACCESSIBLE", "UPDATING"]
}
}
impl AsRef<str> for EncryptionStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum LedgerState {
#[allow(missing_docs)] // documentation missing in model
Active,
#[allow(missing_docs)] // documentation missing in model
Creating,
#[allow(missing_docs)] // documentation missing in model
Deleted,
#[allow(missing_docs)] // documentation missing in model
Deleting,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for LedgerState {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => LedgerState::Active,
"CREATING" => LedgerState::Creating,
"DELETED" => LedgerState::Deleted,
"DELETING" => LedgerState::Deleting,
other => LedgerState::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for LedgerState {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(LedgerState::from(s))
}
}
impl LedgerState {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
LedgerState::Active => "ACTIVE",
LedgerState::Creating => "CREATING",
LedgerState::Deleted => "DELETED",
LedgerState::Deleting => "DELETING",
LedgerState::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "CREATING", "DELETED", "DELETING"]
}
}
impl AsRef<str> for LedgerState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>The configuration settings of the Amazon Kinesis Data Streams destination for an Amazon QLDB journal stream.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct KinesisConfiguration {
/// <p>The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.</p>
pub stream_arn: std::option::Option<std::string::String>,
/// <p>Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.</p>
/// <p> <i>This option is enabled by default.</i> Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html">KPL Key Concepts</a> and <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html">Consumer De-aggregation</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
pub aggregation_enabled: std::option::Option<bool>,
}
impl KinesisConfiguration {
/// <p>The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.</p>
pub fn stream_arn(&self) -> std::option::Option<&str> {
self.stream_arn.as_deref()
}
/// <p>Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.</p>
/// <p> <i>This option is enabled by default.</i> Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html">KPL Key Concepts</a> and <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html">Consumer De-aggregation</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
pub fn aggregation_enabled(&self) -> std::option::Option<bool> {
self.aggregation_enabled
}
}
impl std::fmt::Debug for KinesisConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("KinesisConfiguration");
formatter.field("stream_arn", &self.stream_arn);
formatter.field("aggregation_enabled", &self.aggregation_enabled);
formatter.finish()
}
}
/// See [`KinesisConfiguration`](crate::model::KinesisConfiguration)
pub mod kinesis_configuration {
/// A builder for [`KinesisConfiguration`](crate::model::KinesisConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) stream_arn: std::option::Option<std::string::String>,
pub(crate) aggregation_enabled: std::option::Option<bool>,
}
impl Builder {
/// <p>The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.</p>
pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.stream_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.</p>
pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stream_arn = input;
self
}
/// <p>Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.</p>
/// <p> <i>This option is enabled by default.</i> Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html">KPL Key Concepts</a> and <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html">Consumer De-aggregation</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
pub fn aggregation_enabled(mut self, input: bool) -> Self {
self.aggregation_enabled = Some(input);
self
}
/// <p>Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.</p>
/// <p> <i>This option is enabled by default.</i> Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-concepts.html">KPL Key Concepts</a> and <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-kpl-consumer-deaggregation.html">Consumer De-aggregation</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
pub fn set_aggregation_enabled(mut self, input: std::option::Option<bool>) -> Self {
self.aggregation_enabled = input;
self
}
/// Consumes the builder and constructs a [`KinesisConfiguration`](crate::model::KinesisConfiguration)
pub fn build(self) -> crate::model::KinesisConfiguration {
crate::model::KinesisConfiguration {
stream_arn: self.stream_arn,
aggregation_enabled: self.aggregation_enabled,
}
}
}
}
impl KinesisConfiguration {
/// Creates a new builder-style object to manufacture [`KinesisConfiguration`](crate::model::KinesisConfiguration)
pub fn builder() -> crate::model::kinesis_configuration::Builder {
crate::model::kinesis_configuration::Builder::default()
}
}
/// <p>Information about a ledger, including its name, state, and when it was created.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LedgerSummary {
/// <p>The name of the ledger.</p>
pub name: std::option::Option<std::string::String>,
/// <p>The current status of the ledger.</p>
pub state: std::option::Option<crate::model::LedgerState>,
/// <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub creation_date_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl LedgerSummary {
/// <p>The name of the ledger.</p>
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The current status of the ledger.</p>
pub fn state(&self) -> std::option::Option<&crate::model::LedgerState> {
self.state.as_ref()
}
/// <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn creation_date_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_date_time.as_ref()
}
}
impl std::fmt::Debug for LedgerSummary {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("LedgerSummary");
formatter.field("name", &self.name);
formatter.field("state", &self.state);
formatter.field("creation_date_time", &self.creation_date_time);
formatter.finish()
}
}
/// See [`LedgerSummary`](crate::model::LedgerSummary)
pub mod ledger_summary {
/// A builder for [`LedgerSummary`](crate::model::LedgerSummary)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) state: std::option::Option<crate::model::LedgerState>,
pub(crate) creation_date_time: std::option::Option<aws_smithy_types::DateTime>,
}
impl Builder {
/// <p>The name of the ledger.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The current status of the ledger.</p>
pub fn state(mut self, input: crate::model::LedgerState) -> Self {
self.state = Some(input);
self
}
/// <p>The current status of the ledger.</p>
pub fn set_state(mut self, input: std::option::Option<crate::model::LedgerState>) -> Self {
self.state = input;
self
}
/// <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn creation_date_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_date_time = Some(input);
self
}
/// <p>The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn set_creation_date_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_date_time = input;
self
}
/// Consumes the builder and constructs a [`LedgerSummary`](crate::model::LedgerSummary)
pub fn build(self) -> crate::model::LedgerSummary {
crate::model::LedgerSummary {
name: self.name,
state: self.state,
creation_date_time: self.creation_date_time,
}
}
}
}
impl LedgerSummary {
/// Creates a new builder-style object to manufacture [`LedgerSummary`](crate::model::LedgerSummary)
pub fn builder() -> crate::model::ledger_summary::Builder {
crate::model::ledger_summary::Builder::default()
}
}
/// <p>Information about a journal export job, including the ledger name, export ID, creation time, current status, and the parameters of the original export creation request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JournalS3ExportDescription {
/// <p>The name of the ledger.</p>
pub ledger_name: std::option::Option<std::string::String>,
/// <p>The UUID (represented in Base62-encoded text) of the journal export job.</p>
pub export_id: std::option::Option<std::string::String>,
/// <p>The date and time, in epoch time format, when the export job was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub export_creation_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The current state of the journal export job.</p>
pub status: std::option::Option<crate::model::ExportStatus>,
/// <p>The inclusive start date and time for the range of journal contents that was specified in the original export request.</p>
pub inclusive_start_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The exclusive end date and time for the range of journal contents that was specified in the original export request.</p>
pub exclusive_end_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.</p>
pub s3_export_configuration: std::option::Option<crate::model::S3ExportConfiguration>,
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p>
/// <ul>
/// <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li>
/// <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li>
/// </ul>
pub role_arn: std::option::Option<std::string::String>,
/// <p>The output format of the exported journal data.</p>
pub output_format: std::option::Option<crate::model::OutputFormat>,
}
impl JournalS3ExportDescription {
/// <p>The name of the ledger.</p>
pub fn ledger_name(&self) -> std::option::Option<&str> {
self.ledger_name.as_deref()
}
/// <p>The UUID (represented in Base62-encoded text) of the journal export job.</p>
pub fn export_id(&self) -> std::option::Option<&str> {
self.export_id.as_deref()
}
/// <p>The date and time, in epoch time format, when the export job was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn export_creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.export_creation_time.as_ref()
}
/// <p>The current state of the journal export job.</p>
pub fn status(&self) -> std::option::Option<&crate::model::ExportStatus> {
self.status.as_ref()
}
/// <p>The inclusive start date and time for the range of journal contents that was specified in the original export request.</p>
pub fn inclusive_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.inclusive_start_time.as_ref()
}
/// <p>The exclusive end date and time for the range of journal contents that was specified in the original export request.</p>
pub fn exclusive_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.exclusive_end_time.as_ref()
}
/// <p>The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.</p>
pub fn s3_export_configuration(
&self,
) -> std::option::Option<&crate::model::S3ExportConfiguration> {
self.s3_export_configuration.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p>
/// <ul>
/// <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li>
/// <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li>
/// </ul>
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The output format of the exported journal data.</p>
pub fn output_format(&self) -> std::option::Option<&crate::model::OutputFormat> {
self.output_format.as_ref()
}
}
impl std::fmt::Debug for JournalS3ExportDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JournalS3ExportDescription");
formatter.field("ledger_name", &self.ledger_name);
formatter.field("export_id", &self.export_id);
formatter.field("export_creation_time", &self.export_creation_time);
formatter.field("status", &self.status);
formatter.field("inclusive_start_time", &self.inclusive_start_time);
formatter.field("exclusive_end_time", &self.exclusive_end_time);
formatter.field("s3_export_configuration", &self.s3_export_configuration);
formatter.field("role_arn", &self.role_arn);
formatter.field("output_format", &self.output_format);
formatter.finish()
}
}
/// See [`JournalS3ExportDescription`](crate::model::JournalS3ExportDescription)
pub mod journal_s3_export_description {
/// A builder for [`JournalS3ExportDescription`](crate::model::JournalS3ExportDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ledger_name: std::option::Option<std::string::String>,
pub(crate) export_id: std::option::Option<std::string::String>,
pub(crate) export_creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) status: std::option::Option<crate::model::ExportStatus>,
pub(crate) inclusive_start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) exclusive_end_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) s3_export_configuration:
std::option::Option<crate::model::S3ExportConfiguration>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) output_format: std::option::Option<crate::model::OutputFormat>,
}
impl Builder {
/// <p>The name of the ledger.</p>
pub fn ledger_name(mut self, input: impl Into<std::string::String>) -> Self {
self.ledger_name = Some(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_ledger_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ledger_name = input;
self
}
/// <p>The UUID (represented in Base62-encoded text) of the journal export job.</p>
pub fn export_id(mut self, input: impl Into<std::string::String>) -> Self {
self.export_id = Some(input.into());
self
}
/// <p>The UUID (represented in Base62-encoded text) of the journal export job.</p>
pub fn set_export_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.export_id = input;
self
}
/// <p>The date and time, in epoch time format, when the export job was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn export_creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.export_creation_time = Some(input);
self
}
/// <p>The date and time, in epoch time format, when the export job was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn set_export_creation_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.export_creation_time = input;
self
}
/// <p>The current state of the journal export job.</p>
pub fn status(mut self, input: crate::model::ExportStatus) -> Self {
self.status = Some(input);
self
}
/// <p>The current state of the journal export job.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::ExportStatus>,
) -> Self {
self.status = input;
self
}
/// <p>The inclusive start date and time for the range of journal contents that was specified in the original export request.</p>
pub fn inclusive_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inclusive_start_time = Some(input);
self
}
/// <p>The inclusive start date and time for the range of journal contents that was specified in the original export request.</p>
pub fn set_inclusive_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inclusive_start_time = input;
self
}
/// <p>The exclusive end date and time for the range of journal contents that was specified in the original export request.</p>
pub fn exclusive_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.exclusive_end_time = Some(input);
self
}
/// <p>The exclusive end date and time for the range of journal contents that was specified in the original export request.</p>
pub fn set_exclusive_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.exclusive_end_time = input;
self
}
/// <p>The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.</p>
pub fn s3_export_configuration(
mut self,
input: crate::model::S3ExportConfiguration,
) -> Self {
self.s3_export_configuration = Some(input);
self
}
/// <p>The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.</p>
pub fn set_s3_export_configuration(
mut self,
input: std::option::Option<crate::model::S3ExportConfiguration>,
) -> Self {
self.s3_export_configuration = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p>
/// <ul>
/// <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li>
/// <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li>
/// </ul>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:</p>
/// <ul>
/// <li> <p>Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.</p> </li>
/// <li> <p>(Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.</p> </li>
/// </ul>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The output format of the exported journal data.</p>
pub fn output_format(mut self, input: crate::model::OutputFormat) -> Self {
self.output_format = Some(input);
self
}
/// <p>The output format of the exported journal data.</p>
pub fn set_output_format(
mut self,
input: std::option::Option<crate::model::OutputFormat>,
) -> Self {
self.output_format = input;
self
}
/// Consumes the builder and constructs a [`JournalS3ExportDescription`](crate::model::JournalS3ExportDescription)
pub fn build(self) -> crate::model::JournalS3ExportDescription {
crate::model::JournalS3ExportDescription {
ledger_name: self.ledger_name,
export_id: self.export_id,
export_creation_time: self.export_creation_time,
status: self.status,
inclusive_start_time: self.inclusive_start_time,
exclusive_end_time: self.exclusive_end_time,
s3_export_configuration: self.s3_export_configuration,
role_arn: self.role_arn,
output_format: self.output_format,
}
}
}
}
impl JournalS3ExportDescription {
/// Creates a new builder-style object to manufacture [`JournalS3ExportDescription`](crate::model::JournalS3ExportDescription)
pub fn builder() -> crate::model::journal_s3_export_description::Builder {
crate::model::journal_s3_export_description::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum OutputFormat {
#[allow(missing_docs)] // documentation missing in model
IonBinary,
#[allow(missing_docs)] // documentation missing in model
IonText,
#[allow(missing_docs)] // documentation missing in model
Json,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for OutputFormat {
fn from(s: &str) -> Self {
match s {
"ION_BINARY" => OutputFormat::IonBinary,
"ION_TEXT" => OutputFormat::IonText,
"JSON" => OutputFormat::Json,
other => OutputFormat::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for OutputFormat {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(OutputFormat::from(s))
}
}
impl OutputFormat {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
OutputFormat::IonBinary => "ION_BINARY",
OutputFormat::IonText => "ION_TEXT",
OutputFormat::Json => "JSON",
OutputFormat::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ION_BINARY", "ION_TEXT", "JSON"]
}
}
impl AsRef<str> for OutputFormat {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3ExportConfiguration {
/// <p>The Amazon S3 bucket name in which a journal export job writes the journal contents.</p>
/// <p>The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub bucket: std::option::Option<std::string::String>,
/// <p>The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.</p>
/// <p>The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 Developer Guide</i>.</p>
/// <p>The following are examples of valid <code>Prefix</code> values:</p>
/// <ul>
/// <li> <p> <code>JournalExports-ForMyLedger/Testing/</code> </p> </li>
/// <li> <p> <code>JournalExports</code> </p> </li>
/// <li> <p> <code>My:Tests/</code> </p> </li>
/// </ul>
pub prefix: std::option::Option<std::string::String>,
/// <p>The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.</p>
pub encryption_configuration: std::option::Option<crate::model::S3EncryptionConfiguration>,
}
impl S3ExportConfiguration {
/// <p>The Amazon S3 bucket name in which a journal export job writes the journal contents.</p>
/// <p>The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn bucket(&self) -> std::option::Option<&str> {
self.bucket.as_deref()
}
/// <p>The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.</p>
/// <p>The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 Developer Guide</i>.</p>
/// <p>The following are examples of valid <code>Prefix</code> values:</p>
/// <ul>
/// <li> <p> <code>JournalExports-ForMyLedger/Testing/</code> </p> </li>
/// <li> <p> <code>JournalExports</code> </p> </li>
/// <li> <p> <code>My:Tests/</code> </p> </li>
/// </ul>
pub fn prefix(&self) -> std::option::Option<&str> {
self.prefix.as_deref()
}
/// <p>The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.</p>
pub fn encryption_configuration(
&self,
) -> std::option::Option<&crate::model::S3EncryptionConfiguration> {
self.encryption_configuration.as_ref()
}
}
impl std::fmt::Debug for S3ExportConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3ExportConfiguration");
formatter.field("bucket", &self.bucket);
formatter.field("prefix", &self.prefix);
formatter.field("encryption_configuration", &self.encryption_configuration);
formatter.finish()
}
}
/// See [`S3ExportConfiguration`](crate::model::S3ExportConfiguration)
pub mod s3_export_configuration {
/// A builder for [`S3ExportConfiguration`](crate::model::S3ExportConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) bucket: std::option::Option<std::string::String>,
pub(crate) prefix: std::option::Option<std::string::String>,
pub(crate) encryption_configuration:
std::option::Option<crate::model::S3EncryptionConfiguration>,
}
impl Builder {
/// <p>The Amazon S3 bucket name in which a journal export job writes the journal contents.</p>
/// <p>The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
self.bucket = Some(input.into());
self
}
/// <p>The Amazon S3 bucket name in which a journal export job writes the journal contents.</p>
/// <p>The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html">Bucket Restrictions and Limitations</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
self.bucket = input;
self
}
/// <p>The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.</p>
/// <p>The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 Developer Guide</i>.</p>
/// <p>The following are examples of valid <code>Prefix</code> values:</p>
/// <ul>
/// <li> <p> <code>JournalExports-ForMyLedger/Testing/</code> </p> </li>
/// <li> <p> <code>JournalExports</code> </p> </li>
/// <li> <p> <code>My:Tests/</code> </p> </li>
/// </ul>
pub fn prefix(mut self, input: impl Into<std::string::String>) -> Self {
self.prefix = Some(input.into());
self
}
/// <p>The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.</p>
/// <p>The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html">Object Key and Metadata</a> in the <i>Amazon S3 Developer Guide</i>.</p>
/// <p>The following are examples of valid <code>Prefix</code> values:</p>
/// <ul>
/// <li> <p> <code>JournalExports-ForMyLedger/Testing/</code> </p> </li>
/// <li> <p> <code>JournalExports</code> </p> </li>
/// <li> <p> <code>My:Tests/</code> </p> </li>
/// </ul>
pub fn set_prefix(mut self, input: std::option::Option<std::string::String>) -> Self {
self.prefix = input;
self
}
/// <p>The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.</p>
pub fn encryption_configuration(
mut self,
input: crate::model::S3EncryptionConfiguration,
) -> Self {
self.encryption_configuration = Some(input);
self
}
/// <p>The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.</p>
pub fn set_encryption_configuration(
mut self,
input: std::option::Option<crate::model::S3EncryptionConfiguration>,
) -> Self {
self.encryption_configuration = input;
self
}
/// Consumes the builder and constructs a [`S3ExportConfiguration`](crate::model::S3ExportConfiguration)
pub fn build(self) -> crate::model::S3ExportConfiguration {
crate::model::S3ExportConfiguration {
bucket: self.bucket,
prefix: self.prefix,
encryption_configuration: self.encryption_configuration,
}
}
}
}
impl S3ExportConfiguration {
/// Creates a new builder-style object to manufacture [`S3ExportConfiguration`](crate::model::S3ExportConfiguration)
pub fn builder() -> crate::model::s3_export_configuration::Builder {
crate::model::s3_export_configuration::Builder::default()
}
}
/// <p>The encryption settings that are used by a journal export job to write data in an Amazon Simple Storage Service (Amazon S3) bucket.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct S3EncryptionConfiguration {
/// <p>The Amazon S3 object encryption type.</p>
/// <p>To learn more about server-side encryption options in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub object_encryption_type: std::option::Option<crate::model::S3ObjectEncryptionType>,
/// <p>The Amazon Resource Name (ARN) of a symmetric key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.</p>
/// <p>You must provide a <code>KmsKeyArn</code> if you specify <code>SSE_KMS</code> as the <code>ObjectEncryptionType</code>.</p>
/// <p> <code>KmsKeyArn</code> is not required if you specify <code>SSE_S3</code> as the <code>ObjectEncryptionType</code>.</p>
pub kms_key_arn: std::option::Option<std::string::String>,
}
impl S3EncryptionConfiguration {
/// <p>The Amazon S3 object encryption type.</p>
/// <p>To learn more about server-side encryption options in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn object_encryption_type(
&self,
) -> std::option::Option<&crate::model::S3ObjectEncryptionType> {
self.object_encryption_type.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of a symmetric key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.</p>
/// <p>You must provide a <code>KmsKeyArn</code> if you specify <code>SSE_KMS</code> as the <code>ObjectEncryptionType</code>.</p>
/// <p> <code>KmsKeyArn</code> is not required if you specify <code>SSE_S3</code> as the <code>ObjectEncryptionType</code>.</p>
pub fn kms_key_arn(&self) -> std::option::Option<&str> {
self.kms_key_arn.as_deref()
}
}
impl std::fmt::Debug for S3EncryptionConfiguration {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("S3EncryptionConfiguration");
formatter.field("object_encryption_type", &self.object_encryption_type);
formatter.field("kms_key_arn", &self.kms_key_arn);
formatter.finish()
}
}
/// See [`S3EncryptionConfiguration`](crate::model::S3EncryptionConfiguration)
pub mod s3_encryption_configuration {
/// A builder for [`S3EncryptionConfiguration`](crate::model::S3EncryptionConfiguration)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) object_encryption_type:
std::option::Option<crate::model::S3ObjectEncryptionType>,
pub(crate) kms_key_arn: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The Amazon S3 object encryption type.</p>
/// <p>To learn more about server-side encryption options in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn object_encryption_type(
mut self,
input: crate::model::S3ObjectEncryptionType,
) -> Self {
self.object_encryption_type = Some(input);
self
}
/// <p>The Amazon S3 object encryption type.</p>
/// <p>To learn more about server-side encryption options in Amazon S3, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html">Protecting Data Using Server-Side Encryption</a> in the <i>Amazon S3 Developer Guide</i>.</p>
pub fn set_object_encryption_type(
mut self,
input: std::option::Option<crate::model::S3ObjectEncryptionType>,
) -> Self {
self.object_encryption_type = input;
self
}
/// <p>The Amazon Resource Name (ARN) of a symmetric key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.</p>
/// <p>You must provide a <code>KmsKeyArn</code> if you specify <code>SSE_KMS</code> as the <code>ObjectEncryptionType</code>.</p>
/// <p> <code>KmsKeyArn</code> is not required if you specify <code>SSE_S3</code> as the <code>ObjectEncryptionType</code>.</p>
pub fn kms_key_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of a symmetric key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.</p>
/// <p>You must provide a <code>KmsKeyArn</code> if you specify <code>SSE_KMS</code> as the <code>ObjectEncryptionType</code>.</p>
/// <p> <code>KmsKeyArn</code> is not required if you specify <code>SSE_S3</code> as the <code>ObjectEncryptionType</code>.</p>
pub fn set_kms_key_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_arn = input;
self
}
/// Consumes the builder and constructs a [`S3EncryptionConfiguration`](crate::model::S3EncryptionConfiguration)
pub fn build(self) -> crate::model::S3EncryptionConfiguration {
crate::model::S3EncryptionConfiguration {
object_encryption_type: self.object_encryption_type,
kms_key_arn: self.kms_key_arn,
}
}
}
}
impl S3EncryptionConfiguration {
/// Creates a new builder-style object to manufacture [`S3EncryptionConfiguration`](crate::model::S3EncryptionConfiguration)
pub fn builder() -> crate::model::s3_encryption_configuration::Builder {
crate::model::s3_encryption_configuration::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum S3ObjectEncryptionType {
#[allow(missing_docs)] // documentation missing in model
NoEncryption,
#[allow(missing_docs)] // documentation missing in model
SseKms,
#[allow(missing_docs)] // documentation missing in model
SseS3,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for S3ObjectEncryptionType {
fn from(s: &str) -> Self {
match s {
"NO_ENCRYPTION" => S3ObjectEncryptionType::NoEncryption,
"SSE_KMS" => S3ObjectEncryptionType::SseKms,
"SSE_S3" => S3ObjectEncryptionType::SseS3,
other => S3ObjectEncryptionType::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for S3ObjectEncryptionType {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(S3ObjectEncryptionType::from(s))
}
}
impl S3ObjectEncryptionType {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
S3ObjectEncryptionType::NoEncryption => "NO_ENCRYPTION",
S3ObjectEncryptionType::SseKms => "SSE_KMS",
S3ObjectEncryptionType::SseS3 => "SSE_S3",
S3ObjectEncryptionType::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["NO_ENCRYPTION", "SSE_KMS", "SSE_S3"]
}
}
impl AsRef<str> for S3ObjectEncryptionType {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ExportStatus {
#[allow(missing_docs)] // documentation missing in model
Cancelled,
#[allow(missing_docs)] // documentation missing in model
Completed,
#[allow(missing_docs)] // documentation missing in model
InProgress,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ExportStatus {
fn from(s: &str) -> Self {
match s {
"CANCELLED" => ExportStatus::Cancelled,
"COMPLETED" => ExportStatus::Completed,
"IN_PROGRESS" => ExportStatus::InProgress,
other => ExportStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ExportStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ExportStatus::from(s))
}
}
impl ExportStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ExportStatus::Cancelled => "CANCELLED",
ExportStatus::Completed => "COMPLETED",
ExportStatus::InProgress => "IN_PROGRESS",
ExportStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["CANCELLED", "COMPLETED", "IN_PROGRESS"]
}
}
impl AsRef<str> for ExportStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>Information about an Amazon QLDB journal stream, including the Amazon Resource Name (ARN), stream name, creation time, current status, and the parameters of the original stream creation request.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct JournalKinesisStreamDescription {
/// <p>The name of the ledger.</p>
pub ledger_name: std::option::Option<std::string::String>,
/// <p>The date and time, in epoch time format, when the QLDB journal stream was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The inclusive start date and time from which to start streaming journal data.</p>
pub inclusive_start_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The exclusive date and time that specifies when the stream ends. If this parameter is undefined, the stream runs indefinitely until you cancel it.</p>
pub exclusive_end_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p>
pub role_arn: std::option::Option<std::string::String>,
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream.</p>
pub stream_id: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the QLDB journal stream.</p>
pub arn: std::option::Option<std::string::String>,
/// <p>The current state of the QLDB journal stream.</p>
pub status: std::option::Option<crate::model::StreamStatus>,
/// <p>The configuration settings of the Amazon Kinesis Data Streams destination for a QLDB journal stream.</p>
pub kinesis_configuration: std::option::Option<crate::model::KinesisConfiguration>,
/// <p>The error message that describes the reason that a stream has a status of <code>IMPAIRED</code> or <code>FAILED</code>. This is not applicable to streams that have other status values.</p>
pub error_cause: std::option::Option<crate::model::ErrorCause>,
/// <p>The user-defined name of the QLDB journal stream.</p>
pub stream_name: std::option::Option<std::string::String>,
}
impl JournalKinesisStreamDescription {
/// <p>The name of the ledger.</p>
pub fn ledger_name(&self) -> std::option::Option<&str> {
self.ledger_name.as_deref()
}
/// <p>The date and time, in epoch time format, when the QLDB journal stream was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The inclusive start date and time from which to start streaming journal data.</p>
pub fn inclusive_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.inclusive_start_time.as_ref()
}
/// <p>The exclusive date and time that specifies when the stream ends. If this parameter is undefined, the stream runs indefinitely until you cancel it.</p>
pub fn exclusive_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.exclusive_end_time.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p>
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream.</p>
pub fn stream_id(&self) -> std::option::Option<&str> {
self.stream_id.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the QLDB journal stream.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The current state of the QLDB journal stream.</p>
pub fn status(&self) -> std::option::Option<&crate::model::StreamStatus> {
self.status.as_ref()
}
/// <p>The configuration settings of the Amazon Kinesis Data Streams destination for a QLDB journal stream.</p>
pub fn kinesis_configuration(
&self,
) -> std::option::Option<&crate::model::KinesisConfiguration> {
self.kinesis_configuration.as_ref()
}
/// <p>The error message that describes the reason that a stream has a status of <code>IMPAIRED</code> or <code>FAILED</code>. This is not applicable to streams that have other status values.</p>
pub fn error_cause(&self) -> std::option::Option<&crate::model::ErrorCause> {
self.error_cause.as_ref()
}
/// <p>The user-defined name of the QLDB journal stream.</p>
pub fn stream_name(&self) -> std::option::Option<&str> {
self.stream_name.as_deref()
}
}
impl std::fmt::Debug for JournalKinesisStreamDescription {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("JournalKinesisStreamDescription");
formatter.field("ledger_name", &self.ledger_name);
formatter.field("creation_time", &self.creation_time);
formatter.field("inclusive_start_time", &self.inclusive_start_time);
formatter.field("exclusive_end_time", &self.exclusive_end_time);
formatter.field("role_arn", &self.role_arn);
formatter.field("stream_id", &self.stream_id);
formatter.field("arn", &self.arn);
formatter.field("status", &self.status);
formatter.field("kinesis_configuration", &self.kinesis_configuration);
formatter.field("error_cause", &self.error_cause);
formatter.field("stream_name", &self.stream_name);
formatter.finish()
}
}
/// See [`JournalKinesisStreamDescription`](crate::model::JournalKinesisStreamDescription)
pub mod journal_kinesis_stream_description {
/// A builder for [`JournalKinesisStreamDescription`](crate::model::JournalKinesisStreamDescription)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ledger_name: std::option::Option<std::string::String>,
pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) inclusive_start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) exclusive_end_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) stream_id: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) status: std::option::Option<crate::model::StreamStatus>,
pub(crate) kinesis_configuration: std::option::Option<crate::model::KinesisConfiguration>,
pub(crate) error_cause: std::option::Option<crate::model::ErrorCause>,
pub(crate) stream_name: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The name of the ledger.</p>
pub fn ledger_name(mut self, input: impl Into<std::string::String>) -> Self {
self.ledger_name = Some(input.into());
self
}
/// <p>The name of the ledger.</p>
pub fn set_ledger_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ledger_name = input;
self
}
/// <p>The date and time, in epoch time format, when the QLDB journal stream was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_time = Some(input);
self
}
/// <p>The date and time, in epoch time format, when the QLDB journal stream was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)</p>
pub fn set_creation_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_time = input;
self
}
/// <p>The inclusive start date and time from which to start streaming journal data.</p>
pub fn inclusive_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.inclusive_start_time = Some(input);
self
}
/// <p>The inclusive start date and time from which to start streaming journal data.</p>
pub fn set_inclusive_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.inclusive_start_time = input;
self
}
/// <p>The exclusive date and time that specifies when the stream ends. If this parameter is undefined, the stream runs indefinitely until you cancel it.</p>
pub fn exclusive_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.exclusive_end_time = Some(input);
self
}
/// <p>The exclusive date and time that specifies when the stream ends. If this parameter is undefined, the stream runs indefinitely until you cancel it.</p>
pub fn set_exclusive_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.exclusive_end_time = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream.</p>
pub fn stream_id(mut self, input: impl Into<std::string::String>) -> Self {
self.stream_id = Some(input.into());
self
}
/// <p>The UUID (represented in Base62-encoded text) of the QLDB journal stream.</p>
pub fn set_stream_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stream_id = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the QLDB journal stream.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the QLDB journal stream.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The current state of the QLDB journal stream.</p>
pub fn status(mut self, input: crate::model::StreamStatus) -> Self {
self.status = Some(input);
self
}
/// <p>The current state of the QLDB journal stream.</p>
pub fn set_status(
mut self,
input: std::option::Option<crate::model::StreamStatus>,
) -> Self {
self.status = input;
self
}
/// <p>The configuration settings of the Amazon Kinesis Data Streams destination for a QLDB journal stream.</p>
pub fn kinesis_configuration(mut self, input: crate::model::KinesisConfiguration) -> Self {
self.kinesis_configuration = Some(input);
self
}
/// <p>The configuration settings of the Amazon Kinesis Data Streams destination for a QLDB journal stream.</p>
pub fn set_kinesis_configuration(
mut self,
input: std::option::Option<crate::model::KinesisConfiguration>,
) -> Self {
self.kinesis_configuration = input;
self
}
/// <p>The error message that describes the reason that a stream has a status of <code>IMPAIRED</code> or <code>FAILED</code>. This is not applicable to streams that have other status values.</p>
pub fn error_cause(mut self, input: crate::model::ErrorCause) -> Self {
self.error_cause = Some(input);
self
}
/// <p>The error message that describes the reason that a stream has a status of <code>IMPAIRED</code> or <code>FAILED</code>. This is not applicable to streams that have other status values.</p>
pub fn set_error_cause(
mut self,
input: std::option::Option<crate::model::ErrorCause>,
) -> Self {
self.error_cause = input;
self
}
/// <p>The user-defined name of the QLDB journal stream.</p>
pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.stream_name = Some(input.into());
self
}
/// <p>The user-defined name of the QLDB journal stream.</p>
pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.stream_name = input;
self
}
/// Consumes the builder and constructs a [`JournalKinesisStreamDescription`](crate::model::JournalKinesisStreamDescription)
pub fn build(self) -> crate::model::JournalKinesisStreamDescription {
crate::model::JournalKinesisStreamDescription {
ledger_name: self.ledger_name,
creation_time: self.creation_time,
inclusive_start_time: self.inclusive_start_time,
exclusive_end_time: self.exclusive_end_time,
role_arn: self.role_arn,
stream_id: self.stream_id,
arn: self.arn,
status: self.status,
kinesis_configuration: self.kinesis_configuration,
error_cause: self.error_cause,
stream_name: self.stream_name,
}
}
}
}
impl JournalKinesisStreamDescription {
/// Creates a new builder-style object to manufacture [`JournalKinesisStreamDescription`](crate::model::JournalKinesisStreamDescription)
pub fn builder() -> crate::model::journal_kinesis_stream_description::Builder {
crate::model::journal_kinesis_stream_description::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum ErrorCause {
#[allow(missing_docs)] // documentation missing in model
IamPermissionRevoked,
#[allow(missing_docs)] // documentation missing in model
KinesisStreamNotFound,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for ErrorCause {
fn from(s: &str) -> Self {
match s {
"IAM_PERMISSION_REVOKED" => ErrorCause::IamPermissionRevoked,
"KINESIS_STREAM_NOT_FOUND" => ErrorCause::KinesisStreamNotFound,
other => ErrorCause::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for ErrorCause {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(ErrorCause::from(s))
}
}
impl ErrorCause {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
ErrorCause::IamPermissionRevoked => "IAM_PERMISSION_REVOKED",
ErrorCause::KinesisStreamNotFound => "KINESIS_STREAM_NOT_FOUND",
ErrorCause::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["IAM_PERMISSION_REVOKED", "KINESIS_STREAM_NOT_FOUND"]
}
}
impl AsRef<str> for ErrorCause {
fn as_ref(&self) -> &str {
self.as_str()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
std::clone::Clone,
std::cmp::Eq,
std::cmp::Ord,
std::cmp::PartialEq,
std::cmp::PartialOrd,
std::fmt::Debug,
std::hash::Hash,
)]
pub enum StreamStatus {
#[allow(missing_docs)] // documentation missing in model
Active,
#[allow(missing_docs)] // documentation missing in model
Canceled,
#[allow(missing_docs)] // documentation missing in model
Completed,
#[allow(missing_docs)] // documentation missing in model
Failed,
#[allow(missing_docs)] // documentation missing in model
Impaired,
/// Unknown contains new variants that have been added since this code was generated.
Unknown(String),
}
impl std::convert::From<&str> for StreamStatus {
fn from(s: &str) -> Self {
match s {
"ACTIVE" => StreamStatus::Active,
"CANCELED" => StreamStatus::Canceled,
"COMPLETED" => StreamStatus::Completed,
"FAILED" => StreamStatus::Failed,
"IMPAIRED" => StreamStatus::Impaired,
other => StreamStatus::Unknown(other.to_owned()),
}
}
}
impl std::str::FromStr for StreamStatus {
type Err = std::convert::Infallible;
fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
Ok(StreamStatus::from(s))
}
}
impl StreamStatus {
/// Returns the `&str` value of the enum member.
pub fn as_str(&self) -> &str {
match self {
StreamStatus::Active => "ACTIVE",
StreamStatus::Canceled => "CANCELED",
StreamStatus::Completed => "COMPLETED",
StreamStatus::Failed => "FAILED",
StreamStatus::Impaired => "IMPAIRED",
StreamStatus::Unknown(s) => s.as_ref(),
}
}
/// Returns all the `&str` values of the enum members.
pub fn values() -> &'static [&'static str] {
&["ACTIVE", "CANCELED", "COMPLETED", "FAILED", "IMPAIRED"]
}
}
impl AsRef<str> for StreamStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
/// <p>A structure that can contain a value in multiple encoding formats.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValueHolder {
/// <p>An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.</p>
pub ion_text: std::option::Option<std::string::String>,
}
impl ValueHolder {
/// <p>An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.</p>
pub fn ion_text(&self) -> std::option::Option<&str> {
self.ion_text.as_deref()
}
}
impl std::fmt::Debug for ValueHolder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ValueHolder");
formatter.field("ion_text", &"*** Sensitive Data Redacted ***");
formatter.finish()
}
}
/// See [`ValueHolder`](crate::model::ValueHolder)
pub mod value_holder {
/// A builder for [`ValueHolder`](crate::model::ValueHolder)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) ion_text: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.</p>
pub fn ion_text(mut self, input: impl Into<std::string::String>) -> Self {
self.ion_text = Some(input.into());
self
}
/// <p>An Amazon Ion plaintext value contained in a <code>ValueHolder</code> structure.</p>
pub fn set_ion_text(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ion_text = input;
self
}
/// Consumes the builder and constructs a [`ValueHolder`](crate::model::ValueHolder)
pub fn build(self) -> crate::model::ValueHolder {
crate::model::ValueHolder {
ion_text: self.ion_text,
}
}
}
}
impl ValueHolder {
/// Creates a new builder-style object to manufacture [`ValueHolder`](crate::model::ValueHolder)
pub fn builder() -> crate::model::value_holder::Builder {
crate::model::value_holder::Builder::default()
}
}